Products & Services Solutions Academia Support User Community Company

Learn more about Simscape   

Limitations

Sample Time and Solver Restrictions

The default sample times of Simscape blocks are continuous. You cannot simulate Simscape blocks with discrete solvers using the default sample times.

If you switch to a local solver in the Solver Configuration block, the associated states become discrete. If there are no continuous Simulink or Simscape states elsewhere in the model, you should use a discrete solver to simulate such a model.

You cannot override the sample time of a nonvirtual subsystem containing Simscape blocks.

Algebraic Loops

A Simscape physical network should not exist within a Simulink algebraic loop. This means that you should not directly connect an output of a PS-Simulink Converter block to an input of a Simulink-PS Converter block of the same physical network.

For example, the following model contains a direct feedthrough between the PS-Simulink Converter block and the Simulink-PS Converter block (highlighted in magenta). To avoid the algebraic loop, you can insert a Transfer Function block anywhere along the highlighted loop.

A better way to avoid an algebraic loop without introducing additional dynamics is shown in the modified model below.

Restricted Simulink Tools

Certain Simulink tools are restricted for use with Simscape software:

Unsupported Simulink Tool

The Simulink Profiler tool does not work with Simscape models.

Simulink Tools Not Compatible with Simscape Blocks

Some Simulink tools and features do not work with Simscape blocks:

Code Generation

Code generation is supported for Simscape physical modeling software and its family of vertical products. However, there are restrictions on code generated from Simscape models.

Generating Code describes code generation features in Simscape. Restricted Simulink Tools describes limitations on model referencing.

There are variations and exceptions as well in the code generation features of the vertical products based on Simscape platform. For details, see the User's Guides for individual vertical products.

Code Generation and Fixed-Step Solvers

Most code generation options for Simscape models require the use of fixed-step Simulink solvers. This table summarizes the available solver choices, depending on how you generate code.

Code Generation OptionSolver Choices
Accelerator mode
Rapid Accelerator mode
Variable-step or fixed-step
Real-Time Workshop software: RSim Target*Variable-step or fixed-step
Real-Time Workshop software: Targets other than RSimFixed-step only

* For the RSim Target, Simscape software supports only the Simulink solver module. In the model Configuration Parameters dialog box, see the Real-Time Workshop: RSim Target: Solver selection menu. The default is automatic selection, which might fail to choose the Simulink solver module.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

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