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

Second Order Systems Programming

This document defines five second-order transfer functions with different damping ratios (zeta) between 0.1 and 0.6. It simulates the step response of each system and plots the outputs on the same graph to compare their behavior over time. A second plot is generated with an input of 2 to further examine the step response characteristics of the second-order systems.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Second Order Systems Programming

This document defines five second-order transfer functions with different damping ratios (zeta) between 0.1 and 0.6. It simulates the step response of each system and plots the outputs on the same graph to compare their behavior over time. A second plot is generated with an input of 2 to further examine the step response characteristics of the second-order systems.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Second order systems programming

t=[0:0.1:10];
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.3;den3=[1 2*zeta3 1];sys3=tf(num,den3);
zeta4=0.4;den4=[1 2*zeta4 1];sys4=tf(num,den4);
zeta5=0.6;den5=[1 2*zeta5 1];sys5=tf(num,den5);
[y1,T]=step(sys1,t);[y2,T]=step(sys2,t);
[y3,T3]=step(sys3,t);[y4,T4]=step(sys4,t);
[y5,T5]=step(sys5,t);
plot(t,y1,t,y2,t,y3,t,y4,t,y5);
xlabel('wn')
ylabel('zeta')
title('step response of second order systems')

t=[0:0.1:12];
num=[2];
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.3;den3=[1 2*zeta3 1];sys3=tf(num,den3);
zeta4=0.4;den4=[1 2*zeta4 1];sys4=tf(num,den4);
zeta5=0.6;den5=[1 2*zeta5 1];sys5=tf(num,den5);
[y1,T]=step(sys1,t);[y2,T]=step(sys2,t);
[y3,T]=step(sys3,t);[y4,T]=step(sys4,t);
[y5,T]=step(sys5,t)
figure ,plot(t,y1,t,y2,t,y3,t,y4,t,y5),grid
xlabel('wn')
ylabel('zeta')
title('step response of second order systems')

You might also like