Skip to Main Content Skip to Search
Product Documentation

Estimating Frequency Response Models with Noise Using System Identification Toolbox

Open the Simulink model, and specify which portion of the model to linearize:

load_system('magball');
io(1) = linio('magball/Desired Height',1);
io(2) = linio('magball/Magnetic Ball Plant',1,'out');

Compute the steady-state operating point, and linearize the model:

op = findop('magball',operspec('magball'),...
                      linoptions('DisplayReport','off'));
sys = linearize('magball',io,op);

Create a chirp signal, and use it to estimate the frequency response:

in = frest.Chirp('FreqRange',[1 1000],...
                             'Ts',0.001,...
                             'NumSamples',1e4);
[~,simout] = frestimate('magball',io,op,in);

Use System Identification Toolbox software to estimate a fifth-order, state-space model. Compare the results of analytical linearization and the state-space model:

input = generateTimeseries(in);
output = simout{1}.Data;
data = iddata(output,input.Data(:),in.Ts);
sys_id = n4sid(detrend(data),5,'cov','none');
bodemag(sys,ss(sys_id('measured')),'r')
legend('Linear model obtained using LINEARIZE',...
       'State-space model using System Identification Toolbox',...
       'Location','SouthWest')

  


Free Control Systems Interactive Kit

Learn more about resources for designing, testing, and implementing control systems.

Get free kit

Trials Available

Try the latest control systems products.

Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS