How do I create a simulation of an accumulator that´s getting charged and discharged?
2 次查看(过去 30 天)
显示 更早的评论
Hello everybody,
At first I have to say that i´ve never worked with Simulink before and I really hope you could help me out.
I am working on a simulation of an accumulator with a max loading capacity of 100 kWh. This accumlator is discharged with 10 kWh per time step. When it reaches its min loading capacity of 20 kWh there is a block heat and power plant which produces 15 kWh. So now the accumulator ist loading by 5 kWh per time step. When the max loading capacity of 100 kWh ist reached again the block heat and power plant should turn down. Then the accumulator is discharging with 10 kWh per time step again.
I don´t know how to create this change of the block heat and power plant turning on and of at the right point. I tried to solve this problem with the if block but it didn´t work. Any ideas how to create such a simulation?
0 个评论
回答(1 个)
Prashant Arora
2017-3-8
编辑:Prashant Arora
2017-3-8
Hi Philip,
You can achieve your workflow by using a triggered subsystem. The trigger can be set to activate in two conditions, i) loading capacity hits minimum, ii) loading capacity hits maximum. During each trigger, the subsystem should perform the following calculation:
Output(t) = NOT(Output(t-1)).
You can use a mux block to trigger a subsystem with two conditions. This subsystem can then allow you to trigger between On/Off depending on your conditions.
Alternatively, you can also use a relay block in Simulink. https://www.mathworks.com/help/simulink/slref/relay.html
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Schedule Model Components 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!