Skip to content

New approach for calculating production and consumption powers  #1080

@shsms

Description

@shsms

A new approach to calculating production and consumption powers that would bypass the problem of identifying where consumption happens in the component graph.

Batteries or meters WITH battery successors(direct or indirect):

  • Their consumption power could be charging power of the battery, so their powers can't be used for the site's consumption power.

  • Their production power could be discharging from batteries, so they can't be used for the site's production power.

  • When such a component is encountered during traversal, if it has other non-battery successors, those should be used to calculate production and consumption powers.

Non-battery components or meters WITHOUT battery successors (direct or indirect):

  • This includes dangling meters, and meters with only other types of successors, other than battery inverters.

  • Production formula should contain a min(0,meter_power) component in the formula for each such meter.

  • Consumption formula should contain a max(0,meter_power) component in the formula for each such meter.

Validation

  • These min, max formula components should accept an optional validation check. For example, min(0, meter_power, x >= 0.0). Then for each value in the data stream, every time the validation fails, we log a message, but we still use the value.

  • The log messages should be rate-limited to upto once a minute or something similar, to prevent spamming.

  • Meters without successors: They are normally assumed to have only consumers, so the production component should have a validation of x == 0. Then if we measure production from dangling meters, we will see a log message.

  • CHP: They are expected to always produce, so their consumption component should have a validation of x == 0.

  • PV inverters: They are expected to always produce, but they have small consumption at night. So a simple x == 0 validation for consumption will not be enough.

When there's a grid meter

  • When there's a grid meter at a site, we would also add an unmetered component to the formulas.

  • This would be calculated by subtracting the powers of all the successors of the grid meter, from the power measured at the grid meter.

  • Production formula should contain a min(0,unmetered_power, x == 0) component in the formula for each such meter.

  • Consumption formula should contain a max(0,unmetered_power) component in the formula for each such meter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:data-pipelineAffects the data pipelinetype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    Status

    To do

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions