Find Transfer Function from FFT Plot MATLAB

34 views Asked by At

I have the following FFT plot: enter image description here

I don't know if this is possible, but I would like to find a transfer function from this FFT plot in MATLAB.

This is what I have done so far:

np = 2; % number of poles
nz = 1; % number of zeros
iodelay = 0; % tansport delay
Ts = 0.1; % sample time [s]
input = freq'; % x data of FFT plot
output = xdft'; % y data of FFT plot

sysd = tfest(input,output,np,nz,iodelay,'Ts',Ts);
[num, den] = tfdata(sysd);
num = cell2mat(num);
den = cell2mat(den);
transfer_function = tf(num,den);

This gives me this transfer function:

enter image description here

Is what I have done correct and does this seem reasonable? How do I choose the number of zeros for my transfer function without knowing what the transfer function is ahead of time?

1

There are 1 answers

0
Mmohammad Karimi On

If you already have a transfer function (tf) in MATLAB, you can use the tf2zp function to extract the zeros and poles from that transfer function.