Joules versus AmpHours
Nobody has claimed this yet.
- #687 by @keesverruijt — closed without merging
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- json
- Domain
- backend-api-design
Research direction
Read the discussion and linked pull request #687, then review the specification entries for /capacity/nominal, /capacity/actual, /capacity/remaining, and /capacity/dischargeLimit. The issue proposes expressing capacity in Ah or coulombs rather than joules; done means the unit choice is resolved and reflected consistently in those entries.
Written by the indexing model from the issue text.
Description
Hi,
When trying to output the data of my BMS I stumbled over the specs which want to have all capacity related data expressed in Joules rather than AmpHours. Apparently, someone went to great lengths to get everything into SI units, but made a serious mistake.
The problem is: Since an Amp Hour (Ah) is a measure of charge (Coulombs) whereas a Joule is a measure of energy, you can't convert mAh to Joules without knowing the voltage at which the charge was transferred. Similary, you can't convert "Joules remaining" to "Ah's remaining" without knowing the voltage at which the transfer is going to take place.
Battery manufacturers specify their battery capacity in AmpHours (at a give discharge rate). Battery Management Systems track the Amps going in and out of the battery and use it to calculate the State Of Charge. Voltage is entirely out of the equation here and would deeply confuse matters.
Let me clarify why this is creating a problem: Suppose we are discharging a 100Ah battery with 10 Amps. The battery is fully charged and starts at a voltage of 13.7 Volts. During the discharge, after one hour the voltage has dropped to 12.5V. We have used 10 AmpHours. During the next hour, the voltage drops a bit more, to 12.2V. Again we have used 10 AmpHours. Now, if we convert both hours to Joules, we will see a difference between the amount of Joules used during these two hours because the voltages during the discharge were different, yet the amount of AmpHours used is in both situations the same.
It gets even more confusing when we want to indicate how much capacity is left in the battery. It is easy in AmpHours, because we used two hours of 10Ah, so there is 80Ah left. But even if we went through the trouble to track the amount of Joules used (which was dependent on a varying Voltage), we are now stuck with a capacity expressed in Joules which we can not convert back into Ah's without knowing at forehand at which Voltage the transfer is going to take place. You see, voltage varies with temperature so when the temperature of the battery changes, the amount of Joules left changes as well, whereas the amount of Ah's left remains the same.
It is not a small error we are talking about. Battery voltage varies quite a bit, in a working installation it can easily vary between 11.5 V to 14.5 Volts. If we convert Ah's to Joules back and forth we are talking about an error easily exceeding 20%!
Technically, the Ah's is what we want to track. This is the unit specified by the battery manufacturer, and this is the unit users understand. This is also the only unit Battery Management Systems can use to track the State Of Charge. Battery voltage varies between charging and discharging, yet you can expect that when taken out 10Ah's you also need to put 10Ah back into the battery. The voltage (and hence the amount of Joules) is variable, not just due to the charge left in the battery, but also due to temperature, load, internal resistance, but although the voltage varies, it has no effect on the amount of AmpHours. The user wants to know how many amphours are left in the battery, and he doesn't expect this value to change when the temperature of the battery (and hence the voltage and thus Joules) changes.
So, I would propose to use Ah (or Coulomb) as a unit, not Joules, as there is no linear relationship between Ah's and Joules, and in battery terms Ah is the unit we are interested in, and we don't want to see this unit polluted by temperature differences and internal resistance etc.
The keys/paths affected are:
/capacity/nominal
/capacity/actual
/capacity/remaining
/capacity/dischargeLimit
- Dominant language
- JavaScript
- Stars
- 105
- Forks
- 72
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SignalK/specification
-
Difficulty 5/5 Over a week Newbie friendliness 45/100
SignalK/specification#700 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
SignalK/specification#694 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 54/100
SignalK/specification#691 ·
-
RFC: depth transducer offsets: one sign convention, transducer position, server-derived depthsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
SignalK/specification#688 · 3 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
SignalK/specification#685 · 2 comments ·
All issues in SignalK/specification
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 83/100
TheOdinProject/curriculum#31596 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
mailcow/mailcow-dockerized#7725 ·
Maintainers usually reply within 1 day
-
bug need-fix
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
hoverkraft-tech/ci-github-common#694 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
solana-foundation/solana-com#2579 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
vercel-labs/agent-skills#385 ·