MODERN CONTROL SYSTEMS
LECTURE (7)
STATE—SPACE REPRESENTATION
OF LTI SYSTEMS
Assist. Prof. Amr E. Mohamed
3s Hl Gui Ld eee reAgenda
Q State Variables of a Dynamical System
Q State Variable Equation
Q Why State space approach
Q Derive Transfer Function from State Space Equation
Q Time Response and State Transition MatrixIntroduction
Q The classical control theory and methods (such as root locus) that we
have been using in class to date are based on a simple input-output
description of the plant, usually expressed as a transfer function. These
methods do not use any knowledge of the interior structure of the
plant, and limit us to single-input single-output (SISO) systems, and as
we have seen allows only limited control of the closed-loop behavior
when feedback control is used.
Q Modern control theory solves many of the limitations by using a much
“richer” description of the plant dynamics. The so-called state-space
description provide the dynamics as a set of coupled first-order
differential equations in a set of internal variables known as state
variables, together with a set of algebraic equations that combine the
state variables into physical output variables.Definition of System State
u(t) nile)
y(t) 2 . Py(t)
44,(t) — y,(0)
O State: The state of a dynamic system is the smallest set of variables
(Sp Fp 0... :Xn) (called State Variables or State Vector) such that knowledge of
these variables at t= t0, together with knowledge of the input for ¢ = tO,
completely determines the behavior of the system for any time t to tO.
a The number of state variables to completely define the dynamics of the system is
equal to the number of integrators involved in the system (System Order).
a Assume that a multiple-input, multiple-output system involves n integrators (State
Variables).
a Assume also that there are r inputs u,(t), up(t),....... u,(t) and p outputs y,(t),
y2(t), .....-. y(t).General State Representation
a State equation: x(t)=Ax(t)+Bu(t)
eames ett}
Q Output equation: y(t)=C x(t)+ Du(t)
= x = State Vector
= a = Derivative of the State Vector
* u=/nput Vector
* y = Output Vector
= A= State Matrix = System Matrix
* B= Input Matrix
= C = Output Matrix
= D = Feedback matrixState-Space Equations (Model)
a State equation: x(t)=Ax(t)+Bu(t)
ey alelialom ze lel tLe) iry
a Output equation: y(t)=C x(t)+ Du(t)
ia) «th al —
yi) x,(0)
2t
ioe yin) = x(0) =
x1)
x)=| °, ui) =
x7) ]4 u, (0), yO], *,(0)|
State Vector a la le Output Vector
] ylBlock Diagram Representation Of State Space ModelInput/Output Models vs State-Space Models
O State ce Models:
= consider the internal behavior of a system
= can easily incorporate complicated output variables
= have significant computation advantage for computer simulation
=can represent multi-input multi-output (MIMO) systems and nonlinear
systems
Q Input/Output Models:
= are conceptually simple
= are easily converted to frequency domain transfer functions that are more
intuitive to practicing engineers
= are difficult to solve in the time domain (solution: Laplace transformation)Some definitions
a System variable: any variable that responds to an input or initial
conditions in a system
Q State variables: the smallest set of linearly independent system
variables such that the values of the members of the set at time tO
along with known forcing functions completely determine the value of
all system variables for all t = t0
Q State vector: a vector whose elements are the state variables
Q State space: the n-dimensional space whose axes are the state variables
State equations: a set of first-order differential equations with b
variables, where the n variables to be solved are the state variables
Q Output equation: the algebraic equation that expresses the output
variables of a system as linear combination of the state variables and
the inputs.
oGeneral State Representation
1,
Select a particular subset of all possible system variables, and call
state variables.
For nth-order, write n simultaneous, first-order differential equations
in terms of the state variables (state equations).
If we know the initial condition of all of the state variables at t) as
well as the system input for t >t), we can solve the equationsState-Space Representation of nth-Order Systems of Linear
Differential Equations
Q Consider the following nth-order system:
(n) (n=1) q
Yt+a, Y + wtaQniVt+any=u
Q where y is the system output and u is the input of the System.
Q The system is nth-order, then it has n-integrators (State Variables)
Q Let us define n-State variables
11State-Space Representation of nth-Order Systems of Linear
Differential Equations (Cont.)
O Then the last Equation can be written as
xy *
12State-Space Representation of nth-Order Systems of Linear
Differential Equations (Cont.)
QO Then, the stat-space state equation is
% = Ax + Bu
a whereState-Space Representation of nth-Order Systems of Linear
Differential Equations (Cont.)
Q Since, the output equation is
a Then, the stat-space output Equation is
C=[1 0 = 0]
Q where
14Example #1
K a-y
Q From the diagram, the system Equation is 49
My + By + Ky = f(t)
Q This system is of second order. This means that the system involves two
integrators (State Variables).
Q Let us define the state variables
ay:
x2 =y
Q Then, we obtain
%1 =Y=X2
1 1 —B K 1
X2 == yy BY + Ky) — Ff = ape — 9g — pq lO
15Example #1 (Cont.)
QO Then, the State “ce bose is
Q The output Bite is
=f1 0] i
= fee
Q The System Block diagram is
“K -6 ee
1
16Example #2
Ri(e)+ Lo tf indi =e,(0)
x()=it)
"xs = fide
y(t) =i(t)
e(t) ee
(=i)
&, (t) =e,(t)
y(t) = it)
¥
-[E ele | -D4 PE a
yi) = [1 all xo = [to] [:|
17Example #3 a5
8, 8, Bs
M,¥, + By, +By (9, — 92) + K(y, — yn) = fO
M,y, +B,y, + B,(¥2— ¥,)+ KO, — y,) =0
m=)
let a " -
. = a => 4,] = x, | + ff
A=) & %
X, = yo &, X,
18Example #4 -—_ a
s* +95? + 269+ 24
a Find the state space model for a system that described by the following
differential equation
€+96+ 266+ 24c = 24r
Q Solution:
a The system is 34 order, then it has three states as follows
x, =c 4, =x,
differentiation
=e —> =X,
x, =é 4, =-24y, — 26x, —9x, +24r
a The output equation is
yExample #4
Fs o 1 Ojfs,) fo
x,| |-24 -26 -9]]x,} [24
pall 0 alState-Space Representations of
Transfer Function SystemsState-Space Representation in Canonical Forms
QO We here consider a system defined by
+ dn—1 + any = dou!” + bulO—) + «++ + bath + On, (1)
a where u is the control input and y is the output. We can write this
equation as
‘(3) bas" + bys! + +++ + bn-18 + bn
8” + aya! +.-- + anya + Oy
a we shall present state-space representation of the system defined by
(1) and (2) in controllable canonical form, observable canonical form,
and diagonal canonical form.
22Controllable Canonical Form
Q We consider the following state-space representation, being called a
controllable canonical form, as
0
0
tn-1
—Q_ —Qn-) —Gn-2 .+- —@)
= [(bn = anbo) (bu-1 = an—1bo) «.. (br ~ arbo))
Q Note that the controllable canonical form is important in discussing the
pole-placement approach to the control system design.
23Observable Canonical Form
Q We consider the following state-space representation, being called an
* bn — Ando
°g bn—1 — @n—1bo
3) + |bp—2 — Gn—abo| u
, by — aybe
observable canonical form, asDiagonal Canonical Form
a Diagonal Canonical Form greatly simplifies the task of computing the
analytical solution to the response to initial conditions.
Q We here consider the transfer function system given by (2). We have the
case where the dominator polynomial involves only distinct roots. For
the distinct root case, we can write (2) in the form of
Y(s) _ bos" + bys" 1 +--+ + bys + bp
i(s)
1
s+pPiDiagonal Canonical Form (Cont.)
Q The diagonal canonical form of the state-space representation of this
system is given by
Pn-1
—Pn
ry
2
+ n-1 tn]Example #5
a Obtain the state-space representation of the transfer function system
(16) in the controllable canonical form.
Q Solution: From the transfer function (16), we obtain the following
Parameters: bO = 1, b1 = 3, b2 = 3, al = 2, and a2 = 1. The resulting
state-space model in controllable canonical form is obtained as
iExample #6
Q Find the state-space representation of the following transfer function
system (13) in the diagonal canonical form.
Q Hence, we get A = -1 and B = 3. We now have two distinct poles. For
this, we can write the transfer function (13) in the following form:State Space model to Transfer
FunctionState Space model to Transfer Function
Q The state space model
k=Ax+ Bu
y=Cr+Du
Q by Laplace transform
5X (s)= AX (s)+BU(s) mp X(s)=(s1- A)'BU(s)
Y(s)=CX(s)+DU(s) mm Y(s)= le(sr —A)'B+ p(s)
Q Then, the transfer function isExample (2)
Q Find the transfer function from the following transfer function
0 1 0 10
g=]0 0 1 [xt] Olu y=[l 0 o]x
=] =2 <3 0
Q Solution:
s-1 06
(si-A)=|0 s -1
1 2 #43
(8? +3842) s43 1
-1 s(s#3) os
(s1—ay'=2GI=A) _ -s -(2s41) s*
~ det(sI—A)
843842641Example (2)
T(s)=C(st=A)'B+D
(8743842) 543 1]fi0
fl 0 0] = s(s+3) 51/0
ats -(2s41) 1] 0
T(s)=
‘8 843842541
10(s? +3542
T{s) = ee eee
Ss 43s°4+2s41System Poles from State Space model
a poles and check the stability of the following state space Example find the
System model
_ {fs 2 >
x= et u y= fl Of
—1 <3, |0 pot Os
& Solution:
i (si A)= s -2
a Since = “lt wad
5s =-2
a To find the poles > |s1 — Al = 1 png OStD+2=0
a Then the poles are {-1, -2 }, the system is stableState-Space Modeling with
MATLABState-Space Modeling with MATLAB
a MATLAB uses the controllable canonical form by default when converting from
a state space model to a transfer function. Referring to the first example
problem, we use MATLAB to create a transfer function model and then convert
it to find the state space model matrices:
>>num = [1 3]; % numerator polynomial
>>den = [1 3 2); % denominator polynomial
>> [A,B,C,D] = tf2ss(num,den) % Matrices of SS modelState-Space Modeling with MATLAB
a Note that this does not match the result we obtained in the first example. See
below for further explanation. No we create an LTI state space model of the
system using the matrices found above:
>> ctrb_sys = ss(A,B,C,D)
x1
x2
Continuous-time model.State-Space Modeling with MATLAB
Q we can generate the observable and controllable models as follows:
>>A = [0 1; -2 -3]; % our controllable form
>>B = [0;1];
»>c = (3 1);
>>D = 0;
>>csys = 68(A,B,C,D); % create the controllable canonical model
>>osys = ss(A’,C’,B’,D); % create the observable canonical model
37