Page 1 of 1

I am calculating chargelimit & dislimit myself

Posted: Wed Dec 07, 2022 11:50 am
by janosch
Hello,

I have previously used the LeafBMS and am now considering to switch to Thunderstruck slaves.
Because I have problems with extended sensing wires.

How do you guys set sensible discharge and charge curves?

My understanding is that the Thunderstruck slaves give me all the cell voltages, do balancing, great, maybe the MCU does SOC calculations, but I have to set my own dislim and chglim.

I had a bit of a play with a regression tool and came up with the following for curves at 17 degrees, does that look sane for 96S 40kWh Leaf cells?

Formulas for x as SOC from 0% to 100%:

Code: Select all

chglimA = -x*x*0.026 + x*1.59 + 101 //quadratic approximation
dislimA = min(200, x * x * 0.5) //quadratic then flat from 20% SOC upwards
Screenshot from 2022-12-07 12-05-01.png
This is me plugging something together based off my memory at observing the LeafBMS negotiating with the rapid charger on the street. Temperature is missing still: At 54 degrees I would limit charge to 20A and shut it fully down if it reaches 56 degrees, which I think is the Leaf behaviour. Around 2 degrees I want to limit charging, how much?

All at 17 degrees:
At 95%/4105mV allowing charging @ 20A?
At 4%/3238mV allowing dislimit @ 8A? (would be heater only I guess)
At 15%/3342mV allowing dislimit @ 113A?
At very low state of charge limiting the charge to ~100A? Should that be lower?

Thoughts? Code isn't a problem for me, knowledge of Lithium more limited, so your input would be appreciated.
CSV attached.

Edit: Had some offline conversations, it sounds like others are just whacking in constant-current during their charge and keep an eye on the temperature themselves, who is in that boat? Should I just be more brazen and do that too? Am I overthinking this?

Re: I am calculating chargelimit & dislimit myself

Posted: Wed Dec 07, 2022 4:52 pm
by johu
No need to derate current at low SoC. Nissan outputs 70 kW until 40% or so then taper towards 50 kW at 60% and then down. Voltage plays a separate role, if one cell goes out of check even at low SoC that would also limit charge current.
Only temperature limits on both ends. The BMS allows full power down to very low temps like 5°C or so. And the up to 52°C or so.
I don't know how they interact, like if the temperature derate factor is multiplied onto the SoC derate factor or if the smallest one is taken MIN(I_temp, I_volt, I_soc)

Re: I am calculating chargelimit & dislimit myself

Posted: Wed Dec 07, 2022 6:56 pm
by tom91
I run voltage and temperature derate at the ends.

These are "3d" as in voltage causes a derate and there is a temperature derate they are added togethor, in theory you could craft a full 3D look up table for "every" SOC/voltage vs Temp point expected.

Re: I am calculating chargelimit & dislimit myself

Posted: Fri Dec 09, 2022 9:09 am
by janosch
tom91 wrote: Wed Dec 07, 2022 6:56 pm craft a full 3D look up table
Yeah I like the idea of pre-computing it.

temperature: -20 to 56
soc: 0 to 100
two integers for dislim, chglim

2 x 76 x 100 == 15kb table (uncompressed)

Re: I am calculating chargelimit & dislimit myself

Posted: Fri Dec 09, 2022 10:43 am
by tom91
janosch wrote: Fri Dec 09, 2022 9:09 am 2 x 76 x 100 == 15kb table (uncompressed)
That is true if you map the whole area. Also you can define the boundaries outside which derates happen.

I run it "crude" due to needing to be flexible, derate after a certain temp to a certain temp where it is 0. Same for voltage. So just ramps and linear.