Chapter#5
Chapter#5
Dynamic Systems
• So far, we have developed system models that are collections of either first-order ODEs (i.e.,
an electrical circuit with a single capacitor or single inductor), and/or second-order ODEs (i.e.,
mechanical systems)
• “Standard forms” of dynamic systems will facilitate the solution of the system response, using
either analytical or numerical methods (i.e., MATLAB/Simulink)
– State-variable equations
– State-space representation (SSR)
– Input-output (I/O) equations
– Transfer functions
– Block diagrams
– Different control techniques (kalman filter, LQR and robust control) based on state space
model.
5.2 State-Variable Equations
• One method for representing system models is to use state variables, which are a set of
variables that completely define (or describe) a system.
– The number of state variables is equal to n, which is the order of the system modeling ODEs.
• State: the smallest set of dynamic variables that completely define a dynamic system
– These variables are called state variables and are usually the physical variables of the system
(displacement, velocity for mechanical systems; voltage, current for electrical systems; pressure,
temperature for fluid/thermal systems)
– If one knows the state of a system, then any quantity can be determined (such as energy,
momentum, etc). However, the choice of state variables is not unique.
x 1 f1 ( x1 , x 2 ,..., x n , u1 , u2 ,..., u r )
x 2 f 2 ( x1 , x 2 ,..., x n , u1 , u2 ,..., u r )
x n f n ( x1 , x 2 ,..., x n , u1 , u2 ,..., u r )
2
z 0.8 z 0.4 w 0.2 zw 0 Dynamic variable
Input variable
Dynamic variable
4 w 3w 0.1w3 6 z 8v
x1 z x1 x2
State space
x 2
z 0.5( 0.8 z 0.4 w 0.2 zw) x 2 0.5( 0.8 x1 0.4 x3 0.2 x2 x3 ) equation
3
x3 w 0.25( 3w 0.1w3 6 z 8v) x 3 0.25( 3 x3 0.1x3 6 x1 8u )
State-Variable Equations:
Example 5.2
• Derive the state-variable equations for the mass-spring-damper mechanical
system with a nonlinear spring force
f k ( z ) k1 z k 3 z 3
mz bz k1 z k 3 z 3 Fa
Mechanical system
(nonlinear)
(worked on board)
5.3 State-Space Representation (SSR)
• For modern, complex dynamic systems, we often encounter systems with multiple inputs
and multiple outputs (MIMO)
– IF the system is linear, we can set the state-variable equations in a convenient vector-matrix
format, which we will call a state-space representation (SSR)
– The SSR vector-matrix format that is extremely well-suited for computer simulation (MATLAB and
Simulink)
• State vector: For a system of order n, we require n state variables to completely define the
system
– We arrange these state variables in an column vector called the state vector, x
– The state vector is not a physical vector (like a 3-component force vector) but rather a convenient
grouping of the important dynamic variables.
• State space: An n-dimensional “geometric space” that contains the state vector x
State-Space Representation (2)
• In order to obtain a complete state-space model, we must obtain n first-order, linear
differential equations.
• For example, if our system is LTI and third order (n = 3) with two inputs (r = 2), then our state-
variable equations must have the form:
• Suppose that we have two outputs (m = 2; perhaps these variables are measured by two
sensors):
x Ax Bu “state equation”
• First, assemble all variables (states, outputs, inputs) into column vectors with proper
dimensions:
x1 u1 y1
x u y
x 2 u 2 y 2
x n ur ym
“state vector,” n x 1 “input vector,” r x 1 “output vector,” m x 1
• Note that the left-hand side of the state equations is the first time derivative of the state vector x
State-Space Representation (5)
• We can assemble the a, b, c, and d coefficients of the state and output
equations into four matrices:
x Ax Bu “state equation”
x Ax Bu “state equation”
x Ax Bu y Cx Du
State-Space Representation:
Example 5.6
• Obtain a complete state-space representation (SSR) of the electromechanical DC
motor
– A tachometer is used to measure the angular velocity of the rotor ( ), and an
ammeter is used to measure current in the armature circuit ( I )
• The electrical and mechanical ODEs are 1 st-order and 2nd-order, respectively
– Consequently, n = 3 and the system requires three state variables
State-Space Representation:
Example 5.6 (2)
• Therefore, let’s select the 3x1 state vector as
I x1
x x2
x3 DC motor model
x3
y
I x1
State-Space Representation:
Example 5.6 (2)
1
x1 I ( RI ein (t ) kb )
LI RI ein (t ) K b
L ein (t ) u1
u
x 2
TL u2 J b K m I TL
1
x 3 ( b K m I TL )
J
R R kb
x1 x1 u1 x3
L L L y1 x3 Combine them in
x 2 x3 y matrix form
y2 x1
b Km 1
x 3 x3 x1 u2
J J J
State-Space Representation:
Example 5.6 (3)
• Complete the derivation on the board… the SSR result is
x 1 R / L 0 K b / L 1 / L 0
x x 2 0 0 1 x 0 0 u
x 3 K m / J 0 b / J 0 1 / J
A B State equation
y1 0 0 1 0 0
y x u Output equation
y 2 1 0 0 0 0
C D
• An input-output (I/O) equation is a differential equation that only involves the input variable u,
output variable y, and their derivatives
For systems with two or more inputs, the right-hand side of the I/O equation will include additional input
terms
If we have a system with m output variables, we will have m I/O equations, one for each output variable.
Therefore, unlike the state-variable equations, we can solve each I/O independently from the others.
I/O Equations: Simple Example
• Consider again the 1-DOF mechanical system (mass-spring-damper with input force Fa ):
Since this equation only involves output y and input u, it is the I/O equation
Systems with multiple states/outputs require significant algebra to derive the I/O equations
Differential Operator
• For more complicated systems with multiple outputs, developing the I/O equations involve
much more effort than obtaining the SSR
• A useful method to simplify the algebra is to employ the differential operator or “D operator,”
defined below:
d
D
dt
Dy y D 2 y y etc
• We can use the D operator to manipulate the governing dynamical equations in order to obtain
the desired I/O equation (Example 5.13 in the textbook)
Differential Operator: Example 5.13
Input u Fa (t )
output y z1
m2 z2 k ( z2 z1 ) Fa (t ) Mathematical m2 z2 k ( z2 y ) u A
Model in terms
m1
z1 bz1 k ( z1 z2 ) 0 of I/O
m1
y by k ( y z2 ) 0 B
m1m2
y bm2 y (m1k m2 k ) y bky ku
5.6 Transfer Functions
• Transfer functions (TFs) are a convenient way to represent and analyze the input-output (or
cause-and-effect) relationship of a SISO dynamic system
– Transfer functions are based on Laplace transform methods
• Laplace transforms are an operation method that can be used to solve linear differential equations
(ODEs)
• Laplace transformations convert linear differential equations into algebraic equations in terms of
the Laplace variable “s”
• Transforming a time function f(t) from the time domain to the Laplace (or “s”) domain is defined by
the integral:
L f (t ) F ( s) 0 f (t )e st dt Laplace transform
Transfer Functions (2)
• We can use the Laplace transformation operation to transform standard time functions (step
function, impulse, sinusoid, etc) into the Laplace (or “s”) domain, and therefore Laplace tables
can be constructed in order to aid analytical calculations
• Chapter 8 presents a brief overview of Laplace transform theory and the solution of differential
equations using Laplace transform methods
• Transfer functions are commonly used in block diagrams (“simulation diagrams”) and
numerical algorithms such as MATLAB and Simulink
• However, we may develop (and use) transfer functions without formal use of the Laplace
transformation method
Developing Transfer Functions
• In order to develop the transfer function in the Laplace domain (without dealing with Laplace transforms), consider the following third-order I/O equation:
Now, consider an exponential input, u(t) = U(s)est, where s = + j is a complex variable and
• Therefore, est will be complex (real + imaginary parts)
– Since input u(t) is strictly real, U(s) will be the complex conjugate of est
• Now, substitute the exponential input and output equations into the I/O differential
equation, with the knowledge that y s 2Y ( s )e st and y sY ( s )e st etc…
a s
3
3
a 2 s 2 a1 s a 0 Y ( s )e st b1 s b0 U ( s )e st
a D
3
3
a 2 D 2 a1 D a0 y (t ) b1 D b0 u(t )
• It should be stressed that while MATLAB and Simulink very often rely on TFs
(which use the complex variable s) to represent I/O differential equations, their
numerical solution techniques are based on the time-domain differential
equations and not the Laplace-transform solutions.
D 2 y 8 Dy 10 y 4 Du
y (t ) 4D
• Form the ratio of output/input: 2
u (t ) D 8 D 10
• Replace D with s
4s
G( s) 2 Transfer function
s 8s 10
5.7 Block Diagrams
• Integration:
Simulink
notation
Standard Block-Diagrams Components (3)
LI RI ein (t )
I (t ) 1 I (s) 1
D=s Transfer Function
ein (t ) LD R Ein ( s ) Ls R
Block Diagram
Block Diagram: Example 5.17
eL eR ein (t ) 0 KVL
LI RI ein (t )
I 1 (e (t ) RI )
in
L
1
+ I (ein (t ) RI ) I
ein (t ) 1 L 1 eo
R
L s
-
RI eo RI
Block Diagram: Example 5.17
+ 1 I Km I +
- 1
ein (t ) Km
Ls R Js b
-
K b
Kb
5.8 Standard Input Functions
• The subsequent chapters will emphasize obtaining the output or system response to a
desired input function
• We can think of these “standard” input functions as “test input signals” for characterizing
the system’s dynamic response
• Many standard input functions have a basis in the realistic (expected) input for a
dynamic system
Step Input
• The step input shows a sudden, instantaneous change (step) from one constant value
to another constant value
U(t)
Unit-step input
1
0 for t 0
U (t )
1 for t 0 t
0
• Many times the step input is initially zero and instantaneously steps to a constant
value
t
0
• The ramped step input might be a more realistic representation of a step input, since
most physical inputs require a finite time interval to change from one constant value
to another constant value
A
at for 0 t A / a
u (t )
A for t A/ a
t
0
Pulse Input
• The input has a constant (finite) magnitude over a finite time interval (the “pulse
duration”), and is zero before and after the pulse is applied
Pulse input
u(t)
0 for t 0 A
u (t ) A for 0 t t1
0 for t t1
t
0 t1
Impulse Input
• The input has a magnitude that lasts for a very short duration
• We can think of the impulse input as a pulse function where the pulse duration
goes to zero in the limit, i.e., t 0
• Suppose a constant force F = 150 N is applied for a very short duration t = 0.1
sec (a pulse input)
– Therefore, the impulse input has a “strength” of 15 N-s, which is the area of
the original pulse function
– Note that the units of an impulse input contain units of time; for a force input,
an impulse has units of N-s.
Impulse Input (2)
f(t), N
f (t ) 15 (t ) N 15
t
0
Sinusoidal Input
• A sinusoidal input function is a repeating, periodic input that can be represented
by sine and/or cosine functions
Harmonic input fuction (frequency is 0.5 Hz)
3
Sinusoidal input
2
u (t ) A sin t B cos t
1
Input
0
A and B are amplitudes and is the
frequency in rad/s -1
-2
Frequency is sometimes expressed
in cycles/sec or hertz (Hz) -3
0 1 2 3 4 5
Time, sec
= 2 rad/s = 1 Hz
Chapter 5: Summary
• We have introduced and discussed the standard forms for representing the
mathematical models of physical systems:
– State-variable equations
– The state-space representation (SSR)
– Input-output (I/O) equations
– Transfer functions
– Block diagrams
• Of course, the governing system dynamics (i.e., the ODEs) are not altered if we choose
to represent the system in one or more different standard forms
• We also presented the basic steps for the linearization process which allows us to
develop a linear model that represents the system dynamics in the vicinity of a nominal
operating point