A large number of distributed energy sources connected to the grid will cause certain disturbances to the stability of the grid system. We consider the random characteristics and establish a dynamic simulation framework for the active power distribution system suitable for the integral projection algorithm. The article uses an internal integrator to solve the fast dynamic process with explicit and implicit Euler methods in small steps. In the calculation process, this method can effectively consider the influence of events such as fault disturbance on the grid connection of the distributed power grid. Numerical analysis and simulation tests verify the effectiveness of this algorithm.