Why do I receive Timing Engine Warnings when my simulation is at a particular time step in Simulink 6.4 (R2006a)?

3 views (last 30 days)
I have a model that runs for 3000 seconds. When the simulaiton hits 1571.55 seconds, Simulink starts throwing warnings such as:
E3dof' variable sample time for tid 5 has a nextT of 1571.5500000000002 which will cause the solver to take a step smaller than the minimum step size of 5.5830895462349872e-012 at time 1571.55.
Warning: Timing engine warning: In the model 'DSE3dof' variable sample time for tid 5 has a nextT of 1571.6000000000001 which will cause the solver to take a step smaller than the minimum step size of 5.5834185166791293e-012 at time 1571.5999999999999.
Warning: Timing engine warning: In the model 'DSE3dof' variable sample time for tid 5 has a nextT of 1571.6500000000001 which will cause the solver to take a step smaller than the minimum step size of 5.5835961571778936e-012 at time 1571.6499999999999.
Warning: Timing engine warning: In the model 'DSE3dof' variable sample time for tid 5 has a nextT of 1571.7 which will cause the solver to take a step smaller than the minimum step size of 5.5837737976766596e-012 at time 1571.6999999999998.
[snip]
I receive these warnings only in Simulink 6.4 (R2006a).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Jul 2010
This enhancement has been incorporated in Release 2010a (R2010a). For previous product releases, read below for any possible workarounds:
The Timing engine warnings may arise if you have variably sampled blocks in your model. This often occurs when a Simulink model contains variably sampled blocks with regular updates at the same rate as a fixed step block in the model. An example of this is the Pulse Generator configured to run as Time based rather than Sample based. If you select time-based for Pulse generator block, Simulink computes the block's outputs only at times when the output actually changes to improve the efficiency of the simulation. As a result, these pulse generator blocks are variably sampled blocks.
Over longer simulation times, when these variable sample times correspond to fixed rates in the model, the time step calculation done by the solver and that done by the variably sampled block can get out of sync, and this type of minimum step violation will occur. The variably sampled blocks are being updated approximately at the same rate as the Simulink solver. However, there may be a slight difference in the step size of the block's method and Simulink's method which may lead the Solver to take a step smaller than the minimum step size.
To determine if this is happening in the model, use the following commands:
sldebug(bdroot)
stimes
Those tasks with a sample time of [-2, 0] are variably sampled.
To work around this issue, make the variably sampled block fixed step so that the block is updated at the same time step as the other blocks with the fixed sampling rate. In case of this model, change the block's Pulse type parameter to Sample-based. For a pulse generator with period T and pulse width 50%, make the block sampled, with step size T/2, period 2 samples, pulse width 1sample.

More Answers (0)

Categories

Find more on Automotive Applications in Help Center and File Exchange

Products


Release

R2006a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!