• No results found

Introductory Digital Control

3.3 PIO Control

The notion of proportional, integral. and derivative(PID)control is reviewed in Section 2.2.3. Reviewing again briefly. the three terms are proportional control

3.3 PlO Control 67

• Example 3.4 aContimwllS PIDtoa

A motor has a transfer function from the input applied voltage to the output speed (rad/sec),

= (3.13)

whereKis called the proportional T,the integral time, andTDthe derivative time. These three constants define the control.

The approximations of these individual control terms to an algebraic that can be implemented in a digital computer are proportional control

KT

= - e(k-I)].

Equation (3.11) is already algebraic. therefore Eq. (3.14) follows directly while Eqs. (3.15) and (3.16) result from an application of Euler's method (Eq. (3.2» to Eqs. (3.12) and (3.13). However, normally these terms are used together and, in this case, the combination needs to be done carefully. The combined continuous transfer function (Eq. 2.24) is

(3.18) 360000

G(s) = (s+60)(s+600)'

u(k)=lI(k- I )+5[3.7667e(k) - 6.3333elk - I)

+

2.6667e(k - 2)]

This example once again showed the characteristics of a digital control system. The damping was degraded an increasing amount as the sample rate was reduced. Furthermore, it was possible to restore the damping with suitable adjustments to the control.

It has been determined that PID control withK= 5.To = 0.0008 sec. andT, = 0.003 sec gives performance for the continuous case. Pick an appropriate sample rate. determine the corresponding digital control law. and implement on a digital system. Compare the digital step response with the calculated response of a continuous system. Also. separately investigate the effect of a higher sample rate and PID OIl ability of the digital system to match the continuous response.

which. when implemented in the digital computer results in the line with stars in Fig. 3.7.

This implementation shows a considerably increased overshoot over the continuous case. The line with circles in the figure shows the improved performance obtained by increasing the sample rate to 10 i.e .. a sample rate about 30 times bandwidth. while using the same PID parameters as before. It shows that the digital performance has improved to be essentially the same as the continuous case.

Increasing the sample rate. however. will increase the cost of the computer and the AIDconverter: therefore, there will be a cost benefit by improving the performance while maintaining the 3.2 kHz sample rate. A look at Fig. 3.7 shows that the digital response (T=0.3 msec) has a faster rise time and less damping than the continuous case. This suggests that the proportional gain. K.should be reduced to slow the system down and the tive time. TDshould be increased to increase the damping. Some trial and error. keeping these ideas in mind. produces the results in Fig. 3.8. The revised PID parameters that duced these results areK=3.2 andTv=0.0011 sec. The integral reset time.T,.was left unchanged.

Solution. The sample rate needs to be selected first. But before we can do that. we need to know how fast the system is or what its bandwidth is. The solid line in Fig. 3.7 shows the step response of the continuous system ami indicates that the rise time is about I msec. Based on Eq. (2.16), this suggests that 1800 rad/sec. and so the bandwidth would be on the order of 2000 rad/sec or 320 Hz. Therefore, the sample rate would be about 3.2 kHz if 10 times bandwidth. So pickT=0.3 msec. Use of Eq. 13.17) results in the difference equation

Therefore, the differential equation relating ande(t)is

. I

u=

+

- e

+

T1 and the use of Euler's method (twice for results in

u(k)= - 1)+K [(I

+ + )

e(k) (I

+

2 ) e(k - 1)+ e(k - 2) (3.17)

Problems 69

The delay can be analyzed more accurately using frequency where the phase from the continuous should be decreased by

= - . (3.10)

2

• A continuous PID control law whose transfer function is

u(s) I

D(s)= - = K(]

+ - +

TDs)

e(s) TJs

can be implemented digitally using Eq.0.17)

u(k)= lI(k - I) +K [(1+ + ) elk) - (I

+

elk . 1) + - 2)]-The digital control system will behave reasonably close to the continuous system providing the sample rate is faster than 30 times the bandwidth.

In order to analyze the system accurately for any sample rate. but especially for sample rates below about 30 times bandwidth, you will have to proceed on to the next chapters to learn about z-transforrns and how to apply them to the study of discrete systems,

• For digital control systems with sample rates less than 30 times bandwidth.

design is often carried out directly in the discrete domain, eliminating ap-proximation errors,

68 Chapter Introductory Digilal Control

Figure 3.8

of PID tuning on the digital response, Example

• Digitization methods allow the designer to convert a continuous compensa-tion,D(s),into a set of difference equations that can be programmed directly into a control computer.

• Euler's method can be used for lhe digitization

• As long as the sample rale is on the order of 30 x bandwidth or faster. the digitally controlled system will behave close to its continuous counterpart and the continuous analysis that has been the subject of your continuous control systems study will suffice.

• For sample rates on the order of 101030 times the bandwidth. a first order analysis can be carried out by introducing a delay ofT/2 in the continuous analysis to see how well the digital implementation matches the continuous analysis. A zero-pole approximation for this delay is

i,

, x(k

+

I) - x(k)

x(k)= T . (3.2)

(3.9)

3.1 Do the following:

(a) Design a continuDus lead compensatiDn for the satellite attitude cDntrol example (G(s)= described in Appendix A,I so that the complex roDts are at approximately = ± rad/sec.

(b) Assuming the compensation is be implemented digitally. approximate the effect of the digital implementation tD be a delay ofT/2 as given by

2/ T

= +2/T

and detennine the revised rool IDcations for sample rales of =5 Hz. 10Hz. and 20 Hz whereT= sec.

3.2 Repeat Example3.1.but use the approximalion that

- - l)

T .

the backward rectangular version of Euler's method. Compare the resulting difference equations with the fDrward reclangular Euler methDd. Also compute the numerical of the cDefficients fDr both cases VS, sample rate for

=

I - 100Hz. Assume the continuous values from Eq. (3.8), that the cDefficient, of interest are given in Eq. (3.7) for the forward rectangular case as {I - bTl and (aT - l),

70 Chapter 3 Introductory Digital Control

3.3 For the compensation

+

1 D(s)=25s+15'

use Euler's forward retangular method to detennine the difference equations for a digital implementation with a sample rate of 80 Hz. Repeat the calculations using the backward retangular method (see Problem3.2) and compare the difference equation coefficients.

3.4 For the compensation

D ( s ) = 5 - - .s+2 s

+

20

use forward retangular method to detennine the difference equations for a digital implementation with a sample rate of 80 Hz. Repeat the calculations using the backward retangular method (see Problem 3.2) and compare the difference equation coefficients.

3.5 The read arm on a computer disk drive has the transfer function G ( s ) = - , .WOO

s-Design a digital PID that has a bandwidth of 100Hz, a phase margin of and has no output error for a constant bias torque from the drive motor. Use a sample rate of 6 kHz.

3.6 The read arm on a computer disk drive has the transfer function G(s)= 1000

Design a digital controller that has a bandwidth of 100Hz and a phase margin of Use a sample rate of 6 kHz.

3.7 For

1 G(s)=

(a) design a continuous compensation so that the closed-loop system has a rise time

< I sec and overshootM

p < to a step input command.

(b) revise the compensation so the specifications would stillbemet if the feedback was implemented digitally with a sample rate of 5 Hz, and

(c) find difference equations that will implement the compensation in the digital computer.

3.8 The read arm on a computer disk drive has the transfer function 500

G(s)

Design a continuous lead compensation so that the closed-loop system has a bandwidth of 100 Hz and a phase margin of 50'. Modify the MATLAB filefig32m that you can evaluate the digital version of your lead compensation using Euler's forward retangular method. Try different sample rates. and find the slowest one where the overshoot does not exceed 309r.

3.9 The antenna tracker has the transfer function G ( s ) = - - .10

s(s+2)

Problems 71

Design a continuous lead compensation so that the closed· loop system has a rise time

" <0.3 sec and o\'ershootMp < Modify the filefig32.mso that you can evaluate the digital version of your lead compensation using Euler's forward retangular method. Try different sample rates. and find the slowest one where the overshoot does not exceed

3.10 The antenna tracker has the transfer function 10 G(s)= s(s+2)'

Design a continuous lead compensation so that the closed-loop has a rise time

" < 0.3 sec and overshootMI' < Approximate the effect of a digital implementa-tion to be

2iT s+l/T'

and estimateMpfor a digital implementation with a sample rate of 10 Hz.