Using an iddata object, how do I plot multiple frequency response estimations in the same bode plot, using Hz for the x-axis units?

Using an iddata object, how do I plot multiple frequency response estimations in the same bode plot, using Hz for the x-axis units?

 采纳的回答

After estimating the frequency response of your data, you can use the "bodeplot" function and set the options to use Hz for the x-axis units.
Check out this template to create an iddata object, estimate the frequency response with several types of estimators, and then plot the results in the same bode plot.
DataObj=iddata(YourOutputDataVector,YourInpuDataVector,YourDataSampleTime);
% non-parametric
G1=spafdr(DataObj);
G2=spafdr(DataObj,'max',logspace(-1,2,100));
% parametric
zf = fft(DataObj);
mf=tfest(zf,4,4);
b = bodeplot(G1,G2, mf,G1.freq);
setoptions(b,'FreqUnits','Hz');

更多回答(0 个)

类别

产品

版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by