Best way to find the number of times a battery can be used before it must be charged?

조회 수: 4 (최근 30일)
I have modeled a hydraulic pump which charges a gas-filled accumulator from 1400 psi up to 3200 psi. The pump is ran by a DC motor connected to a battery. I have a voltage vs state of charge (SOC) table from the battery manufacturer and have attempted to use the "Battery (Table-Based)" block in order to more accurately model the battery, as the voltage vs SOC curve in the standard "Battery" block has a very different shape than the manufacturer's data. The battery is 48V LiFePO4. The battery "basic characterstics" Voltage vs SOC plot for the "Battery (Table-Based)" block is as shown below. This closely follows the plot that I received from the manufacturer.
I would like to calculate the number of times that the accumulator can be charged from 1400 psi up to 3200 psi before the battery falls below 44V. I attempted to do this by using a "Stop Simulation" block which stops the simulation right before 3200 psi is reached. A "while" loop in a Matlab script to repeatedly run simulations with the final voltage of the previous simulation as the initial voltage of the new simulation, until the initial voltage is below 44V. To do this, I set the "Initial Target" for the "Terminal Voltage" field in the "Battery (Table-Based)" block to be the voltage at the final time step of the previous simulation.
Unfortunately, this doesn't seem to work reliably. On the first iteration, I receive the message "Warning: First solve for initial conditions failed to converge. Trying again with all high priorities relaxed to low." On the next two iterations, I receive the message that the battery internal voltage drop, motor current and battery terminal voltage targets all cannot be honored.
When I plot the battery voltage vs time, there are severe discontinuities in the data. (See attached plot.)
When I monitor the battery SOC and plot it vs the battery voltage, the result is a very strange plot.
In addition to the strange discontinuities, notice that the SOC never falls below 99.5% even though the voltage does reach 44V. Looking at the Voltage vs SOC charge from the battery manufacturer at the top of this post, the SOC should be at roughly 10% when the voltage drops to 44V.
What is the best way to accomplish what I'm trying to do here?
  댓글 수: 2
Jacob Mathew
Jacob Mathew 2024년 10월 14일
Hey Michael,
Could you share the code that you have tried till now?
Michael P
Michael P 2024년 10월 14일
I have attached the script and the Simscape file. My apologies for not commenting the script more clearly. Let me know if anything is unclear.

댓글을 달려면 로그인하십시오.

답변 (1개)

Yifeng Tang
Yifeng Tang 2024년 10월 15일
이동: Sabin 2025년 8월 11일
I believe you will benefit from the Operating Point Initialization feature in Simscape. The link I shared is the hub page to resources and example related to this feature.
Operating Point Initialization allows you to record a snapshot from an earlier simulation, and use the full solution as initial condition for a next run. You can set up the MATLAB script to create a Simscape operating point at the end of each run, apply the operating point to the next run, and continue.
Hope this helps.
  댓글 수: 3
Yifeng Tang
Yifeng Tang 2025년 1월 3일
이동: Sabin 2025년 8월 11일
Yes, you can edit an operating point. See the "Manipulating Operating Point Data" section from the documentation page I shared earlier:
It's VERY flexible :)
Xiangchun
Xiangchun 2025년 6월 16일
이동: Sabin 2025년 8월 11일
To build on the previously mentioned solution by using operating points as suggested by @Yifeng Tang, the battery's terminal voltage depends on current applied and is not a state, whereas states (SOC, overpotential across RC pairs) do not depende on current and represent the current status of the battery. In other words, we can carry the SOC and overpotential across RC pairs from the end of last simulation as operating points to initialize the new simulation. However, we should not carry any terminal voltage information because the current as the input will be reset to zero at the beginning of the new simulation. If we tried to carry the terminal voltage information, the solver might struggle to initialize.
Best wishes,
Xiangchun

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simscape Battery에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by