Solution for Take Home Exam 2 Problem 1: For the following closed-loop transfer functions find the maximum overshoot. Show the poles & zeros graphically & manually. Show the approximate & exact phase margin. Convert the transfer functions to state space & prove them by simulation. Use matlab as appropriate. a) to e) are: C( z) z + 0 .5 = 2 R( z ) 3( z − z + 0.5) C( z) 0 .5 z = 2 R( z ) ( z − z + 0.5) C( z) z −2 ( z + 0.5) = R( z ) 3( z 2 − z + 0.5)
C( z) 0.5 z −2 = 2 R( z ) ( z − z + 0.5) C ( z ) 0.316( z + 0.002)( z + 0.5) = R( z ) ( z 2 − z + 0.5)( z − 0.05) Part 1: find the maximum overshoot. The approximation formula for Mp is equation 2.18
on p. 21 of the text. M p ≈ e
−
πζ 1−ζ 2
The matlab code is: function Mp = getMp(num,den,Ts,i); sys = tf(num,den,Ts); [wn,z] = damp(sys); Mp = 100*exp(-pi*z(1)/sqrt(1-z(1)*z(1))); figure(i) y = dstep(num,den); dstep(num,den),grid on,hold on plot([0:length(y)-1]',(1+Mp/100*ones(1,length(y))),'r'),hold off title(['step response, Mp = ',num2str(Mp),'%'])
In the above num is the discrete transfer function numerator, den is the denominator, Ts is the sampling interval (arbitrary in this case), and ‘i’ is the figure number. The matlab driver code is: num = [1 0.5]; den = 3*[1 -1 0.5]; Mp = getMp(num,den,10,1) num = [0.5 0]; den = [1 -1 0.5]; Mp = getMp(num,den,10,2) num = [1 0.5]; den = 3*[1 -1 0.5 0 0]; Mp = getMp(num,den,10,3) num = [0.5];