ElectricMotorcycleForum.com

  • September 29, 2024, 06:30:50 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

Electric Motorcycle Forum is live!

Pages: [1] 2

Author Topic: Does anyone now how the SOC is determined?  (Read 1783 times)

victor6.7y

  • Full Member
  • ***
  • Posts: 117
  • ^.^
    • View Profile
Does anyone now how the SOC is determined?
« on: April 22, 2023, 08:00:30 PM »

Funny thing this morning when i was getting the logs from my motorcycle. My SOC was going up. while getting the logs.
Down here you can find the BMS log.

The Pack SOC% is increating; while the Vpack is behaving as per normal. Does anyone know how the PackSOC is calculated? I always suspected it was related to the Vpack. But looking at this; there is propably a calculation taking the Current use into account.




04/22/2023 13:34:46   DEBUG: Module scheme changed from Running mode to Stopped mode   
 07211     04/22/2023 13:34:48   Sevcon Turned On   
 07212     04/22/2023 13:34:49   Sevcon CAN Link Up   
 07213     04/22/2023 13:34:50   DEBUG: Sevcon Contactor Drive ON.   
 07214     04/22/2023 13:34:50   Precharge Decay Too Steep. Restarting Sevcon.   
 07215     04/22/2023 13:34:50   Sevcon Turned Off   
 07216     04/22/2023 13:34:50   DEBUG: Sevcon Contactor Drive OFF   
 07217     04/22/2023 13:34:53   Sevcon Turned On   
 07218     04/22/2023 13:34:54   Sevcon CAN Link Up   
 07219     04/22/2023 13:34:54   DEBUG: Sevcon Contactor Drive ON.   
 07220     04/22/2023 13:34:54   Module 00                  vmod: 100.215 maxsys: 100.215 minsys: 100.215 diff: 0.000 vcap: 89.562 prechg: 89%
 07221     04/22/2023 13:34:54   DEBUG: Module 00 Contactor is now Closed   
 07222     04/22/2023 13:34:54   INFO:  Enabling External Chg 0 Charger 2   
 07223     04/22/2023 13:34:54   INFO:  Enabling External Chg 1 Charger 3   
 07224     04/22/2023 13:34:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 30%, Vpack:100.191V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  22C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07225     04/22/2023 13:35:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 32%, Vpack:100.175V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  28C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07226     04/22/2023 13:36:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 33%, Vpack:100.164V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  28C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07227     04/22/2023 13:37:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 34%, Vpack:100.158V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07228     04/22/2023 13:38:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 34%, Vpack:100.154V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07229     04/22/2023 13:39:35   Setting memory read size set at : 400   
 07230     04/22/2023 13:39:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 35%, Vpack:100.145V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07231     04/22/2023 13:40:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 35%, Vpack:100.146V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07232     04/22/2023 13:41:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 35%, Vpack:100.143V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07233     04/22/2023 13:42:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 35%, Vpack:100.138V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07234     04/22/2023 13:43:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 36%, Vpack:100.131V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07235     04/22/2023 13:44:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 36%, Vpack:100.125V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07236     04/22/2023 13:45:56   Disarmed                   PackTemp: h 16C, l 15C, PackSOC: 36%, Vpack:100.122V, MotAmps:   0, BattAmps:   1, Mods: 01, MotTemp:  27C, CtrlTemp:  16C, AmbTemp:  11C, MotRPM:   0, Odo:17701km
 07237     04/22/2023 13:46:10   Power Off                  Key Switch
 07238     04/22/2023 13:46:10   Sevcon Turned Off   
 07239     04/22/2023 13:46:10   Module 00                  vmod: 100.123V, batt curr: 1A
 07240     04/22/2023 13:46:10   Module 01                  vmod: 0V, batt curr: 0A
 07241     04/22/2023 13:46:10   INFO:  Disabling External Chg 0 Charger 2   
 07242     04/22/2023 13:46:10   INFO:  Disabling External Chg 1 Charger 3   
 07243     04/22/2023 13:46:10   Turning OFF DCDC. Flags: 0x00   
Logged
- 2019 Zero S 14.4
- 2000 Honda VTR 1000F

DerKrawallkeks

  • Full Member
  • ***
  • Posts: 229
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #1 on: April 23, 2023, 02:48:53 PM »

I can give you a general explanation:
It is usually determined by so called coulomb counting, that means they're actually tracking the energy going out of the battery. It uses the voltage to try and correct that value (since the total available energy changes with temperature and aging).
So overall it is always struggling to estimate the true remaining energy:)
Logged

2020_SRS_Commuter

  • Sr. Member
  • ****
  • Posts: 268
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #2 on: April 24, 2023, 03:47:35 AM »

I gave up trying to understand the SOC on my SRS... it was quite unpredictable. Very constant trips would use different amounts of SOC, sometimes the first leg of my trip used 10%, sometimes 0%. Sometimes when I got home I had a lot of battery left, and sometimes little. It never made much sense. So to keep my sanity I added a KWH meter to my charger and I just look at how much power it drew in for each charge.
Logged

Richard230

  • Hero Member
  • *****
  • Posts: 9618
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #3 on: April 24, 2023, 06:51:49 AM »

The SOC of my 2018 S has been very consistent under steady riding conditions and I find that I can rely on it most of the time.
Logged
Richard's motorcycle collection:  2018 16.6 kWh Zero S, 2020 KTM 390 Duke, 2002 Yamaha FZ1 (FZS1000N) and a 1978 Honda Kick 'N Go Senior.

MVetter

  • Hero Member
  • *****
  • Posts: 1824
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #4 on: April 24, 2023, 09:31:12 AM »

Zero does not coulomb count.
Logged

DerKrawallkeks

  • Full Member
  • ***
  • Posts: 229
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #5 on: April 24, 2023, 02:11:40 PM »

Hey MVetter,

that's an interesting info. How do you know that?
Logged

Specter

  • Hero Member
  • *****
  • Posts: 1692
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #6 on: April 24, 2023, 07:45:28 PM »

Steady riding conditions is easy to determine what you have left, because the numbers are being... steady.
Still,  the voltage drop on the battery when pulling under a heavier load, can artificially decrease range left.

If you are doing 70 mph, you may have 20 miles of range left.
If you drop that to say 35 or 45 mph you may now have 40 miles of range left.

Wind resistance plays a factor.
Battery's can give more KW when they are giving it slower, plays a factor.
The voltage sag on the rail when you are pulling current is lessat slower speeds, which makes the battery seem to be a higher SOC... is a factor.

No matter how it is determined, when you change the driving conditions,  it goes out the window.

some look at how you drove the last 10 km or so, and do some math.  some try to count kw in / out of the battery.

Hey I got 50 miles left. but am I going to climb that 350 foot 4 mile bridge then do kph speeds in mph afterwards most the way home, or is it traffic jammed and Im going to slither thru town at 45 mph or so?  The only way to genuinely try to calculate how much mileage you got left is knowing what kind of driving is coming up.  The bike has absolutely zero knowledge or way really to know that.  Even if you lived in Ok, and everything is flat flat flat !! and you DID kind of know already whats coming up, what about the weather.  We had a noreaster come thru, winds 25 to 30 mph gusting sometimes to 40.  If you are driving 70 mph highway speeds and into that as a headwind, THAT is a significant factor to your range. (it'll beat the hell out of you too after a while)

Yes, you asked about SOC not range, but both are directly coupled.

A ballpark figure would be to say you can get 6 yo 7 miles per KW.  What is that 10 km?  Look how much your range drops for the next dozen or so trips, .vs. the miles you traveled,and then do the math and that can give you a better ballpark figure.  If you obsess over your range / soc / etc you won't enjoy your ride and end up giving yourself an aneurism over it.  Just my 2 watts.

Aaron
Logged

MVetter

  • Hero Member
  • *****
  • Posts: 1824
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #7 on: April 24, 2023, 10:08:02 PM »

Hey MVetter,

that's an interesting info. How do you know that?

Offhand chats with the battery engineers at Zero who designed the system. I distinctly remember, "yeah, Cady experimented with all sorts of systems including coulomb counting, but ultimately came up with his own algorithm...".

Cady being Bryan Cady, the lead battery tech at Zero. Super nice guy. He left to go work with Luke and Erika at their startup recently. What really stuck in my head was how dismissively they referred to coulomb counting. Like, they rolled their eyes when saying it.
Logged

Specter

  • Hero Member
  • *****
  • Posts: 1692
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #8 on: April 24, 2023, 10:27:03 PM »

CC would not take into account rate of use really, which can be HUGE in a batteries perceived capacity.
Temperature would obviously come into play as well.  I could see why he'd smirk and kind of roll his eyes at that.  Yah you can look at power simply with v x a but the more trickier variable becomes battery true capacity.  If he designed the thing then he's probably very keen on that systems little quirks, and the battery packs idiosyncracies, and can program that ... tribal knowledge for lack of a better term... into some sort of soc algo.

I would also expect that you could in theory 'discharge' a battery pack during a use cycle, and just letting it set there an hour, it can sort of regen a little bit of extra power for that last 4 miles to get home as the chemistry settles out.

Personally Id think that the most critical place to worry about SOC is at the very top and bottom as those are the two places that you can cause fast damage to a battery when playing or exceeding things there.

Speaking of that..
I noticed that when the energica gets to 20 percent it goes into basically rain mode..  does it granny out even more as the soc drops even further on you?  I kind of like this feature, it's sort of a.  ok enough play time,  we gotta get you home now :)

Aaron
Logged

MVetter

  • Hero Member
  • *****
  • Posts: 1824
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #9 on: April 24, 2023, 10:47:38 PM »

Update - a friend at Zero reached out to me having read this and wished to express they are under the impression that there is at least *some* coulomb counting as a small part of a complex algorithm. This is why, in their words, "the SOC changes even if there is no current, the other portions of the algorithm are affecting the SOC calculation"

So I may have misspoke.
Logged

gt13013

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #10 on: April 25, 2023, 06:34:53 AM »

On my 2016 FXS, I had in the BMS logs lines saying that the SOC estimation was switching between Coulomb counting and voltage mode: see lines highlighted in blue in this file : http://bit.ly/3KnfH2g
This was with the original firmware, and the SOC was a good measure of the remaining energy in the battery. At that time, the SOC was decreasing regularly when I was running the bike.

When the dealer updated my firmware in July 2021, the lines "Switching to coulomb couning SOC mode" have disappeared from the BMS logs. And the SOC began to give stupid values, magic charges, and so on... I think that with this updated firmware, the SOC is mainly based upon the instant voltage of the pack.
And from that time, the BMS logs started to give what seem to be three different estimations of the SOC. And they also give the exact mAh that have been delivered by the battery since the last charge:
https://www.electricmotorcycleforum.com/boards/index.php?topic=11638.msg116919#msg116919

So, it seems that the Coulomb counting has always been done, but is used differently depending on the bike firmware...
Logged
Zero S 2023, Zero FXS 2016

gt13013

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #11 on: April 26, 2023, 12:52:09 PM »

There is also interesting information about the SOC in the Zero unofficial manual :
https://zeromanual.com/wiki/Unofficial_Service_Manual#State_of_Charge
Logged
Zero S 2023, Zero FXS 2016

victor6.7y

  • Full Member
  • ***
  • Posts: 117
  • ^.^
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #12 on: April 27, 2023, 01:41:04 PM »

Dear all,
Thank you for this interesting discussion and information.
It indeed feels like a quite complex and self-correcting algorithm.

I think we can all agree that Zero dit put effort into this. And not only Zero, but other EV's like Energica, Tesla and volkswagen will have trouble for a perfect estimation.
It’s great that the companies are trying to find a reliable method. I'm sure it is not easy.
I’ve added a graph showing the SOC and Pack Voltage while charging. This is a plot that shows all charges from 2020 till today. While there is are relation between the SOC and Pack Voltage, it is shown that it is not always 1 on 1.

Like Aaron said, it is probably good to have a ball park figure so that you don't have to worry about it.
My ball park figure is that 1% is about 1.3km (Zero S 14.4 Kw) ;) that works quite well, until the percentage suddenly rises; Than I have more  :D

I did notice a few times while riding that the percentage sometimes stays at e.g. 9% for quite a while and then suddenly increases when I drive slower. I always thought it would be something like regenerative breaking. However that didn’t exactly fit the behaviour. Using multiple determination methods; and correcting between them would indeed explain it better.
Logged
- 2019 Zero S 14.4
- 2000 Honda VTR 1000F

gt13013

  • Sr. Member
  • ****
  • Posts: 302
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #13 on: April 27, 2023, 06:32:22 PM »

Hi victor6.7y

How did you extract your SOC and voltage values? I have done such extractions from the logs on very small periods of time and it took me hours! See here for instance.

If you are interested by the data from your Zero, you should try the Android application ZeroSpy for Zero Motorcycles. It can record data from your Zero with time intervals as small as 1 second, and then export them in a CSV file. The recorded data are:
Timestamp [UTC];Date&Time;SoC [%];Odo [miles];Bike Speed [mph];Bike Speed [kmh];Motor Speed [rpm];Motor Torque [Nm];Motor Current [A];Battery Current [A];Battery Voltage [mV];Cell Voltage Min [mV];Cell Voltage Max [mV];Pack Capacity Remaining [Ah];Motor Temp [°C];Controller Temp [°C];Battery Temp Min [°C];Battery Temp Max [°C]

If you want to investigate and try to understand the SOC, it is important to correlate it with: pack voltage, min cell voltage, cells balance, Amps delivered by the pack (or amps entering in the engine, or torque. These 3 values should be very similar, but it is not always the case ... ?). ZeroSpy can record all that.
Logged
Zero S 2023, Zero FXS 2016

victor6.7y

  • Full Member
  • ***
  • Posts: 117
  • ^.^
    • View Profile
Re: Does anyone now how the SOC is determined?
« Reply #14 on: April 30, 2023, 10:38:36 PM »


How did you extract your SOC and voltage values? I have done such extractions from the logs on very small periods of time and it took me hours! See here for instance.

Dear GT


There is a way to retrieve the MMB and BMS logs and make them readable https://zero-motorcycle-community.github.io/browser-parse/zero-log-parser.html via the official zero app.



It takes about 5 minutes using my phone to extract the log files, then another 5 minutes run the python script and letting excel update the graphs
let me know if you are interested; I could send you the files and scripts.

« Last Edit: April 30, 2023, 10:40:27 PM by victor6.7y »
Logged
- 2019 Zero S 14.4
- 2000 Honda VTR 1000F
Pages: [1] 2