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

#817 disable emulation AC if active power control is activated in a hvdc #818

Merged
merged 2 commits into from
Jan 8, 2025
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
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
Loading