Modern Control Engineering

(Chris Devlin) #1
624 Chapter 8 / PID Controllers and Modified PID Controllers

MATLAB Program 8–11


% Bode Diagram


num = conv([40 4],[0.1526 1]);


den = [1 0.000000001 1 0];


sys = tf(num,den);


w = logspace(-2,2,100);


bode(sys,w)


[Gm,pm,wcp,wcg] = margin(sys);


GmdB = 20*log10(Gm);


[GmdB,pm,wcp,wcg]


ans =


Inf 50.0026 NaN 8.0114


title('Bode Diagram of G(s) = 40(s+0.1)(0.1526s+1)/[s(s^2+1)]')


Figure 8–54
Bode diagram of
G(s)=40(s+0.1)
(0.1526s+1)/
[s(s^2 +1)]. Frequency (rad/sec)

Bode Diagram of G(s) = 40(s + 0.1)(0.1526s + 1)/[s(s^2 + 1)]

−2 00

50

− 50

0

− 100
−1 50

100

− 50

Phase (deg); Magnitude (dB)

0

100

50

10 −^210 −^1100101102

The designed compensator has the following transfer function:

Gc(s)=

40

s

Gˆc(s)=


40 (0.1526s+ 1 )
s

See MATLAB Program 8–11 and the resulting Bode diagram shown in Figure 8–54. From this
Bode diagram we see that the static velocity error constant is 4 sec−^1 , phase margin is 50° and gain
margin is +qdB. Therefore, the designed system satisfies all the requirements.

Openmirrors.com

Free download pdf