The application discloses a data-driven
optimal control method for a grid-connected
inverter. The method comprises the following steps: constructing a DeePC optimization controller of the grid-connected
inverter on the grid side; acquiring a
data matrix of the grid-connected
inverter in a preset historical period and an initial trajectory after a preset adjacent period, inputting the controller, setting parameters for different control targets and types of the grid-connected inverter, outputting an optimal input data sequence after
processing, generating a sinusoidal
pulse width modulation wave
signal and acting on the grid-connected inverter, and realizing data-driven
optimal control. The method can automatically perceive and adapt to the dynamic characteristics of the actual
power grid through real-
time data-driven predictive control, can present or enhance the control behavior of the grid-constructing or grid-following inverter by modifying the cost parameters, can realize multi-mode flexible, optimal and coordinated control, has excellent dynamic response and steady-state performance, is beneficial to safe and stable operation, and improves the ability to adapt to complex and variable operating conditions and
power grid strength.