2 Computer Control Systems - Springer

16 downloads 187 Views 488KB Size Report
28 Digital Control Systems. The analog-to-digital converter implements two functions: 1. Analog signal sampling: this operation consists in the replacement of .
2 Computer Control Systems

In this chapter we present the elements and the basic concepts of computercontrolled systems. The discretization and choice of sampling frequency will be first examined, followed by a study of discrete-time models in the time and frequency domains, discrete-time systems in closed loop and basic principles for designing digital controllers.

2.1 Introduction to Computer Control The first approach for introducing a digital computer or a microprocessor into a control loop is indicated in Figure 2.1. The measured error between the reference and the output of the plant is converted into digital form by an analog-to-digital converter (ADC), at sampling instants k defined by the synchronization clock. The computer interprets the converted signal y(k) as a sequence of numbers, which it processes using a control algorithm and generates a new sequence of numbers {u(k)} representing the control. By means of a digital-to-analog converter (DAC), this sequence is converted into an analog signal, which is maintained constant between the sampling instants by a zero-order hold (ZOH). The cascade: ADCcomputer-DAC should behave in the same way as an analog controller (PID type), which implies the use of a high sampling frequency but the algorithm implemented on the computer is very simple (we just do not make use of the potentialities of the digital computer!). A second and much more interesting approach for the introduction of a digital computer or microprocessor in a control loop is illustrated in Figure 2.2 which can be obtained from Figure 2.1 by moving the reference-output comparator after the analog-to-digital converter. The reference is now specified in a digital way as a sequence provided by a computer. In Figure 2.2 the set DAC - plant - ADC is interpreted as a discretized system, whose control input is the sequence {u(k)} generated by the computer, the output being the sequence {y(k)} resulting from the A/D conversion of the system output y(t). This discretized system is characterized by a “discrete-time model”, which 25

26

Digital Control Systems

describes the relation between the sequence of numbers {u(k)} and the sequence of numbers {y(k)}. This model is related to the continuous-time model of the plant.

CLOCK

e(t) r(t) + -

e(k)

u(k)

DAC + ZOH

COMPUTER

ADC

u(t)

y(t)

PLANT

CONTROLLER

Figure 2.1. Digital realization of an « analog » type controller

CLOCK

e(k) r(k) +

u(k)

COMPUTER -

u(t)

DAC + ZOH

y(t)

PLANT

y(k)

ADC

DISCRETIZED PLANT

Figure 2.2. Digital control system

This approach offers several advantages. Among these advantages here we recall the following: 1. The sampling frequency is chosen in accordance with the “bandwidth” of the continuous-time system (it will be much lower than for the first approach).

Computer Control Systems

2. 3.

27

Possibility of a direct design of the control algorithms tailored to the discretized plant models. Efficient use of the computer since the increase of the sampling period permits the computation power to be used in order to implement algorithms which are more performant but more complex than a PID controller, and which require a longer computation time.

In fact, if one really wants to take advantage of the use of a digital computer in a control loop, the “language” must also be changed. This may be achieved by replacing the continuous-time system models by discrete-time system models, the continuous-time controllers by digital control algorithms, and by using dedicated control design techniques. The changing over to this new “language” (discrete-time dynamic models) makes it possible to use various high performing control strategies which cannot be implemented by analog controllers. The operating details of the ADC (analog-to-digital converter), the DAC (digital-to-analog converter) and the ZOH (zero-order hold) are illustrated in Figure 2.3.

A.D.C.

D.A.C. + Z.O.H.

Z.O.H. Ts sampling period

Figure 2.3. Operation of the analog-to-digital converter (ADC), the digital-to-analog converter (DAC) and the zero-order hold (ZOH)

28

Digital Control Systems

The analog-to-digital converter implements two functions: 1. Analog signal sampling: this operation consists in the replacement of the continuous signal with a sequence of values equally spaced in the time domain (the temporal distance between two values is the sampling period), as these values correspond to the continuous signal amplitude at sampling instants. 2. Quantization: this is the operation by means of which the amplitude of a signal is represented with a discrete set of different values (quantized values of the signal), generally coded with a binary sequence. The general use of high-resolution A/D converters (where the samples are coded with 12 bits or more) allows one to consider the quantification effects as negligible, and this assumption will hold in the following. Quantization effects will be taken into account in Chapter 8. The digital-analog converter (DAC) converts at the sampling instants a discrete signal, digitally coded, in a continuous signal. The zero-order hold (ZOH) keeps constant this continuous signal between two sampling instants (sampling period), in order to provide a continuous-time signal.

2.2 Discretization and Overview of Sampled-data Systems 2.2.1 Discretization and Choice of Sampling Frequency Figure 2.4 illustrates the discretization of a sinusoid of frequency f0 for several sampling frequencies fs. It can be noted that, for a sampling frequency fs = 8 f0, the continuous nature of the analog signal is unaltered in the sampled signal. For the sampling frequency fs = 2 f0, if the sampling is carried out at instants 2Sf0 t other than multiples of S a periodic sampled signal is still obtained. However if the sampling is carried out at the instants where 2Sf0 t = nS, the corresponding sampled sequence is identically zero. If the sampling frequency is decreased under the limit of fs = 2f0, a periodic sampled signal still appears, but its frequency differs from that of the continuous signal (f = fs - f0). In order to reconstruct a continuous signal from the sampled sequence, the sampling frequency must verify the condition (Nyquist's theorem): fs > 2 fmax

(2.2.1)

Computer Control Systems

f

s

=8f

29

0

fs =2f

fs = 2 f

0

0

!!

Figure 2.4. Sinusoidal signal discretization

in which fmax is the maximum frequency to be transmitted. The frequency fs=2 fmax is a theoretical limit; in practice, a higher sampling frequency must be chosen. The existence of a maximum limit for the frequency that may be converted without distortion, for a given sampling frequency, is also understandable when it is observed that the sampling of a continuous-time signal is a “magnitude modulation” of a “carrier” frequency fs (analogy with the magnitude modulation in radio transmitters). The modulation effect may be observed in the replication of the spectrum of the modulating signal (in our case the continuous signal) around the sampling frequency and its multiples. The spectrum of the sampled signal, if the maximum frequency of the continuous signal (fmax) is less than (1/2) fs, is represented in the upper part of Figure 2.5. The spectrum of the sampled signal, if fmax > (1/2)fs, is represented in the lower part of Figure 2.5. The phenomenon of overlapping (aliasing) can be observed. This corresponds to the appearance of distortions. The frequency (1/2)fs, which defines the maximum frequency (fmax) admitted for a sampling with no distortions, is known as “Nyquist frequency” (or Shannon frequency).

30

Digital Control Systems

Case 1 : f

o

1

max

< ___ f

2

s

ƒ

ƒ

max



s

1

Case 2 : f

max

ƒ s

s

Spectrum of the sampled signal

Continuous-time spectrum

o



s

> ___ f

ƒ

2

s

ƒ

max

Continuous-time spectrum



s s Overlapping (aliasing) of the spectrum (distorsions !)



s

Figure 2.5. Spectrum of a sampled signal

For a given sampling frequency, in order to avoid the folding (aliasing) of the spectrum and thus of the distortions, the analog signals must be filtered prior to sampling to ensure that: f max 

1 f 2 s

(2.2.2)

The filters used are known as “anti-aliasing filters”. A good anti-aliasing filter must have a minimum of two cascaded second-order cells (fmax b1. For L=0.5Ts b2 § b1. Therefore, a fractional delay introduces a zero in the pulse transfer function. For L > 0.5 Ts the relation |b2| > |b1| holds and the zero is outside the unit circle (unstable zero)5. The pole-zero configuration in the z plane for the first-order system with ZOH is represented in Figure 2.18. The term z-d-1 introduces d+1 poles at the origin [H(z) = (b1z + b2) / zd+1 (z + a1)].

5

The presence of unstable zeros has no influence on the system stability, but it imposes constraints on the use of controller design techniques based on the cancellation of model zeros by controller poles.

50

Digital Control Systems Table 2.4. Pulse transfer functions for continuous-time systems with zero-order hold

H (s )

H ( z 1 )

1 s

Ts z 1 1  z 1

G 1  sT

b1z 1 ; b1 1  a1z 1

Ge  sL ; L  Ts 1  sT

b1 z 1  b2 z 2 1  a1 z 1 b2

Z02

G (1  e Ts / T ) ; a1

;

b1

e Ts / T

G (1  e ( L Ts ) / T ) ;

Ge Ts / T (e L / T  1) ; a1

e Ts / T

b1 z 1  b2 z 2

Z02  2]Z 0 s  s 2

1  a1 z 1  a2 z  2

]Z · § b1 1  D ¨ E  0 w ¸ ; b2 Z ¹ ©

Z Z0 1  ] 2 ] 1

a1

D

e ]Z 0Ts ; E

§ ]Z 0

D 2  D¨

2DE ; a2

© Z

· wE¸ ¹

D2

cos(ZTs ) ; w

sin(ZTs )

Figure 2.19 represents the step responses for a system characterized by a pulse transfer function H ( z 1)

with

b1 1  a1

b1 z 1 1  a1 z 1

(2.3.45)

1 (steady-state gain = 1) for different values of the parameter a1:

a1 = -0.2 ; -0.3 ; -0.4 ; -0.5 ; -0.6 ; -0.7 ; -0.8 ; -0.9

Computer Control Systems

b2 b1

51

+j

1

-j

Figure 2.18. Pole-zero configuration of the sampled-data system described by Equation 2.3.44 ( first order system with ZOH)

On the basis of these responses, it is easy to derive the time constant of the corresponding continuous-time system, expressed in terms of the sampling period (the time constant is equal to the time required to reach 63% of the final value). The presence of a time delay equal to an integer multiple of the sampling period only causes a time shift in the responses given in Figure 2.19. Step Responses a1 = -0.2

1

0.8

a1 = -0.8 a1 = -0.9

0.6

0.4

0.2

0

0

2

4

6

8

10

12

14

16

18

20

Time (t/Ts)

Figure 2.19. Step responses of the discrete-time system b1 z-1/(1+a1 z-1) for different values of a1 and [b1 /(1+ a1) ]=1

The presence of a fractional time delay has as a main consequence a modification at the beginning of the step response, if compared to the case with no fractional time delay. Exercise. Assuming that the sampled-data system model is

52

Digital Control Systems

y(t) = - 0.6 y(t-1) + 0.2 u(t-1) + 0.2 u(t-2)

What is the corresponding continuous-time model? It is interesting to analyze the relation between the location of the pole ( z a1 ) and the rising time of the system. Figure 2.19 indicates that the response of the system becomes slower as the pole of the system moves toward the point [1, j0], and it becomes faster as the pole of the system approaches the origin (z = 0). These considerations can be applied to systems with several poles. In the case of systems with more than one pole, the term “dominant pole(s)” is introduced to characterize the pole (or the poles) that is (are) the closest to the point [1,j0], i.e. which is the slowest pole(s). Figure 2.20 shows the frequency responses (magnitude and phase) of the firstorder discrete system given by 2.3.45 for a1 = - 0.8; -0.5; -0.3. It can be observed that the bandwidth increases when the system pole is approaching the origin (faster pole). We can also remark that the phase lag at the frequency 0.5fs is -180o due to the presence of the ZOH (see Section 2.3.6). Bode Diagrams

0

Magnitude (dB)

a1=-0.3 -5

a1=-0.5 -10

a1=-0.8 -15

-20

0

0.05

0.1

0.15

Phase (deg)

-45

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.3

0.35

0.4

0.45

0.5

a1=-0.3

-90

a1=-0.5 -135

a1=-0.8

-180 0

0.05

0.1

0.15

0.2

0.25

Frequency (f/fs)

Figure 2.20. Frequency responses (magnitude and phase) of the discrete-time model b1 z-1 / (1 + a1 z-1) for different values of a1 and b1

2.3.8 Analysis of Second-order Systems

The pulse transfer function corresponding to the discretization with a zero-order hold of a normalized second-order continuous-time system, characterized by a natural frequency Z0 and a damping ], is given by

Computer Control Systems

z  d (b1 z 1  b2 z 2) 1  a1 z 1  a2 z 2

H ( z 1)

53

(2.3.46)

where d represents the integer number of sampling periods contained in the delay. The values of a1, a2, b1, b2 as a function of Z0 and ]for a pure time delay W = d·Ts are given in Table 2.4. It is interesting to express the poles of the discretized system as a function of Z0, ] and the sampling period Ts (or the sampling frequency fs). From Table 2.4 the following relations are easily found (for ] < 1): 2 a1 2 e] Z 0T s cos Z 0 1  ] T s

a2

e

 e ] Z 0T s (e jZ 0

1] 2 T s

 e jZ 0

1] 2 T s

)

2] Z 0T s

The poles of the pulse transfer function (roots of the denominator) are found by solving the equation z2 + a1z + a2 = (z - z1) (z - z2) = 0

From the expressions of a1 and a2 the solutions are directly derived:

z1, 2

e

] Z 0Ts r jZ 0 1] 2 Ts

Note that the poles of the discretized system correspond to the poles of the continuous-time system s1, 2

] Z 0 r j Z 0 1  ] 2 by applying the transformation

e sTs . For ] < 1, the poles of the discretized system are complex conjugate and, consequently, symmetric with respect to the real axis. They are characterized by a module and a phase given by z

z1, 2 ‘z1, 2

e

]Z 0Ts

e

 2S]

r 1  ] 2 Z 0 Ts

f0 fs

e

 2S]

r2S 1  ]

Z0 Zs

2

f0 fs

r2S 1  ]

2

Z0 Zs

54

Digital Control Systems

Pole - Zero Map

1

0.2

0.3 0.8 0.6 0.4

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0.4 f0 fS

Imag Axis

0.2

] 0.1

0

-0.2 -0.4 0.4

-0.6

0.1

-0.8 0.3 -1

-1

-0.5

0.2 0 Real Axis

Figure 2.21. The curves ] constant and Z 0Ts / 2S a second-order discrete-time system

0.5

f0 / fs

1

constant in the z-plane for

Note that the poles location depends upon ] and Z0Ts (or Z0/Zs = f0/fs). That is: z = f(], Z0 Ts / 2S) = f(], f0/fs )

and in the z-plane the following curves can be drawn: z = f(Z0 Ts /2S ) = f(f0 /fs)

for ] = constant

and z = f(])

for Z0 Ts /2S = f(f0 /fs) = constant

We must remember (see Figure 1.9) that in the s-plane (continuous system) the curves ] = constant are straight lines forming an angle T = cos-1] with the real axis and the curves Z0 = constant are circles with radius Z0 (these two sets of curves are orthogonal). In the z-plane the curves z = f (Z0 Ts) for ] = constant are logarithmic spirals that are orthogonal in each point to the curves z: f(]) for Z0 Ts = constant.

Computer Control Systems

55

Figure 2.21 shows the set of curves z = f(]) for Z0 Ts/2S = constant and z = f(Z0 Ts/2S) for ] = constant corresponding to different values of ] and Z0Ts/2S (respectively f0/fs). We should also remember (see Section 2.3.2) that for f0 / f s

Z0 / Zs

1/ §¨ 2 1  ] 2 ·¸ , the corresponding poles in the z- plane are © ¹

confounded ( ‘ z1,2 = ±S ), and they are located on the segment of the real axis (

S] 1] 2

1,0) having an abscissa coordinate equal to  e . The stability domain of the second-order discrete-time system in the plane of the parameters a1 - a2 is a triangle (see Figure 2.22). For values of a1, a2 placed inside of the triangle, the roots of the denominator of the pulse transfer function are inside the unit circle. a

2

+1

a -2

-1

1

2

1

-1

Figure 2.22. Stability domain for the second-order discrete-time system

2.4 Closed Loop Discrete-time Systems 2.4.1 Closed Loop System Transfer Function

Figure 2.23 gives the diagram of a closed loop discrete-time system. The transfer function on the feedforward channel can result from the cascade of a digital controller and of the group DAC+ ZOH + continuous-time system + ADC (discretized system).

56

Digital Control Systems (disturbance)

p(t)

-1

HOL(z ) r (t)

+

B (z-1)

+

A

-

(z-1)

y (t)

+

Figure 2.23. Closed loop discrete-time system

Let H OL ( z 1)

B ( z 1) A( z 1)

(2.4.1)

be the feed-forward channel transfer function with B ( z 1)

b1 z 1  b2 z 2    bnB z  nB

(2.4.2)

where the coefficients b1, b2 ... bd may be zero if there is a time delay of d sampling periods. In the same way as for continuous-time systems, the closed loop transfer function connecting the reference signal r(t) to the output y(t) is written as H CL ( z 1)

H OL ( z 1)

B( z 1) A( z )  B( z 1)

1

1

1  H OL ( z )

(2.4.3)

The denominator of the closed loop transfer function, whose roots correspond to the closed loop system poles, is also called characteristic polynomial of the closed loop. 2.4.2 Steady-state Error

The steady-state is obtained for r(t) = constant by making z = 1, corresponding to the zero frequency (z = esTs = 1 for s = 0). It follows from Equation 2.4.3 that nB

y

H CL (1)r

¦b

i

i 1

nB

A(1)  ¦ bi i 1

r

(2.4.4)

Computer Control Systems

57

where HCL(1) is the steady-state gain (static gain) of the closed loop system. In order to obtain a zero steady-state error between the reference signal r and the output y, it is necessary that HCL(1) = 1

(2.4.5)

From Equation 2.4.4 the following conditions are derived: nB

¦ b z 0 and A(1)

(2.4.6)

0

i

i 1

In order to obtain A(1) = 0, A(z-1) must have the following structure: A(z-1) = (1 - z-1) · A'(z-1)

(2.4.7)

A' ( z 1 ) 1  a1 z 1  ...  a nA' z  n A'

(2.4.8)

where

and thus the global transfer function of the feedforward channel must be of the type 1

H OL ( z )

1 B ( 1) ˜ z 1 1 1 z A' ( z )

 (2.4.9)

It is thus observed that the feedforward channel must contain a digital integrator in order to obtain a zero steady-state error in closed loop. This situation is similar to the continuous case (see Section 1.2.3) and internal model principle is also applicable to discrete-time systems. 2.4.3 Rejection of Disturbances

In the presence of a disturbance p(t) acting on the controlled output (see Figure 2.23), the objective is to reduce its effect as much as possible, at least in some frequency regions. In particular, the constant disturbance effect (a step), often called “load disturbance”, is expected to be zero in steady-state (t o f zo1). The pulse transfer function, which links the disturbance to the output, is S yp ( z 1)

1 1  H OL ( z 1)

A( z 1) A( z 1)  B ( z 1)

As for the continuous-time case, Syp (z-1) is called “output sensitivity function”. The steady-state is obtained for z = 1. It follows that

58

Digital Control Systems

y

S yp (1) p

A(1) p A(1)  B (1)

(where p is the stationary value of the disturbance). In order to achieve a perfect steady-state disturbance rejection, it is necessary that Syp(1) = 0 and thus A(1) = 0. This implies that A(z-1) must have the form given in Equation 2.4.7, corresponding to the integrator insertion in the feedforward channel. Similarly, to the continuous case, a perfect steady-state disturbance rejection implies that the feedforward channel must contain the internal model of the disturbance (the transfer function that produces p(t) from a Dirac pulse). As in the continuous-time case, it should be avoided that an amplification of the disturbance effect occurs in certain frequency regions. This is the reason why |Syp (e-jZ _must be lower than a specified value for all frequencies f = Z/2S d fs / 2. A typical value used as upper bound is

|Syp (e - jZ _d 2

0 d Z dS fs

Furthermore, if it is known that a disturbance has its energy concentrated in a particular frequency region, |Syp (ejZ _may be constrained to introduce a desired attenuation in this frequency region.

2.5 Basic Principles of Modern Methods for Design of Digital Controllers 2.5.1 Structure of Digital Controllers

Figure 2.24 gives the diagram of a PI type analog controller. The controller contains two channels (a proportional channel and an integral channel) that process the error between the reference signal and the output. In the case of sampled-data systems the controller is digital, and the only operations it can carry out are additions, multiplications, storage and shift. All the digital control algorithms have the same structure. Only “the memory” of the controller is different, that is the number of coefficients. Figure 2.25 illustrates the computation structure of the control u(t) applied to the plant at the instant t by the digital controller. This control is a weighted average of the measured output at instants t, t-1,...., t-nA .., of the previous control values at instants t-1, t-1…, t-nB… and of the reference signal at instants t, t-1,…, the weights being the coefficients of the controller.

Computer Control Systems

59

Analog PI u(t) K

r(t)

+

y(t) PLANT

+

-

K/T i

+

³

Figure 2.24. PI analog controller

Digital controller

r(t)

+

t0 -1

q

q q

s1

q q

-1

+ -

+ t

-2

s0

-

u(t)

y(t)

PLANT r0

1

r

-1

1

q

Figure 2.25. Digital controller

This type of control law can even be obtained by the discretization of a PI or PID analog controller. We shall consider, as an example, the discretization of a PI controller. The control law for an analog PI controller is given by u (t )

ª 1 º K «1  »[r (t )  y (t )] pT i¼ ¬

(2.5.1)

For the discretization of the PI controller, p (the differentiation operator) is approximated by (1  q 1 ) / Ts (see Section 2.3.1, Equation 2.3.6). This yields dx dt

px |

x(t )  x(t  1) Ts

1  q 1 x(t ) Ts

(2.5.2)

60

Digital Control Systems

³ xdt

ª T º 1 x | « s 1 » x(t ) p «¬1  q »¼

(2.5.3)

and the equation of the PI controller becomes K (1  q 1 )  u (t )

KTs Ti

1  q 1

(2.5.4)

[r (t )  y (t )]

Multiplying both sides of Equation 2.5.4 by (1 - q-1), the equation of the digital PI controller is written as S(q-1) u(t) = T(q-1) r(t) - R(q-1) y(t)

(2.5.5)

S(q-1) = 1 - q-1 = 1 + s1 q-1 (s1 = - 1)

(2.5.6)

R(q-1) = T(q-1) = K (1+Ts/Ti) -K q-1 = r0 + r1 q-1

(2.5.7)

where

which leads to the diagram represented in Figure 2.26. Digital PI q

r(t)

+

r0

q

-1

+

u(t)

-

y(t) PLANT

-

+ r

-1

q

r

0

1

r

1

q

-1

Figure 2.26. Digital PI controller

Taking into account the expression of S(q-1), the control signal u(t) is computed on the basis of Equation 2.5.5, by means of the formula u(t) = u(t-1) - R(q-1) y(t) + T(q-1) r(t) = u(t-1) - r0 y(t) - r1 y(t-1) + r0 r(t) + r1 r(t-1) which corresponds to the diagram given in Figure 2.26.

(2.5.8)

Computer Control Systems

61

2.5.2 Digital Controller Canonical Structure

Dividing by S(q-1) both sides of Equation 2.5.5, one obtains u (t )



R ( q 1 ) 1

S (q )

y (t ) 

T ( q 1 ) S (q 1 )

(2.5.9)

r (t )

from which we derive the digital controller canonical structure presented in Figure 2.27 (three branched RST structure). In general, T(q-1) in Figure 2.27 is different from R(q-1). r(t)

u(t)

+

1/S

T -

y(t)

B/A PLANT

R Figure 2.27. Digital controller canonical structure

Consider B ( z 1 )

H ( z 1 )

(2.5.10)

A( z 1 )

as the pulse transfer function of the cascade DAC + ZOH + continuous-time system + ADC, then the transfer function of the open loop system is written as H OL ( z 1 )

B ( z 1 ) R ( z 1 )

(2.5.11)

A( z 1 ) S ( z 1 )

and the closed loop transfer function between the reference signal r(t) and the output y(t), using a digital controller canonical structure, has the expression H CL ( z 1 )

B ( z 1 )T ( z 1 )

B( z 1 )T ( z 1 )

A( z 1 ) S ( z 1 )  B ( z 1 ) R( z 1 )

P ( z 1 )

(2.5.12)

where P ( z 1 )

A( z 1 ) S ( z 1 )  B ( z 1 ) R ( z 1 ) 1  p1 z 1  p 2 z 2  ... (2.5.13)

is the denominator of the closed loop transfer function that defines the closed loop system poles. Note that T(q-1) introduces one more degree of freedom, which

62

Digital Control Systems

allows one to establish a distinction between tracking and regulation performances specifications. We also remark that r(t) is often replaced by a “desired trajectory” y*(t), obtained either by filtering the reference signal r(t) with the so-called shaping filter or tracking reference model, or saving in the memory of the digital computer the sequence of the desired trajectory values. The digital controller represented in Figure 2.27 is also defined as “RST digital controller”. It is a two degrees of freedom controller, which allows one to impose different specifications in terms of desired dynamics for the tracking and regulation problems. The goal of the digital controller design is to find the polynomials R, S, and T in order to obtain the closed loop transfer functions, with respect to the reference and disturbance signals, satisfying the desired performances. This explains why the desired closed loop performances will be expressed, (if not, they will be converted) in terms of desired closed loop poles, and eventually in terms of desired zeros (in this way the closed loop transfer function will be completely imposed). In the presence of disturbances (see Figure 2.28) there are other four important transfer functions to consider, relating the disturbance to the output and the input of the plant. The transfer function between the disturbance p(t) and the output y(t) (output sensitivity function) is given by S yp ( z 1 )

A( z 1 ) S ( z 1 )

(2.5.14)

A( z 1 ) S ( z 1 )  B ( z 1 ) R ( z 1 )

r(t)

T

+ -

v(t) + 1/S +

(disturbance) p(t) u(t)

B/A PLANT

R

+

+

+

y(t)

+

b(t) (noise)

Figure 2.28. Digital control system in presence of disturbances and noise

This function allows the characterization of the system performances from the point of view of disturbances rejection. In addition, certain components of S(z-1) can be pre-specified in order to obtain satisfactory disturbance rejection properties. Thus, if a perfect disturbance rejection is required at a specified frequency, S(z1) must include a zero corresponding to this frequency. In particular, if a perfect load disturbance rejection in steady-state (i.e. zero frequency) is desired, Syp(z-1) must include a term (1 - z-1) in the numerator, which leads to a value of the gain

Computer Control Systems

63

equal to zero for z = 1. This is coherent with the result given in Section 2.4.3., because a zero of Syp(z-1) corresponds to a pole of the open loop system. The transfer function between the disturbance p(t) and the input of the plant u(t) (input sensitivity function) is given by S up ( z 1 )

 A( z 1 ) R( z 1 )

(2.5.15)

A( z 1 ) S ( z 1 )  B ( z 1 ) R( z 1 )

The analysis of this function allows one to evaluate the influence of a disturbance upon the plant input, and to specify a factor of the polynomial R(z-1) if the controller must not react to disturbances concentrated in a particular frequency region. When noise is added to the measured output (see Figure 2.28), important information can be retrieved by the transfer function that relates the noise b(t) to the plant output y(t) (noise-output sensitivity function). S yb ( z 1 )

 B( z 1 ) R ( z 1 )

(2.5.16)

A( z 1 ) S ( z 1 )  B ( z 1 ) R ( z 1 )

As the noise energy is often concentrated at high frequency, attention should be paid in order to obtain a low gain of the transfer function S yb (e  jZ ) in this frequency region. For T=R, the sensitivity function between r and y (also called complementary sensitivity function) is defined as S yr ( z 1 )

B( z 1 ) R( z 1 ) A( z 1 ) S ( z 1 )  B ( z 1 ) R( z 1 )

 S yb ( z 1 )

(2.5.17)

Note that S yp ( z 1 )  S yb ( z 1 )

S yp ( z 1 )  S yr ( z 1 ) 1

which implies an interdependence between these sensitivity functions. Notice that Sub (z-1), the transfer function between the noise and the plant input, is equal to Sup (z-1). Another important transfer function describes the influence on the output of a disturbance v(t) on the plant input. This sensitivity function (input disturbanceoutput sensitivity function) is given by S yv ( z 1 )

B ( z 1 ) S ( z 1 ) A( z 1 ) S ( z 1 )  B( z 1 ) R ( z 1 )

(2.5.18)

64

Digital Control Systems

The importance of this sensitivity function is that it enhances the possible simplification of unstable plant poles by the zeros of R(z-1). In order to clarify this point, let us consider the assumption R(z-1)=A(z-1) (plant poles compensation by controller zeros) and suppose that the plant to be controlled is unstable (A(z-1) has roots outside the unit circle). In this case S yp ( z 1 ) S up ( z 1 ) S yb ( z 1 ) S yv ( z 1 )

A( z 1 ) S ( z 1 )

S ( z 1 )

A( z 1 ) S ( z 1 )  B( z 1 ) A( z 1 ) S ( z 1 )  B( z 1 ) A( z 1 ) A( z 1 ) A( z 1 )   A( z 1 ) S ( z 1 )  B( z 1 ) A( z 1 ) S ( z 1 )  B( z 1 ) 1 1 B( z ) A( z ) B ( z 1 )   A( z 1 ) S ( z 1 )  B ( z 1 ) A( z 1 ) S ( z 1 )  B( z 1 ) B ( z 1 ) S ( z 1 ) B( z 1 ) S ( z 1 ) A( z 1 ) S ( z 1 )  B ( z 1 ) A( z 1 )

A( z 1 )[ S ( z 1 )  B ( z 1 )]

Note that Syp, Sup, Syb are stable transfer functions if S(z-1) is chosen in order to have S(z-1)+B(z-1) stable, that is S ( z 1 )  B ( z 1 )

0 Ÿ z 1

while the sensitivity function Syv(z-1) is unstable. This remark yields to the following general statement: The feedback system presented in Figure 2.28 is asymptotically stable if and only if all the four sensitivity functions Syp, Sup, Syb (or Syr) and Syv (describing the relations between disturbances on one hand and plant input or output on the other hand) are asymptotically stable. The set of five transfer functions HOL (z-1), Syp(z-1), Sup(z-1), Syb(z-1) (or Syr(z-1)) and Syv(z-1) also play an important role in the closed loop system robustness analysis. 2.5.3 Control System with PI Digital Controller

In this section the design of digital PI controllers will be illustrated. The transfer (function) operator of the discretized plant with zero-order hold is given by H (q 1 )

B ( z 1 )

B (q 1 )

b1q 1

A( z 1 )

A(q 1 )

1  a1q 1

(2.5.19)

For the sake of notation uniformity, we shall often use, in the case of constant coefficients, q-1 notation both for the delay operator and the complex variable z-1.

Computer Control Systems

65

The z-1 notation will be specially employed when an interpretation in the frequency jZT

domain is needed (in this case z e s ). The digital PI controller is characterized by the polynomials (see Equations 2.5.6 and 2.5.7): R(q-1) = T(q-1) = r0 + r1 q-1

(2.5.20)

S(q-1)

(2.5.21)

=1-

q-1

The closed loop system transfer function (with respect to the reference r(t)) in the general form is given by Equation 2.5.12. The characteristic polynomial P(q-1), whose roots are the desired closed loop system poles, essentially defines the performances. As a general rule, it is chosen as a second-order polynomial corresponding to the discretization of a second-order continuous-time system with a specified natural frequency Z0 and damping ] (Z0 and ], for example, and can be obtained on the basis of the diagrams given in Figures 1.10 or 1.11) starting from specifications in the time domain. The coefficients corresponding to the polynomial P(q-1) are obtained either by conversion tables mentioned in Table 2.4, or by Scilab and MATLAB® functions given in Section 2.3. In this case, sampling period Ts, natural frequency Z0 and damping ]must be specified. We recall that the relation between Z0 and Ts must be respected (see Section 2.2.2, Equation 2.2.7): 0.25 d Z0 Ts d 1.5 ; 0.7 d ] d 1

(2.5.22)

For a plant having an equivalent discrete-time transfer operator (function) given by Equation 2.5.19, and the use of a digital PI controller, the closed loop system poles are given by Equation 2.5.13, and they are (1 + a1 q-1) (1 - q-1) + b1 q-1(r0 + r1 q-1) = 1 + p1 q-1 + p2 q-2

(2.5.23)

By rearranging the terms in Equation 2.5.23 in ascending q-1 powers, we get 1 + (a1 - 1 + r0 b1) q-1 + (b1 r1 - a1) q-2 = 1 + p1 q-1 + p2 q-2

(2.5.24)

For the polynomial Equation 2.5.24 to be verified, it is necessary that the coefficients of the same q-1 powers must be equal on both sides. Thus the following system is obtained: ­a1  1  r0 b1 ® ¯b1 r1  a1

p1 p2

(2.5.25)

66

Digital Control Systems

which gives for r0 and r1 the results r1

p 2  a1 b1

;

p1  a1  1 b1

r0

(2.5.26)

One can see that the parameters of the controller depend upon the performance specifications (the desired closed loop poles) and the plant model parameters. By using Equation 2.5.7, one can obtain the parameters of the continuous-time PI controller: K

 r1

;

Ti



Ts r1 r1  r0

2.6 Analysis of the Closed Loop Sampled-Data Systems in the Frequency Domain 2.6.1 Closed Loop Systems Stability

In the case of continuous-time systems, it was shown in Chapter 1, Section 1.2.5, how to use the open loop transfer function representation in the complex plane (the Nyquist plot) in order to analyze the closed loop system stability and the robustness with respect to the parameters variations (or uncertainties on the parameters value). The same approach can be applied to the case of sampled-data systems. The Nyquist plot for sampled-data systems can be drawn using the functions Nyquist-ol.sci (Scilab) and Nyquist-ol.m (MATLAB®)6. Figure 2.29 shows the Nyquist plot of an open loop sampled-data system including a plant (represented by the corresponding transfer function H (z-1) =B(z-1) / A(z-1) ) and a RST controller. In this case, the open loop transfer function is given by H OL (e jZ )

B (e  jZ ) R (e jZ ) A(e jZ ) S (e jZ )

(2.6.1)

The vector linking the plane origin to a point belonging to the Nyquist plot of the transfer function represents HOL (e-jZ) for a specified normalized radian frequency Z = Z7s = 2 S f/fs. The considered range of variation of the radian natural

6

To be downloaded from the book website.

Computer Control Systems

67

frequency Z is between 0 and S (corresponding to an unnormalized frequency variation between 0 and 0.5 fs ). Im H Critical point -1

Z S

-1

S yp = 1 + H (e -jZ ) OL

Re H

H (e -j Z ) OL

Z  Figure 2.29. Nyquist plot for a sampled-data system transfer function and the critical point

In this diagram the point [-1, j0] is the “critical point”. As Figure 2.29 clearly shows, the vector linking the point [- 1, j0] to the Nyquist plot of HOL (e-jZ) has the expression 1 1 S yp ( z ) 1  H OL ( z 1 )

A( z 1 ) S ( z 1 )  B( z 1 ) R( z 1 ) A( z 1 ) S ( z 1 )

(2.6.2)

This vector represents the inverse of the output sensitivity function Syp (z-1) (see Equation 2.5.14) and the zeros of S-1yp (z-1) correspond to the closed loop system poles (see Equation 2.5.13). In order to have an asymptotically stable closed loop system, it is necessary that all the zeros of S-1yp (z-1) (that are the poles of Syp (z-1)) be inside the unit circle ( |z| < 1). The necessary and sufficient conditions for the asymptotic stability of the closed loop system are given by the Nyquist criterion. For systems having stable poles in open loop (in this case A(z-1) = 0 and S(z-1) = 0 o  |z| d 1) the Nyquist stability criterion states (stable open loop system): The Nyquist plot of HOL(z-1) traversed in the sense of growing frequencies (from Z 0 to Z S), leaves the critical point [-1, j0] on the left. As a general rule, for the given nominal plant model B(z-1)/A(z-1), polynomials R(q-1) and S(q-1) are computed in order to have A(z-1) S(z-1) + B(z-1) R(z-1) = P(z-1)

(2.6.3)

where P(z-1) is a polynomial with asymptotically stable roots. As a consequence, for the nominal values of A(z-1) and B(z-1), since the closed loop system is stable, the open loop transfer function:

68

Digital Control Systems

H OL ( z 1 )

B ( z 1 ) R ( z 1 ) A( z 1 ) S ( z 1 )

does not encircle the critical point (if A(z-1) and S(z-1) have their roots inside the unit circle). In the case of an unstable open loop system, either if A(z-1) has some pole outside the unit circle (unstable plant), or if the computed controller is unstable in open loop (S(z-1) has some pole outside the unit circle), the stability criterion is: The Nyquist plot of HOL(z-1) traversed in the sense of growing frequencies (from Z 0 to Z S), leaves the critical point [-1, j0] on the left and the number of counter clockwise encirclements of the critical point should be equal to the number of unstable poles of the open loop system7. Note that the Nyquist locus between 0.5 fs and fs is the symmetric of the Nyquist locus between 0 and 0.5 fs with respect to the real axis. The general Nyquist criterion formula that gives the number of encirclements around the critical point is N

where

i i PCL  POL

i is the number of PCLi is the number of closed loop unstable poles and POL

open loop unstable poles. Positive values of N correspond to clockwise encirclements around the critical point. In order that the closed loop system be i asymptotically stable it is necessary that N  POL . Figure 2.30 shows two interesting Nyquist loci. If the plant is stable in open loop and the controller is computed on the basis of Equation 2.6.3 to obtain a desired stable closed loop polynomial P(z-1) (this means that the nominal closed loop system is stable too), then, if a Nyquist plot of the form of Figure 2.30a is obtained, one concludes that the controller is unstable in open loop. This situation must be generally avoided8, and this can be achieved by reducing the desired closed loop dynamic performances (by modifying P(z-1)).

7

The criterion holds even if an unstable pole-zero cancellation occurs. The number of encirclements should be equal to the number of unstable poles without taking into account the possible cancellations. 8 Note that there exist some « pathological » transfer functions B(z-1)/A(z-1) with unstable poles and/or zeros that can be only stabilized by controllers that are unstable in open loop.

Computer Control Systems

Im H

Z S

1 Open Loop unstable pole Stable Closed Loop (a)

Z S

-1

69

Re H

Stable Open Loop Unstable Closed Loop (b)

Z S Z 

Z 

Figure 2.30. Nyquist plots: a) unstable system in open loop but stable in closed loop; b) stable system in open loop but unstable in closed loop

2.6.2 Closed Loop System Robustness

When designing a control system, one has to take into account the plant model uncertainties (uncertainties of the parameter values or of the frequency characteristics, variations of the parameters, etc.). It is therefore extremely important to assess if the stability of the closed loop is guaranteed in the presence of the plant model uncertainties. The closed loop will be termed “robust” if the stability is guaranteed for a given set of model uncertainties. The robustness of the closed loop is related to the minimal distance between the Nyquist plot for the nominal plant model and the “critical point” as well as to the frequency characteristics of the modulus of the sensitivity functions. The following elements help to evaluate how far is the critical point [-1, j0] (see Figure 2.31): x x x x

Gain margin; Phase margin; Delay margin; Modulus margin.

Gain Margin The gain margin ('G) equals the inverse of H OL (e  jZ ) gain for the frequency corresponding to a phase shift ‘I = -180° (see Figure 2.31). The gain margin is often expressed in dB. In other words, the gain margin gives the maximum admissible increase of the open loop gain for the frequency corresponding to ‘I Z = - 180°. 'G

for ‘I (Z180 )

1 H OL (e

 jZ180

)

180 $

70

Digital Control Systems Im H

-1

 'G 

'0

Re H

') |HOL|=1

Crossover frequency ZCR

Figure 2.31. Gain, phase and modulus margins

Typical values for a good gain margin are 

'G t 2 (6 dB) [min: 1.6 (4 dB)]

If the Nyquist plot crosses the real axis at several frequencies ZiS characterized by a phase lag

‘I ZiS = - i 180°;

i = 1, 3, 5 ...

and the corresponding gains of the open loop system are denoted by H OL (e  jZiS ) , then the gain margin is defined by9 'G

min i

1 H OL (e  jZiS )

Phase Margin The phase margin ('I) is the additional phase that we must add at the crossover frequency, for which the gain of the open-loop system equals 1, in order to obtain a total phase shift ‘I = - 180° (see Figure 2.31).

'I

180 0  ‘I (Zcr )

for H OL (e  jZ cr )

1

in which Zcr is called crossover frequency and it corresponds to the frequency for which the Nyquist plot crosses the unit circle (see Figure 2.31). 9 Note that if the Nyquist plot crosses the real axis for values less than –1 and leaves the critical point to the left, there is a minimal value of the gain margin under which the system becomes unstable.

Computer Control Systems

71

Typical values for a good phase margin are 30° d 'I d 60° i If the Nyquist plot crosses the unit circle at several frequencies Z cr characterized by the corresponding phase margins: i ' I i 1800  ‘I (Z cr )

then the system phase margin is defined as 'I

min ' I i i

Delay Margin A time-delay introduces a phase shift proportional to the frequency Z. For a certain frequency Z0, the phase shift introduced by a time-delay Wis ‘I (Z 0 )

Z 0W

We can therefore convert the phase margin in a “time-delay margin”, i.e. to compute the maximum admissible increase of the delay of the open-loop system without making the closed-loop system unstable. It then follows that: 'W

'I Z cr

i If the Nyquist plot intersects the unit circle at several frequencies Z cr , characterized by the corresponding phase margins 'Ii, the delay margin is defined as

'W

min i

'Ii

Z icr

Note that a good phase margin does not guarantee a good delay margin (if the frequency Z cr is high, then the delay margin is low even if the phase margin is important). The typical value of the delay margin is 'W t TS [min: 0.75TS]

Modulus Margin This concerns a more global measure of the distance between the critical point [-1, j0] and the plot of HOL (z-1). The modulus margin ('M) is defined as the radius

72

Digital Control Systems

of the circle centered in [-1, j0] and tangent to the plot of HOL (z-1) (see Figure 2.31). From the definition of Equation 2.6.2 of the vector connecting the critical point [-1, j0] to the plot of H OL (e  jZ ) it follows immediately that 'M

1  H OL ( z 1 )

min

1 S yp ( z 1 )

§ A( z 1 ) S ( z 1 ) ¨ ¨ A( z 1 ) S ( z 1 )  B ( z 1 ) R( z 1 ) ©

§¨ S ( z 1 ) ·¸ max ¹ © yp

min

· ¸ ¸ max ¹

1

(2.6.4)

1

for z

1

e

 j 2Sf

In other words, the modulus margin 'M is equal to the inverse of the maximum value of the sensitivity function Syp (z-1) magnitude. By plotting Syp (z-1) magnitude in dB scale, the following condition is immediately derived: S yp (e  jZ )

max

dB

'M 1 dB

'M dB

(2.6.5)

Figure 2.32 shows the relation between the sensitivity function Syp and the modulus margin. dB

-1

S yp S yp

= - 'M

max

0 Z

S S yp

-1 yp

= - S yp

min

= 'M

max

Figure 2.32. Relation between the output sensitivity function and the modulus margin

Therefore, the reduction (or the minimization) of |Syp (jZ)|max will lead to an increase (or maximization) of the modulus margin10. Typical values for a good modulus margin are 

10

' M t 0.5 (- 6 dB) [min: 0.4 (-8 dB)]

|Syp (jZ)|max corresponds to the H f norm of the output sensitivity function.

Computer Control Systems

73

Note that 'M t 0.5 implies a gain margin 'G t 2 (6 dB) and a phase margin 'I > 29°. As a general rule, a good modulus margin guarantees satisfactory values for the gain and phase margins11. To summarize, typical values for the stability margins in a robust design are: x x x x

gain margin: 'G t 2 (6dB) phase margin: 30° d 'I d 60° 'I t Ts delay margin: 'W =

[min.: 1.6 (4dB)] [min.: 0.75 Ts]

Z cr modulus margin: 'M t 0.5 (-6dB),

[min.: 0.4 (-8dB)]

If the plant model is known with a very good precision for a certain region of operation, the imposed robustness margins can eventually be less restrictive. The modulus margin is very important because: x It defines the maximum admissible value for the modulus of the output sensitivity function and therefore the low limits of the performance in disturbance rejection; x It defines the tolerance with respect to nonlinear or time varying elements that may belong to the system (the circle criterion - see below). Tolerance with Respect to Nonlinear Elements In control systems we frequently have components with static nonlinear or timevarying characteristics (often in the actuators). The characteristics of these components, without being accurately known, generally lie inside the conic region defined by a minimum linear gain (D) and a maximum linear gain (E) – see Figure 2.33. y

y =Eu

u

NL TVP

y = f(u) y =Du

y

u

Figure 2.33. Nonlinear or time-varying characteristics, contained in the conic domain (DE)

The closed-loop system looks, for example, like those in Figure 2.34a.

11

The converse is not true. Systems having satisfactory gain and phase margins may have a very low modulus margin.

74

Digital Control Systems

+

H 1( z-1 )

H (z-1) 2

-

NL Block and / or TVP

a)

-1

-1

H (s) = H (z ). H (z ) 2 1

b)

-

. Figure 2.34. Closed-loop systems containing a nonlinear block (NL) and / or time-varying parameters (TVP): a) block diagram b) equivalent representation

Im H ( e -j Z )

Critical circle

- 1 D

-1

-1 E

Re H ( e -j Z )

'M

H ( e -j Z )

Figure 2.35. Circle stability criterion and modulus margin for discrete time systems

From the stability analysis point of view, we may use an equivalent representation of such systems, given in Figure 2.34b, where H OL ( z 1 ) H1 ( z 1 ) H 2 ( z 1 ) . For this kind of system we have a generalization of the Nyquist criterion, known as “the circle criterion” (Popov-Zames).

Circle (Stability) Criterion The feedback system represented in Figure 2.34b is asymptotically stable for the set of nonlinear and/or time-varying characteristics lying in the conic domain [DE] (with DE! if the plot of H OL ( z 1 ) , traversed in the sense of growing frequencies, leaves on the left, without crossing it, the circle centered on the real axis and passes through the points [1 / E , j 0] and [1 / D , j 0] .

Computer Control Systems

75

The modulus margin 'M defines a circle of radius 'M centered in [-1, j0] that is outside the Nyquist plot of the open loop transfer function. Thus, the closed loop system can tolerate non-linear blocks or time-variable parameters described by input-output characteristics lying in a conic sector delimited by a minimum linear gain (1/(1+'M)) and a maximum linear gain (1/(1'M)) (see Figure 2.35).

Tolerances to Plant Transfer Function Uncertainties and/or Parameters Variations. Figure 2.36 shows the effect of the plant nominal model uncertainties and parameters variations on the Nyquist plot of the open loop transfer function. As a general rule, the Nyquist plot of the plant nominal model lies inside a “tube” corresponding to the accepted tolerances of the parameters variations (or the uncertainties) of the plant model transfer function. In order to ensure the stability of the closed loop system for an open loop transfer function H'OL(z-1) that is different from the nominal one HOL(z-1) (but having the same number of unstable poles as HOL (z-1)), it is necessary that the Nyquist plot of the open loop transfer function H'OL (z-1) leaves the critical point [1j0] on the left when traversed in the sense of growing frequencies from 0 to 0.5 fs. This condition is satisfied if the difference between the real open loop transfer function H'OL (z-1) and the nominal one HOL (z-1) is smaller than the distance between the Nyquist plot of the open loop nominal transfer function and the critical point for all frequencies (see Figure 2.36). This robust stability condition is expressed by the inequality c ( z 1 )  H OL ( z 1 )  1  H OL ( z 1 ) H OL

1 1 S yp (z )

A( z 1 ) S ( z 1 )  B( z 1 ) R( z 1 )

P( z 1 )

A( z 1 ) S ( z 1 )

A( z 1 ) S ( z 1 )

; z 1

e  jZ

(2.6.6)

Im H -1 1 + H OL ' H OL

Re H H OL

Figure 2.36. Nyquist plot for the nominal open loop transfer function and the real open loop transfer function in presence of uncertainties and parameters variations (HOL and H’OL are stable)

76

Digital Control Systems

where S(z-1) and R(z-1) are computed on the basis of Equation 2.6.3 for the nominal values of A(z-1) and B(z-1). In other words, the magnitude of S-1yp (e-jZ function (evaluated in dB units), obtained by symmetry from Syp (e-jZ (see Figure 2.32)gives, at each frequency, a sufficient condition for the accepted difference (computed as the Euclidian distance) between the real open loop transfer function and the nominal open loop transfer function, in order to guarantee the stability of the closed loop. This tolerance is higher at low frequencies (see Figure 2.32) where the gain of the open loop system is high (especially when an integrator is included), and it has a minimum value at the frequency (or frequencies) where S-1yp (e-jZ reaches its minimum (= 'M), that is the frequency where Syp (e-jZ has the maximum value. It is necessary to ensure that at these frequencies the plant model variations are compatible with the obtained modulus margin. If this is not the case, the solution is to provide a more accurate model, or to modify the specifications in order to maintain the closed loop stability. Equation 2.6.6 expresses a robustness condition in terms of open loop transfer function variations (controller + plant). It is interesting to express this robustness condition in terms of the plant model variations only. Note that Equation 2.6.6 can be further expressed as B c( z 1 ) R ( z 1 ) B ( z 1 ) R ( z 1 )  Ac( z 1 ) S ( z 1 ) A( z 1 ) S ( z 1 ) 

R ( z 1 ) S ( z 1 )

˜

B c( z 1 ) B ( z 1 )  Ac( z 1 ) A( z 1 )

A( z 1 ) S ( z 1 )  B ( z 1 ) R ( z 1 )

(2.6.7)

A( z 1 ) S ( z 1 )

where B(z-1)/A(z-1) corresponds to the nominal plant transfer function. Multiplying by |S(z-1)/R(z-1)| both sides of Equation 2.6.7 one gets the condition B c( z 1 ) B( z 1 ) A( z 1 ) S ( z 1 )  B( z 1 ) R( z 1 )   1 1 Ac( z ) A( z ) A( z 1 ) R( z 1 ) P( z 1 ) A( z 1 ) R( z 1 )

(2.6.8)

1 1 S up (z )

By plotting the inverse of the input sensitivity function magnitude, sufficient conditions for tolerated (additive) variations (or uncertainties) of the plant transfer function are obtained. The inverse of the magnitude of the input sensitivity function is symmetric to the input sensitivity function magnitude in dB units with respect to the axis at 0 dB (see Figure 2.37). As plant model uncertainties at high frequencies are often present, one must verify that the maximum of |Sup (e-jZ | at high frequencies is small. On the other

Computer Control Systems

77

hand, the input sensitivity function Sup is an effective image of the actuator stress in the frequency domain when disturbances act on the system. The physical characteristics of the actuator often impose a bound on actuator stress at high frequencies, and an upper bound of the maximum of |Sup (e-jZ | at these frequencies should be imposed. Notice that (from Equation 2.6.8) the admitted tolerances (neglecting the term 1/|R(z-1)|) depend to a large extent upon the relation between the open loop system poles (defined by A(z-1)) and the desired closed loop poles (defined by P(z-1)). In order to understand this phenomenon in greater detail, Figure 2.38 shows the Sup(z-1) magnitude functions for a plant model characterized by A(z-1)= 1 – 0.8 z-1; B(z-1)= z-1 and for two different desired closed loop system characteristic polynomials: P1(z-1)=1-0.6 z-1 and P2(z-1)=1-0.3 z-1 (the controller includes an integrator). Note that P2(z-1) corresponds to a closed loop system faster than the one specified by P1(z-1), and both closed loop systems are faster than the plant (open loop system). The |Sup(z-1)| maximum for P2(z-1) is greater than for P1(z-1), and then the inverse of |Sup(z-1)| will be smaller. As a consequence, the accepted tolerances for the frequency response variations (especially at high frequencies) are smaller in the case of P2(z-1) with respect to the case of desired closed loop performances imposed by P1(z-1). |Sup| dB

Bounds on the actuator requirements

0

0.5fs

|Sup|-1 (Tolerance to additive uncertainties)

Figure 2.37. The input sensitivity function and its inverse

78

Digital Control Systems

Input Sensitivity Function

15

10

Magnitude (dB)

5

0

-5 P1 = 1 - 0.6z -1 P2 = 1 - 0.3z -1

-10

-15

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Frequency (f/fs)

Figure 2.38. Input sensitivity function for the plant model q-1 /(1 – 0.8 q-1) as a function of the desired closed loop performances

Equation 2.6.8 gives a sufficient condition for the accepted (additive) tolerance in terms of real plant transfer function parameters variations (or uncertainties) with respect to the nominal plant transfer function. Moreover, we may be interested in the evaluation of the accepted relative tolerance with respect to the nominal plant transfer function magnitude. It follows from Equation 2.6.8 that B c( z 1 ) Ac( z 1 )



B( z 1 ) A( z 1 )

B( z 1 )



A( z 1 ) S ( z 1 )  B ( z 1 ) R ( z 1 ) B ( z 1 ) R ( z 1 )

A( z 1 ) P ( z 1 ) B( z 1 ) R( z 1 )

1 1 S yb (z )

(2.6.9)

1 1 S yr (z )

where Syb is the “noise-output sensitivity function” and Syr is the complementary sensitivity function. The noise-output sensitivity function Syb allows the definition of a frequency “template” to ensure that the “delay margin” constraint is fulfilled. Let consider the case of a delay margin 'W 1˜ Ts . It follows that

Computer Control Systems

H ( z 1 )

z  d B ( z 1 )

H c( z 1 )

;

1

A( z )

z  d 1 B( z 1 )

79

(2.6.10)

A( z 1 )

and consequently H c( z 1 )  H ( z 1 ) 1

H (z )

z 1  1

(2.6.11)

Equation 2.6.9 becomes S yb ( z 1 ) 

1

z

1

1

;

z

e jZ

(2.6.12)

0dZ dS

or in dB units 1 1 S yb ( z ) dB  20 log 1  z 1

;

e jZ

z

(2.6.13)

0dZ dS

Noise-output Sensitivity Function Template

0

-1

-2

Magnitude (dB)

Template for Delay margin ' W = Ts -3

-4

-5

-6

-7

-8

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Frequency (f/fs)

Figure 2.39. Frequency template for the noise-output sensitivity function and

'W

TS

80

Digital Control Systems

This expression defines a frequency robustness template for the sensitivity function Syb. This template corresponds to the frequency response of a digital integrator and is represented in Figure 2.39. As the modulus margin introduces a frequency template on the output sensitivity function ( S yp (e  jZ ) d  'M ; 0 d Z d S ), we are interested in finding what template is introduced by the delay margin on | Syp|. From Equations 2.5.14 and 2.5.17 it results that S yp ( z 1 ) 1  S yb ( z 1 )

(2.6.14)

and by means of the triangle inequality it follows that 1  S yb ( z 1 ) d S yp ( z 1 ) d 1  S yb ( z 1 )

(2.6.15)

Taking into account the frequency bound on Syb given by Equation 2.6.12, the following condition is obtained : 1  1  z 1

1

d S yp ( z 1 ) d 1  1  z 1

1

(2.6.16)

Output Sensitivity Function Template

10

Modulus margin = 0.5 Delay margin = Ts

5

Magnitude (dB)

0

-5

-10

Delay margin = Ts -15

-20

Modulus margin template Delay margin = Ts template Output Sensitivity function

-25

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Frequency (f/fs)

Figure 2.40. Frequency template on the output sensitivity function for 'M and 'W TS

0.5 (-6dB)

Computer Control Systems

81

that leads to the robustness template on |Syp| represented in Figure 2.40. Notice that, from the point corresponding to 0.17 fs , |Syp| must lie inside a region delimited by an upper and a lower bound and that, for frequencies below 0.17 fs, the frequency template for the modulus margin also assures the delay margin constraint to be respected. It is important to note that the template on Syp will not always guarantee the desired delay margin (it is an approximation). If the condition on |Syb| is satisfied, then the condition on |Syp| will also be satisfied. However, if the condition on |Syb| is violated, this will not imply necessarily that the condition on |Syp| will also be violated. In practice, the results obtained by using the template on the |Syp| are very reliable. The following remark is important: the closed loop system robustness will be, in general, reduced when the closed loop system bandwidth is increased with respect to the open loop system bandwidth. Conversely, for a relevant reduction of the rise time for the closed loop system, with respect to the open loop system rise time, a good estimation of the plant model is required (especially in the frequency regions where |Syp(z-1)| is high). As a consequence, robustness constraints can imply either a small reduction of the closed loop system rise time (with respect to the open loop system rise time), or a controller design which takes into account the bounds on the sensitivity functions. An important challenge in control system design is the maximization of the controller robustness for given performances. This is obtained by minimizing the sensitivity functions maximum in the critical frequency regions.

2.7 Concluding Remarks Recursive (differences) equations of the form nA

y (t )



¦ i 1

nB

ai y (t  i ) 

¦ b u (t  d  i) i

(2.7.1)

i 1

where u is the input, y is the output and d is the discrete-time delay, are used to describe discrete-time dynamic models. The delay operator q-1 [q-1 y(t) = y(t-1)] is a simple tool to handle recursive equations. If the operator q-1 is used, the recursive Equation 2.7.1 takes the form A(q 1 ) y (t )

q  d B(q 1 )u (t )

82

Digital Control Systems

where A(q 1 ) 1 

nA

¦

a i q i

i 1

B (q 1 ) 1 

nB

¦b q i

i

i 1

The input-output relation for a discrete-time model is also conveniently described by the pulse transfer operator H(q-1):

y (t )

H (q 1 )u (t )

where H (q 1 )

q  d B ( q 1 ) A(q 1 )

The pulse transfer function of a discrete-time linear system is expressed as function sT of the complex variable z e s (Ts = sampling period). The pulse transfer function can be derived from the pulse transfer operator H(q-1) by replacing q-1 with z-1. The asymptotical stability of a discrete-time model is ensured if, and only if, all pulse transfer function poles (in z) lie inside the unit circle. The order of a pulse transfer function is n = max (nA, nB + d) In computer controlled systems, the input signal applied to the plant is held constant between two sampling instants by means of a zero-order hold (ZOH). The zero-order hold is characterized by the following transfer function: H ZOH ( s )

1  e  sTs s

Therefore, the continuous-time part of the system (between digital-to-analog converter and the analog-to-digital converter) is characterized by the continuoustime transfer function H' (s) = HZOH (s) . H(s) where H(s) is the plant transfer function. In computer controlled systems, the input signal applied to the plant at time t is a weighted average of the plant output at times t, t-1, ..., t-nA+1, of the previous input signal values at instants t-1, t-2, ..., t-nB-d, and of the reference signal at

Computer Control Systems

83

instants t, t-1,…, the weights being the coefficients of the controller. The corresponding control law (controller RST) is written as S(q-1) u(t) = - R(q-1) y(t) + T(q-1) r(t)

(2.7.2)

where u(t) is the control (input) signal to the plant, y(t) is the plant output and r(t) is the reference. The transfer function of the closed loop system (between the reference signal and the plant output) that includes the digital controller of Equation 2.7.2 is given by

H CL ( z 1 )

B( z 1 )T ( z 1 ) A( z 1 ) S ( z 1 )  B( z 1 ) R( z 1 )

where H(z-1) = B(z-1)/A(z-1) is the pulse transfer function of the discretized plant (in this case B(z-1) may include possible delays). The characteristic polynomial defining the closed loop system poles is given by P(z-1) = A(z-1) S(z-1) + B(z-1) R(z-1) The disturbance rejection properties on the output result from the output sensitivity function frequency response S yp ( z 1 )

A( z 1 ) S ( z 1 ) 1

A( z ) S ( z 1 )  B ( z 1 ) R( z 1 )

Robust stability of the closed loop system, with respect to the plant transfer function uncertainties or parameters variations, is essentially characterized by the modulus margin and the delay margin. The modulus margin and the delay margin introduce frequency constraints on the magnitude of the sensitivity functions. These constraints lead to the definition of frequency robustness templates that must be respected. The robust stability (or performance) of the closed loop system robustness, with respect to the plant transfer function uncertainties or parameters variations, depends upon the choice of the desired closed loop system performances (bandwidth, rise time) with respect to the open loop system dynamics. A significant reduction of the closed loop system rise time (or a significant augmentation of the bandwidth of the closed loop system), compared to the open loop system rise time (or bandwidth), requires a good estimation of the plant model. In order to ensure closed loop system robustness, when a good estimation of the plant model is not available, or when large system parameters variations occur, the closed loop system rise time acceleration, compared to the open loop system rise time, must be moderate. However, some methods exist for maximizing the

84

Digital Control Systems

controller robustness with respect to plant model uncertainties (or parameters variations), for given nominal performance.

2.8 Notes and References Some basic books on computer control system are: Kuo B. (1980) Digital Control Systems, Holt Saunders, Tokyo. Åström K.J., Wittenmark B. (1997) Computer Controlled Systems - Theory and Design, 3rd edition, Prentice-Hall, Englewood Cliffs, N.J. Ogata K. (1987) Discrete-Time Control Systems, Prentice Hall, N.J. Franklin G.F., Powell J.D., Workman M.L. (1998) Digital Control of Dynamic Systems , 3rd edition, Addison Wesley, Reading, Mass. Wirk G.S. (1991) Digital Computer Systems, MacMillan, London. Phillips, C.L., Nagle, H.T. (1995) Digital Control Systems Analysis and Design, 3rd edition, Prenctice Hall, N.J. For an introduction to robust control theory see: Doyle J.C., Francis B.A., Tanenbaum A.R. (1992) Feedback Control Theory, Mac Millan, N.Y. Kwakernaak H. (1993) Robust control and Hinf optimization – a tutorial Automatica, vol.29, pp.255-273. Morari M., Zafiriou E. (1989) Robust Process Control, Prentice Hall International, Englewood Cliffs, N.J. The delay margin was introduced by: Anderson B.D.O, Moore J.B. (1971) Linear Optimal Control, Prentice Hall, Englewood Cliffs, N.J. For a detailed discussion on the delay margin: Bourlès H., Irving E. (1991) La méthode LQG/LTR: une interprétation polynomiale, temps continu / temps discret, RAIRO-APII, Vol. 25, pp. 545568. Landau I.D. (1995) Robust digital control systems with time delay (the Smith predictor revisited), Int. J. of Control, Vol. 62, no. 2, pp. 325-347. The circle criterion is presented in: Zames G. (1966) On the input-output stability of time-varying nonlinear feedback systems, IEEE-TAC, vol. AC-11, April, pp. 228-238, July pp. 445-476. Narendra K.S., Taylor J.H. (1973) Frequency Domain Criteria for Absolute Stability, Academic Press, New York. For a generalization of the concepts of robustness margins and robust stability introduced in this chapter, see Appendix D.

http://www.springer.com/978-1-84628-055-9