Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Voltage SOC Estimation #41

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

trebula
Copy link

@trebula trebula commented Apr 17, 2023

I converted the voltage curves from the product data sheet into data points that could then be used to find the state of charge given the voltage, current, and ambient temperature. Temperature only seems to affect the voltage at near-freezing temperatures, so I added a small correction term at cold temperatures (calculated from averaging the voltage difference between the 23C curve and the 0C/-20C curves). This also assumes that the battery pack has 24 cells in series and 10 in parallel (not sure of the exact specs so this was just an estimate, but can easily be changed to the actual series/parallel in the updateBatteryInfo() function).

This updates the getBatteryPercent abstraction, so it can be easily combined with the coulomb-counting branch without requiring many integration changes.

@trebula
Copy link
Author

trebula commented Apr 17, 2023

Additional info:

  • I measured the data points using a picture of the graph and an online converter. I tried contacting Molicel directly but couldn't get the exact data for the voltage curves—the converter seems to be fairly accurate though, e.g. measurement of the 0.84A curve: Screenshot 2023-04-12 at 4 44 01 PM

  • May be inaccurate at extremely low temperatures when near full charge since the correction term is the averaged difference, and voltage difference between temperatures is greatest when near full charge

Screenshot 2023-04-13 at 11 15 00 PM

  • I decided to use a correction term only for the temperature even though it could potentially be used for both. My reasoning was that the current probably varies a lot, so having an accurate estimation based on current was more important than for estimating at sub-freezing temperatures.

  • Battery size is an input variable that determines the number of cells in parallel and has to be known at startup (potentially a user-inputted value?). I wasn't sure how to accurately differentiate between battery sizes—likely a combination of SOC, voltage derivative, and current could be used to get a rough idea of which size it is, but I think it would require already knowing the SOC. Unfortunately I didn't have the data for this so I just made battery size a user-input and default it to the 3.7kWh (24 series 10 parallel) battery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants