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

4THEXP

The document provides MATLAB code snippets for simulating and plotting the step, ramp, parabolic, and impulse responses of a transfer function defined by the equation 1 / (s^2 + 5*s + 6). Each response is plotted over a time range of 0 to 50 seconds, with appropriate titles and grid settings for clarity. The code utilizes functions like 'csim' for simulation and 'plot' for visualization.

Uploaded by

thiru2005v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

4THEXP

The document provides MATLAB code snippets for simulating and plotting the step, ramp, parabolic, and impulse responses of a transfer function defined by the equation 1 / (s^2 + 5*s + 6). Each response is plotted over a time range of 0 to 50 seconds, with appropriate titles and grid settings for clarity. The code utilizes functions like 'csim' for simulation and 'plot' for visualization.

Uploaded by

thiru2005v
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

STEP RESPONSE:

s = %s;
tf = syslin('c', 1 / (s^2 + 5*s + 6));
t = 0:0.01:50;
c = csim('step', t, tf);
plot(t, c, 'b');
xgrid();
xtitle('Step Response', 'Time (sec)', 'c(t)');
RAMP RESPONSE:

s = %s;
tf = syslin('c', 1 / (s^2 + 5*s + 6));
t = 0:0.01:50;
u = tf/s;
c = csim('step', t, u);
plot(t, c, 'b');
xgrid();
xtitle('Ramp Response', 'Time (sec)', 'c(t)');
PARABOLIC:

s = %s;
tf = syslin('c', 1 / (s^2 + 5*s + 6));
t = 0:0.01:50;
u = tf/(s^2);
c = csim('step',t,u);
plot(t, c,'b');
xgrid(14,1,7);
xtitle('Parabolic Response', 'Time(sec)', 'c(t)');
IMPULSE RESPONSE:

s = %s;
tf = syslin('c', 1 / (s^2 + 5*s + 6));
t = 0:0.01:50;
c = csim('impulse', t, tf);
plot(t, c ,'b');
xgrid();
xtitle('Impulse Response', 'Time (sec)', 'c(t)');

You might also like