Simulink: how to run sub-simulations inside a simulation

Hello all,
I have a hot water heater thermal model, for which I need a smart controller that responds to electricity system needs (either turns off or on depending on what the utility company required i.e. demand response). The is, say, a 100 of those smart boilers. All of them have 24 hour ahead, hot water consumption forecasts for every hour for a week. When the main controller send a request asking all the heater whether they can respond - asks the boilers to force turn on or force turn off. Each water heater then runs "sub-simulation" for next 24 hours using its forecasted demand. If the temperature goes outside the range (say 40-90C-degrees) that means the boiler cannot participate for that time period.
Now the question is, how to technically implement and have each water heater to run "sub-simulation" while the main simulation runs?
Regards, Linas

답변 (1개)

Sebastian Castro
Sebastian Castro 2015년 7월 23일

0 개 추천

My guess is you don't need to complicate the model by spawning "sub-simulations".
You should be able to make your controller run at a slower rate, whether it be by setting a larger sample time, or by using variable-rate constructs such as Enabled Subsystems to set when you want the control system to execute.
In this larger model, you could use Model References (for example) to place 24 copies of the same water heater model inside of it.
- Sebastian

카테고리

도움말 센터File Exchange에서 Automotive Applications에 대해 자세히 알아보기

제품

태그

질문:

2015년 7월 23일

답변:

2015년 7월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by