| Simulink® Control Design™ | ![]() |
| On this page… |
|---|
Troubleshooting Your Model at the Subsystem and Block Level Troubleshooting Linearization Settings |
Blocks That Automatically Linearize Using Numerical Perturbation
Using Diagnostics Messages to Find Problematic Blocks in Your Model
During block-by-block analytic linearization, the linearization of each block in the linearization path of your model impacts the overall linearization results.
You can locate the blocks that impact your linearization results by highlighting the blocks in the linearization path. For instructions about highlighting blocks in the linearization path, see Highlighting Blocks in the Linearization.
Note If one of the blocks in the linearization path of your model does not highlight, it might have a linearization result of zero. You can use the Simulink Control Design diagnostic messages to determine if other blocks in your model are causing this block to linearize to zero. For information on how to view diagnostic messages, see Using Diagnostics Messages to Find Problematic Blocks in Your Model. |
Nearly all core Simulink blocks give accurate linearization results. The exceptions are the blocks that are not supported for linearization. See Unsupported Blocks for Linearization for information on how to locate these blocks.
In some cases, the accurate linearization results you obtain might not be the result you expect. If you encounter unexpected linearization results, you can use the Simulink Control Design diagnostic messages to identify which blocks are causing problems in your linearization. For information on how to view diagnostic messages, see Using Diagnostics Messages to Find Problematic Blocks in Your Model.
Note Blocks with discontinuities, such as relay and Boolean logic, linearize to zero or infinity. These blocks do not display in the diagnostic messages. If your model contains these blocks, verify that they linearize in the way that you expect. For information on how to find these blocks in your model, see Troubleshooting Your Model at the Subsystem and Block Level and The Model Explorer. For more information on blocks with discontinuities, see Blocks with Discontinuities. |
Some linearization-compatible blocks encounter warning messages during linearization. You can use these messages as a guide for modifying your model to obtain the linearization results you expect.
To locate blocks in your model with configuration warnings and to read the warning messages, view the list of block with warning in the Simulink Control Design Diagnostics Messages tab. For information on how to view diagnostic messages, see Using Diagnostics Messages to Find Problematic Blocks in Your Model.
Some Simulink blocks are not supported for linearization and give the wrong answer when linearized. If your model contains blocks that are not supported for linearization, you must replace them to obtain accurate linearization results.
You can find a list of unsupported blocks for linearization in the Simulink Control Design Diagnostics Messages tab. For information about viewing diagnostic messages, see Using Diagnostics Messages to Find Problematic Blocks in Your Model.
Blocks that do not have pre-programmed exact analytic Jacobians automatically linearize using the numerical perturbation algorithm instead of block-by-block analytic linearization. Block behavior and numerical perturbation levels affect the accuracy of linearization results. For most blocks, you do not need to check these settings. However, to obtain the results you expect, consider adjusting the numerical perturbation levels in the following situations:
Blocks that are located near discontinuous regions
Some example of discontinuous regions are 1/u, where u is near zero, and regions between values in lookup tables.
Blocks that have nondouble inputs and states
These blocks linearize to zero.
To locate blocks in your model that automatically linearize using numerical perturbation, click the hyperlink in the blocks without pre-programmed exact Jacobian (linearized using numerical perturbation) section of the Simulink Control Design Diagnostics Messages tab. For information about viewing diagnostic messages, see Using Diagnostics Messages to Find Problematic Blocks in Your Model.
Note Blocks that have nondouble inputs and states also appear in the list of blocks with warnings in the Simulink Control Design Diagnostics Messages tab. |
For more information about numerical perturbation linearization and setting numerical perturbation levels, see Numerical-Perturbation Linearization.
Diagnostic messages identify the following types of blocks in your model:
To view the diagnostic messages for the blocks in your linearized model, perform these steps:
Select the Model node in the project tree for your linearized model.
Select the Linearization Diagnostic Messages tab.
In the Show diagnostics for drop-down list, choose one of the following options:
Blocks in the linearization path
All blocks in the Simulink model
Your result resembles the following figure.

Note To highlight the blocks listed in the Diagnostic Messages tab in your model, click the hyperlinks. |
If you obtain an unexpected linearization result, you can examine the subsystems and blocks in your model to determine which part of your model is not linearizing properly. If you find subsystems and blocks in your model that are not linearizing properly, replace them and then linearize your model again.
Some of the issues that affect your linearization results at the subsystem and block level include:
Linearizations that result in zero or infinity.
Poles that do not make sense. For example, poles whose values are not characteristic of the system.
To examine subsystems and blocks in your model, you can use the following techniques:
Inspect linearization results for each block using the linearization inspector.
For instructions on using the linearization inspector, see Inspecting the Linearization Results Block by Block.
Linearize individual subsystems and blocks in your model.
This approach is an effective way to debug the linearization of a large model because it allows you to quickly narrow down the problem. For instructions on linearizing subsystems and blocks, see Linearizing a Block.
The following linearization settings affect your linearization results. Verify that these linearization settings are appropriate for your linearization.
Rate Conversion Method
When you linearize models with multiple sample times, such as a discrete controller with a continuous plant, a rate conversion algorithm generates a single-rate linear model. The algorithm you select affects linearization results. For information about on these effects, see the Simulink Control Design demos "Linearization of Multirate Models" and "Rate Conversion Method Selection for Linearization" listed under the Simulink Control Design Demos in the demos browser.
Return model with exact delay
When you linearize models with delays, you can use exact delay representation. For information about how exact delay representations affect linearization results, see the Simulink Control Design demo "Linearizing Models with Delays" listed under the Simulink Control Design Demos in the demos browser.
For more information about these settings, see Changing Linearization Settings and Algorithms in the Simulink Control Design documentation and the linoptions reference page.
Event-based subsystems do not trigger during linearization and therefore, you cannot linearize these subsystems. You must replace each of the event-based subsystem in the linearization path of your model with a representation that you can linearize.
For more information about linearizing event-based subsystems, see Event-Based Models and Triggered Subsystems.
If you obtain unexpected linearization results, check if the operating point you used for linearization is causing inaccurate results.
If you find that the operating point you selected was not ideal for the linearization, choose another operating point and linearize your model again.
For more information, see the following information in the Simulink Control Design documentation:
How the operating point you choose affects your linearization results — See the Why Are Operating Points Important? section of the Simulink Control Design getting started documentation.
How to creating accurate operating points — See the Recommendations for Computing Operating Points section of the Simulink Control Design User's Guide.
![]() | Validating Linearization Results | Recommendations for Computing Operating Points | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |