Please take a minute to review and accept our Terms of Use.
Welcome to the PLECS User Forum, where you can ask questions and receive answers from other members of the community.

Many technical questions regarding PLECS are answered on the Technical Solutions page of our website. Tutorial videos, specific application examples, and pre-recorded webinars are available on our YouTube page. Please follow us on LinkedIn for the latest Plexim news.

I am trying to charge a battery model but I keep receiving a state of discontinuity error.

0 votes
1,811 views
Urgent help needed. I will attach the model below. It would be great if someone can help fix the error so I manage to complete the charging of the battery.
asked Apr 14, 2018 by Junior9696 (24 points)

1 Answer

0 votes
Please provide a model.
answered Apr 18, 2018 by Oliver Schwartz (618 points)
sorry i thought i attached them before.
This model requires additional files. Please provide a minimum working example.
The model that you have attached does not relate to the error message you've posted. The posted model works (provided you have all required files and switch the solver to Radau, as suggested in the resulting error message).
these two files need to put together in the same folder
all required files are placed and the solver is radau. The simulation initialization  for the cccv charger is in the initialization tab of the simulation parameters tool. The model should not be missing any files, sorry for any inconveniance

The error message that you've posted says:

The voltage across capacitor ther battery/C1 is forced to jump from 0 to 0.00349563.
...

The model that you have attached does not contain this capacitor and simulates without error.

Please also read https://www.plexim.com/support/solutions/153.

Hi oliver,

sorry the files were confused again

please find the latest one which demonstrates the problem
You have connected two capacitors with different initial voltages in parallel (one inside of the LiIon cell subsystem, one outside). This results in an error at simulation start because with ideal capacitors you'd get an infinite current.
okay I fixed that error by changing the initial voltage on the cell model. However, it doesn't seem like the charging process is working. Any idea about what parameters should I adjust to make it work? I will attach the updated version below
This sounds like an engineering problem rather than a support problem. We do offer engineering services (but not for free) - if you are interested, please contact info@plexim.com.
...