मंगलवार, 21 जून 2022

Plot step response of given TF and 2nd order system with different values of damping ratio in MATLAB software.

 

AIM:-(a) Plot step response of given TF and 2nd order system with different values of damping ratio in MATLAB software.

(b) Plot ramp response.

 

SOFTWARE USED: -MATLAB (R2021a)

 

PROCEDURE:-

 

Step response is the time behaviour of the outputs of a general system when its inputs change from zero to one in a very short time.

Mathematically, the step signal is represented as given below:

u(t)= 1 ; t > 0

 

= 0 ; t < 0

 

MATLAB CODE:

 

num = input(‘enter the numerator of the transfer function’)

den = input(‘enter the denominator of the transfer function’)

step(num,den)

 

EXAMPLE:-

 

T(s)= (s + 1)/ (s3 + s2 + 2s + 1)

 

num=[1 1]

 

num =     1     1

 

>> den=[1 1 2 1]

 

den =

 

     1     1     2     1

 

>> sys1=tf(num,den)

 

sys1 =

 

         s + 1

  -------------------

  s^3 + s^2 + 2 s + 1

 

Continuous-time transfer function.

 

>> step(sys)




EXAMPLE:-

 

T(s) = 25 / ( s2 + 2s+ 25)

num=[25]

 

num =

 

    25

 

>> den=[1 2 25]

 

den =

 

     1     2    25

 

>> sys=tf(num,den)

 

sys =

 

        25

  --------------

  s^2 + 2 s + 25

 

Continuous-time transfer function.

 

>>wn= 5;

>> d=0.4;

>> [num,den]= ord2(wn,d)

 

num =

 

     1

 

 

den =

 

     1     4    25

 

>> num1=5^2*num;

>>printsys(num1,den)

 

num/den =

 

         25

   --------------

   s^2 + 4 s + 25

>> step(num1,den)



Ramp Response

n=[0 0 36];

d=[1 3 36];

t=0:0.005:2;

u=t;

     plot(t,y)

 

title('Ramp response')

 




 

Result: Step response with different values of damping ratio and ramp response have been plotted and verified using MATLAB for given transfer function.

कोई टिप्पणी नहीं:

एक टिप्पणी भेजें