You are on page 1of 25

The Controller Design For Linear System:

A State Space Approach

HONG Yang

Matric. No. : HD 98-1284R

Department of Electrical Engineering

National University of Singapore

Singapore 119260


Email: engp8799@nus.edu.sg

AbstractThe controllers have been widely used in many industrial processes. The goal

of accomplishing a practical control system design is to meet the functional requirements

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

control law for a linear system in this paper.

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.

1.1 Description of the system

Figure 1 depicts a typical linear system in the industrial process,

d (s )
+

U (s ) + 1 Y (s )
2
s+2 s

Figure 1: A typical plant for industrial process

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)

The objectives of our controller design are summarized as follows:

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.

3. Fast response when the reference input r(t) is a unit step.

1.2 Analysis of the system

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

Y (s)(s(s + 2)) = 2U(s) (3)

or in time domain,
d2 y(t) dy(t)
+2 = 2u(t)
dt dt

Without loss of generality, we define

x1 (t) = y(t)
dy(t)
x2 (t) = y(t) =
dt

Then we can obtain

x1 (t) = x2 (t)

x2 (t) = 2x2 (t) + 2u(t)

If the disturbance is added, then

x1 (t) = x2 (t) + d(t)

x2 (t) = 2x2 (t) + 2u(t)

3
or in matrix form,

0 1 0 1
x =

x+ u+ d

0 2 2 0
 
y= 1 0 x (4)

See Figure 2 below.


d
+ .
u . + x1 y
2 + x2
x2

+

-2

Figure 2: The state-space representation of the plant

From the characteristic equation of the system, one can see that the system places one

open-loop pole in the origin. Obviously the system is unstable.

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

reject the disturbance. The concrete method will be introduced in Section 4.

2 The state feedback controller design using pole place-

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)

Figure 3: The open-loop step response of the system


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)

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

Kx and feedforward F r is applied, that is,

u = Kx + F r (6)

where r is a reference vector, K and F are constant matrices, and F is non-singular.

Substituting (6) into (5) yields

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

- +

Figure 5: State feedback control system

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

step input, the closed-loop system possesses the following properties:


(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

f (s) = (s + 2 j2)(s + 2 + j2) = s2 + 4s + 8

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-

ulation model is shown in Figure 7.

K2 d
- + .
u . + y
x1
r
F
+ 2 + x2
x2

- +

-2

K1

Figure 6: The state-space representation of state feedback control system

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

Figure 7: The simulation model of the closed-loop system

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

time, the output y(t) is plotted in Figure 9.

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 8: The step response of the closed-loop system without disturbance

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

corresponding characteristic equation of closed-loop system is expressed as

f (s) = (s + 5)(s + 6) = s2 + 11s + 30

Hence Ackermanns formula yields

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)

Figure 9: The step response of the closed-loop system with disturbance

plotted in Figure 10. When a unit step is also applied as a disturbance at the same time,

the output y(t) is plotted in Figure 11.

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

3 Full order observer design

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

Luenberger(1964) - it is commonly referred to as an asymptotic state estimator or simply

a full-order state observer. We make use of both input and output of the system given in

(5) to drive the estimator.

11
x x y
u

+
B C

+
A

y
+ +
x x - +
B
C

+ +

Figure 12: A closed-loop estimator (Luenberger Observer)

Consider an estimator of x(t) of the form:

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 = x x. It then readily leads to

x = (A LC)x

with x(0) = x(0) x(0).

If we choose L such that (A LC) = A1 is stable, we have

x = (A LC)x = A1 x

x(t) = eA1 t x(0)

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

observer is fed back. Figure 13 depicts a schematic of the observer/controller strategy,

where the overall system can be described as

x = Ax + Bu

x = Ax + Bu + L[y C x]

y = Cx

u = r K x

It is convenient to write these equations in terms of x and x, so that we get


u x

+ +
B C

- +
A

K +
+ +
x x

y C L

+ -

Figure 13: Schematic of the observer/controller structure


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

(9). The system given in (4) has the observability matrix



C 1 0
=

CA 0 1

with full rank, so the system is observable.

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

the closed-loop poles are located at 2 j2.

If x is generated via an observer, in order to place the observer poles at (6, 6) (three

times as the closed-loop poles), the characteristic equation of observer becomes



s 1 l1 0 s + l1 1
det(sI A + LC) = det(

+

) = det(

)

0 s+2 l2 0 l2 s+2

= s2 + (l1 + 2)s + 2l1 + l2 = (s + 6)2

from which L = [10 16]T can be derived.

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

Figure 14: The simulation model of full order observer/controller combination


1.2

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)

Figure 15: System performance with and without observer

4 Servo controller design

In the case of single-input/single-output (SISO) systems, a popular method for achieving

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
-

Figure 16: Classical integral control for a SISO system

To analyze control plant behavior, if given that r(t) 6= 0 and d(t) = 0, there holds

limt e(t) = limt (y(t) r(t)) = 0.

This is called the asymptotic tracking problem.

If given that r(t) = 0 and d(t) 6= 0, there holds

limt e(t) = limt (y(t) r(t)) = limt y(t) = 0.

This is called the asymptotic regulation problem.

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

is combined with optimal controller to solve the servo problem.

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

to stabilize the closed loop.

Let the models of the disturbance and reference signals be

xd = 0, d = xd ,

xr = 0, r = xr .

and define the error e as e = y r.

In presence of the constant reference signal and the constant disturbance (i.e., d = 0 and

r = 0), the derivative of (10) gives

x = Ax + B u

e = C x (11)

which constitutes an augmented system with a matrix



x A 0 x B
= + u (12)

e C 0 e 0
When e is taken as the output of this system, the output equation becomes

x
e = [0 1]


e

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

When the constant term is taken as zero, the control law is


Z t
u(t) = K1 x K2 (y r) d ,
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)

where P is the positive definite solution of


T
A 0 A 0 0 B 1 T T
P +P + Q[0 I] P R [B 0 ]P = 0 (15)

C 0 C 0 I 0

Now we consider the system given in (4) and we specify the initial condition x(0) = 0.

With e = y r and e = C x, the augmented system is



0 1 0 0

x

x


= 0 2
+ 2 u
0

e

e



1 0 0 0

18
d

r + e +
u y
K2 x = Ax + Bu C
s
- -

K1

Figure 17: Closed loop system with integral control

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

so the augmented system is observable and controllable.

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

so we will derive P by the equation (15)


T
0 1 0 0 1 0 0 0 0 0 0 0


0 2 0 P + P 0 2 0 + 0 0 0 P 0 4 0 P = 0



1 0 0 1 0 0 0 0 1 0 0 0

19
then

2.5899 0.9175 1.6838


P = 0.9175 0.3419 0.5000

.


1.6838 0.5000 1.8351

According to the equation (14), we will get

[K1, K2] = [1.8351 0.6838 1.0000]

which yields

u = [1.8351 0.6838]x e

that is
Z t
u = [1.8351 0.6838]x (y r)d
0

The simulation model is depicted in Figure 18.

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)

Figure 19: The step response of the system without disturbance

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

same time, the output y(t) is shown in Figure 24.

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)

Figure 21: The step response of the system with disturbance

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

disturbance input is a unit step

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

butions of this paper are:

(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

knowledge of output and control variables.

(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.

[3] T. Kailath, Linear Systems, Prentice-Hall, 1979.

[4] Q.G. Wang, Linear Systems, Lecture Notes, National University of Singapore, 1999.

Citation of this paper

Y. Hong, The Controller Design For Linear System: A State Space Approach, Technical

Report, National University of Singapore, November 1999.

25