How to update simulink model sample time dynamically during simulation?
4 visualizzazioni (ultimi 30 giorni)
Some ECUs run with dynamic sample time. For example, motor control unit's sample time is changing dynamically based on motor speed and torque.
The sample time for the next step is calculated by the MCU algorithm in the present step.
In simulink, we use fix-step sample time to simulate a MCU. But how to update the sample time dynamically to match the real situation?
Please help me. Thank you.
Joel Van Sickel il 19 Set 2022
This is a common issue where execution of code does not happen at fixed intervals. The main way of modelling this is with interrupt driven blocks in Simulink though blocks like triggered subsystems.