# Introduction to System Modeling and Control

AI and Robotics

Oct 20, 2013 (4 years and 6 months ago)

182 views

Introduction to System Modeling and
Control

Introduction

Basic Definitions

Different Model Types

System Identification

Neural Network Modeling

Mathematical Modeling (MM)

A
mathematical model

represent a physical
system in terms of mathematical equations

It is derived based on physical laws
(
e.g.,Newton’s

law, Hooke’s, circuit laws,
etc.) in combination with experimental data.

It quantifies the essential features and
behavior of a physical system or process.

It may be used for prediction, design
modification and control.

Engineering Modeling Process

Graphical
Visualization/Animation

Engineering
System

Theory

Data

Example
: Automobile

Engine Design and Control

Heat & Vibration Analysis

Structural Analysis

Solution
Data

Math. Model

Numerical
Solution

Control
Design

Model
Reduction

System Variables

Every system is associated with 3
variables:

Input

variables (u) originate outside the system and
are not affected by what happens in the system

State

variables (x) constitute a
minimum

set of system
variables necessary to describe completely the state of
the system at any given time.

Output

variables (y) are a subset or a functional
combination of state variables, which one is interested
to monitor or regulate.

System

u

y

x

Mathematical Model Types

Lumped
-
parameter

discrete
-
event

Most General

Linear
-
Time invariant (LTI)

Input
-
Output Model

distributed

LTI Input
-
Output Model

Transfer Function Model

Discrete
-
time model:

Example: Accelerometer (Text 6.6.1)

Consider the mass
-
spring
-
damper (may be used as
accelerometer or seismograph) system shown below:

Free
-
Body
-
Diagram

M

f
s

f
d

f
s

f
d

x

f
s
(
y
): position dependent spring force, y=u
-
x

f
d
(
y
): velocity dependent spring force

Newton’s 2nd law

Linearizaed model:

M

u

x

Acceleromter Transfer Function

Accelerometer
Model:

Transfer Function: Y/A=1/(s
2
+2

n
s
+

n
2
)

n
=(k/m)
1/2
,

=b/2

n

Natural Frequency

n
, damping factor

Model can be used to evaluate the
sensitivity of the accelerometer

Impulse Response

Frequency Response

Impulse Response

Frequency Response

/

n

Mixed Systems

Most systems in mechatronics are of the
mixed type, e.g., electromechanical,
hydromechanical, etc

Each subsystem within a mixed system can
be modeled as single discipline system first

Power transformation among various
subsystems are used to integrate them into
the entire system

Overall mathematical model may be
assembled into a system of equations, or a
transfer function

Electro
-
Mechanical Example

Mechanical Subsystem

u

i
a

dc

R
a

L
a

J

B

Input
: voltage
u

Output
: Angular velocity

Elecrical Subsystem

(loop method):

Electro
-
Mechanical Example

Torque
-
Current:

Voltage
-
Speed:

Combing previous equations results in the following
mathematical model:

u

i
a

dc

R
a

L
a

B

Power Transformation
:

where K
t
: torque constant, K
b
: velocity constant For an
ideal motor

System identification

Experimental determination of system model.
There are two methods of system
identification:

Parametric Identification
: The input
-
output
model coefficients are estimated to “fit” the
input
-
output data.

Frequency
-
Domain

(non
-
parametric): The
Bode diagram [
G
(
j

) vs.

in log
-
log scale] is
estimated directly form the input
-
output data.
The input can either be a sweeping sinusoidal
or random signal.

Electro
-
Mechanical Example

u

i
a

K
t

R
a

L
a

B

Transfer Function, L
a
=0:

0

0.1

0.2

0.3

0.4

0.5

0

2

4

6

8

10

12

Time (secs)

Amplitude

T

u

t

k
=10,
T
=0.1

Identification

Graphical method is

difficult to optimize with noisy data and
multiple data sets

only applicable to low order systems

difficult to automate

Least Squares Estimation

Given a linear system with uniformly
sampled input output data, (u(k),y(k)), then

Least squares curve
-
fitting technique may
be used to estimate the coefficients of the
above model called ARMA (Auto Regressive
Moving Average) model.

Nonlinear System Modeling

& Control

Neural Network Approach

Introduction

Real world nonlinear systems often difficult to
characterize by first principle modeling

First principle models are often

suitable for control design

Modeling often accomplished with input
-
output maps of experimental data from the
system

Neural networks provide a powerful tool for
data
-
driven modeling of nonlinear systems

Input
-
Output (NARMA) Model

What is a Neural Network?

Artificial Neural Networks (ANN) are
massively
parallel

computational machines
(program or hardware) patterned after
biological neural nets.

ANN’s are used in a wide array of applications
requiring reasoning/information processing
including

pattern recognition/classification

monitoring/diagnostics

system identification & control

forecasting

optimization

of ANN’s

Learning
from

Parallel architecture

Fault tolerance and
redundancy

Hard to design

Unpredictable behavior

Slow Training

“Curse” of dimensionality

Biological Neural Nets

A neuron is a building block of biological
networks

A single cell neuron consists of the cell body
(soma), dendrites, and axon.

The dendrites receive signals from axons of
other neurons.

The pathway between neurons is synapse
with variable strength

Artificial Neural Networks

They are used to learn a given input
-
output relationship from input
-
output
data (exemplars).

The neural network type depends
primarily on its activation function

Most
popular ANNs:

Sigmoidal

Multilayer Networks

Multilayer
Perceptron

MLP is used to learn, store, and produce
input output relationships

The activation function

(x) is a suitable
nonlinear function:

Sigmidal
:

(x)=
tanh
(x)

Gaussian:

(x)=e
-
x2

Triangualr

(to be described later)

x
1

x
2

y

weights

activation
function

Sigmoidal

and Gaussian
Activation Functions

Multilayer
Netwoks

W
k,ij
: Weight from node i in layer k
-
1 to node j in layer k

x

y

W
0

W
p

Universal Approximation
Theorem (UAT)

:

The UAT does not say how large the network
should be

Optimal design and training may be difficult

A single hidden layer perceptron network with a
sufficiently large number of neurons can
approximate any continuous function arbitrarily
close
.

Training

Objective
: Given a set of training input
-
output data (x,y
t
) FIND the network
weights that minimize the expected
error

Steepest Descent Method
weights in the direction of steepest
descent of L to make dL as negative as
possible.

Neural Networks with Local Basis
Functions

These networks employ basis (or
activation) functions that exist
locally
, i.e.,
they are activated only by a certain type of
stimuli

Examples:

Cerebellar Model Articulation Controller (CMAC,
Albus
)

B
-
Spline CMAC

Biological Underpinnings

Cerebellum: Responsible for complex
voluntary movement and balance in
umans

Purkinje cells in cerebellar cortex is believed
to have CMAC like architecture

Piecewise multilinear network
(extension of 1
-
dimensional spline)

Good approximation capability (2nd
order)

Convergent training algorithm

Globally optimal training is possible

Has been used in real world control
applications

NLPN Architecture

Input
-
Output Equation

Basis Function:

Each

ij

is a
1
-
dimensional
triangular

basis function over a finite interval

x

y

w
i

NLPN
Approximation: 1
-
D Functions

Consider a scalar function f(x
)

f(x) on interval [a
i
,a
i+1
] can be approximated
by a line

a
i+1

w
i

a
i

w
i+1

Basis Function Approximation

Defining the
activation/
basis
functions

Function f can expressed as

This is also similar to fuzzy
-
logic approximation
with “triangular” membership functions.

(1st order B
-
spline CMAC)

a
i

a
i
-
1

a
i+1

Neural Network Approximation of
NARMA Model

y

y[k
-
m]

u[k
-
1]

Question: Is an arbitrary neural network model
consistent with a physical system (i.e., one that has
an internal realization)?

State
-
Space Model

u

y

States: x
1
,…,x
n

system

A Class of Observable State
Space Realizable Models

Consider the input
-
output model:

When does the input
-
output model have a
state
-
space realization?

Input
-
Output Model

A Generic input
-
Output Model does not
necessarily have a state
-
space realization
(Sadegh 2001, IEEE Trans. On Auto. Control)

There are necessary and sufficient conditions
for realizability

Once these conditions are satisfied the state
-
space model may be symbolically or
computationally constructed

A general class of input
-
Output Models may
be constructed that is guaranteed to admit a
state
-
space realization

The Model Form

The following Input
-
Output Model
realization:

State Space Realization

The
state
-
model of the input
-
output model is
as follows with y=x
1
:

Neural Networks

Reduced coupling results in sub
-
networks:

Can’t
use prepackaged software, but
standard training methods are the same

Local basis functions, similar to CMAC
networks. Reduced Coupling also results
in sub
-
networks:

Simulation
Example

Nonlinear mass spring
damper

Data
sampled at 0.01s, output is the velocity
of the 2
nd

mass

Simulation Results

I: Linear model. mse=0.0281. training(static) mse=0.0059.

II: NARMA model. mse=0.0082. training(static) mse=0.0021.

III. Neural network. mse=3.6034e
-
4. training(static) mse=0.0016.N

IV. NLPN. mse=7.2765e
-
4. training(static) mse=2.6622e
-
4.

Simulation Results

I: Linear model. mse=0.0271.

II: NARMA model. mse=0.0067.

III. Neural network. mse=5.3790e
-
4.

IV. NLPN. mse=7.1835e
-
4.

Conclusions

A number of data driven modeling techniques are
suitable for an observable state space
transformation

Rough
guidelines were given for when and how to
use NARMA, neural network and NLPN models

NLPN modifications make it an easily trainable
option with excellent capabilities

Substantial training & design issues include data
sampling rate and input repetition due to the
reduced coupling restriction

Fluid Power Application

APPLICATIONS:

Robotics

Manufacturing

Automobile industry

Hydraulics

INTRODUCTION

EHPV control

(electro
-
hydraulic poppet valve)

Highly nonlinear

Time varying characteristics

Control schemes needed to
open two or more valves
simultaneously

EXAMPLE:

Motivation

The valve opening is controlled by
means of the solenoid input current

The standard approach is to calibrate of
the current
-
opening relationship for
each valve

Manual calibration is time consuming
and inefficient

Research Goals

Precisely control the conductivity of
each valve using a nominal input
-
output
relationship.

Auto
-
calibrate the input
-
output
relationship

Use the auto
-
calibration for precise
control without requiring the exact
input
-
output relationship

EXAMPLE:

Several EHPV’s were used
to control the hydraulic
piston

Each EHPV is supplied with
its own learning controller

Learning Controller employs
a Neural Network
(NLPN) in
the
feedback

Satisfactory results for
single EHPV used for
pressure control

INTRODUCTION

Control Design

Nonlinear system (‘lifted’ to a square system)

Feedback Control Law

is the
neural network
output

The
neural network controller
is
directly

trained
based
on the time history of the tracking error

Learning Control Block Diagram

Experimental Results

Experimental Results
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://www.techylib.com/en/view/guineanhill/introduction_to_system_modeling_and_control", "fetch_time": 1524163940000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-17/segments/1524125937016.16/warc/CC-MAIN-20180419184909-20180419204909-00378.warc.gz", "warc_record_offset": 883314100, "warc_record_length": 15898, "token_count": 2959, "char_count": 11394, "score": 3.671875, "int_score": 4, "crawl": "CC-MAIN-2018-17", "snapshot_type": "latest", "language": "en", "language_score": 0.7291232347488403, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00062-of-00064.parquet"}