Version 5.1 (R13SP1) Simulink Software

This table summarizes what's new in V5.1 (R13SP1):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated Documentation at Web Site
Yes
Details below
NoFixed BugsPrintable Release Notes: PDF

V5.1 product documentation

New features and changes introduced in this version are:

Sample Time Parameters Exposed

Sample time parameters of most Simulink built-in library blocks have been exposed to the user. That is, the sample time parameter of these blocks has been made accessible via the block's dialog box or set_param. This means that most nonvirtual blocks in the Simulink library have a user settable sample time parameter. Prior to this exposure, these blocks had an internal inherited sample time with the exception of the Constant block, which had a constant (inf) sample time. By providing access to the sample time parameter, you no longer need to use the Signal Specification block to apply a nondefault sample times to these blocks.

Enhanced Debugger

This release includes enhancements to the Simulink debugger that enable you to step through a simulation showing information not visible in previous releases. The enhancements include

These changes allow you to pinpoint problems in your model with greater accuracy. The following sections briefly describe the debugger enhancements. See the Simulink documentation for a detailed description of the new features and their usage.

Enhanced Debugger Commands

This release enhances the following debugger commands:

New Debugger Commands

This release introduces the following debugger commands:

Enhanced Debugger Toolbar

The debugger toolbar has been expanded to include buttons for the following versions of the step command: step into, step over, step out, and step top.

Simulation Loop Pane

This release adds a Simulation Loop pane to the debugger GUI that displays by method the point in the simulation loop at which the simulation is currently suspended. The debugger updates the pane after each step, next, or continue command, enabling you to determine at a glance the point to which the command advanced the simulation. The pane also allows you to set breakpoints on simulation loop methods and to navigate to the block at whose method the simulation is currently suspended.

Sorted List Pane

This release renames the Block Execution List pane of the debugger GUI to the Sorted List pane to reflect more accurately what the pane contains. The Sorted List pane displays for the root system and each nonvirtual subsystem of the model being debugged a sorted list of the subsystem's blocks. The sorted lists enable you to determine the block IDs of a model's blocks.

Context-Sensitive Data Typing of Tunable Parameters

In this release, if a model's Inline parameters setting is selected, Simulink software regards the data type of a tunable parameter as context-sensitive if the data type is not specified. In particular, this release allows the block that uses the parameter to determine the parameter's data type. By contrast, Release 13 regards the type of the parameter to be double regardless of where it is used.

Change in Simulink Behavior

This change affects the behavior of Simulink software in two cases. First, in Release 13, if a tunable parameter's data type is unspecified and a block that uses it needs to convert its type from double to another type, Simulink software by default stops and displays an error message when you update or simulate the model. The error alerts the user to the fact that the type conversion is a downcast and hence could result in a loss of precision. In this release, by contrast, a typecast never occurs because the block itself determines the appropriate type for the parameter. Hence, in this release, Simulink software never generates a downcast error for tunable parameters of unspecified data type.

The following model illustrates the difference in behavior between this release and Release 13 in this case.

Assume that the model's Inline parameters setting is selected (thereby making parameters nontunable by default) and the model declares k as a tunable parameter on the Model Configuration Parameters dialog box. Also assume that the user has specified the value of k on the MATLAB command line as follows:

>> k = 5.7

In other words, the user has specified a value for k but not a data type. In this case, this release regards the type of k to be int16, the type required by the Gain block to compute its output. By contrast, Release 13 regards the type of k to be double and hence assumes that the Gain block must downcast k to compute its output. Release 13 therefore stops and displays an error message by default in this case when you update or simulate the model.

The behavior of this release also differs from Release 13 in the case where a model uses a tunable parameter of unspecified data type in more than one place in the model and the required data type differs in different places. This case creates a conflict under the assumption that the block in which the parameter is used determines the parameter's data type. This assumption requires Simulink software to assign different data types to the same parameter, which is impossible. Therefore, in this release, Simulink software signals an error to alert the user to the conflict. By contrast, in Release 13, Simulink software does not throw an error because the data type of the parameter is double regardless of where it is used. You can avoid the conflicting data types error in Release 13SP1 by specifying the tunable parameter's data type.

The following model illustrates this change in behavior.

The two Gain blocks in this model both use k, a tunable parameter of unspecified type, as their gain parameter. Computing the outputs of the blocks requires that the gain parameter be of types int16 and int32, respectively. In Release 13, Simulink software regards the data type of k to be double and the Gain blocks use typecasts to convert k to the required type in each case. Simulink software simulates the model without error (if the parameter downcasting diagnostic is set to none or warning). By contrast, this release signals an error because this model requires k to be both type int16 and int32, an impossibility. You can avoid this error by explicitly specifying k's data type; for example:

k = int16(6);

Conditional Execution Behavior

This release augments the conditional input branch behavior of the previous release with a more generalized behavior called conditional execution (CE) behavior. The new behavior speeds simulation of models by eliminating unnecessary execution of blocks connected to Switch, Multiport Switch, and conditionally executed blocks.

As with the conditional input branch behavior available in the previous release, the new behavior ensures that the block methods that make up an input branch of a Switch or Multiport Switch block execute only when the model selects the corresponding switch input. In addition, the new behavior option generalizes this behavior to conditionally executed subsystems. Consider, for example, the following model.

Simulink software computes the outputs of the Constant block and Gain Block only when the Enabled Subsystem executes (i.e., at time steps 0, 4, 8, and so on). This is because the output of the Constant block is required and the input of the Gain block changes only when the Enabled Subsystem executes. When CE behavior is off, Simulink software computes the outputs of the Constant and Gain blocks at every time step, regardless of whether the outputs are needed or change.

In this example, Simulink software regards the Enabled Subsystem as defining an execution context for the Constant and Gain blocks. Although the blocks reside in the model's root system, their block methods are executed as if the blocks reside in the Enabled Subsystem.

In general, Simulink software defines an execution context as a set of blocks to be executed as a unit. At model compilation time, Simulink software associates an execution context with the model's root system and with each of its nonvirtual subsystems. Initially, the execution context of the root system and each nonvirtual subsystem is simply the blocks that it contains. Simulink software examines whether a block's output is required only by a conditionally executed subsystem or whether the block's input changes only as a result of the execution of a conditionally executed subsystem. If so, Simulink software moves the block into the execution context of the conditionally executed system. This ensures that the block methods are executed during the simulation loop only when the corresponding conditionally executed subsystem executes.

To determine the execution context to which a block belongs, select Sorted order from the model window's Format menu. Simulink software displays the sorted order index for each block in the model in the upper right corner of its icon. The index has the format s:b, where s specifies the subsystem to whose execution context the block, b, belongs.

Simulink software also expands the sorted order index of conditionally executed subsystems to include the system ID of the subsystem itself in curly brackets as illustrated in the following figure.

In this example, the sorted order index of the enabled subsystem is 0:1{1}. The 0 indicates that the enable subsystem resides in the model's root system. The first 1 indicates that the enabled subsystem is the second block on the root system's sorted list (zero-based indexing). The 1 in curly brackets indicates that the system index of the enabled subsystem itself is 1. Thus any block whose system index is 1 belongs to the execution context of the enabled subsystem and hence executes when it does. For example, the constant block's index, 1:0, indicates that it is the first block on the sorted list of the enabled subsystem, even though it resides in the root system.

Function-Call Subsystem Enhancements

This releases adds the following function-call subsystem-related parameters to the Trigger block:

See the Trigger block documentation for additional information.

External Increment Option Added To For Iterator Block

This release adds an external increment option to the For Iterator block. Selecting this option causes the block to display an input port for the external increment. The value of this input port at the current time step is used as the value of the block's iteration variable at the next iteration. You can select this option by checking the Set next i (iteration variable) externally option on the block's parameter dialog box or by setting its ExternalIncrement parameter to 'on'. See the documentation for the For Iterator block for more information.

Performance Improvements

Release R13SP1 includes many performance improvements that were designed to particularly benefit large models (containing on the order of 100,000 blocks and/or more than a few megabytes of parameter data). Speed has been improved and memory consumption reduced for model loading, compilation, code generation, and closing. The various improvements span the Simulink, Stateflow, and Real-Time Workshop products and include:

Other minor improvements have also been made to improve performance. Your models should experience corresponding speed and memory improvements, to the extent that these changes apply to your specific models and usage scenarios.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS