You are on page 1of 11

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

EXP NO:7SIMULATION OF STEP,IMPULSE AND RAMP RESPONSE OF TRANSFER FUNCTIONS

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

THEORY: Unit step signal:


The Heaviside step function, or the unit step function, usually denoted by H (but sometimes u or ), is a discontinuousfunctionwhose value is zero for negative argument and one for positive argument.The function is used in the mathematics of control theory and signal processing to represent a signal that switches on at a specified time and stays switched on indefinitely. () {

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.

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

( )

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.

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

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

Ayush Thatai 1171110204 Lokesh Jain - 1171110205


%Step Response for TF3 n3 = [200] d3 = [1 30 200] sys3 = tf(n3,d3) subplot(3,1,1) step(sys3) xlabel('Time') ylabel('Amplitude') %Impluse response for TF3 subplot(3,1,2) impulse(sys3) xlabel('Time') ylabel('Amplitude') %Ramp Response for TF3 t = [0:0.3:10] r = t y3 = lsim(sys3,r,t) subplot(3,1,3) plot(t,r,'r +',t,y3,'g o') xlabel('Time') ylabel('Amplitude')

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

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.

Ayush Thatai 1171110204 Lokesh Jain - 1171110205

You might also like