Why is a poor fit for a frequency domain model returned when using the System Identification Toolbox 6.0 (R13SP1+)?

2 views (last 30 days)
For example, take the following system, represented by Bode data:
num=[6.233e-005 6.229e-005];
den=[1 -1.973 0.998];
Hd=tf(num,den,0.005);
[mag,phase,w]=bode(Hd);
I then use System Identification with the quick start options. How can I improve the resulting fit?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in the System Identification Toolbox 6.0 (R13SP1+) in the "Freq. Function (mag/phase)" import option.
Currently, to work around this issue, try wrapping the data into an IDFRD object.
num=[6.233e-005 6.229e-005];
den = [1 -1.973 0.998];
Hd=tf(num,den,0.005);
[mag,phase,w]=bode(Hd);
% compute frequency response:
h = freqresp(hd,w);
% populate an IDFRD object:
M = idfrd(h,w,0.005);
Now import M as a 'data object' and hit quick start. You should get extremely good results.
If your original data is only available in terms of {mag, phase, w}, you can instead use the following code:
% compute frequency response:
h = mag.*exp(i*phase)
% populate an IDFRD object:
M = idfrd(h,w,0.005);

More Answers (0)

Categories

Find more on Linear Model Identification in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!