Professional Documents
Culture Documents
State-space control theory is based on time domain analysis, a history of the control theory
evolution:
~1950s: classical control methods in frequency domain, including Bode, root locus,
Nyquist, lead-lag compensators.
Late 1950s ~ early 1960s: model control method in time domain, including
Kalman filter, pole placement, quadratic regulator, state estimator (observer).
1970s: extension to multi-input/multi-output systems
1980s: blending of transfer-function and state-space methods for robust control
theory.
State-space techniques reduce a higher-order system into a set of first-order state-space
equations, such that the controller can be formulated based on linear algebra, including matrix
representation and eigenvalue and eigenvector analyses.
y (t ) a3 ( y, y )
y(t ) a2 (
y, y) y (t ) a1 ( y, y ) y (t ) u (t )
(B.1)
y (t ) a2 (t )
y(t ) a1 (t ) y(t ) u(t )
(B.2)
y (t ) a2
y(t ) a1 y (t ) b1u (t ) u (t )
(B.3)
Superposition principle
Let u(t) = u1(t) + u2(t), y1(t) and y2(t) be responses due to u1(t) and u2(t), respectively,
then
y (t ) y1 (t ) y2 (t )
(B.4)
s 3Y ( s ) s 2 y (0) sy (0)
y (0) a2 s 2Y ( s ) sy (0) y (0)
a1 sY ( s ) y (0) b1 sU ( s ) u (0) U ( s )
(B.5)
(B.6)
s 3 a2 s 2 a1s Y ( s ) b1s 1U ( s )
Y (s)
b s 1
G(s)
3 1 2
U ( s ) s a2 s a1s
(B.7)
yields
y ( n ) (t ) a1 y ( n 1) (t ) a2 y ( n 2) (t ) an y (t )
b0u ( m ) (t ) b1u ( m-1) (t ) b2u ( m-2) (t ) bmu (t )
(B.8)
Then the general form of the Laplace transform of the ODE yields
s nY ( s ) s n 1 y (0) s n 2 y (0) sy ( n 2) (0) y ( n 1) (0)
a1 s n 1Y ( s ) s n 2 y (0) sy ( n 3) (0) y ( n 2) (0)
a2 s n 2Y ( s ) s n 3 y (0) sy ( n 4) (0) y ( n 5) (0)
a3 a4 an 1 sY ( s ) y (0) an Y ( s )
b0 s mU ( s ) s m 1u (0) su ( m 2) (0) u ( m 1) (0)
(B.9)
(B.10)
Assuming zero initial conditions, Equations (B.9) and (B.10) are reduced to
s n a1s n 1 a2 s n 2 an 1s an Y ( s ) 0
b0 s m b1s m 1 bm 1s bm U ( s ) 0
Therefore
3
(B.11)
b0 s m b1s m 1 bm 1s bm
Y ( s)
G ( s)
U ( s ) s n a1s n 1 a2 s n 2 an 1s an
(B.12)
The motion of any infinite dynamic system can be expressed as a set of first-order ODES.
This is often referred to as the state-variable representation. This section will introduce how to
arrange ODE system into state space representation. Typically the state-space model in
general form is
x (t ) Fx(t ) Gu (t )
(B.13)
y (t ) Hx(t ) Ju (t )
(B.14)
F is an n n plant/system matrix
G is an n 1 control input matrix
H is a n 1 output matrix
J is the direct transmission term
y is the output
=================================================================
Example B1 (Textbook Example 7.1, P435)
Determine the state-space matrices for the satellite attitude control model. The equation of
motion of the satellite is written as
Fc d M D I
(B.15)
where Fc is the control input coming from the reaction jets/gas jet, and the angle describes
the satellite orientation. There may be small disturbance moments MD on the satellite.
Define the attitude and the angular velocity of the satellite as the state variables, so that
x = [ ]T. Therefore, we find the first-order ODE system as follows
x1
x2
d
Fc
I
(B.16)
x
x 1
x2
Fc Fx Gu
(B.17)
The output of the system is the satellite attitude, y = . The matrix form of the output equation
yields
Hx Ju
(B.18)
(B.19)
which includes the state equation and output equation. The transfer-function model of the
system can be obtained by taking the Laplace transform of Equation (B.19)
sIX ( s ) FX ( s ) Gu ( s )
(B.20)
Y (s)
assuming zero initial conditions. Note that X(s) must pre-multiply by an identity matrix.
=================================================================
5
=================================================================
Example B2 (Textbook P443)
Consider a single-input/single-output system which has a time derivative of u:
y (t ) 7 y (t ) 12 y (t ) u (t ) 2u (t )
(B.21)
In the presence of derivative in the control signal, integrate Equation (B.21) once gives
y (t ) 7 y (t ) u (t ) 12 y (t ) 2u (t )
(B.22)
x1 (t ) y (t )
x2 (t ) y (t ) 7 y (t ) u (t ) x1 (t ) 7 x1 (t ) u (t )
(B.23)
(B.24)
x1 (t ) y (t ) x2 (t ) 7 x1 (t ) u (t )
x2 (t )
x1 (t ) 7 x1 (t ) u (t )
u (t ) 2u (t ) 7 y (t ) 12 y (t ) 7 y1 (t ) u (t )
(B.25)
12 x1 (t ) 2u (t )
Arrange Equation (B.25) into matrix form
x (t ) 7 1 x1 (t ) 1
x 1
u (t ) Fx Gu
x2 (t ) 12 0 x2 (t ) 2
(B.26)
The output of the system is y(t) = x1(t) = x(t), which is expressed as matrix form below
x (t )
y (t ) 1 0 1 Hx Ju
x2 (t )
(B.27)
Now we look at the relation between state-space and transfer-function models. Considering
Equation (B.21), assuming zero initial conditions and taking Laplace transform yield
7 s 12 Y ( s ) s 2 U ( s )
(B.28)
Y (s)
s2
s s2
P( s)
2
7 12
U ( s ) s 7 s 12
1 2
s s
6
(B.29)
Alternatively, we can find the transform model from the state-space equations of Equations
(B.26) and (B.27) as follows
sIX( s ) FX( s ) GU ( s )
(B.30)
Y (s)
=================================================================
From Example B1 and Example B2, the state-space model in general form is
x (t ) Fx(t ) Gu(t )
(B.31)
y (t ) Hx(t ) Ju (t )
(B.32)
Assuming zero initial condition and applying Laplace transform to the above equations
give
sX ( s ) X (0) FX ( s ) GU ( s )
(B.33)
Y ( s ) HX( s ) JU ( s )
(B.34)
sI F X ( s ) G U ( s )
or
X ( s ) sI F GU ( s )
1
(B.35)
Y ( s) HX( s) JU ( s) H sI F GU ( s) JU ( s)
1
H sI F G J U ( s) P(s)U ( s)
(B.36)
Thus, there exist a direct transform from the state space to the transfer function.
Conclusion: transfer function, ODE and state space models are equivalent, i.e.
=================================================================
Example B3 (Textbook Example 7.2, P436) Cruise control
(1) Rewrite the equation of motion in state-variable form, where the output is the car
position.
(2) Use MATLAB to find the response of the velocity of the car for the case in which the
input jumps from being u = 0 at time t = 0 to a constant u = 500N. The car mass m is
1000 kg and b = 50 Ns/m.
u bx mx
(B.37)
where u is the force imparted by the engine, b is the friction coefficient (a proportionality
constant, friction is proportional to the cars speed), and x is the car position. Define x and v as
the state variables, where v is the car velocity, then the state is x = [x v]T. The second-order
EOM is arranged into first order state equations
x v
v
1
b
v u
m
m
(B.38)
x
x 1
x2
x
v
u Fx Gu
(B.39)
The output of the system the car position y = x1 = x, which is expressed as matrix form
y
x
Hx Ju
v
(B.40)
Using the state-space model of Equations (B.39) and (B.40), the velocity of the car can be
computed using the Matlab command. Assuming that the input signal is a step function,
jumping from being u = 0 at time t = 0 to a constant u = 500N. The car mass m is 1000 kg and
b = 50 Ns/m.
MATLAB computation
=================================================================
=================================================================
Example B4 (Textbook Example 7.4, P438) Loudspeaker with circuit in state-variable form
The permanent magnet establishes a radial field in the cylindrical gap between the poles of the
magnet. The force on the conductor wound on the bobbin causes the voice coil to move,
producing sound. The effects of the air can be modeled as if the cone had equivalent mass M
and viscous friction coefficient b. Assume that the magnet establishes a uniform field B of
0.5 tesla and the bobbin has 20 turns at a 2 cm diameter. In addition, the loudspeaker is driven
by the circuit, with input voltage va and the output cone displacement x. Assume the effective
circuit resistance is R and the inductance is L.
9
Mx bx F
di
L Ri va vc
dt
(B.41)
where vc is the voltage across the coil. This shows a 2 DOF ODE system, the first DOF has an
order of two, the second DOF has an order of one. The associated parameters are given by
2
m 1.26 m
100
F 0.5 1.26 i 0.63i N
vc Blx 0.5 1.26 x V
l 20
(B.42)
x1 x
x2
x
x3
(B.43)
d
i
dt
Hx Ju
Fx Gu
(B.44)
=================================================================
10
=================================================================
Example B5 (Textbook Example 7.6, P439) Disk read/write head
Here, MD is the disturbance torque, the damping is b, Mc is the applied torque. The EOM of
the two coupled rotor systems are given by
(B.45)
x2
x3
x4
T
11
(B.46)
x1
x
x 2
x3
x4
Fx Gu
(B.47)
Hx Ju
=================================================================
=================================================================
Example B6 Simple nonlinear pendulum system (Textbook P50)
n 2
Let the state variables be x = [x1 x2]T =
Tc
ml 2
(B.50)
x1
(B.51)
x2
The state-space model of the system is
12
x
x 1
x2
x1
x
2
u Fx Gu
(B.52)
The output of the system the car position y = x1 = x, which is expressed in matrix form
y
x1 Hx Ju
2
(B.53)
=================================================================
where
u1 = T: pulling force, 1st input;
u2 = P: rolling pressure, 2nd input;
Let the dynamics between u1 and y1 be identified by the transfer function P11(s), written as
P11 ( s )
Y1 ( s )
U1 ( s )
or
Y1 ( s ) P11 ( s )U1 ( s )
(B.54)
P22 ( s )
Y2 ( s )
U 2 (s)
or
Y2 ( s ) P22 ( s )U 2 ( s )
(B.55)
Similarly
However, when the pulling force u1 = T is increased to speed up the process, it inevitably
leads to a reduction in the thickness y2 = t as a side effect. That is, the 2nd output is also
affected by the 1st input. This is called the coupling effect (). Similarly, when the
13
rolling pressure u2 = P is increased to reduce the thickness y2 = t, it also increases the friction
force between the rollers and the plate and therefore slows down the process (i.e. decreases
the production speed y1 = v). That is, the 1st output is also affected by the 2nd input. Let the
coupling effects be identified as
P12 ( s )
Y1 ( s )
U 2 (s)
or
Y1 ( s ) P12 ( s )U 2 ( s )
(B.56)
P21 ( s )
Y2 ( s )
U1 ( s )
or
Y2 ( s ) P21 ( s )U1 ( s )
(B.57)
Then the complete dynamical relationships between the inputs and outputs described by
Equations (B.54)-(B.57) can be arranged into a matrix form as follows
Y1 ( s)
Y ( s)
2
U1 ( s)
U1 ( s)
P
(
s
)
U ( s)
U ( s )
2
2
(B.58)
where P(s) is called the transfer function matrix of the multivariable process. The same
process can be modelled via state-space equations
x (t ) n1 Fnn x(t ) n1 G n2u (t ) 21
y (t ) 21 H 2n x(t ) n1 J 22u (t ) 21
(B.59)
and the transfer function matrix P(s) can again be derived from the state space form by
P ( s ) 22 H 2n sI nn Fnn G n2 J 22
1
(B.60)
In general, when there are m outputs and l inputs with n states, dimensions of the state
space matrices will be
Fnn G nl
H
mn J ml
(B.61)
14
(B.62)
The need for state space description arises from the need to simulate the trajectory of a
space vehicle and to check a maneuvering strategy in real time. When the simulation is
done using state space model, computer can easily solves matrix equations. Besides,
optimal control can be solved easier in state space form.
This section analyses the dynamic behavior of a process described by a state space form. First
we will show that, for a given process/plant P(s), the corresponding state space model is not
unique. We will introduce three types of preferable state space model (canonical forms)
before discussing dynamic response of a state space model. These are
(a) controllable canonical form: makes feedback gains of the state easy to design.
(b) observable canonical form: make all the feedback is from the output to the
state-variables.
(c) modal canonical form: the system poles appear in the state-space matrix and appear
in the block diagram.
State-space model in canonical form construct the block diagram that corresponds to the
transfer function (and the differential equations) using only isolated integrators as the
dynamic elements.
=================================================================
Example B7 (Textbook Example 7.7, P440)
This example introduces using only integrators as dynamic elements to derive the block
diagram and state-space model. Consider a the SISO ODE system
y 6
y 11 y 6 y 6u
(B.63)
y 6
y 11 y 6 y 6u
(B.64)
And the lower order terms can be obtained by integration. Define the state variable as
T
x = [x1 x2 x3]T =
, then the state equation is written as
x1 6 x1 11x2 6 x3 6u
x2 x1
(B.65)
x3 x2
y x1
The matrix form yields
x1
x
2
x2
y
x1
x
2
x3
x1
x2 0 u (t )
x3
(B.66)
=================================================================
16
The controllable canonical form has the advantages/characteristics: all state variables are
connected by the feedback to the input u. In other words, the control block diagram shows
total control over the states.
=================================================================
Example B8 (Textbook P443)
y (t ) 7 y (t ) 12 y (t ) u (t ) 2u (t )
(B.67)
P( s)
7 12
U ( s ) s 7 s 12
1 2
s s
1
2
s4 s3
17
(B.68)
x1 7 x1 12 x2 u
x2 x1
(B.69)
y x1 2 x2
Equation (B.69) is arranged into state-space form
x1 7 12 x1 1
u
x 1
0 x2 0
2
x
y 1 2 1 0 u
x2
(B.70)
This is the state-space equation in control canonical form. The specific state space form
associated with Equations (B.70) and the Figure links all feedback loops to the input point,
and is called controllable canonical form.
The state-space equations in control canonical form is different from Equation (B.26) in
Example B2 as follows
x1 7 1 x1 1
x 12 0 x 2 u
2
2
x
y 1 0 1
x2
(B.71)
Therefore, indeed, given a transfer function G(s), its state space model is not unique.
Compare Equation (B.71) with (B.70), sometimes the control canonical form is preferred
because we can see that all states are fed back to the input node.
=================================================================
All the feedback loops are linked to the output point, or all the feedback is from the output to
the state variables. As shown below, this is called observable canonical form.
18
=================================================================
Example B9
Consider the system of Equation (B.68) in Example B8 again, its Laplace transform is
1 2
Y ( s)
s2
s s2
P( s)
2
7 12
U ( s ) s 7 s 12
1 2
s s
(B.72)
x1 0 x1 12 x2 2u
x2 x1 7 x2 u
(B.73)
y 0 x1 x2
and the state-space matrix form yields
x1 7 1 x1 1
x 12 0 x 2 u
2
2
x
y 1 0 1 0 u
x2
(B.74)
=================================================================
19
All feedback loops being separated in parallel connection is called modal canonical form.
The system poles/eigenvalues appear as the elements along the diagonal of the system matrix,
and the numerator terms in the partial-fraction expansion, appear in the output matrix. The
name for this form derives from the fact that the poles of the system transfer function are
sometimes called the normal modes of the system.
=================================================================
Example B10
Consider the system of Equation (B.68) again, all feedback loops are separated using the
partial-fraction expansion
1 2
2
s2
s
s
P( s) 2
7 12
s 7 s 12
1 2
s s
3
1
s
1 2
2
s
s
3 4
1 1
s s
(B.75)
4
1
s
x1 4 x1 0 x2 u
x2 0 x1 3x2 u
(B.76)
y 2 x1 x2
That is, there is no dynamic coupling effect between two states. Thus, the matrix form yields
x1 4 0 x1 1
x 0 3 x 1 u (t )
2
2
x
y 2 1 1 0 u (t )
x2
20
(B.77)
=================================================================
All feedback loops linked to input node, and all forward path ends at output node. Thus,
consider the general form of an ODE system
b1s n 1 b2 s n 2 bn
Y ( s)
P( s)
U ( s) s n a1s n 1 a2 s n 2 an
(B.78)
To find the state space equation, first, transform the transfer function of Equation (B.78)
and define the highest derivative of Xn(s) as follows
1
X n ( s) n
U ( s)
n 1
n2
s a1s a2 s an
Y ( s ) b1s
n 1
b2 s
n2
bn X n ( s )
(B.79)
sX1
X1
n 1
X2
X n1
n2
Y ( s ) b1 s X n ( s ) b2 s X n ( s ) bn X n ( s )
X1
X2
21
(B.80)
x1 a1 x1 a2 x2 am xm an 1 xn 1 an xn u
x2 x1
x3 x2
(B.81)
xn 1 xn 2
xn xn 1
y b1 x1 b2 x2 b3 x3 bn xn Ju
xn 1 0
xn 1
xn 0
1
0
0 xn 0
y b1 b2 bn x
22
(B.82)
All feedback loops linked to the output node, and all forward path starts from the input
node. Consider the same general transfer function again
b1s n 1 b2 s n 2 bn
Y ( s)
P( s)
U ( s) s n a1s n 1 a2 s n 2 an
(B.83)
xn an x1 bnu
y x1 Ju
The state-space model in matrix form gives
23
(B.84)
x1 a1 1 0 0 0 x1 b1
x a
2 2 0 1 0 0 x2 b2
x3 a3 0 0 0 0 x3 b3
u
xn 1 an 1 0 0 0 1 xn 1 bn 1
xn an 0 0 0 0 xn
bn
y 1 0 0 0 0 x
(B.85)
All feedback loops are in parallel connection. Let the transfer function be partitioned
into the following
P( s)
b s n 1 b s n 2 bn
Y (s)
n 1 n 1 2 n 2
U ( s) s a1s a2 s an
J 1 2 n
s 1 s 2
s n
Define
24
(B.86)
X 1 (s)
1
U ( s)
s 1
X 2 (s)
1
U (s)
s 2
(B.87)
X n (s)
1
U (s)
s n
x1 1 x1 u
x2 2 x2 u
(B.88)
xn n xn u
y 1 x1 2 x2 n xn Ju
The state-space mode in matrix form gives
0 0 0 x1 1
x1 1
x 0 0 0 x 1
2
2
2
0 0 0 xn 1 1
xn 1 0
xn 0
0 0 n xn 1
y 1 2 n x
25
(B.89)
Expressing a system in modal canonical form can be complicated by two factors: (1) the
elements of the matrices will be complex when the poles of the system are complex, and (2)
the system matrix cannot be diagonal when the partial-fraction expansion has repeated poles.
To solve the first problem, we express the complex poles of the partial-fraction expansion as
conjugate pairs in second-order terms so that all the elements remain real. The corresponding
plant matrix will then have 2 2 blocks along the main diagonal representing the local
coupling between the variables of the complex-pole.
To handle the second difficulty, we also couple the corresponding state-variables, so that the
poles appear along the diagonal with off-diagonal terms indicating the coupling.
From the modal canonical form, it is to be noted that
(i) When all modes are distinct, first order dynamics, the system matrix F is diagonal.
(ii) When some of the dynamic modes are 2nd order or higher, the system matrix F is
block diagonal.
(iii) In addition, when some of the dynamics have repeated poles, the system matrix F is
again block diagonal.
26
=================================================================
Example B11 (Textbook Example 7.9, P445)
Find the state equations of the vehicle suspension system in modal canonical form. Consider
the transfer function
G ( s)
2s 4
1
1
2 2
2
s ( s 2s 4) s s 2s 4
2
(B.90)
which has a set of repeated poles and a set of 2nd order poles (complex poles). The transfer
function model is separated as follows
1
U ( s)
s2
1
X 3 ( s) 2
U (s)
s 2s 4
X 1 ( s)
(B.91)
x1 x2
x2 u
x3 x4
(B.92)
x4 4 x3 2 x4 u
y x1 x3
which can be arranged into matrix below
x1 0
x 0
2
x3 0
x4 0
1 0 0 x1 0
0 0 0 x2 1
u
0 0 1 x3 0
0 4 2 x4 1
y 1 0 1 0 x
27
(B.93)
The block diagram can be decomposed into two 2nd order systems in parallel connection,
instead of four 1st order system as shown below.
=================================================================
28