Enabling a subsystem in a multi rate Simulink model at specific time or with a delay

조회 수: 11 (최근 30일)
I have a multi rate model in Simulink with 3 rates. A (0.1), B (0.2) and C (0.8). This is meant to run in real-time and the rates are specified based on how long each the Subsystems take to execute.
The base rate of the model is 0.1. I have 3 subsystems, each running at the separate rates. I am using Enabled Subsystems to control when I execute each one. I have a drawing of what I am attempting to do.
A has a pulse that is sampled at 0.1, 1 sample wide and 12 samples long with 0 delay. This lets it execute once every 1.0 seconds.
B takes 0.2 seconds to complete and I use a pulse that is sampled at 0.2, 1 sample wide and 6 samples long.
The problem is with C. I can't figure a way to enable C to start at 0.2. I want the periodic rate of C to be delayed by 0.2. So I tried using a pulse sampled at 0.1, 8 samples wide, 10 samples long, 2 sample delay. The pulse works but the system doesn't get enabled correctly. It enables at 0.8.
So the question is how do I get Subsystem C to execute with a delayed start?

답변 (1개)

Richard Zappulla
Richard Zappulla 2017년 3월 30일
To me, it sounds like you are trying to use the enabled sub-systems and pulse generators as a "scheduler" of sorts. I am not sure if this is an option, but you could try making the appropriate blocks in your model "atomic blocks", specify the sample time for each system, and then add rate transition blocks as appropriate. From there, the Simulink "scheduler" will take care of the rest.
Have you explored this option?

카테고리

Help CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by