| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink Control Design |
| Contents | Index |
| Learn more about Simulink Control Design |
| On this page… |
|---|
How to Choose Linearization Settings and Algorithms Options for Linearization Algorithm Method Block-by-Block Analytic Linearization |
To change the linearization settings and algorithms, select Tools > Options in the Control and Estimation Tools Manager window, and then click the Linearization tab. This opens the Linearization Task Options dialog box.

To get help on each option or setting in the Options dialog box, right-click an option's label and select What's This?.

For more information on these settings, refer to the linoptions reference page. For information about numerical-perturbation linearization, which is used when you select Numerical perturbation as the Linearization algorithm parameter, see Numerical-Perturbation Linearization.
You can choose from the following two linearization methods in the Simulink Control Design software:
Block-by-block analytic linearization (the default method)
Numerical-perturbation linearization
Note To use numerical-perturbation linearization, you must select an option in the Linearization Options dialog box of the GUI, or if you are using functions, with the linoptions function. |
The default linearization method, block-by-block analytic linearization, linearizes the blocks individually and then combines the results to produce the linearization of the whole system. This method has several advantages:
It divides the linearization problem into several smaller, easier problems.
It defines the system being linearized by input and output markers on the signal lines rather than root-level inport and outport blocks.
It supports open-loop analysis.
You can control the linearization of each block by using an analytic linearization that is programmed into the block or by selecting a perturbation level for the block.
You can compute linearized models with exact representations of continuous time delays.
For more information, see Block-by-Block Analytic Linearization.
Numerical-perturbation linearization linearizes the whole system by numerically perturbing the system's inputs and states around the operating point. The advantage of this method is that it is quick and simple, especially for large or complicated systems. However, there are also several disadvantages with this method:
It relies on root-level inport and outport blocks to define the system being linearized.
There is no support for open-loop analysis.
You have limited control over the perturbation levels for each block.
It does not use any of the analytic, preprogrammed block linearizations.
It is sensitive to scaling issues (models with large and small signal values).
For more information, see Numerical-Perturbation Linearization.
Block-by-block analytic linearization is the default linearization method in the Simulink Control Design software. This method linearizes each block within the linearization path individually.
There are two types of block-by-block linearization:
Each method has options that you can control to create accurate linearized models.
You can linearize blocks with analytic Jabcobians using analytic linearization. This type of linearization results in an exact linearization of each block. When you linearize a system using block-by-block analytic linearization, the Simulink Control Design software uses these exact linearizations instead of numerically perturbing the block. This approach is especially useful for blocks that contain discontinuities and do not give good results using numerical perturbation.
Note The preprogrammed, analytic block linearizations are only used in block-by-block analytic linearization. When you use the numerical-perturbation linearization method, such blocks are numerically perturbed with the rest of the system. |
When you cannot use a preprogrammed block linearization, the Simulink Control Design software automatically computes the block linearization by numerically perturbing the states and inputs of the block about the operating point of the block. As opposed to the numerical-perturbation linearization method, this perturbation is local and its propagation through the rest of the model is restricted.
Block Perturbation Algorithm. The block perturbation algorithm introduces a small perturbation to the nonlinear block and measuring the response to this perturbation. Both the perturbation and the resulting response are used to create the matrices in the linear state-space model of this block. Changing the size of the perturbations changes the resulting linearized model.
As described in What Is Linearization?, you can write a nonlinear Simulink block as a state-space system:
![]()
In these equations, x(t) represents the states of the block, u(t) represents the inputs of the block, and y(t) represents the outputs of the block.
A linearized model of this system is valid in a small region around the operating point t=t0, x(t0)=x0, u(t0)=u0, and y(t0)=g(x0,u0,t0)=y0. Subtracting the operating point values from the states, inputs, and outputs defines a set of variables centered about the operating point:

You can write the linearized model in terms of these new variables. The representation is usually valid when the variables are small, i.e., when the departure from the operating point is small:
![]()
The state-space matrices A, B, C,
and D of this linearized model represent the
Jacobians of the block, as defined in What Is Linearization?. To compute the matrices, the states
and inputs are perturbed, one at a time, and the response of the system
to this perturbation is measured by computing
and δy.
The perturbation and response are then used to compute the matrices
in the following way:

where
xp,i is the state vector whose ith component is perturbed from the operating point value.
xo is the state vector at the operating point.
up,i is the input vector whose ith component is perturbed from the operating point value.
uo is the input vector at the operating point.
is the value of
at xp,i, uo.
is the value of
at up,i, xo.
is the value of
at the operating point.
is the value of
at xp,i, uo.
is the value of
at up,i, xo.
yo is the value of y at the operating point.
Linearized models of discrete-time are computed in a similar way. For more information, see Linearizing Discrete-Time and Multirate Models for the equations of linearized discrete-time and multirate systems.
Note
A perturbed value is one that has been
changed by a very small amount from the operating point value. The
default difference between the perturbed value and the operating point
value is
|
You can linearize models with time delays using:
Padé approximation provides the following results:
An approximate representation of continuous delays using the Padé order you specify in the block dialog for the delay Simulink blocks
Discrete delays as states
For more information, see Finding Linearized Models with Padé Approximation of Delays.
Exact linearization provides the following results:
An exact representation of continuous delays
An internal representation of discrete delays
These discrete delays do not appear as states in the linearized model but are accounted for as internal delays.
For more information, see Finding Linearized Models with Exact Delays.
Blocks with Delays. The delays in your model can arise from any of the following Simulink blocks:
Transport Delay
Variable Time Delay
Variable Transport Delay
Integer Delay
Unit Delay
For more information on time delays, see Time Delays in the Control System Toolbox documentation.
Finding Linearized Models with Padé Approximation of Delays. To find linearized models with Padé approximations of delays, first adjust the order of the Padé approximation in the Block Parameters window for any block with delay. Then, perform the linearization.
Note To use a Padé approximation for continuous delay blocks, set the UseExactDelayModel option of the linoptions function to the default setting, off. |
For more information on Padé approximations, see Eliminating Time Delays: Padé Approximation in the Control System Toolbox documentation.
Finding Linearized Models with Exact Delays. You can use block-by-block analytic linearization to find linear models with exact time delays. You can do this in the following ways:
In the Linearizations Options dialog box, select the Return linear model with exact delay(s) option.
For more information on the Linearization Option dialog box, see Choosing Linearization Settings and Algorithms.
At the command line, set thelinoptions function option UseExactDelayModel to on.
For more information, see the "Linearizing Models with Time Delays" demo listed under the Simulink Control Design Demos in the demos browser.
There are several Simulink blocks that contain discontinuities, such as the Sign block, whose behavior is shown in the following figure.

The very large derivatives that occur at the point of discontinuity can cause problems with linearization. For example, the Sign block has the following linearization
![]()
where D is a state-space matrix, and u is the input signal to the block.
When these blocks are within the linearization path of your model, the resulting linearized model could potentially have very large values. There is no obvious solution to this problem and it is recommended that you remove or replace these blocks. However, when your model operates in a region away from the point of discontinuity, the linearization will be zero. This should not cause any problems, although when the linearizations of several blocks are multiplied together (as in a feedback path) it can cause the linearization of the system to be zero.
When these blocks are outside the linearization path, they can still contribute to the definition of the operating point of the model but will not otherwise affect the linearization. It is safe to use them for reference signals, disturbances, and any other signals and blocks that are not being linearized.
Other examples of blocks with discontinuities include
Relational Operator blocks
Relay block
Logical Operator blocks
Stateflow blocks
Quantizer block (has an option to treat as a gain when linearizing)
Saturation block (has an option to treat as a gain when linearizing)
Deadzone block (has an option to treat as a gain when linearizing)
When an Integrator block has an external reset condition or output limitations (saturation) and the model is operating near the point where the Integrator is reset or the output is limited, it might be more meaningful for the linearization to ignore the effect of the saturation or reset. To linearize a model around an operating point that causes the integrator to reset or saturate, select Ignore limit and reset when linearizing in the Integrator block parameters dialog box. Selecting this option causes the linearization to treat this block as unresettable and as having no limits on its output, regardless of the settings of the block's reset and output limitation (saturation) options.

The linearization of triggered subsystems and other event-based models can be particularly difficult because of the system's dependence on previous events. In particular, the execution of a triggered system depends on previous signal events such as zero crossings. Therefore, for linearization, which takes place at a particular moment in time, a trigger event will never happen. Thus, while the event-based dynamics contribute to the definition of the system's operating point, this information is not captured by the list of values of states and inputs that typically describe the operating point for linearization.
Triggered events describe many different systems. One such system is an internal combustion (IC) engine. When an engine piston approaches the top of a compression stroke, a spark is introduced and combustion occurs. The timing of the spark for combustion is dependent on the speed and position of the engine crankshaft. An example of a Simulink model that models this behavior is engine.mdl which is included as a demonstration model in the Simulink product.
In engine.mdl, triggered subsystems generate events when the pistons reach both the top and bottom of the compression stroke. The linearization will not be meaningful because of the presence of these triggered subsystems. However, you can get a meaningful linearization while still preserving the simulation behavior by recasting the event-based dynamics. For example, you can use curve fitting to approximate the event-based behavior. This is done in scdspeed.mdl, a demonstration model included in the Simulink Control Design product, shown in the figure below:

The basic functional approximation in scdspeed is included within the Convert to mass charge block inside the subsystem scdspeed/Throttle & Manifold/Intake Manifold where a quadratic polynomial is used to approximate the relationship between the Air Charge, the Manifold Pressure, and the Engine Speed.

The approximation has the following form:
![]()
Simulation data from the original model is used to compute the unknown parameters p1, p2, p3, p4, and p5 using a least squares fitting technique.
When measured data for internal signals is available, you can use the Simulink Design Optimization software to compute the unknown parameters. This method is outlined in the Simulink Design Optimization demo called Engine Speed Model Parameter Estimation. The demo also shows how to linearize this model and use the linearization to design a feedback controller.
The approximated model can now accurately simulate and linearize the engine from approximately 1500 to 5500 RPM. The following figure shows the comparison between a simulation of the original event-based model, and a simulation of the new approximated model.

Many industrial applications use Pulse Width Modulation (PWM) signals because of their robustness in the presence of noise. The following figure shows two examples of PWM signals. In the first example, a DC voltage of 0.2V is represented by a PWM signal with a 20% duty cycle (a value of 1 for 20% of the cycle, followed by a value of 0 for 80% of the cycle). The average signal value is 0.2V. The second example shows a PWM representation of a 0.8V DC signal, where the duty cycle is 80%.

The model, scdpwm.mdl, shown below, converts a constant signal to a PWM signal.

When linearizing a model containing PWM signals there are two effects of linearization you should consider:
The signal level at the operating point is one of the discrete values within the PWM signal, not the DC signal value. For example, in the model above, the signal level is either 0 or 1, not 0.8. This change in operating point affects the linearized model.
The creation of the PWM signal within the subsystem Voltage to PWM, shown in the following figure, uses a comparator block, the Compare to Zero block. Comparator blocks do not linearize well due to their discontinuities and the nondouble outputs.

A solution to these two problems is to consider removing the PWM block before linearizing the model.
An alternative linearization method available for use in the Simulink Control Design software is numerical-perturbation linearization, which computes state-space matrices for the linearized model by numerical perturbation of the whole system. The method is relatively quick and simple, although as mentioned in Options for Linearization Algorithm Method, it does have some disadvantages.
Numerical-perturbation linearization requires that root-level inport and outport blocks be present in the model. These blocks define the portion of the model that you want to linearize instead of inserting input and output points by right-clicking on the signal lines. Any input, output, or open-loop points on signal lines in the model will be ignored when using numerical-perturbation linearization.
The perturbation is introduced to the system at the root level inport blocks and in the states of the system. The response to the perturbation is measured at the outport blocks.Suggestions for controlling the results of numerical-perturbation linearization to create accurate linearized models are given in Controlling the Results of Numerical-Perturbation Linearization
Prior to Simulink 3.0, numerical-perturbation linearization was the only linearization method available with the Simulink product. Although block-by-block analytic linearization is now the default linearization method, you might choose to use numerical-perturbation linearization if your model is very large or complicated.
To use numerical-perturbation linearization with the Simulink Control Design GUI, select Tools > Options while in the Linearization Task node of the Control and Estimation Tools Manager and select Numerical-Perturbation from the Linearization Algorithms menu.
To use numerical-perturbation linearization with the linearize function, set the LinearizationAlgorithm option to 'numericalpert' with the linoptions function.
linopt=linoptions('LinearizationAlgorithm','numericalpert')
To linearize the model, type
sys=linearize('modelname',op,linopt)
where modelname is the name of the model being linearized and op is the operating point object for the system.
The numerical perturbation algorithm involves introducing a small perturbation to the nonlinear model and measuring the response to this perturbation. Both the perturbation and the response are used to create the matrices in the linear state-space model. Changing the size of the perturbations will change the resulting linearized model.
As described in What Is Linearization?, a nonlinear Simulink model can be written as a state-space system:
![]()
In these equations, x(t) represents the states of the model, u(t) represents the inputs of the model, and y(t) represents the outputs of the model.
A linearized model of this system is valid in a small region around the operating point t=t0, x(t0)=x0, u(t0)=u0, and y(t0)=g(x0,u0,t0)=y0. Subtracting the operating point values from the states, inputs, and outputs defines a set of variables centered about the operating point:

The linearized model can be written in terms of these new variables and is usually valid when these variables are small, i.e. when the departure from the operating point is small:
![]()
The state-space matrices A, B, C,
and D of this linearized model represent the
Jacobians of the system, as defined in What Is Linearization?. To compute the matrices, the states
and inputs are perturbed, one at a time, and the response of the system
to this perturbation is measured by computing
and δy.
The perturbation and response are then used to compute the matrices
in the following way

where
xp,i is the state vector whose ith component is perturbed from the operating point value.
xo is the state vector at the operating point.
up,i is the input vector whose ith component is perturbed from the operating point value.
uo is the input vector at the operating point.
is the value of
at xp,i, uo.
is the value of
at up,i, xo.
is the value of
at the operating point.
is the value of
at xp,i, uo.
is the value of
at up,i, xo.
yo is the value of y at the operating point.
Linearized models of discrete-time or multirate systems are computed in a similar way. For more information, see Linearizing Discrete-Time and Multirate Models.
Note
A perturbed value is one that has been changed by a very small
amount from the operating point value. The default difference between
the perturbed value and the operating point value is
|
Several factors influence the creation of accurate linearized models. What Is Linearization? discusses some of these factors, such as careful selection of operating points. Factors that are particular to numerical-perturbation linearization are presented here, with suggestions for controlling them.
Setting the Perturbation Level. In numerical-perturbation linearization, there are three options for setting the perturbation levels of states and inport blocks:
You can accept the default perturbation
levels. The default perturbation levels for the states are
, where x is
a Simulink structure or vector of the operating point values
for the states in the model. Similarly, default perturbation levels
for the inport blocks are
,
where u is a Simulink structure or vector
of the operating point values for the inputs in the model.
You can edit the linearization property NumericalPertRel using the linoptions function. The value of this property adjusts the perturbations in the following way:
The perturbation of the states is
.
The perturbation of the inputs is
.
When using the Control and Estimation Tools Manager graphical interface, select Tools > Options to open the Options dialog, and then select the Linearization tab-pane. Within the Linearization pane, make sure that you have selected Numerical perturbation as the Linearization algorithm and then enter a value for Relative Perturbation level under Options for numerical perturbation algorithm.
You can provide individual perturbation levels for each state and inport block. These values override the values computed using the NumericalPertRel value. Set the perturbation levels using the linoptions function to edit the linearization properties NumericalXPert and NumericalUPert. To specify the absolute perturbation levels for NumericalXPert and NumericalUPert, you can use the operpoint function to create an operating point object and then edit the operating point values using dot-notation or the set function.
In the Control and Estimation Tools Manager graphical interface, select Tools > Options to open the Options dialog box, and then select the Linearization tab-pane. In the Linearization pane, verify that you have selected Numerical perturbation as the Linearization algorithm. Then enter values for State Perturbation level and Input Perturbation level under Options for numerical perturbation algorithm. You can enter either scalars or operating point objects created with the operpoint function. State Perturbation level and Input Perturbation level values override Relative Perturbation level values.
Example: Linearizing a Model Using Numerical-Perturbation at the MATLAB Command Line. The following example illustrates how to linearize a model at the MATLAB command line using numerical perturbation.
Open the model.
This example uses the scdairframe_reference.mdl model, included with Simulink Control Design product. The model uses a Model block to reference another Simulink model, eom.mdl.
At the MATLAB command line, enter
scdairframe_reference
to open this model.
Set Inport and Outport blocks.
Linearization using the numerical perturbation algorithm is between the root level Inport and Outport blocks, rather than input and output points on signal lines. If your model does not already contain Inport or Outport blocks, you need to add them to the points where you want to perturb the model and measure the response.
Create an operating point object for the model.
There are several possible methods for creating an operating point object. Which one you use depends on the model you are using and the information you have about the operating point. For more information on creating operating points, see Ways to Create Operating Points.
In this example, you create a default operating point with the following command:
op_point=operpoint('scdairframe_reference')Specify the linearization algorithm.
By default, the linearization algorithm is set to block-by-block linearization. To change the algorithm to numerical perturbation you need to create a linearization options object and set the 'LinearizationAlgorithm' field to 'numericalpert', using the following command:
options=linoptions('LinearizationAlgorithm','numericalpert')Set the perturbation levels.
By default, the state and input perturbation levels are set to
![]()
and
![]()
respectively, where |x| and |u| are the absolute values of the states and inputs. These values should be sufficient for most applications and you should not typically need to change them. However, if you want to specify individual perturbation values for each state, you can:
Create an operating point object, and edit the state values within this object
Then, assign these values to the NumericalXPert option, using the following commands:
state_pert=operpoint('scdairframe_reference');
state_pert.states(1).x=[1e-8;1e-9];
state_pert.states(2).x=1e-7;
state_pert.states(3).x=[1e-7;1e-8];
state_pert.states(4).x=1e-9;
options.NumericalXPert=state_pert;Linearize the model.
The following command linearizes the model about the chosen operating point, using the perturbation settings in the linearization options object, and returns the state-space matrices of the linearized model:
sys=linearize('scdairframe_reference',op_point,options)Example: Linearizing a Model Using Numerical-Perturbation in the GUI. The previous example showed how to linearize the scdairframe_reference.mdl using Simulink Control Design functions for numerical perturbation. The following example uses the numerical perturbation algorithm to linearize the same model within the Control and Estimation Tools Manager graphical interface.
Open the model.
This example uses the scdairframe_reference.mdl model, included with the Simulink Control Design product. The model uses a Model block to reference another Simulink model, eom.mdl.
At the MATLAB command line, enter
scdairframe_reference
to open this model.
Set Inport and Outport blocks.
Linearization using the numerical perturbation algorithm relies on perturbing root level Inport and Outport blocks, rather than input and output points on signal lines. If your model does not already contain Inport or Outport blocks, you need to add them to the points where you want to perturb the model, and measure the response.
Note In this example, the scdairframe_reference model already contains one Inport block and two Outport blocks. |
You should notice that since you will numerically perturb this model using root-level Inport and Outport blocks, you cannot specify any linearization points in the Analysis I/Os pane of the Linearization Task.
Open a linearization task for the model in the Control and Estimation Tools Manager. Then, in the scdairframe_reference.mdl model window, select Tools > Control Design > Linear Analysis.
This opens the Control and Estimation Tools Manager and creates a task for linearization.
Create an operating point object for the model.
There are several possible methods for creating operating point objects. Which one you use depends on the model you are using and the information you have about the operating point. For more information on creating operating points, see Ways to Create Operating Points.
This example uses the default operating point for the linearization.
Specify the linearization algorithm.
To select numerical perturbation linearization as the algorithm, select Tools > Options within the Control and Estimation Tools Manager to open the Options dialog, select the Linearization pane in the Options dialog, and then select Numerical perturbation as the Linearization algorithm.
Set the perturbation levels.
To use perturbation levels other than the default settings, select Tools > Options within the Control and Estimation Tools Manager to open the Options dialog, and then select the Linearization pane. Under Options for numerical perturbation algorithm, enter perturbation values. The perturbation values can be either scalars, vectors, operating point objects, or Simulink structures of state values.
For this example, enter 1e-9 in the State perturbation level box. This value overrides the state perturbation values computed from the Relative perturbation level setting. However, because you have not explicitly specified the Input perturbation level, the algorithm still uses the Relative perturbation level setting to compute input perturbations.
Linearize the model:
Select Linearization Task in the pane on the left of the Control and Estimation Tools Manager.
Select the Operating Points pane on the right.
Within the Operating Points pane, select the operating point that you want to use for the linearization. For this example, there should be only one choice, the default operating point.
Click the Linearize Model button to linearize the model around this operating point. The results are plotted in the LTI Viewer.
Handling Feedback Loops. Performing Open-Loop Analysis discusses the effect of feedback loops on the results of a linearization. With block-by-block analytic linearization, you can perform open-loop analysis without removing feedback loops. When using numerical-perturbation linearization, the only way to remove the effect of feedback loops is to manually remove them from the model and manually force the operating point to remain the same as the original model.
In some control applications it may be necessary to order the states of the linearized models. To specify the state ordering in the GUI, select Tools > Options, and then click the Linearization State Ordering tab. This opens the Linearization Task Options dialog box.

To specify the order of the states, select the Enable state ordering check box at the bottom of the tab. Then, use the Move Up and Move Down buttons to move states to a new position in the list. When you add new states to or remove existing states from the model diagram, click the Sync with Model button to update the list.
Note For information on changing state ordering using the command line, see the linearize reference page. |
![]() | Steps for Linearizing Models Using the GUI | Configuring the Linearization of Specific Blocks and Subsystems | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |