CCCV Charging of Li-ion batteries connected in parallel

Hello,
I am simulating the CCCV charging of a 2s4p battery pack. There are lot of fluctuations in the voltage, current during CCCV charging (see the attached pic).
I tried using the TUNE in PID controller, but it is not taking the plant
I have attahced all the relevant files.
How can I rectify this
Your support will be of great help for me.
Regards

 Accepted Answer

That behavior is caused by the fact that you switch to a hard coded constant current reference whenever the V_Highest is less than V_top. Since you have tracking turned on for your PID, every time you briefly jump to this set point, the controller resets to this point as well, and then has to lower again. The problem isn't your gains, the problem is your logic in determining when to switch between the PID logic and the PID controller. Also, it can't tune your system because it is a discontinuous system with discrete switching devices. You'd have to use a frequency response estimation to use the tune function. You will likely need to manually tune the PI values and be more careful about when you switch between the closed loop controller and the fixed constant current reference.
Essentially, your PI controller is working, because it is trying to reduce the difference between V_highest and V_top, Which it is doing, but whenever it gets them close, it triggers the logic to 'reset' the controller (switch to the constant value reference which, because tracking is on the PID, 'resets' it), and it has to start over.

10 Comments

Hello Joel,
Thank you for your guidance.
As per your suggestion I did changes in the model (created a new model of 3s4p), and tuned it using frequency based respose.
Now the fluctuations have damped down, but at the end as the current jumps to zero, 2 voltage curves also jumps down, but not the SOC values.
Could you please guide me on rectifying this.
I have attached all relevant files as well.
Please find the below attached plots of voltage-current , SOC:
unfortunately, your balancing logic isn't working. It isn't turning on at all till the end, and then it turning on is causing the problem that you are seeing. This will likely require some significant debugging. You should put a scope on the control signals coming out of your balancing logic to see if it is doing what you think it is doing.
Hello Joel,
I have some queries on Frequency based respose tuning of my model. The queries as follows:
  1. What should be the initial SOC of battery before strating the Frequency based respose tuning.Till now I was using the initial SOC as 0.2,0.22,0.24.
  2. How should be the model. Like it is with the switches or just PID block with input being the difference between the max cell voltage and highest cell voltage. (Please refer the attached screen shots).
I can't speak to the appropriate SOC for tuning as that depends on your needs. In general, you should set your initial conditions to match the nominal operating conditions of your system. So if that is the SOC your battery will be at most often, that is a good point to use. Otherwise, I might try something closer to 0.5. However, as I mentioned before. I think your control logic for active balancing isn't working, so trying to tune the PID loop won't help fix that.
Hello Joel,
Could you please share any reference file from Mathworks, in which a battery pack with serial-parallel connection is simulated for cell-balancing.
It will be a help for me.
Regards
Hello Joel,
Thanks for sharing a reference file.
I also refered another file from mathworks reference (https://in.mathworks.com/matlabcentral/fileexchange/36019-battery-modeling), which has a 3S1P battery pack and a cell balancing logic.
I have some queries regarding the Transfer function block used in pasive cell balancing, queries are listed below:
  1. The voltage of cells in series are first given as input to the Transfer function, output from the transfer function is given as input to the cell balancing logic, my question is why is its so ?Why can't we give the voltages as direct input to the cell balancing logic
  2. The denominator value is set to 600, such that the transfer function is 1/(600s + 1). How to find out this denominator value ?, say that I have a battery pack which is of connection 16s6p, in this will the transfer function will be of the form 1/(as + 1), if not how to find out the transfer function in that case?
  3. What is the calculations that go into defining the denominator value in trasnfer function block..?
  4. Does the denominator value inside the transfer function influences tuning the PID controller, if yes how..?
Your answers for the above question will be a great help for me in understanding the model further.
Regards
That specific transfer function is implementing a 1st order low pass filter, so the 600 is related to the time constant of the filter. As this is a low pass filter, it does impact the performance of the PID controller. It in essence limits it's bandwidth and gives you less control of the system, but makes it easier to manually tune for the average controls engineer given it is responding to a cleaner slower signal. The smaller the filter's time constant (higher cutoff frequency) the less impact the filter will have on the PID controller. This is also a method used in Simulink continuous time models to break algebraic loops in control loops. There is not an explicit calculation for what the cutoff frequency of a low pass filter should be, it is very system dependent and you shouldn't even always use one. However, for this type of application, it's probalby safe to by default put a lowpass filter on the feedback voltage of the cells, and then make it's cutoff frequency twice the rate at which you want to run your cell balancing logic. (very crude rules of thumb to just get started)
Hello Joel,
Thanks for the answer.
I have created a 3S6P battery pack of Li-ion cell, highest voltage that can be achieved by the cell is 4.1 Volt.
I have set the complete circuit for CCCV charging, but I am not getting how to tune the PID Controller.
I have attached all the relevant files, Could you please help me in Tuning the PID controller.
I am new to control systems
Could you please guide me on this.
Regards
Unfortunately, we don't provide that level of guidance on the forums. You would need to purchase training or consulting to get that level of support. However, we do have a free trianing that you can use as a starting point: https://matlabacademy.mathworks.com/details/control-design-onramp-with-simulink/controls

Sign in to comment.

More Answers (0)

Categories

Find more on Simscape Battery in Help Center and File Exchange

Products

Release

R2022a

Community Treasure Hunt

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

Start Hunting!