-
Notifications
You must be signed in to change notification settings - Fork 22
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
Charging math: consistency between modules and building understanding #105
Comments
The formula for power in a 3-phase AC circuit is Voltage x Current x Power Factor x sqrt(3), where the Power Factor is the "True Power" divided by the "Apparent Power". In purely resistive circuits it is 1. Assuming 230 V and 16 A per phase, that would be about 6.4 kW = 230 x 16 x sqrt(3), but we see closer to 10 or 11 on the power meter, which would indicate that the power factor is greater than 1, which I'm not entirely sure is possible. Let's see if I can find where the calculations are performed, and what Power Factor is used. |
@Abby-Wheelis I assume that the sqrt(3) won't apply for DC charging. Maybe the computed power assumes DC and does not work properly for AC? It won't be the first time that the functionality is almost there but has some holes for use cases that are more uncommon. Right now, in the US, DC is way more prevalent than AC in the public charging space because most people use AC/L2 charging at home. |
Right, for DC it is just P = V x I. If it were just using DC we would expect to see 16 x 230 = 3.7 kW which is way lower than what we're seeing. Maybe close to 16 x 3 x 230 = 11 kW (then presumably some loss factor), but that's not how 3 phase works. Maybe we assumed that's how it works? I still need to find where this is actually calculated, but assuming 230 V and 16 A I would expect to see a little less than 3.7 kW for DC, and a little less than 6.4 kW for AC. Since the number is higher than that, maybe I'm gleaning the wrong current from the logs, or there is some current that it is defaulting to that is higher? |
I input a Departure Time of 3600 (1 hour) and an EAmount of 60. The log message says that the EAmount is in Wh
Then: And then a few lines later says Then the messages with the charge parameters has more confusing units, with nominal voltage of 2300 and max current of 160, the pmax is still 11040 (I have a feeling this is what shows on the display, minus some loss factor, just not sure where it comes from).
Then the schedules get calculated, which would have the power delivered be much lower, around 1-2 Watts, but we're already pretty sure these schedules are not received properly, so focusing just on the elements of power calculation. The first
These status messages repeat until the external limit that I sent kicks in, and the Current drops to 130 (13A?)
Default: 10.6 kW, 16A, 230V |
The factor of 10 is coming from a call to And in that context, the messages can be decoded a bit: Then that aligns with the next message, and resolve my confusion about milliWatt hours The next The two I thiiink what is happening here is we assume the AC power = 3 x I x V (3 x 16 x 230) = 11040 Wh That should hopefully be a simple enough code change to correct! |
Yep, here's the line where we're first calculating the pmax We want to swap the 3 for sqrt(3) there, and maybe other places, but this is a start, bookmarking this for when I have build power! |
Opening a separate issue to track the questions that were raised in #92.
The text was updated successfully, but these errors were encountered: