How can I increase accuracy at certain frequency ranges in transfer function estimation from time data

9 次查看(过去 30 天)
I have a SISO system, input and an output time data and would like to get a model of the tf. The input signal is a sine sweep with frequencies ranging from at about 1 Hz to about 400 Hz. I tried tfest. I compared the system response with the output I get from spafdr. They fit good for low frequencies (i.e. <=100 Hz) but not so good for the larger frequencies. I believe it should be possible to get a better approximation at larger frequencies without having a loss in accuracy for lower frequencies. But I do not know how to get there. Increasing the number of poles did not help but it increased the computational time drastically. I use a passband weightingfilter. Changing the bounds did also not help. According to the output it seems that the optimization did not improve the system and basically the output of the initialization is returned.
% code
%iddata requires first output then input
data=iddata(u{2},u{1},ts);
%angular velocities
w=2*pi*logspace(log10(10),log10(300),100);
%number of poles
np=10;
%number of zeros
nz=[];%let Matlab choose
%%options for tfest
%passband or sys
weightingfilter=2*pi*[10 500];%
opt=tfestOptions('display','on','InitMethod','all','WeightingFilter',weightingfilter);%,'SearchMethod','fmincon'
tic
sysspa=spafdr(data,[],w)
y=toc;
disp(['Time for spafdr: ' num2str(y) ' sec']);
tic
sys=tfest(data,np,nz,'iodelay',nan,opt)%init_sys,,opt,
y=toc;
disp(['Time for tfest: ' num2str(y) ' sec']);
%%plotting
figure;
bodeplot(sysspa,w)
hold on;
bodeplot(sys,w)
figure;
bodeplot(sysspa)
hold on;
bodeplot(sys)
legend('spafdr',['tfest ' num2str(np) ' poles, ' num2str(nz) ' zeros'],'Location','Southoutside');
end

采纳的回答

Wooshik Kim
Wooshik Kim 2018-7-5
It is usually harder to get good fit for higher frequencies because the input signal is significantly attenuated at high frequencies. So when you are system IDing using frequency data it is a good practice to amplify the sine wave for higher frequency range.
If the data is fixed and you cannot perform another sine sweep, what you can do is cut out high frequency data and fit using the better part of the data.

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by