Hardware-in-the-Loop Test Platform for Photovoltaic High-Frequency Controllers Based on UREP + FPGA
Real-time constraints prevent CPU-based electromagnetic transient simulators from accurately sampling high-frequency PWM signals at microsecond step sizes, leading to insufficient HIL test precision and even instability of the closed-loop system. This paper introduces a PWM averaging technique to construct a novel UREP (electromagnetic transient real-time simulator) + FPGA hardware-in-the-loop test platform. To achieve accurate PWM acquisition, the FPGA's nanosecond-level clock resolution increases the number of sampling points within a single switching period from a few points under microsecond simulation steps to several thousand points. The FPGA implements fixed-step PWM averaging, converting discrete switching states into continuous duty cycles that serve as control signals for the UREP-side inverter average model. This technique avoids frequent topology updates and state matrix reconstructions triggered by switching events, reduces high real-time computational resource consumption, improves numerical stability of the in-loop system, and enhances HIL test accuracy under large-step real-time constraints. Simulation cases and industrial-grade controller HIL tests verify the platform's feasibility and accuracy. The platform provides an efficient, reproducible verification scheme for photovoltaic controller control strategies and offers a feasible technical path for domestic electromagnetic transient real-time simulation platforms to conduct high-frequency controller HIL tests.