Borrar filtros
Borrar filtros

Shiftet values of omega in bode plot as result from generating idfrd() and tfest()

17 visualizaciones (últimos 30 días)
Rai Way
Rai Way el 17 de Jul. de 2024 a las 19:45
Comentada: Rai Way el 18 de Jul. de 2024 a las 10:03
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()

Respuesta aceptada

Paul
Paul el 17 de Jul. de 2024 a las 20:03
If fre is in Hz, then this line
frerad = fre.*(pi/180);
should be
freqrad = fre*2*pi;
to convert to rad/sec

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by