Skip to content

Add Meter electrical component with transformer ratios support#440

Draft
tiyash-basu-frequenz wants to merge 1 commit intofrequenz-floss:v0.x.xfrom
tiyash-basu-frequenz:meter_ratios
Draft

Add Meter electrical component with transformer ratios support#440
tiyash-basu-frequenz wants to merge 1 commit intofrequenz-floss:v0.x.xfrom
tiyash-basu-frequenz:meter_ratios

Conversation

@tiyash-basu-frequenz
Copy link
Contributor

The following new messages have been added:

  • TransformerRatio: Represents a single transformer ratio with primary and secondary values.
  • TransformerRatioThreePhase: Represents a three-phase transformer ratio, containing individual TransformerRatio messages for each phase.
  • MeterTransformerRatio: Represents a meter's transformer ratio (either CT or VT) along with its operational lifetime.
  • Meter: Represents a meter with lists of current and voltage transformer ratios. Each list contains MeterTransformerRatio entries to allow tracking historical configurations.

Additionally, the ElectricalComponentCategorySpecificInfo message has been updated to include the new Meter component category.

@tiyash-basu-frequenz tiyash-basu-frequenz added this to the v0.8.2 milestone Feb 4, 2026
@tiyash-basu-frequenz tiyash-basu-frequenz self-assigned this Feb 4, 2026
@tiyash-basu-frequenz tiyash-basu-frequenz requested a review from a team as a code owner February 4, 2026 12:23
@github-actions github-actions bot added part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files labels Feb 4, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for electrical meters with transformer ratios to track current and voltage transformer configurations over time. The implementation introduces new protobuf messages for representing instrument transformers (CTs and VTs) used in metering applications.

Changes:

  • Added TransformerRatio, TransformerRatioThreePhase, MeterTransformerRatio, and Meter messages to support metering with instrument transformers
  • Updated ElectricalComponentCategorySpecificInfo to include the new Meter component category
  • Updated release notes to document the new messages

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
proto/frequenz/api/common/v1alpha8/microgrid/electrical_components/electrical_components.proto Adds four new messages for meter transformer ratios and updates ElectricalComponentCategorySpecificInfo oneof to include Meter
RELEASE_NOTES.md Documents the new messages and updates to ElectricalComponentCategorySpecificInfo

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tiyash-basu-frequenz tiyash-basu-frequenz force-pushed the meter_ratios branch 2 times, most recently from a815d54 to b3bfab0 Compare February 4, 2026 12:37
The following new messages have been added:
- `TransformerRatio`: Represents a single transformer ratio with primary and
  secondary values.
- `TransformerRatioThreePhase`: Represents a three-phase transformer ratio,
  containing individual `TransformerRatio` messages for each phase.
- `MeterTransformerRatio`: Represents a meter's transformer ratio (either CT or
  VT) along with its operational lifetime.
- `Meter`: Represents a meter with lists of current and voltage transformer
  ratios. Each list contains `MeterTransformerRatio` entries to allow tracking
  historical configurations.

Additionally, the `ElectricalComponentCategorySpecificInfo` message has
been updated to include the new `Meter` component category.

Signed-off-by: Tiyash Basu <tiyash.basu@frequenz.com>
Comment on lines +602 to +611
message TransformerRatioThreePhase {
// The transformer ratio for phase 1 (L1/A/R).
TransformerRatio phase_1 = 1;

// The transformer ratio for phase 2 (L2/B/Y).
TransformerRatio phase_2 = 2;

// The transformer ratio for phase 3 (L3/C/B).
TransformerRatio phase_3 = 3;
}
Copy link
Contributor Author

@tiyash-basu-frequenz tiyash-basu-frequenz Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure about this struct, so some input would be nice.

The reason I am not sure about this is that I do not know of a practical scenario in which the transformer ratios will be different for each phase. In theory, this could happen if someone decides to measure just different single-phase lines using the same meter (say to save costs) or electricians had to use a different transformer due to them running out of the standard kind. But how likely is this to happen, and if we need to support these edge cases?

My gut says we need to support these edge cases, but I could be over-engineering here.

@tiyash-basu-frequenz tiyash-basu-frequenz added the status:blocked Other issues must be resolved before this can be worked on label Feb 5, 2026
@tiyash-basu-frequenz tiyash-basu-frequenz marked this pull request as draft February 5, 2026 10:27
@tiyash-basu-frequenz
Copy link
Contributor Author

I am marking it blocked and draft to prevent accidental merges, since we realized we need t align on the requirements here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

part:docs Affects the documentation part:protobuf Affects the protocol buffer definition files status:blocked Other issues must be resolved before this can be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant