| Simulink® Control Design™ | ![]() |
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. |
You can control the linearization of several types of blocks by adjusting options in the Block Parameters window. For example, you can change the order of the Padé approximation used in the Transport Delay block or select the Treat as gain when linearizing option in the Saturation block. For more information on controlling the linearization of individual blocks, see the reference page for each block.
You can view a list of the blocks in your model that automatically linearize using numerical perturbation instead of analytic linearization because they do not contain analytic Jacobians. View this list in the diagnostic messages tab for your linearization results in the Control and Estimation Tools Manager. For more information on this list, see Diagnosing Blocks in the Simulink Control Design documentation.
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.
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 Linearizing Models, 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 Linearizing Models. 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 Models in the Simulink Control Design getting started documentation 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
|
Changing the size of the
perturbations changes the linearization results. The default perturbation
size is 10-5(1+|x|),
where x is the operating point value of the state
or input being perturbed. For example, to change the perturbation
size of the states in the Magnetic Ball Plant block in the magball model to
,
type
blockname='magball/Magnetic Ball Plant' set_param(blockname,'StatePerturbationForJacobian','1e-7')
To change the perturbation size of the input of the Magnetic
Ball Plant block to
, where u is the
input signal level, follow these steps:
ph=get_param('magball/Magnetic Ball Plant','PortHandles')
pin=ph.Inport(1)
Finally, set the perturbation level for this inport:
set_param(pin,'PerturbationForJacobian','1e-7')
If there is more than one inport, you can choose to assign a different perturbation level to each. The following figure shows an S-Function block with two input signals, the actual signal and an index variable. To avoid perturbing the index signal, you can assign a perturbation level of 0 to this inport.

When linearizing model reference blocks with accelerated mode, the Simulink Control Design software automatically uses block perturbation. If you instead want to linearize these referenced models using block-by-block analytical linearization, then change the block mode from accelerated to normal.
Note Model blocks with multiple sample times and accelerated mode cannot be linearized using block perturbation. To linearize blocks with multiple sample times, you must set the block mode to normal. |
Note If your model contains multiple model blocks referencing the same Simulink model, you must set all of the blocks to accelerator mode. |
Blocks that have nondouble data type signals as either inputs or outputs, and which do not have a preprogrammed exact linearization, automatically linearize to zero as they cannot be numerically perturbed. For example, many logical operator blocks have Boolean outputs and therefore linearize to 0.
Workarounds for Blocks with Nondouble Data Types. To work around the problem of blocks with nondouble data types linearizing to zero, you can use a Data Type Conversion block. This block has a preprogrammed exact linearization, to convert your signals to doubles before linearizing the model. The following example illustrates this concept. The model in this example is configured to linearize the Square block at an operating point where the input is 1. The resulting linearized model should be 2, but the input to the Square block is Boolean and the linearization is zero.

However, by inserting a Data Type Conversion block before the linearization input point, you can make the input signal to the Square block a double. Thus, the linearized model gives the correct response of 2.

Overriding Nondouble Data Types. When you linearize a model that contains nondouble data types but still runs correctly in full double precision, you can choose to override all data types with doubles. To perform this override, in the model window select Tools > Fixed-Point > Fixed-Point Tool from the menu. This selection opens the Fixed-Point Settings window. Within this window select True doubles from the Data type override menu. Now, when you linearize and simulate the model, it uses doubles for all data types.
Note This method does not work when the model relies on other data types in its algorithm, such as relying on integer data types to perform truncation from floats. |
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.
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.
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.
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 Changing Linearization Options.
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® Parameter Estimation™ software to compute the unknown parameters. This method is outlined in the Simulink Parameter Estimation 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.

![]() | Choosing a Linearization Algorithm Method | Numerical-Perturbation Linearization | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |