Skip to content

Commit

Permalink
Fix Wecc and GridForming omega ref connection (#390)
Browse files Browse the repository at this point in the history
Signed-off-by: lisrte <laurent.issertial@rte-france.com>
  • Loading branch information
Lisrte authored Oct 9, 2024
1 parent 3152271 commit f391e9c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,7 @@
*/
public interface FrequencySynchronizedModel extends Model {

default List<VarConnection> getOmegaRefVarConnections() {
return List.of(
new VarConnection("omegaRef_grp_@INDEX@", getOmegaRefPuVarName()),
new VarConnection("running_grp_@INDEX@", getRunningVarName())
);
}
List<VarConnection> getOmegaRefVarConnections();

default List<VarConnection> getSetPointVarConnections() {
return List.of(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public String getRunningVarName() {
@Override
public List<VarConnection> getOmegaRefVarConnections() {
return List.of(
new VarConnection("omega_grp_@INDEX@", getOmegaPuVarName()),
new VarConnection("omegaRef_grp_@INDEX@", getOmegaRefPuVarName()),
new VarConnection("omega_grp_@INDEX@_value", getOmegaPuVarName()),
new VarConnection("omegaRef_grp_@INDEX@_value", getOmegaRefPuVarName()),
new VarConnection("running_grp_@INDEX@", getRunningVarName())
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
package com.powsybl.dynawo.models.generators;

import com.powsybl.dynawo.builders.ModelConfig;
import com.powsybl.dynawo.models.VarConnection;
import com.powsybl.dynawo.models.frequencysynchronizers.FrequencySynchronizedModel;
import com.powsybl.dynawo.models.utils.BusUtils;
import com.powsybl.iidm.network.Bus;
import com.powsybl.iidm.network.Generator;

import java.util.List;

/**
* @author Laurent Issertial {@literal <laurent.issertial at rte-france.com>}
*/
Expand All @@ -22,6 +25,14 @@ protected SynchronizedWeccGen(String dynamicModelId, Generator generator, String
super(dynamicModelId, generator, parameterSetId, modelConfig, weccPrefix);
}

@Override
public List<VarConnection> getOmegaRefVarConnections() {
return List.of(
new VarConnection("omegaRef_grp_@INDEX@_value", getOmegaRefPuVarName()),
new VarConnection("running_grp_@INDEX@", getRunningVarName())
);
}

@Override
public String getOmegaRefPuVarName() {
return weccPrefix + "_omegaRefPu";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<dyn:connect var1="converter_terminal" var2="@STATIC_ID@@NODE@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-GridFormingConverterDroopControl">
<dyn:connect var1="omega_grp_@INDEX@" var2="converter_omegaPu"/>
<dyn:connect var1="omegaRef_grp_@INDEX@" var2="control_omegaRefPu"/>
<dyn:connect var1="omega_grp_@INDEX@_value" var2="converter_omegaPu"/>
<dyn:connect var1="omegaRef_grp_@INDEX@_value" var2="control_omegaRefPu"/>
<dyn:connect var1="running_grp_@INDEX@" var2="converter_running"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-DefaultBusOfFrequencySynchronized">
Expand Down
2 changes: 1 addition & 1 deletion dynawo-simulation/src/test/resources/wecc_pv_dyd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<dyn:connect var1="photovoltaics_terminal" var2="@STATIC_ID@@NODE@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-PhotovoltaicsWeccCurrentSource">
<dyn:connect var1="omegaRef_grp_@INDEX@" var2="photovoltaics_omegaRefPu"/>
<dyn:connect var1="omegaRef_grp_@INDEX@_value" var2="photovoltaics_omegaRefPu"/>
<dyn:connect var1="running_grp_@INDEX@" var2="photovoltaics_injector_running"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-DefaultBusOfFrequencySynchronized">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<dyn:connect var1="WTG4B_terminal" var2="@STATIC_ID@@NODE@_ACPIN"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-WTG4BWeccCurrentSource">
<dyn:connect var1="omegaRef_grp_@INDEX@" var2="WTG4B_omegaRefPu"/>
<dyn:connect var1="omegaRef_grp_@INDEX@_value" var2="WTG4B_omegaRefPu"/>
<dyn:connect var1="running_grp_@INDEX@" var2="WTG4B_injector_running"/>
</dyn:macroConnector>
<dyn:macroConnector id="MC_DYNModelOmegaRef-DefaultBusOfFrequencySynchronized">
Expand Down

0 comments on commit f391e9c

Please sign in to comment.