Transient Dynamics in Grid Interface Converters using romAI & PSIM


Problem Statement
The increment of renewable energy sources has introduced issues that concern the integration of them in the electric grid without influencing its stability. This new challenge on the way to electrification has created a need for capturing transient phenomena in a short - time simulation. The further integration of renewable energy sources (RES) can strain the grid's ability to manage transient phenomena, as the system's "inertia" is reduced due to the absence of synchronous generators and large rotating masses.
To address this, various techniques have been proposed to create 'virtual inertia' at the converter level, aligning with future grid regulations. Despite improvements in renewable energy and storage, the inertia issue persists. Accurately resolving the transient dynamics of multiple converters operating together is essential. Grid-scale simulation tools that use average models or abstract switching cannot fully address this. Our goal is to leverage AI to train a neural network that captures dynamics using switching simulation data, thereby indirectly incorporating higher fidelity switching effects into the final model.
This article discusses the use of Artificial Intelligence, specifically romAI, to represent the dynamic, time-domain output of a DC/AC converter.
Initially, we will present the DC/AC converter, which transforms a DC voltage signal into an AC voltage signal at a frequency of 50Hz.
In terms of inverter control, our objective is to manage the current flowing through the three-phase load. To accomplish this, we need to convert the a-b-c system to the d-q system. The currents that require to be controlled are Id and Iq.
When we run the simulation, we can record all the switching stages. However, this process can be time-consuming, especially when multiple converters are connected. To address this, we will try to create a neural network trained to extract the currents based on the current references. This approach aims to determine the current output without the need for complex simulations.
Training Data
To train the neural network, we require extensive data that captures the inverter's behavior under various conditions. We use Hyperstudy to generate data for different combinations of Id_ref, Iq_ref, and Sum_step (Sum_step is the increment added to the references during simulation). If you have not worked with Hyperstudy before, you should read the article here first.
Decision Variables:
- Id_ref: (min: -35A, max: 35A)
- Iq_ref: (min: -35A, max: 35A)
- Sum_step: (min: -15A, max: 15A)
Notes:
- Sum_step is not added to both Id_ref and Iq_ref simultaneously.
- In order to be able to create a lot of segments for training, you should adjust the print step at the PSIM simulation control. At this example we use 70 segments
- For better transient prediction, we focus on creating a lot of transient situations in our training data
- The maximum output current is determined by the following way
Calculating Max Current:
Maximum current is limited by the following math expression:
On our way to calculate the max current, we will calculate the maximum inverter’s output voltage.
We are using Space Vector Pulse Width Modulation (SV PWM), so the fa_peak is equal to 2/Sqrt(3).
So,
Afterwards, we make a PSIM simulation that has as an input the maximum inverter’s output voltage and the filter and the load of the initial circuit.
The maximum current we calculate form the above equation is equal to 48 Amperes, and it should be a constraint in Hyperstudy when creating training data.
Neural Network Training
To develop the neural network, we will utilize romAI. If you have not experimented with neural network training before, you should read the article here as a first step. After consolidating all the training data extracted from HyperStudy, we filter it in the pre-processor tab with a cut-off frequency of 5kHz.
Subsequently, we export the data to the builder and we train the model using the following parameters:
- Hidden Layers: [20, 20,20,20]
- Epochs: 170
- Test Split Ratio: 0.0005
- Regularization Coefficient: 1e-6
- Data cut-off filtering frequency: 5kHz
Inputs:
- Id_ref
- Iq_ref
- Id_derivative
- Iq_derivative
Outputs:
- Id
- Iq
Post Processing
Here, we can observe the results of the predicted Id and Iq compared to the actual dataset. The romAI model output does not account for switching events. However, the training data used for the model include switching phenomena. This is why the romAI model can capture the overshoots and peaks of the actual data.
Twin Activate Deployment
After creating the romAI model, we have to validate our romAI model by comparing its output with the PSIM model. romAI can be deployed into a system level simulator like Twin Activate or other tools that support FMU format. PSIM can also be deployed in Twin Activate. At the attached Twin Activate model we compare the outputs of the romAI with the PSIM ideal-switching and average inverters models.
The romAI output closely matches the average model's response at steady state. During transient oscillations, romAI appears to outperform the average model, resembling a filtered version of the switching model's response
The average model tends to underestimate overshoots, whereas the romAI model captures them more effectively. If we didn't filter the input data, the romAI model might capture overshoots and ripples even better, but this would also complicate the training process. Therefore, there's a tradeoff between accuracy and the effort required for training.
Conlusion
The romAI model is designed to integrate the strengths and benefits of various inverter models, and can create fast solving models for multi level and complex converter topologies that cannot easily be represented by average modelling in a transient simulation. By combining the advantages of different inverter models, the romAI model aims to provide a more versatile and efficient solution.
In the near future, the need to study the requirements arising from the development of renewable energy sources will continuously increase. Artificial intelligence can provide solutions and tools that make the study and development of these sources easier and more accurate. Feel free to share ideas about applications of artificial intelligence that we could implement in the future, which could obviously have some engineering value.
Useful links
Automating PSIM with Hyperstudy vs Scripting
Training a neural network with PSIM data using romAI