Guy on Simulink

Simulink & Model-Based Design

Configuring Models for Linear Analysis

One of the benefits of Model-Based Design is the ability to perform linear analysis on your non-linear model and design controllers using classical controls techniques. In R2013a, configuring your model for linear analysis with Simulink Control Design have been greatly improved. Let's take a look at how useful Linear Analysis Points are when performing control related tasks in Simulink.

Why using Linear Analysis Points?

Those doing linear analysis with Simulink for a long time are probably familiar with the linmod function. With linmod, the inputs and outputs of the linearization are the root-level Inport and Outport blocks of your model. This means that your model needs to be built in a specific way to accommodate linear analysis.

With Simulink Control Design, you can use Linear Analysis Points to specify which portion of a model to linearize.

To see all the advantages of Simulink Control Design compared to linmod, I recommend going through this documentation page: Linearization Using Simulink Control Design Versus Simulink.

Specifying Linear Analysis Points in a model

Let's take this model as example.

Example model to be linearized

To design a controller, the first thing I am interested in is linearizing the plant. For that, I can right click on the signals entering and exiting the plant, and mark them as Open-loop Input and Open-loop Output. For those already familiar with Simulink Control Design, notice the new improved menu in R2013a.

Linear Analysis Points Menu

Once this is done, you will see markers in your model for the marked signals.

model With Linear Analysis Points

Specifying Multiple sets of Linear Analysis Points

When developing controllers for your model, you will very likely need to accomplish linear analysis multiple times for different parts of your model, open and closed loop, with different inputs and outputs. For that, you can click on Create new linearization I/Os... in the Linear Analysis Tool.

Create new linearization I/Os...

This will launch a window where you can define multiple sets of points for your different tasks.

Creating new linearization I/Os

Once you are done, you can select the set of points to be used for linearization.

Using existing linear analysis points

Now it's your turn

For those familiar with the earlier version of this menu, I recommend looking at the R2013a release notes to find a table describing the mapping between the previous and current Linear Analysis Points menu. Hopefully, this new menu will help avoid confusion when specifying linear analysis points, especially with the open and closed loop concept.

If you prefer, all the above is also available from the command line with functions like linio, getlinio, and setlinio.

Give that a try and let us know what you think by leaving a comment here.

  • print


To leave a comment, please click here to sign in to your MathWorks Account or create a new one.