How can use transfer function to find impulse response?
Afficher commentaires plus anciens

Hello everybody, I need to find time domain impulse response from the transfer function,and my transfer function is H(W)=R2/(R1/(sR1C+1)+R2),modeling as high pass RC filter. Because I want to use convolution(matlab conv) to convolute input signal and RC filter impulse response(H(t)) to obtain output signal.I think I can use ifft to transfer frequency domain to time domain,obtaining its impulse response but I don't know how to do that. Can someone help me?How to use matlab ifft to do it? Best wish have matlab code example. Thank you for your patience
Réponse acceptée
Plus de réponses (3)
Tim Yeh
le 21 Fév 2016
0 votes
1 commentaire
Star Strider
le 21 Fév 2016
My pleasure!
It’s been a while since I did circuit analysis, so this was interesting. It was also educational for me, in that I need to pay more attention to what I’m doing. (I apparently do not multi-task well.)
You’re correct. I erroneously set them up in series rather than in parallel. I corrected ‘i1’ here.
‘And Node1 = i1 + i2 == 0; can be writing as Node1 = i1 - i2 == 0?’
The sum of the currents entering and leaving a node have to be equal to zero. It depends on how you set up the arrows
The (corrected) code:
syms C R1 R2 s vi vo
i1 = (vi - vo)/R1 + (vi - vo)/(1/(s*C)); % First Branch Equation
i2 = -vo/R2; % Second Branch Equation
Node1 = i1 + i2 == 0; % Node Equation
vo = solve(Node1, vo);
H = simplify(collect(vo/vi, s), 'steps', 10) % Transfer Function
h = ilaplace(H); % Impulse Response Is The Inverse Laplace Transform Of The Transfer Function
h = simplify(h, 'steps',10)
hf = matlabFunction(h) % Create An Anonymous Function For Evaluation
H =
1 - R1/(R1 + R2 + C*R1*R2*s)
h =
dirac(t) - exp(-(t*(R1 + R2))/(C*R1*R2))/(C*R2)
hf = @(C,R1,R2,t) dirac(t)-exp(-(t.*(R1+R2))./(C.*R1.*R2))./(C.*R2)
Tim Yeh
le 21 Fév 2016
0 votes
1 commentaire
Star Strider
le 21 Fév 2016
As always, my pleasure.
I apologise for my earlier error.
Tim Yeh
le 23 Fév 2016
2 commentaires
Star Strider
le 23 Fév 2016
That’s actually a new Question and should be a new post.
I would do it with the Symbolic Math Toolbox instead. Use the int function to do the integral, and set the limits at the times and set the amplitude as in the diagram. You will have to define the ‘t’ constant, or use different variables for the lower-case ‘t’ in the diagram and the integration time variable (perhaps ‘T’) in your integration.
Tim Yeh
le 23 Fév 2016
Catégories
En savoir plus sur Stability Analysis dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

