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

Linear SSN #175

Merged
merged 4 commits into from
Oct 10, 2024
Merged

Linear SSN #175

merged 4 commits into from
Oct 10, 2024

Conversation

dinkelbachjan
Copy link
Contributor

@dinkelbachjan dinkelbachjan commented Jan 17, 2023

This branch focusses on the implementation of a State Space Nodal (SSN) simulation approach for real time analysis within the EMT domain limited to linear components. The approach is based on the paper “A Combined State-Space Nodal Method for the Simulation of Power System Transients” ,doi: 10.1109/TPWRD.2010.2090364 of Dufour et al. .

Linear State Space Nodal models of basic components and linear circuits like an RLC circuit are implemented as single SSN components. To achieve this a state space representation for the electrical element or circuit is derived. Those equations are discretized using the trapezoidal rule of integration. The system of linear equations is manipulated such that current states in the output equations of the state space model can be replaced with known terms, i.e. state values of the previous simulation step and input quantities. Previous states are additionally stored within the SSN component and updated when the system has been solved for the current time step. Now the output equations (nodal equations for V-Type SSN-Groups, mesh equations for I-Type SSN-Groups) can be used in the Modified Nodal Analysis approach by the already implemented stamping and task systems.

Because of that the simulation sequence and structure does not have to be changed for these components, only the used methods itself differ in the executed calculations and the quantity updates for the internally stored states.

Regarding general changes not limited to the SSN approach, a setter method (setParameters) has been added for the EMT::Ph3::CurrentSource. The EMT::Ph3::CurrentSource class and the new EMT::Ph3::SSN::Full_Serial_RLC class were made usable within the pybind python module.

@sonarcloud
Copy link

sonarcloud bot commented May 22, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 59 Code Smells

0.0% 0.0% Coverage
22.3% 22.3% Duplication

Copy link
Contributor

@gnakti gnakti left a comment

Choose a reason for hiding this comment

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

Copy link

sonarcloud bot commented May 21, 2024

@georgii-tishenin georgii-tishenin marked this pull request as draft June 27, 2024 08:31
Copy link

sonarcloud bot commented Jun 27, 2024

+ add "EMT_Ph3_SSN_Inductor.h" and "EMT_Ph3_SSN_Inductor.cpp". For the inductor, the resulting SSN model is identical to the resistive companion model.
+ add "EMT_Ph3_SSN_Capacitor.h" and "EMT_Ph3_SSN_Capacitor.cpp". For the capacitor, the SSN model results in an additional mesh equation similar to a voltage source, expanding the dimensions of the system matrix by 1x1. The resistive companion model should be used instead.
+ add "EMT_Ph3_SSN_Full_Serial_RLC.h" and "EMT_Ph3_SSN_Full_Serial_RLC.cpp". The implemented RLC circuit consists of R, L and C , completely wired in series. Instead of four required nodes for those three components, the combined SSN model only requires two, reducing the dimensions of the system matrix. All three implemented SSN components can be used together with RC component models and with the already implemented MNA Solver classes.

* modify "Components.h" to include "EMT_Ph3_SSN_Capacitor.h", "EMT_Ph3_SSN_Inductor.h" and "EMT_Ph3_SSN_Full_Serial_RLC.h"
* modify "dpsim-models/src/CMakeLists.txt" to include "EMT_Ph3_SSN_Capacitor.cpp", "EMT_Ph3_SSN_Inductor.cpp" and "EMT_Ph3_SSN_Full_Serial_RLC.cpp"

Signed-off-by: Marvin Tollnitsch <marvin.tollnitsch@rwth-aachen.de>
+ add implementation of "setParameters(MatrixComp currentRef, Real srcFreq = 50.0)" method in "EMT_Ph3_CurrentSource.h". Arguments are reference current (complex static phasor, amplitude and initial angle) and frequency

* rename "voltageRef" parameters to "currentRef" in all "setParameters()" method declarations in "EMT_Ph3_CurrentSource.h"
* update "clone()" method to use the newly implemented "setParameters()" method in "EMT_Ph3_CurrentSource.cpp"

Signed-off-by: Marvin Tollnitsch <marvin.tollnitsch@rwth-aachen.de>
+ add EMT::Ph3::CurrentSource and EMT::Ph3::SSN::Full_Serial_RLC as classes in "EMTComponents.cpp"

* apply clang-format to "EMTComponents.cpp"

Signed-off-by: Marvin Tollnitsch <marvin.tollnitsch@rwth-aachen.de>
+ add "EMT_Ph3_R3C1L1CS1_RC_vs_SSN.cpp" which contains a linear circuit implemented using resistive companion component models in one simulation and the new SSN component models in another simulation for comparison
+ add "EMT_Ph3_RLC1VS1_RC_vs_SSN.cpp" which contains a linear RLC circuit implemented using resistive compantion component models in one simulation and the new SSN component model in another simulation for comparison
+ add "EMT_Ph3_compare_RC_SSN.ipynb". This notebook simulates the circuits in the files mentioned above to show, compare and assert the results (SSN against RC)

* adjust "dpsim/examples/cxx/CMakeLists.txt" to include "EMT_Ph3_R3C1L1CS1_RC_vs_SSN.cpp" and "EMT_Ph3_RLC1VS1_RC_vs_SSN.cpp"

Signed-off-by: Marvin Tollnitsch <marvin.tollnitsch@rwth-aachen.de>
Copy link

sonarcloud bot commented Sep 30, 2024

@gnakti gnakti marked this pull request as ready for review October 8, 2024 08:07
@m-mirz m-mirz merged commit d66f826 into master Oct 10, 2024
18 checks passed
@m-mirz m-mirz deleted the ssn-linear branch October 10, 2024 18:14
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.

5 participants