Skip to content

Commit

Permalink
#817 disable emulation AC if active power control is activated in a hvdc
Browse files Browse the repository at this point in the history
but droop is zero
closes #817

Signed-off-by: Florentine Rosiere <[email protected]>
  • Loading branch information
rosiereflo committed Dec 19, 2024
1 parent baed753 commit 31f1bb0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions etc/Dictionaries/DFLLog_en_GB.dic
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ CannotLoadLibrary = cannot load library %1% : %2%
DynModelLibraryNotFound = library %1% not found : model %2% will be skipped
ContingencyInvalidForSimulation = element %1% from contingency %2% is not valid: not in main connected component or has an invalid type. It will be ignored.
ContingencyInvalidForSimulationNoValidElements = contingency %1% is invalid for simulation. All elements are invalid (not in main connected component or invalid type)
HvdcActivePowerControlActivatedNoDroop = active power control is activated in hvdc %1% but droop is zero. Active power control will be considered as disabled.

//------------------ Outputs -----------------------
TFOComponentNotFound = reference %1% references a TFO element but model %2% does not use a TFO association : reference is ignored
Expand Down
2 changes: 1 addition & 1 deletion sources/Algo/src/HVDCDefinitionAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ auto HVDCDefinitionAlgorithm::computeModel(const inputs::HvdcLine &hvdcline, HVD
if (type == inputs::HvdcLine::ConverterType::LCC) {
return HVDCModelDefinition{infiniteReactiveLimits_ ? HVDCDefinition::HVDCModel::HvdcPTanPhi : HVDCDefinition::HVDCModel::HvdcPTanPhiDiagramPQ};
} else {
const bool hvdcAngleDroopActivePowerControlIsEnabled = hvdcline.activePowerControl.has_value();
const bool hvdcAngleDroopActivePowerControlIsEnabled = hvdcline.activePowerControl.has_value() && !DYN::doubleIsZero(hvdcline.activePowerControl->droop);
if (!hvdcAngleDroopActivePowerControlIsEnabled) {
if (isInSVC) {
if (converterSide1)
Expand Down
6 changes: 2 additions & 4 deletions sources/Inputs/src/AssemblingDataBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,8 @@ AssemblingDataBase::AssemblingXmlDocument::HvdcLineHandler::HvdcLineHandler(cons
onStartElement(root, [this](const parser::ElementName &, const attributes_type &attributes) {
currentHvdcLine->name = attributes["name"].as_string();
currentHvdcLine->converterStation1 = AssemblingDataBase::HvdcLineConverterSide::SIDE1;
if (attributes.has("converterStation1")) {
if (attributes["converterStation1"].as_string() == "SIDE2") {
currentHvdcLine->converterStation1 = AssemblingDataBase::HvdcLineConverterSide::SIDE2;
}
if (attributes.has("converterStation1") && attributes["converterStation1"].as_string() == "SIDE2") {
currentHvdcLine->converterStation1 = AssemblingDataBase::HvdcLineConverterSide::SIDE2;
}
});
}
Expand Down
3 changes: 2 additions & 1 deletion sources/Inputs/src/NetworkManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <DYNVoltageLevelInterface.h>
#include <DYNVscConverterInterface.h>


namespace dfl {
namespace inputs {

Expand Down Expand Up @@ -326,6 +325,8 @@ void NetworkManager::buildTree() {

// active power control external IIDM extension
const bool activePowerEnabled = hvdcLine->isActivePowerControlEnabled().get_value_or(false);
if (activePowerEnabled && DYN::doubleIsZero(hvdcLine->getDroop().value()))
LOG(warn, HvdcActivePowerControlActivatedNoDroop, hvdcLine->getID());
auto activePowerControl =
activePowerEnabled
? boost::optional<HvdcLine::ActivePowerControl>(HvdcLine::ActivePowerControl(hvdcLine->getDroop().value(), hvdcLine->getP0().value()))
Expand Down

0 comments on commit 31f1bb0

Please sign in to comment.