Skip to content
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

New approach for calculating production and consumption powers #1080

Open
shsms opened this issue Sep 27, 2024 · 0 comments
Open

New approach for calculating production and consumption powers #1080

shsms opened this issue Sep 27, 2024 · 0 comments
Labels
part:data-pipeline Affects the data pipeline type:enhancement New feature or enhancement visitble to users

Comments

@shsms
Copy link
Contributor

shsms commented Sep 27, 2024

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.

@shsms shsms added part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed type:enhancement New feature or enhancement visitble to users labels Sep 27, 2024
@shsms shsms added part:data-pipeline Affects the data pipeline and removed part:❓ We need to figure out which part is affected priority:❓ We need to figure out how soon this should be addressed labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:data-pipeline Affects the data pipeline type:enhancement New feature or enhancement visitble to users
Projects
Status: To do
Development

No branches or pull requests

1 participant