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

VILLASfpga cosimulation development #325

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

n-eiling
Copy link
Contributor

@n-eiling n-eiling commented Nov 11, 2024

  • add a real time data logger
    This writes simulation results to memory and only dumps to a file when the simulation ends. It allocates a buffer that is attributes*simulation duration/time step long - so this only works for relatively short simulations.
  • adds EMT::Ph3::ControlledVoltageSource and EMT::Ph3::ControlledCurrentSource. The existing sources EMT::Ph3::VoltageSource and EMT::Ph3::CurrentSource only allow setting RMS voltages and derives the individual phase voltages from that. This cannot be used for PHIL or Co-Simulations where we need the set each phase voltage individually. The existing voltage source can also not be easily adapted to support both, so I created a new model (RTDS and Simulink also have a separate model for this so it makes sense).
  • modifies EMT::Ph3::RXLoad to be able to implement a series R-L load instead of only a parallel R-L load. The series load is needed for the WSCC 9 bus model.
  • adds FPGACosimulation, an example of using dpsim-villas to build a co-simulation where DPsim simulates load connected to bus 5 in a WSCC 9 bus model.
  • add FPGACosim3PhInfiniteBus, an example that implements an infinite bus to be connected with a load in another simulator.
  • make logging step times optional, as this slows down the simulation quite a bit when running in real time.
  • None of the changes should break existing code, because everything is again optional and the default behavior is the old behavior.

@n-eiling n-eiling force-pushed the villas-fpga-cosimulation branch from c82b154 to b5c3d86 Compare November 11, 2024 09:01
@stv0g stv0g changed the title Villas FPGA cosimulation development VILLASfpga cosimulation development Nov 13, 2024
@stv0g
Copy link
Contributor

stv0g commented Nov 13, 2024

@n-eiling Quick nit: please make sure to use the correct capitalization of "VILLASfpga" (see title)

@n-eiling
Copy link
Contributor Author

VILLASfpga does not exist anymore. I thought about VILLASnode nodetype fpga :)

@n-eiling
Copy link
Contributor Author

The CI is failing because of missing pybind interfaces. I'll try to fix it in the next days - but the rest should not change anymore.

adds a new data logger interface for simulation result logging. Besides the existing DataLogger, the interface is implemented by the new RealTimeDataLogger that preallocates a buffer for the results and only writes them after the simulation finished.
This does not break existing code.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
This adds FpgaCosimulation.cpp, an example for a cosimulation with another simulator running a WSCC 9 bus and DPsim running the load connected to bus 5.
This also modifies EMT::Ph3::RXLoad to allow it to represent an R-L series load rather than only a parallel load.
It also adds EMT::Ph3::ControlledVoltageSource, a voltage source with EMT setpoints for feeding interface data into the DPsim simulation.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
…PHIL and co-simulation

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
…ake simulation more stable

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
…iles.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
@n-eiling n-eiling force-pushed the villas-fpga-cosimulation branch from 66fbda2 to 9e14cac Compare November 20, 2024 09:36
@n-eiling n-eiling requested a review from gnakti as a code owner November 20, 2024 09:36
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
…n when drawing the system topology.

Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Signed-off-by: Niklas Eiling <niklas.eiling@eonerc.rwth-aachen.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants