DigitalShoestringSolutions / PowerMonitoring

GNU General Public License v3.0
0 stars 1 forks source link

Integration jitter #34

Closed tobyaharris closed 4 months ago

tobyaharris commented 4 months ago

The integration is looking a bit unsteady. I tried shrinking the Time Buckets to enhance the issue and sure enough, buckets smaller than one minute make for very jittery Energy integrations, even when the power is steady:

image

With a time bucket approaching the order of magnitude of the sample rate, I wouldn't be surprised at some counting jitter due to significant relative variation in how many samples fall in each bucket.

I suspect the integrator is vulnerable to this because it might be summing each (sample value x time until next sample). How can we handle the time window edge cases?

Although related I feel this is a different problem to #7 .

Greg-Hawkridge commented 4 months ago

That will always be an issue - we should limit time bucket to being >10m

tobyaharris commented 4 months ago

Closing as accepting the status quo, refinement effort not worth it. Time bucket default options are already suitable.