Opera\'s th Figure 2: Schematic diagram of the Closed Loop system b) Write the c
ID: 2265999 • Letter: O
Question
Opera's th Figure 2: Schematic diagram of the Closed Loop system b) Write the closed loop transfer function Cls)/R(s) for the system given in figure 2. Simplify! c) Using the pzmap) function in Matlab, determine if the system is unstable. Explain why or why not. Include the Matlab results in your handout. Confirm with the roots0 function in Matlab. d) Calculate the damping coefficient , the natural frequency an , and resonant frequency (in Hz) of the system. Explain what type of step response is expected and why e) Using the roots() function in Matlab, determine the poles and the zeros of the system. f Plot gain and phase angle versus frequency using the bode() function in Matlab. g) From the plot obtained in step f, determine and show on the graph(s) (using Matlab cursors), DC gain (in dB), corner frequency (in Hz), resonant frequency (in Hz), gain at resonant frequency (in dB), and the gain at higher frequencies, where applicable. h) Compare (discuss) the results from the bode plot to your calculations in step'g' above. i) Include the Matlab plot(s) and results in your handout j) Apply a unit step force to this system using the step) function in Matlab. k) From the plot obtained in step T, determine and show on the grapb(s) (using Matlab cursors), %overshoot, DC gain, time constant (at 63%), rise time, settling time at 4t, peak time, and steady state error, where applicable Page 2 3 a+ ts in your handout I) Include the Matlab pExplanation / Answer
For the given problem first we need to find the transfer function of the system. Once we get the TF as ratio of polynomial .the rest can be easily calculated.
For the system given as a ratio of polynomials, to find whether system is stable, unstable, marginally stablewe use method of location of poles .
Here by Comparing the location of poles in z plane we analyse the stability . we compare both real and imaginary parts
num=input('enter num') // enter numerator coefficients//
den=input('enter den') //enter denominator coefficient//
g=tf(num,den) //transfer function//
pzmap(g) //pole zero map//
p=pole(g) // poles of transfer function//
b=length(p)
x=0;
for i=1:1:b;
if( real(p(i)<0)) // comparing real part//
x=x+1;
end
end
if(x==b)
disp( ' system is stable')
end
y=0;
for i=1:1:b;
if( real(p(i)==0))
y=y+1;
end
end
if(y ~=0)
z=0;
for m=1:1:b
n=m+1:1:b // comparing imaginary part//
if(imag(p(m))==imag(p(n)))
if real (p(m))==0
z=z+1;
end
end
end
if (z>0)
disp('unstable')
else
disp('marginally stable') // display result//
end
k=0;
for i=1:1:b
if real(p(i))>0
k=k+1
end
end
if(k>0)
disp('unstable')
end
Next For the system given as a ratio of polynomials, to find the following system parameters we use theoretical formulas for implimentation
EXAMPLE: 2
System parameter using LTI response.
PROGRAM:-
num=[1]
den=[1 2]
g=tf(num,den) //transfer function//
ltiview(g)
%right click on origin select system characterstics and select various parameter
%click points to show value
EXAMPLE: 3
Finding System parameter using program when zeros poles and gain is given
PROGRAM:-
z=[0] // enter value of zero//
p=[-1+3i -1-3i] // enter value of pole//
k=3 // enter value of gain//
[num,den]=zp2tf(z,p,k) // converts to transfer function form//
g=tf(num,den)
final_value=polyval(num,0)/polyval(den,0)
[y t]=step(g);
[ymax k]=max(y)
peak_time=t(k)
percent_overshoot=100*(ymax-final_value)/final_value
//formula for mp
y1=0.1*final_value // formula for rise time//
n=1
while(y(n)<y1)
n=n+1
end
y1=0.9*final_value
m=length(y)
while(y(m)<y1)
m=m-1
end
rise_time=t(m)-t(n)
n=length(y)
while((y(n)<1.02*final_value)&(y(n)>0.98*final_value))
n=n-1
end
settlng_time=t(n)
[wn,z,p]=damp(g) // dampingfactor//
natural_freq=wn
damping_factor=z
dc_gain=dcgain(g) //dc gain//
step(g)
Next For the system given as a ratio of polynomials, and to find the step response
PROGRAM:-
num=input('enter num') // enter numerator coefficients//
den=input('enter den') // enter denominator coefficients//
H=tf( num,den) //gives transfer function//
step(H) //step response//
For the system given as a ratio of polynomials, to Find the values of zeros poles and gain and Draw the pole zero plot
num=input('enter num'); //enter the coefficient of numerator//
den=input('enter den'); //enter coefficient of denominator//
sys=tf(num,den); //calculates the transfer function//
g1=zpk(sys); // gives transfer function in zpk form//
[Z P K]=zpkdata(sys,’v’); //gives values of zeros , poles, gain//
pzmap(sys); // plots the pole zero map//
title(‘pole zero plot of given transfer function’); //gives title to plot//
xlabel(‘real axis’); //gives label to x axis//
ylabel(‘imag axis’); //gives label to y axis//
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.