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

Add internal resistance to voltage table calculations #1016

Merged
merged 14 commits into from Oct 10, 2023

Conversation

brtietz
Copy link
Collaborator

@brtietz brtietz commented Apr 21, 2023

A draft implementation of internal resistance for voltage table batteries. This dropped the DC-DC efficiency for lead acid from 99.5% to 95% - if we lower the default internal resistance. Sources including figure 6 of https://batteryuniversity.com/article/how-does-internal-resistance-affect-performance imply that 0.25 Ohms is too high, and that 0.01-0.02 would be more appropriate.

Companion SAM PR: NREL/SAM#1493

Fixes #831

@brtietz brtietz added this to the 2022.11.21 Patch 2 milestone Apr 21, 2023
@brtietz brtietz requested a review from dguittet April 21, 2023 21:49
@brtietz brtietz self-assigned this Apr 21, 2023
@brtietz brtietz linked an issue Apr 21, 2023 that may be closed by this pull request
@brtietz brtietz changed the title Draft: Add internal resistance to voltage table calculations WIP: Add internal resistance to voltage table calculations Apr 21, 2023
@brtietz brtietz marked this pull request as draft April 21, 2023 21:50
@dguittet
Copy link
Collaborator

While it makes sense to append a V = IR term to the voltage calculation, I have a high level question-- is this added just to reduce the roundtrip efficiency of voltage table battery models?

@brtietz
Copy link
Collaborator Author

brtietz commented Apr 28, 2023

The goals include both reducing the efficiency (ideally making it more accurate) and harmonizing the assumptions of the voltage table and the thermal model. I'm also wondering if this will assist with some of the issues we have with the voltage table staying within the SOC limits, such as #569 and the comment on NREL/SAM#1208, but I don't have any evidence that it will so far.

If we don't go this route, we should make it more obvious in the UI that the internal resistance isn't used in the voltage table, just the thermal model.

@brtietz
Copy link
Collaborator Author

brtietz commented Apr 28, 2023

After my previous post, I remembered that I do have numbers on improved accuracy. Without this code, if you set the AC-DC and DC-AC efficiencies to 100%, the DC-DC efficiency is 99.5%, which is suspiciously high. Additionally, it doesn't change with internal resistance. With this code and the adjustments to lead-acid internal resistance discussed above, the DC-DC efficiency is more in line with the lithium ion models. I'm missing specific numbers for that right now because I don't have the code checked out.

@dguittet
Copy link
Collaborator

So I actually worry that having the resistance variable fill both a thermal model role and a voltage role is not only incorrect in that they shouldn't be the same value (they are in fact different models with different parameters and weren't "fitted" together), but also causes issues for users to tune the resistance since now you may have overheating of the battery if you want a lower RT efficiencity, or what not.

I wonder if it wouldn't be more user-friendly to allow a "roundtrip efficiency" input for the voltage table.

@brtietz
Copy link
Collaborator Author

brtietz commented Apr 28, 2023

At least for the NMC data, I fixed the resistance based on Kandler's paper and tuned h and Cp for the thermal model (link to private repo: https://github.com/NREL/sam-analysis/blob/main/battery_validation/thermal_fit.py). It seems like these should at least be correlated: if the resistance in the voltage model increases so should the resistance in the thermal model, and then it's on the battery thermal management system (h) to shed the extra heat.

Are there resistances that the thermal model needs to capture that aren't in the voltage model? If so, should we plan on adding a second parameter?

@dguittet
Copy link
Collaborator

dguittet commented May 3, 2023

I would guess the thermal resistance is over the entire battery module whereas the voltage model is on the cell level, so there are all the additional pieces that go into putting many cells together. However my concern is not primarily with correctly representing different types of resistance. It's more that users don't have these parameters and if the point of adding resistance is to represent a lower, more realistic roundtrip efficiency, which actually is meaningful and available to the user, then we should just allow that.

@brtietz
Copy link
Collaborator Author

brtietz commented May 3, 2023

How much do we care about the effect of charging having a higher voltage than discharging? That strikes me as the main thing we lose with the DC-DC efficiency as a percentage approach.

I also did a quick scan of data sheets from the search "battery spec sheet", and internal resistance (or internal impedance) was easier for me to find than DC-DC conversion percent.

@dguittet
Copy link
Collaborator

dguittet commented May 4, 2023

My chats with a utility / developer in industry is that they do get battery roundtrip efficiencies from the manufacturer, with a typical range of 80-85% including auxiliaries, converters, losses, etc.

I really don't know which is the right approach. Maybe worth asking Paul for the user's perspective?

@brtietz brtietz changed the base branch from patch to develop October 9, 2023 21:01
@dguittet
Copy link
Collaborator

@brtietz Let me know when this is no longer a draft PR and is ready for review.

@brtietz brtietz changed the title WIP: Add internal resistance to voltage table calculations Add internal resistance to voltage table calculations Oct 10, 2023
@brtietz brtietz marked this pull request as ready for review October 10, 2023 15:50
@brtietz
Copy link
Collaborator Author

brtietz commented Oct 10, 2023

@dguittet I wanted to get NREL/SAM#1493 ready prior to review. It's ready for review now, thank you!

Copy link
Collaborator

@dguittet dguittet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@brtietz brtietz merged commit 25572cc into develop Oct 10, 2023
4 checks passed
@brtietz brtietz deleted the ssc_831_voltage_table_internal_resistance branch October 10, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Voltage Table does not consider internal resistance
5 participants