State Space Control of Discrete Systems
State Space Control of Discrete Systems
1
model is available, then we can calculate (estimate) the state vector, by using the
already measured inputs and outputs.
Eigenvalues and Eigenvectors
The elements of the system matrix depend on the components comprising the
system. Consider an n order system with column vectors x = xi (i = 1, 2…, n) and
real or complex values for the parameter λ, which satisfy the equation
Ax= λx⇒ (λ I −A) x = 0 (4)
The matrix (λ In − A) is called characteristic matrix of the system. The values of
parameter λ satisfying (λIn − A)x = 0 represent a column vector and are called
eigenvalues or characteristic values of the system, which arise from the
solution of the linear system. Eliminating the determinant of the characteristic
matrix, the characteristic polynomial of the system is revealed, such as
P (λ)=det (λI − A) = λn + an-1 λn-1+……. +a1 λ+ a0=0
(5)
The roots of P(λ), namely, its eigenvalues, denote the poles of the closed system.
The characteristic equation of the system is given by
[zI−A]=0 (6)
Solution of State Equations
1. Solution in time domain
The general solution of state vector is
k−1
k
∑ A k− j−1 Bu ( j), k≥1
x(k)=A x(0) + j=0 (7)
where Ak= Φ(k) = the transition matrix.
The exponential matrix Ak is denoted as Φ(k) and called state transition matrix,
which represents the response of the system only by the influence of the initial
conditions (i.e., the free response of the system).
The output vector is defined as
k−1
∑ Cφ(k− j−1)Bu( j)+Du(k), k≥1
y(k)=C Φ(k) x(0) + j=0
(8)
2. Solution in z-domain
The general solution of state vector is
x(k)= IZT(X(z)) = IZT[z(zI−A)-1 x(0 )+(zI−A)-1 BU(z)]
(9)
The output vector is defined as
y(k)= IZT(Y(z)) = IZT[(C(zI−A)-1 B+D)U(z)]
(10)
The state transition matrix is
Φ(k)= Ak= IZT[z(zI A)-1], k≥1
(11)
The pulse transfer function is presented as
Y(z)
H ( z)= =C ( zI− A )−1 B+D
U(z) (12)
State-Space Representation
1. Direct Form
Consider a system described by the transfer function
2
−1 −2 −m
Y ( z ) b 1 z +b2 z +.. .. . .. .. . .. ..+b m z
H ( z)= =
U(z) 1+a1 z−1 +a2 z−2 +. .. . .. ..+an z−n (13)
Solving with respect to Y(z), we have
Y ( z)=−[ a1 z−1 +a2 z−2 +. .. . .. ..+an z−n ]Y ( z )+(b1 z −1 +b2 z−2 +. . .. .. .. . .. .. .+b m z−m )U ( z)
Or
Y ( z)=(b1 U ( z)−a1 Y ( z)) z−1 +(b2 U ( z)−a2 Y (z ))z −2 +.. ... .. . (14)
The block diagram of the discrete system in direct form is given in Figure below
{x1(k+1)=−a1x1(k)+b1u1(k)¿}{x2(k+1)=−a2x2(k)+b2u2(k)¿}{.¿}{.¿} {}
The state equations and the system output are given in direct form as
(15)
[ ] [ ][ ] [ ]
x1 (k +1 ) −a 1 1 . . 0 x 1 (k ) b1
x 2 (k +1 ) −a 2 0 1 . 0 x 2 (k ) b2
. = . + . u(k )
. . .
x n (k +1 ) −a n 0 . . 1 x n (k ) bn
y (k )=[ 1 0 . . 0 ] x (k ) (16)
Canonical Form
Consider a system described by the transfer function of the expression (13). The
digital diagram is generated after a proper disintegration of the quotient of the
transfer function as shown below. The technique is the separation of the diagram
construction process in two steps which are connected through a new variable W(z).
Y ( z) Numerator Y ( z) U (z )
= = =
U ( z ) Denominator Numerator Denominator (17)
Step 1: Structure of U(z)/denominator =W(z)
U ( z) U ( z)
=W ( z )=
Denominator 1+a1 z +a 2 z−2 +.. . .. .. .+a n z−n
−1
(18)
The solution with respect to W(z) is
W ( z )=−a 1 z −1 W ( z)−a 2 z−2 W ( z)+...... ..+U ( z ) (19)
Step 2: Structure of Y(z)/ numerator =W(z)
Y ( z)=−b1 z−1 W ( z )−b2 z −2 W ( z)+.. .. . .. .+b m z−m W ( z) (20)
Block diagram.
3
The block diagram is illustrated below that reflects the discrete system in canonical
form, which corresponds to the expressions (19) and (20). The state equations are
given by
{x1(k+1)=x2(k)¿}{x2(k+1)=x3(k)¿}{.¿}{.¿}¿{}
And
(21)
[ ][ ][ ] [ ]
x1 (k +1 ) 0 1 . . 0 x 1 (k ) 0
x 2 (k +1 ) 0 0 1 . 0 x 2( k ) 0
. = . + . u(k )
. 0 0 . . 1 . .
x n (k +1 ) −a n a n−1 . . a 1 x n (k ) 1
4
The state equations are given by
x 1 (k+1)=x 2 (k)
x 2 (k+1)=x 3 (k )
.
.
x n ( k+1)=u(k )−a1 x n (k )−a 2 x n−1 (k )−. ..−a n x1 (k ) (27)
And
y (k )=( bn −a n b0 ) x 1 (k )+ ( b n−1 −an−1 b0 ) x 2 (k )+.. .+ ( b 1−a1 b 0 ) x n ( k )+b 0 u(k )
(28)
The matrices at state space are provided by
[ ] []
0 1 . . 0 0
0 0 1 . 0 0
A= , B= . u(k )
0 0 . . 1 .
−a n a n−1 . . a1 1
C=[ b n −an b 0 bn−1 −a n−1 b 0 . . b 1−a1 b 0 ] and D=b0 (29)
Observable Canonical Form
The expression (23) can be written as
( z n+α 1 z n−1+α2 z n−1. . .. .. . .. .+α n) Y ( z )=( b0 z m +b1 z m−1+. . .. .. . .. .. . ..+b m ) U ( z )
Or
Y ( z)=b0 U ( z)−z−1 ( a1 Y ( z)−b1 U ( z))−... ... ..−z −n (a n Y ( z)−b n U ( z))
(30)
The block diagram that reflects the discrete system in observable canonical form is
presented in the following Figure.
5
The state equations are
x n ( k+1)=x n−1 (k )−a1 ( x n (k)−b0 u (k ))+b1 u( k)
x n−1 (k+1)=x n−2 (k )−a2 ( xn (k )−b 0 u(k ))+b 2 u(k )
.
.
x 1 (k+1)=−an (x n (k )−b 0 u(k ))+b n u(k ) (31)
y (k )=x n (k +b n u(k )
The matrices at state space are provided by
[ ][ ]
0 0 . . −an bn −a n b0
1 0 0 . −an−1 bn−1 −a n−1 b 0
A= 0 1 . , B= .
0 0 . . −a2 .
0 0 . 1 −a1 b1 −a1 b
C=[ 0 0 . . . 1 ] and D=b0 (32)
Jordan Canonical Form
The transfer function of the expression (23) can be rewritten in a partial fraction
expansion as
Y ( z) r r r
=b 0 + 1 + 2 +. . .. .. . .. .. . .. .. . .. ..+ n
U ( z) z−λ1 z−λ 2 z−λ n (33)
The parallel implementation of the transfer function of the latter expression is
presented in the Figure below
6
Assuming the outputs of the delay elements as state variables, it can easily be
shown that the model at state space is represented by the following matrices:
[ ] []
λ1 0 . . −an 1
0 λ2 0 . −an−1 1
A= 0 0 λ3 0 . , B= .
0 0 . . −a2 .
0 0 . 0 λn 1
7
[ ]
CT
CT A
R= .
.
CT A n−1
(36)
A typical example of a non-observable system is presented in the Figure below,
where we cannot acquire information of the variable x1(k), regardless of how much
time we observe the output y(k).
Overall, a system is controllable when we can control the system operation process,
given an initial state, while a system is observable when all the provided
information about the system state must be recovered from knowledge of the
obtained measurements. In a sense, the observability is a tradeoff to the concept of
controllability, which is related to the acquisition of certain controlling tools that
allow us to achieve a desired state. In the automatic control theory, concepts of
controllability and observability are related to the design of the controller, which
solves the problem of regulation through the positioning of the hedged system
poles at desired positions. The digital control engineer selects the appropriate
measuring tools
(transducers, sensors, etc.) and decides the variables to be measured and at what
point, so that the system is observable. Also, the engineer decides how many
directional elements are required in order for the system to be controllable.
State-Space Discretization
The transformation of a continuous-time system to an equivalent discrete time
system, in the state space, is achieved by two methods.
• The first is based on numerical integration and differentiation techniques for
solving the differential equation ẋ (t)= Ax(t)+Bu(t).
• The second method is based on the sampling of input signal u(t) and holding the
sample values u(kT) for a time period equal to the sampling period T (hold
equivalence).
Discretization with the Zero-Order Hold Method
The resultant system, using this method, is expressed as
x ((k +1)T )= Ad x (kT )+Bd u(kT )
y (kT )=C d x (kT )+D d u( kT )
Where
[ ]
A d =e AT =L−1 [ ( sI− A )−1 ] , Bd =(e AT −I ) A−1 B=L−1 ( sI −A )−1 B⋅
1
s t =T if A is invertible. Or
C d =C , D d =D
Example 1
8
Consider the block diagram of the following scheme.
a. Derive the state equations of the given system.
b. Derive the transfer function H(z) = Y(z)/R(z).
Solution
a. Assume the state variables to be x1(k) and x2(k) at the output of the two delay
elements, thus the desired state equations are presented as
x 1 (k +1)=x 2 (k )
x 2 (k +1)=−0. 3 x 1 (k )−1 .1 x 2 (k )+r(k )
and
y (k )=−0. 3 x 1 (k )−1 .1 x 2 (k )+r(k )
Hence, the state equations can be written in vector form as
[ ][
x1 (k +1 ) 0
x 2 (k +1 )
=
−0 . 3
1
−1 .1 ][ ][ ]
x 1 (k ) 0
+ r(k )
x 2 (k ) 1
x 2 (k +1)=−0 .3 x 1 ( k )−1 . 1 x 2 (k )+r (k )
and
y (k )=[ −0. 3 −1 . 1 ] 1
[ ]
x (k )
x 2 (k )
+r(k )
Example 2
9
Solution
Example 3
Consider a discrete-time system with the difference equation
y(k + 2) + 5y(k + 1) + 3y(k) = u(k + 1) + 2u(k)
Calculate (a) its transfer function and (b) the state-space model.
10
11