From numerical FFT to zero-pole diagram

Hi,
I have a simulink simulation that outputs time-domain signal to matlab (the input is also time-domain).
I made FFT on both input and output signal and have double complex vectors.
Now I'd like to make a zero-pole diagram from what I have but I have some challenges and I don't know how to continue.
  1. The pzmap and pzplot require a tf type input.
  2. my vectors are in a numerical frequency-domain and I have to convert them to a sort of symbolic z or s domain.
I'll be happy to know how should I proceed in order to succeed to do #1. Maybe #2 isn't relevant and there is a straightforward way?
Thanks!

1 Comment

It seems that pzmap and pzplot can't run with FRD models. Is there a way to convert it to tf?

Sign in to comment.

 Accepted Answer

Star Strider
Star Strider on 5 Sep 2021
Edited: Star Strider on 5 Sep 2021
What you can do depends on what the data are, one requirement being that to have complex vectors in the frequency domain.
To get an estimate of the pole and zero locations on the imaginary axis, plot the imaginary component of the fft as a function of frequency. The frequencies at the extremes () are the pole locations, and the zeros are the zero-crossings.
That is as close as it is possible get with only a fft result, although with the System Identification Toolbox, use the fft result with the idfrd function and go from there to identify the system. Then use the pzmap function and others to analyse the system.
EDIT — (5 Sep 2021 at 15:10)
It might be possible to convert the frequency domain data back to the time domain, then invert it. This is straightforward if the data are a two-sided Fourier transform, and only requires a bit more effort if it is a one-siced Fourier transform.
.

4 Comments

I have the data also in the time-domain. I do the FFT after I get the time-domain output signal.
And Of course, the input of the simulink model is a time-domain signal.
If you have the data in the time domain, use that with iddata, and go from there. This works best if you also have the input data in the time domain.
EDIT — (5 Sep 2021 at 17:48)
Example —
load dryer2_data output input;
data = iddata(output,input,0.08)
data = Time domain data set with 1000 samples. Sample time: 0.08 seconds Outputs Unit (if specified) y1 Inputs Unit (if specified) u1
sys = ssest(data)
sys = Continuous-time identified state-space model: dx/dt = A x(t) + B u(t) + K e(t) y(t) = C x(t) + D u(t) + e(t) A = x1 x2 x3 x1 -0.7268 1.648 -1.468 x2 -3.461 -1.978 5.979 x3 -3.5 -16.12 -14.51 B = u1 x1 0.02072 x2 0.02052 x3 0.6996 C = x1 x2 x3 y1 32.65 -0.4572 0.1756 D = u1 y1 0 K = y1 x1 0.382 x2 0.05758 x3 0.6313 Parameterization: FREE form (all coefficients in A, B, C free). Feedthrough: none Disturbance component: estimate Number of free coefficients: 18 Use "idssdata", "getpvec", "getcov" for parameters and their uncertainties. Status: Estimated using SSEST on time domain data "data". Fit to estimation data: 95.43% (prediction focus) FPE: 0.001474, MSE: 0.001439
figure
pzplot(sys)
grid on
.
Thanks, I think that this is what I need.
As always, my pleasure!
.

Sign in to comment.

More Answers (1)

Paul
Paul on 5 Sep 2021
Poles and zeros are based on the transfer function, which relates the output to the input. So in addition to the output signal, you'll also need to use the input signal. And you need to make sure that the frequency content of the input covers the frequencies that are relevant to your system, which you'll need to have some idea about.
One option is to try a single run with a Chirp Signal as the input, which might be difficult to use if you have low frequency poles or zeros.
Another approach would be to generate a single signal that is a series of sine waves.
Or you an run a loop over frequency stimulating the model with a single sine wave.
Once you have the input and output signals, then you can try ot use a function like tfest(), to estimate the transfer function, from which you can extract the poles and zeros.

4 Comments

The input is a signal that I create so I don't need another one.
So the input is a time-domain signal and the ouput of the system is a time-domain signal.
After the simulation runs I make the FFT for both of them.
My problem with tfest is that I have to give it the number of poles and zeros, but this is exactly one of the things that I'd like to analyze in my system.
So if I could do a zero-pole diagram, I was able to find them from there.
Maybe I don't understand what you mean by zero-pole diagram. In the usage that I'm aware of one needs to know the zeros and poles first, and then the diagram is simply a plot of the pole and zero locations on the complex plane. But you seem to be saying that one can make a zero-pole diagram (from what?) and then extract what the poles and zeros are from that diagram. if that's the process you're talking about, I'm afraid I can't offer any more help without knowing more about what that diagram is.
Depending on the information you have about your system, you may be able to glean information about the poles and zeros, including the relative degree, based on the data that you have. Do you have any information about the system? For example, is it linear? Is it minimum phase? Etc.
Let fin be the FFT of the input an fout be the fft of the output.
h = fout./fin
is itself an estimate of the transfer function. You can make an frd object out of h and then make a Bode plot of h to garner some insight into the system, which might then help to estimate the transfer function and subsequently pull out the poles and zeros.
I think that you understand it well.
I'd like to visualize my system using a zero-pole diagram, as plotted by pzplot and pzmap.
The bode is indeed an option that works, but it's not what I need now.
Thanks!
To be clear, I was only suggesting a Bode plot to help get an idea if the data you have is sufficient to identify the system and to get some information that would then inform the usage of a function like tfest.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!