Feat: Implemented SSN_SynchronGenerator - #588
Conversation
matthiasmees
commented
Jul 21, 2026
- Implemented SynchronGenerator for SSN according to model from https://ieeexplore.ieee.org/abstract/document/8536236
- Implemented cxx example and notebook to test Grid-connected LoadStep
Signed-off-by: matthiasmees <matthias.mees@rwth-aachen.de>
Signed-off-by: matthiasmees <matthias.mees@rwth-aachen.de>
Signed-off-by: matthiasmees <matthias.mees@rwth-aachen.de>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #588 +/- ##
==========================================
+ Coverage 71.59% 71.60% +0.01%
==========================================
Files 484 486 +2
Lines 30915 31326 +411
Branches 16414 16699 +285
==========================================
+ Hits 22133 22432 +299
- Misses 8781 8809 +28
- Partials 1 85 +84 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
georgii-tishenin
left a comment
There was a problem hiding this comment.
Hi @matthiasmees. Really nice work!
I left a few comments I wanted to discuss before merging (does not mean that needs to be addressed in this PR)
|
|
||
| // Preserve the initial operating-point metadata used by the component. | ||
| generator->terminal(1)->setPower( | ||
| Complex(-generatedActivePower, -generatedReactivePower)); |
There was a problem hiding this comment.
Just to take note (does not need to be solved in this PR).
We need to harmonize the SSN generator and SP::Ph1::SynchronGenerator, so that we can initialize SSN generator, like in this example: https://github.com/sogno-platform/dpsim/blob/master/dpsim/examples/cxx/Circuits/DP_Ph1_IEEE9_4Order.cpp
As I understand the problem, the SystemTopology::initWithPowerflow() finds the dynamic component with the same name and always writes the solved generator power to comp->terminals()[0]
While we connect the new generator as generator->connect({EMT::SimNode::GND, nMachine});
And the initialization of SSN generator uses const Complex targetPower = terminal(1)->singlePower();
|
|
||
| void EMT::Ph3::SSN_SynchronousGenerator::setFieldVoltage(Real fieldVoltage) { | ||
| mFieldVoltage = fieldVoltage; | ||
| } |
There was a problem hiding this comment.
Seems to be set in setParameters(). Is there a need for setting this separately?
Also this field voltage is more like initial guess for the iterative initialization, right? Then gets overwritten in initializeFromNodesAndTerminals()? Maybe we can point that out somehow, e.g. name the argument fieldVoltageInitialGuess?
| Real mechanicalTorque) { | ||
| mMechanicalTorque = mechanicalTorque; | ||
| mAutoInitializeMechanicalTorque = false; | ||
| } |
There was a problem hiding this comment.
same here: both parameters are set in setParameters(). Do we need an extra function for that?