Main Content

Using Identified Models for Control Design Applications

HowControl System ToolboxSoftware Works with Identified Models

System Identification Toolbox™ software integrates with Control System Toolbox™ software by providing a plant for control design.

Control System Toolbox software also provides the Linear System Analyzer 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 thelinapp,idnlarx/linearize, oridnlhw/linearizereference 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.

Using balred to Reduce Model Order

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 usebalredto compute a state-spate model approximation with a reduced model order.

To learn how you can reduce model order using pole-zero plots, seeReducing Model Order Using Pole-Zero Plots.

Compensator Design UsingControl System ToolboxSoftware

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 theTo Workspacerectangle. Alternatively, right-click the icon to open the Data/model Info dialog box. ClickExportto export the model.

Control System Toolbox software provides both theControl System Designerand commands for working at the command line. You can import linear models directly intoControl System Designerusing the following command:

controlSystemDesigner(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, enterpidTunerat the MATLAB command line. For more information, seePID Controller Tuning(Control System Toolbox).

Converting Models to LTI Objects

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.

将模型转换为线性时不变对象的命令

Command Description Example
frd(Control System Toolbox)

Convert to frequency-response representation.

ss_sys = frd(model)
ss(Control System Toolbox)

Convert to state-space representation.

ss_sys = ss(model)
tf(Control System Toolbox)

Convert to transfer-function form.

tf_sys = tf(model)
zpk(Control System Toolbox)

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, seeSeparation of Measured and Noise Components of Models.

Viewing Model Response Using the Linear System Analyzer

What Is the Linear System Analyzer?

如果you have the Control System Toolbox software, you can plot models in the Linear System Analyzer from either the System Identification app or the MATLAB Command Window.

The Linear System Analyzer is a graphical user interface for viewing and manipulating the response plots of linear models.

Note

The Linear System Analyzer does not display model uncertainty.

For more information about working with plots in the Linear System Analyzer, see theLinear System Analyzer Overview(Control System Toolbox).

Displaying Identified Models in the Linear System Analyzer

When the MATLAB software is installed, the System Identification app contains theTo LTI Viewerrectangle. To plot models in the Linear System Analyzer, do one of the following:

  • Drag and drop the corresponding icon to theTo LTI Viewerrectangle in the System Identification app.

  • Right-click the icon to open the Data/model Info dialog box. ClickShow in LTI Viewerto plot the model in the Linear System Analyzer.

Alternatively, use the following syntax when working at the command line to view a model in the Linear System Analyzer:

linearSystemAnalyzer(model)

Combining Model Objects

如果you have the Control System Toolbox software, you can combine linear model objects, such asidtf,idgrey,idpoly,idproc, andidssmodel 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)

Related Topics