Download as ppt or pdf
Download as ppt or pdf
You are on page 1of 12

Laboratory in Automatic Control

Lab 8 Frequency Response Method

Frequency Response Methods (1/9)


Matlab code
num=5*[0.1 1]; f1=[1 0]; f2=[0.5 1]; f3=[1/2500 0.6/50 1]; den=conv(f1,conv(f2,f3)); sys=tf(num,den); bode(sys)

Result

Frequency Response Methods (2/9)


Result

In LTI Viewer

Frequency Response Methods (3/9)


Matlab code
K=2; num=[K]; den=[1 3 2 K]; sys=tf(num,den); w=logspace(-1,1,400); [mag,phase,w]=bode(sys,w); [mp,l]=max(mag); wr=w(l);
zeta=sqrt(0.5*(1-sqrt(1-1/m p^2))) wn=wr/sqrt(1-2*zeta^2)

400 points

P.O. 100exp

1 2

ts=4/zeta/wn po=100*exp(-zeta*pi/sqrt(1-zeta^2))

Frequency Response Methods (4/9)


Result

Frequency Response Methods (5/9)


A unity feedback system has the open-loop transfer function Generate a plot of the bandwidth versus the parameter p as 0<p<1.

Frequency Response Methods (6/9)


Bode plot

Frequency Response Methods (7/9)


Matlab code method1
p=[0:0.001:1]; w=logspace(-2,1,1000); n=length(p); for i=1:n num=[1]; den=[1 20*p(i) 0]; sys=tf(num,den); sys_cl=feedback(sys,[1]); [mag,phase]=bode(sys_cl,w); a(1,i)=bandwidth(sys_cl); end plot(p,a)

Frequency Response Methods (8/9)


Matlab code method2
p=[0:0.001:1]; w=logspace(-2,1,1000); n=length(p); for i=1:n num=[1]; den=[1 20*p(i) 0]; sys=tf(num,den); sys_cl=feedback(sys,[1]); [mag,phase]=bode(sys_cl,w); a=find(mag<0.707); wb(i)=w(a(1)); end plot(p,wb)

Frequency Response Methods (9/9)


Result

1.Consider the feedback system. Obtain the Bode plots of the (a) open-loop and (b) closed-loop transfer functions using MATLAB.

R( s )

1 s 1

10 s 2 3s 1

Y ( s)

2. Consider the feedback system. The specification for the closed-loop system requires that the overshoot to a step input be less than 10% (a) find and n (b) Determine the corresponding specification M pw in the frequency domain for the closed- loop TF. (c) Determine the resonant frequency r . (d) Determine the bandwidth of the closed-loop system. (e) Obtain the Bode plots of the open-loop system.

R( s )

1 s( s 7)

Y ( s)

12

You might also like