| System Identification Toolbox™ | ![]() |
System Identification Toolbox™ software integrates with Control System Toolbox™ software by providing a plant for control design.
Control System Toolbox software also provides the LTI Viewer GUI to extend System Identification Toolbox functionality for linear model analysis.
Control System Toolbox software supports only linear models. If you identified a nonlinear plant model using System Identification Toolbox software, you must linearize it before you can work with this model in the Control System Toolbox software. For more information, see the linapp, linearize(idnlarx), or linearize(idnlhw) reference page.
Note You can only use the System Identification Toolbox software to linearize nonlinear ARX (idnlarx) and Hammerstein-Wiener (idnlhw) models. Linearization of nonlinear grey-box (idnlgrey) models is not supported. |
For information about using the Control System Toolbox software, see the Control System Toolbox documentation.
In some cases, the order of your identified model might be higher than necessary to capture the dynamics. If you have the Control System Toolbox software, you can use balred to compute a state-spate model approximation with a reduced model order for any idmodel object, including idarx, idpoly, idss, and idgrey.
For more information about using balred, see the corresponding reference page. To learn how you can reduce model order using pole-zero plots, see Reducing Model Order Using Pole-Zero Plots.
After you estimate a plant model using System Identification Toolbox software, you can use Control System Toolbox software to design a controller for this plant.
System Identification Toolbox models in the MATLAB® workspace are immediately available to Control System Toolbox commands. However, if you used the System Identification Tool GUI to estimate models, you must first export the models to the MATLAB workspace. To export a model from the GUI, drag the model icon to the To Workspace rectangle.
Control System Toolbox software provides both the SISO Design Tool GUI and commands for working at the command line. You can import polynomial and state-space models directly into SISO Design Tool using the following command:
sisotool(model('measured'))
where you use only the dynamic model and not the noise model. For more information about subreferencing the dynamic or the noise model, see Subreferencing Measured and Noise Models. To design a controller using Control System Toolbox commands and methods at the command line, you must convert the plant model to an LTI object. For more information, see Converting Models to LTI Objects.
Note The syntax sisotool(model('m')) is equivalent to sisotool(model('measured')). |
For more information about controller design using SISO Design Tool and Control System Toolbox commands, see the Control System Toolbox documentation.
Control System Toolbox commands operate on LTI objects. To design a controller for a plant model, you must first convert the System Identification Toolbox model object to an LTI object.
You can convert linear polynomial, state-space, and grey-box model objects, including idarx, idpoly, idproc, idss, or idgrey, to LTI objects.
The following table summarizes the commands for transforming linear state-space and polynomial models to an LTI object.
Commands for Converting Models to LTI Objects
| Command | Description | Example |
|---|---|---|
| frd | Convert to frequency-response representation. | ss_sys = frd(model) |
| ss | Convert to state-space representation. | ss_sys = ss(model) |
| tf | Convert to transfer-function form. | tf_sys = tf(model) |
| zpk | Convert to zero-pole form. | zpk_sys = zpk(model) |
The following code transforms an idmodel object to an LTI state-space object:
% Extract the measured model
% and ignore the noise model
model = model('measured')
% Convert to LTI object
LTI_sys = idss(model)
The LTI object includes only the dynamic model and not the noise model, which is estimated for every linear model in the System Identification Toolbox software.
Note To include noise channels in the LTI models, first use noisecnv to convert the noise in the idmodel object to measured channels, and then convert to an LTI object. |
For more information about subreferencing the dynamic or the noise model, see Subreferencing Measured and Noise Models.
If you have the Control System Toolbox software, you can plot models in the LTI Viewer from either the System Identification Tool GUI or the MATLAB Command Window.
The LTI Viewer is a graphical user interface for viewing and manipulating the response plots of linear models.
Note The LTI Viewer does not display model uncertainty. |
For more information about working with plots in the LTI Viewer, see the Control System Toolbox documentation.
When the MATLAB software is installed, the System Identification Tool GUI contains the To LTI Viewer rectangle. To plot models in the LTI Viewer, drag and drop the corresponding icon to the To LTI Viewer rectangle in the System Identification Tool GUI.
Alternatively, use the following syntax when working at the command line to view a model in the LTI Viewer:
view(model)
If you have the Control System Toolbox software, you can combine linear model objects, such as idarx, idgrey, idpoly, idproc, and idss model objects, similar to the way you combine LTI objects.
For example, you can perform the following operations on identified models:
G1+G2
G1*G2
append(G1,G2)
feedback(G1,G2)
Note These operations lose covariance information. |
This example demonstrates how to use both System Identification Toolbox commands and Control System Toolbox commands to create and plot models:
% Construct model using Control System Toolbox m0 = drss(4,3,2) % Convert model to an idss object m0 = idss(m0,'NoiseVar',0.1*eye(3)) % Generate input data for simulating output u = iddata([], idinput([800 2],'rbs')); % Simulate model output using System Identification Toolbox % with added noise y = sim(m0,u,'noise') % Form an input-output iddata object Data = [y u]; % Estimate state-space model from the generated data % using System Identification Toolbox command pem m = pem(Data(1:400)) % Convert the model to a Control System Toolbox transfer function tf(m) % Plot model output for model m using System Identification Toolbox compare(Data(401:800),m) % Display identified model m in LTI Viewer view(m)
![]() | Designing a Controller for Identified Models | Using System Identification Toolbox™ Blocks | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |