Introduction to System Modeling and
Control
Introduction
Basic Definitions
Different Model Types
System Identification
Neural Network Modeling
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.
Theory
Data f c
v
T m
dv dt
v
x
bv f
Numerical
Solution
Engineering
System
Example: Automobile
• Engine Design and Control
• Heat & Vibration Analysis
• Structural Analysis
Math. Model
Model
Reduction
Control
Design
Solution
Data
Graphical
Visualization/Animation
Definition of System
System: An aggregation or assemblage of things so combined by man or nature to form an integral and complex whole.
From engineering point of view, a system is defined as an interconnection of many components or functional units act together to perform a certain objective, e.g., automobile, machine tool, robot, aircraft, etc.
System Variables
Every system is associated with 3 variables: u y
System x
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.
discrete-event
Lumped-parameter distributed
Most General x
f ( x , u , y
h ( x , u , t t )
) y
( n )
Input-Output Model f ( y
( n
1 )
, , , y , u
( n )
, , , u , t )
Linear-Time invariant (LTI) y
Ax
Cx
Bu
Du y
( n ) a
1 y
( n
1 )
LTI Input-Output Model
a n
1
y
a n y
b
0 u
( n )
b n
1 u b n u
Transfer Function Model
Y ( s )
G ( s ) U ( s )
Discrete-time model: y
(
( i ) t )
( t
) x
( t y (
t
1 )
i )
Example: Accelerometer (Text 6.6.1)
Consider the mass-spring-damper (may be used as accelerometer or seismograph) system shown below:
Free-Body-Diagram x f s f s x
M
M f d f d f s
( y ): position dependent spring force, y=u-x f d
( y ): velocity dependent spring force
Newton’s 2nd law M x
M
Linearizaed model:
f d
( )
f s
( y )
M y
b y
ky
M u
u
Example II: Delay Feedback
Consider the digital system shown below: y u
Delay z -1
Input-Output Eq.: y ( k )
y ( k
1 )
u ( k
1 )
Equivalent to an integrator: y ( k )
j
1 k
0 u ( j )
Transfer Function
Transfer Function is the algebraic input-output relationship of a linear time-invariant system in the s (or z) domain
U G Y
Example: Accelerometer System m y
b
ky
G ( s )
Y ( s )
U ( s )
ms 2 ms 2
bs
k
, s
d dt
Example: Digital Integrator y ( k )
y ( k
1 )
u ( k
1 )
G
Y ( z ) u ( z )
1 z
1
z
1
, z
Forward shift
Comments on TF
Transfer function is a property of the system independent from input-output signal
It is an algebraic representation of differential equations
Systems from different disciplines (e.g., mechanical and electrical) may have the same transfer function
Accelerometer Model: M y
b y
ky
M u
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
Bode Diagrams
From: U(1)
40
20
0
-20
-40
-60
0
-50
-100
-150
-200
10
-1
10
0
Frequency (rad/sec)
/ n
10
1
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
Input: voltage u
Output: Angular velocity
u
R a i a
L a
B dc
J
Elecrical Subsystem (loop method): u
R a i a
L a di a dt
e b
, e b
back emf voltage
Mechanical Subsystem T motor
J
B
Electro-Mechanical Example
Power Transformation:
Torque-Current: T motor
K t i a
Voltage-Speed: e b
K b
u
R a i a
L a dc
B where K t
: torque constant, K b ideal motor K t
K b
: velocity constant For an
Combing previous equations results in the following mathematical model:
L a
J di a
dt
B
R a i a
K t
i a
K b
0
u
A brushless PMSM has a wound stator, a PM rotor assembly and a position sensor.
The combination of inner
PM rotor and outer windings offers the advantages of
low rotor inertia
efficient heat dissipation, and reduction of the motor size.
c q b d
e
e
=p
+
0
Electrical angle a offset
Number of poles/2
di d dt di q dt
R
L
R i q
L i d
p
m i q
p
m i d
1 v d
L
K e
m
L
1 v q
L
Where p=number of poles/2, K e
=back emf constant
J m
T e
K t i q
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
Transfer Function, L a
=0:
Ω(s)
U(s) Js
B
K t
R a
K t
K
b
R a
Ts k
1 u t
12 ku
10
8 k =10, T =0.1
2
0
0
6
4 u
R a i a
L a
0.1
T
0.2
Time (secs)
0.3
B
K t
0.4
0.5
Comments on First Order
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 y ( k )
a
1 y ( k
1 )
a n y ( k
n )
b
1 u ( k
1 )
b n u ( k
n )
noise
Least squares curve-fitting technique may be used to estimate the coefficients of the above model called ARMA (Auto Regressive
Moving Average) model.
Frequency-Domain Identification
Method I (Sweeping Sinusoidal):
A i system f t>>0
A o
Magnitude
A
0
A i
db
,
Method II (Random Input):
Phase
system
Transfer function is determined by analyzing the spectrum of the input and output
Photo Receptor Drive Test Fixture
Experimental Bode Plot
System Models
180
90
0
90
180
0.1
25
0
25
50
75
0.1
1
1 low order
10
Frequency (Hz)
10
Frequency (Hz)
100
100 high order
1 10
3
1 10
3
Neural Network Approach
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 inputoutput maps of experimental data from the system
Neural networks provide a powerful tool for data-driven modeling of nonlinear systems
u z -1 z -1 z -1 g z -1 z -1 z -1 y y [ k ]
g ( y [ k
m ],..., y [ k
1 ], u [ k
m ],..., u [ k
1 ])
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
Advantages:
Learning from
Parallel architecture
Adaptability
Fault tolerance and redundancy
Disadvantages:
Hard to design
Unpredictable behavior
Slow Training
“Curse” of dimensionality
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
They are used to learn a given inputoutput relationship from input-output data (exemplars).
The neural network type depends primarily on its activation function
Most popular ANNs:
Sigmoidal Multilayer Networks
Radial basis function
NLPN (Sadegh et al 1998,2010)
MLP is used to learn, store, and produce input output relationships x
1 x
2
y
i w i
(
j x j v ij
) y function
The activation function (x) is a suitable nonlinear function:
Sigmidal: (x)=tanh(x) activation
Gaussian: (x)=e -x2 weights
Triangualr (to be described later)
0.5
0.4
0.3
0.2
0.1
0
-5
1
0.9
0.8
0.7
0.6
-4 -3 gaussian
-2 -1 x
0 1 2 sigmoid
3 4 5
y x
W
0
W p
W k,ij
: Weight from node i in layer k-1 to node j in layer k y
W
T p
σ
W
T p
1
σ
σ
W
T
1
σ
W
T
0 x
A single hidden layer perceptron network with a sufficiently large number of neurons can approximate any continuous function arbitrarily
close.
Comments:
The UAT does not say how large the network should be
Optimal design and training may be difficult
Objective: Given a set of training inputoutput data (x,y t
) FIND the network weights that minimize the expected error
L
E ( y
y t
2
)
Steepest Descent Method: Adjust weights in the direction of steepest descent of L to make dL as negative as possible.
dL
E ( e
T d y )
0 , e
y
y t
u[k-1] y[k-m] y
Question: Is an arbitrary neural network model consistent with a physical system (i.e., one that has an internal realization)?
u
system
States: x
1
,…,x n x [ k
1 ]
f ( x [ k ], u [ k ]) y [ k ]
h ( x [ k ]) y
Consider the input-output model: y [ k ]
g ( y [ k
m ],..., y [ k
1 ], u [ k
m ],..., u [ k
1 ])
When does the input-output model have a state-space realization? x [ k
1 ]
f ( x [ k ], u [ k ]) y [ k ]
h ( x [ k ])
Comments on State Realization of
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 statespace 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
INTRODUCTION
APPLICATIONS:
Robotics
Manufacturing
Automobile industry
Hydraulics
EXAMPLE:
EHPV control
(electro-hydraulic poppet valve)
Highly nonlinear
Time varying characteristics
Control schemes needed to open two or more valves simultaneously
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
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
INTRODUCTION
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
Nonlinear system (‘lifted’ to a square system) x k
n
F
x k
, u k
Feedback Control Law
u
ˆ
( x d
, x d
)
K p
ˆ ( x d
x d
, x d
)
( x
x d
)
ˆ ( x d
, x d
) is the neural network output
The neural network controller is directly on the time history of the tracking error trained based
Learning Control Block Diagram