How to update simulink model sample time dynamically during simulation?

조회 수: 7 (최근 30일)
Kepler
Kepler 2022년 9월 17일
답변: Joel Van Sickel 2022년 9월 19일
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.

답변 (1개)

Joel Van Sickel
Joel Van Sickel 2022년 9월 19일
Hello Kepler,
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.
Regards,
Joel

카테고리

Help CenterFile Exchange에서 Embedded Coder Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by