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

Add a way to determine if a meter can have a hidden connection #242

Closed
llucax opened this issue Sep 10, 2024 · 4 comments
Closed

Add a way to determine if a meter can have a hidden connection #242

llucax opened this issue Sep 10, 2024 · 4 comments
Labels
part:protobuf Affects the protocol buffer definition files resolution:wontfix This will not be worked on type:enhancement New feature or enhancement visitble to users
Milestone

Comments

@llucax
Copy link
Contributor

llucax commented Sep 10, 2024

What's needed?

When reading electrical data from the microgrid, we rely mostly on meters and inverters. It is very common that inverters even have a meter in front of them as they provide more reliable data. In those cases one can use the inverter as a fallback way to get data in cases where the meter is not working. There are cases where we even have a component connected to a meter but for technical reasons there is no way to measure the component (like a PV inverter), but we can read it indirectly via a meter.

The problem is a meter can have connections to other electrical components (like a load) that is not represented in the component graph, and if that is the case, we can't rely anymore on the meter to either be a proxy for some other phantom/virtual component or an unknown load.

To solve this, we need a way to determine a meter is only connected to its children nodes or if there could be phantom/hidden/virtual connection that is not represented in the component graph, so we can know how we can use that meter and what is it metering exactly.

Proposed solution

The proposed solution is to add a metadata Meter message with a bool field to tell if there is (or could be) a hidden connection or if it is guaranteed that all connections to the meter are represented in the component graph. For example:

// Frequenz definitions for transformers.
//
// Copyright:
// Copyright 2024 Frequenz Energy-as-a-Service GmbH
//
// License:
// MIT

syntax = "proto3";

package frequenz.api.common.v1.microgrid.components;

// TODO: Docs
message Meter {
  // Wether this meter has hidden connections.
  //
  // Hidden connections are connections that are not represented
  // in the component graph. For example, if a consumer load is
  // connected to the meter.
  bool has_hidden_connection = 1;
}
diff --git a/proto/frequenz/api/common/v1/microgrid/components/components.proto b/proto/frequenz/api/common/v1/microgrid/components/components.proto
index c21251d..bfca30b 100644
--- a/proto/frequenz/api/common/v1/microgrid/components/components.proto
+++ b/proto/frequenz/api/common/v1/microgrid/components/components.proto
@@ -17,6 +17,7 @@ import "frequenz/api/common/v1/microgrid/components/ev_charger.proto";
 import "frequenz/api/common/v1/microgrid/components/fuse.proto";
 import "frequenz/api/common/v1/microgrid/components/grid.proto";
 import "frequenz/api/common/v1/microgrid/components/inverter.proto";
+import "frequenz/api/common/v1/microgrid/components/meter.proto";
 import "frequenz/api/common/v1/microgrid/components/transformer.proto";
 import "frequenz/api/common/v1/microgrid/lifetime.proto";
 
@@ -96,6 +97,7 @@ message ComponentCategoryMetadataVariant {
     frequenz.api.common.v1.microgrid.components.Inverter inverter = 5;
     frequenz.api.common.v1.microgrid.components.VoltageTransformer
       voltage_transformer = 6;
+    frequenz.api.common.v1.microgrid.components.Meter meter = 7;
   }
 }
 

Use cases

No response

Alternatives and workarounds

No response

Additional context

Other issues related to supporting this use case:

@llucax llucax added type:enhancement New feature or enhancement visitble to users part:protobuf Affects the protocol buffer definition files labels Sep 10, 2024
@llucax llucax added this to the v0.7.0 milestone Sep 10, 2024
@llucax llucax changed the title Add a way to determine if a meter can have a *hidden connection* Add a way to determine if a meter can have a hidden connection Sep 10, 2024
@tiyash-basu-frequenz
Copy link
Contributor

I would like to propose another potential solution - we can just add a "virtual" meter to the component graph. This has a few advantages to the proposal above:

  • It does not need any API change.
  • We already use "virtual" components, e.g., PV inverters, or CHPs, etc, to which we do not have data connections. We could use the same approach here, because like, say, a virtual inverter, the load exists, but the corresponding meter is missing, or we do not have a data connection to it. This will keep things more consistent.

However, if we really want to follow the proposal mentioned in the issue description, then we could get replace all virtual components with meter metadata fields, again for consistency.

@llucax
Copy link
Contributor Author

llucax commented Sep 13, 2024

Also for cross-referencing, the #246 also touches on the point of metadata vs components in the component graph.

I also feel like having a more representative component graph sounds cleaner and less hacky.

@tiyash-basu-frequenz tiyash-basu-frequenz added the status:blocked Other issues must be resolved before this can be worked on label Sep 26, 2024
@tiyash-basu-frequenz
Copy link
Contributor

Marking this blocked for now, until we stabilize the requirement in discussions.

@tiyash-basu-frequenz
Copy link
Contributor

We discussed that we do not need to consider meters having hidden connections. Client app algorithms should be able to adapt to anomalous meter readings.

@tiyash-basu-frequenz tiyash-basu-frequenz closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2024
@tiyash-basu-frequenz tiyash-basu-frequenz added resolution:wontfix This will not be worked on and removed status:blocked Other issues must be resolved before this can be worked on labels Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:protobuf Affects the protocol buffer definition files resolution:wontfix This will not be worked on type:enhancement New feature or enhancement visitble to users
Projects
None yet
Development

No branches or pull requests

2 participants