Presentation is loading. Please wait.

Presentation is loading. Please wait.

9. Frequency-Domain Analysis

Similar presentations


Presentation on theme: "9. Frequency-Domain Analysis"— Presentation transcript:

1 9. Frequency-Domain Analysis
We give meaning to the steady-state response of systems to sinusoidal inputs, which is called as the frequency response. For the response, the transfer function is evaluted as s=i. 9.1 Sinusoidal responses DEU-MEE 5017 Advanced Automatic Control

2 Find the response for the considered system to an input of 7cos3t.
Example 9.1: Find the response for the considered system to an input of 7cos3t. MATLAB: s=3*i; ng=5;dg=[1 5]; giw=polyval(ng,s) / polyval(dg,s); ga=abs(giw),gfi=angle(giw) MATLAB gives the results as ga = , gfi = r(t)=7cos3t c(t)=7*0.8575cos(3t ) = cos(3t )

3 We can plot the sinusoidal input and response by MATLAB.
Example 9.1: (Continue) We can plot the sinusoidal input and response by MATLAB. clc;clear; a=7;w=3; % s=w*i; ng=5;dg=[1 5]; giw=polyval(ng,s) / polyval(dg,s); ga=abs(giw),gfi=angle(giw) tp=2*pi/w;dt=tp/20; t=0:dt:5*tp; r=7*cos(w*t); plot(t,r);hold on; c=a*ga*cos(w*t+gfi); plot(t,c,'r');

4 Find the response for the considered system to an input of 7cos3t.
Example 9.2: Find the response for the considered system to an input of 7cos3t. MATLAB: clc;clear; a=7;w=3; ksi=0.5;wn=sqrt(5); % s=w*i; ng=5;dg=[1 2*ksi*wn wn^2]; giw=polyval(ng,s) / polyval(dg,s); ga=abs(giw),gfi=angle(giw) tp=2*pi/w;dt=tp/20; t=0:dt:5*tp; r=7*cos(w*t); plot(t,r);hold on; c=a*ga*cos(w*t+gfi); plot(t,c,'r'); r(t)=7cos3t c(t)=7*0.5249cos(3t )

5 Example 9.2: (Continue)

6 Consider Example 9.1. Plot the frequency response of the system.
9.2 Frequency responses The frequency response has meaning far beyond the calculation of the time response to sinusoids. We define the frequency response function to be a the function G(i) for 0  . For a given value of , G(i) is a complex number. Thus the function G(i) is a complex function. Consider the frequency response of systems (Example ) . Example 9.3: Consider Example 9.1. Plot the frequency response of the system. MATLAB: clc;clear; to=1/5; wb=1/to; w=0:0.05:10*wb; % s=w*i; ng=5;dg=[1 5]; giw=polyval(ng,s)./ polyval(dg,s); mag=abs(giw);fi=angle(giw); subplot(2,1,1);plot(w,mag); subplot(2,1,2);plot(w,fi*180/pi);

7 Reconsider Example 9.2. Plot the frequency response of the system.
MATLAB: clc;clear; ksi=0.5;wn=sqrt(5); w=0:0.05:3*wn; % s=w*i; ng=5;dg=[1 2*ksi*wn wn^2]; giw=polyval(ng,s) ./ polyval(dg,s); mag=abs(giw);fi=angle(giw); subplot(2,1,1);hold on;plot(w,mag,'k'); subplot(2,1,2);hold on;plot(w,fi*180/pi,'k');

8 ) s ( R Magnitude: Bode plots Phase : 9.3 Bode diagram
Bode diagram is a plot of magnitude of the loop transfer function KGp(i) in decibels and the phase of KGp(i) in degrees, all versus frequency . The stability of the closed loop system can be determined by observing the behaviour of these plots. ) s ( R Magnitude: Bode plots Phase :

9 ) s ( R MATLAB: Example 9.5: clc;clear;close all w=0:0.05:1000;
k=1;ng=8;dg=conv([1 5 0],[1 2 18]); dh=polyadd(k*ng,dg);roots(dh) % s=w*i; hiw=polyval(k*ng,s)./ polyval(dg,s); mag=abs(hiw);fi=angle(hiw); bode(k*ng,dg) %hold on;plot(w,20*log10(mag),'k'); %return figure(2) subplot(2,1,1);hold on;plot(log10(w),20*log10(mag),'k'); subplot(2,1,2);hold on;plot(log10(w),fi*180/pi,'k');

10 A system is stable if the gain and phase margins are positive.
9.4 Stability analysis: (Gain margin, phase margin) Magnitude plot Phase plot Gain margin (GM) : The difference (in dB) between 0 dB and system gain, computed at the frequency where the phase is 180. Phase margin (PM) : The difference (in ) between the system phase and 180, computed at the frequency where the gain is 1 (log101=0). A system is stable if the gain and phase margins are positive.

11 Gain margin (GM) : Nyquist plot Phase margin (PM) :
Margin calculations: Nyquist plot Gain margin (GM) : Phase margin (PM) :

12 Obtain Bode plots, find the gain and phase margins by MATLAB.
Example 9.6: Obtain Bode plots, find the gain and phase margins by MATLAB. ) s ( R K: Control gain MATLAB: clc;clear;close all k=1;ng=2500;dg=conv([1 0],conv([1 5],[1 50]) ); go=tf(k*ng,dg) bode(go) margin(go) [gm,pm,wp,wg]=margin(go) MATLAB gives these results, gm=5.5, pm= , wg= rad/s, wp= rad/s

13 Reconsider Example 9.6. Calculate the gain and phase margins.

14 Relationship between the phase margin and damping ratio:
9.5 Compansators (Design in frequency domain) GM and M can be chosen as GM= 6 dB and PM=65 to design in frequency-domain. Relationship between the phase margin and damping ratio: Phase-lead companstor: Improve damping ratio Improve bandwith (faster response) Increase phase margin Phase-lag companstor: Improve steady-state error Decrease phase margin R(s)

15 Example 9.8: Reconsider Example 9.6. Design a compensator system and simulate results by MATLAB in time and frequency domain with/without the compensator.


Download ppt "9. Frequency-Domain Analysis"

Similar presentations


Ads by Google