Main Content

Linearize Plant

You can linearize a block or subsystem in your Simulink®model without defining separate analysis points for the block inputs and outputs. The software isolates the selected block from the rest of the model and computes a linear model of the block from the block inputs to the block outputs.

Linearizing a block in this way is equivalent to specifying open-loop input and open-loop output analysis points at the block inputs and outputs, respectively. For more information on specifying analysis points in your model, seeSpecify Portion of Model to Linearize.

Linearize Plant UsingModel Linearizer

This example shows how to linearize a plant subsystem in a Simulink model using theModel Linearizer.

Open Simulink model.

mdl ='watertank'; open_system(mdl)

For this model, theWater-Tank Systemblock contains all the nonlinear dynamics. To linearize the block, use theModel Linearizer.

To open theModel Linearizerwith the inputs and outputs of the block selected as the linearization I/O set, first open theLinearizationtab. To do so, in the Simulink model window, in theAppsgallery, click线性化的魔法ger.

In the model, click theWater-Tank Systemblock. Then, on theLinearizationtab, clickLinearize Block.

In theModel Linearizer, on theLinear Analysistab, in theAnalysis I/Osdrop-down list, the software sets the I/O set for linearization toBlock: Water-Tank System.

Alternatively, if theModel Linearizeris already open for your system, in the Simulink model window, click theWater-Tank Systemblock. Then, in theModel Linearizer, in theAnalysis I/Osdrop-down list, selectLinearize the Currently Selected Block.

Tip

When the specified linearization I/O set is a block, you can highlight the block in the model by selecting the view option from theAnalysis I/Osdrop-down list. For example, to highlight theWater-Tank Systemblock, selectView Water-Tank System.

For this example, use the model operating point for linearization. The model operating point consists of the initial state values and input signals stored in the model. In theModel Linearizer, on theLinear Analysistab, in theOperating Pointdrop-down list, leaveModel Initial Conditionselected. For information on linearizing models at different operating points, seeLinearize at Trimmed Operating PointandLinearize at Simulation Snapshot.

To linearize the specified block and generate a Bode plot for the resulting linear model, clickBode.

The software adds the linearized model,linsys1, to theLinear Analysis Workspaceand generates a Bode plot for the model.

For more information on analyzing linear models, seeAnalyze Results Using Model Linearizer Response Plots.

You can also export the linearized model to the MATLAB®workspace. To do so, in theData Browser, draglinsys1from theLinear Analysis Workspaceto theMATLAB Workspace.

在命令行线性化植物

This example shows how to linearize a plant subsystem in a Simulink® model using thelinearizecommand.

Open Simulink model.

mdl ='watertank'; open_system(mdl)

For this system, the Water-Tank System block contains all the nonlinear dynamics. To linearize this subsystem, first specify its block path.

blockpath ='watertank/Water-Tank System';

Then, linearize the plant subsystem at the model operating point.

linsys1 = linearize(mdl,blockpath);

模型由最初的操作点state values and input signals stored in the model. For information on linearizing models at different operating points, seeLinearize at Trimmed Operating PointandLinearize at Simulation Snapshot.

You can then analyze the response of the linearized model. For example, plot its Bode response.

bode(linsys1)

For more information on analyzing linear models, seeLinear Analysis.

See Also

|

Related Topics