Control Theory - Digital Control System
Control Theory - Digital Control System
}
dx1
=a 11 x 1 +a 12 x 2+ … …+a1 n x n+ b11 u1 +b12 u2+ … …+b 1 m um
dt
dx 2
=a21 x 1 +a 22 x 2+ … …+a 2n x n+ b21 u 1+ b22 u2 +… …+ b2 m um
dt
. . . .. . . (1)
. . . .. . .
. . . .. . .
dx n
=an 1 x 1 +a n2 x 2+ … …+a nn x n+ bn 1 u1+ bn 2 u 2+ … …+b nm um
dt
The equations set (1) may be combined in matrix format. This results in the state
vector differential of equation (2).
ẋ= Ax+ Bu (2)
Equation (2) is generally called the state equations, where lower-case boldface
represent vectors and upper-case boldface represent matrices. Therefore,
x is the n dimensional state vector and is as given in equation (3)
[]
x1
x2
x= . (3)
.
.
xn
u is the m dimensional input vectors and is as given in equation (4)
[]
u1
u2
u= . (4)
.
.
um
A is the n × n state matrix defined by equation (5)
[ ]
a11 a 12 … a 1n
a21 a22 … a 2 n
A= . (5)
.
.
a n1 an 2 … ann
B is the n × m input matrix given by equation (6)
[ ]
b11 … b 1 m
b21 …b 2 m
B= . (6)
.
.
bn 1 … bnm
In general, the outputs ( y 1 , y 2 , … … , y n) of a linear system can be related to the state
variables and input variable by equation (7).
y=Cx + Du (7)
where C and D are the output and the direct transmission matrix respectively.
Example:
For the RCL circuit of Figure 1, write down the state equation when:
(i) the state variable are v 1(t) and v̇ 2(t)
(ii) the state variable are v 2( t) and i(t)
Figure 1: RLC circuit
solution:
(i)
x 1=v2 (t) (8)
x 2= v̇ 2 ( t )= x˙1 (9)
but
2
d v 2 (t) d v 2 (t )
LC 2
+ RC + v 2 ( t )=v 1( t)
dt dt
(10)
From equations (8), (9) and (10) the set of first-order differential equations are
x˙1=x 2 (11)
1 RC 1
x˙2= x 1− x2 + u
LC LC LC
(12)
and the state equations are
[][ ][ ] [ ]
0 1 0
ẋ1 x
= −1 −R 1 + 1 u
ẋ2 x2
LC LC LC
(13)
(ii) From Figure 1,
di
L =−v 2 ( t )−Ri ( t )+ v 1 (t)
dt
(14)
d v2 ( t )
L =i ( t )
dt
(15)
Equations (14) and (15) are first-order differential equations and can be written as
1
x˙1= x
C 2
(16)
−1 R 1
x˙2= x 1− x 2+ u
L L L
(17)
From equations (16) and (17), the state equation is
[][ ][ ] [ ]
0 1 0
ẋ1 x
= −1 −R 1 + 1 u
ẋ2 x2
L L L
(18)
State equation from transfer function:
Consider equation (19)
n n−1 n−1
d y d y dy d u du
n
+a n−1 n−1 +…+ a1 + a0 y=b n−1 n−1 +…+ b1 +b 0 u
dt dt dt dt dt
(19)
Equation (19) can be represented by the block diagram of Figure 2.
o
o Figure 2: Generalised transfer function
Define a set of state variables such that
ẋ 1=x 2
ẋ 2=x3
..
..
..
.
x˙n=−a0 x 1−a1 x 2−…−a n−1 x n +u
(20)
and output equation is
y=b0 x1 +b 1 x 2 +…+b n−1 x n (21)
then the state equation is
[ ] [ ][ ] [ ]
x˙1 010…0 x1 0
x˙2 001…0 x 2 0
. . . .
. = . . + . u (22)
. . . .
x n−1
˙ 0 0 0 … 1 x n−1 0
x˙n −a0 −a 1 −a 2 … an−1 xn 1
Equation (22) is called the controllable canonical form and the output equation is
[]
x1
x2
y= [ b0 b1 b2 …+b n−1 ] .
.
.
xn
(23)
Assignment:
Find state and output equation for the transfer function given in equation (24)
C( s) 5
= 3 2
R( s) s +4 s +7 s+ 4
(24)
Relationship Between Transfer Functions and State-Space Equations:
The transfer function of a single-input, single-output system can be derived from the
state-space equations as follows:
Let us consider the system whose transfer function is given by
Y (s)
G ( s )=
U (s)
(25)
In state space from equations (2) and (7) the system can be represented by
ẋ= Ax+ B u
(26)
y=Cx + Du
(27)
The Laplace transform of equations (26) and (27) are
sX ( s ) + x (0)= AX (s)+ B U ( s)
(28)
Y (s)=CX (s)+ DU (s)
(29)
Assuming zero initial conditions equation (28) becomes
sX ( s )= AX (s )+ B U (s)
(30)
and
sX ( s )− AX (s )=BU (s )
X (s) ( sI− A )=B U ( s)
then
−1
X ( s ) =( sI− A ) B U (s)
(31)
By substituting equation (31) in in (29) we have
−1
Y (s)=C ( s I − A ) B U (s)+ DU (s )
(32)
From equation (32)
Y (s) −1
=G ( s )=C ( s I − A ) B + D
U ( s)
(33)
Equation (33) which is the transfer function in terms of A , B, C and D can be written
as
Y (s) Q( s)
=
U ( s) ( s I − A )
(34)
where Q(s) is a polynomial in s and ( s I −A ) is the characteristic polynomial of G ( s ).
In other words, the eigenvalues of A are identical to the poles of G ( s ).
Solution of the state vector differential equation:
From the state differential equation of equation (2)
ẋ= Ax+ Bu
(35)
in domain we have
s
sX ( s )−x (0)− AX (s)=BU (s)
(36)
X ( s ) ( sI −A )=x ( 0 ) + BU (s)
and
−1 −1
X ( s ) =( sI− A ) x ( s ) + ( sI− A ) BU (s )
(37)
Finding the inverse Laplace transform of equation (37) gives
t
x (t )=e x ( 0 )+∫ e
At A ( t−τ )
Bu(τ )dτ
0
(38)
If the initial time is t 0, then
t
x ( 0 )+∫ e
A (t −t 0) A ( t −τ )
x (t )=e Bu(τ )dτ (39)
t0
The exponential term (e A t ) in equation (38) is called the state transition matrix φ (t)
and it represent the natural response of a system. Hence
−1
φ ( s )=( sI −A )
(40)
−1 −1 At
φ ( t )=L ( sI −A ) =e
(41)
Therefore, equation (38) can be written as
t
x (t )=φ ( t ) x ( 0 )+∫ e
A ( t −τ )
Bu(τ )dτ (42)
0
In equation (42) the first term represents the response to a set of initial conditions
while the integral term represent the response to the force function.
Using state variable representation of a system, the characteristic equation is given by
|sI− A|=0
(43)
s
where is the pole vector.
Eigenvalues and Eigenvectors:
From equation (43) the polynomial |s I − A| is called the characteristic polynomial of
A
The equation |sI− A|=0 is called the characteristic equation of A .
Hence the eigenvalues of A are the roots of equation (43).
For a 2 × 2 matrix A=
2
[ ]
a b
c d
, it is easily verified that the characteristic equation is
s = (traceA ) s +detA=0
(44)
where trace A=a+ d is the sum of the diagonal elements of A .
The eigenvalues of A are the roots of the characteristic polynomial of equation (43) or
(44).
The process involved in the determination of eigenvector can be understand from the
following example
Example:
Find the eigenvalue and eigenvector if matrix A= [ 21 12]
Solution:
From either equation (43) or (44)
2
s −4 s+3=0,
or ( s−1 )( s−3 )=0
therefore,
s=1 or s=¿3
The eigenvector equation ( A−sI ) x=0 reduces to
[2−s
1 ][ ] [ ]
1 x1
2−s x 2
=
0
0
( 2−s ) x 1 + x 2=0
x 1+ ( 2−s ) x 2=0
Taking s=1, gives
x 1+ x2 =0
x 1+ x2 =0
which has solution x 1=−x 2, x 2 arbitrary.
x 2 ≠ 0·
Taking s=¿3 gives
−x 1+ x2 =0
x 1−x 2=0
which has solution x 1=x 2, x 2 arbitrary. Consequently, the eigenvectors