power-grid-model icon indicating copy to clipboard operation
power-grid-model copied to clipboard

[FEATURE] Automatic tap changer in step-up transformer support

Open Jerry-Jinfeng-Guo opened this issue 1 year ago • 2 comments

What need to happen:

  • [x] Figure out the meeth
  • [ ] Control side at the node with higher rated voltage
  • [ ] Tap side and the control side at the same side

Jerry-Jinfeng-Guo avatar Jul 04 '24 08:07 Jerry-Jinfeng-Guo

Most changes will happen in power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp

What need to happen:

  • [x] validation to check for unsupported scenarios when it comes to enabled tap controllers:
    • [x] more than one enabled tap controller on the same transformer
    • [x] ~~an enabled tap controller is coupled with a not-energized transformer~~
    • [x] ~~an enabled tap controller is coupled with a two/three winding transformer with disconnected tap side or control side~~
    • [x] ~~an enabled tap controller is coupled with a two winding transformer which are not fully connected~~
    • [x] ~~an enabled tap controller is coupled with a three winding transformer with two sides disconnected~~
    • [x] ~~an enabled tap controller is coupled with a transformer which is not reachable by transformer ranking graph, see logic below~~ (should not happen in the validation, but in the core itself - already implemented after bug report of Steffan #703)
  • [x] un-regulated transformers given weight of 0 instead of 1: in lines https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L119-L120 and https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L157-L158

to

add_to_edge(state, edges, edge_props, from_node, to_node, {unregulated_idx, 0});
add_to_edge(state, edges, edge_props, to_node, from_node, {unregulated_idx, 0});
  • [x] logic determining direction of transformer tap/control sides needs update:
    • [x] two winding transformer in lines https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L151-L153
    • [x] three winding transformer in lines https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L107-L109
  • [x] after assigning ranks of all regulated transformers, one round of check: https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L274-L276
    • [x] two winding transformers: for every enabled such transformer, rank at the control side (node connected to it) should be 1 greater than the other side, throw exception if not the case.
    • [x] three winding transformers:
      • [x] control side == tap side: rank at the control side (node connected to it) should be 1 greater than any one of the two secondary sides, throw exception if not the case.
      • [x] control side != tap side: rank at the control side (node connected to it) should be 1 greater than the secondary side with tap, throw exception if not the case.
  • [x] Adjust control logic
    • [x] https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L941-L950 linear search would have to include logic to go the opposite way if control side == tap side
    • [x] https://github.com/PowerGridModel/power-grid-model/blob/560323280a537ab5e71dfefc5c8e694c8f4e0256/power_grid_model_c/power_grid_model/include/power_grid_model/optimizer/tap_position_optimizer.hpp#L634-L667 binary search would have to add new state control_tap_same_side in the binary logic

Jerry-Jinfeng-Guo avatar Aug 15 '24 13:08 Jerry-Jinfeng-Guo

line numbers can change. can you add permalinks? (you can create them using the GitHub viewer)

mgovers avatar Aug 16 '24 07:08 mgovers