SCALE-RT

Solver Configuration

Top  Previous  Next

The real-time simulation is working with a fixed step 'Solver'. The 'Solver' must be configured under the 'Simulation/Configuration Parameters.. (CTRL+E)'.

The model should be checked whether it runs correctly with the selected fixed step 'Solver' and fixed sample time.

 

Matlab_fixStepSolver

 

The following solver options must be selected:

           Type:                          Fixed-step (required)

           Fixed step size:           Value smaller or equal to the smallest block sample size

 

All sample times in the model must be an integer multiple of the 'Fixed-step size'.

           Tasking mode:             Single Tasking (required)

Tip:  The model will run with the selected fixed sample time on the real-time target.

 

If you need different block sample times, e.g. the sample time of your I/O hardware is lower than the fixed-step size you must include 'Rate Transition' blocks into the model. The 'Rate Transition' blocks are located in the MATLAB®/Simulink® Library (Browser/Simulink Library/Signal Attributes/.).

The yellow block in the following figure illustrates a 'Rate Transition' block. In this example the DAQ-Card is running with 50ms whereas the model is running with 1ms.

 

Matlab_rate_transition

 

Tip: The start values of the IN blocks will be zero at simulation start on the real-time target. Ensure that this cannot cause critical system behaviour.