Why do I get an error when connecting Specialized Power Systems "Battery" blocks in parallel?

I have a Simulink model that involves "Battery" blocks from the Simscape Specialized Power Systems (SPS) library connected in parallel. I want to simulate this model and measure SOC, voltage and current.
When I simulate the model, there is an error
The following voltage source blocks are in parallel, or are connected in a loop(s) of voltage sources
This is shown for an example model:
How can I correctly simulate my model with parallel-connected "Battery" cells?

 Accepted Answer

This error occurs because internally, the SPS "Battery" block involves a "Controlled Voltage Source" block with no internal resistance placed across the two output terminals ("+" and "-"). You can observe this by right-clicking an SPS "Battery" block and selecting "Mask" > "Look under mask", where a "Controlled Voltage Source" block connects output terminals "+" and "-". In Simscape, it is not possible to connect pure voltage sources in parallel, or pure current sources in series. Therefore, this causes an error.
Recommended Alternative Simscape modeling
Instead of the SPS "Battery" block, we recommend using the "Battery" block within the Simscape Electrical library. Furthermore, we offer multiple specialized battery blocks in the Simscape Battery libraries, found in "Library Browser" > "Simscape" > "Battery" in Simulink. You will not encounter errors when connecting these battery blocks in parallel, and you can still measure current, voltage and SOC for an input drive cycle.
Workaround in SPS
Instead of using the alternative Simscape modeling, you can work around this issue by adding a small resistor at either (1) all "+" output terminals, or (2) all "-" output terminals of the parallel-connected SPS "Battery" blocks. This simulates an internal resistance. You can add this resistance by adding a "Series RLC Branch" block, selecting the "Branch type" to "R" and setting a small resistance value, e.g. "1e-4":

More Answers (0)

Categories

Products

Release

R2024b

Community Treasure Hunt

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

Start Hunting!