Beruflich Dokumente
Kultur Dokumente
AIM: To obtain step, ramp and impulse response of transfer function using simulink SOTFWARES USED: MATLAB 7.0.1 COMMANDS USED:
i. ii. iii. iv. v. vi. vii. viii. ix. Num Den Sys Subplot Step Impulse Xlabel Ylabel Title
Ramp signal:
The ramp function is a unary real function, easily computable as the mean of its independent variable and its absolute value. This function is applied in engineering (e.g., in the theory of DSP). The name ramp function can be derived by the look of its graph.
( )
Impulse signal:
In signal processing, the impulse response, or impulse response function (IRF), of a dynamicsystem is its output when presented with a brief input signal, called an impulse. More generally, an impulse response refers to the reaction of any dynamic system in response to some external change. In both cases, the impulse response describes the reaction of the system as a function of time. (n) = {
OBTAIN STEP ,RAMP AND IMPULSE RESPONSE FOR THE FOLLOWING TRANSFER FUNCTIONS
( ) ( ) ( ) ( ( )( )( )( )( )( ) )
PROCEDURE:(SIMULINK)
i. ii. iii. iv. v. vi. vii. Open the model file from file menu From library browser,select the required boxes to be used during the program. Eg: ramp, step ,transfer fcn and drag them to model file. Connect each block with arrows accordingly. Save program and click on simulation to execute the program. Go to command window and type plot(t,y1) and so on. See the output graph and edit it. Save it as a jpeg file.
PROCEDURE: (M FILE)
i. ii. iii. iv. v. From the file menu, select New and then M file. Type the program in m file. Save the program. Execute the program by clicking on RUN button. See the result graph and save it.
PROGRAM:
%Step Response for TF1 n1 = [200 400 800 200] d1 = [2 3 2 1] sys1 = tf(n1,d1) subplot(3,2,1) step(sys1) xlabel('Time') ylabel('Amplitude') %Impluse response for TF1 subplot(3,2,3) impulse(sys1) xlabel('Time') ylabel('Amplitude') %Ramp Response for TF1 t = [0:0.3:10] r = t y1 = lsim(sys1,r,t) subplot(3,2,5) plot(t,r,'r +',t,y1,'g o') xlabel('Time') ylabel('Amplitude') %Step Response for TF2 n2 = [5 45 65 25 0] d2 = [1 20 140 400 384] sys2 = tf(n2,d2) subplot(3,2,2) step(sys2) xlabel('Time') ylabel('Amplitude') %Impluse response for TF2 subplot(3,2,4) impulse(sys2) xlabel('Time') ylabel('Amplitude') %Ramp Response for TF2 t = [0:0.3:10] r = t y2 = lsim(sys2,r,t) subplot(3,2,6) plot(t,r,'r +',t,y2,'g o') xlabel('Time') ylabel('Amplitude') Ayush Thatai 1171110204 Lokesh Jain - 1171110205
RESULT: Thus step, ramp and impulse response for given transfer functions
were obtained and performed using simulink and M file.