How do I create a simulation of an accumulator that´s getting charged and discharged?
2 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Prashant Arora
on 8 Mar 2017
Edited: Prashant Arora
on 8 Mar 2017
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 Comments
See Also
Categories
Find more on Schedule Model Components in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!