0% found this document useful (0 votes)
56 views29 pages

State-Variable Equations - State-Space Representation (SSR) - Input-Output (I/O) Equations - Transfer Functions (Laplace Transforms) - Block Diagrams

Uploaded by

ataberk-ozkaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views29 pages

State-Variable Equations - State-Space Representation (SSR) - Input-Output (I/O) Equations - Transfer Functions (Laplace Transforms) - Block Diagrams

Uploaded by

ataberk-ozkaya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

Part 1-4: Standard Models for

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 (Laplace transforms)
– Block diagrams

• It is important to remember that all standard model forms represent


the same governing dynamics for a system (i.e., the models do not
change the dynamics)
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.

• The standard convention is to define xi , i = 1, 2, 3, … n as the state


variables (the “dynamic variables”), and uj, j = 1, 2, … r as the
input variables (or, “control variables”)
State-Variable Equations (2)
• The state-variables equations are a collection of n first-
order ODEs, where the all right-hand sides must be
functions of the state variables or input variables:

x!1 = f1 ( x1 , x2 ,..., xn , u1 , u2 ,..., u r )


x! 2 = f 2 ( x1 , x2 ,..., xn , u1 , u2 ,..., ur )
!
x! n = f n ( x1 , x2 ,..., xn , u1 , u2 ,..., u r )

• The RHS functions fi can either be linear or nonlinear functions


– If all RHS functions are linear, then we can use “state-space
representation” (SSR), a convenient vector-matrix format (next sub-
section)
State-Variable Equations:
Example
• Derive the state-variable equations for the mass-spring-
damper mechanical system with a nonlinear spring
force f k ( z ) = k1 z + k3 z 3

m!z! + bz! + k1 z + k3 z 3 = Fa Mechanical system


(nonlinear)

(worked on board)
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:

x!1 = a11 x1 + a12 x 2 + a13 x3 + b11u1 + b12 u 2


State equations:
x! 2 = a 21 x1 + a 22 x 2 + a 23 x3 + b21u1 + b22 u 2 linear combinations
of xi and uj
x! 3 = a31 x1 + a32 x 2 + a33 x3 + b31u1 + b32 u 2
State-Space Representation (3)
• Next, we need equations for the system outputs, so we write the
outputs as linear combinations of the states and inputs

• Suppose that we have two outputs (m = 2; perhaps these variables


are measured by two sensors):

y1 = c11 x1 + c12 x 2 + c13 x3 + d11u1 + d12 u 2 Output equations:


linear combinations
y 2 = c 21 x1 + c 22 x 2 + c 23 x3 + d 21u1 + d 22 u 2 of xi and uj

• For time-invariant systems, the coefficients a, b, c, and d are


constants
State-Space Representation (4)
• Finally, note that we can write the state and output equations in a
compact vector-matrix form because the equations are linear

• 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ú
ê!ú ê!ú ê ! ú
ê ú ê ú ê ú
ë xn û ëu r û ë 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:

é a11 a12 ! a1n ù éb11 b12 ! b1r ù


êa a 22 ! a 2 n úú êb b22 ! b2 r úú
A = ê 21 B = ê 21
ê " " # " ú ê " " # " ú
ê ú ê ú
ëa n1 an2 ! a nn û ëbn1 bn 2 ! bnr û
n x n (square) matrix: n x r matrix:
“system” or “state” matrix “input” matrix

é c11 c12 ! c1n ù


é d11 d12 ! d1r ù
êc ! c 2 n úú êd
C = ê 21
c 22 d 22 ! d 2 r úú
ê " D = ê 21
" # " ú ê " " # " ú
ê ú ê ú
ëc m1 cm 2 ! c mn û ëd m1 d m2 ! d mr û
m x n matrix: m x r matrix:
“output” matrix “direct-link” matrix
State-Space Representation (6)
• Finally, we can write the state and output equations in
vector-matrix form:

x! = Ax + Bu “state equation”

y = Cx + Du “output equation”

• Both equations constitute a state-space representation


(SSR)
– Note that the inner/outer dimensions of all vectors and matrices
must match

(Mass-spring-damper example on board!)


State-Space Representation:
Example
• Obtain a complete state-space representation (SSR) of the
electromechanical DC motor
– A tachometer is used to measure the angular velocity of the
rotor ( q! ), and an ammeter is used to measure current in the
armature circuit ( I )

LI! + RI = ein (t ) - K bq!


DC motor
model
Jq!! + bq! = K m I - TL

• The electrical and mechanical ODEs are 1st-order and 2nd-


order, respectively
– Consequently, n = 3 and the system requires three state
variables
State-Space Representation:
Example (2)
• Therefore, let’s select the 3x1 state vector as

éI ù
x = êq ú
ê ú
êëq!úû
• The 2x1 input vector is
éein (t )ù
u=ê ú
T
ë L û

• And the 2x1 output vector is

éq!ù é x3 ù
y=ê ú=ê ú
ë I û ë x1 û
State-Space Representation:
Example (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

• Check and verify the dimensions of the matrix-vector


multiplication!
Input-Output (I/O) Equations
• Consider a single-input, single-output (SISO) dynamic system,
represented by the generic “block diagram” below:

• An input-output (I/O) equation is a differential equation that only


involves the input variable u, output variable y, and their derivatives

• The general form of an I/O equation (for an nth-order system) is

an y ( n ) + an -1 y ( n -1) + " + a2 !y! + a1 y! + a0 y = bmu ( m ) + " + b1u! + b0u

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 ):

m!z! + bz! + kz = Fa

Let’s define the output variable as position, y = z and input variable


as u = Fa

Therefore, our system model equation becomes

m!y! + by! + ky = u I/O Equation

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
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) = ∫ f (t)e−st dt Laplace transform
0
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:
a3!y!! + a 2 !y! + a1 y! + a0 y = b1u! + b0 u

• Now, consider an exponential input, u(t) = U(s)est, where s = s + jw is a


complex variable and U(s) is a complex function ( recall that j is the
imaginary number, j = - 1 )

• Recall from differential equation theory, that if the input is u(t) = U(s)est
the particular solution (response due to the input) will also be an
exponential function, y(t) = Y(s)est
Developing Transfer Functions (2)

•Now substitute the exponential input and output equations into the I/O
differential equation, with the knowledge that y! = sY ( s )e st and
!y! = s 2Y ( s )e st etc…

(a s
3
3
+ a2 s 2 + a1s + a0 ) Y (s)e st = ( b1s + b0 )U(s)e st

•Finally, form the ratio Y(s)/U(s), or output/input (note est cancels) :

Definition: The transfer function of an LTI


Y ( s) b1 s + b0 system is the ratio of the Laplace transform of
= = G( s) the output, Y(s), over the Laplace transform of
U ( s ) a3 s + a 2 s + a1 s + a0
3 2
the input, U(s), with zero initial conditions.

“Transfer Function” G(s)


Transfer-Function Analysis
• The basic steps for using the transfer-function method to
analytically obtain a system’s dynamic response are
– Derive the system transfer function G(s) from the mathematical
model (I/O equation)
– Multiply the transfer function G(s) by the Laplace transform of
the given input function, U(s), to obtain the Laplace transform
of the output Y(s)
– Take the inverse Laplace transform of Y(s) to obtain the time
response of the output y(t)
Transfer Functions:
Example (Dynamic system)
• Derive the transfer function for the given I/O equation of a
series RLC circuit, where current is the output variable y and
source voltage is the input variable u

!y! + 8 y! + 10 y = 4u! I/O equation for RLC circuit

• Apply the s operator to all terms in the I/O equation (with zero
initial conditions):
s 2Y +8sY +10Y = 4sU
Y (s ) 4s
• Form the ratio of output/input: = G (s )= 2
U (s ) s +8s +10
Transfer 4s
function G (s )= 2 Y (s )= G (s )U (s )
s +8s +10
Transfer-Function Analysis
Transfer Functions: Notes

• 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

• Some comments on transfer functions:


– Transfer functions are limited to LTI systems
– TF is a mathematical model of a particular system (I/O equation)
– The TF holds for any input, and is unrelated to a particular input function
– Many different systems (such as mechanical, electrical, hydraulic, etc)
can have identical transfer functions
Block Diagrams

• Block diagrams are standard pictorial or graphical


representations of interconnected systems
– Each dynamic system or component is a block, usually a transfer
function
– Blocks are connected by signal paths, which represent the flow of
input and output signals and computations
– Signal flow into a block represents a math operation, usually
multiplication

• Simulink is based on block diagrams, which are


constructed from “drag-and-drop” menus in the Simulink
environment
Block Diagrams
Example below is the open-loop (time-based) control system of a
dishwasher.

The timer, water jets, and dishes are all modular systems depicted
by single blocks. The run time is the input signal to the timer system
and the dish cleanliness is the output signal from the dish system.
The two arrows in the middle also represent some signal but are not
labeled in this diagram.
Standard Block-Diagrams Components
• Multiplication by a constant (or gain), K

• Integration:

Simulink
notation
Standard Block-Diagrams Components (2)
• Dynamic system represented by transfer function G(s)

3s + 2
For example, if the transfer function is G ( s ) = 2
s + 4 s + 12
the corresponding I/O equation is
!!
y + 4 y! +12y = 3u! + 2u

Differentiation in the time domain is equivalent to


multiplying by “s” in the Laplace domain
Remember:
Integration in the time domain is equivalent to dividing by
“s” in the Laplace domain
Standard Block-Diagrams Components (3)

• Summing junction (adding and/or subtracting signals)

Signs must be provided at the summing junction


Block Diagram:
Example
• Draw the block diagram for the DC motor system:

LI! + RI + K bw = ein (t ) Armature circuit dynamics


Two coupled, linear
first-order ODEs
Jw! + bw = K m I - TL Rotor dynamics

where ein(t) = source voltage (an input)


Kb = back emf constant, Km = motor torque constant,
TL = load torque (an input)
L = inductance of coil, R = resistance of coil
I = current (“dynamic variable”)
w = angular velocity of motor (“dynamic variable”)
J = motor inertia, b = motor friction coefficient
Block Diagram:
Example (2)

• Resulting block diagram (verify that blocks match the model!)

You might also like