Skip to content

Decoupling ITM#423

Merged
leonardocarreras merged 52 commits into
sogno-platform:masterfrom
pipeacosta:decoupling-itm
Jun 29, 2026
Merged

Decoupling ITM#423
leonardocarreras merged 52 commits into
sogno-platform:masterfrom
pipeacosta:decoupling-itm

Conversation

@pipeacosta

@pipeacosta pipeacosta commented Nov 21, 2025

Copy link
Copy Markdown
Contributor

This PR implements new decoupling elements based on the Ideal Transformer Model (ITM) for exemplifying co-simulation scenarios.

This PR renames the Python API (dpsimpy) function add to add_component.

@pipeacosta pipeacosta self-assigned this Nov 21, 2025
@pipeacosta pipeacosta added the enhancement New feature or request label Nov 21, 2025
@leonardocarreras leonardocarreras moved this to In Progress in DPsim Nov 21, 2025
@codecov

codecov Bot commented Nov 21, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.89189% with 334 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.64%. Comparing base (2732152) to head (154dd85).

Files with missing lines Patch % Lines
.../src/Signal/DecouplingIdealTransformer_EMT_Ph1.cpp 0.00% 112 Missing ⚠️
...im/examples/cxx/Circuits/SP_ITM_withPiLine_Ph1.cpp 0.00% 101 Missing ⚠️
.../src/Signal/DecouplingIdealTransformer_EMT_Ph3.cpp 84.61% 18 Missing ⚠️
...s/src/Signal/DecouplingIdealTransformer_DP_Ph1.cpp 86.84% 15 Missing ⚠️
...s/src/Signal/DecouplingIdealTransformer_SP_Ph1.cpp 86.84% 15 Missing ⚠️
...models/Signal/DecouplingIdealTransformer_EMT_Ph1.h 0.00% 12 Missing ⚠️
...m-models/src/DP/DP_Ph1_ControlledVoltageSource.cpp 82.60% 12 Missing ⚠️
...m-models/src/SP/SP_Ph1_ControlledCurrentSource.cpp 78.18% 12 Missing ⚠️
...m-models/src/SP/SP_Ph1_ControlledVoltageSource.cpp 83.33% 11 Missing ⚠️
...m-models/src/DP/DP_Ph1_ControlledCurrentSource.cpp 84.31% 8 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
+ Coverage   67.40%   67.64%   +0.23%     
==========================================
  Files         426      443      +17     
  Lines       25995    26917     +922     
  Branches    13217    13672     +455     
==========================================
+ Hits        17523    18209     +686     
- Misses       8471     8621     +150     
- Partials        1       87      +86     

☔ 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.

@pipeacosta
pipeacosta force-pushed the decoupling-itm branch 2 times, most recently from 37bcc73 to 3df984d Compare November 24, 2025 12:39
@pipeacosta
pipeacosta marked this pull request as ready for review November 25, 2025 11:57
@leonardocarreras leonardocarreras moved this from In Progress to Ready for Review in DPsim Nov 26, 2025

@leonardocarreras leonardocarreras 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.

Hi Andres! Thanks for the PR! This is just a quick first comment. We can discuss more and see how to integrate it.

Comment thread dpsim-models/include/dpsim-models/EMT/EMT_Ph3_RXLoad.h Outdated
Comment thread dpsim-models/src/SystemTopology.cpp
Comment thread dpsim/examples/cxx/CIM/EMT_WSCC_9bus_split_decoupled_node.cpp Outdated
Comment thread dpsim-models/src/EMT/EMT_Ph3_RXLoad.cpp Outdated
Comment thread dpsim-models/src/EMT/EMT_Ph3_RXLoad.cpp Outdated
Comment thread dpsim-models/include/dpsim-models/EMT/EMT_Ph3_RXLoad.h Outdated
Comment thread dpsim-models/include/dpsim-models/Signal/DecouplingIdealTransformer_EMT_Ph1.h Outdated
Comment thread dpsim/src/pybind/main.cpp

@leonardocarreras leonardocarreras 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.

Hi Andres! Please have a look to the comments! Thanks for the PR!

@pipeacosta
pipeacosta force-pushed the decoupling-itm branch 3 times, most recently from cd5e8de to d0cb95d Compare June 26, 2026 07:44

@leonardocarreras leonardocarreras 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.

Hi Andres! Thanks for updating your PR!

Here some suggestions/questions:

  • The ITM variants have internal virtual nodes and 4 sub-components (mRes1, mRes2, mVoltageSrc, mCurrentSrc), which is exactly what CompositePowerComp is designed for. Using CompositePowerComp would also fix the missing virtual node registration bug. This could also be a future refactor.
  • Please do not use the copyright block and instead use the SPDX headers.
/* SPDX-FileCopyrightText: 2026 Institute for Automation of Complex Power Systems, EONERC, RWTH Aachen University
 * SPDX-License-Identifier: MPL-2.0
 */
  • Breaking changes need to be explicitly mentioned (Python API case of SystemTopology.add)

Please feel free to propose a different way.

Comment thread dpsim-models/src/EMT/EMT_Ph3_RXLoad.cpp Outdated
Comment thread dpsim-models/src/Signal/DecouplingIdealTransformer_DP_Ph1.cpp
Comment thread dpsim-models/src/Signal/DecouplingIdealTransformer_DP_Ph1.cpp Outdated
Comment thread dpsim-models/src/DP/DP_Ph1_ControlledVoltageSource.cpp Outdated
Comment thread dpsim-models/src/DP/DP_Ph1_ControlledVoltageSource.cpp Outdated
Comment thread dpsim-models/src/Signal/DecouplingIdealTransformer_DP_Ph1.cpp Outdated
Comment thread dpsim-models/src/Signal/DecouplingIdealTransformer_DP_Ph1.cpp Outdated
Comment thread dpsim-models/src/Signal/DecouplingIdealTransformer_EMT_Ph1.cpp
Comment thread docs/hugo/content/en/docs/Models/Ideal Transformer Model/index.md Outdated
Comment thread dpsim/src/pybind/main.cpp
@pipeacosta
pipeacosta force-pushed the decoupling-itm branch 2 times, most recently from d73ae11 to e1c4339 Compare June 27, 2026 13:21
Comment thread dpsim-models/src/Signal/DecouplingIdealTransformer_EMT_Ph1.cpp Outdated
Comment thread dpsim/examples/cxx/Circuits/SP_ITM_withPiLine_Ph1.cpp Outdated
@pipeacosta
pipeacosta force-pushed the decoupling-itm branch 3 times, most recently from b3cce97 to 2a41493 Compare June 29, 2026 11:39
@leonardocarreras
leonardocarreras self-requested a review June 29, 2026 13:13
…ndTerminals.

Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
- Initialize interface signals as MatrixComp instead
  of Matrix in DP_Ph1_ControlledVoltageSource
- Set correct size of extrapolation ring buffers
  in DecouplingIdealTransformer_DP_Ph1 initialization

Signed-off-by: pipeacosta <pipeacosta@gmail.com>
…e method.

Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
…ed power.

Signed-off-by: pipeacosta <pipeacosta@gmail.com>
Signed-off-by: pipeacosta <pipeacosta@gmail.com>
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