Documentation |
On this page… |
---|
How Control System Toolbox Software Works with Identified Models Using balred to Reduce Model Order Compensator Design Using Control System Toolbox Software Converting Models to LTI Objects |
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 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, idnlarx/linearize, or idnlhw/linearize reference page.
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.
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 app to estimate models, you must first export the models to the MATLAB workspace. To export a model from the app, drag the model icon to the To Workspace rectangle. Alternatively, right-click the icon to open the Data/model Info dialog box. Click Export to export the model.
Control System Toolbox software provides both the SISO Design Tool and commands for working at the command line. You can import linear models directly into SISO Design Tool using the following command:
sisotool(model)
You can also identify a linear model from measured SISO data and tune a PID controller for the resulting model in the PID Tuner. You can interactively adjust the identified parameters to obtain an LTI model whose response fits your response data. The PID Tuner automatically tunes a PID controller for the identified model. You can then interactively adjust the performance of the tuned control system, and save the identified plant and tuned controller. To access the PID Tuner, enter pidTuner at the MATLAB command line. For more information, see PID Controller Tuning.
You can convert linear identified models into numeric LTI models (ss, tf, zpk) of Control System Toolbox software.
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 converts the noise component of a linear identified model, sys, to a numeric state-space model:
noise_model_ss = idss(sys,'noise');
To convert both the measured and noise components of a linear identified model, sys, to a numeric state-space model:
model_ss = idss(sys,'augmented');
For more information about subreferencing the dynamic or the noise model, see Separation of Measured and Noise Components of Models.
If you have the Control System Toolbox software, you can plot models in the LTI Viewer from either the System Identification app or the MATLAB Command Window.
The LTI Viewer is a graphical user interface for viewing and manipulating the response plots of linear models.
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 app contains the To LTI Viewer rectangle. To plot models in the LTI Viewer, do one of the following:
Drag and drop the corresponding icon to the To LTI Viewer rectangle in the System Identification app.
Right-click the icon to open the Data/model Info dialog box. Click Show in LTI Viewer to plot the model in the LTI Viewer.
Alternatively, use the following syntax when working at the command line to view a model in the LTI Viewer:
ltiview(model)
If you have the Control System Toolbox software, you can combine linear model objects, such as idtf, idgrey, idpoly, idproc, and idss model objects, similar to the way you combine LTI objects. The result of these operations is a numeric LTI model that belongs to the Control System Toolbox software. The only exceptions are the model stacking and model concatenation operations, which deliver results as identified models.
For example, you can perform the following operations on identified models:
G1+G2
G1*G2
append(G1,G2)
feedback(G1,G2)