The Controller Design For Linear System: A State Space Approach
The Controller Design For Linear System: A State Space Approach
HONG Yang
Singapore 119260
Email: [email protected]
AbstractThe controllers have been widely used in many industrial processes. The goal
and achieve a satisfactory system performance. We will introduce the design method of
the state feedback controller, the state observer and the servo controller with optimal
Key Words state feedback controller, state observer, optimal control, servo control.
1
1 Introduction
The controllers have found wide applications in the industries. The goal of the control
system design is to obtain a desired system performance. Although most control system
are nonlinear, the nonlinearity is small enough to be neglected in many real-world system
design cases, where a linear analysis can describe the system dynamics effectively. We
will introduce the controller design methods of a typical plant for industrial process.
d (s )
+
U (s ) + 1 Y (s )
2
s+2 s
where u(t) is the input, y(t) is the output and d(t) is the disturbance. The transfer
function is
2
G(s) = (1)
s(s + 2)
1. Zero steady-state output error when the reference input r(t) is a unit step.
2. Small response which goes to zero at steady state when the disturbance input d(t) is
2
a unit step.
For the convenience of the analysis of the system, the disturbance will be taken into
account later on. The control plant of linear system can be expressed as
Y (s) 2
= (2)
U(s) s(s + 2)
which corresponds to
or in time domain,
d2 y(t) dy(t)
+2 = 2u(t)
dt dt
x1 (t) = y(t)
dy(t)
x2 (t) = y(t) =
dt
x1 (t) = x2 (t)
3
or in matrix form,
0 1 0 1
x =
x+ u+ d
0 2 2 0
y= 1 0 x (4)
-2
From the characteristic equation of the system, one can see that the system places one
When a unit step input is applied, the output y(t) diverges, as shown in Figure 3. When
the input u(t) is zero and a unit-step signal is applied as a disturbance, the output y(t)
also diverges, as shown in Figure 4. Thus this system cannot reject the disturbance d(t).
However, we can combine the integral control action with state feedback controller to
ment
4
5
4.5
3.5
3
Output y(t)
2.5
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(sec)
4.5
3.5
3
Output y(t)
2.5
1.5
0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(sec)
Figure 4: The output of the system when the disturbance is unit-step input
First of all, let us study the state feedback controller by introducing the n-dimensional
5
linear system with m-inputs and p-outputs:
x = Ax + Bu
y = Cx (5)
To accomplish a stable feedback control system, a control law consisting of state feedback
u = Kx + F r (6)
x = (A BK)x + BF r
y = Cx (7)
Thus, by the control of (6), (A, B, C) is changed to (A BK, BF, C). The structure of
the closed loop system is depicted in Figure 5. For later reference, (5) is known as the
.
r + u + x x y
F B C
- +
open-loop plant, (6) as the state feedback controller, K as the state feedback gain. (5)
and (6), or equivalently (7), is known as the state feedback control system.
6
Next, we begin to design the state feedback controller of the system given in (4) using
pole placement method. The system given in (4) has the controllability matrix
0 2
B AB =
2 4
with full rank, so the system is controllable.
Thirdly, we can tune the transient performance of the system by locating the proper
closed-loop poles. Consider a second order system whose closed-loop transfer function is
defined by
Y (s) n 2
= 2 (8)
R(s) s + 2n + n 2
p
Its poles are located at n jn 1 2 (with 0 < < 1). It is well known that for a
(a) Percentage overshoot Mp = e 12 100%;
4
(b) Settling time s = n
.
Control engineering practice suggests the choice of the overshoot < 10% and the setting
time 6 2 second that can achieve a satisfactory transient response. This leads to the
following requirements for selecting and n , that is, > 0.6 and n > 2.
When the closed-loop poles are specified as 2j2 (with = 0.707 and n = 2), the two
major specifications of step response of the system can be obtained as Mp = 4.3%, s = 2s.
Finally, we design the state feedback controller for the system given in (4) according to
equation (6) and (7). The characteristic equation of closed-loop system becomes
7
Hence Ackermanns formula yields
K = [4 1]
To achieve a zero steady-state error for a unit step, the system needs to meet the constraint
C(A + BK)1 BF = 1
that is, F = 4.
Figure 6 depicts the closed-loop system with state feedback controller. The relative sim-
K2 d
- + .
u . + y
x1
r
F
+ 2 + x2
x2
- +
-2
K1
K2
Gain2
2 1
y
F s+ 2 s
T ra n sfe r Fcn In te g ra to r T o Wo rksp a ce
S te p Gain
S te p 1
S co p e
K1
Gain1
Cl o ck
T o Wo rksp a ce 1
8
When a unit step is applied in the input r(t) and no disturbance is added, the output
y(t) is plotted in Figure 8. When a unit step is also applied as a disturbance at the same
1.4
1.2
0.8
Output y(t)
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(sec)
To prevent the overshoot in the step response of a closed-loop system, we can specify
the damping ratio to be > 1 by placing two closed-loop poles at 5 and 6, and the
K = [15 4.5]
Given that the steady-state error for a unit step is zero, we can obtain F = 15. When
a unit step is applied in the input r(t) and no disturbance is added, the output y(t) is
9
1.6
1.4
1.2
Output y(t) 1
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(sec)
plotted in Figure 10. When a unit step is also applied as a disturbance at the same time,
0.9
0.8
0.7
0.6
Output y(t)
0.5
0.4
0.3
0.2
0.1
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(sec)
Figure 10: The step response of the closed-loop system(2) without disturbance
10
1.4
1.2
0.8
Output y(t)
0.6
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
Time(sec)
Figure 11: The step response of the closed-loop system(2) with disturbance
The controller design method we developed in the previous section presuppose the avail-
ability of all state variables for feedback. However, in the real-world control system, the
only measured quantity are the output y of the system given in (5). This motivates us
to simulate a model with accessible state variables to estimate the states of the origi-
nal system - the model exhibits the same dynamics as the practical system. A famous
estimator, shown in Figure 12, is a closed-loop estimator which was first introduced by
a full-order state observer. We make use of both input and output of the system given in
11
x x y
u
+
B C
+
A
y
+ +
x x - +
B
C
+ +
x = Ax + Bu(t) + L[y C x]
Here x(t) denotes the estimate of x(t). Let the estimation error be denoted by x so that
x = (A LC)x
x = (A LC)x = A1 x
Clearly x(t) 0 as t . Thus the estimator output x(t) will track x(t) asymp-
totically - this observer is called an asymptotic observer. In this paper, we use the pole
placement algorithms to adjust the rate of convergence of x(t) to x(t). In practice, the
poles of the observer are usually chosen two or five times faster than the system response.
12
Suppose that we obtain the feedback gains of the controller with linear state feedback
under the assumption that all the state variables are available. In the real-world im-
plementation of the control policy, only the estimates x(t) obtained using a Luenberger
x = Ax + Bu
x = Ax + Bu + L[y C x]
y = Cx
u = r K x
- +
A
K +
+ +
x x
y C L
+ -
x A BK BK x B
= + r
x 0 A LC x 0
y = Cx (9)
13
This allows us to design the state observer for the system given in (4) by use of Equation
We use the control law specified in (6). From the above section, it is easily checked that
for F = 4 and K = [4 1], the system has the unit DC gain for the closed loop, while
If x is generated via an observer, in order to place the observer poles at (6, 6) (three
Figure 14 illustrates the simulation model. Given that the input r(t) is zero and initial
condition is x1 (0) = 1, x2 (0) = 1, x1 (0) and x2 (0), we can obtain the output y(t) (dashed
curve) if true state feedback is used; similarly we can get the output yo (t) (solid curve) if
the observer is used. Figure 15 provides the performance comparison of both scenarios.
14
F 2 1
y
S te p s+ 2 s
T ra n sfe r Fcn T ra n sfe r Fcn T o W o rksp a ce
(wi th i n i ti a l o u tp u ts)1 (wi th i n i ti a l o u tp u ts)2
2
S co p e
K2
G ain2
1 1
K1
s s L2
G ain1 T ra n sfe r Fcn T ra n sfe r Fcn
G ain4
(wi th i n i ti a l o u tp u ts)4 (wi th i n i ti a l o u tp u ts)3
-2
G ain5
L1
G ain3
Cl o ck
T o W o rksp a ce 1
0.8
0.6
Output
0.4
y
without observer
0.2
yo
with observer
0
0.2
0 0.5 1 1.5 2 2.5 3
Time(sec)
a zero steady-state error upon a step input is to employ integral control. As shown in
Figure 16, an integral control for the plant G(s) can maintain a zero steady-state error
15
even in the face of a step disturbance d
d
+
r + e +
y
1 G (s )
K (s )
s
-
To analyze control plant behavior, if given that r(t) 6= 0 and d(t) = 0, there holds
If both asymptotic tracking and regulation are required, it is called the servo control
problem.
It is intuitively clear that an optimal controller for the plant cannot maintain a zero steady
state error (for a step input) and be robust at the same time. Usually integral controller
16
The plant to be considered is
x = Ax + Bu + Ed
y = Cx (10)
where the input u is an m-vector, the state x is an n-vector, the controller vector y is a
m-vector and disturbance d is a q-vector. The objective of the servo control is to make y
follow the constant reference signal r in the presence of the constant disturbance d and
xd = 0, d = xd ,
xr = 0, r = xr .
In presence of the constant reference signal and the constant disturbance (i.e., d = 0 and
x = Ax + B u
e = C x (11)
17
The control law to stabilize (12) is given by
u = K1 x K2 e ,
and u is given by
Z t
u(t) = K1 x K2 e d + constant.
0
One can see that integral control is applied in the control system, as shown in Figure 17,
The determination of K1 and K2 can be done by using optimal control for the criterion
function
Z
J= (k e k2Q + k u k2 )dt (13)
0
which yields
(K1 , K2 ) = R1 (B T , 0T )P (14)
Now we consider the system given in (4) and we specify the initial condition x(0) = 0.
18
d
r + e +
u y
K2 x = Ax + Bu C
s
- -
K1
Because
0 1 0
C 1 0 A B
rank
= rank
= 2, rank
= rank 0 2 2 = 3
CA 0 1 C 0
1 0 0
we use optimal control for the criterion function given in (13), then R = 1 and
0 0 0
Q=
0 0 0 ,
0 0 1
19
then
2.5899 0.9175 1.6838
P = 0.9175 0.3419 0.5000
.
1.6838 0.5000 1.8351
which yields
u = [1.8351 0.6838]x e
that is
Z t
u = [1.8351 0.6838]x (y r)d
0
K12
Gain2
2 1
K2 y
s+ 2 s
s T o Wo rksp a ce
T ra n sfe r Fcn
S te p T ra n sfe r Fcn 1
Di stu rb a n ce
S co p e
K11
Gain1
Cl o ck
T o Wo rksp a ce 1
Figure 18: The simulation model of the system with integral control and optimal control
When a unit step input is applied and there is no disturbance, the output y(t) is shown in
Figure 19; When the input u(t) is zero and a unit-step signal is applied as a disturbance,
20
the output y(t) is shown in Figure 20; When a unit step input is applied and a unit-step
signal is also applied as a disturbance at the same time, the output y(t) is shown in
Figure 21.
1.4
1.2
0.8
Output y(t)
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Time(sec)
If we use the state observer to observe the state variables in the servo control above, then
we can use Figure 22 to depict the simulation model. We specify that initial condition of
the system is x1 (0) = 1, x2 (0) = 1, x1 (0) and x2 (0). When the input r(t) is zero and a
unit-step signal is applied as a disturbance, the output y(t) is shown in Figure 23; when
a unit step input is applied and a unit-step signal is also applied as a disturbance at the
21
0.8
0.7
0.6
0.5
Output y(t)
0.4
0.3
0.2
0.1
0.1
0 1 2 3 4 5 6 7 8 9 10
Time(sec)
Figure 20: The output of the system when the disturbance is unit-step input
1.4
1.2
0.8
Output y(t)
0.6
0.4
0.2
0
0 1 2 3 4 5 6 7 8 9 10
Time(sec)
22
K2
2 1
s y
S te p s+ 2 s
T ra n sfe r Fcn
T ra n sfe r Fcn T ra n sfe r Fcn T o Wo rksp a ce
(wi th i n i ti a l o u tp u ts)1 (wi th i n i ti a l o u tp u ts)2
d i stu rb a n ce
2
S co p e
K12
G ain2
1 1
K11
s s L2
G ain1
G ain4
T ra n sfe r Fcn
-2
G ain5
L1
G ain3
Cl o ck
T o Wo rksp a ce 1
Figure 22: The simulation model of the servo control system with observer
1.2
0.8
0.6
Output y(t)
0.4
0.2
0.2
0 1 2 3 4 5 6 7 8 9 10
Time(sec)
Figure 23: The response of the system with observer when the input is zero and the
5 Conclusions
We have presented the design method of the state feedback controller, the state observer
and the servo controller with optimal control law for a linear system. The major contri-
23
1.3
1.2
1.1
1
Output y(t)
0.9
0.8
0.7
0.6
0 1 2 3 4 5 6 7 8 9 10
Time(sec)
Figure 24: The step response of the system with observer when step disturbance is added
(1) We have designed the state feedback controller by pole placement method to im-
prove the transient performance of the closed-loop system, but we can not cancel the
disturbance.
(2) We have designed the state observer to estimate the state variables based on the
(3) We have combined integral control with optimal control to solve the servo problem. By
suitable optimal control law, the system can achieve faster response and the zero steady-
state output error when the reference input r(t) is a unit step; by integral controller, the
response will approach zero at steady-state when the disturbance input d(t) is a unit step.
24
References
[1] K. Ogata, Modern Control Engineering, 3rd Edition, Prentice Hall, 1996.
[2] C.T. Chen, Linear System Theory and Design, 3rd Edition, Oxford University Press,
USA, 1998.
[4] Q.G. Wang, Linear Systems, Lecture Notes, National University of Singapore, 1999.
Y. Hong, The Controller Design For Linear System: A State Space Approach, Technical
25