
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































Unit-ramp input u ( t ) = at u ( t ) = t 0
Slope = 1
î í ì > £ £ = A t A a at t A a u t for / for 0 / ( )
u ( t ) = A sin w t + B cos w t
0 1 2 3 4 5
and w is the (angular) frequency in rad/s ( w = 2 p f )
Example:^ w^ =^3.^14 rad/s, if frequency is 0.5 Hz
Option #1: use the “step.m” M-file >> numG = 0.8; % define numerator of G ( s ) >> denG = [1 3 12]; % define denominator polynomial in s >> sys = tf(numG,denG) % build TF system using numG and denG >> step(sys) % compute and plot unit-step response to the screen
( ) ( ) 3 12
=
Option #1: use the “impulse.m” M-file >> numG = 0.8; % define numerator of G ( s ) >> denG = [1 3 12]; % define denominator polynomial in s >> sys = tf(numG,denG); % define system as TF >> impulse(sys) % compute unit-impulse response and plots Option #2: use “lsim.m” M-file >> numG = 0.8; % define numerator of G ( s ) >> denG = [1 3 12]; % define denominator polynomial in s >> sys = tf(numG,denG) >> dt = 0.01; % define time increment (delta-t) >> t = 0 : dt : 5; % define simulation time span (0 to 5 sec by increments of 0.01) >> u = zeros(size(t)); % define the input as all 0’s with same size vector as time t >> u(1) = 1/dt; % define the impulse input so that strength (“area”) is 1 >> lsim(sys,u,t); % compute linear simulation with arbitrary input; plots result
Simulink steps: (continued)