624 Chapter 8 / PID Controllers and Modified PID ControllersMATLAB 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 0050− 500− 100
−1 50100− 50Phase (deg); Magnitude (dB)01005010 −^210 −^1100101102The designed compensator has the following transfer function:Gc(s)=40
sGˆc(s)=
40 (0.1526s+ 1 )
sSee 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