Time domain impulse response to transfer-function/ Nyquist plot

12 Ansichten (letzte 30 Tage)

My circuit simulator produce a time domain impulse response that represents an RC filter. Here's how it looks like:

Theoretically, the impulse response in time domain is equivalent to the transfer function in the frequency domain. I have two vectors 'x' and 'y' imported from the circuit simulator where x is a time axis and y is the impulse response function of the filter. I need to evaluate this response.

1. How can I retrieve both the magnitude and phase of that response? The 'fft' function provide a single vector which I guess is the magnitude.

2. How to retrieve the the real and imaginary parts of the transformed response and plot both as a function of frequency or against each other (Nyquist plot).

3. Is there any possibility to fit this curve and get the transfer function of the filter?

I'm not sure which part of the impulse response curve provides precious info about the poles/zeros of the filter. Possibly the ramp in the beginning, max peak and settling time, but if you can help I would totally appreciate it.

Akzeptierte Antwort

Star Strider
Star Strider am 26 Jun. 2018
‘1. How can I retrieve both the magnitude and phase of that response? The 'fft' function provide a single vector which I guess is the magnitude.’
No, the fft function produces a complex vector output, for convenience here ‘z’. The magnitude is the absolute value abs(z) of that vector, and to recover the phase, use the angle function (that calculates atan2(imag(z),real(z))).
‘2. How to retrieve the the real and imaginary parts of the transformed response and plot both as a function of frequency or against each other (Nyquist plot).’
Re = real(z);
Im = imag(z);
‘3. Is there any possibility to fit this curve and get the transfer function of the filter?’
Use the System Identification Toolbox if you have it. Another option is to use the Signal Processing Toolbox invfreqz (link) function. These will return the discrete transfer function. There are functions to convert it to a continuous transfer function if you want to, for example with the System Identificantion Toolbox and Control System Toolbox d2c (link) function.
A comprehensive discussion of system identification is best left to the textbooks covering it.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by