nise solution



T H I R T E E N

Digital Control

Systems

SOLUTIONS TO CASE STUDIES CHALLENGES

Antenna Control: Transient Design via Gain

a.



From the answer to the antenna control challenge in Chapter 5, the equivalent forward transfere(s) =

0.16K

s

2 (s + 1.32)

But,

Thus, G

z - 1

z G

G

(z+0.95696)

(z-1) (z-0.87634)

e(z) = 0.16Kz , or,e(z) = 7.659x10-4K

b.

Draw the root locus and overlay it over the ? = 0.5 (i.e. 16.3% overshoot) curve.

.

13-2 Chapter 13: Digital Control Systems

We find that the root locus crosses at approximately 0.93 ± j0.11 with 7.659x10

Hence, K = 11.268.

-4K = 8.63x10-3.

c.



Kv = 1



T



lim



z

?1

(z ? 1)Ge (z) = (7.659x10?4 K)(1.95696)

=

0.1366;

e



Kv

=

7.321

d.

Program:

T=0.1; %Input sampling time

numf=0.16; %Numerator of F(s)

denf=[1 1.32 0 0]; %Denominator of F(s)

'F(s)' %Display label

F=tf(numf,denf) %Display F(s)

numc=conv([1 0],numf); %Differentiate F(s) to compensate

%for c2dm which assumes series zoh

denc=denf; %Denominator of continuous system

%same as denominator of F(s)

C=tf(numc,denc); %Form continuous system, C(s)

C=minreal(C,1e-10); %Cancel common poles and zeros

D=c2d(C,T,'zoh'); %Convert to z assuming zoh

'F(z)'

D=minreal(D,1e-10) %Cancel common poles and zeros and display

rlocus(D)

pos=(16.3);

z=-log(pos/100)/sqrt(pi^2+[log(pos/100)]^2);

zgrid(z,0)

title(['Root Locus with ' , num2str(pos), ' Percent Overshoot Line'])

[K,p]=rlocfind(D) %Allows input by selecting point on

%graphic



Computer response:

ans =

F(s)

Transfer function:

0.16

--------------

s^3 + 1.32 s^2

ans =

F(z)

Transfer function:

0.0007659 z + 0.000733

----------------------

z^2 - 1.876 z + 0.8763

Sampling time: 0.1

Select a point in the graphics window

selected_point =

9.2969e-001 +1.0219e-001i

K =

9.8808e+000

Solutions to Case Studies Challenges 13-3

p =

9.3439e-001 +1.0250e-001i

9.3439e-001 -1.0250e-001i



Antenna Control: Digital Cascade Compensator Design

a.

Let the compensator be KGc(s) and the plant be Gp (s) = 0.16

s

. For 10% overshoot and a

peak time of 1 second,

–2.303 ± j3.142. If we place the compensator zero at –1.32 to cancel the plant’s pole, then the

following geometry results.

? = 0.591 and ?n = 3.895, which places the dominant poles at

X X

-pc -2.303

j3.142

s-plane

Hence, p

(

c = 4.606. Thus, Gc (s) = K(s + 1.32)s + 4.606)

and

s

. Using the

product of pole lengths to find the gain, 0.16K = (3.896)

2, or K = 94.87. Hence,

13-4 Chapter 13: Digital Control Systems



Gc (s) = 94.87(s + 1.32)

(s + 4.606)

. Using a sampling interval of 0.01 s, the Tustin transformation of

Gc(s)

is

(

Gc (z) = 93.35(z ? 0.9869)z ? 0.955)

=

93.35z ? 92.12

z

.



b.

Cross multiplying,

(

z - 0.955)X(z) = (93.35z – 92.12)E(z)

Solving for the highest power of z operating on

zX(z)

X(z),= (93.35z – 92.12)E(z) + 0.955X(z)

Solving for

X(z),

X(z)

= (93.35 – 92.12z-1)E(z) + 0.955z-1X(z)

Implementing this equation as a flowchart yields the following diagram



c.

Program:

's-plane lead design for Challenge - Lead Comp'

clf %Clear graph on screen.

'Uncompensated System' %Display label.

numg=0.16; %Generate numerator of G(s).

deng=poly([0 -1.32]); %Generate denominator of G(s).

'G(s)' %Display label.

G=tf(numg,deng); %Create G(s).

Gzpk=zpk(G) %Display G(s).

pos=input('Type desired percent overshoot ');

%Input desired percent overshoot.

z=-log(pos/100)/sqrt(pi^2+[log(pos/100)]^2);

%Calculate damping ratio.

Tp=input('Type Desired Peak Time ');

%Input desired peak time.

wn=pi/(Tp*sqrt(1-z^2)); %Evaluate desired natural frequency.

b=input('Type Lead Compensator Zero, (s+b). b= ');

%Input lead compensator zero.

done=1; %Set loop flag.

while done==1 %Start loop for trying lead

%compensator pole.

a=input('Enter a Test Lead Compensator Pole, (s+a). a = ');

%Enter test lead compensator pole.

numge=conv(numg,[1 b]); %Generate numerator of Gc(s)G(s).

denge=conv([1 a],deng); %Generate denominator of Gc(s)G(s).

Ge=tf(numge,denge); %Create Ge(s)=Gc(s)G(s).

clf %Clear graph on screen.

Solutions to Case Studies Challenges 13-5

rlocus(Ge) %Plot compensated root locus with

%test lead compensator pole.

axis([-5 2 -8 8]); %Change axes ranges.

sgrid(z,wn) %Overlay grid on lead-compensated

%root locus.

title(['Lead-Compensated Root Locus with ' , num2str(pos),...

'% Overshoot Line, Lead Pole at ', num2str(-a),...

' and Required Wn']) %Add title to lead-compensated root

%locus.

done=input('Are you done? (y=0,n=1) ');

%Set loop flag.

end %End loop for trying compensator

%pole.

[K,p]=rlocfind(Ge); %Generate gain, K, and closed-loop

%poles, p, for point selected

%interactively on the root locus.

'Gc(s)' %Display label.

Gc=K*tf([1 b],[1 a]) %Display lead compensator.

'Gc(s)G(s)' %Display label.

Ge %Display Gc(s)G(s).

'Closed-loop poles = ' %Display label.

p %Display lead-compensated system's

%closed-loop poles.

f=input('Give pole number that is operating point ');

%Choose lead-compensated system

%dominant pole.

'Summary of estimated specifications for selected point on lead'

'compensated root locus' %Display label.

operatingpoint=p(f) %Display lead-compensated dominant

%pole.

gain=K %Display lead-compensated gain.

estimated_settling_time=4/abs(real(p(f)))

%Display lead-compensated settling

%time.

estimated_peak_time=pi/abs(imag(p(f)))

%Display lead-compensated peak time.

estimated_percent_overshoot=pos %Display lead-compensated percent

%overshoot.

estimated_damping_ratio=z %Display lead-compensated damping

%ratio.

estimated_natural_frequency=sqrt(real(p(f))^2+imag(p(f))^2)

%Display lead-compensated natural

%frequency.

s=tf([1 0],1); %Create transfer function, "s".

sGe=s*Ge; %Create sGe(s) to evaluate Kv.

sGe=minreal(sGe); %Cancel common poles and zeros.

Kv=dcgain(K*sGe) %Display lead-compensated Kv.

ess=1/Kv %Display lead-compensated steady-

%state error for unit ramp input.

'T(s)' %Display label.

T=feedback(K*Ge,1) %Create and display lead-compensated

%T(s).

'Press any key to continue and obtain the lead-compensated step'

'response' %Display label

pause

step(T) %Plot step response for lead

%compensated system.

title(['Lead-Compensated System with ' ,num2str(pos),'% Overshoot'])

%Add title to step response of PD

%compensated system.

pause

'z-plane conversion for Challenge - Lead Comp'

clf %Clear graph.

'Gc(s) in polynomial form' %Print label.

Gcs=Gc %Create Gc(s) in polynomial form.

'Gc(s) in polynomial form' %Print label.

13-6 Chapter 13: Digital Control Systems

Gcszpk=zpk(Gcs) %Create Gc(s) in factored form.

'Gc(z) in polynomial form via Tustin Transformation'

%Print label.

Gcz=c2d(Gcs,1/100,'tustin') %Form Gc(z) via Tustin

%transformation.

'Gc(z) in factored form via Tustin Transformation'

%Print label.

Gczzpk=zpk(Gcz) %Show Gc(z) in factored form.

'Gp(s) in polynomial form' %Print label.

Gps=G %Create Gp(s) in polynomial form.

'Gp(s) in factored form' %Print label.

Gpszpk=zpk(Gps) %Create Gp(s) in factored form.

'Gp(z) in polynomial form' %Print label.

Gpz=c2d(Gps,1/100,'zoh') %Form Gp(z) via zoh transformation.

'Gp(z) in factored form' %Print label.

Gpzzpk=zpk(Gpz) %Form Gp(z) in factored form.

pole(Gpz) %Find poles.

Gez=Gcz*Gpz; %Form Ge(z) = Gc(z)Gp(z).

'Ge(z) = Gc(z)Gp(z) in factored form'

%Print label.

Gezzpk=zpk(Gez) %Form Ge(z) in factored form.

'z-1' %Print label.

zm1=tf([1 -1],1,1/100) %Form z-1.

zm1Gez=minreal(zm1*Gez,.00001);

'(z-1)Ge(z)' %Print label.

zm1Gezzpk=zpk(zm1Gez)

pole(zm1Gez)

Kv=300*dcgain(zm1Gez)

Tz=feedback(Gez,1)

step(Tz)

title('Closed-Loop Digital Step Response')

%Add title to step response.



Computer response:

ans =

s-plane lead design for Challenge - Lead Comp

ans =

Uncompensated System

ans =

G(s)

Zero/pole/gain:

0.16

----------

s (s+1.32)

Type desired percent overshoot 10

Type Desired Peak Time 1

Type Lead Compensator Zero, (s+b). b= 1.32

Enter a Test Lead Compensator Pole, (s+a). a = 4.606

Are you done? (y=0,n=1) 0

Select a point in the graphics window

selected_point =

-2.3045 + 3.1056i

ans =

Solutions to Case Studies Challenges 13-7

Gc(s)

Transfer function:

93.43 s + 123.3

---------------

s + 4.606

ans =

Gc(s)G(s)

Transfer function:

0.16 s + 0.2112

------------------------

s^3 + 5.926 s^2 + 6.08 s

ans =

Closed-loop poles =

p =

-2.3030 + 3.1056i

-2.3030 - 3.1056i

-1.3200

Give pole number that is operating point 1

ans =

Summary of estimated specifications for selected point on lead

ans =

compensated root locus

operatingpoint =

-2.3030 + 3.1056i

gain =

93.4281

estimated_settling_time =

1.7369

estimated_peak_time =

1.0116

estimated_percent_overshoot =

10

13-8 Chapter 13: Digital Control Systems

estimated_damping_ratio =

0.5912

estimated_natural_frequency =

3.8663

Kv =

3.2454

ess =

0.3081

ans =

T(s)

Transfer function:

14.95 s + 19.73

---------------------------------

s^3 + 5.926 s^2 + 21.03 s + 19.73

ans =

Press any key to continue and obtain the lead-compensated step

ans =

response

ans =

z-plane conversion for Challenge - Lead Comp

ans =

Gc(s) in polynomial form

Transfer function:

93.43 s + 123.3

---------------

s + 4.606

ans =

Gc(s) in polynomial form

Zero/pole/gain:

93.4281 (s+1.32)

----------------

Solutions to Case Studies Challenges 13-9

(s+4.606)

ans =

Gc(z) in polynomial form via Tustin Transformation

Transfer function:

91.93 z - 90.72

---------------

z - 0.955

Sampling time: 0.01

ans =

Gc(z) in factored form via Tustin Transformation

Zero/pole/gain:

91.9277 (z-0.9869)

------------------

(z-0.955)

Sampling time: 0.01

ans =

Gp(s) in polynomial form

Transfer function:

0.16

------------

s^2 + 1.32 s

ans =

Gp(s) in factored form

Zero/pole/gain:

0.16

----------

s (s+1.32)

ans =

Gp(z) in polynomial form

Transfer function:

7.965e-006 z + 7.93e-006

------------------------

z^2 - 1.987 z + 0.9869

Sampling time: 0.01

ans =

Gp(z) in factored form

Zero/pole/gain:

13-10 Chapter 13: Digital Control Systems

7.9649e-006 (z+0.9956)

----------------------

(z-1) (z-0.9869)

Sampling time: 0.01

ans =

1.0000

0.9869

ans =

Ge(z) = Gc(z)Gp(z) in factored form

Zero/pole/gain:

0.0007322 (z+0.9956) (z-0.9869)

-------------------------------

(z-1) (z-0.9869) (z-0.955)

Sampling time: 0.01

ans =

z-1

Transfer function:

z - 1

Sampling time: 0.01

ans =

(z-1)Ge(z)

Zero/pole/gain:

0.0007322 (z+0.9956)

--------------------

(z-0.955)

Sampling time: 0.01

ans =

0.9550

Kv =

9.7362

Transfer function:

0.0007322 z^2 + 6.387e-006 z - 0.0007194

----------------------------------------

z^3 - 2.941 z^2 + 2.884 z - 0.9432

Sampling time: 0.01

Solutions to Case Studies Challenges 13-11

13-12 Chapter 13: Digital Control Systems

Answers to Review Questions 13-13



ANSWERS TO REVIEW QUESTIONS

1.

(1) Supervisory functions external to the loop; (2) controller functions in the loop

2.

hardware; (3) more noise immunity (4) large gains usually not required

(1) Control of multiple loops by the same hardware; (2) modifications made with software, not

3.

Quantization error; conversion time

4.

An ideal sampler followed by a sample-and-hold

5.

z = esT

6.

The value of the time waveform only at the sampling instants

7.

Partial fraction expansion; division to yield power series

8.

Partial fraction

9.

Division to yield power series

10.

The input must be sampled; the output must be either sampled or thought of as sampled.

11.

c(t) is c*(t) = c(kT), i.e. the output only at the sampling instants.

12.

see between the sampling instants. The roots of the denominator of G(z) must be checked to see that they

are within the unit circle.

No; the waveform is only valid at the sampling instants. Instability may be apparent if one could only

13.

A sample-and-hold must be present between the cascaded systems.

14.

Inside the unit circle

15

. Raible table; Jury's stability test

16.

z=+1

17.

There is no difference.

18.

Map the point back to the s-plane. Since z = esT, s = (1/T) ln z. Thus, ? = (1/T) ln (Re z), and

?

= (1/T) ln (Im z).

19.

Determine the point on the s-plane and use z = esT. Thus, Re z = e?T cos ?, and Im z = e?T sin ?.

20.

using the Tustin transformation.

Use the techniques described in Chapters 9 and 11 and then convert the design to a digital compensator

21.

Both compensators yield the same output at the sampling instants.

13-14 Chapter 13: Digital Control Systems



SOLUTIONS TO PROBLEMS

1.

a.

f(t) = e-at; f*(t) = ?

k=0

?

e

-akT?(t-kT) ; F*(s) = ?

k=0

 
Back
Top