Hello,
I am currently designing an open-loop control system using an average inverter model on an HIL RT Box, where the plant is modeled on the RT Box and the open-loop controller is implemented on an STM32G474RE. The inverter is designed to inject 100 A of current into the grid by regulating the reference voltage Uref. The offline simulation results shown in Fig 1 indicate that the inverter current injected into the grid matches the design target.
In addition, I performed an HIL-to-HIL simulation, where the plant is modeled on RT Box 2 Core 0 and the controller is implemented on RT Box 2 Core 1. The results shown in Fig 2 indicate that the injected inverter current is slightly different from the offline simulation results, but is acceptable. However, when I performed the simulation using the RT Box together with the STM32G474RE, the results became significantly different, as shown in Fig 3.
How could the discrepancy between the HIL-to-HIL simulation and the RT Box–STM32 simulation?
Fig 1. Offline Simulation
Fig 2. HIL-to-HIL Simulation
Fig 3. RT Box-STM32 Simulation
Here model that i am using for RT Box-STM32 :
Open_Loop_Average_Model_Inverter.plecs (100.9 KB)


