9 Controller Discretization
9 Controller Discretization
9 Controller Discretization
The output from the controller will take on discrete values which we denote
by uk . The actual input to the plant be controlled is usually obtained by
passing the sequence uk through a zero-order hold (ZOH). The output of the
ZOH is given by
u(t) = uk , tk t < tk+1
In this section we would like to determine mathematical models for the rela-
tionship between uk and yk and establish a technique for digital implemen-
tation of a controller design.
Therefore,
xk+1 = Ad xk + Bd uk (3)
yk = Cd xk
where
Cd = C
Ad = eAT
Z T
Bd = eA d B
0
Consider
xk+1 = Ad xk , x0 given
It is readily verified that the solution is
xk = Akd x0
For simplicity, assume that Ad has distinct eigenvalues and permits the eigen-
decomposition
Ad = EE1
Therefore,
and
xk = Ek E1 x0
Letting xk = E1 xk , it follows that
xk = k x0
where k = diag{ki }. If
|i | < 1, i = 1, , n (4)
then
ki 0 as k
k O as k
xk = Exk 0 as k
ki as k
||xk || as k
Theorem 1. If the eigenvalues of Ad lie within the open unit disk of the
complex plane, the discrete-time system is asymptotically stable.
Theorem 2. If any of the eigenvalues of Ad lie outside the unit disk of the
complex plane, then the discrete-time system is unstable.
Consider the ZOH equivalent in (3) and assume that A has distinct eigen-
values. If A has the eigendecomposition
A = EE1 , = diag{i }, i = i ji
then
Ad = eAT = EeT E1
Therefore
{Ad } = ei T = ei T eji T
Now, |ei T | = |ei T |. Hence if i < 0, then |ei T | < 1. Therefore, the
ZOH equivalent of an asymptotically stable continuous-time system is also
asymptotically stable.
x = Ax + Bu, y = Cx (5)
We want to replace this with difference equations that relate the sampled
values yk and uk . Since y(tk ) = Cx(tk ) we have
yk = Cxk
Now, approximate the integrals on the right-hand side using the trapezoidal
rule:
Z t
k+1 T
x dt = (xk+1 + xk )
tk 2
Z t
k+1 T
u dt = (uk+1 + uk )
tk 2
Therefore,
T T
xk+1 xk = A [xk+1 + xk ] + B [uk+1 + uk ]
2 2
T T T
[1 A ]xk+1 = [1 + A ]xk + B [uk+1 + uk ]
2 2 2
T 1 T T T
xk+1 = [1 A ] [1 + A ] xk + [1 A ]1 B [uk+1 + uk ]
| 2 {z 2} | 2
{z 2}
Ad Bd
zk+1 = Ad zk + Bd uk
zk+2 = Ad zk+1 + Bd uk+1
Note that setting xk = zk + zk+1 and adding the two equations gives the
desired one for xk . Hence
yk = Cxk = C(zk + zk+1 )
= Czk + C(Ad zk + Bd uk )
= C(1 + Ad ) zk + C B u
| {z d} k
| {z }
Cd Dd
Hence the discrete equivalent of the state-space model in Eq. (5) is
zk+1 = Ad zk + Bd uk (6)
yk = Cd zk + Dd uk (7)
where Ad , Bd , Cd , and Dd are defined as above.
where
R = RT > O, Q = QT O, S = ST O,
We would like to determine uk , k = 0, 1, 2, , N 1 to minimize J .
The state equation is treated as a constraint which we rewrite as
Axk + Buk xk+1 = 0 (10)
Let us adjoin (10) to (9) using Lagrange multipliers k , k = 1, , N :
1
NX
L=J + Tk+1 (Axk + Buk xk+1 ) (11)
k=0
where
Rk+1 = R + BT Pk+1 B
Hence, the optimal control is state feedback.
In order to determine Pk , let us substitute (16) into (15):
Pk xk = AT Pk+1 xk+1 + Qxk
= AT Pk+1 (Axk + Buk ) + Qxk
= AT Pk+1 Axk AT Pk+1 BR1 T
k+1 B Pk+1 Axk + Qxk
Since this must hold for all xk , the coefficient matrix on each side must match.
Therefore,
Pk = AT (Pk+1 Pk+1 BR1 T
k+1 B Pk+1 )A + Q (17)
This is called the discrete-time Riccati equation. It can be solved backwards
given the terminal condition PN = S. When Pk , k = N, N 1, , 0 is
known, the optimal feedback gains Fk can be determined.