If the capacity of a hydropower unit in a certain area is several times the capacity of the thermal power unit, the characteristics of the hydropower unit speed regulation system have a great impact on maintaining the stability of the power grid frequency, according to which this paper builds a water-fire hybrid power system based on simulink, and subdivides the thermal power unit into two categories: no reheating unit and no reheating unit, so as to accurately simulate the role played by different types of units in the water-fire hybrid system in the frequency regulation process. In order to achieve a better FM effect, the text first improves the ordinary particle swarm algorithm to solve the problem of "precociousness"; Secondly, the traditional PID parameters are optimized with the improved particle swarm algorithm, and finally the quantization factor and scale factor in the fuzzy PID are optimized. The above-mentioned fuzzy PID control strategy is applied to the influence of different primary frequency regulation effects on the frequency stability of the system when the capacity proportion of the hydropower unit is different. From the simulation results, it can be seen that the fuzzy PID controller optimized by the improved particle swarm has the characteristics of fast response, good stability, small oscillation amplitude and strong anti-interference ability. And the larger the proportion of hydropower unit capacity, the more prone to more large oscillations in the system frequency, which is not conducive to the recovery of frequency, but can improve the stability of the system frequency.