Digital controller design — Alternative emulation approaches

Digital controller design — Alternative emulation approaches

ISA TRANSACTIONS" ELSEVIER ISA Transactions 34 (1995) 219-228 Digital controller design - Alternative emulation approaches D o n a l d A . P i e r r...

690KB Sizes 1 Downloads 74 Views

ISA TRANSACTIONS" ELSEVIER

ISA Transactions 34 (1995) 219-228

Digital controller design - Alternative emulation approaches D o n a l d A . P i e r r e a,., J o h n W . P i e r r e b " Electrical Engineering Department, Montana State University, Bozeman, MT 59717, USA b Electrical Engineering Department, University of Wyoming, Laramie, WY 8207l. USA

Abstract

The emulation approach to digital controller design involves two steps: (1) the design of a continuous controller Io satisfy performance and robustness objectives, and (2) the conversion of the continuous controller into a digital controller with the objective of obtaining comparable closed-loop system properties. This paper addresses the second step of lhe emulation approach. Previously developed methods are discussed, and several new methods are shown to be effective in accounting for computational delay and for sample-and-hold delay in closed-loop control applications. When the step response of the digitally controlled system is required to be close to that of the corresponding continuous system, the selection of the sampling period T and the emulation performance arc relalcd in a fundamental way. This is illustrated in a closed-loop example. Keywon&: Digital control; Emulation; Time-delay; Computer process control

1. Introduction

When emulation is used in digital controller design, a continuous system controller is designed initially to satisfy closed-loop control specifications, and then the continuous system controller is approximated in some suitable way by a digital controller for actual implementation. There are a number of reasons why this approach is favored in some process control applications, even when good direct digital controller design methods are available. Design tools that are available in the continuous domain are numerous and intuitively more familiar to many process engineers. Design

* Corresponding author. Tel.: 406 994 5989, Fax: 4116994 5958. E-mail:don p6bee.montana.edu.

in the continuous domain followed by emulation separates the problems of basic controller design from that of sampling period selection. And existing continuously controlled plants are often retrofit with more modern digital controllers. A basic configuration is that of Fig. 1 in which Go(s) is the Laplace transform transfer function of the plant to be controlled, and G~(s) is the transfer function of the continuous system controller. The digital controller that replaces the continuous controller acts on the plant through a D / A converter with periodic sampled-and-held control actions; the sampling period is denoted by T, and the most common form of hold circuit employed is the zero-order-hold characterized by transfer function (1 - e - ~ r ) / s . Fig. 2 depicts the resulting digital control system in which G ~ , ( z ) is the z-transform transfer function of the digital

01119-0578/95/$1)9.511 O 1995 Elsevier Science B.V. All rights reserved SSDI (1019-0578(95)0001 8-6

220

D.A. Pierr< .L kE Pierre/ISA 7)ansactions 34 (1995) 219-228

R(s)

[

-F

r

t

Y(s)

G (s)

i

Fig. 1. Typical Gc(s)Gp(s) = O.

loop

with

characteristic

equation

1+

controller, and Ghp(z) is that of the p l a n t / h o l d combination, where computational delay is modeled as part o f Ghp(Z). At low frequencies, it is well known that the zero-order hold of Fig. 2 introduces a signal delay of approximately T/2. Many emulation approaches were originally developed for open-loop filtering applications, in which case small time delays often are inconsequential. In closed-loop applications, however, emulation results usually are improved if time delays are taken into account. Emulation approaches that have been proposed (see, for example, [1-4]) include (1) the Tustin approximation, (2) pole-zero mapping from the s plane to the z plane, (3) step and impulse invariant approximations, (4) various hold circuits in series with G~(s), and (5) approximations based on minimization of weighted squared errors. Of course, all solutions to the emulation problem are approximate solutions because of sampling and the Nyquist rate limitation. Depending on the sampling period T and on the characteristics of Gp(s) and G~(s) a given approach may or may not be appropriate. Rattan [5,6] uses a computer optimization code

.....

+S)~ -~

_"r

n/

'

-

,'-

e-S~T(1-e-ST)Gp(S) i- I _

;l i

............................

I

Fig. 2. Digital control implementation with characteristic equation 1 + Gc,,(Z)Ghp(Z) = 0.

to minimize a weighted frequency domain error, accounting for computational delay of the digital controller in addition to the delay of the zeroorder hold. Computational delay can be reduced to a great extent by arranging the control calculations so that only one multiplication and one addition need to be performed after the current input is received to produce the current output; the remainder of the difference equation or state-space calculations in the suitably formulated controller can be performed after the current output is assigned, but before the end of the current sample period. Kennedy and Evans [7] account for the plant in performing controller emulation by equating (with some modifications to account for nonminimum phase terms) a zero-order hold discretization of the original closed-loop transfer function to the z-transform transfer function of the digitally controlled system. The success of the approach is dependent to some extent upon the designer's choice of which poles and zeros to keep. However, the method is straightforward and provides a good basis for further development. Keller and Anderson [8] and Anderson [9] pose the emulation problem as a minimization problem that involves the difference between the output of the original continuous closed-loop system and the output of the digitally controlled system. The resulting mixed continuous discrete problem is replaced by a multirate problem of arbitrarily high accuracy, which is then reconverted to a single rate problem that can be solved as a conventional discrete time /4= problem. In this paper, the Go(s) to be emulated is assumed to be a ratio of polynomials in s with the numerator polynomial being of order no greater than that of the denominator (i.e., Gc(s) is a proper rational fraction). Several methods are developed, and some of them are limited to cases where Gc(s) is strictly proper. The methods account for the zero-order-hold delay and for computational delay. These methods are relatively straightforward to apply and are restricted to keep the order of Gc~(Z) close to that of Go(s). Because the methods do not require the application of optimization techniques, they provide

D.A. Pierre, J. I,V. Pierre/ISA Transactions 34 (1995) 219-228

quick results that may be compared with results obtainable by optimization based methods such as those noted in the preceding paragraphs. In the following section, a design objective is presented. An emulation method based on a bilinear transformation to account for delay is developed in Section 3. The use of a one-step-ahead zero-order-hold combination with G~(s) is described in Section 4. In Section 5, extrapolation and low-order filter methods are combined with discrete trapezoidal-hold approximations of G~(s) to form the corresponding G~,,(z). A low-pass G~(s) example is used in Section 6 to compare the methods of the previous sections. When G~(s) is not strictly proper, additional factors must be considered in selecting an appropriate G~a(z), and these are discussed in Section 7. A new method of Section 7 is shown to be particularly useful in the example of Section 8. In many applications, the response of the digitally controlled system should be close to that of the corresponding continuous system even when abrupt changes occur in the reference input. Abrupt changes (e.g. step changes) in the reference input can occur at points in time other than the sample points; the response of the digitally controlled system to a step input can vary by as much as T seconds with incrementally small changes in the timing of the step input. Thus, the selection of T and emulation performance are related in a fundamental way. This is illustrated in the closed-loop example of Section 8. Conclusions are presented in Section 9.

putational delay aT included in the loop, a reasonable approximation for low frequencies is G hp( z )[ ~= ~,or = e-J"(°5 + a)rGp (joo), 0
G~,( z)l~=¢r = e"(°5 +a)TG~(s).

3. Approximation using the bilinear transformation

We are tions for based on expansion

interested in low frequency approxima-

e"{°'5+a)rGc(S). The most direct one, the first two terms of a Taylor series of e s(°s+a)r, is

&(°s+a)rGc(S) -- [1 + s(0.5

+6)T]Gc(s).

(4)

When the bilinear transformation s = ( 2 / T ) ( z 1)/(z + 1), i.e. the Tustin approximation, is applied to the right-hand side of (4), the result is a trapezoidal approximation and is denoted by Gca(Z): 1+

(1+26)(z-1)1 z+l

(2(l+a)z-26) z+l

In comparing Fig. 2 with Fig. 1, a goal is to select Gc,(Z) so that

0 ~
(3)

It should be noted that this goal is appropriate when the main objective is to make the digitally controlled output response, including time-delay effects, very close to the output y(t) of the corresponding continuous system. In many cases this is achieved at the expense of additional control effort.

Gca(Z)=

G ~ ( z ) C,p( z ) I~= ~,,or--- Gc(s)Gp(s)l,=j~,

(2)

Thus, to achieve (1) it would be ideal if Gc,(z) could provide a time advance of (0.5 -~ a)T. This would be accomplished if we could make

( 2. An emulation design objective

221

(2 z-l)

Gc T z- + 1 (2 z--l)(5a)

Gc Tz~[1

'

and in the special case that a = 0, (1)

where T is the sampling period in seconds and w J 2 = a r / T is the folding frequency in radians/second. Because time delay of approximately T/2 is introduced by the zero-order hold, and because of the possibility of additional corn-

Gca(Z)=

~

Gc----~

Tz

.

(5b)

It is noteworthy that (5b), although developed from a different point of view, is related to an approximation developed recently Janiszowski [10]; Janiszowski's approximation is for a transfer

222

D.A. Pien'e,J.W. Pier,e/ISA 7)'ansactions34 (1995) 219-228

function in series with a zero-order hold and differs from that of (5b) by having 2, rather than 2z as the leading numerator factor. As shown in [10], the z + 1 term in the denominator factor of (5) is canceled by a corresponding numerator term in G c provided that Go(s) is strictly proper; the elimination of the z + 1 denominator term keeps the approximation bounded at the folding frequency (where z --+ - 1). The G~a(z) of (5) will fail to provide a good approximation under some conditions. When Gc(s) is not strictly proper, the direct application of (5) generally results in a pole at z = - I in Gc,,(z); such poles are called "ringing poles" and are rarely acceptable in practice. Also it should be noted that the Tustin approximation maps left-half-plane poles of G~(s) that have magnitudes greater than ~os/vr (or 2 / T ) into the 2nd and 3rd quadrants of the unit circle in the z plane. In particular, a pole at s = - a maps into a pole at z = (-c~ + ( 2 / T ) ) / ( a + ( 2 / T ) ) , so that when c~ >> 2 / T a ringing pole results. This can be avoided by a judicious selection of the sampling period T.

4. Modified zero-order hold and Gc(s) combination An emulation approach that is well known is the step-response equivalent approach: Gca(Z) is designed so that its response to a sampled step input matches perfectly the sampled step response of Gc(S), that is, Z

~

-

-

duces a delay of approximately T / 2 , it would be ideal if a time advance of T could be injected into this Gc~,(z). An additional factor of z will accomplish this, to produce a new Gc~,(z) from

(7): G~.,(z) = ( z -

1)

It is easily shown that the G~,,(z) of(8) is causal if and only if Gc(s) is strictly proper. Also, (8) is not appropriate if computational delay is significant. Because the extrapolator that led to (8) was the ideal z = esr/2eSr/2, with each e s7"/2 factor compensating for a zero-order hold, the ideal result would appear to be achieved. This is somewhat deceptive, however, because the delay of T / 2 is only an approximation of the effect of a zero-order hold. A comparison of this result with others is provided in the example of Section 6.

5. Triangle hold combined with extrapolation/ filter methods Fig. 3 shows a sampler followed by a hold with transfer function Gh(s) in series with the Go(s) controller; the output w of Go(s) is then sampled and discrete-time extrapolation is performed by Gb(Z). Consider the case where a triangle hold, eSV(1 - e-SV)2 Gh(S ) = sZ T ,

is used in Fig. 3. The output of the triangle hold consists of linear ramp segments that start and end on sampled values. For input signals whose

,

z--i

Gca(Z)

which is equivalent to O¢~(z) = - - Z z

(9)

- s

,

Gh~Z)

(7)

and this is recognized to be equivalent to a zeroorder hold preceding G¢(s). Therefore when the G ~ ( z ) of (7) is used in Fig. 2, the net effect is that of two zero-order holds in the loop, one from (7) and one from the h o l d preceding the plant. Because each of the two zero-order holds intro-

P.-

s _ ~ T

_

(s)

(s

triangle hold

Fig. 3. Forminga causal GJz).

(z --,.. b

223

D.A. Pierr< Z W. Pierre/ISA Transactions 34 (1995) 219-228

frequency content is less than half the folding frequency, the output of the G~(s) block of Fig. 3 will match to a high degree the output that would result from the direct application of the input to Gc(s). The triangle hold needs the next sampled value to form the current ramp segment, and therefore it is not causal. However, consider the z-transform transfer function Gh~(z) of Fig. 3, G he( Z ) = Z

[ e~r(l - e - ' r ) 2 Gc(s)] S~~

-

2-f

z

.

(10)

It can be readily shown that this Gh~(z), which is the z-transform of the series combination of the triangle hold and G~(s), is causal even if G~(s) is proper but not strictly proper! If Gc(s) is a proper rational function, Gh~(Z) generally is proper but not strictly proper. We desire a causal and implementable G~=,(z)in Fig. 3, G~,(z) = G k ( z ) G b ( z ) ,

(11)

and therefore the lack of causality of the triangle hold by itself is of no concern. An ideal G~(z) is one that satisfies (3). Consider the related response u(kT),

u(kT) =L-'[V(s)G~(s)e'(°5+a)r]t=k r.

(12)

An ideal approximation to the u(kT) of (12) is obtained by using a weighted average of w(kT) and w(kT + T) of Fig. 3 to form an approximation to w(kT+ 0 . 5 T + aT). The corresponding Gb(Z) is

Gu(z)=(O.5+a)

(__0"5-6) z+ 0.5+6

'

(13a)

where 0-,<<~ < 0.5, and in the case of negligible computational delay, G b ( z ) --

z+l 2

(13b)

Unfortunately the Gb(z) of (13) is noncausal. To compensate for the delay effects in Fig. 2, the Gb(z) in Fig. 3 should emulate e "ms+a)r. In general, low-order causal approximations of the

noncausal function e s(°s+a)r cannot be expected to be good over all frequencies; however, in feedback control applications, the open-loop transfer function is assumed to provide attenuation of the loop response at high frequencies, and therefore the emphasis here is on having e ~mS+~)r approximated accurately at low frequencies. In order to keep the order of Gc~,(z) close to that of G~(s), we seek causal Gb(Z)S (rather than the noncausal ones in (13)) of reasonably low order to achieve the emulation of e "¢°5+ayr at low frequencies. For matching e ~(°s+a)r at low frequencies, values of interest are

{e""

= 1,

ds

), = 0

(14) = (0.5

(15)

and de e~(°5 ~'s"rt d s" ] ~= 0

(0.5 + ,3)2T e.

(161

5. I. FIR forms for G b(z) Consider the following second-order finite-impulse-response (FIR) filter:

Gb(Z ) = a +bz 1 +cz-2.

(17)

With z = e ' r the Gb(Z) of (17) can be shown to satisfy (14) and (15) at s = 0 if b = 2 . 5 - 2a + 6 andc=a-l.5-6; thus

Gb(Z ) = a + (2.5 - 2a + a ) z -l +Ca-

1.5-a)z

:.

(18)

When a = 1.5 + 6 in (18), the result is that of linear extrapolation; in particular, when ~ = 0 and a = 1.5, the corresponding Gb(Z) is ab(Z )=1.5-0.5z

1.

(19)

When a = 2 and ,8 ~- 0 in (18), the result is Gb(Z ) = 2 - - 1 . 5 z

1+0.5z-2.

(20)

This Gb(Z) can be shown to produce the extrapolation u(kT) = ¢v(kT+ 0.5T) (see Fig. 3) where v~(kT + 0.5T) fits the quadratic function of time defined by data values w(kT), w ( k T - T ) and w ( k T - 2T).

D.A. Pierre, Z IV.. Pierre l I S A Transactions 34 (1995) 219-228

224

If the G b ( z ) of (18) is forced to satisfy (16) at s = 0, the result is G b ( z ) = (1.875 + 26 + 0.562 ) --(1.25 + 36 + 6 2 ) z -1 + (0.375 + 6 + 0.562)z -2,

(21)

and in the case that 6 -- 0, G b ( Z ) = 1.875 -- 1.252 -1 + 0.3752 -z

(22)

Several alternatives to the above are possible. We could constrain Gb(Z) of (17) to satisfy (14) and to equal e #°c(°5+~)r at some critical frequency we; the second constraint has both a real and an imaginary part, resulting in two equations in the unknowns a, b and c. Alternatively, we could constrain Gb(Z) of (17) to satisfy (14) and (15), and to have the angle of Gb(Z) equal to o9c(0.5 + 6)T at the critical frequency w c. 5.2. Z e r o - p o l e

Clearly it is desirable to have Icl < 1 in (24). It is unfortunate, therefore, that (16) can be matched by (24b) only if c = - 3 . As an alternative to the above, Gb(Z) of (23) could be constrained to satisfy (14) and to equal e j'°A°5+z)r at a critical frequency O)c; the second constraint has both a real and an imaginary part, resulting in two equations in the unknowns a, b and c. For the case that 6 = 0, however, it can be shown that these equations result in values of c in the range between - 3 and - 1 .

6. A low-pass example In order to compare the methods presented in Sections 3, 4 and 5, we consider a single pole Go(s):

1 Gc(s ) -

s+l

(26)

.

Gb(Z)

Consider the following first-order infinite-impulse-response filter: az - b

G b ( Z ) -- - -

(23)

Z--C

NYQUISTPLOT 0.05 0

With z = e sr if G b ( z ) in (23) is forced to satisfy (14) and (15) at s = 0, the result is [0.5(3- c)+6(1-

c)]z-[0.5(1+c)+6(1-c)]

Gb(Z) Z--C

(24a) and if 6 ----0, l+ct Gb(z)

=

]

z - c

(24b)

Note that if c = - 1 is used in (24b), the result is the 2 z / ( z + 1) factor contained in (5b). Similarly, if c = 0 is used in (24b), the result is the 1 . 5 0 . 5 z - 1 of (19). An intermediate value of c = - 0.5 gives z - (1/7) G b ( z ) = 1.75

z+0.5

(25)

045 0

0.2

"

~ 0.4

' 0.6

' ' 0.8

REAL Fig. 4. Nyquist plots with 0 ~ o) ~< ax / T, T = 0.lax and Go(s) = l / ( s + 1): (1) Gc(J~o); (2) ei'°r/eGc(joa); (3) Gca(e jo'r) from (5b); (4) Gca(e i ' r ) from (8); (5) Gca(e i'°r) from (11) and (19); (6) Gea(e i'°T) from (11) and (22); and (7) Gc,(e i~T) from (11) and (25).

D.A. Pierre..I.W. Pierre/ISA Transactions 34 (1995) 219-228 NYQUISTPLOT

-0;15!

/

-(~/!

225

matches to curve 2, the modified Tustin approximation approach of (5b) results in a somewhat better Nyquist match than does the modified step-invariant approach of (8).

('-~'\

7. Accounting for non-low-pass controllers If Go(s) is a ratio of polynomials having both numerator and denominator of the same order, it can be reduced to the form

Go(s) = K + C ~ ( s ) ,

b.J/" / . / " //" 0.4 L _

06

~/

065 0.7 0.75 08 0.85 0.9 0.95 REAL

Fig. 5. Low frequency part of Nyquist plots when T = 0.3"rr and G~(s)=l/(s+l): (1) Gc(Jw); (2) eJ'r/2Gc(joJ); (3) G~,,(e j~r) from (5b); (4) G~,(e ;'°'r) from (8); (5) G~,(e i'°r) from (11) and (19); (6) Gc,,(e j'T) from (11) and (20); (7) G~a(e j''r) from (11) and (22); and (8) G~,,(ei''r) from (11) and (25).

In the spirit of the design objective of Section 2, for the case that 6---0, a Nyquist plot of e'Z/2Gc(s) is compared with Nyquist plots of the G~(z)s from (5b), (8), (19), (20), (22) and (25), where the Gb(Z)S of (19), (20), (22) and (25) are coupled with Ghc(Z)S as in (10) and (11) to form the corresponding Gca(Z)S. Fig. 4 is for the case that T = 0.1-rr, so that the 3-dB bandwidth (0.5/'rrHz) of G~(s) is one-tenth the folding frequency (5/'rr). Also shown as curve 1 in Fig. 4 is the Nyquist plot of G~(s). From Fig. 4, it is clear that the modified Tustin approximation approach of (Sb) and the modified step-invariant approach of (8) come very close to matching the curve labeled 2, and therefore essentially achieve the design objective of Section 2 for this example. Not shown in Fig. 4 is the case of (11) and (20), which results in a curve slightly above curve 6. Fig. 5 is for the case that T = 0.3~r, and therefore the bandwidth (0.5/'rr Hz) of G~(s) is 30% of the folding frequency (5/(3"rr) Hz). Under these conditions, although none of the low-order approximations considered provide very close

{27)

where K is constant a n d Gsp(S) is strictly proper. A special case of (27) is simply Gc(s)=K. When G c ( S ) = K in (5), the resulting G~,,(z)= 2Kz/(z + 1) exhibits a ringing pole at z = - 1 ; for open-loop applications the ringing pole is unacceptable; and for closed-loop applications, if Ghp(Z) of Fig. 2 contains a zero near z = - 1. a pole of G~,(z) at z = - 1 is equally unacceptable. Similarly, when G~(s)= K in (18), the resulting Gc,(Z)=Kz is non-causal and theretore is inappropriate. As previously noted, (10) and (11) produce a causal G ~ ( z ) when Gc(s) is of the form (27), provided Gb(Z) is causal. If Gp(s) provides sufficient attenuation at frequencies greater than 25% of the folding frequency, the causal Gc~(z)s described in Section 5 can provide relatively good emulation results. One of the properties that (5) and (18) possess in the strictly proper Gc(s) case is that the resulting Gca(Z) is of the same order as Gc(s). One possibility for maintaining the controller order when using the approach of the preceding paragraph is to select the pole or the zero of G b ( Z ) in (24) to match a zero or a pole of Ghc(Z) so that a cancellation occurs in the formation of G~a(z) in (ll). Yet another approach for maintaining the order of the controller is that in which Gb(z) of (11) is set to unity, but the poles and zeros of (10) are altered to introduce additionally phase lead (at values approximating w~(0.5 + a)T at critical frequencies o2c) while maintaining the lowfrequency gain of Gc,(Z) at values corresponding to the low-frequency gain of Go(s).

D.A. Pierre, J.W. Pierre/ISA Transactions 34 (1995) 219 228

226

If the phase lead that can be obtained by moderate shifts in the poles and zeros of G h c ( Z ) is insufficient, a combination of the above approaches may provide good results: in this case, the Gb(Z) of (11) would not have to provide as much phase lead, and (18) or (24a) could be applied using negative values of 3. Other variations of approaches are possible. For example, the K part of (27) could be treated with (11), while in parallel the Gsp(s) part of (27) might be treated appropriately with (5) or (8). Although (5) is inappropriate in the case that Gc(s) is proper but not strictly proper, useful variations of (5) can be obtained by replacing the [2(1 + ~)z - 2 ~ ] / ( z + 1) factor by a G b ( Z ) from Section 5. One particular form that we have found to provide good results is obtained by using the G b ( Z ) of (24a) to form the following modification of (5a):

1.4--

/-

1.2

~'

0.I

D 0

0.6

~'-...

ir~

CONTINUOUSSYSTEM

0.4 ..~

. . . . DIGITALWITHGb ANDDELAY

0.2 i

q~ I

I

1

2

)

i

i

I

I

4

5

6

7

i

;

10

TIME(S) Fig. 6. Unit step responses with T = 0.2 s.

Gc~,(z): (~{}.5(3-c) +8(1 -c)]z -[{}.5{] +c) +8(~ -c)]) Z--C

xcc( ~z-,) .

(28)

The utility of this particular approximation is demonstrated in the following example.

With T = 0 . 2 and 6 T = 0 . 0 5 , the applicable value of 3 is 0.25. Eq. (28) with c = 0 and (29) give Gca(Z)

8. A non-low-pass controller example

This example is based on the antenna tracking example in [1]. Given are

Gp(s)

1

s ( 1 0 s + 1)

10s + 1

and

Gc(s)

s+ 1 (29)

The continuous system step response has a peak overshoot of 16.3% which occurs at t = 3.63 seconds. In addition to the effects of the zero-order hold and the computational delay, we are interested in differences that arise when command inputs are not synchronized with the sampling instants. Several values of T are considered in the following, and the computational delay 6 T is assumed to be 0.05 seconds. The particular Gc~,(z) used in this example is that of (28).

=

(101z-99)(1.75z-0.75)_ llz 9 z

.

(30)

The transfer function Ghp(Z) of the h o l d / p l a n t combination, including the effects of the computational delay, can be shown to be 0.001(1.119396z 2 + 2.718140z +0.122729)

GhP(z) =

z 3 - 1.9801199z 2 + 0.980199z

(31)

Unit step responses are shown in Fig. 6. The solid response is that of the continuous system. For comparison purposes, the dashed response labeled Tustin was obtained by using only the first pole-zero pair of (30) in Gca(z); it exhibits an overshoot of 23.3% at t = 3.54 s. The response labeled with " * " in Fig. 6 was obtained using (30) and (31) in Fig. 2, with the step input applied at t = 0 - , and with sampling at t = 0, T, 2T ..... An overshoot of 16.56% occurs at t = 3.46 s. Note that the leading edge of the step input exhibits high frequency attributes, and that the controller immediately passes a step command to the zero-order hold and, in turn, to

D.,4. Pierre, J. 14d Pierre / ISA Transactions 34 (1995) 219-228

the plant (with computational delay effects included). The result is that, instead of matching the continuous system response during the initial rise, the " * " response leads the continuous system response by approximately T/2 seconds during the initial rise. Although this might a p p e a r to be undesirable, it is actually quite advantageous for the following reason. If the step input is applied at t= 0 +, the continuous system response essentially remains the same, but the digitally controlled system response becomes that characterized by "o" in Fig. 6. The " o " response trails the continuous system response by approximately T/2 seconds during the initial rise. Because the mismatch between the step c o m m a n d point-in-time and the periodic sample instant can vary between - T / 2 and T/2, the " * " and " o " curves in Fig. 6 can be viewed as worst-case emulations lot the controller (30). The average peak time for the two curves is 3.56 s. With T = 0.5 and aT=0.05, the applicable value of • is 0.1. Eq. (28) with c = - 0 . 5 and (29) give

( 41z- 39 )(1.9z-0.4 ) Go, ( z ) : :

5z

3

z+0.5

(32) "

The transfer f u n c t i o n ahp(Z) of the h o l d / p l a n t combination, including the effects of the computational delay, can be shown to be 0.001 ( 9 . 9 7 4 8 1 8 z 2 + 1 4 . 2 9 1 3 6 7 z + 0 . 1 1 9 1 0 2 ) Ghp ( z ) =

Z 3 -- 1 . 9 5 1 2 2 9 4 z 2 + 0 . 9 5 1 2 2 9 4 Z

(33) The corresponding unit step responses are shown in Fig. 7. The dashed response labeled Tustin is obtained by using only the first pole-zero pair of (32) in Gc,(z); it exhibits an overshoot of 32.6% at t = 3.57 s. The response labeled with " * " in Fig. 7 results from the use of (32) and (33) in Fig. 2, with the step input applied at t = 0 - , and with sampling at t = O, T, 2T ..... The response labeled " o " in Fig. 7 results from the use of the same controller, but with the step input applied at t = 0 + . The overshoot of these responses is 17.3%, and the average peak time of the " * " and " o " curves is 3.43 s. The closed-loop continuous system has a 3-dB

227

'4I 1.2

'V

::ii

>

/

'/'

i

O.~L

'l ,/

06i CONTINUOUSSYSTEM .-

0.4! i

. ]/'

TUSTIN , DIGITALWITHGb

. . . . DIGITALWITHGb AND DELAY

2

3

4

5

6

7

8

9

10

TIME {S> Fig. 7. U n i t s t e p r e s p o n s e s w i t h 7 = 0.5 s.

bandwidth of 1.27 radians per second. For digital control, it is preferable to have the folding frequency of the sampling exceed 5 times the bandwidth. For T = 0.5, as in Fig. 7, the folding frequency "rr/T of 6.28 radians per second, actually is slightly less than (5)(1.27)= 6.35 radians per second. Thus, the performance of the controller (28) on the plant of (29) for yet larger values of T will be suspect. For example, with T = 1 s, it can be shown that the associated step-response overshoot using the Tustin approximation on Gc(s) is 53.6% with a p e a k time of 3.55 s, and the overshoot using the Gca(Z) of (28) with c = - 0 . 5 is 29.6% with a peak time of 2.4 s.

9. C o n c l u s i o n s

Emulation methods of digital controller design are concerned with the design of a digital controller to replace a given continuous controller. For the particular methods developed in this paper, the design objective was to maintain as close as possible the output response of the digitally controlled system to that of the corresponding continuous system. The order of the digital controller was restricted to be close to that of the

228

D.A. Pierre, J. [E Pierre/ISA Transactions 34 (1995) 219-228

continuous controller. Because of computational delay 6T and zero-order-hold time delay effects, the ideal digital controller transfer function Gc~(Z) was characterized as one which would provide a time advance of (0.5 + 6)T. Methods of emulation presented included (1) modified Tustin methods associated with (5) and (28); (2) modified zero-order-hold equivalent (8); and several methods associated with a triangle hold, using (11) in conjunction with (19), (20), (22) or (24). Although the modified Tustin methods have some limitations, as described in Section 3, their ease of use and relatively good performance is demonstrated in the examples of Sections 6 and 8. The particular new result of Eq. (28) was shown to provide especially good results in the example of Section 8. Some slight further improvements could be expected by using prewarping in the modified Tustin methods. One of the key features of emulation that is highlighted by the example of Section 8 is that step changes in the reference input can occur at points in time other than the sample points; the response of the digitally controlled system to a step input can vary by as much as T seconds with incrementally small changes in the timing of the step input. For good emulation performance, the output response of the digitally controlled system should be close to that of the corresponding continuous system even when such step changes Occur.

Additional improvements in emulation are achievable if more options are allowed. For example, if the input to the digital controller could be sampled at intervals of T/2, values of e(kT), e(kT- 0.5T) and e(kT- T) could be used (prior to the rest of the computations in Gca(Z)) to obtain improved estimates of e(kT+ 0.5T+ ~T). Alternatively, improvements would be achievable if a hybrid controller could be used: in particular, with a hybrid controller the pure gain part of (27) could be implemented by an analog gain block in parallel with a digital emulation of the G~p(s) part of (27).

The treatment of multi-input multi-output cases, where Gc(s) is a matrix of controller transfer functions, can be aided by the emulation approaches of this paper. Any given entry in the controller matrix may be replaced by a digital controller, with appropriate sampling period and output hold circuit.

Acknowledgements This work was supported by NSF grant ECS9204582, by the Montana State University Engineering Experiment Station, and by the Montana Electric Power Research Affiliates Program.

References [1] G.F. Franklin, J.D. Powell and M.L. Workman, Digital Control of Dynamic Systems (Addison-Wesley, Reading, MA, 1990) 2nd Edition. [2] K. Ogata, Discrete-time Control Systems (Prentice-Hall, Englewood Cliffs, N J, 1987). [3] D. Tabak, "Digitalization of continuous-data control systems", Computer-Aided Design 3(2) (1971) 13-18. [4] G.J. Greaves and J.A. Cadzow, "The optima[ discrete filter corresponding to a given analog filter", IEEE Trans. Automatic Control 12(3) (1967) 304-307. [5l K.S. Rattan, "Digitalization of existing continuous control systems", IEEE Trans. Automatic Control 29(3) (1984) 282-285. [6] K.S. Rattan, "Compensating for computational delay in digital equivalent of continuous control systems", IEEE Trans. Automatic Control 34(8) (1989) 895-899. [7] R.A. Kennedy and R.J. Evans, "Digital redesign of a continuous controller based on closed loop performance", Proc. IEEE Conf. Decision and Control 3 (1990) 18981901. [8] J.P, Keller and B.D.O. Anderson, "A new approach to discretization of continuous-time controllers", IEEE Trans. Automatic Control 37(2)(1992)214-223. [9] B.D.O. Anderson, "Controller design: Moving theory to practice", IEEE Control Syst. Mag. 13(4) (1993) 16-25. [10] K.B. Janiszowski, "A modification and the Tustin approximation", IEEE Trans. Automatic Control 38(8) (1993) 1313-1316.