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 RPC to set reactive power #60

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@

A new inverter component states have been added: `Unknown`

* [Added RPC to set reactive power](https://github.com/frequenz-floss/frequenz-api-microgrid/pull/60)

A new RPC, named `SetPowerReactive` has been added to set reactive power for
inverters, and other components that support it. Also, the parameters to the
RPC can be sent using the message `SetPowerReactiveParam`.

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
27 changes: 26 additions & 1 deletion proto/frequenz/api/microgrid/microgrid.proto
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ service Microgrid {
// ==== vales here are allowed and will be accepted
rpc AddInclusionBounds(SetBoundsParam) returns (google.protobuf.Timestamp);

// Sets the power output of a component with a given ID, provided the
// Sets the active power output of a component with a given ID, provided the
// component supports it.
//
// Note that the target component may have a resolution of more than 1 W.
Expand All @@ -198,6 +198,19 @@ service Microgrid {
};
}

// Sets the reactive power output of a component with a given ID, provided the
// component supports it.
//
// Note that the target component may have a resolution of more than 1 VAr.
// E.g., an inverter may have a resolution of 88 VAr.
// In such cases, the magnitude of power will be floored to the nearest
// multiple of the resolution.
rpc SetPowerReactive(SetPowerReactiveParam) returns (google.protobuf.Empty) {
option (google.api.http) = {
get : "/v1/components/{component_id}/setPowerReactive/{power}"
};
}

// Starts the component, and brings it into a state where it is immediately
// operational.
//
Expand Down Expand Up @@ -368,6 +381,18 @@ message SetPowerActiveParam {
float power = 2;
}

// Parameters for setting the reactive power of an appropriate component using
// the `SetPowerReactive` RPC.
message SetPowerReactiveParam {
// The ID of the component to set the output reactive power of.
uint64 component_id = 1;

// The output reactive power level, in VAr.
// -ve values are for inductive (lagging) power , and +ve values are for
// capacitive (leading) power.
float power = 2;
}

// Parameters for setting bounds of a given metric of a given component.
message SetBoundsParam {
// An enumerated list of metrics whose bounds can be set.
Expand Down