MATLAB Examples

Compute a steady-state operating point by specifying known state values and constraints.

Linearize a Simulink® model at the model operating point using the docid:slcontrol_ug#bvflwv7 command.

Obtain a Linear Parameter Varying (LPV) approximation of a Simscape Power Systems™ model of a Boost Converter. The LPV representation allows quick analysis of average behavior at various

Use Simulink Control Design, using a drum boiler as an example application. Using the operating point search function, we illustrate model linearization as well as subsequent state

Linearize an engine speed model.

Use the time based operating point snapshot feature in Simulink Control Design. This example uses a model of the dynamics of filling a cylinder with compressed air.

The use of the operating point search and snapshot features along with the linearization of a Simscape Multibody model. (Requires Simscape Multibody)

Linearize a process model at steady state operating point.

Trim and linearize an airframe. We first need to find the elevator deflection and the resulting trimmed body rate (q) that will generate a given incidence value when the airframe is traveling

Find a steady-state operating point for a Simscape™ Multibody™ model using findop with a projection-based optimizer. Results are verified using simulation.

Design a controller for a voltage-mode boost converter modeled in Simulink® using Simscape Power Systems™ components. The frequency response of the model is estimated using the Linear

Tune multiple compensators (feedback and prefilter) to control a single loop.

Model computational delay and sampling effect using Simulink Control Design.

Generate an array of LTI models that represents the plant variations of a control system from a Simulink model. This array of models is used in the Control System Designer for control design.

Tune two cascaded feedback loops using Simulink Control Design.

Enable custom masked subsystems in Control System Designer. Once configured, you can tune a custom masked subsystem in the same way as any supported blocks in Simulink Control Design. For

Use Compensator Editor dialog box to tune Simulink blocks.

Model a scalar gain K with a bilinear dependence on two scheduling variables, and V. Suppose that is an angle of incidence that ranges from 0 to 15 degrees, and V is a speed that ranges from 300 to

Plot linearization of a Simulink model at particular conditions during simulation. The Simulink Control Design software provides blocks that you can add to Simulink models to compute and

Use Simulink Control Design from command line. The MATLAB functions available in Simulink Control Design software allow for the programmatic specification of the input and output points

Specify the rate conversion method for the linearization of a multirate model. The choice of rate conversion methodology can affect the resulting linearized model. This example

The process that the command linearize uses when extracting a linear model of a nonlinear multirate Simulink model. To illustrate the concepts, the process is first performed using

Specify the linearization of a Simulink block or subsystem.

Use the slLinearizer interface to batch linearize a Simulink model. You vary model parameter values and obtain multiple open- and closed-loop transfer functions from the model.

Linearize a Simulink model with delays in it.

Use System Identification Toolbox to identify a linear system for a model component that does not linearize well and use the identified system to specify its linearization. Note that

Use the command LINEARIZE to speed up the batch linearization where a set of block parameters are varied.

The features available in Simulink Control Design for linearizing models containing references to other models with a Model block.

Approximate the nonlinear behavior of a system as an array of interconnected LTI models.

Generate operating points using triggered snapshots.

Use the Linearization Advisor to debug the linearization of a pendulum model in the Linear Analysis Tool.

Obtain the frequency response of Simulink models when analytical block-by-block linearization does not provide accurate answer due to event-based dynamics in the linearization path.

Use the frequency response estimation to perform a sinusoidal-input describing function analysis, for a model with a saturation nonlinearity.

Illustrates how to use parallel computing for speeding up frequency response estimation of Simulink models. In some scenarios, the command FRESTIMATE performs multiple Simulink

Use frequency response estimation in order to validate a block-by-block analytical linearization result obtained with the command LINEARIZE on the lightweight airplane model. Note that

Estimate the frequency response of a Simulink® model at the MATLAB® command line.

Disable noise sources in your Simulink® model during frequency response estimation. Such noise sources can interfere with the signal at the linearization output points and produce

Use the slLinearizer interface to batch linearize a Simulink® model. You linearize a model at multiple operating points and obtain multiple open-loop and closed-loop transfer functions

Use the linearize command to batch linearize a model at varying operating points.

In this example, you vary model parameters and linearize a model at its nominal operating conditions using the linearize command.

Use the slLinearizer interface to batch linearize a Simulink® model. You vary model parameter values and obtain multiple open-loop and closed-loop transfer functions from the model.

If your application includes parameter variations that affect the operating point of the model, you must batch trim the model for the parameter variations before linearization. Use this

Compute a linear model of the combined controller-plant system without the effects of the feedback signal. You can analyze the resulting linear model using, for example, a Bode plot.

Linearize a plant subsystem in a Simulink® model using the docid:slcontrol_ug#bvflwv7 command.

Debug the linearization of a Simulink model at the command line using a LinearizationAdvisor object. You can also troubleshoot linearization results interactively. For more

Use the blocks in Linear Analysis Plots and Model Verification libraries of Simulink Control Design. The Simulink Control Design software provides blocks that you can add to Simulink

View and modify the states in a Simulink model using an operating point object.

Obtain multiple operating points for a model by varying parameter values. You can study the controller robustness to plant variations by batch linearizing the model using the trimmed

Batch trim a model when the specified parameter variations affect the known states for trimming.

Find operating points for multiple operating point specifications using the findop command. You can batch linearize the model using the operating points and study the change in model

Initialize operating point values for optimization-based operating searches.

Typically, when computing a steady-state operating point using an optimization-based search, you specify known fixed values or bounds to constrain your model states, inputs, or outputs.

Compute a steady-state operating point by specifying known output values and constraints.

Compute a steady-state operating point at specified simulation snapshot times.

Automatically tune a PID Controller block using PID Tuner.

Tune a PID controller for plants that cannot be linearized. You use the PID Tuner to identify a plant for a buck converter. Then tune the PID controller using the identified plant.

Design a PI controller with frequency response estimated from a plant built in Simulink. This is an alternative PID design workflow when the linearized plant model is invalid for PID design

Design an array of PID controllers for a nonlinear plant in Simulink that operates over a wide range of operating points.

Use Online PID Tuner block to tune a PI controller of an engine speed control system in both simulation and real time.

One of several ways to tune a PID controller for plants that cannot be linearized. In this example, you use the Frequency Response Based PID Tuner to automatically characterize the frequency

Choose your country to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a location from the following list:

See all countries