The application relates to the technical field of
optimal scheduling of
distributed power grids, and specifically discloses a two-stage
optimal scheduling method for
distributed power grids based on a probabilistic
power flow and a WOA-PPSO
algorithm, which comprises the following steps: constructing a probabilistic
power flow model, calculating the probability distribution characteristics of node
voltage and
line flow in the
power grid containing
wind power, photovoltaic power and load randomness based on the semi-invariant method and
Gram-Charlier
series expansion. The application introduces the probabilistic
power flow modeling into the optimization constraint of the scheduling
algorithm, and responds to the uncertainty that may exist in the
power grid in real time; by constructing a two-stage scheduling
algorithm, the
global optimal scheduling plan is generated based on the WOA algorithm in the day-ahead scheduling, and the deviation caused by the uncertainty is quickly responded on the basis of the
optimal scheduling plan in the real-time scheduling of the day; and the result of the day-ahead scheduling is taken as the reference starting value of the real-time scheduling of the day, and the
projection method is combined with the PSO algorithm to construct the PPSO algorithm, so that the solving speed in the real-time scheduling of the day is maximally improved.