curiouscarbon
Science Penguin
- Joined
- Jun 29, 2020
- Messages
- 3,022
intesting, thank you for the in depth description of how AC inverter draws Varying DC ampsI have a JK-BMS on my battery bank, and I know exactly what you are talking about. Let me see if I can explain it a little better.
A pure sine wave inverter does not draw a constant current. The current from the battery follows a sine wave shape. It ramps from zero current up to peak current in 1/4 of a cycle. The peak current is actually about 40% more than the average current. Then the current will ramp back down to zero at the 1/2 cycle time. At this point, the inverter reverses polarity, and ramps the current back up again, hitting the peak at the 3/4 cycle time. The battery current is positive again, and the inversion happens in the inverter circuit. The the current ramps down back to zero again at the end of the cycle. The process them repeats for every cycle.
If you measure with an averaging meter, you will just see a fairly steady current that should be close to the true RMS current. I use a True RMS Fluke meter, and it is able to give a vey accurate reading on this odd waveform. The current reading in the BMS just measures the voltage across a shunt resistor. This reading is only taken periodically, and it is not synced the the changing current from the inverter. It might take a reading at zero current, or at the peak current, but most likely, it will fall somewhere in between. Due to the shape of the wave, the reading tends to bounce a bit above and below the true RMS current. It is not perfect, but over the long term, it is "good enough" for the BMS to calculate the amp hours charged in or discharged out of the battery. This works because if you average the readings over a full hour, the high and low readings will average out.
well said!There is not a simple fix for the short term reading fluctuations. Ideally, reading it much faster and doing a running RMS type average would be best, but that takes more memory and computation. That is basically how my Fluke meter does it. An easier and cheaper way to do it is to just put an analog low pass filter on the signal from the current shunt. This will not be perfectly accurate, but by putting in an average to RMS correction factor for a sine wave, it will be very close, as long as the current wave follows a sine wave shape. Many AC voltage and current meters do this. When you measure 120 volts AC, it is actually averaging the sine wave and doing a small correction. It is accurate for a clean sine wave, but if it is a square wave, or triangle wav etc., then the reading will be a little off. A true rms meter is still accurate, no matter the wave shape.
In the case of the BMS random reads, it is actually very accurate over the long term because it is adding up the amp hours of each reading on the waveform. If you just watch the reading for a few seconds, you can get a pretty good idea of what the average reading is. If you need more accurate, use a clamp on amp meter or install an external shunt with averaging or true rms reading.
as you mention, one way to get around this issue at a Firmware Level is to sample the Battery Current at e.g. 120hz and only report averages that cover an integer number of AC cycles (1 cycle = 1/60 second, 2 cycle = 2/60 second). It Must Be Integer Multiple Number Of Cycles.
zero crossing average would drastically reduce the fluctuation
i have had to do this before writing low level microcontroller firmware. sampling like this would completely negate that part of the fluctuation.
if BMS reads current and reports over time periods that are not 1/30th of a second precisely or 1/15th of a second precisely, this fluctuation will never go away is my theory. good luck!
oh... if running the inverter at 50hz change all the values. or to whatever frequency for locale.
excited for the 4S BMS after new years celebration