Sei sulla pagina 1di 78

1

Control Systems II (EEEN30041)

Lecturer: Zhengtao Ding Email: zhengtao.ding@manchester.ac.uk Webpage: http://personalpages.manchester.ac.uk/sta/Zhengtao.Ding

EEEN30041, School of E&EE, University of Manchester, 2007

Course Format and Assessment The course will be delivered in 20 lectures with 4 tutorials and a computer-based assignment. Assessment will be based on an assignment (10%) and examination (90%). Course material will include online lecture notes and handouts. Leaning Outcomes Describe dynamic systems in continuous-time state space models, and dynamic models in discrete-time forms for industrial control applications. Design controllers in state space using state-feedback and output feedback methods including linear optimal control. Design and implement controllers in discrete-time using digital control including implementing PID in digital control. Appreciate important industrial control applications
EEEN30041, School of E&EE, University of Manchester, 2007 2

References Dorf and Bishop, Modern Control Systems Stefani, Shahian, Savant and Hostetter, Design of Feedback Control Systems Kailath, Linear Systems Ogata, Modern Control Engineering Kuo, Automatic Control Systems Nise, Control Systems Engineering

EEEN30041, School of E&EE, University of Manchester, 2007

Course Structure Part 1. State space model and control design Part 2. Digital control

EEEN30041, School of E&EE, University of Manchester, 2007

1. State Space Variables


The state variables describe the future response of a system, given the present state, the excitation inputs, and the equations describing the dynamics. Example 1. Mass-spring-damper system dy d2 y M 2 + b + ky = u(t) dt dt where M is the mass, b the friction coecient, and k the spring constant. Taking the position and velocity as the state variables, ie: x1 = y dy x2 = dt
EEEN30041, School of E&EE, University of Manchester, 2007 5

(1)

the dynamics can then be written as dx1 dt dx2 dt Question: Why y and
dy dt

= x2 = b k 1 x2 x1 + u M M M

can be the state variables?

Example 2. RLC circuit dvc ic = C dt diL L dt = iL + u(t) = RiL + vc (2) (3)

with the voltage across R as the output, vo = RiL


EEEN30041, School of E&EE, University of Manchester, 2007 6

By taking x1 = vc and x2 = iL, we have dx1 dt dx2 dt y 1 1 = x2 + u(t) C C 1 R = x1 x2 L L = Rx2 (4) (5) (6)

Question: Is the set of state variable unique? Alternative choice can be x1 = vc and x2 = vL.

EEEN30041, School of E&EE, University of Manchester, 2007

2. State Dierential Equations

State Space Equation

A set of rst order dierential equations can be written as

x1 = a11x1 + a12x2 + . . . + a1nxn + b11u1 + . . . + b1mum x2 = a21x1 + a22x2 + . . . + a2nxn + b21u1 + . . . + b2mum . . xn = an1x1 + an2x2 + . . . + annxn + bn1u1 + . . . + bnmum (7)
EEEN30041, School of E&EE, University of Manchester, 2007 8

We can put the above in the matrix form x1 a11 a12 d x2 a21 a22 . = . . . dt . . xn an1 an2 . . . a1n x1 b . . . b1m u1 . . . a2n x2 11 . ... . . (8) . + . . . . . ... . bn1 . . . bnm um . . . ann xn

The column vector consisting of the state variables is called state vector and it is written x1 x2 x= . . xn (9)

We may also write x Rn, as there are n state variables. Similarly we have the input vector. Using the state vector and input vector, we have the compact
EEEN30041, School of E&EE, University of Manchester, 2007 9

10

notation of the state dierential equation x = Ax + Bu where A is an n n matrix or A Rnn, and B is an n m matrix or B Rnm. We can also write the output in the compact form y = Cx + Du The dimensions of C and D depend on the dimension of the column vector y. Puting the above two equations together, we have the most common state space equation x = Ax + Bu y = Cx + Du (10) (11)

Therefore a dynamic system is characterised by the four matrices {A, B, C, D}.


EEEN30041, School of E&EE, University of Manchester, 2007 10

11

Example 3. Write down the state space equation for RLC system shown in Example 2. x = y For this example, we have A= 0
1 L 1 C R L

0
1 L

1 C R L

x+

1 C

u(t)

(12) (13)

= [0 R]x

, B=

1 C

, C = [0 R], D = 0

Question: Determine the state space matrices A, B, C, D for Example 1.

EEEN30041, School of E&EE, University of Manchester, 2007

11

12

Solution of state space equation Consider the rst order dierential equation x = ax + bu The solution is given by
t

(14)

x(t) = e x(0) +
0

at

ea(t )bu( )d

(15)

With the matrix exponential function dened by A2t2 Ak tk = I + At + + ... + + ... 2! k!

At

(16)
12

EEEN30041, School of E&EE, University of Manchester, 2007

13

we have the solution of the state space equation given by


t

x(t) = eAtx(0) +
0

eA(t )Bu( )d

(17)

Sometimes we denote (t) = eAt and (t) is referred to as the state transition matrix. Hence the above equation can be written as
t

x(t) = (t)x(0) +
0

(t )Bu( )d

(18)

It can be shown that (t) equals the inverse Laplace transform of [sI A]1.

EEEN30041, School of E&EE, University of Manchester, 2007

13

14

3. Transfer Functions from State Equations


We can obtain the transfer function for a single-input-single-output (SISO) system from its state space equation. Taking the Laplace transform of the state space equation x = Ax + Bu y we have sX(s) = AX(s) + BU (s) Y (s) = CX(s) From the rst equation, we have X(s)(sI A) = BU (s)
EEEN30041, School of E&EE, University of Manchester, 2007

(19) (20)

= Cx

(21) (22)

(23)
14

15

and X(s) = (sI A)1BU (s) Hence we have Y (s) = C(sI A)1BU (s) Therefore the transfer function G(s) =
Y (s) U (s)

(24)

(25)

is given by (26)

G(s) = C(sI A)1B Note that we can write G(s) = C(s)B, as (s) = (sI A)1 Example 4. Determine the transfer function of the RLC system in Example 3.
EEEN30041, School of E&EE, University of Manchester, 2007

15

16

Answer:
R LC R 1 s + LC L

G(s) =

s2

(27)

(s) := (sI A)1 is a matrix with elements of Laplace transformed functions. Therefore we can use inverse Laplace transform to obtain (t) which can be used to evaluate the time response. Example 5. Obtain the time respnse of the RLC system shown in Example 2, assuming R = 3, L = 1, C = 1/2, u(t) = 0 and x(0) = [1 1]T . Solution: When u(t) = 0, we have x(t) = (t)x(0)
EEEN30041, School of E&EE, University of Manchester, 2007

(28)
16

17

In this case, we have A= and (s) = 1 s2 + 3s + 2 s + 3 2 1 s (30) 0


1 L 1 C R L

0 2 1 3

(29)

From the inverse Laplace transform, we obtain (t) = and subsequently x(t) = (t)
EEEN30041, School of E&EE, University of Manchester, 2007

(2et e2t) (2et + 2e2t) (et e2t) (et + 2e2t)

(31)

1 1

e2t e2t

(32)
17

18

Stability of State Variable Systems When we convert the state space model to the transfer function, we observe that the denominator of the transfer function is the determinant of (sI A), ie, d(s) = |sI A| (33)

Therefore the stability of the state space model depends on the characteristic polynomial of the state matrix A. The system is stable if all the poles are in the left half plane, ie, the solutions of d(s) = 0 are all with negative real parts (equivalent to the eigenvalues of A are all with negative real parts).

EEEN30041, School of E&EE, University of Manchester, 2007

18

19

4. State Space Realization and Canonical Forms


Given a transfer function, how to write its state space equations? For example, if the transfer function is given by G(s) = 6 s2 + 3s + 2 (34)

we know that its state space realization is, based on the previous RLC example, x = y = [0 0 2 1 3 3]x x+ 2 0 u(t) (35) (36)

Consider a general second transfer function b 1 s + b2 G(s) = 2 s + a1s + a2


EEEN30041, School of E&EE, University of Manchester, 2007

(37)
19

20

One realization is given by

x = y

0 1 a2 a1 b1]x

x+

0 1

u(t)

(38) (39)

= [b2

The state space realization is not unique. For the same transfer function, we can have another realization as x = y = [1 a1 1 a2 0 0]x x+ b1 b2 u(t) (40) (41)

Note that the state space variables in the two realizations are dierent. The rst realization is referred to as the controller canonical form, and the second as the
EEEN30041, School of E&EE, University of Manchester, 2007 20

21

observer canonical form, as one is convenient for controller design and the other is convenient for observer design. Controller Canonical Form For a general transfer function given by (assuming the numerator and the denominator are coprime) b1sn1 + b2sn2 + . . . + bn G(s) = sn + a1sn1 + . . . + an the controller canonical form is given by 0 1 ... 0 . . ... . . . . x = x + 0 0 ... 1 an an1 . . . a1 y = [bn bn1 ... b1]x 0 . . u(t) 0 1 (42)

(43)

(44)
21

EEEN30041, School of E&EE, University of Manchester, 2007

22

Observer Canonical Form For the above transfer function, the observer canonical form is given by a1 1 ... 0 b1 . . ... . . . . . . u(t) x = x+ an1 0 . . . 1 bn2 an 0 . . . 0 bn1 y = [1 0 ... 0]x

(45)

(46)

Example 5. Put the state space equation shown for the RLC system into the controller and observer canonical forms.

EEEN30041, School of E&EE, University of Manchester, 2007

22

23

5. Controllability and Observability


Controllability: A system is completely controllable if there exists a control input u(t) that can transfer any initial state x(0) to any other desired location x in a nite time. We can check the controllability of the system x = Ax + Bu y = Cx (47) (48)

by examining the algebraic condition rank[B AB . . . An1B] = n For a SISO system, we have B as a vector, and therefore if we dene Pc = [B AB . . . An1B]
EEEN30041, School of E&EE, University of Manchester, 2007

(49)

(50)
23

24

then Pc is an n n matrix. In this case, to check the controllability is equivalent to check if the determinant of Pc is nonzero. Example 6. Check the controllability of the system x = y where d is a constant. Observability: A system is completely observable if and only if there exists a nite time T such that the initial state x(0) can be determined from the observation history y(t) given the control u(t). For a SISO system x = Ax + Bu
EEEN30041, School of E&EE, University of Manchester, 2007

2 0 d 3 1]x

x+

1 0

u(t)

(51) (52)

= [0

(53)
24

25

= Cx

(54)

the system is completely observable is the determinant of the observability matrix C CA Po = . . CAn1 is nonzero. Example 7. Check the observability of the system x = y = [1 2 0 1 1 1]x x+ 1 1 u(t) (56) (57) (55)

EEEN30041, School of E&EE, University of Manchester, 2007

25

26

6. Full State Feedback Design


In the rst step in the state variable design, we assume all the state variables are available for feedback control. In this case, we can design the control input as u = Kx (58)

where K is the gain matrix. The full state feedback design is to decide a suitable feedback gain matrix K. For the closed-loop control system, we have x = Ax + B(Kx) = (A BK)x (59)

The stability of the closed-loop system depends on the characteristic polynomial of (A BK) Pole Assignment. To assign the closed loop poles at given locations via full state feedback.
EEEN30041, School of E&EE, University of Manchester, 2007 26

27

Pole assignment can be achieved if the system is completely controllable. Example 8. Design a full state feedback control of the system described by d3 y d2 y dy + 5 2 + 3 + 2y = u dt3 dt dt such that the closed-loop poles are at {1, 2, 3} respectively. Solution: The transfer function of the system is 1 G(s) = 3 s + 5s2 + 3s + 2 If we realize the system in the controller canonical form, we have 0 1 0 0 0 1 x + 0 u(t) x = 0 2 3 5 1
EEEN30041, School of E&EE, University of Manchester, 2007

(60)

(61)

(62)

27

28

= [1 0 0]x

(63)

If the control input is designed as u = [k1 k2 k3]x The closed-loop system is given by 0 1 0 0 1 x + x = 0 2 3 5 0 1 0 0 = (k1 + 2) (k2 + 3) (64)

0 0 ([k1 k2 k3]x) 1 0 x := (A BK)x 1 (k3 + 5)

(65)

(66)

The closed-loop characteristic polynomial is |sI (A BK)| = s3 + (k3 + 5)s2 + (k2 + 3)s + (k1 + 2)
EEEN30041, School of E&EE, University of Manchester, 2007

(67)
28

29

Comparing it with the desired characteristic polynomial (s + 1)(s + 2)(s + 3) = s3 + 6s2 + 11s + 6 we have k3 = 1, k2 = 8, k1 = 4, ie, K = [4 8 1] Therefore the control input is designed as u = [4 8 3]x = 4x1 8x2 x3 Note that for this realization we have x1 = y, x2 = input is then expressed as dy d2y u = 4y 8 2 dt dt
EEEN30041, School of E&EE, University of Manchester, 2007

(68)

(69)

(70)
d2 y . dt2

dy dt

and x3 =

The control

(71)
29

30

Question: How to implement the feedback control if only the output y is available? From Example 8 we have seen the convenience of using the controller canonical form for the full state feedback design. In fact, for a given state space system, we can transform the system to the controller canonical form if the system is controllable. To avoid the state transform, we have Ackermanns formula for the full state feedback control design. Ackermanns Formula. For a system {A, B}, the state feedback control gain K for the closed loop control u = Kx to achieve the desired closed-loop characteristic polynomial d(s) = sn + 1sn1 + . . . + n is given by
1 K = [0 0 . . . 1]Pc d(A)
EEEN30041, School of E&EE, University of Manchester, 2007

(72)

(73)
30

31

where d(A) = An + 1An1 + . . . + nI and Pc is the controllability matrix. (74)

EEEN30041, School of E&EE, University of Manchester, 2007

31

32

7. Observer Design
Full state feedback control needs the values of all the state variables. In industrial systems, it is common that not all the state are available, and in this case, an observer can be designed to provide an estimate of the unknown state variables. Luenberger Observer. For a dynamic system x = Ax + Bu y a full-state observer is designed as x = A + Bu + L(y C x) x (77) = Cx (75) (76)

where x denotes the estimate of the state variable, and L is the observer gain.
EEEN30041, School of E&EE, University of Manchester, 2007 32

33

Dene the observer error as e=xx we have the error dynamics e = (Ax + Bu) (A + Bu + L(y C x)) x = (A LC)e (79) (78)

To ensure the error asymptotically converge to zero as t , we need the characteristic equation |sI (A LC)| = 0 to have all the roots in the left half of the complex plan. Example 9. Design a full state observer 5 1 x = 3 0 2 0
EEEN30041, School of E&EE, University of Manchester, 2007

for the dynamic system 0 0 1 x + 0 u(t) 0 1

(80)

33

34

= [1 0 0]x

(81) form. For L = [l1 l2 l3]T , (l1 + 5) 1 0 (l2 + 3) 0 1 (l3 + 2) 0 0 (82)

Solution: Note the system is in the observer canonical we have l1 5 1 0 A LC = 3 0 1 l2 [1 0 0] = l3 2 0 0 The characteristic polynomial is

|sI (A LC)| = s3 + (l1 + 5)s2 + (l2 + 3)s + (l3 + 2)

(83)

If we place the poles for the observer at {2, 2, 2}, the desired characteristic polynomial is (s + 2)3 = s3 + 6s2 + 12s + 8
EEEN30041, School of E&EE, University of Manchester, 2007

(84)
34

35

By comparing the polynomials we have l1 = 1, l2 = 9, l3 = 6, ie, L = [1 9 6]T The full state observer is given by 1 0 5 1 0 x x = 3 0 1 x + 0 u(t) + 9 (y [1 0 0]) 6 1 2 0 0 (85)

(86)

The observer canonical form makes the design of observer gain easier. For the system what is not in the observer canonical form, we can still evaluate the characteristic polynomial, and then by comparing the coecients with the desired one to obtain the observer gain matrix. For design observer gains, we also have Ackermanns formula. Ackermanns Formula. For a system {A, B, C}, the observer gain L to achieve the
EEEN30041, School of E&EE, University of Manchester, 2007 35

36

desired closed-loop characteristic polynomial d(s) = sn + 1sn1 + . . . + n is given by


1 L = d(A)Po [0 0 . . . 1]T

(87)

(88)

where d(A) = An + 1An1 + . . . + nI and Po is the observability matrix. (89)

EEEN30041, School of E&EE, University of Manchester, 2007

36

37

8. Compensator Design
We aim at design dynamic feedback control from the system output. There are three steps in the compensator design. Full state feedback design Full state observer design Compensator design using the state estimate to replace the state variable in the full state control design The nal control design is given by u = K x(t) Question: How to ensure the stability of the closed-loop system?
EEEN30041, School of E&EE, University of Manchester, 2007 37

(90)

38

The separation principle plays an important part. Consider the system x = Ax + Bu y with the observer x = A + Bu + L(y C x) x and the control law u = K x(t) The closed-loop system with the observer can be written as x = Ax BK x
EEEN30041, School of E&EE, University of Manchester, 2007 38

(91) (92)

= Cx

(93)

(94)

39

x = A BK x + LC(x x) x In terms of the state variable x and observer error e = x x, we have x = (A BK)x + BKe e = (A LC)e Treating [xT eT ]T as the augmented state variable, we have d dt x e = A BK 0 BK A LC x e (95)

The characteristic polynomial of the augmented system is given by sI A BK 0 BK A LC = |sI (A BK)||sI (A LC)| (96)
39

EEEN30041, School of E&EE, University of Manchester, 2007

40

Therefore if |sI (A BK)| = 0 and |sI (A LC)| = 0 have all the roots in the left half of the complex plane, the augmented system is stable. This is the separation principle. Example 9. Design a dynamic output feedback control (compensator) for the system x = y 0 1 1 1 x+ 0 1 u(t) (97) (98)

= [1 0]x

The poles for the closed loop controller are at {1, 1} and the poles for the observer error dynamics are at {2, 2}.

EEEN30041, School of E&EE, University of Manchester, 2007

40

41

9. Tracking and Internal Model Design


Consider x = Ax + Bu y = Cx (99) (100)

We need to design a control input such that the output asymptotically tracks a given reference r, which can be written as the output for the reference state space model xr = Ar xr (101) (102)

r = dr xr

Consider the case of tracking a constant reference, we have the reference model as xr
EEEN30041, School of E&EE, University of Manchester, 2007

= 0

(103)
41

42

r = xr

(104)

Dene the tracking error e = y r. Taking the derivative of the tracking error gives e = y = Cx (105)

Let us use the notation z = x and v = u. Take e and z as the state variable of an augmented state space system d dt e z = 0 C 0 A e z + 0 B v (106)

If the augmented system is controllable, we can design a state feedback controller in the form v = k1e k2z
EEEN30041, School of E&EE, University of Manchester, 2007

(107)
42

43

where k2 is a matrix (vector) in general. The state feedback ensures the stability of the augmented system which implies the asymptotic tracking with e converging to zero. The control is input is given by integrating v as
t

u(t) = k1
0

e( )d k2x(t)

(108)

The integration in the above equation reects the dynamics of the tracking signal. It is clear to see in a block diagram that the controller acts as an internal model. Example 10. Internal model design for a unit step input for the system x = y 0 1 2 2 x+ 0 1 u(t) (109) (110)

= [1 0]x

by placing the pools of the augmented system at {1 j, 10}.


EEEN30041, School of E&EE, University of Manchester, 2007 43

44

The same control design can be extended to the case of tracking a polynomial of time. Question: How to design an internal model based controller to track a sinusoidal signal?

EEEN30041, School of E&EE, University of Manchester, 2007

44

45

10. Optimal Control


The performance of a control system can be represented by a performance index such as
tf

J=
0

g(x, u, t)dt

(111)

Optimal control is concerning with the control design to minimize a performance index. Consider a particular performance index
tf

J=
0

xT Qxdt

(112)

where Q is an n n positive denite matrix. To simplify the problem, we let tf tend to innity, that is, the index is given by

J=
0
EEEN30041, School of E&EE, University of Manchester, 2007

xT Qxdt

(113)
45

46

How to design a full state feedback law to minimise the index? Consider the control design u = Kx for x = Ax + Bu. The closed-loop system is x = (A BK)x := Hx If we have a positive denite matrix P such that d T (x P x) = xT Qx dt then substituting the above into the performance index, we have

(114)

(115)

J =
0

d T (x P x)dt = xT P x |0 = xT (0)P x(0) dt

(116)

where we assume that the closed-loop system is stable (x() = 0).


EEEN30041, School of E&EE, University of Manchester, 2007 46

47

A direct evaluation gives d T (x P x) = xT P x + xT P x dt = xT H T P x + xT P Hx = xT (H T P + P H)x From the dierential equation


d T dt (x P x)

(117)

= xT Qx we have (118)
T x Qxdt 0

H T P + P H = Q Therefore the optimal control design with the performance index J = can be carried out in two steps: Solve the matrix equation H T P + P H = Q
EEEN30041, School of E&EE, University of Manchester, 2007

(119)
47

48

to obtain matrix P that depends on the control gain K. Minimize the index J = xT (0)P x(0) to determine the control gain or other parameters in the system. Example 11. Design the state feedback control K = [k1 k2] by restricting k1 = 1 with the optimal control index of Q = I and x(0) = [1 1]T for the system x = 0 1 0 0 x+ 0 1 u(t) (121) (122) Example 12. Continue from Example 11 by restricting the control gain as K = [k k] (ie., k1 = k2) and x(0) = [1 0]T .
EEEN30041, School of E&EE, University of Manchester, 2007 48

(120)

49

Solution: Solving the matrix equation H T P + P H = I gives p11 = 1 + 2k 2k (123)

It is easy to see the control index is given by J = xT (0)P x(0) = p11 = 1 + 1 2k (124)

The minimum value of J is obtained when k tends to innity.

EEEN30041, School of E&EE, University of Manchester, 2007

49

50

11. Linear Quadratic Regulator


Consider the solution of Example 12. The bigger the controller gain, the smaller the performance index; there is no optimal solution of the control gain. This is due to the fact that we did not consider the control eort in the performance index. In engineering systems, the bigger control input eorts often mean the bigger energy consumption. To consider the input in the performance index, we often dene

J=
0

[xT Qx + uT Ru]dt

(125)

where R is a positive denite matrix. For SISO case, we have R as a constant scaler. Consider the full state feedback control u = Kx, the performance index can be
EEEN30041, School of E&EE, University of Manchester, 2007 50

51

written as

J=
0

[xT Qx + xT K T RKx]dt :=
0

xT Sxdt

(126)

where S = Q + K T RK (127)

Similar to the case with no control in the performance index, we need to solve a matrix equation H T P + P H = S and the performance index is then given by

(128)

J=
0

[xT Qx + xT K T RKx]dt :=
0

xT Sxdt = x(0)T P x(0)

(129)
51

EEEN30041, School of E&EE, University of Manchester, 2007

52

Example 13. Repeat Example 12 with the new performance index

J=
0

[xT x + ru2]dt

(130)

General Solution for Linear Quadratic Regulator: Consider a dynamic system described by x = Ax + Bu The optimal control input for the performance index

(131)

J=
0

[xT Qx + uT Ru]dt

(132)

is given by u = R1B T P x
EEEN30041, School of E&EE, University of Manchester, 2007

(133)
52

53

where P satises AT P + P A P BR1B T P + Q = 0 (134)

This equation is often referred to as the matrix algeraic Riccati equation, and it can be easily solved using Matlab.

EEEN30041, School of E&EE, University of Manchester, 2007

53

54

12. Digital Control and Sampled Data System


Question: Why digital control? Due to the application of digital computers in industrial control systems. [There are also some inherently discrete-time systems.] Sampled Data. Sampled data (or a discrete signal) are data obtained for system variables only at discrete time intervals. We assume the sampling at the same xed period, T , which is called the sampling period. The sampled data for a continuous time variable x(t) are denoted by x(kT ) with k taking the values of integers. How to decide the sampling period? It depends on the dynamics of the system, the required accuracy and hardware constraints.
EEEN30041, School of E&EE, University of Manchester, 2007 54

55

Sampler. An ideal sampler is a switch that closes for every T seconds for a instant. For an continuous time signal r(t), sampled at kT , the output from the sampler r(t) is an impulse signal, r(t) = r(kT )(t kT ) where is the impulse function. Zero-order-hold. After the sampling, it is assumed that the value is kept at same until next sampling, ie, the value of x(t) is assumed to be at the constant of x(kT ) for kT t < (k + 1)T . The impulse response of the zero-order-hold is given by 1, 0 t < T 0, otherwise.

g0(t) =
EEEN30041, School of E&EE, University of Manchester, 2007

(135)
55

56

and therefore its transfer function is given by 1 1 T s 1 eT s G0(s) = e = s s s Quantization error. An error due to a computers nite word size. (136)

EEEN30041, School of E&EE, University of Manchester, 2007

56

57

13. The z-Transform


The output from an ideal sampler is a sequence of impulses with values r(kT ), and we write

r(t) =
k=0

r(kT )(t kT )

(137)

Taking the Laplace transform of the above equation, we have


L{r(t)} =
k=0

r(kT )ekT s =
k=0

r(kT )(eT s)k

(138)

We dene the z-transform as

R(z) = Z{r(t)} =
k=0
EEEN30041, School of E&EE, University of Manchester, 2007

r(kT )z k

(139)

57

58

with z = eT s. Similar to the notation for the Laplace transformed functions, a capital letter R denotes the z-transformed functions of r(t). Example 14. Determine the z-transform for the unit step function u(t).

U (z) =
k=0

u(kT )z k =
k=0

z k =

1 z = 1 z 1 z 1

(140)

Example 15. Determine the z-transform of eat.


F (z) =
k=0

eakT z k =
k=0

(eaT z)k

z 1 = 1 (eaT z)1 z eaT

EEEN30041, School of E&EE, University of Manchester, 2007

58

59

The z-transform table x(t) (t) (t kT ) u(t), unit step t eat sin t cos t eat sin t eat cos t X(s) 1 ekT s 1/s 1/s2
1 s+a 2 + 2 s s 2 + 2 s (s+a)2 + 2 s+a (s+a)2 + 2

X(z) 1 z k
z z1 Tz (z1)2 z zeaT z sin T 2 2z cos T +1 z z(zcos T ) 2 2z cos T +1 z zeaT sin T z 2 2zeaT cos T +e2aT z 2 zeaT cos T z 2 2zeaT cos T +e2aT

EEEN30041, School of E&EE, University of Manchester, 2007

59

60

Inverse z transform Partial fraction method (similar to inverse Laplace transform) Long division Transfer function of an open loop system We need to multiply the transfer function of the zero-order-hold to the system transfer function Gp(s). G(z) = Z{G0(s)Gp(s)} (141)

Example 16. Determine the z-transfer function of Gp(s) =


EEEN30041, School of E&EE, University of Manchester, 2007

1 s(s+1) .
60

61

1 eT s 1 1 1 1 T s G(s) = = (1 e )( 2 + ) s s(s + 1) s s s+1 It follows that 1 1 1 G(z) = (1 z )Z( 2 + ) s s s+1 Tz z z = (1 z 1)( ) + 2 T (z 1) z1 ze


1

(142)

(zeT z + T z) + (1 eT T eT ) (z 1)(z eT )

EEEN30041, School of E&EE, University of Manchester, 2007

61

62

14. Discrete-time Systems


Dierence equation Consider y(k + n) + a1y(k + n 1) + . . . + any(k) = b1u(k + n) + . . . + bnu(k) (143) The solution of this dierence equation can be obtained by iteration using y(k + n) = a1y(k + n 1) . . . any(k) + b1u(k + n 1) + . . . + bnu(k) 144) ( if necessary initial values are unknown. Transfer function Taking z-transform of the dierence equation z nY (z) + a1z n1Y (z) + . . . + anY (z) = b1z n1U (z) + . . . + bnU (z)
EEEN30041, School of E&EE, University of Manchester, 2007

(145)
62

63

and the transfer function is given by Y (z) b1z n1 + . . . + bn G(z) = = U (z) z n + a1z n1 + . . . + an and nally we have b1z 1 + . . . + bnz n G(z) = 1 + a1z 1 + . . . + anz n System response using dierence equation For a given transfer function, we can obtain the dierence and then obtain the system responses using the dierence equation. Example 17. For the system considered in Example 16 with T = 1, determine the rst four terms of the output subject to the impulse input, assuming y(2) = y(1) = 0.
EEEN30041, School of E&EE, University of Manchester, 2007 63

(146)

(147)

64

For T = 1, we have the transfer function Y (z) 0.3678z + 0.2644 G(z) = = U (z) z 2 1.3678z + 0.3678 The dierence equation is obtained as y(k + 2) 1.3678y(k + 1) + 0.3678y(k) = 0.3678u(k + 1) + 0.2644u(k) (149) or y(k + 2) = 1.3678y(k + 1) 0.3678y(k) + 0.3678u(k + 1) + 0.2644u(k) (150) Note the {u(k)} = {1, 0, . . . , 0, . . .}. We have y(0) = 1.3678y(1) 0.3678y(2) + 0.3678u(1) + 0.2644u(2) = 0 (151)
EEEN30041, School of E&EE, University of Manchester, 2007 64

(148)

65

y(1) = 1.3678y(0) 0.3678y(1) + 0.3678u(0) + 0.2644u(1) = 0.3678 (152) and y(2) = 0.7675 and y(3) = 0.9145. The method shown in the above example can also be used for evaluation of inverse z transform.

EEEN30041, School of E&EE, University of Manchester, 2007

65

66

15. Closed-loop Transfer Functions and Stability


Closed-loop transfer function Consider a closed-loop system Y (z) = G(z)U (z) U (z) = D(z)E(z) E(z) = R(z) Y (z) (153) (154) (155)

where D(z) denotes the transfer function of a digital controller, and E(z) and R(z) denote the feedback error and the reference signal. The closed-loop transfer function is obtained as G(z)D(z) Y (z) = R(z) 1 + G(z)D(z)
EEEN30041, School of E&EE, University of Manchester, 2007

(156)
66

67

The above result is the same for the closed-loop transfer function of the continuous-time system. In general, the block diagram manipulation follows in the same way as the block diagram manipulation of the continuous-time systems. Stability analysis Conside the mapping between s-plane and z-plane. Let s = + j and we have z = eT s = e+j (157)

It can be seen that for < 0 we have |z| < 1, that is, the left-half of the s plane corresponds to the area within the unit circle in z-plane. Therefore we have the following statement. A sampled (discrete-time) system is stable if all the poles of the closed-loop transfer function lie within the unit circle of the z-plane. Example 18. The open-loop transfer function considered in Example 17 is under a
EEEN30041, School of E&EE, University of Manchester, 2007 67

68

closed-loop control with the controller D(z) = K, a constant. Evaluate the stability for the closed-loop system when K = 1 and K = 10. The closed-loop transfer function is given by K z20.3678z+0.2644 KG(z) 1.3678z+0.3678 = 1 + KG(z) 1 + K z20.3678z+0.2644 1.3678z+0.3678 and therefore the characteristic equation is d(z) = z 2 + (0.3678K 1.3678)z + (0.2644K + 0.3678) For K = 1, we have d(z) = z 2 z + 0.6832 = 0 (160) (159) (158)

and the poles, z1,2 = 0.50 j0.6182, are within the unit circle and the system is
EEEN30041, School of E&EE, University of Manchester, 2007 68

69

stable. For K = 10, we have d(z) = z 2 + 2.310z + 3.012 = 0 (161)

and the poles, z1,2 = 1.155 j1.295, are outside the unit circle and the system is unstable. Example 19. Range of T for stability Consider a unit feedback sampled-data system with the plant transfer function 10 Gp = s+1 . Determine the range of the sampling interval to ensure the closed-loop stability.

EEEN30041, School of E&EE, University of Manchester, 2007

69

70

16. Discrete-time State Space Systems


State Dierence Equation Similar to the state dierential equations, we have state dierence equation x(k + 1) = Ax(k + 1) + Bu(k) y(k) = Cx(k) + Du(k) where x(k) is the state vector at the step k. System Response The response can be evaluated repeatedly with the given initial values: x(1) = Ax(0) + Bu(0) x(2) = Ax(1) + Bu(1) = A2x(0) + ABu(0) + Bu(1)
EEEN30041, School of E&EE, University of Manchester, 2007 70

(162) (163)

71

. . x(k) = Ak x(0) + Ak1Bu(0) + . . . + Gu(k 1)

Controllability and Observability The controllability and observability can be checked in the same ways as for the continuous-time systems. The system is controllable if the controllability matrix Pc = [B AB . . . An1B] has full rank, and the system is observable if the observability matrix C CA Po = . . CAn1
EEEN30041, School of E&EE, University of Manchester, 2007

(164)

(165)

71

72

has full rank. Transfer functions from state dierence equations Taking z-transform of x(k + 1) = Ax(k + 1) + Bu(k), we have (zI A)X(z) = BU (z) X(z) = (zI A)1BU (z) (166) and Y (z) = CX(z) = C(zI A)1BU (z) Therefore the transfer function is given by G(z) = Y (z) = C(zI A)1B U (z) (168)
72

(167)

EEEN30041, School of E&EE, University of Manchester, 2007

73

Note that the transfer function is in the same form as for the continuous-time case, with the only dierence that s is replaced by z. We would expect the same kind of state space realizations for discrete-time transfer functions, and this indeed is the case. State space realization The canonical forms corresponding to the transfer functions in s domain work in the same way for z domain. Example 20. Obtain the state dierence equation for the transfer function 0.3678z + 0.2644 G(z) = 2 z 1.3678z + 0.3678 The realization in the controller canonical form is given by x(k + 1) = 0 1 0.3768 1.3768 x+ 0 1 u(t) (170)
73

(169)

EEEN30041, School of E&EE, University of Manchester, 2007

74

= [0.2644

0.3768]x

(171)

Stability The characteristic equation for the transfer function in z domain is given by d(z) = |zI A| = 0 (172)

The system is stable if all the roots of the characteristic equation are within the unit circle. Full State Feedback Control Design Design the full state feedback control as u(k) = Kx(k)
EEEN30041, School of E&EE, University of Manchester, 2007

(173)
74

75

which gives the closed-loop system x(k + 1) = (A BK)x(k) (174)

The full-state feedback control can be used to place the poles of the closed-loop system at the desired positions, if the system is controllable. Example 21. Design the full state feedback control law for the system in Example 20 to place the poles at {0.5, 0.5}.

EEEN30041, School of E&EE, University of Manchester, 2007

75

76

17. Implementation of Digital Controllers


There are two methods for design a digital controller. Emulation method, ie, design the controller in continuous-time and then convert to discrete-time. Direct digital design, including discrete-time pole placement via full state feedback shown in the previous section. Digital implementation of PID controllers In s domain, we have the transfer function for a PID controller as U (s) k2 = Gc(s) = k1 + + k3s X(s) s We need approximations for dierentiation and integration in discrete-time.
EEEN30041, School of E&EE, University of Manchester, 2007 76

(175)

77

Backward dierence rule for dierentiation u(KT ) = dx 1 |t=kT = (x(kT ) x((k 1)T ) dt T (176)

The z-transform for this equation is given by 1 z 1 z1 U (z) = X(z) = X(z) T Tz Forward-rectangular integration u(kT ) = u((k 1)T ) + T x(kT ) and the z-transform gives Tz U (z) = X(z) z 1
EEEN30041, School of E&EE, University of Manchester, 2007

(177)

(178)

(179)
77

78

The z domain transfer function for the PID controller is given by U (z) k2T z z1 = k1 + + k3 X(z) z1 Tz The dierence equation for this transfer function is u(kT ) = u((k 1)T ) + (k1 + k2T + k3 )x(kT ) T 2k3 k3 (k1 + )x((k 1)T ) + )x((k 2)T ) T T (180)

(181)

This is called the velocity form of PID implementation, as the control input at the current step is calculated based on the control input in the previous step, and the contribution in the current step only contributes to the change of the control input.
EEEN30041, School of E&EE, University of Manchester, 2007 78

Potrebbero piacerti anche