I am trying to model a MMC VSC HVDC Converter using the Converter Model Type 4 according to CIGRE B4.57.
This is the approach of the Detailed Equivalent Circuit, also described by U. Gnanarathna, A. Gole, R. Jayasinghe in "Efficient Modelling of MMC HVDC Converters on EMT Simulation Programs", 2010.
In a first step I created a module which converts a simplified model based on two-value resistive switching devices into a voltage source in series with a resistance, see the appended image.
As an input however, a historic voltage (V_c_h) are needed. I am relatively new to PSCAD and therefore my question is: How can I store the voltages of the submodules from the previous time step and use them to compute the voltage and resistance in the following time step?
Any advice is highly appreciated.