I have obtained the bode plot for a system. The system seems to have a very complex magnitude and phase plot. It's not possible to find the transfer function manually. Is there a way of finding the transfer function from the magnitude and phase data, in Matlab?
Here's my code:
%%FFT method for finding Transfer Function
load testdata2.mat;
input = fft(signal(:,1));
% FFT of input data
output = fft(signal(:,2));
% FFT of output data
fft_ratio = output ./ input;
subplot(2,1,1)
%Magnitude
semilogx(20*log10(abs(fft_ratio)))
subplot(2,1,2)
%Phase
semilogx((180/pi)*angle(fft_ratio))
mag = 20*log10(abs(fft_ratio));
phase = (180/pi)*angle(fft_ratio);
I don't believe so, and that's not Matlab's fault. The problem is mathematically nontrivial because there can be poles and zeros of the transfer function that lie at large imaginary frequency. These might not significantly affect the Bode plot, but how would you rule out their existence?
I think your best bet is to fit the Bode plot to a rational transfer function, and just keep increasing the number of poles and zeros in the transfer function until you get acceptable agreement.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.