Shiftet values of omega in bode plot as result from generating idfrd() and tfest()
2 次查看(过去 30 天)
显示 更早的评论
Hello,
i have a problem at the calculation / estimation of a transfer function when using frequency-domain data.
My task is to get the continious transfer function for further simulation from measured magnitude and phase response by an impedance analyser.
The quality of the estimated curve is ok, but the problem is that the curve is shifted in omega and i cannot observe the problem.
The frequency limits of the measured data are 20 Hz to 5000 Hz with the units (freq. [Hz], magn [-], phase [°]).
Figure 1 and Figrue 2 shows the magnitude and phase of the measured data.
In Figure 3 shows the bode plot with idfrd() / frd() and the estimated TF.
Here the values are shiftet.
What ist the problem in this case?
format short g
clear
matt = readmatrix('data.CSV');
fre = matt(1:300,1);
frerad = fre.*(pi/180);
abso = matt(1:300,2);
absdb = 20*log10(abso);
phdeg = matt(1:300,3);
phrad = phdeg.*(pi/180);
% options = bodeoptions;
% options.FreqUnits = 'Hz';
figure(1)
semilogx(fre,absdb)
legend()
ylabel('magn. [dB]')
xlabel('freq. [Hz]')
grid()
figure(2)
semilogx(fre,phdeg)
ylabel('magn. [dB]')
xlabel('freq. [Hz]')
legend()
grid()
complexVector = abso.* exp(1j*phrad);
vect_mess = idfrd(complexVector,frerad,0);
% vect_mess = frd(complexVector,frerad);
tf_estimated = tfest(vect_mess,3)
figure(3)
bode(vect_mess,tf_estimated )
legend()
grid()
0 个评论
采纳的回答
Paul
2024-7-17
If fre is in Hz, then this line
frerad = fre.*(pi/180);
should be
freqrad = fre*2*pi;
to convert to rad/sec
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Transfer Function Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!