MATLAB Answers

1

how to simulate an impusles response of a transfer function?

Asked by Zidhan Ismail on 25 Nov 2018
Latest activity Answered by Aryan Ritwajeet Jha on 14 Oct 2019 at 15:20
how to simulate an impulse response of transfer function?
which is T(s)= 15/(s^2+8s+15)
simulink should be used to find the impulse response

  0 Comments

Sign in to comment.

Products


Release

R2016b

2 Answers

Answer by Aquatris
on 25 Nov 2018

An impulse signal is a signal that has a certain magnitude that is applied for a small time. So you can use transfer function block to model your T(s) and use sum of 2 step functions to create impulse signal input. Use scope or toWorkspace block to obtain the response.
Impulse magnitude = x
Impulse time = t
Step function 1: step time 1, initial value 0, final value x
Step function 2: step time 1+t, initial value x, final value 0

  0 Comments

Sign in to comment.


Answer by Aryan Ritwajeet Jha on 14 Oct 2019 at 15:20

If you are looking for a time domain response, then MATLAB has some easy to use functions:
%construction of transfer function
numerator=15;
denominator=[1,8,15];%(s^2+8*s+15)
transferFunction=tf(numerator,denominator);
impulseplot(transferFunction);
If you are looking for a Fourier Spectrum of the impulse response of a transfer function:
%construction of transfer function
numerator=15;
denominator=[1,8,15];%(s^2+8*s+15)
transferFunction=tf(numerator,denominator);
%construction of impulse signal
dt=1e-3;
t = -1:dt:1;
impulse= t==0;
%computing fourier spectrum of impulse response
impulseResponse=fftshift(fft(lsim(transferFunction,impulse,t)));
len=length(impulseResponse); %to take the frequency axis of the harmonics.
q=-(len-1)/2:(len-1)/2; %divide the frequency components
fimpulseResponse=sqrt(impulseResponse.*conj(impulseResponse));
plot(q,[fimpulseResponse]);
title(['Fourier Spectrum Plot']);
axis([-10 10 0 1]);
xlabel('Frequency');
ylabel('Amplitude');

  0 Comments

Sign in to comment.