Skip to content

Feature: New exciter models#402

Merged
leonardocarreras merged 19 commits into
sogno-platform:masterfrom
leonardocarreras:feature-exciter
Jun 8, 2026
Merged

Feature: New exciter models#402
leonardocarreras merged 19 commits into
sogno-platform:masterfrom
leonardocarreras:feature-exciter

Conversation

@leonardocarreras

@leonardocarreras leonardocarreras commented Aug 29, 2025

Copy link
Copy Markdown
Contributor

This is based on various PRs from @martinmoraga at the times of his work on ACS.

Adaptations are mine.

Ongoing work.

New models:

  • Add Model: Exciter DC1
  • Add Model: Exciter DC1 Simplified > Replaces old Exciter (.h & .cpp)
  • Add Model: Exciter DC1 Simplified for sT1
  • Add Model: Exciter DC1 Static

Updates

  • Add Base Exciter model
  • Add models to Factory
  • Add models to Component list
  • Update Generator models to the new Exciters
  • Keep a deprecated interface for backwards compatibility in generators
  • Update existing C++ examples
  • Update python bindings
  • Update notebook examples
  • Add documentation

Other

  • Fix logger (fmt related) for handling new exciter

@leonardocarreras leonardocarreras force-pushed the feature-exciter branch 2 times, most recently from d27609a to 23eb53c Compare September 25, 2025 20:25
@leonardocarreras leonardocarreras self-assigned this Dec 17, 2025
@leonardocarreras leonardocarreras added the enhancement New feature or request label Dec 17, 2025
@pipeacosta pipeacosta force-pushed the feature-exciter branch 3 times, most recently from bf6b928 to 0759367 Compare May 19, 2026 16:10
@leonardocarreras leonardocarreras force-pushed the feature-exciter branch 2 times, most recently from 4242876 to 200ad58 Compare June 4, 2026 22:16
@leonardocarreras leonardocarreras marked this pull request as ready for review June 4, 2026 23:46
@leonardocarreras

Copy link
Copy Markdown
Contributor Author

Hi @georgii-tishenin @pipeacosta, I know this is not a small PR. Let me know if it is possible to have a look, or if we need to do it differently. Thanks in advance.

@codecov

codecov Bot commented Jun 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 64.84211% with 167 lines in your changes missing coverage. Please review.
✅ Project coverage is 65.86%. Comparing base (2e3f952) to head (4a5f757).

Files with missing lines Patch % Lines
dpsim-models/src/Signal/ExciterDC1.cpp 39.72% 44 Missing ⚠️
...ls/src/Base/Base_ReducedOrderSynchronGenerator.cpp 6.06% 31 Missing ⚠️
dpsim-models/src/Signal/ExciterStatic.cpp 50.00% 26 Missing ⚠️
dpsim-models/src/Signal/ExciterDC1Simp.cpp 76.56% 15 Missing ⚠️
dpsim/src/pybind/BaseComponents.cpp 53.33% 14 Missing ⚠️
dpsim-models/src/Signal/ExciterST1Simp.cpp 60.00% 12 Missing ⚠️
dpsim/src/pybind/SignalComponents.cpp 86.36% 12 Missing ⚠️
dpsim-models/include/dpsim-models/Factory.h 0.00% 8 Missing ⚠️
dpsim-models/include/dpsim-models/Logger.h 0.00% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
- Coverage   66.03%   65.86%   -0.17%     
==========================================
  Files         401      405       +4     
  Lines       24303    24684     +381     
  Branches    12332    12494     +162     
==========================================
+ Hits        16048    16259     +211     
- Misses       8254     8424     +170     
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@georgii-tishenin georgii-tishenin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I especially like that the new exciter models are added together with documentation and Python bindings.

I left a few small comments/questions. I do not see this as a strict requirement for this PR, but it would give a better feeling to have tests/examples covering all new exciter models.

Comment thread dpsim-models/src/Base/Base_ReducedOrderSynchronGenerator.cpp Outdated
Comment thread dpsim-models/src/Base/Base_ReducedOrderSynchronGenerator.cpp
Comment thread dpsim-models/src/Signal/ExciterDC1.cpp
Comment thread dpsim-models/src/Signal/ExciterStatic.cpp Outdated
Comment thread dpsim-models/src/Signal/ExciterStatic.cpp
Comment thread docs/hugo/content/en/docs/Models/Synchronous Generator Regulators/index.md Outdated
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
@leonardocarreras leonardocarreras marked this pull request as draft June 8, 2026 12:11
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
Signed-off-by: Leonardo Carreras <leonardo.carreras@eonerc.rwth-aachen.de>
@leonardocarreras leonardocarreras marked this pull request as ready for review June 8, 2026 13:04

@georgii-tishenin georgii-tishenin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing the comments!

@leonardocarreras leonardocarreras merged commit 70ae13b into sogno-platform:master Jun 8, 2026
29 of 31 checks passed
@github-project-automation github-project-automation Bot moved this to Done in DPsim Jun 8, 2026
@leonardocarreras leonardocarreras deleted the feature-exciter branch June 8, 2026 14:25
leonardocarreras added a commit that referenced this pull request Jun 10, 2026
…ython bindings (#490)

## Summary

Connects `Signal::TurbineGovernorType1` (the Milano 2010 governor +
servo + reheat model) to the generator base classes, following the same
pattern as the exciter #402 and PSS #486 PRs.

- Added `addGovernor(shared_ptr<TurbineGovernorType1>)` to both
`Base_SynchronGenerator` and `Base_ReducedOrderSynchronGenerator`, with
a null guard; the old scalar `addGovernor(Ta, Tb, …)` now logs a
deprecation warning
- `EMT_Ph3_SynchronGeneratorDQTrapez` and `EMT_Ph3_SynchronGeneratorVBR`
use the new path when a `TurbineGovernorType1` is attached, falling back
to the legacy `TurbineGovernor` otherwise
- Python bindings for `initialize()` and `add_governor()` on both
ReducedOrder generator variants
- Hardened the model: zero-division guards in `setParameters()`, `_prev`
variables initialised in `initialize()`, state variables moved to
`private:`
- Docs: added the Turbine Governor Type 1 section with block diagram and
equations; fixed an upstream bug where the discrete τ_m equation
referenced T3 instead of T5

## What comes next

- `TurbineGovernorType1` bundles governor, servo, and reheat into a
single class, so it fits naturally into the existing `addGovernor()`
hook without needing new abstractions.
- The next PR introduces `Base::Governor` and `Base::Turbine` together
with the first models that actually split those two concerns: a steam
governor and a steam turbine as separate, chainable objects. The
separation matters because different turbine types (steam, hydro) share
the same governor interface, so it makes sense to model them
independently rather than bundling everything together as done here.
- A final PR then adds the hydro variants, which reuse the same base
classes and generator hooks without any further infrastructure changes.

### Other comments
This is the continuation of what was part of the controllers work from
@martinmoraga at ACS.
leonardocarreras added a commit that referenced this pull request Jun 12, 2026
## Summary

Adds a steam turbine governor and a three-stage steam turbine (HP/IP/LP)
as separate objects, plus the Base::Governor and Base::Turbine
interfaces.

- New models: SteamTurbineGovernor (lead-lag + integrator with rate
limiter) and SteamTurbine (HP/IP/LP stages)
- addGovernorAndTurbine() on both SG base classes, same pattern as
addExciter() (#402) and addPSS() (#486)
- DQTrapez and VBR generators step the new chain when attached, fall
back to TurbineGovernorType1 otherwise
- Python bindings for set_parameters(), initialize_states(), and
add_governor_and_turbine()
- Docs with block diagrams and equations for both models

## What comes next

Next PR adds the hydro variants using the same base classes.

## Other comments

Continuation of the controllers work from @martinmoraga at ACS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants