In this paper, for the power system component protection program, taking generator protection as an example, using MATLAB software to simulate the access system of 9mw wind turbine. The main function of the program is to calculate the short circuit of the power system network. The calculation results are judged by the protection setting basis mentioned above. When it is judged as system fault, in order to avoid the loss of power system components The wind turbine should be cut off immediately. In Figure 5-3, the simulation model uses Stacom to compensate the reactive power of the system for 9mw wind farm, and it is connected to the system after passing through 25kV bus.Figure 5-5 shows the simulation results of power system component protection. Since the short-circuit setting point is at the outlet side of the wind turbine, the corresponding wind turbine will trip after the fault occurs. As shown in the red line in Figure 5.5, the wind turbines of the other two branches will also have a corresponding fluctuation due to the fluctuation of active and reactive power in the wind farm, but after a period of time, it will return to the original level The corresponding trip protection will not be carried out due to the occurrence of short-circuit fault. Other wind turbines will continue to operate, which ensures that there will be no large-scale wind turbine trip protection when there is a short circuit at the outlet side of the wind turbine in the wind farm, so as to ensure the safe and stable operation of the wind farm.