I was trying a identify transfer function from a frequency response dataset ( magnitude- phase-response) using IDPROC method from the System Identification Toolbox.
So I used an example of a simple second order underdamped transfer function with natural frequency of 4 rad/sec and Zeta of 0.25. This transfer function was identified perfectly with a fit of 100%.
However, when I changed the natural frequency to 2.5133e+004 rad/sec (corresponding to a frequency of 4KHz), I did not get a good fit. Here is my reproduction code:
f = 4000;wn = 2*pi*f; %rad/sec
zeta = 0.25;tf('s');num = [1];sec= 2*wn*zeta;third = wn^2;den = [1 sec third];csys = tf(num,den); % continuous transfer function
Ts = 0.00001; % Ts = 0.00001 sec;
dsys = c2d(csys,Ts); [P,PHA,W] = bode(dsys); % bode of discrete sys, W is in rad/sec, P is in Db, PHA is in degrees
zfr = P.*exp(i*PHA*pi/180);gfr = idfrd(zfr,W,Ts);figure(1);bode(gfr), legend('gfr')mproc = pem(gfr,'p2u') % 2nd-order, continuous-time model with underdamped poles
m = pem(gfr, mproc)
Best Answer