0% found this document useful (0 votes)
94 views

Laboratory in Automatic Control: Lab 5 System Performance

The document discusses the performance of feedback control systems. It includes MATLAB code to simulate and analyze the step response of second-order systems with varying damping ratios. Graphs are generated showing the response of systems with ζ values of 0.1, 0.2, 0.4, 0.7, 1.0 and 2.0. Key metrics like rise time, settling time, overshoot and peak time are calculated for different ζ values.

Uploaded by

nchubccl
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF or read online on Scribd
0% found this document useful (0 votes)
94 views

Laboratory in Automatic Control: Lab 5 System Performance

The document discusses the performance of feedback control systems. It includes MATLAB code to simulate and analyze the step response of second-order systems with varying damping ratios. Graphs are generated showing the response of systems with ζ values of 0.1, 0.2, 0.4, 0.7, 1.0 and 2.0. Key metrics like rise time, settling time, overshoot and peak time are calculated for different ζ values.

Uploaded by

nchubccl
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF or read online on Scribd
You are on page 1/ 20

Laboratory in Automatic Control

Lab 5 System Performance

The Performance of Feedback Control System (1/8)

Matlab code

sysg
1

% Compute the response of the Mobile Robot Control % System to a triangular wave input numg=[10 20]; deng=[1 10 0]; sysg=tf(numg,deng); [sys]=feedback(sysg,1); t=[0:0.1:8.2]' ; v1=[0:0.1:2]' ; v2=[2:-0.1:-2]' ; v3=[-2:0.1:0]' ; u=[v1;v2;v3] ; % triangular wave [y,T]=lsim(sys,u,t) ; % response (u t-domain) plot(T,y, t,u,'--'), xlabel('Time (seconds)'), ylabel('\theta (radians)'), grid text(2,2,' \leftarrow Input','FontSize',16) text(4.5,0,' \leftarrow Output','FontSize',16)

The Performance of Feedback Control System (2/8)


Result

The Performance of Feedback Control System (3/8)

The Performance of Feedback Control System (4/8)

Step input

1 2 s 2 s 1

Output

The Performance of Feedback Control System (5/8)

Matlab code
% Compute step response for a second-order system t=[0:0.1:12]; num=[1]; zeta1=0.1; den1=[1 2*zeta1 1]; sys1=tf(num,den1); zeta2=0.2; den2=[1 2*zeta2 1]; sys2=tf(num,den2); zeta3=0.4; den3=[1 2*zeta3 1]; sys3=tf(num,den3); zeta4=0.7; den4=[1 2*zeta4 1]; sys4=tf(num,den4); zeta5=1.0; den5=[1 2*zeta5 1]; sys5=tf(num,den5); zeta6=2.0; den6=[1 2*zeta6 1]; sys6=tf(num,den6); % Compute step response. [y1,T1]=step(sys1,t); [y2,T2]=step(sys2,t); [y3,T3]=step(sys3,t); [y4,T4]=step(sys4,t); [y5,T5]=step(sys5,t); [y6,T6]=step(sys6,t); % Generate plot and labels. plot(T1,y1, T2,y2,'k', T3,y3,'--', T4,y4, T5,y5,'-.', T6,y6) xlabel('time'), ylabel('y(t)') title('\zeta = 0.1, 0.2, 0.4, 0.7, 1.0, 2.0'), grid Legend('\zeta = 0.1','\zeta = 0.2','\zeta = 0.4','\zeta = 0.7','\zeta = 1.0','\zeta = 2.0')

The Performance of Feedback Control System (6/8)


Result

The Performance of Feedback Control System (7/8)

Matlab code
% Compute step response for a second-order system% t=[0:0.1:20]; num=[1]; zeta=0.4; den=[1 2*zeta 1]; sys=tf(num,den); finalvalue=polyval(num,0)/polyval(den,0) % Compute step response. [y,T]=step(sys,t); [ymax,k]=max(y) peaktime=t(k) overshoot_percent=100*(y(k)-finalvalue)/finalvalue n=1; while y(n) < 0.1*finalvalue , n=n+1; end; m=1; while y(m)< 0.9*finalvalue , m=m+1; end; risetime=t(m)-t(n) l=length(t); while(y(1)>0.98*finalvalue & (y(1)<1.02*finalvalue)), l=l-1;end settling_time=t(l) % Generate plot and labels. plot(T,y) xlabel('time (sec)'),ylabel('y(t)'), grid
1 s 2 s 1
2

The Performance of Feedback Control System (8/8)


Result

finalvalue = 1 ymax = 1.2537 k = 35 peaktime = 3.4 (sec) overshoot_percen = 25.3728 % risetime = 1.5 (sec) settling_time = 20 (sec)

LTI Viewer (1/8)

LTI Viewer (2/8)

LTI Viewer (3/8)

LTI Viewer (4/8)

LTI Viewer (5/8)

LTI Viewer (6/8)

LTI Viewer (7/8)

LTI Viewer (8/8)

MP5.2 A unity negative feedback system has the open-loop transfer function s7 s 2 (s 10 ) Using lsim, obtain the reponse of the closed-loop system to a unit ramp input, G(s) 1 s2 Consider the time interval 0 t 25. R(s) MatLab code The figure shows reslut, label, title.

MP5.3 A working knowledge of the realtionship between the pole locations of the second-order system shown in Fig. MP5.3 and the transient response is importantion control design. With that in mind, consider the following four cases. 1. n 2, 0, 2. n 2, 0.1, 3. n 1, 0, 4. n 1, 0.2, Using the impulse ans subplot functions, create a plot containing four subplots, with each subplot depicting the impulse of one of the four case listed. Consider the time interval 0 t 15. MatLab code The figure shows reslut, label, title.
n2
2 2 s 2 n s n

R(s)

Y ( s)

Fig. MP5.3

MP5.6

d (t ) 0.5t
+

1 2 s

10 s 10

( s 5) s ( s 2 3.5s 6)

(t )

Please plot impulse response using the lsim function. Consider the time 0 t 15 MatLab code The figure shows reslut, label, title.

You might also like