Skip to content

S0 meter is very inaccurate at low power #6483

@remotedimmer

Description

@remotedimmer

The electric power (in Watt) as reported by S0 meters is very inaccurate.
I noticed that when the actual consumption is very low, in my case below 6W using a 2000 counts/kWh counter, the reported power is far off the actual power and often as high as 180W. With 1000 counts/kWh this can go up to 360W.
I looked at the source code - S0MeterBase::ParseLine() - and I suspect the problem is due to 2 effects:

  1. at low power there may be fewer than 1 pulse per 30 intervals (5 minutes), the idea is to report this as 0W. It also resets the interval counter to 0. Now when a new pulse arrives (which would be the 31st interval) it is considered to be in the first interval and the actual power is computed as 3600/1/interval/pph*1 which in my case (pph=2, interval=10) amounts to 180W. This is the worst case, for even lower power the number of intervals may be any number between 1 and 30.
  2. the algorithm averages over 5 samples, however the periods of 5 minutes of virtually zero power are not taken into account.
    This issue does not affect the reported energy consumption which is derived from the counter values.

I think the issue can be resolved by:

  1. using the actual time between pulses when computing the actual power (as opposed to the time % 5 minutes);
  2. making sure that the samples in the buffer for averaging represent equal time steps (now this is only the case when there is at least 1 pulse per 10 seconds interval).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions