The software described in this document is furnished under a license agreement. The software may be used
or copied only under the terms of the license agreement. No part of this manual may be photocopied or
reproduced in any form without prior written consent from The MathW orks, Inc.
FEDERAL ACQUISITION: This provision applies to all acquisitions of the Program and Documentation
by, for, or through the federal government of the United States. By accepting delivery of the Program
or Documentation, the government hereby agrees that this software or documentation qualifies as
commercial computer software or commercial computer software documentation as such terms are used
or defined in FAR 12.212, DFARS Part 227.72, and DFARS 252.227-7014. Accordingly, the terms and
conditions of this Agreement and only those rights specified in this Agreement, shall pertain to and govern
theuse,modification,reproduction,release,performance,display,anddisclosureoftheProgramand
Documentation by the federal government (or other entity acquiring for or through the federal government)
and shall supersede any conflicting contractual terms or conditions. If this License fails to meet the
government’s needs or is inconsistent in any respect with federal procurement law, the government agrees
to return the Program and Docu mentation, unused, to The MathWorks, Inc.
Trademarks
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See
www.mathworks.com/trademarks for a list of additional trademarks. Other product or brand
names may be trademarks or registered trademarks of their respective holders.
Patents
The MathWorks products are protected by one or more U.S. patents. Please see
www.mathworks.com/patents for more information.
Release Notes
SummarybyVersion
This table provides quick access to what’s new in each version. For
clarification, see “Using Release Notes” on page 2 .
Simulink®Release Notes
Version
(Release)
Latest Versi
V7.5 (R2010a
V7.4 (R2009b)
V7.3 (R2009a)
V7.2 (R2
V7.1.1 (R2008a+)
V7.1 (R2008a)
.1 (R2007b+)
V7.0
V7.0 (R2007b)
on
)
008b)
New Features
and Changes
Yes
Details
Yes
Details
Yes
Details
Yes
Details
NoNoBug Reports
Yes
ls
Detai
NoNoBug Reports
Yes
Details
Version
Compatibilit
Consideratio
Yes
Summary
Yes
Summary
Yes
Summary
Yes
Summary
Yes
Summa
Yes
Summary
ry
Fixed Bugs
y
and Known
ns
Problems
Bug Reports
Includes fix
Bug Reports
Includes fixes
Bug Repor
Includes
Bug Reports
Includes fixes
Includes fixes
Bug Re
Inclu
Includes fixes
Bug Reports
Includes fixes
ts
fixes
ports
des fixes
es
Related
Documentation
at Web Site
Printable Release
Notes:
PDF
Current product
documentation
No
No
No
No
No
No
No
V6.6.1 (R2007a+)
.6 (R2007a)
V6
V6.5 (R2006b)
NoNoBug
Inc
Yes
Details
Yes
Details
Yes
Summary
Yes
Summary
Bug Reports
Includes fixes
Bug Reports
Includes fixes
Reports
ludes fixes
No
No
No
1
Simulink®Release Notes
Version
(Release)
V6.4.1 (R2006a+)
V6.4 (R2006a)
V6.3 (R14SP3)
V6.2 (R14SP2)
V6.1 (R14SP1)
V6.0 (R14)
V5.1 (R13SP1)
V5.0.1 (R13.0.1)
New Features
and Changes
NoNoBug ReportsNo
Yes
Details
Yes
Details
Yes
Details
Yes
Details
Yes
Details
Yes
Details
NoYes
Version
Compatibility
Considerations
Yes
Summary
Yes
Summary
Yes
Summary
Yes
Summary
Yes
Summary
No
Summary
Fixed Bugs
and Known
Problems
Bug ReportsNo
Bug ReportsNo
Bug ReportsNo
Fixed Bugs
Fixed Bugs
Fixed BugsPrintable Release
Fixed Bugs
Related
Documentation
at Web Site
No
No
Notes:
PDF
V5.1 product
documentation
No
2
V5.0 (R13)
V4.1 (R12+)
V4.0 (R12)
Yes
Details
Yes
Details
Yes
Details
Yes
Summary
Yes
Summary
Yes
Summary
Fixed Bugs
Fixed Bugs
NoNo
No
No
Using Release Notes
Use release notes when upgrading to a newer version to learn about:
• New features
• Changes
• Potential impact on your existing files and practices
SummarybyVersion
Review the release notes for other MathWorks™ products required for this
product (for example, MATLAB
®
or Simulink®). Determine if enhancements,
bugs, or compatibility considerations in other products impact you.
If you are upgrading from a software version other than the m ost recent one,
review the current release notes and all interim versions. For example, when
you upg rade from V1.0 to V1.2, review the release notes for V1.1 and V1.2.
What Is in the Release Notes
New Features and Changes
• New functionality
• Changes to existing functionality
Version Compatibility Con si derations
When a new feature or change introduces a reported incompatibility between
versions, the Compatibility Considerations subsection explains the
impact.
Compatibility issues reported after the product release appear under Bug
Reports at The MathWorks™ Web site. Bug fixes can sometimes result
in incompatibilities, so review the fixed bugs in Bug Reports for any
compatibility impact.
Fixed Bugs and Known Problems
The MathWorks offers a user-searchable Bug Reports database so you can
view Bug Reports. The development team updates this database at release
time and as more information becomes available. Bug Reports include
provisions for any known workarounds or file replacem ents. Information is
available for bugs existing in or fixed in Release 14SP2 or later. Information
is not avail able for all bugs in earlier releases.
3
Simulink®Release Notes
Access Bug Reports using y our MathWorks Account.
4
Version 7.5 (R2010a) Simulink Software
This table summarizes what’s new in V7.5 (R2010a):
Version 7.5 (R2010a) Simulink®Software
New Features and
Changes
Yes
Details below
Version
Compatibility
Considerations
Yes—Details labeled
as CompatibilityConsiderations,
below. See also
Summary.
New features and changes introduced in this version are organized by these
topics:
• “Simulation Performance” on page 5
• “Component-Based Modeling” on page 6
• “Embedded MATLAB Function Blocks” on page 8
• “Simulink Data Managem ent” on page 10
• “Simulink Signal Management” on page 14
• “Block Enhancements” on page 17
• “User Interface Enhancements” on page 30
• “S-Functions” on page 34
Fixed Bugs an d
Known Problems
Bug Reports
Includes fixes
Related
Documentation at
Web Site
Printable Release
Notes:
PDF
Current product
documentation
• “Documentation Improvements” on page 35
Simulation Performance
Computation of Sparse and Analytical Jacobian for Implicit
Simulink Solvers
The implicit Simulink solvers now support numerical and analytical methods
for computing the Jacobian m atrix in one of the following representations:
sparse perturbation, full perturbation, sparse analytical, and full analytical.
5
Simulink®Release Notes
The sparse methods attempt to improve performance by taking advantage
of sparsity information associated with the Jacobian matrix. Similarly,
the analytical methods attempt to improve performance b y computing the
Jacobian using analytical equations rather than the perturbation equations.
Since the applicability of these representations is highly model dependent,
an
auto option directs Simulink to use a heuristic to choose an appropriate
representation for your model. In the case of a model that has a large number
of states and for which the Jacobian is computed in sparse analytical form, the
performance improvement may be substantial. In general, the performance
improvement achieved varies from model to model.
Sparse Perturbation Suppor t for RSim and Rapid Accelerator
Mode
For implicit Simulink solvers, the numerical sparse perturbation method for
solving the Jacobian supports both RSim and Rapid Accelerator m od e.
Increased Accuracy in Detecting Zero-Crossing Events
The zero-crossing bracketing algorithm now uses a smaller tolerance for
defining the interval in which an event occurs. The resulting increased
accuracy of locating an event means that existing models may exhibit slightly
different numerical results.
Saving Code Generated by Accelerating Models to slprj Folder
In Accelerator mode and in Rapid A ccelerator mode, a build has
historically resulted in the creation of generated code, respectfully, in
the
modelname_accel_rtw and the modelname_raccel_rtw folders in the
current working folder. However, in order to be more consistent with other
builds, in R2010a and future releases, these files will be created in the
slprj/accel/
modelname and the slprj/raccel/modelname folders.
Component-Based Modeling
For Each Subsystem Block
The For Each Subsystem b lock is very useful for modeling scenarios where you
need to repeat the same algorithm on individual elements (or submatrices)
6
Version 7.5 (R2010a) Simulink®Software
of an input signal. The set of blocks within the subsystem represent the
algorithmthatistobeappliedtoasingleelement(orsubmatrix)ofthe
original signal. You can configure the inputs of the subsystem to decompose
the corresponding inputs into elements (or submatrices), and configure the
outputs to suitably concatenate the p rocessed results. Additionally, each blo ck
that has states inside this subsystem maintains separate sets of states for
each elem ent or submatrix it processes. Consequently, the operation of this
subsystem is akin to copying the contents of the subsystem as many times
as the number of elements in the original input signal, and then processing
each element through its respective subsystem copy.
An additional benefit of this subsystem is that it may be utilized to improve
code reuse in Real-Time Workshop generated code for certain models.
Consider a model containing two reusable Atomic Subsystems with the same
scalar algorithm applied to each element of the signal. If the input signal
dimensions for these subsystems are different, you will find that two distinct
functions are produced in the code generated by Real-Time W orkshop for
this model. Now, if you were to convert the two subsystems to For Each
Subsystems such that the contents of each processe s a single scalar element,
then you will find that the two subsystems produce a single function in the
code generated by Real-Time W orkshop . This function is parameterized by
thenumberofelementstobeprocessed.
New Function-Call Split Block
A new Function-Call Split block allows you to branch periodic and
asynchronous function-call signals and connect them to multiple function-call
subsystems (or models). These subsystems (or models) are guaranteed to
execute in the order determined by their data dependencies. If a deterministic
order cannot be computed, the model produces an error.
To test the validity of your function-call connections, use the Model Advisor
diagnostic, Check usage of function-call connections.Thisdiagnostic
determines if:
You can use trigger ports, which you define with a Trigger block, in new ways:
• Place edge-based (rising, falling, or either), as well as function-call, trigger
ports at the root level of a model. Before R2010a, to place a trigger port in a
root-level model, you had to set the trigger type to
• Place triggered ports in models referenced by a Model block. See “D efining
Triggered Models”.
• Lock down the data type, port dimension, and trigger signal sample time.
To specify these values, use the new Signal Attributes pane of the Block
Parameters dialog box of the Trigger block. S p eci fying these attributes is
useful for unit testing and running standalone simulation of a subsystem
or referenced model that has an edge-based trigger port. See “Simulating
a Triggered Model”.
Compatibility Considerations. When you add a trigger port to a root-lev el
model, if you use the File > Save As option to specify a release before
R2010a, Simulink replaces the trigger port with an empty subsystem.
function-call.
Model Reference Support for Custom Code
Select the new ModelRefHonorSimTargetCustomCode model parameter
to have SIM target Accelerator code genera t io n include Stateflow
Embedded MATLAB
for this parameter is
®
custom code for a referenced model. The default setting
off.
®
and
Embedded MATLAB Function Blocks
New Ability to Use Global Data
Embedded MATLAB Function blocks are now able to use global data within a
Simulink model and across multiple models.
This feature provides these benefits:
• Allows you to share data between Embedded MATLAB Function blocks
and other Simulink blocks without introducing additional input and output
8
Version 7.5 (R2010a) Simulink®Software
wires in your model. This reduces unnecessary clutter and improves the
readability of your model.
• Provides a means of scoping the visibility of data within your model.
For m ore information, see “Using Global Data with the Embedded MATLAB
Function Block” in the Simulink documentation.
Support for Logical Indexing
Embedded MATLAB Function blocks now support logical indexing when
variable sizing is enabled. Embedded MATLAB supports variable-size data
by default for MEX and C/C++ code generation.
For more information about logical indexing, see “Using Logicals in Array
Indexing” in the MATLAB documentation.
Support for Variable-Size Matrices in Buses
Embedded MATLAB Function blocks now support Simulink buses containing
variable-size matrices as inputs and outputs.
Support for Tunable Structure Para meters
Embedded MATLAB Function blocks now support tunable structure
parameters. See “Working with Structure Parameters in Embedded MATLAB
Function Blocks”.
Check Box for ’Treat as atomic unit’ Now Always Selected
In existing models, simulation and code generation for Embedded MATLAB
Function blocks always behave as if the Treat as atomic unit check box in
the Subsystem Parameters dialog box is selected. Starting in R2010a, this
check b ox is always selected for consistency with existing behavior.
9
Simulink®Release Notes
Simulink Data Ma
nagement
New Function Finds Variables Used by Models and Blocks
The new Simulin
variables and
sometimes i n c
• Identify all w
• Identify any
• Search a mod
• Subdivide a
See
Simuli
page for mo
their usage. For example, you can use
onjunction with other Simulink functions, to:
workspace variables unused by a model or block
model, including only necessary variables with each model
nk.findVars
re information.
k.findVars
orkspace variables used by a model or block
el for all places where a specified variable is referenced
function re turns information about workspace
Simulink.findVars,
and the other Simulink functions referenced on that
MATLAB Structures as Tunable Structure Parameters
You can cr
into a hie
in Simul
workspa
grouped
struct
value g
limite
block p
eate a MATLAB structure that groups base workspace variab l es
rarchy, and dereference the structure fields to provide values
ink block parameter expression s. This technique reduces base
ce clutter and allow s related w orkspace variables to be conveniently
. However, in previous releases you could not use a MATLAB
ure as a masked subsystem or a model reference argument, a nd no
iven by a MATLAB structure field could be tuned. These restrictions
d the usefulness of MATLAB structures for grouping variables used in
arameter expressions.
10
In R20
that c
subs
ther
can a
that
str
Par
10a, these restrictions no longer apply to MATLAB structures
ontain only numeric data. You can use a numeric structure, or any
tructure within it, as a masked subsystem or a model reference argument,
eby passing all values in the structure with a single argument. You
lso control MATLAB structure tunability using the sam e techniques
control MATLAB variable tunability. In R2010a, all values in a given
ucture must be either tunable or nontunable. See “Using Structure
ameters” for m ore information.
Version 7.5 (R2010a) Simulink®Software
Simulink.saveVars Documentation Added
The Simulink.saveVars function was added in R2009b but was incompletely
documented. See “New Function Exports Workspace Variables and Values”
on page 44 for more information.
Custom Floating-Point Types No Longer Supported
Custom floating-point types, float(TotalBits, ExpBits), are no longer
supported.
Compatibility Considera tions. Ifyouhavecodethatusescustom
floating-point types, modify this code using one of these methods:
• Replace calls to
fixdt('double') or fixdt('single') as appropriate.
float(TotalBits, ExpBits) with calls to
• Create your own custom float replacement function.
Write a MATLAB function
the file on your MA TLAB path. This function must take
ExpBits as input arguments and return a supported numerictype object,
such as
fixdt('double') or fixdt('single').
custom_float_user_replacement and place
TotalBits and
For example,
function DataType = custom_float_user_replacement( TotalBits, ExpBits
You can log the values of a local or global data store data variable for all the
steps in a simulation. Data store logging is useful for:
11
Simulink®Release Notes
• Model debugging – view the order of all data store writes
• Confirming a model modification – use the logged data to establish a
baseline for comparing results to identify the impact of a model modification
To log a local data store that you create with a Data Store Memory block:
• Use the new Logging pane of the Block Parameters dialog box for the
Data Store Memory block.
• Enable data store logging with the new Configuration
Parameters > Data Import/Export > Data stores parameter.
To log a data store defined by a
command line, set
DataLogging (which is a property of the LoggingInfo
Simulink.Signal object, from the MATLAB
property of Simulink.Signal)to1.
For details, see “Logging Data Stores”. To see an example of logging a global
data store, run the
sldemo_mdlref_dsm demo.
Models with No States Now Return Empty Variables
Simulink creates empty variables for state logging (xout) or final state logging
(
xfinal), if both of these conditions apply:
• A model has no states.
• In the Configuration Parameters > Data Import/Export pane, you
enable the States, Final States, or both parameters (the default is
Compatibility Considerations. If you configure your model to return empty
variables when it has no states, then a possible result is that Simulink creates
more variables than it did in previous releases.
Using model variants, running different models in batch mode, tuning models,
or reconfiguring models can produce unexpected results based on the state
values. For example, if you simulate a model that produces a state value, and
then run a model variant that produces no state, Simulink overwrites the
state value with an empty variable. If your model depends on the first state
value not being overwritten if no state is returned in a subsequent simulation
(which was the case in previous releases), then you get unexpected results.
off).
12
Version 7.5 (R2010a) Simulink®Software
To File Block Enhancements
TheToFileblocknowsupports:
• Saving very large data sets that may be too large to fit in RAM
• Saving logged data up until the point of a premature ending of simulation
processing. Previously, if the simulation processing did not complete, then
To File did not store any logged data for that simulation.
• AnewSave format parameter to control whether the block uses
Timeseries or array format for data.
- Use Timeseries format for w riting multidimensional, real, or complex
inputs, with different data types, (for example, built-in data types,
including
word length of up to 32 bits.
Boolean;enumerated(enum) data and fixed-point data w ith a
- Use Array format only for one-dimensional, double, noncomplex i nputs.
Time values are saved in the first row. Additional rows correspond to
input elements.
Compatibility Considerations. For data saved using MAT file versions
prior to 7.3, the From File block can only load two-dimensional arrays
consisting of one-dimensional, double, noncomplex samples. To load data
of any other type, complexity, or dimension, use a
save the file using MAT file version 7.3 or later. For example, use
• Fixed-point data with a word length of up to 32 bits
• Complex data
• Multidimen si on al data
Boolean
13
Simulink®Release Notes
Root Inport Support for Fixed-Point Data Contained in a
Structure
You can now use a root (top-level) Inport block to supply fixed-point data that
is contained in a structure.
In releases before R2010a, you had to use a Simulink.Timeseries object
instead of a structure.
Simulink Signal Management
Enhanced Support for Proper Use of Bus Signals
To improve model reliability and robustness, avoid mixing Mux blocks and
bus signals. To help you use Mux blocks and bus signals properly, R2010a
adds these enhancements:
• When Simulink detects Mux block and bus signal mixtures, the “Mux
blocks used to create bus signals” diagnostic now generates:
14
- A warning when all the following conditions apply:
• You load a model created in a releas e before R2010a.
• The diagnostic is set to 'None'.
• Simulink detects improper Mux block usage.
- An error for new models
• Two new diagnostics in the Configuration
Parameters > Diagnostics > Connectivity pane:
- The “Non-bus signals treated as bus signals” diagnostic detects when
Simulink implicitly converts a non-bus signal to a bus signal to support
connecting the signal to a Bus Assignment or Bus Selector block.
- The “Repair bus selections” diagnostic repairs broken selections in the
Bus Selector and Bus Assignment block parameters dialog boxes that
are due to upstream bus hierarchy changes.
Version 7.5 (R2010a) Simulink®Software
Compatibility Considerations. In R2010a, if you load a model created in a
prior release, you might get warning messages that you did not get before. To
avoid getting Mux block-related w arnings for existing models that you want
to lo ad in R2010a, use the
slreplace_mux function to substitute Bus C reator
blocks for any Mux blocks used to create buses signals.
Bus Initialization
In releases before R2010a:
• For virtual buses, you could sp ecif y a non-zero scalar or vector initial
condition (IC ) value that applies to all elements of the bus. You could use a
vectorvalueonlyifallbuselementsusethesamedatatype.
• For nonvirtual buses, the only value you could specify was zero.
In R2010a, you can create a MATLAB structure for an IC. You can:
• Specify ICs for all or a subset of the bus elements.
• Use the new
Simulink.Bus.createMATLABStruct helper method to create
a full IC structure.
• Use the new Model Advisor Simulink check, Check for partial structure
parameter usage with bus signals, to detect when structure parameters
are n ot consistent in shape with the associated bus signal.
Using IC structures helps you to:
• Specify nonzero initial co nditions
• Specify initial conditions for mixed-dimension signals
• Apply a different IC for each signal in the bus
• Specify ICs for a subset of signals in a bus without s pecifying ICs for all
the signals
• Use the same ICs for multiple blocks, signals, or models
For information about creating and using initial condition structures, see
“Specifying Initial Conditions for Bus Signals”.
15
Simulink®Release Notes
S-Functions for Working with Buses
The following S-functions provide a programmatic interface for working
with buses:
S-functionDescription
ssGetBusElementComplexSignal
ssGetBusElementDataType
ssGetBusElementDimensions
ssGetBusElementName
ssGetBusElementNumDimensions
ssGetBusElementOffset
ssGetNumBusElements
ssGetSFcnParamName
sslsDataTypeABus
ssRegisterTypeFromParameter
ssSetBusInputAsStruct
ssSetBusOutputAsStruct
ssSetBusOutputObjectName
Get the signal complexity for a bus
element.
Get the data type identifier for a bus
element.
Get the dimensions of a bus element.
Get the name of a bus element.
Get the number of dimensions for a
bus element.
Get the offset from the start of the
busdatatypetoabuselement.
Get the number of elements in a bus
signal.
Get the value of a block parameter
for an S-function block.
Determine whether a data type
identifier repres ents a bus signal.
Register a data type that a
parameter in the Simulink data type
table specifies.
Specify whether to convert the input
bus signal for an S-function from
virtual to nonvirtual.
Specify whether the output bus
signal from an S-function must be
virtual or nonvirtual.
Specify the name of the bus object
that defines the structure and type
of the output bus signal.
16
Version 7.5 (R2010a) Simulink®Software
Command Line API for Accessing Information About Bus
Signals
You can use two new signal property parameters to get information about the
type and hierarchy of a signal programmatically:
•
CompiledBusType
- Returns information about whether the signal connected to a port is a
bus, and if so, whether it is a v irtual or nonvirtual bus
•
SignalHierarchy
- Returns the signal name of the signal. If the signal is a bus, the
parameter also returns the hierarchy and names of the bus signal.
See “Mo de l Parameters” and “Getting Information about Buses”.
Signal Name Propagation for Bus Selector Block
The new SignalNameFromLabel port parameter supports signal name
propagation for Bus Creator block input signals whenever you change the
name of an input signal programmatically. You can set this parameter with
the
set_param command, specifying either a port or line handle and the
signal name to propagate.
See “Model Parameters”.
Block Enhancements
New Square Root Block
You can use the new Sqrt block to perform square-root calculations. This
block includes the following functions:
17
Simulink®Release Notes
Function
sqrt
signedSqrt
rSqrt
Icon
Compatibility Considerations. The sqrt and 1/sqrt functions no longer
appear in the Math Function block. For backward compatibility, models
with a Math Function block that uses one of these two functions continue
to work. However, consider running the
slupdate re place s any Math Function block that uses sqrt or 1/sqrt with an
slupdate function on your model.
equivalent Sqrt block that ensures the same behavior.
New Second-Order Integrator Block
You can use the new Second-Order Integrator block to model second-order
systems that have bounds on their states. This block is useful for modeling
physical systems, for example, systems that use Newton’s Second Law and
have constraints on their motion.
18
Benefits of using this block include:
• Highly accurate results
• Efficient detection of zero crossings
• Prevention of direct feedthrough and algebraic loops
New Find Nonzero Elements Block
You can use the new Find block to locate all nonz ero elements of an input
signal. This block outputs the indices of nonzero elements in linear indexing
or subscript form and provides these benefits:
Version 7.5 (R2010a) Simulink®Software
When you use the block to...
Convert logical indexing to linear
indexing
You ca n. . .
Use the linear indices you get
from processing a logical indexing
signal as the input to a Selector or
Assignment block
Extract subscripts of nonzero valuesUse the subscript of matrices for 2-D
or higher-dimensional signal arrays
to aid with image processing
Represent sparse signalsUse indices and values as a compact
representation of sparse signals
PauseFcn and ContinueFcn Callback Support for Blocks and
Block Diagrams
The new PauseFcn and ContinueFcn callbacks detect clicking of the Pause
and Continue buttons during simulation. You can set these callbacks using
the
set_param command or the Callbacks tab of the Model Properties dialog
box. Both the
PauseFcn and ContinueFcn callbacks support Normal and
Accelerator simulation modes.
Gain Block Can Inherit Parameter Data Type from Gain Value
The Gain block now supports the Parameter data type setting of Inherit:
Inherit from 'Gain'
the parameter data type directly from the Gain parameter. For example:
. This enhancement provides the benefit of inheriting
If you s et Gain to ...
The parameter data type
inherits...
2double
single(2)single
int8(2)int8
Direct Lookup Table (n-D) Block Enhancements
The Direct Lookup Table (n-D) block now supports:
• Multidim en si onal signals for the table in p ut port
19
Simulink®Release Notes
• Fixed-point data types for the table input port
• Explicit specification of the table data type in the block dialog box
Multiport Switch Block Allows Explicit Specification of Data
Port Indices
The icon for the Multiport Switch block now shows the values of indices on
data port labels. This enhancement helps you identify the data inputs without
having to open the block dialog box:
Block Parameter SettingsBlock Icon
20
When you load existing m odels that contain the Multiport Switch block, the
following parameter mapping occurs:
Version 7.5 (R2010a) Simulink®Software
Block Parameter Settings of a
Model from R2009b or Earlier
The following command-line parameter mapping applies:
Old Prompt on
Block Dialog Box
New Prompt on
Block Dialog Box
Number of inputsNumber of data
ports
Use zero-based
Data port order
indexing
Block Parameter Settings When
You Load the Model in R2010a
Old Command-Line
Parameter
New
Command-Line
Parameter
Inputs
zeroidxDataPortOrder
Same
The parameter mapping in R2010a ensures that you get the same block
behavior as in previous releases.
Compatibility Considerations. In R2010a, a warning appears at compile
time when your model contains a Multiport Switch block with the following
configuration:
• The control port uses an enumerated data type.
• The data port order is contiguous.
21
Simulink®Release Notes
During edit time, the block icon cannot show the mapping of each data port to
an enumerated value. This configuration can also lead to unused ports during
simulation and unused code during Real-Time W orkshop
®
code generation.
Run the
slupdate function on your model to replace each Multiport Sw itch
block of this configuration with a block that explicitly specifies data port
indices. Otherwise, your model might not work in a future release.
In R2010a, the following Multiport Switch block configuration also produces
a warning at compile time:
• The control po rt uses a fixed-point or built-in data type.
• The data port order is contiguous.
• At least one of the contiguous data port indices is not representable with
the data type of the control port.
The warning alerts you to unused ports during simulation and unused code
during Real-Time Workshop code generation.
Trigonometric Function Block Supports CORDIC Algorithm and
Fixed-Point Data Types
When you select sin, cos,orsincos for the Trigonome tric Function block,
additional param eters are available.
New Block
Parameter
Purpose
Benefit
22
Approximation
method
Number of iterations
Specify the type of
approximation the
block uses to compute
output:
For the
None or CORDIC.
CORDIC
algorithm, specify
how m any iterations to
use for computing block
output.
Enables you to use
afastermethodof
computing block output
for fixed-point and HDL
applications.
Enables you to adjust
the precision of your
block output.
Version 7.5 (R2010a) Simulink®Software
This block now supports fixed-point data types when you select sin, cos,or
sincos and set Approximation method to CORDIC.
Enhanced Block Support for Enumerated Data Types
The following Simulink blocks now support enumerated data types:
• Data Type Conversion Inherited
• Data Type Duplicate
• Interval Test
• Interval Test Dynamic
• Probe (input only)
• Relay (output only)
• Unit Delay Enabled
• Unit Delay Enabled Resettable
• Unit Delay Resettable
• Unit Delay With Preview Enabled
• Unit Delay With Preview Enabled Resettable
• Unit Delay W ith Preview Enabled Resettable External R V
• Unit Delay With Preview Resettable
• Unit Delay With Preview Resettable External RV
For more information, see “Using Enumerated D ata” in the Simulink User’s
Guide.
Lookup Table Dynamic Block Supports Direct Selection of
Built-In Data Types for Outputs
In R2010a, you can select the following data types directly for the Output
data type parameter of the Lookup Table Dynamic block:
•
double
• single
23
Simulink®Release Notes
• int8
• uint8
• int16
• uint16
• int32
• uint32
• boolean
Previously, you had to enter an expression for Output data type to specify
abuilt-indatatype.
Compare To Zero and Wrap To Zero Blocks Now Support
Parameter Overflow Diagnostic
If the input data type to a Compare To Zero or Wrap To Zero block
cannot represent zero, detection of this parameter overflow occurs. In the
Diagnostics > Data Validity pane of the Configuration Parameters dialog
box, set Parameters > Detect overflow to
warning or error.
24
Data Type Duplicate Block Enhancement
The Data Type Duplicate block is now a built-in block. Previously, this block
was a masked S-Function. The read-only BlockType parameter has changed
from
S-Function to DataTypeDuplicate.
Compatibility Considerations. In R2010a, signal propagation might
behave differently from previous releases. As a result, your model might
not compile under these conditions:
• Your model contains a Data Type Duplicate block in a source loop.
• Your model has underspecified signal data types.
If your model does not com pile, set data types for signals that are not fully
specified.
Version 7.5 (R2010a) Simulink®Software
Lookup Table and Lookup Table (2-D) Blocks To Be Deprecated
in a Future Release
In a future release, the Lookup Table and Lookup Table (2-D) blocks will no
longer appear in the Simulink Library Browser. Consider replacing instances
of those two blocks by using 1-D and 2-D versions of the Lookup Table (n-D)
block. Among other enhancements, the Lookup Table (n-D) block supports the
following features that the other two blocks do not:
• Specification of parameter data types different from input or output signal
types
• Reduced memory use and faster code execution for evenly spaced
breakpoints that are nontunable
• Fixed-point data types with word lengths up to 128 bits
• Specification of index search method
• Specification of action for out-of-range inputs
25
Simulink®Release Notes
To upgrade your model:
Step
1
Description
Run the Simulink Model Advisor
check for “Check model, local
libraries, and referenced models
Reason
Identify blocks that do not have
compatible settings with the
Lookup Table (n-D) block.
for known upgrade issues”.
2
For each block that does not have
compatible settings with the
Lookup Table (n-D) block:
Modify each Lookup Table or
Lookup Table (2-D) block to make
them compatible.
• Decide how to address each
warning.
• Adjust block parameters as
needed.
3
Repeat steps 1 and 2 until you
are satisfied with the results of
Ensure that block replacement
works f or the e ntire model.
the Model Advisor check.
4
Run the
slupdate function on
your model.
Perform block replacement with
the Lookup Table (n-D) block.
Compatibility Considerations. The Model Advisor check groups all Lookup
Table and Lookup Table (2-D) blocks into three categories:
26
• Blocks that have compatible settings with the Lookup Table (n-D) block
• Blocks that have incompatible settings with the Lookup Table (n-D) block
• Blocks that have repeated breakpoints
Blocks with Compatible Settings
When a block has compatible parameter settings with the Lookup Table
(n-D) block, automatic block replacement can occur without backward
incompatibilities.
Version 7.5 (R2010a) Simulink®Software
Lookup Method in the
Lookup Table or Lookup
Table (2-D) Block
Interpolation-Extrapolation LinearLinear
Interpolation-Use End
Values
Use Input BelowNone-Flat
Parameter Settings in the Lookup Table (n-D)
Block After Block Replacement
InterpolationExtrapolation
LinearNone-Clip
Not applicable
Depending on breakpoint characteristics, the Lookup Table (n-D) block uses
one of two index search methods.
Breakpoint Characteristics in the Lookup
Table or Lookup Table (2-D) Block
Not evenly spaced
Evenly spaced and tunable
Evenly spaced and nontunable
Index Search Method in the Lookup Table
(n-D) Block After Block Replacement
Binary search
A prom pt appears, asking you to select
search
or Evenly spaced points.
TheLookupTable(n-D)blockalsoadopts other parameter settings from the
Lookup Table or Lookup Table (2-D) block. For parameters that exist only
in the Lookup Table (n-D) block, the following default settings apply after
block replacement:
Binary
Lookup Table (n-D) Block Parameter
Breakpoint data type
Action for out-of-range input
Blocks with Incompatible Settings
When a block has incompatible parameter settings with the Lookup Table
(n-D) block, the Model Advisor shows a warning and a recommended action,
if applicable.
• If you perform the recommended action, you can avoid incompatibility
during block replacement.
Default Setting After Block Replacem ent
Inherit:Same as corresponding input
None
27
Simulink®Release Notes
• If you use automatic block replacement without performing the
recommended action, you might see numerical differences in your results.
Incompatibility WarningRecommended Actio n
The Lookup Method is Use
Input Nearest
. The Lookup Table
Above
or Use Input
(n-D) block does not support
these lookup methods.
Change the lookup method to
one of the following:
•
Interpolation Extrapolation
• Interpolation - Use End
Values
• Use Input Below
The Lookup Method
is
Interpolation -
Extrapolation
,butthe
Change the extra p ola tio n
method or the port data types
of the block.
input and output are not
thesamefloating-point
type. The Lookup Table
(n-D) block supports line ar
extrapolation only when all
inputs and outputs are the
same floating-point type.
The block uses small
None
fixed-point word lengths,
so that interpolation uses only
one rounding operation. The
Lookup Table (n-D) block uses
two rounding operations for
interpolation.
What Happens for
Automatic Block
Replacement
The Lookup Method changes
to
Interpolation - Use End
Values
.
In the Lookup Table (n-D)
block, this setting corresponds
to:
• Interpolation set to
Linear
• Extrapolation set to
None-Clip
You also see a message that
explains possible numerical
differences.
You see a message that
explains possible numerical
differences.
28
Blocks with Repeated Breakpoints
When a block has repeated breakpoints, the Model Advisor recommends that
you change the breakpoint data and rerun the check. You cannot perform
automatic block replacement for blocks with repeated breakpoints.
Version 7.5 (R2010a) Simulink®Software
Elementary Math Block Now Obsolete
The Elementary Math block is now obsolete. You can replace any instance
of this obsolete block in your model by using one of these blocks in the Math
Operations library:
• Math Function
• Rounding Function
• Trigonometric Function
Compatibility Considerations. If you open a model that contains an
Elementary Math block, a warning message appears. This message suggests
running
slupdate on your model to replace each instance of the obsolete
block with an appropriate substitute.
If you try to start simulation or generate code for a model that contains this
obsolete block, an error message appears.
DocBlock Block RTF File Compression
In R2010a, when you add or modify a DocBlock block that uses Microsoft
RTF format and you save the model, Simulink compresses the RTF file. The
savedRTFfileswithimagesaremuchsmallerthaninpreviousreleases.
®
Compatibility Cons id er ati ons . In R2010a, if you use
slupdate or save a
model that includes a DocBlock block that uses RTF format, you cannot run
the model in an earlier version of Simulink.
To run a model that has a compressed RTF file in an earlier version of
Simulink, use Save As to save the model in the format of the earlier release.
Simulink Extras PID Controller Blocks Deprecated
In R2010a, the PID Controller (with Approximate Derivative) and PID
Controller blocks of the Simulink Extras library no longer appear in the
Simulink Library Browser. For models created using R2009b or earlier,
consider using the
PID Controller block of the Simulink/Continuous or Simulink/Discrete library.
Among other enhancements, the new PID Controller block supports:
slupdate function to replace these blocks with the new
29
Simulink®Release Notes
• Continuous-time and discrete-time modeling
• Ideal and Parallel controller forms
®
• Automatic PID tuning (requires a Simulink
For more information, see the PID Controller and PID Controller (2 DOF)
block reference pages.
Compatibility Consideration s. For backward compatibility, simulation and
code generation of models that contain the deprecated PID Controlle r (with
Approximate Derivative) or PID Controller block continue to work.
Control Design™ license)
User Interface Enhancements
Model Explorer Column Views
The Model Explorer now supports column views, which specify sets of property
columns to display in the Contents pane. The Model Explorer displays
only the properties that are defined for the current column view. The Model
Explorer does not add new properties dynamically as you add objects to the
Contents pane. Using a defined subset of properties to display streamlines
the task of exploring and editing model object p roperties and increases the
density of the data displayed.
30
Model Explorer provides several standard column views with common
property sets. You can:
• Select the column view based on the task you are performing
• Customize the standard column views
• Create your own column views
• Export and import column views saved in MAT-files, which you can share
with other users
See “Controlling the Set of Displayed Properties”.
Compatibility Considerations. Column views replace the Customize
Contents option provided in previous releases.
Version 7.5 (R2010a) Simulink®Software
In R2010a, the Model Explorer provides a different interface for performing
some of the tasks that you p rev iously performed using View menu items. The
following table summarizes differences between R2009b and R2010a.
R2009b View Menu ItemR2010a Model Explorer
Interface Change
Dialog View
Customize ContentsReplaced by Column View > Show
Show PropertiesEliminated; select Column
Mark Nonexistent Properties
Library Browser
List View Options
Replaced by Show Dialog Pane
Details
View > Show Details to specify
properties to display
Replaced by Show Nonexistent
Properties as
Eliminated (you can access the
Library Browser from the Simulink
Editor View menu)
Replaced by Row Filter
-
Model Explorer Display of Masked Subsystems and Linked
Library Subsystems
The Model Explorer now contains global options for specifying whether the
Model Explorer displays the contents of library links and masked subsystems.
These options also control whether the Model Hierarchy pane displays
linked or masked subsystems. See “Displaying Masked Subsystems”and
“Displaying Linked Library Subsystems”.
Compatibility Considerations. In R2010a, when you select a masked
subsystem node in the Model Hierarchy pane, the Contents pane displays
the o bjects of the subsystem, reflecting the global setting to display masked
subsystems. In prior releases, if you selected a masked subsystem node, you
needed to right-click the node and select Look Under Mask to view the
subsystem objects in the Contents pane.
In R2010a, the search results reflect the Show Library Links and Show
Masked Subsystems settings. In previous releases, you specified the Look
31
Simulink®Release Notes
Inside Masked Subsys tem s and Look Inside Linked Subsystems options
as part of the search options. R2010a does not include those search options.
Model Explorer Object Count
The top-right section of the Contents pane displays a count of objects found
for the currently selected nodes in the Model Hierarchy pane. The count
indicates the number of objects displayed in the Contents pane, compare d to
the total number of objects in the currently selected nodes. The number of
displayed objects is less than the total number of objects in scope when you
filter some objects by using View > Row Filter options. See .
Model Explorer Search Option for Variable Usage
You can use the new for Variable Usage search type to search for blocks
that use a variable that is defined in the base or model workspaces. See
“Search Bar Controls”.
Model Explorer Display of Signal Logging and Storage Class
Properties
The Model Explorer Contents pane displays the following additional
properties for s ig nal lines:
32
• Signal logging-related properties (such as
• Storage class properties, including properties as sociated with custom
storage classes for signals
Displaying these p roperties in the Contents pane enables batch editing.
Prior to R2010a, you could edit these properties only in the Signal Properties
dialog box.
DataLogging)
Model Explorer Column Inser tion Options
In R2010a, right-clicking on a column heading in the Contents pane provides
two new column insertion options:
• Insert Path –addsthe
column.
Path property column to the right of the selected
Version 7.5 (R2010a) Simulink®Software
• Insert Recently Hidden Columns – selects a property from a list of
columns you recently hid, to add that property column to the right of the
selected column
See “Adding Property Columns”.
Diagnostics for Data Store Memory Blocks
The Model Advisor ’By Task’ folder now contains a Data Store Memory Blocks
subfolder. This subfolder contains checks relating to Data Store Memory
blocks that exam ine your model for:
• Multitasking , strong typing, and shadowin g issues
• An enabled status of the read/write diagnostics
• Read/write issues
New Command-Line Option for RSim Targets
Anew h command-line option allows you to print a summary of the available
options for RSim executable targets.
Simulink.SimulationOutput.get Method for Obtaining
Simulation Results
The Simulink.SimulationOutput class now has a get method. After
simulating your model, you can use this method to access simulation results
from the Simulink.SimulationOutput object.
Simulink.SimState.ModelSimState Class has New snapshotTime
Property
The Simulink.SimState.ModelSimState class has a new snapshotTime
property. You can use this property to access the exact time at which
Simulink took a “snapshot” of the simulation state (SimState) of your model.
Simulink.ConfigSet.saveAs to Save Configuration Sets
The saveAs method is added to the Simulink.ConfigSet class to allow you
to easily save the settings of configuration sets as M ATLA B functions or
scripts. Using the MATLAB function or script, you can share and archive
33
Simulink®Release Notes
model configuration sets. You can also compare the settings in different
configuration sets by comparing the MATLAB functions or scripts of the
configuration sets.
For details, see “Saving Configuration Sets” in the Simulink User’s Guide.
S-Functions
Building C MEX-Files from Ada and an Example Ada Wrapper
In an R2008b release note, the MathWorks announced that support for Ada
S-functions in Simulink would be removed in a future release and a migration
strategy would be forthcoming. In this release, the addition of a technical
note facilitates your incorporating Ada code into Simulink without using Ada
S-functions support.
This technical note demonstrates:
• how to build a C MEX S-function from Ada code without using the
command
ada
• an example Ada wrapper around a C MEX S-Function API
mex
New S-Function API Ch ecks for Branched Fun ction-Calls
A new S-function API, ssGetCallSystemNumFcnCallDestinations,allows
you to determine the number of function-call blocks that your S-function calls.
Based on this returned number, you can then deduce whether or not your
S-function calls a branched function-call.
You can call this SimStruct function from
your S-function.
mdlSetWorkWidths or later in
New C MEX S-Function API and M-File S-Function Flag for
Compliance with For Each Subsystem
To allow a C MEX S-function to reside inside of a For Each Subsystem block,
you must call the new
flag to true in the
ssSupportsMultipleExecInstances API and set the
mdlSetWorkWidths method.
34
Version 7.5 (R2010a) Simulink®Software
As for M-file S-functions, you must set the new flag
block.SupportsMultipleExecInstances to true in the Setup section.
Legacy Code Tool Enhanced to Support Enumerated Data Types
and Structured Tunable Parameters
The Legacy Code Tool has been enhanced to support
• Enumerated data types for input, output, parameters, and work vectors
• Structured tunable parameters
For more information about data types that the Legacy Code Tool supports,
see “Supported Data Types”. For more information about the Legacy Code
Tool, see
• “Integrating Existing C Functions into Simulink Models with the Legacy
Code Tool” in the Writing S-Functions documentation
•
legacy_code function reference page
Compatibility Considerati ons . For enumerated data type support:
• If you upg rade from R2008b or later re lease, you can continue to compile
the S-function source code and continue to use the compiled output from
an earlier release without recompiling the code.
• If you upgrade from R2008a or earlier release, you cannot use enumerated
types; the Simulink engine will display an error during simulation.
You cannot use tunable structured parameters with Legacy Code Tool in a
release prior to R2010a.
Documentation Improvements
Modeling Guidelines for High-Integrity Systems
The MathWorks intends the “Modeling Guidelines for High-Integrity
Systems” document for engineers developing models and generating code for
high-integrity system s using Mo del-Based Design with MathWorks products.
This document describes creating S im u l in k model s that are complete,
35
Simulink®Release Notes
unambiguous, statistically deterministic, robust, and verifiable. The
document focus is on model settings , block usage, and block parameters that
impact simulation behavior or code generated by the Real-Time Workshop
®
Embedded Coder™ product.
These guidelines do not assume that you use a particular safety or certification
standard. The guidelines reference some safety standards where applicable,
including DO-178B, IEC 61508, and MISRA C
®
.
You can use the Model Advisor to support adhering to these guidelines. Each
guideline lists the checks that are applicable to that guideline.
For more information, see “Modeling Guidelines for High-Integrity Systems”
in the Simulink documentation.
MathWorks Automotive Advisory Board Control Algorithm
Modeling Guidelines Using MATLAB, Simulink, and Stateflow
Included in Help
The MathWorks Automotive Advisory Board (MAAB) involves major
automotive original equipment manufacturers (OEMs) and suppliers in the
process of evolving MathWorks controls, simulation, and code generation
products, including the Simulink, Stateflow, and Real-Time Worksh o p
products. An important result of the MAAB has been the “MathWorks
Automotive Advisory Board Control Algorithm Modeling Guidelines Using
MATLAB, Simulink, and Stateflow.” Help for the Simulink product now
includes these guidelines. The MAAB guidelines link to relevant Model
Advisor MAAB check help and MAAB check help links to relevant MAAB
guidelines.
36
For more information, see “MathWorks Automotive Advisory Board Control
Algorithm Modeling Guidelines Using MATLAB, Simulink, and Stateflow” in
the Simulink documentation.
Version 7.4 (R2009b) Simulink Software
This table summarizes what’s new in V7.4 (R2009b):
Version 7.4 (R2009b) Simulink®Software
New Features and
Changes
Yes
Details below
Version
Compatibility
Considerations
Yes—Details labeled
as CompatibilityConsiderations,
below. See also
Summary.
New features and changes introduced in this version are organized by these
topics:
• “Simulation Performance” on page 37
• “Component-Based Modeling” on page 39
• “Variable-Size Signals” on page 42
• “Embedded MATLAB Function Blocks” on page 43
• “Simulink Data Managem ent” on page 44
• “Removing Support for Custom Floating- P oi nt Types in Future Release”
on page 46
• “Simulink File Management” on page 47
Fixed Bugs an d
Known Problems
Bug Reports
Includes fixes
Related
Documentation at
Web Site
No
• “Block Enhancements” on page 47
• “User Interface Enhancements” on page 57
Simulation Performance
Single-Output sim Syntax
An enhanced sim command provides for greater ease of use and for
greater compatibility with
simulation results to a single object, the management of output variables is
straightforward for all cases, including parallel computing.
parfor loops. Since the command now saves all
37
Simulink®Release Notes
Expanded Support by Rapid Accelerator
Simulink Rapid Accelerator mode now supports root inputs of enum erated
data ty pe and fixed-point parameters of any word length.
SimState Support in Accelerator Mode
Simulink Accelerator mode now supports the SimState feature. You can
therefore save the simulation state and later resume the simulation from
the exact save time.
Integer Arithmetic Applied to Sample Hit Computations
For fixed-step simulations, Simulink now computes sample time hits using
integer arithmetic. This modification improves the timing resolution of
sample hits of multirate models.
Compatibility Considera tions. Previously, if an S-function had two
rates, and if (ssIsSampleHit(S, idx1) == true && ssIsSampleHit(S,idx2)
== true, then Simulink would adjust the task times to be evaluated as
ssGetTaskTime(S, idx1) == ssGetTask Time(S, idx2). Simulink no longer
forces this equality; instead, Simulink now leaves the individual task times to
be integer multiples of their corresponding periods. Consequently, existing
code with logic that relies upon the equality of the task times needs to be
updated.
38
In addition, the behavior of the command get_param(model, ’SimulationTime’)
is now different. Instead of returning the time of the next known sample hit
at the bottom of the current step, this com mand now returns the current time.
Improved Accuracy of Variable-Step Discrete Solver
For variable-step discrete simulation of purely discrete models, where the
fundamental step size is the same as the fastest discrete rate, Simulink now
uses the specified start and stop times.
Version 7.4 (R2009b) Simulink®Software
Compatibility Considerations. Previously, if the fundamental step size was
equal to the fastest discrete rate, the Simulink simulation did not uniformly
honor the user-specified start and stop times. Specifically, if the start and
stop times were not exact multiples of the fundamental step size, then the
start time was adjusted to the time of the first sample time hit and the
simulation stopped at t he sample time hit just before the specified stop time.
However, if the simulation was required to hit certain time points (either by
specifying
the
OutputTimes parameter), then the start and stop times were not adjusted
Now Simulink variable-step simulation of purely discrete models consistently
honors the user-specified start and stop times, irrespective of whether the
fastest discrete sa mple time is the GCD of all of the other samp l e times
TSPAN in the sim command such as ’sim(’Model_A’,[0 10])’, or via
Component-Based Modeling
Enhanced Library Link Management
In R2009b, improved library link management facilitates visualizing and
restoring edited library links. See “Working with Library Links” for more
information.
Enhanced Mask Editor Provides Tabs and Signal Attributes
You can use the R2009b Mask Editor to create a mask that has tabbed panes,
and define the same signal attribute specifications in a mask that built-in
Simulink blocks provide. See “Working with Block Masks” , “Simulink Mask
Editor”and “Mask Icon Drawing Commands”for more information.
Model Reference Variants
Model reference variants allow you to configure any Model block to select
its referenced model from a set of candidate models. The selection occurs
when you compile the model that contains the Model block, and depends on
the values of one or more MATLAB variables or Simulink parameters in
the base workspace. To configure a Model block to select the model that it
references, you:
• Provide a set of Boolean expressions that reference base workspace values.
39
Simulink®Release Notes
• Associate each expression with one of the models that the block could
reference.
When you compile the m odel, Simulink evaluates all the expressions. Each
Model block that uses model refere nce variants then selects the candidate
model whose associated expression is
true, and ignores all the other models.
Compilation then proceeds exactly as if you had entered the name of the
selected model literally in the Model block’s Model name field.
You can nest Model blocks that use variants to any level, allowing you to
define any number of arbitrarily complex customized models within a single
framework. No matter how many simulation environments you define,
selecting one requires only setting variable or parameter values appropriately
in the base workspace. See “Using Model Reference Variants” for more
information.
Protected Referenced Models
A protected model is a referenced model from which all block and line
information has been eliminated. Protecting a model does not use encryption
technology. A protected model can be distributed without revealing the
intellectual pro perty that it embodies. The model is said to run in Protected
mode, and gives the same results that its source model does when run in
Accelerator mode.
40
You can use a protected model much as you could any referenced model that
executes in Accelerator mode. Simulink tools work with protected models
to the extent possible given that the model’s contents are obscured. For
example, the Model Explorer and the Model Dependency Viewer show the
hierarchy under an ordinary referenced model, but not under a protected
model. Signals in a protected model cannot be logged, because the log could
reveal information about the protected model’s contents.
When a referenced model requires object definitions or tunable parameters
that are defined in the MATLAB base workspace, the protected version of the
model may need some or all of those same definitions when it executes as part
of a third-party model. Simulink provides techniques for identifying and
obtaining the needed data. You can use the Simulink Manifest Tools or other
techniques to package the model and any data for delivery.
Version 7.4 (R2009b) Simulink®Software
Protecting a model requires a Real-Time Workshop license, which makes
code generation capabilities available for use internally when creating the
protected version of the mode l. The receiver of a prote cted model d oes not nee d
a Real-Time Workshop license to use the model, and cannot use Real-Time
Workshop to generate code for the model or any model that references it.
To accommodate protected models, the Model block now accepts a suffix in the
Model name field. This suffix can be
.mdl for an unprotected model or .mdlp
for a protected model. If the suffix is omitted, Model block first searches the
MATLAB path for a block with the specified name and the suffix
search fails, the block searches the path for a model with the suffix
.mdl.Ifthat
.mdlp.
The Model block now has a field named
ProtectedModel, a boolean
that indicates whether the referenced model is protected, and three
fields for representing the name of the referenced model in different
formats:
ModelNameDialog, ModelName,andModelFile. See the Model
block parameters in “Ports & Subsystems Library Block Parameters” for
information about these parameters. For more information about pro tecting
models, see “Protecting Referenced Models”.
Simulink Manifest Tools
Enhanced Simulink Manifest Tools now discover and analyze model variants,
protected models, and Simscape™ files.
New manifest analysis options for controlling whether to report file
dependency locations for user files, all files, or no files. For example, you may
not want to view the file locations of all the dependencies on MathWorks
products. This is typical if your main use of Simulink Manifest Tools is to
discover and package all the required files for your model. By not analyzing
file locations, you speed up report creation, and the report is smaller and
easier to navigate. If you need to trace all dependencies to understand why a
particular file or toolbox is required by a model, you can always regenerate
the full report of all files.
The manifest report is enhanced with sortable columns, and now MATLAB
Programs as well as P-files are reported in the manifest if both exist.
For more information, see “Model Dependencies” in the Simulink User’s
Guide.
41
Simulink®Release Notes
S-Function Builder
The S-Function Builder has been enhanced to support bus signals for
managing complex signal interfaces. See Developing S-Functions for more
information.
Variable-Size Signals
New capability that allows signal sizes to change during execution facilitates
modeling of systems with varying environments, resources, and constraints.
For Simulink models that demonstrate using variable-size signals, see
“Working with Variable-Size Signals”
Simulink Support
• Referenced Model
• Simulink Accelerator and Rapid Accelerator
• Bus Signals
42
• C-mex S-function
• Level-2 M-file S-function
• Simulink Debugger
• Signal Logging and Loading
• Block Run-Time Object
Simulink Block Support
Support for variable-size signal inputs and outputs in over 40 Simulink
blocks including many blocks from the Math Operations library. For a list of
Simulink blocks, see “Simulink Block Support for Variable-Siz e Signals”
Version 7.4 (R2009b) Simulink®Software
Embedded MATLAB
Function Blocks
Support for Variable-Size Arrays and Matrices
Embedded MATLA
matrices w ith
outputs, and l
B Function blocks now support variable-size arrays and
known upper bounds. With this feature, you can define inputs,
ocal variables to represent data that varies in size at runtime.
Change in Text and Visibility of Parameter Prompt for Easier
Use with Fixed-Point Advisor and Fixed-Point Tool
The Lock output scaling against changes by the autoscaling tool check
box is now Lock data type setting against changes by the fixed-pointtools. Previously, this check box was visible only if you entered an expression
or a fixed-point data type, such as
visible for any data type specification. This enhancement enables you to lock
the current data type settings on the dialog box against changes that the
Fixed-Point Advisor or Fixed-Point Tool chooses.
fixdt(1,16,0). This check box is now
New Compilation Report for Embedded MATLAB Function
Blocks
The new compilation report provides compile-time type information for the
variables and expressions in your Embedded MATLAB functions. This
information helps you find the sources of error messages and understand
type propagation issues, particularly for fixed-point data types. For more
information, see “Working with Compilation Repo rts” in the Simulink User’sGuide.
Compatibility Considera tions. The new compilation report is not
supported by the MATLAB internal browser on Sun™ Solaris™ 64-bit
platforms. To view the compilation report on Sun Solaris 64-bit platforms, you
must configure your MATLAB Web preferences to use an external browser,
for example, Mozilla Firefox. To learn how to configure your MATLAB Web
preferences, see Web Preferences in the MATLAB documentation.
New
Options for Controlling Run-time Checks for Faster
Performance
simulation, the code generated for Embedded MATLAB Function blocks
In
cludes various run-time checks. To reduce the size of the generated code,
in
43
Simulink®Release Notes
and potentially improve simulation times, you can use new Simulation
Target configuration parameters to control whether or not your generated
code performs:
• Integrity checks to detect violations of memory integrity in the generated
code. For more information, see “Ensure memory integrity” in the SimulinkGraphical User Interface.
• Responsiveness checks to periodically check for Ctrl+C breaks and refresh
graphics. For more information, see “Ensure responsiveness” in the
Simulink Graphical User Interface.
Embedded MATLAB Function Blocks Improve Size Propagation
Behavior
Heuristics for size propagation have improved for underspecified models.
During size propagation, Embedded MATLAB Function blocks no longer
provide default sizes. Instead, for underspecified models, Simulink gets
defaults from other blocks that have more size information.
44
Compatibility Considerations. Certain underspecified models that
previously ran without error may now generate size mismatch errors.
Examples of underspecified models include:
• Models that contain a cycle in which no block specifies output size
• Models that do not specify the size of input ports
To eliminate size mismatch errors:
• Specify sizes for the input ports of your subsystem or model.
• Specify sizes of all ports on at least one block in any loop in your model.
Simulink Data Management
New Function Exports Workspace Variables and Values
The new Simulink.saveVars function can save workspace variables and their
values into a MATLAB file. Th e file containing the data is hu man-readable
and can be manually edited. If Simulink cannot generate MATLAB code for a
workspace variable,
Simulink.saveVars saves that variable into a companion
Version 7.4 (R2009b) Simulink®Software
MAT-file rather than a MATLAB file. Executing the MATLAB file (which also
loads any companion MAT file) restores the saved variables and their values
to the workspace. See
Simulink.saveVars for more information.
New Enumerated Constant Block Outputs Enumerated Data
Although the Constant block can output enume rated values, it provides many
block parameters that do not apply to enumerated types, such as Outputminimum and Output maximum. In R2009b, the Sources library includes
the Enumerated Constant block. When you need a block that outputs constant
enumerated values, use Enumerated Constant rather than Constant to avoid
seeing irrelevant block parameters.
Enhanced Switch Case Block Supports Enumerated Data
The Switch Case block now supports enumerated data types for the input
signal and case conditions. For more inform ation, see “Using Enumerated
Data” and the Switch Case block documentation.
Code for Multiport Switch Block Shows Enumerated Values
In previous releases, generated code for a Multiport Switch block that uses
enumerated data contains the underlying integer for each enumerated
value rather than its name. In R2009b, the code contains the name of each
enumerated value rather than its underlying integer. This change adds
readability and facilitates comparing the code with the model, but has
no effect on the behavior of the code. For more information, see “Using
Enumerated Data” and Multiport Switch.
Data Class Infrastructure Partially Deprecated
Some classes and properties in the Simulink data class infrastructure have
been deprecated in R2009b. See “Working with Data” for information about
Simulink data classes.
45
Simulink®Release Notes
Compatibility Considerations. If you use any of the deprecated constructs,
Simulink posts a warning that identifies the construct and describes one or
more techniques for eliminating it. The techniques differ depending on the
construct. You can ignore these warnings in R2009b, but The MathWorks
recommends making the described changes now because the deprecated
constructs may be removed from future releases, upgrading the warnings
to errors.
Saving Simulation Results to a Single Object
Enhanced sim command that saves all simulation results to a single object for
easier management of simulation results.
Simulation Restart in R2009b
In order to restart an R2009a simulation in R2009b, you should first
regenerate the initial SimState in R2009b.
Compatibility Consid erations. TheSimStatethatSimulinksavesfroma
R2009a simulation might be incompatible with the internal representation of
the same model in R2009b. Simulink detects this incompatibility when the
R2009a SimState is used to restart a R2009b simulation. If the mismatch
resides in the model interface only, then Simulink issues a warning. (You
can use the Simulink diagnostic ‘SimState interface checksum mismatch’ to
turn o ff such warnings or to direct Simulink to report an error.) However, if
the mismatch resides in the structural representation of the model, then
Simulink reports an error. To avoid these errors and warnings, you need to
regenerate the initial SimState in R2009b.
46
Removing Support for Custom Floating-Point Types
in Future Release
Support for custom floating-point types, float(TotalBits, ExpBits),will
be removed in a future release.
In R2009b, Sim ul in k continues to process these types.
For more information, see
float.
Version 7.4 (R2009b) Simulink®Software
Simulink File Ma
nagement
Removal of Functions
The following f
• adams.m
• euler.m
• gear.m
• linsim.m
• rk23.m
• rk45.m
unctionsarenolongeravailable:
Deprecation of SaveAs to R12 and R13
In R2009b,
model to r
and R13 us
will also
youwillnolongerbeabletousethe
eleases R12 or R13. You will, however, be able to save models to R12
ing the command-line. In R2010a, the command-line capability
be removed.
Improved Behavior of Save_System
When yo
you wil
sful.
succes
uusethe
l no longer receive a dialog box that indicates that the save was
save_system function to sav e a model to an earlier release,
SaveAs featuretosavea
Block
Enhancements
New Turnkey PID Controller Blocks for Convenient Controller
Simulation and Tuning
You can implement a continuous- or discrete-time PID controller with just
one block by using one of the new PID Controller and PID Controller (2DOF)
blocks. With the new blocks, you can:
• Configure your controller in any common controller configuration, including
PID, PI, PD, P, and I.
47
Simulink®Release Notes
• Tune PID controller gains either manu ally in the block or automatically
in the new PID Tuner. (PID Tuner requires a Simulink Control Design
license.)
• Generate code to implement your controller using any Simulink data type,
including fixed-point data types (requires a Rea l- T ime Workshop license).
You can set many options in the PID Controller and PID Controller (2DOF)
blocks, including:
• Ideal or parallel controller configurations
• Optional output saturation limit with anti-windup circuitry
• Optional signal-tracking mode for bumpless control transfer and multiloop
controllers
• Setpoint weighting in the PID Controller (2DOF) block
The blocks are available in the Continuous and Discrete libraries. For more
information on using the blocks, see the PID Controller and PID Controller
(2DOF) reference pages. For more info rmationontuningthePIDblocks,see
Automatic PID Tuning in the Simulink Control Design reference pages.
48
New Enumerated Constant Block Outputs Enumerated Data
Although the Constant block can output enume rated values, it provides many
block parameters that do not apply to enumerated types, such as Outputminimum and Output maximum. In R2009b, the Sources library includes
the Enumerated Constant block. When you need a block that outputs constant
enumerated values, use Enumerated Constant rather than Constant to avoid
seeing irrelevant block parameters.
Enhanced Switch Case Block Supports Enumerated Data
The Switch Case block now supports enumerated data types for the input
signal and case conditions. For more inform ation, see “Using Enumerated
Data” and the Switch Case block documentation.
Code for Multiport Switch Block Shows Enumerated Values
In previous releases, generated code for a Multiport Switch block that uses
enumerated data contains the underlying integer for each enumerated
Version 7.4 (R2009b) Simulink®Software
value rather than its name. In R2009b, the code contains the name of each
enumerated value rather than its underlying integer. This change adds
readability and facilitates comparing the code with the model, but has
no effect on the behavior of the code. For more information, see “Using
Enumerated Data” and Multiport Switch.
Discrete Transfer Fcn Block Has Performance, Data Type,
Dimension, and Complexity Enhancements
The following enhancements apply to the Discrete Transfer Fcn block:
• Improved numerics and run-time performance of outputs and states by
reducing the number of divide operations in the filter to one
• Support for signed fixed-point and signed integer data types
• Support for vector and matrix inputs
• Support for input and coefficients with mixed complexity
• AnewInitial states param eter for entering nonzero initial states
• AnewOptimize by skipping divide by leading denominator
coefficient (a0) parameter that provides more efficient implementation
by eliminating all divides when the leading d enominator coefficient is one.
This enhancement provides optimized block performance.
Compatibility Considerations. Due to these enhancements, you might
encounter the following compatibility issues:
• Realization parameter removed
The Real-Time Workshop software
removed from this block. You can no longer use the
get_param functions on this block parameter. The generated code for this
block has been improved to be similar to the former
realization parameter has been
set_param and
'sparse' realization
when the Optimize by skipping divide by leading denom inator
coefficient (a0) parameter is selected, while maintaining tunability as in
the former
'general' realization when the parameter is not selected.
• State changes
49
Simulink®Release Notes
Due to the reduction in the number of divide operations that the block
performs, you might notice that your logged states have changed when the
leading denominator coefficient is not o n e.
Lookup Table (n-D) Block Supports Parameter Data Types
Different from Signal Data Types
The Lookup Table (n-D) block supports breakpoint data types that differ from
input data types. This enhancement provides these benefits:
• Lower memory requirement for storing breakpoint data that uses a smaller
type than the input signal
• Sharing of prescaled breakpoint data between two Lookup Table (n-D)
blocks with different input data types
• Sharing of custom storage breakp oint data in Real-Time Work sh op
generated code for blocks with different i nput data types
The Lookup Table (n-D) block supports table data types that differ from
output data types. This enhancement provides these benefits:
50
• Lower memory requirement for storing table data that uses a smaller type
than the output signal
• Sharing of prescaled table data between two Lookup Table (n-D) blocks
with different output data types
• Sharing of custom storage table data in Real-Time Workshop generated
code for blocks with different output data types
The Lookup Table (n-D) block also supports separate data type specification
for intermediate results. This enhancement enables use of a higher precision
for internal computations than for table data or output data.
For consistency with other lookup table blocks, the Process out-of-rangeinput parameter prompt is now Action for out-of-range input.
Similarly, the command-line parameter is now
ActionForOutOfRangeInput.
For backward compatibility, the old comm an d-line parameter
ProcessOutOfRangeInput continues to work. The parameter settings also
remain the same:
None, Warning,orError.
Version 7.4 (R2009b) Simulink®Software
Reduced Memory Use and More Efficient Code for Evenly
Spaced Breakpoints in Prelookup and Lookup Table (n-D)
Blocks
For the Prelookup and Lookup Table (n-D) blocks, Real-Time Workshop
generated code now stores only the first breakpoint, spacing, and number
of breakpoints when:
• The breakpoint data is nontu n ab le.
• The index search method is
This enhancement reduces memory use and provides faster code execution.
Previously, the code stored all breakpoint values in a set, regardless of the
tunability or spacing of the breakpoints.
The following enhancements also provide more efficient code for the two
blocks:
Block
Lookup Table (n-D)Removal of unnecessary bit shifts for
Prelookup and Lookup Table (n-D)Use of simple division instead of
Evenly spaced points.
Enhancement for Code Efficiency
calculating the fraction
computationally expensive function
calls for calculating the index and
fraction
Math Function Block Computes Reciprocal of Square Root
The Math Functio n block now supports a new function for computing the
reciprocal of a square root:
separate blocks for this computation, resulting in smaller block diagrams.
1/sqrt. You can use one block instead of two
You can select one of two methods for computing the reciprocal of a square
root:
Exact or Newton-Raphson. B oth methods support real input and output
signals. When you use the
number of iterations to perform the algorithm.
Newton-Raphson method, you can also specify the
51
Simulink®Release Notes
Math Function Block Enhancements for Real-Time Workshop
Code Generation
The Math Function b lock now supports Real-Time Workshop code generation
in these cases:
• Complex input and output signals for the
floating-point data types
• Fixed-point data types with fractional slope and nonzero bias for the
magnitude^2, square,andreciprocal functions
pow function, for use with
Relational Operator Block Detects Signals That Are Infinite,
NaN, or Finite
The Relational Operator block now includes isInf, isNaN,andisFinite
functions to detect signals that are infinite, NaN, or finite. These new functions
support real and complex input signals. I f you select one of these functions,
the block changes automatically to one-input mode.
Changes in Text and Visibility of Dialog Box Prompts for Easier
Use with Fixed-Point Advisor and Fixed-Point Tool
The Lock output scaling against changes by the autoscaling tool
check box is now Lock output data type setting against changes bythe fixed-point tools. Previously, this check box was visible only if you
entered an expression or a fixed-point data type for the output, such as
fixdt(1,16,0). This check box is now visible for any output data type
specification. This enhancement helps you lock the current data type settings
on a dialog box against changes that the Fixed-Point Advisor or Fixed-Point
Tool chooses.
52
This enhancement applies to the following blocks:
• Abs
• Constant
• Data Store Memory
• Data Type Conversion
• Difference
• Discrete Derivative
• Discrete-Time Integrator
• Divide
• Dot Product
• Fixed-Point State-Space
• Gain
• Inport
• Lookup Table
• Lookup Table (2-D)
• Lookup Table Dynamic
• Math Function
• MinMax
• Multiport Switch
Version 7.4 (R2009b) Simulink®Software
• Outport
• Prelookup
• Product
• Product of Elements
• Relay
• Repeating Sequence Interpolated
• Repeating Sequence Stair
• Saturation
• Saturation Dynamic
• Signal Specification
• Switch
The Lock scaling against changes by the autoscaling tool check box is
now Lock data type settings against changes by the fixed-point tools.
Previously, this check box was visible only if you entered an expression or a
53
Simulink®Release Notes
fixed-point data type, such as fixdt(1,16,0). This check box is now visible
for any data type specification. This enhancement helps you lock the current
data type settings on a dialog box against changes that the Fixed-Point
Advisor or Fixed-Point Tool chooses.
This enhancement applies to the following blocks:
• Discrete FIR Filter
• Interpolation Using Prelookup
• Lookup Table (n-D)
• Sum
• Sum of Elements
Direct Lookup Table (n-D) Block Enhancements
The Direct Lookup Table (n-D) block now supports:
• Direct entry of Number of table dimensions
Prompt on Block Dialog
Box
Number of table
dimensions
Inputs select this object
from table
Make table an input
54
• Entry of Table data using the Lookup Table Editor
Previously, entering an integer greater than 4 for the Number of tabledimensions required editing Explicit num ber of table dimensions.This
extra parameter no longer appears on the block dialog box. For backward
compatibility, scripts that contain
explicitNumDims continue to work.
The other parameters for the block have changed as follows. For backward
compatibility, the old command-line parameters continue to work.
Old Command-Line
New Command-Line Parameter
Parameter
maskTabDimsNumberOfTableDimensions
outDimsInputsSelectThisObjectFromTable
tabIsInputTableIsInput
Version 7.4 (R2009b) Simulink®Software
Prompt on Block Dialog
Box
Table data
Action for out-of-range
input
Sample time
The read-only BlockType parameter has also changed from S-Function to
LookupNDDirect.
Compatibility Considerations. In R2009b, signal dimension propagation
can behave differently from previous releases. Your model might not compile
under these conditions:
• A Direct Lookup Table (n-D) block is in a source loop.
• Underspecified signal dimensions exist.
If your model does not compile, set dimensions explicitly for underspecified
signals.
Unary Minus Block Enhancements
Conversion of the Unary Minus block from a masked S-Function to a core
block enables more efficient simulation of the block.
Old Command-Line
New Command-Line Parameter
Parameter
mxTableTable
clipFlagActionForOutOfRangeInput
samptimeSampleTime
You can now specify sample time for the block. The Saturate to max or min
when overflows occur check box is now Saturate on integer overflow,
and the command-line parameter is now
backward compatibility, the old command-line parameter
SaturateOnIntegerOverflow.For
DoSatur continues
to work.
The read-only BlockType parameter has also changed from
UnaryMinus.
S-Function to
55
Simulink®Release Notes
Weighted Sample Time Block Enhancements
Conversions of the Weighted Sample Time and Weighted Sample Time
Math blocks from masked S-Functions to core blocks enable more efficient
simulation of the blocks.
The following parameter changes apply to both blocks. For backward
compatibility, the old command-line parameters continue to work.
Old Prompt on
Block Dialog
Box
Output data
type mode
Saturate
to m ax or
min when
overflows
occur
New Prompt
on Block Dialog
Box
Output data
type
Saturate
Old
Command-Line
New Command-Line
Parameter
Parameter
OutputDataType
ScalingMode
DoSaturSaturateOnIntegerOverflow
OutDataTypeStr
on integer
overflow
The read-only BlockType parameter has also changed from S-Function to
SampleTimeMath.
Switch Case Block Parameter Change
For the Switch Case block, the command-line parameter for the Show default
case check box is now
command-line parameter
ShowDefaultCase. For backward compatibility, the old
CaseShowDefault continues to work.
Signal Conversion Block Parameter Change
For the Signal Conversion block, the parameter prompt for the Override
optimizations and always copy signal check box is now Exclude this
block from ’Block reduction’ optimization.
56
Version 7.4 (R2009b) Simulink®Software
Compare To Constant and Compare To Zero Blocks Use New
Default Setting for Zero-Crossing Detection
The En able zero-crossing detection parameter is now on by default for
the Compare To Constant and Compare To Zero blocks. This change provides
consistency with other blocks that support zero-crossing detection.
Signal Builder Block Change
You can no longer see the system under the Signal Builder block mask. In
previous releases, you could right-click this block an d select Look UnderMask.
In the Model Explorer, the Signal Builder block no longer appears in the
Model Hierarchy view. In previous releases, this view was visible.
User Interface Enhancements
Context-Sensitive Help for Simulink Blocks in the Continuous
Library
R2009b introduces context-sensitive help for parameters that appear in
Simulink blocks of the Continuous library. This feature provides quick access
to a detailed description of the block parameters.
To use the context-sensitive help:
1 Place your pointer over the label of a parameter and right-click.
2 A What’s This? contex t menu appears.
For example, the following figure shows the What’s This? context menu
that appears after right-clicking the Enable zero-crossing detection
parameter for the PID Controller block.
57
Simulink®Release Notes
3 Click What’s This? A window appears showing a description of the
parameter.
Adding Blocks from a Most Frequently Used Blocks List
If you are using the same block repeatedly in a model, then you can save
time by using the:
• Most Frequently Used Blocks tab in the L ibrary Browser
• Most Frequently Used Blocks contextmenuoptionintheModelEditor
These features provide quick access to blocks you have added to models
frequently. For details, see “Adding Frequently Used Blocks”.
Highlighting for Duplicate Inport Blocks
The Highlight to Destination option for a signal provides more information
now for duplicate inport blocks. Applying this option to a signal of an inport
block that has duplicate blocks highlights:
58
• The signal and destination block for that signal
• The signals and destination blocks of the duplicate blocks at the currently
opened level in the model
Using the Model Explorer to Add a Simulink.NumericType
Object
You can add a Simulink.N umericType object to the model workspace using
the M odel Explorer, provided you do not enable the Is alias option.
An example of when you might use this feature is when you:
• Want to define user-defined data types together in the model
• Do not need to preserve the data type name in the model or in the
generated code
Version 7.4 (R2009b) Simulink®Software
Block Output Display Dialog Has OK and Cancel Buttons
The Block Output Display dialog now includes OK and Cancel buttons to
specify whether or not to apply your option settings.
Improved Definition of Hybrid Sample Time
Historically, you could not use the hybrid sample time to effectively identify
a multirate subsystem or block. A subsystem was marked as “hybrid” and
colored in yellow whether it contained two discrete sample times or one
discrete sample time and one or more blocks with constant sample time [inf,
0]. Now, in R2009b, the check for the hybrid attribute no longer includes
constant sample times, thereby improving the usefulness of the hybrid sample
time color in identifying subsystems (and blocks) that are truly multirate.
Find Option in the Model Advisor
In R2009b, the Model Advisor includes a Find option to he lp you find checks.
The find option, accessible through the Edit menu, allows you to find checks
and folders more easily by searching names and analysis descriptions.
For more information, see “Overview of the Model Advisor Window”.
59
Simulink®Release Notes
Version 7.3 (R2009a) Simulink Software
This table summarizes what’s new in V7.3 (R2009a):
New Features and
Changes
Yes
Details below
Version
Compatibility
Considerations
Yes—Details labeled
as CompatibilityConsiderations,
below. See also
Summary.
New features and changes introduced in this version are organized by these
topics:
• “Simulation Performance” on page 60
• “Component-Based Modeling” on page 61
• “Embedded MATLAB Function Blocks” on page 63
• “Data Management” on page 63
• “Simulink File Management” on page 65
• “Block Enhancements” on page 65
• “User Interface Enhancements” on page 75
• “S-Functions” on page 76
Fixed Bugs an d
Known Problems
Bug Reports
Includes fixes
Related
Documentation at
Web Site
No
60
• “Removal of Lookup Table Designer from the Lookup Table Editor” on
page 77
Simulation Performance
Saving and Restoring the Complete SimState
Use the new SimState feature to save the complete simulation state. Unlike
the final states stored in earlier versions of Simulink, the SimState contains
the complete simulation state of the model (including block states that are
Version 7.3 (R2009a) Simulink®Software
logged). You can then restore the state at a later time and continue simulation
from the exact instant at which you stopped the simulation.
Save Simulink Profiler Results
Save the results of the Simulink Profile r and later regenerate reports for
review or for c ompariso n.
Component-Based Modeling
Port Value Displays in R eferenced Models
In R2009a, port value displays can appear for blocks in a Normal mode
referenced model. To control port value displays, choose View > Port Values
in the model w in d ow. For complete information about port value displays, see
“Displaying Block Outputs”.
Parallel Builds Enable Faster Diagram Updates for Large Model
Reference Hierarchies In Accelerator Mode
R2009a provides potentially faster diagram updates for models containing
large model reference hierarchies by building referenced models that are
configured in Accelerato r mode in parallel whenever possible. For example,
updating of each model block can be distributed across the cores of a m ulticore
host computer.
To take advantage of this feature, Parallel Computing Toolbox™ software
must be licensed and installed in your development environment. If Parallel
Computing Toolbox softwa re is available, updating a model diagram rebuilds
referenced models configured in Accelerator mode in parallel whenever
possible.
For example, to use parallel building for updat ing a large model reference
hierarchy on a desktop machine with four cores, you could perform the
following steps:
1 Issue the MATLAB command ’matlabpool 4’ to set up a pool of four
MATLAB workers, one for each core, in the Parallel Computing Toolbox
environment.
61
Simulink®Release Notes
2 Open your model and make sure that the referenced models are configured
in Accelerator mode.
3 Optionally, inspect the model reference hierarchy. For example, you can
use the Model Dependency Viewer from the Tools menu of Model Explorer
to determine, based on model dependencies, which models will be built
in parallel.
4 Update your model. Messages in the MATLAB command window record
when each parallel or se rial build starts and finishes.
The performance gain realized by using parallel builds for updating
referenced models depends on several factors, including how many models
can be built in parallel for a given model referencing hierarchy, the size of
the r eferenced models, and host machine attributes such as amount of RAM
and number of cores.
The following notes apply to using parallel builds for updating model
reference hierarchies:
62
• Parallel builds of referenced models support only local MATLAB workers.
They do not support remote workers in MATLAB
®
Distributed Computing
Server™ configurations.
• The host machine should have an appropriate amount of RAM available for
supporting the number of local workers (MATLAB sessions) that you plan to
use. For example, setting
matlabpool to 4 results in five MATLAB sessions
on your machine, each using approximately 120 MB of memory at startup.
• The same MATLAB environment must be set up in each MATLAB worker
session as in the MATLAB client session — for example, the same base
workspace variables, MATLAB path settings, and so forth. You can do this
using the
PreLoadFcn callback of the top model. Since the top model is
loaded with each MATLAB worker session, its preload function can be used
for any MATLAB worker session setup.
Version 7.3 (R2009a) Simulink®Software
Embedded MATLAB
Function Blocks
Support for Enumerated Types
Embedded MATLA
types and gene
in Embedded MA
B Function blocks now support Simulink enumerated
rate C code for enumerated data. See “Using Enumerated Data
TLAB Function Blocks” in the Simulink documentation.
Use of Basic Linear Algebra Subprograms (BLAS) Libraries for
Speed
Embedded MATLAB Function blocks now use BLAS libraries to speed up
low-level matrix operations during simulation. See “Speeding Up Simulation
with the Basic Linear Algebra Subprograms (BLAS) Library” in the Simulink
documentation.
Data Management
Signal Can Resolve to at Most One Signal Object
You can resolve a named signal to a signal object. The object can then
specify or validate properties of the signal. For more information, see
Simulink.Signal, “Using Signal Objects to Initialize Signals and Discrete
States”, “Using Signal Objects to Tune Initial Values”, and “Applying CSCs
to Parameters and Signals”.
In previous releases, y ou could associate a signal with multiple signal objects,
provided that the multiple objects specified com patible signal attributes. In
R2009a, a signal can be associated with at most one signal object. The signal
can re ference the object more than once, but every reference must resolve to
exactly the same object. A different signal object that has exactly the same
properties will not meet the requirement. See “Multiple Signal Objects” for
more information.
63
Simulink®Release Notes
Compatibility Considerations. A compile-time error occurs in R2009a if
a model associates more than one signal object with any signal. To prevent
the error, decide which object the signal will use, and delete or reconfigure all
references to any other signal objects so that all remaining references resolve
to the chosen signal object. See “Displaying Signal Sources and Destinations”
for a description of techniques that youcanusetotracethefullextentof
asignal.
“Signed” Renamed to “Signedness” in the
Simulink.NumericType class
In previous releases, the Property dialog of a Simulink.NumericType object
whose Data type mode was any
named Signed, which was a checkbox. Selecting the checkbox specified
a signed type; clearing it specified an unsigned type. The API equivalent
of Signed was
Signed, a Boolean whose values could be 1 (signed) or 0
(unsigned).
In R2009a, a property named Signedness replaces Signed in the Property
dialog of a
Simulink.NumericType object. You can set Signedness to Signed
(the default), Unsigned,orAuto, which specifies that the object inherits its
Signedness.TheAPIequivalentofSignedness is
be 1 (signed), 0 (unsigned), or
Fixed-point mode showed a property
Signedness, which can
Auto.
64
For compatibility with existing models, the property
in R2009a. Setting
Signed in R2009a returns the value of Signedness if that value is 0 or 1, or
generates an error if the value of
legal value for
Do not use the
Signedness instead. See Simulink.NumericType for more information.
Signed in R2009a sets Signedness accordingly. Accessing
Signedness is Auto, because that is not a
Signed.
Signed with Simulink.NumericType in new models; use
Signed remains available
“Sign” Renamed to “Signedness” in the Data Type Assistant
For blocks and classes that support fixed-point data types, the property
Sign previously appeared in the Data Type Assistant when the Mode was
Fixed point. In R2009a, this property appears in the Data Type Assistant
as Sign edn ess. Only the GUI label of the property differs; its behavior and
API are unchanged in all contexts.
Version 7.3 (R2009a) Simulink®Software
Tab Completion for Enumerated Data Types
Tab comple tion now works for enumerated data types in the same way that it
does for other MATLAB classes. See “Tab Completion” in “Instantiating an
Enumerated Type in MATLAB” for details.
Simulink File Management
Model Dependencies Tools
Enhanced file dependency analysis has the following new features:
• Files in the Simulink manifest are now recorded relative to a project
root folder making manifests easier to share, compare and read. See
“Generating Manifests” and “Editing Manifests”.
• Command-line dependency analysis can now report toolbox dependencies,
and when discovering file dependencies you can optionally generate a
manifest file. See “Command-Line D ependency Analysis”
Block Enhancements
Prelookup and Interpolation Using Prelookup Blocks Support
Parameter Data Types Different from Signal Data Types
The Prelookup block supports breakpoint data types that differ from input
data types. This enhancement provides these benefits:
• Enables lower memory requirement for storing breakpoint data that uses a
smaller type than the input signal
• Enables sharing of prescaled breakpoint data between two Prelookup
blocks with different input data types
• Enables sharing of custom storage breakpoint data in Real-Time Workshop
generated code for blocks with different i nput data types
The Interpolation Using Prelo okup block su pports t a ble data types that differ
from output data types. This enhancement provides these benefits:
• Enables lower memory requirement for storing table data that uses a
smaller type than the output signal
65
Simulink®Release Notes
• Enables sharing of prescaled table data between two Interpolation Using
Prelookup blocks with different output data types
• Enables sharing of custom storage table data in Real-Time Workshop
generated code for blocks with different output data types
The Interpolation Using Prelookup block also supports separate data type
specification for intermediate resu lts. This enhancement enables use of a
greater precision for internal computations than for table data or output data.
Lookup Table (n-D) and Interpolation Using Prelookup Blocks
Perform Efficient Fixed-Point Interpolations
Whenever possible, Lookup Table (n-D) and Interpolation Using Prelookup
blocks use a faster overflow-free subtraction algorithm for fixed-point
interpolation. To achieve this efficiency, the blocks use a data type of larger
containersizetoperformtheoverflow-free subtraction, instead of using
control-flow branches as in previous releases. Also, Real-Time Workshop
generated code for fixed-point interpolation is now smaller.
66
Compatibility Considerations. Duetothechangeintheoverflow-free
subtraction algorithm, fixed-point interpolation in Lookup Table (n-D) and
Interpolation Using Prelookup blocks might, in a few cases, introduce
different ro unding results from previous releases. Both simulation and code
generation use the new overflow-free algorithm, so they have the same
rounding behavior and provide bit-true consistency.
Expanded Support for Simplest Rounding Mode to Maximize
Block Efficiency
In R2009a, support for the Simplest rounding mode has been expanded to
enable more blocks to handle mixed floatin g- point and fixed-point data types:
• Abs
• Data Type Conversion Inherited
• Difference
• Discrete Derivative
• Discrete FIR Filter
• Discrete-Time Integrator
• Dot Product
• Fixed-Point State-Space
• Gain
• Index Vector
• Lookup Table (n-D)
Version 7.3 (R2009a) Simulink®Software
• Math Function (for the
magnitude^2, reciprocal, square,andsqrt
functions)
• MinMax
• Multiport Switch
• Saturation
• Saturation Dynamic
• Sum
• Switch
• Transfer Fcn Direct Form II
• Transfer Fcn Direct Form II Time Varying
• Transfer Fcn First Order
• Transfer Fcn Lead or Lag
• Transfer Fcn Real Zero
• Weighted Sample Time
• Weighted Sample Time Math
For more information, see “Rounding Mode: Simplest” in the Simulink
Point™ User’s Guide.
®
Fixed
New Rounding Modes Added to Multiple Blocks
For the follow ing Simulink blocks, the dialog box now displ ays Convergent
and Round as poss ible rounding modes. These modes enable numerical
agreement with embedded hardware and MATLAB results.
67
Simulink®Release Notes
• Abs
• Data Type Conversion
• Data Type Conversion Inherited
• Difference
• Discrete Derivative
• Discrete FIR Filter
• Discrete-Time Integrator
• Divide
• Dot Product
• Fixed-Point State-Space
• Gain
• Index Vector
• Interpolation Using Prelookup
68
• Lookup Table
• Lookup Table (2-D)
• Lookup Table (n-D)
• Lookup Table Dynamic
• Math Function (for the
functions)
• MinMax
• Multiport Switch
• Prelookup
• Product
• Product of Elements
• Saturation
• Saturation Dynamic
• Sum
magnitude^2, reciprocal, square,andsqrt
Version 7.3 (R2009a) Simulink®Software
• Switch
• Transfer Fcn Direct Form II
• Transfer Fcn Direct Form II Time Varying
• Transfer Fcn First Order
• Transfer Fcn Lead or Lag
• Transfer Fcn Real Zero
• Weighted Sample Time
• Weighted Sample Time Math
In the dialog box for these blocks, the field Round integer calculations
toward has been renamed Integer rounding mode. The command-line
parameter remains the same.
For more information, see “Rounding Mode: Convergent” and “Rounding
Mode: Round” in the Simulink Fixed Point User’s Guide.
Compatibility Considerations. If you use an earlier version of Simulink
software to open a model that uses the
themodechangesautomatically to
Convergent or Round rounding mode,
Nearest.
Lookup Table (n-D) Block Performs F aster Calculation of Index
and Fraction for Power of 2 Evenly-Spaced Breakpoint Data
For power of 2 evenly-spaced breakpoint data, the Lookup Table (n-D) block
uses bit shifts to calculate the index and fraction, i ns te ad of division. This
enhancement provides these benefits:
• Faster calculation of index and fraction for power of 2 evenly-spaced
breakpoint data
• Smaller size of Real-Time Workshop generated code for the Lookup Table
(n-D) block
Discrete FIR Filter B lock Supports More Filter Structures
The following filter structures have been added to the Discrete FIR Filter
block:
69
Simulink®Release Notes
• Direct form symmetric
• Direct form antisymmetric
• Direct form transposed
• Lattice MA
Running a model with these filter structures requires a Signal Processing
Blockset™ license.
Discrete Filter Block Performance, Data Type, Dimension, and
Complexity Enhancements
The following enhancements have been made to the Discrete Filter block:
• Improved numerics and run-time performance of outputs and states by
reducing the number of divide operations in the filter to at most one
• Support for signed fixed-point and integer data types
• Support for vector and matrix inputs
70
• Support for complex inputs and filter coefficients, where inputs and
coefficients can each be real or complex, independently of the other
• AnewInitial states parameter allow s you to enter non-zero initial states
• AnewLeading denominator coefficient equals 1 parameter provides a
more efficient implementat io n by eliminating all divides when the leading
denominator coefficient is one
Compatibility Considerations. Due to these enhancements, you might
encounter the co mpatibility issues in the following sections.
Realization parameter removed. The Real-Time Workshop software
realization parameter has been removed from this block. You can no
longer use the
set_param and get_param functions on this block parameter.
The generated code for this block has been improved to be similar to the
former
'general' realization.
'sparse' realization, while maintaining tunability as in the former
Version 7.3 (R2009a) Simulink®Software
State changes. Due to the reduction in the number of divide operations
performed by the block, you might notice that your logged states have changed
when the leading denominator coefficient is not one.
MinMax Block Performs More Efficient and Accurate
Comparison Operations
For multiple inputs with mixed floating-point and fixed-point data types, the
MinMax block selects an appropriate data type for performing comparison
operations, instead of using the output data type for all comparisons, as in
previous releases. This enhancement provides these benefits:
• Faster comparison operations, with fewer fixed-point overflows
• Smaller size of Real-Time Workshop generatedcodefortheMinMaxblock
In R2009a, the Logical Operator block has been enhanced with a new NXOR
Boolean operator. When you select this operator, the block returns TRUE
when an even num ber of inputs are TRUE. Similarly, the block returns
FALSE when an even number of inputs are FALSE.
Use
NXOR to replace serial XOR and NOT operations in a model.
When you select the Limit output check box for the Forward Euler method,
the Discrete-Time Integrator block uses only one saturation when a second
saturation is unnecessary. This change in the integration-limiting algorithm
provides these benefits:
• Faster integration
• Smaller size of Real-Time Workshop generated code for the Discrete-Time
Integrator block
71
Simulink®Release Notes
Dot Product Block Converted from S-Function to Core Block
Conversion of the Dot Product block from a masked S-Function to a core
block enables more efficient simulation and better handling of the block in
Simulink models.
Due to this conversion, you can specify sample time and values for the output
minimum and maximum for the Dot Product block. The read-only BlockType
parameter has also changed from
Compatibility Considerations. In R2009a, signal dimension propagation
might behave differently from previous releases. As a result, your model
might not compile under these conditions:
• Your model contains a Dot Product block in a source loop.
• Your model has underspecified signal dimensions.
If your model does not compile, set dimensions for signals that are not fully
specified.
S-Function to DotProduct.
72
For example, your model mig ht not compile in this case :
• Your model contains a Transfer Fcn Direct Form II Time Varying block,
which i s a masked S-Function with a Dot Product block in a source loop.
• The second and third input ports of the Transfer Fcn Direct Form II Time
Varying block are unconnected, which results in underspecified signal
dimensions.
To ensure that your model compiles in this case, connect C onstant blocks to
the second and third input ports of the Transfer Fcn Direct Form II Time
Varying block and specify the signal dimensions for both ports explicitly.
Pulse Generator Block Uses New Default Values for Period
and Pulse Width
For the Pulse G enerator block, the default Period value has changed f rom 2
to 10, and the default Pulse Width value has changed from 50 to 5. These
changes enable easier transitions between time-based and sample-based
mode for the pulse type.
Version 7.3 (R2009a) Simulink®Software
Random Number and Unit Delay Blocks Use New Default
Values for Sample Time
The default Sample time values for the Random Number and Unit Delay
blocks have changed:
• The default Sample time value for the Random Number block has changed
from 0 to 0.1.
• The default Sample time value for the Unit Delay block has changed
from 1 to -1.
Trigonometric Function Block Provides Better Support of
Accelerator Mode
The Trigonometric Function block now supports Accelerator mode for all
cases with real inputs and Normal mode support. For more information about
simulation modes, see “Accelerating Models” in the Simulink User’s Guide.
Reshape Block Enhanced with New Input Port
The Reshape block Output dimensionality parameter has a new option,
Derive from reference input port. This option creates a second input
port,Ref,ontheblockandderivesthedimensions of the output signal from
the dimensions of the signal input to the Ref input port. Similarly, the
Reshape block command-line parameter,
new option,
Derive from reference input port.
OutputDimensionality,hasthe
Multidimensional Signals in Simulink Blocks
The following blocks were updated to support multidimensional signals. For
more information, see “Signal Dimensions” in the Simulink User’s Guide.
• Assertion
• Extract Bits
• Check Discrete Gradient
• Check Dynamic Gap
• Check Dynamic Lower Bound
• Check Dynamic Range
73
Simulink®Release Notes
• Check Dynamic Upper Bound
• Check Input Resolution
• Check Static Gap
• Check Static Lower Bound
• Check Static Range
• Check Static Upper Bound
• Data Type Scaling Strip
• Wrap to Zero
Subsystem Blocks Enhanced with Read-Only Property That
Indicates Virtual Status
The following subsystem blocks now have the property, IsSubsystemVirtual.
This read-only property returns a Boolean value,
subsystem is virtual.
on or off,toindicateifa
74
• Atomic Subsystem
• Code Reuse Subsystem
• Configurable Subsystem
• Enabled and Triggered Subsystem
• Enabled Subsystem
• For Iterator Subsystem
• Function-Call Subsystem
• If Action Subsystem
• Subsystem
• Switch Case Action Subsystem
• Triggered Subsystem
• While Iterator Subsystem
Version 7.3 (R2009a) Simulink®Software
User Interface Enhancements
Port Value Displays in R eferenced Models
In R2009a, port value displays can appear for blocks in a Normal mode
referenced model. To control port value displays, choose View > Port Values
in the model w in d ow. For complete information about port value displays, see
“Displaying Block Outputs”.
Print Sample Time Legend
Print the Sample Time Legend either as an option of the block diagram print
dialog box or directly from the legend. In either case, the legend will print
on a separate sheet of paper. For more information, see “Print Sample Time
Legend”.
M-API for Access to Compiled Sample Time Information
New M A TLAB API provides access to thecompiledsampletimedata,color,
and annotations for a specific block or the entire block diagram directly from
M code.
Model Advisor Report Enhancements
In R2009a, the Model Advisor report is enhanced with:
• The ability to save the report to a location that you specify.
• Improved readability, including the ability to:
- Filter the report to view results according to the result status. For
example, you can now filter the report to show errors and warnings only.
- Collapse and expand the folder view in the report.
- View a summary of results for each folder in the report.
See “Consulting the Model Advisor” in the Simulink User’s Guide.
Counterclockwise Block Rotation
This release lets you rotate blocks counterclockwise as well as clockwise (see
“How to Rotate a Block” for more information).
75
Simulink®Release Notes
Physical Port Rotation for Masked Blocks
This release lets you specify that the ports of a masked block not be
repositioned after a clockwise rotation to maintain a left-to-right and
top-to-bottom numbering of the ports. This enhancement facilitates use of
masked blocks in mechanical systems, hydraulic systems, and other modeling
applications where block diagrams do not have a preferred orientation (see
“Port Rotation Type” for more information.)
Smart Guides
In R2009a, when you drag a block, Simulink draws lines, called smart guides,
that indicate when the block’s ports, center, and edges align with the ports,
centers, and edges of other blocks in the same diagram. This helps you create
well-laid-out diagrams (see “Smart Guides” for more information).
Customizing the Library Browser’s User Interface
Release 2009a lets you customize the Library Browser’s user interface. You
can change the order in which libraries appear in the Library Browser, disable
or hide libraries, sublibraries, and blocks, and add, disable, or hide items
on the Library Browser’s menus. See “Customizing the Library Browser”
for more information.
76
Subsystem Creation Command
This release adds a command, Simulink.BlockDiagram.createSubSystem,
that creates a subsystem from a specified group of blocks.
S-Functions
Level-1 Fortran S-Functions
In this release, if you attempt to compile or simulate a model with
a Level-1 Fortran S-function, you will receive an error due to the
use of the newly deprecated function ’MXCREATEFULL’ within the
Fortran S-function wrapper ’simulink.F’. If your S-function does not
explicitly use ’MXCREATEFULL’, simply recompile the S-function. If
your S-function uses ’MXCREATEFULL’, replace each instance with
’MXCREATEDOUBLEMATRIX’ and recompile the S-function.
Version 7.3 (R2009a) Simulink®Software
Removal of Lookup Table Designer from the Lookup
Table Editor
In R2009a, the Lookup Table Designer is no longer available in the Lookup
Table Editor.
Compatibility Considerations
Previously, you could select Edit > Design Table in the Lookup Table Editor
to laun ch the Lookup Table Designer. In R2009a, this menu item is no longer
available.
77
Simulink®Release Notes
Version 7.2 (R2008b) Simulink Software
This table summarizes what’s new in V7.2 (R2008b):
New Features and
Changes
Yes
Details below
Version
Compatibility
Considerations
Yes—Details labeled
as CompatibilityConsiderations,
below. See also
Summary.
New features and changes introduced in this version are organized by these
topics:
• “Simulation Performance” on page 78
• “Component-Based Modeling” on page 80
• “Embedded MATLAB Function Blocks” on page 84
• “Data Management” on page 86
• “Simulink File Management” on page 87
• “Block Enhancements” on page 87
• “User Interface Enhancements” on page 89
• “S-Functions” on page 121
Fixed Bugs an d
Known Problems
Bug Reports
Includes fixes
Related
Documentation at
Web Site
No
78
• “MATLAB Changes Affecting Simulink” on page 122
Simulation Performance
Parallel Simulations in Rapid Accelerator Mode
Simulink now has the capability to run parallel simulations in Rapid
Accelerator mode using
parfor on prebuilt Simulink models.
Version 7.2 (R2008b) Simulink®Software
You can now run parallel simulations in Rapid Accelerator mode with
different external inputs and tunable parameters. The
called from a
For more information, see “Running a Simulation Programmatically”.
parfor loop if the model does not require a rebuild.
sim command can be
Improved Rebuild Mechanism in Rapid Accelerator Mode
Simulink now has enhanced tuning of the solver and logging parameters in
Rapid Accelerator mode without requiring a rebuild.
An improved rebuild mechanism ensures that the model does not rebuild
when you change block diagram parameters (e.g., stop time, solver tolerances,
etc.). This enhancement significantly decreases the time for simulation in
Rapid Accelerator mode.
Data Type Size Limit on Accelerated Simulation Removed
In previous releases, accelerated simulation was not supported for models
that use i nte ger or fixed-point data types greater than 32 bits in le n gth.
In this release , the acceleration limit on integer and fixed-point data type
size has increased to 128 bits, the same as the limit for normal-mode, i.e.,
unaccelerated simulation.
New Initialization Behavior in Conditional, Action, and Iterator
Subsystems
For releases prior to 2008b, at the simulation start time, Simulink initializes
all blocks unconditionally and subsystems cannot reset the states. Release
2008b introduces behavior that mirrors the behavior of Real-Time Workshop.
For normal simulation mode, the Simulink block initialization method
(mdlInitializeConditions) can be called more than once at the start time if:
• The block is contained within a Conditional, Action, or Iterator subsystem.
• The subsystem is configured to reset states when enabled (or triggered);
and the subsystem is enabled (or triggered) at the start time.
This new initialization behavior has the following effect on S-functions:
79
Simulink®Release Notes
• If you need to ensure that the initialization code in the
mdlInitializeConditions function runs only once, then move this
initialization code into the mdlStart method. The MathWorks recommends
this code change as a best practice.
• The change to the block initialization method, as described above, exposed
a b ug in the S-function macro ssIsFirstInitCond for applications involving
an S-function within a Conditional, Action or Iterator subsystem. This bug
has been fixed in R2008b.
To determine if you consequently need to update your Simulink S-functions
for compatibility, compare the simulation results from R2007b or an
earlier release with those of R2008b. If they differ at the start time,
ssIsFirstInitCond is running more than once and you must regenerate and
recompile the appropriate Simulink S-functions.
For Real-Time Workshop, you must regenerate and recompile all S-function
targets and any Real-Time Workshop targetforwhichtheabsolutetimeis
turned on. (If a third-party vendor developed your S-functions, have the
vendor regenerate and recompile them for you. The vendor can use the
SLDiagnostics feature to identify all S-functions in a model.)
80
Component-Based Modeling
Processor-in-the-Loop Mode in Model Block
In R2008b, Simulink has a new Model block simulation mode for
processor-in-the-loop (PIL) verification of generated code. This feature
requires Real-Time Workshop Embedded Coder software. The feature lets
you test the automatically generated and cross-compiled object code on your
embedded processor by easily switching between Normal, Accelerator, and
PIL simulation modes in your original model. You can reuse test suites,
resulting in faster iteration between model development and generated code
verification. For more information, see “Referenced Model Simulation Modes”.
R2008b of Simulink includes enhanced handling of initial conditions for
conditionally executed subsystems, Merge blocks, and Discrete-Time
Integrator blocks, improving consistency of simulation results.
Version 7.2 (R2008b) Simulink®Software
This feature allows you to select simplified initialization mode for
conditionally executed subsystems, Merge blocks, subsystem elapsed time,
and Discrete-Time Integrator blocks. The simplified initialization improves
the consistency of simulation results, especially for models that do not specify
initial conditions for conditional subsystem output ports, and for models that
have conditionally executed subsystem output ports connected to S-functions.
Note To use the new simplified initialization mode, you must activate this
feature.
Activating This Feature for New M odels. For new models, you can
activate this feature as follows:
1 In the model window, select Simulation > Configuration Parameters.
The Configuration Parameters dialog box opens.
2 Select Diagnostics > Data Validity.
The Data Validity Diagnostics pane opens.
3 In the Model Initialization section, set Underspecified initialization
detection to
4 Select Diagnostics > Connectivity.
Simplified.
The Connectivity Diagnostics pane opens.
5 Set Mux blocks used to create bus signals to error.
6 Set Bus signal treated as vector to error.
7 Click OK.
For more information, see “Underspecified initialization detection”.
MigratingExistingModels. For existing models, The MathWorks
recommends using the Model Advisor to migrate your model to the new
simplified initialization mode settings.
81
Simulink®Release Notes
To migrate an existing model:
1 In the model window, select Simulation > Configuration Parameters.
The Configuration Parameters dialog box opens.
2 Select Diagnostics > Data Validity.
The Data Validity Diagnostics pane opens.
3 In the Merge Block section, set Detect multiple driving blocks
executing at the same time step to
4 Click OK.
5 Simulate the model and ensure that it runs without errors.
6 Select Tools > Model Advisor.
error.
The Model Advisor opens.
82
7 In the Model Advisor Task Manager, select By Product > Simulink.
8 Run Check for proper bus usage in the Model Advisor.
9 Run Check consistency of initialization parameters for Outport and
Merge blocks in the Model Advisor.
10 After you have resolved any errors identified by this check, click Proceed
to migrate your model to simplified initialization mode.
For information on using the Model Advisor, see “Consulting the Model
Advisor” in the Simulink User’s Guide.
For information on the Model Advisor checks, see “Check consistency of
initialization parameters for Outport and M erge blocks” in the SimulinkReference.
Version 7.2 (R2008b) Simulink®Software
Compatibility Con siderations. Activating this feature can cause
differences in simulation results, when compared to previous versions. Since
you must opt-in to this feature before any changes are made, there are no
issues for existing models. However, The MathWorks recommends that you
backup e xisting models before you migrate them, in case you want to return
to the original behavior.
Model Block Input Enhancement
Model block inputs can now be local and reusable. This capability reduces
global data usage and data copying when interfacing with code from a
referenced model, which can reduce memory usage during simulation and
increase the efficiency of generated code. This enhancement is always
relevant,sonoconfiguratio n parameter is necessary or provided to control it.
One Parameter Controls Accelerator Mode Build Verbosity
In previous releases, the ModelReferenceSimTargetVerbose parameter
controlled verbosity when a referenced model was built for execution
in Accelerator mode, as specified by the Model block’s Simulation mode
parameter. The
See “Referenced Model Simulation Modes” and the Model block documentation
for more information.
ModelReferenceSimTargetVerbose had no GUI equivalent.
A different parameter,
AccelVerboseBuild, controls the verbosity when a
model is built in Simulink AcceleratormodeorRapidAcceleratormode,
as specified in the Simulation menu. See “Accelerating Models” for more
information. The GUI equivalent of the
AccelVerboseBuild parameter
is Configuration Parameters > Optimization > Verbose accelerator
builds. See “Verbose accelerator builds” for more information.
All types of accelerated s imulation entail code generation (though the code
is not visible to the user) and the two verbosity parameters control whether
a detailed account of the code generation process appears in the MATLAB
Command Window. How ever, providing separate verbosity parameters for
the two cases was unnecessary.
In R2008b, the
and has no effect. The
ModelReferenceSimTargetVerbose parameter is deprecated
AccelVerboseBuild parameter (Configuration
Parameters > Optimization > Verbose accelerator bu ilds) now controls
83
Simulink®Release Notes
the verbosity for Simulink A ccelerato r mode, referenced model Accelerator
mode, and Rapid Accelerator mode.
Another parameter,
RTWVerbose (Configuration Parameters > Real-Time
Workshop > Debug > Verbose build) controls the verbosity of Real-Time
Workshop code generation. This parameter is unaffected by the changes to
ModelReferenceSimTargetVerbose and AccelVerboseBuild.
Compatibility Consid er a tions. In R2008b, trying to set
ModelReferenceSimTargetVerbose generates a warning message and has no
effect on verbosity. The warning says to use
default for
AccelVerboseBuild is 'off'.
AccelVerboseBuild instead. The
A model saved in R2008b will not include the
ModelReferenceSimTargetVerbose parameter. An R2008b model saved to an
earlier Simulink version that supports
ModelReferenceSimTargetVerbose
will include that parameter, giving it the same value that AccelVerboseBuild
has in the R2008b version.
The effect of loading a model from an earlier Simulink version into R2008b
depends on the source version:
• Prior to R14: Neither parameter exists, so no compatibility consideration
arises.
• R14 – R2006b: Only
value to
AccelVerboseBuild.
ModelReferenceSimTargetVerbose exists. Copy its
• R2007a: Both parameters exist but neither has a GUI equivalent. Ignore
the value of
ModelReferenceSimTargetVerbose and post no warning.
84
• R2007b – R2008a: Both parameters exist and
has a GUI equivalent. If
a warning to use
AccelVerboseBuild instead.
ModelReferenceSimTargetVerbose is 'on',post
AccelVerboseBuild and
Embedded MATLAB Function Blocks
Support for Fixed-Point Word Lengths Up to 128 Bits
Embedded MATLAB Function blocks now support up to 128 bits of fixed-point
precision. T his increase in maximum precision from 32 to 128 bits supports
Version 7.2 (R2008b) Simulink®Software
generating efficie nt code for targets with non-standard word sizes and a llow s
Embedded MATLAB Function blocks to work with large fixed-point signals.
Enhanced Simulation and Code Generation Options for
Embedded MATLAB Function Blocks
You can now specify embeddable code ge ne ration options from the Embedded
MATLAB Editor using a new menu item: Tools > Open RTW Target.
Simulation options continue to be available from Tools > Open SimulationTarget.
In addition, simulation and embeddable code generation options now appear
in a single dialog box. For details, see “Unified Simulation and Embeddable
Code Generation Options” on page 95.
Data Type Override Now Works Consistently on Outputs
When y ou enable data type override for Embedded MATLAB Function blocks,
outputs with explicit and inherited types are converted to the override type.
For example, if you set data type override to
MATLAB Function block converts all outputs to
the override type to downstream blocks.
true singles, the Embedded
single type and propagates
In previous releases, E mbedde d MATLAB Function blocks did not apply data
type override to outputs with inherited types. Instead, the inherited type
was preserved even if it did not match the override type, sometimes causing
errors during simulation.
Compatibility Considera tion. Applying data type override rules to outputs
with inherited types may introduce th e following compatibility issues:
• Downstream Embedded MATLAB Function blocks must be able to accept
the propagated override type. Therefore, you must allow data type override
for downstream blocks for which you set output type explicitly. Otherwise,
youmaynotbeabletosimulateyourmodel.
• You might get unexpected simulation results if the propagated type uses
less precision than th e original type.
85
Simulink®Release Notes
Improperly-Scaled Fixed-Point Relational Operators Now
Match MATLAB Results
When evaluating relational operators, Embedded MATLAB Function blocks
compute a common type that encompasses both input operands. In previous
releases, if the common type required more than 32 bits, Embedded MATLAB
Function blocks may have given different answers from MATLAB. Now,
EmbeddedMATLABFunctionblocksgivethesameanswersasMATLAB.
Compatibility Considera tion. Some relational operators generate
multi-word code even if one of the fixed-point operands is not a multi-word
value. To w ork around this issue, cast both operands to the same fixed-point
type (using the same scaling method and properties).
Data Management
Support for Enumerated Data Types
Simulink models now support enumerated data types. For details, see:
86
• “Using Enumerated Data” in the Simulink User’s Guide
• “Using Enumerated Data in Stateflow Charts” in the Stateflow User’s
Guide
• “Enumerated Data Type Considerations” in the Real-Time Workshop
User’s Guide
Simulink Bus Editor Enhancements
The Simulink Bus Editor can now filter displayed bu s objects by either name
or relationship. See “Filtering Displayed Bus Objects” for details.
You can now fully customize th e export and import capabilities of the Simulin k
Bus Editor. See “Customizing Bus Object Import and Export” for details.
New Model Advisor Check for Proper Data Store Memory
Usage
A new Model Advisor check posts advice and warnings about the proper
use of Data Store Memory, Data Store Read, and Data Store Write blocks.
Version 7.2 (R2008b) Simulink®Software
See “Check Data Store Memory blocks for multitasking, strong typing, and
shadowing issues” for details.
Simulink File Management
Model Dependencies Tools
Enhanced file dependency analysis can now:
• Find system target files
• Analyze
• Analyze all configuration sets, not just the active set.
See “Scope of Dependency Analysis” in the Simulink User’s Guide.
STF_make_rtw_hook functions
Block Enhancements
Trigonometric Function Block
R2008b provides an enhanced Trigonometric Function block to:
• Support sincos
• Provide greater floating-point consistency
Math Function Block
In Simulink 2008b, an enhanced Math Function block provides greater
floating-point consistency.
Merge Block
R2008b provides enhanced handling of initial conditions for the Mer ge block
and thus improves the consistency of simulation results.
For more information, see “Conditionally Executed Subsystem Initial
Conditions” on page 80.
87
Simulink®Release Notes
Discrete-Time Integrator Block
R2008b provides an enhanced handling of initial conditions for the
Discrete-Time Integrator block and thereby improves the consistency of
simulation results.
For more information, see “Conditionally Executed Subsystem Initial
Conditions” on page 80.
Modifying a Link to a Library Block in a Callback Function Can
Cause Illegal Modification Errors
In this release, Simulink software can signal an error if a block callback
function, e.g.,
error occurs if you attempt to copy a library link to a self-modifying masked
subsystem whose
This change means that you cannot use block callback functions to create
self-modifying library blocks. Mask initialization code for a library block is
the only code allowed to modify the block.
CopyFcn, modifies a link to a library block. For example, an
CopyFcn deletes a block contained by the subsystem.
88
Compatibility Consideration. Previous releases allowed use of block
callback functions to create self-modifying library blocks. Opening, editing, or
running models that contain links to such blocks can cause illegal modification
errors in the current release. As a temporary work around, you can break any
links in your m odel to a library block that uses callback functions to modify
itself. The best long-term solution is to move the self-modification code to the
block’s mask initialization section.
Random Number Block
In the dialog box for the Random Number block, the field Initial Seed has
been renamed Seed. The command-line parameter remains the same.
Signal Generator Block
The Signal Generator block now supports multidimensional signals. For a list
of blocks that support multidimensional signals, see “Signal Dimensions” in
the Simulink User’s Guide.
Version 7.2 (R2008b) Simulink®Software
Sum Block
The accumulator of the Sum block now applies for all input signa ls of any
data type (for example, double, single, integer, and fixed-point). In previous
releases, the accumula tor of this block was limited to inputs and outputs of
onlyintegerorfixed-pointdatatypes.
Switch Block
The Switch block now supports the immediate back propagation of a known
output data type to the first and third input ports. This occurs when you set
the Output data type parameter to
and select the Require all data port inputs to have the same data
rule
type check box. In previous releases, this back propagation did not occur
immediately.
Inherit:Inherit via internal
Uniform Random Number Block
In the dia log box for the Uniform Random Number block, the field Initial
Seed has been renamed Seed. The command-line parameter remains the
same.
User Interface Enhancements
Sample Time
The display of sample time information has been expanded to include:
• Signal lines labeling with new color-independent Annotations
• AnewSample Time Legend mapsthesampletimeColors and
Annotations to sample times.
• A distinct color for indicating that a block and signal are asynchronous.
The section “Modeling and Simulation of Discrete Systems” has been renamed
“Working with Sample Times” and has been significantly expanded to provide
a comprehensive review of sample times and a discussion on the new Sample
Time Legend and Sample Time D isplay features. For more information, see
“Working with Sample Times”.
89
Simulink®Release Notes
Model Advisor
In R2008b, the Model Advisor is enhanced with:
• A model and data restore point that provides you with the ability to revert
changesmadeinresponsetoadvicefromtheModelAdvisor
• Context-sensitive help available for Model Advisor checks
• Tristate check boxes that visually indicate selected and cleared checks
in folders
• A system selector for choosing the system level that the Model Advisor
checks
See “Consulting the Model Advisor” in the Simulink User’s Guide.
“What’s This?” Context-Sensitive Help for Commonly Used
Blocks
R2008b introduces context-sensitive help for parameters that appear in the
following commonly used blocks in Simulink:
90
Bus Creator
Bus Selector
Constant
Data Type Conversion
Demux
Discrete-Time Integrator
Gain
Inport
Integrator
Logical Operator
Mux
Outport
Product
Relational Operator
Saturation
Subsystem
Sum
Switch
Version 7.2 (R2008b) Simulink®Software
Terminator
Unit Delay
This feature provides quick access to a detailed description of the parameters,
saving you the time it would take to find the information in the Help browser.
To use the "What’s This?" help, do the following:
1 Placeyourcursoroverthelabelofaparameter.
2 Right-click. A What’s This? context menu appears.
For example, the following figure shows the What’s This? context menu
appearing after right-clicking the Multiplication parameter for the Gain
block.
3 Click Wh
descrip
at’s This? A context-sensitive help window appears showing a
tion of the parameter.
Compact Icon Option Displays More Blocks in Library Browser
This re
blocks
scrol
lease introduces a compact icon option that maximizes the number of
and libraries visible in the Library Browser’s Library pane without
ling (see “Library Pane”).
Signal Logging and Test Points Are Controlled Independently
evious releases, a signal could be logged only if it was also a test point.
In pr
efore, selecting Log signal data in the Signal Properties dialog box
Ther
matically selected Test point, and disabled it so that it could not be
auto
ared. However, a signal can be a test point without being logged, so
cle
aring Log signal data did not automatically clear Test point.The
cle
e asymmetric behavior occurred programmatically with the underlying
sam
aLogging
Dat
and TestPoint parameters.
91
Simulink®Release Notes
In R2008b, no connection ex ists between enab li n g logging for a signal and
making the signal a test point. Either, both, or neither capability can be
enabled for any signal. Selecting and clearing Log signal data therefore
has no effect on the setting of Test point, and similarly for the underlying
parameters. See “Logging Signals” and “Working with Test Points” for more
information.
To reflect the independence of logging and test points, the command TestPoint Indicators in the Simulink Format > Port/Signal Displays
menu has been renamed Testpoint/Logging Indicators. The effect of
the command, the graphical indicators displayed, and the meaning of the
underlying parameter
ShowTestPointIcons, are all unchanged.
Compatibility Considerations. Scripts and practices that relied on Log
signal data to automatically set a test point must be changed to set the test
To disable either capability, set the relevant parameter to 'off'.See
“Enabling Signal Logging Programmatically” for an example.
Signal Logging Consistently Retains Duplicate Signal Regions
A virtual signal is a signal that graphically represents other signals or parts
of other signals. Virtual signals are purely graphical entities; they have
no functional or mathematical significance. The nonvirtual components
of a virtual signal are called regions. For example, if Mux block (which is
a virtual block) inputs two nonvirtual signals, the block outputs a virtual
signal that has two regions. See “Virtual Signals” and “Mux Signals” for
more information.
In previous releases, when a virtual signal contains duplicate regions,
signal logging excluded all but one of the duplicates in some contexts, but
included all of the duplicates in other contexts, giving inconsistent results.
For example, if the same nonvirtual signal is connected to two input ports
of a Mux block, that one signal is the source of two regions in the Mux
block output. Previously, if that output was being logged in Normal mode
simulation, the log object would contain data for only one of the regions,
because the other was eliminated as a duplicate.
Version 7.2 (R2008b) Simulink®Software
In R2008a, Simulink no longer eliminates duplicate regions when logging the
output of virtual blocks like Mux or Selector blocks. Simulink now logs all
regions, which appear in a
Simulink.TsArray object. The duplicate regions
have unique names as follow s:
<signal_name>_reg<#counter>
This change affects signal logs and all capabilities that depend on signal
logging, such as scopes and signal viewers.
Compatibility C onsiderations. In cases where signal logging previously
omitted duplicate regions, signal logs will now be larger, and scopes and signal
viewers will now show more data. This change could give the impression that
the results of simulation have changed, but actually only the logging of those
results has changed. No action is needed unless:
• A dependency exists on the exact size of a log or the details of its contents.
In such a case, make changes as needed to accept the changed logging
behavior. See “Logging Signals” for more information.
Simulink Configuration Parameters
In R2008b, the following Simulink configuration parameters are updated:
Note The command-line parameter name is not changing for these
parameters.
LocationPrevious Parameter
SolverStates shape preservation /
ShapePreserveControl
SolverConsecutive min
step size violations /
MaxConsecutiveMinStep
New Parameter
Shape preservation /
ShapePreserveControl
Number of consecutive
min steps /
MaxConsecutiveMinStep
93
Simulink®Release Notes
LocationPrevious Parameter
SolverConsecutive zero crossings
relative tolerance /
ConsecutiveZCsStepRelTol
Solver
Zero crossing
location algorithm /
ZeroCrosAlgorithm
Solver
Zero crossing location
threshold / ZCThreshold
SolverNumber of consecutive
zero crossings allowed /
MaxConsecutiveZCs
OptimizationEliminate superfluous
temporary variables
(Expression folding) /
ExpressionFolding
Optimization
Remove internal state
zero initialization /
ZeroInternalMemoryAtStartup
In R2008b, the following Simulink configuration parameters have moved:
New Parameter
Time tolerance /
ConsecutiveZCsStepRelTol
Algorithm /
ZeroCrosAlgorithm
Signal threshold/
ZCThreshold
Number of consecutive
zero crossings /
MaxConsecutiveZCs
Eliminate superfluous
local variables (Expression
folding) /
ExpressionFolding
Remove internal data
zero initi alization /
ZeroInternalMemoryAtStartup
Parameter
Check undefined
subsystem initial output
Check preactivation output
of execution context
Check runtime output of
execution context
94
Note The command-line parameter name is not changing for these
parameters.
Old Location
Diagnostics > Compatibility
Diagnostics > Compatibility
Diagnostics > Compatibility
New Location
Diagnostics > Data Validity
Diagnostics > Data Validity
Diagnostics > Data Validity
Version 7.2 (R2008b) Simulink®Software
In R2008b, the Optimization > Minimize array reads using temporary
variables parameter has been obsoleted.
Model Help Menu Update
The Simulink mod el Help menu now includes links to block support tables for
the following products, if they are installed.
• Simulink product
• Communications Blockset™
• Signal Processing Blockset
• VideoandImageProcessingBlockset™
To obtain the block support tables for all of these products that are installed,
select Help > Block Support Table > All Tables.
In previous releases, Help > Block Support Table provided such tables
only for the main Simulink library.
Unified Simulation and Embeddable Code Generation Options
You can now specify both simulation and embeddable code generation options
in the Configuration Parameters dialog box. The simulation options apply
only to Embedded MATLAB Function blocks, Stateflow charts, and Truth
Table blocks.
The following table summarizes changes that apply for Embedded MATLAB
Function blocks:
95
Simulink®Release Notes
Type o f
Model
Nonlibrary
Library
Simulation OptionsEmbeddable Code Generation
Options
Migrated from the Simulation Target
dialog box to the Configuration
Parameters dialog box.
See:
New menu item in the Embedded
MATLAB Editor for specifying code
generation options for nonlibrary
models: Tools > Open RTW Target
New opt ion s in the Real-Time
• “Nonlibrary Models: Changes for
the General Pane of the Simulation
Target D ialo g Box” on page 97
Workshop pane of the Configuration
Parameters dialog box.
See:
• “Nonlibrary Models: Changes for the
Custom Code Pane of the Simulation
Target D ialo g Box” on page 99
• “Nonlibrary Models: Changes for the
Description Pane of the Simulation
Target Dialog Box” on page 100
• “Nonlibrary Models: Enhancement
for the Real-Time Workshop:
Symbols Pane of the Config uration
Parameters Dialog Box” on page 109
• “Nonlibrary Models: Enhancement
for the Real-Time Workshop:
Custom Code Pane of the
Configuration Parameters Dialog
Box” on page 110
Migrated from the Simulation Target
dialog box to the Configuration
Parameters dialog box.
See:
New menu item in Embedded MATLAB
Editor for specify ing custom cod e
generation options for library models:
Tools > Open RTW Target
For a description of these options, see
• “Library Models: Changes for the
General Pane of the Simulation
Target Dialog Box” on page 104
• “Library Models: Changes for the
“Library Models: Support for Specifying
Custom Code Options in the Real-Time
Workshop Pane of the Configuration
Parameters Dialog Box” on page 110.
Custom Code Pane of the Simulation
Target Dialog Box” on page 105
96
• “Library Models: Changes for the
Description Pane of the Simulation
Target Dialog Box” on page 106
Version 7.2 (R2008b) Simulink®Software
For details about the new options, see “Configuration Parameters Dialog Box”
in the Simulink Graphical User Interface documentation. For compatibility
information, see “Comp a t ibility Considerations” on page 116.
For changes specif ic to Stateflow, see “Unified Simulation and Embeddable
Code Generation Options for Stateflow Charts and Truth Table Blocks” in the
Stateflow and Stateflow
®
Coder™ release notes.
Nonlibrary Models: Changes for the General Pane of the Simulation
Target Dialog Box. The following sections describe changes in the panes of
the Simulation Tar get dialog box for nonlibrary models.
Release
Previous
Appearance
General pa ne of the Simulation Target dialog box
97
Simulink®Release Notes
Release
New
Appearance
Simulation Target pane of the Configuration Parameters dialog box
For details, see “Nonlibrary Models: Mapping of GUI Options from the
Simulation Target Dialog Box to the Co nf iguration Parameters Dialog Box”
on page 101.
98
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.