Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
230 views

Frequency Response (Report)

this report has in detail all methods to get frequency response using hand graphing and matlab simulation.

Uploaded by

Mahmoud Kassab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views

Frequency Response (Report)

this report has in detail all methods to get frequency response using hand graphing and matlab simulation.

Uploaded by

Mahmoud Kassab
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Faculty of Engineering – Cairo University

Mechanical Design and Production Engineering


Two Semesters System –4th Year
MDP410: Automatic Control – Spring 2021

Assignment 5
(Frequency Response)

Submitted to
Dr. Yasser Anis
Eng. Mohamed Wael

Prepared by B.N
Mahmoud Ahmed El-Sayed Kassab 28

June 7, 2021
Contents
a)Analytical expressions for the magnitude and phase response for G(s): .................................................. 3
b) Magnitude and phase plots (Bode plots) using MATLAB: ........................................................................ 4
c) Sketch asymptotic bode plot..................................................................................................................... 5
1.Bode asymptotic magnitude plot: ......................................................................................................... 6
2.Bode asymptotic phase plot: ................................................................................................................. 8
d) Comparison ............................................................................................................................................. 10
i. Magnitude response ................................................................................................................... 10
ii. Phase angle response.................................................................................................................. 10
Discussion............................................................................................................................................ 10
e) Stability check using Nyquist .................................................................................................................. 11
f)range of K for stability using Nyquist criterion ......................................................................................... 12
g)getting gain and phase margin using Asymptotic bode plot ................................................................... 13
h) Bode plots and Nyquist plots gain and phase margins .......................................................................... 16
Conclusion ................................................................................................................................................... 19
For a = 3 K1 = 6
𝐾(𝑠+𝑎+1) 6(𝑠+4)
.𝐺(𝑠) = =
𝑠(𝑠+𝑎)(𝑠+𝑎+2)(𝑠+𝑎+3) 𝑠(𝑠+3)(𝑠+5)(𝑠+6)

a)Analytical expressions for the magnitude and phase


response for G(s):
6(𝑗𝑤+4) 6(𝑗𝑤+4)
.𝑀𝐺 = |𝐺(𝑗𝑤)| = = (𝑤 4
𝑗𝑤(𝑗𝑤+3)(𝑗𝑤+5)(𝑗𝑤+6) −63𝑤 2 )−(14𝑤 3 −90𝑤)𝑗

By multiplying both numerator and denominator by the conjugate of the denominator:


6(𝑗𝑤+4)[(𝑤 4 −63𝑤 2 )+(14𝑤 3 −90𝑤)𝑗] 6[(−10𝑤 4 −162𝑤 2 )+(𝑤 5 −7𝑤 3 −360𝑤)𝐽]
.𝑀𝐺 = =
(𝑤 4 −63𝑤 2 )2 +(14𝑤 3 −90𝑤)2 𝑤 8 +70𝑤 6 +1449𝑤 4 +8100𝑤 2

Matlab code
w=[.1:.1:1000];
m=(6.*((-10.*w.^4-162.*w.^2)+(w.^5-7.*w.^3-360.*w).*j))./(w.^8+70.*w.^6+1449.*w.^4+8100.*w.^2);
M=20.*log10(m);
semilogx(w,M,'k' , 'LineWidth', 2);
ylim([-140 20])

xlabel('Frequency (rad/sec)');
ylabel('20logM (dB)');
title('Magnitude vs Frequency');
grid on
𝐼𝑚𝑔 𝑝𝑎𝑟𝑡 (𝑤 5 −7𝑤 3 −360𝑤)
.𝑝ℎ𝑎𝑠𝑒 = 𝜑 = −𝑡𝑎𝑛−1 ( ) = −180° + 𝑡𝑎𝑛−1 [ (−10𝑤 4−162𝑤 2) ]
𝑅𝑒𝑎𝑙 𝑝𝑎𝑟𝑡

Matlab code
w=[.1:.1:1000];
ph=atan((w.^5-7.*w.^3-360.*w)./(-10.*w.^4-162.*w.^2));
phase=-180+((180/pi).*ph);
semilogx(w,phase,'k' , 'LineWidth', 2);
ylim([-272 -87])

xlabel('Frequency (rad/sec)');
ylabel('Phase (degree)');
title('Phase vs Frequency');
grid on

b) Magnitude and phase plots (Bode plots) using MATLAB:


Matlab code
G=zpk([-4],[0,-3,-5,-6],[6]);
sisotool(G)
c) Sketch asymptotic bode plot
.266 𝑠
6(𝑠+4) 𝑠
∗(4+1)
.𝐺 (𝑠) = = 𝑠 𝑠 𝑠
𝑠(𝑠+3)(𝑠+5)(𝑠+6) ( +1)( +1)( +1)
3 5 6
1.Bode asymptotic magnitude plot:
2.Bode asymptotic phase plot:
d) Comparison
This comparison is illustrated by substituting of low-frequencies values and high-frequencies
values, then getting the corresponding values of (20logM) and phase angle in:
1-the analytical expressions(a).
2-the Bode plots(b).
3-the asymptotic hand sketch plots(c).
i. Magnitude response

Values from Values from Values from


w(rad/sec)
analytical expression Bode plots asymptotic plots
(20logM) (dB) (dB) (dB)
0.1 8.514 8.5 8
1 -11.96 -12 -10
10 -46.47 -46.475 -45
100 -104.5 -104.5 -105
ii. Phase angle response
Values from Values from Values from
w(rad/sec)
analytical expression Bode plots asymptotic plots
(degrees) (degrees) (degrees)
0.1 -92.58 -92.585 -90
1 -115.2 -115.2 -118
10 -217.6 -217.562 -212
100 -264.3 -264.275 -270

Discussion
1-The values from the analytical expressions and the Bode plots are almost identical.
2-there is difference between the asymptotic hand sketch plots and Bode plots values, however
its small difference so it is acceptable and this difference is due to the approximation done in
asymptotic plots.
e) Stability check using Nyquist
Matlab code
G=zpk([-4],[0,-3,-5,-6],[6]);
sisotool(G)

From the Nyquist plot: N = 0 From the root locus: P= 0

N: number of ccw rotations of Nyquist around (-1)


P: number of open loop poles in right side hand of s-plane
Z: number of closed loop poles in right side hand of s-plane

From the relation: Z=P–N ∴Z=0–0=0


This means at K = 6, there are NO closed-loop poles on the right hand side of the s-plane, which
indicates that the system is stable at K= 6.
f)range of K for stability using Nyquist criterion

6[(−10𝑤 4 −162𝑤 2 )+(𝑤 5 −7𝑤 3 −360𝑤)𝐽]


from previous requirement .𝑀𝐺 =
𝑤 8 +70𝑤 6 +1449𝑤 4 +8100𝑤 2

the frequency at which the Nyquist crosses the real axis when the imaginary part =0

.(𝑤 5 − 7𝑤 3 − 360𝑤) = 0 w=4.77428 rad/sec


1
Compensating in the previous 𝑀𝐺 = −.026188 = − a=38.185
𝑎

.𝐾𝑐𝑟 = 𝐾𝑜𝑙𝑑 ∗ 𝑎 = 6 ∗ 38.185 = 229.1125


Then range of K for stability 0 < K < 229.1125
And gain margin 𝐺𝑀 = 20 log(𝑎) = 20 log(38.185) = 31.637
g)getting gain and phase margin using Asymptotic bode plot
1- for K=.1*6=.6 𝐺𝑀 = 48 𝑑𝐵 𝜑𝑀 = 90°
2- for K=10*6=60 𝐺𝑀 = 8𝑑𝐵 𝜑𝑀 = 20°
3- for K=100*6=600 𝐺𝑀 = −12𝑑𝐵 𝜑𝑀 = −18°
h) Bode plots and Nyquist plots gain and phase margins
1- k=.1k=.1*6=.6
Matlab code
G=zpk([-4],[0,-3,-5,-6],[.6]);
sisotool(G)

nyquist (G)
2- k=10k=10*6=60
Matlab code
G=zpk([-4],[0,-3,-5,-6],[60]);
sisotool(G)

nyquist (G)
3- k=100k=100*6=600
Matlab code
G=zpk([-4],[0,-3,-5,-6],[600]);
sisotool(G)

nyquist (G)
Conclusion

Asymptotic plots Nyquist plots Bode plots

Gain Margin GM K=0.1K1=0.6 (stable) 48 51.6 51.6

(dB) K=10K1=60 (stable) 8 11.6 11.6


K=100K1=600 (unstable) -12 -8.36 -8.36
Phase Margin 𝜑M K=0.1K1=0.6 (stable) 90 89.3 89.3

(degrees) K=10K1=60 (stable) 20 40 40


K=100K1=600 (unstable) -18 -23.3 -23.3

#It is observed that the values of the gain and phase margins from the Bode plots and Nyquist
plots are identical regardless of the value of the gain K. However, the values of gain and phase
margins from the asymptotic plots are close to Bode plots and Nyquist plots but have slight error
due to its approximation.

#there is big error in K=10K1 for phase margin Asymptotic plot could be drawing error.

You might also like