the controller design for linear system: a state space approach

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: [email protected] Abstract—The 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

Upload: winstonhong

Post on 17-Feb-2017

270 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: The Controller Design For Linear System: A State Space Approach

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: [email protected]

Abstract—The 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

Page 2: The Controller Design For Linear System: A State Space Approach

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,

)(sY +

+

)(sd

)(sU

2

2

+s

s

1

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

G(s) =2

s(s+ 2)(1)

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

Page 3: The Controller Design For Linear System: A State Space Approach

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)

U(s)=

2

s(s+ 2)(2)

which corresponds to

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

or in time domain,

d2y(t)

dt+ 2

dy(t)

dt= 2u(t)

Without loss of generality, we define

x1(t) = y(t)

x2(t) = y(t) =dy(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

Page 4: The Controller Design For Linear System: A State Space Approach

or in matrix form,

x =

0 1

0 −2

x+

0

2

u+

1

0

d

y =

[

1 0

]

x (4)

See Figure 2 below.

2 +

+

d

y

-2

u +

+

.

2x 2x

.

1x ∫ ∫

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

Page 5: The Controller Design For Linear System: A State Space Approach

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Time(sec)

Out

put y

(t)

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

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Time(sec)

Out

put y

(t)

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

Page 6: The Controller Design For Linear System: A State Space Approach

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 Fr is applied, that is,

u = −Kx+ Fr (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+BFr

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 F B C

A

K

u +

-

+

+

yx

.

x

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

Page 7: The Controller Design For Linear System: A State Space Approach

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

[

B AB

]

=

0 2

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)

R(s)=

ωn2

s2 + 2ξωn + ωn2

(8)

Its poles are located at −ξωn ± jωn

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− ξπ√

1−ξ2 ∗ 100%;

(b) Settling time τs =4

ξω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 −2±j2 (with ξ = 0.707 and ξωn = 2), the two

major specifications of step response of the system can be obtained asMp = 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

Page 8: The Controller Design For Linear System: A State Space Approach

Hence Ackermann’s 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)−1BF = 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.

2 +

+

d

y

-2

u +

+

.

2x 2x

.

1x ∫ ∫

K1

K2

F r +

-

-

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

2

s+2

T ran sfe r Fcn

t

T o Workspa ce1

y

T o Workspa ce

S tep 1

S tep

Sco pe

s

1

In te gra to r

K2

G a in2

K1

G a in1

F

G a in

Clock

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

8

Page 9: The Controller Design For Linear System: A State Space Approach

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.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2

1.4

Time(sec)

Out

put y

(t)

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 Ackermann’s 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

Page 10: The Controller Design For Linear System: A State Space Approach

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

Time(sec)

Out

put y

(t)

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 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Time(sec)

Out

put y

(t)

Figure 10: The step response of the closed-loop system(2) without disturbance

10

Page 11: The Controller Design For Linear System: A State Space Approach

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2

1.4

Time(sec)

Out

put y

(t)

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

Page 12: The Controller Design For Linear System: A State Space Approach

+

+

+

+

+

+ + -

A

A

B

B

C

C

L

u y

x�

x

x

x�

y

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

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

˙x = Ax+Bu(t) + L[y − Cx]

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 = A1x

x(t) = eA1tx(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

Page 13: The Controller Design For Linear System: A State Space Approach

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 − Cx]

y = Cx

u = r −Kx

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

+

+

+

+

+

+ +

-

A

A

B

B

C

C

L

x

∫ u

K

y x x� ∫

-

Figure 13: Schematic of the observer/controller structure

x

˙x

=

A− BK BK

0 A− LC

x

x

+

B

0

r

y = Cx (9)

13

Page 14: The Controller Design For Linear System: A State Space Approach

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

CA

=

1 0

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

det(sI −A + LC) = det(

s −1

0 s+ 2

+

l1 0

l2 0

) = det(

s+ l1 −1

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

Page 15: The Controller Design For Linear System: A State Space Approach

1

s

T ra n sfe r Fcn

(wi th in i t ia l o u tpu ts)4

1

s

T ra n sfe r Fcn

(wi th in i t ia l o u tpu ts)3

1

s

T ra n sfe r Fcn

(wi th in i t ia l o u tpu ts)2

2

s+2

T ra n sfe r Fcn

(wi th in i t ia l o u tpu ts)1

t

T o Wo rksp a ce 1

y

T o Wo rksp a ceS te p

S co p e

-2

G a in 5

L 2

G a in 4

L 1

G a in 3

K 2

G a in 2

K 1

G a in 1

Clo ck

2

F

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

0 0.5 1 1.5 2 2.5 3−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time(sec)

Out

put

ywithout observer

yo

with observer

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

Page 16: The Controller Design For Linear System: A State Space Approach

even in the face of a step disturbance d

s

1 )(sK )(sG

y

d

+

+ +

-

r e

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

Page 17: The Controller Design For Linear System: A State Space Approach

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+Bu

e = Cx (11)

which constitutes an augmented system with a matrix

x

e

=

A 0

C 0

x

e

+

B

0

u (12)

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

e = [0 1]

x

e

17

Page 18: The Controller Design For Linear System: A State Space Approach

The control law to stabilize (12) is given by

u = −K1x−K2e ,

and u is given by

u(t) = −K1x−K2

∫ t

0

e dτ + constant.

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

u(t) = −K1x−K2

∫ t

0

(y − r) dτ ,

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

J =

∫ ∞

0

(‖ e ‖2Q + ‖ u ‖2)dt (13)

which yields

(K1, K2) = −R−1(BT , 0T )P (14)

where P is the positive definite solution of

A 0

C 0

T

P + P

A 0

C 0

+

0

I

Q[0 I]− P

B

0

R−1[BT 0T ]P = 0 (15)

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

With e = y − r and e = Cx, the augmented system is

x

e

=

0 1 0

0 −2 0

1 0 0

x

e

+

0

2

0

u

18

Page 19: The Controller Design For Linear System: A State Space Approach

d

+ +

-

r e

-

C BuAxx +=� s

K2

1K

y u

Figure 17: Closed loop system with integral control

Because

rank

C

CA

= rank

1 0

0 1

= 2, rank

A B

C 0

= rank

0 1 0

0 −2 2

1 0 0

= 3

so the augmented system is observable and controllable.

we use optimal control for the criterion function given in (13), then R = 1 and

Q =

0 0 0

0 0 0

0 0 1

,

so we will derive P by the equation (15)

0 1 0

0 −2 0

1 0 0

T

P + P

0 1 0

0 −2 0

1 0 0

+

0 0 0

0 0 0

0 0 1

− P

0 0 0

0 4 0

0 0 0

P = 0

19

Page 20: The Controller Design For Linear System: A State Space Approach

then

P =

2.5899 0.9175 1.6838

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

u = −[1.8351 0.6838]x−

∫ t

0

(y − r)dτ

The simulation model is depicted in Figure 18.

K 2

s

T ransfe r Fcn1

2

s+2

T ransfe r Fcn

t

T o Workspa ce 1

y

T o Workspa ceS tep

S co pe

K 12

G a in2

K 11

G a in1

Distu rb ance

Clock

s

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

Page 21: The Controller Design For Linear System: A State Space Approach

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.

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

1.2

1.4

Time(sec)

Out

put y

(t)

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

Page 22: The Controller Design For Linear System: A State Space Approach

0 1 2 3 4 5 6 7 8 9 10−0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Time(sec)

Out

put y

(t)

Figure 20: The output of the system when the disturbance is unit-step input

0 1 2 3 4 5 6 7 8 9 100

0.2

0.4

0.6

0.8

1

1.2

1.4

Time(sec)

Out

put y

(t)

Figure 21: The step response of the system with disturbance

22

Page 23: The Controller Design For Linear System: A State Space Approach

d istu rbance

1

s

T ransfe r Fcn

(wi th in i ti a l ou tpu ts)2

2

s+2

T ransfe r Fcn

(wi th in i ti a l ou tpu ts)1

K2

s

T ransfe r Fcn

t

T o Workspace1

y

T o WorkspaceStep

Scope

-2

G a in5

L2

G a in4

L1

G a in3

K12

G a in2

K11

G a in1

Clock

1

s

T ransfe r Fcn

2

1

s

Figure 22: The simulation model of the servo control system with observer

0 1 2 3 4 5 6 7 8 9 10−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time(sec)

Out

put y

(t)

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

Page 24: The Controller Design For Linear System: A State Space Approach

0 1 2 3 4 5 6 7 8 9 100.6

0.7

0.8

0.9

1

1.1

1.2

1.3

Time(sec)

Out

put y

(t)

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

Page 25: The Controller Design For Linear System: A State Space Approach

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.

Use case: Internet traffic control

Y. Hong and O.W.W. Yang, “Self-Tuning Optimal PI Rate Controller for End-to-End

Congestion With LQR Approach,” Proceedings of 20th International Teletraffic Congress

(ITC-20), Ottawa, Canada, June 2007, pp.829-840. Available on ResearchGate.

Discussions on control system design by ResearchGate members

“What are trends in control theory and its applications in physical systems (from a re-

search point of view)?”

https://www.researchgate.net/post/What are trends in control theory and its applications

in physical systems from a research point of view2

25