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)
tf_estimated = 2.637 s^2 + 77.66 s + 337.4 ------------------------------- s^3 + 175.3 s^2 + 1839 s + 3528 Continuous-time identified transfer function. Parameterization: Number of poles: 3 Number of zeros: 2 Number of free coefficients: 6 Use "tfdata", "getpvec", "getcov" for parameters and their uncertainties. Status: Estimated using TFEST on frequency response data "vect_mess". Fit to estimation data: 99.13% FPE: 8.091e-08, MSE: 7.774e-08
figure(3)
bode(vect_mess,tf_estimated )
legend()
grid()

채택된 답변

Paul
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 CenterFile Exchange에서 Transfer Function Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by