In response to the complex design of loop compensation for traditional Buck type switching regulated power supply,this paper proposes a control strategy based on digital PID algorithm for loop compensation.On the basis of mod-eling and analyzing the Buck type converter,the digital PID algorithm is added for improvement,and the system before and after the improvement is modeled and analyzed.The simulation results show that the phase margin of the designed system is 78.5°,the crossing frequency is 56 kHz,and the relevant parameters meet the preset requirements.In the proto-type testing stage,the output voltage is set to 20 V,the no-load output ripple is 26 mV,and the load adjustment rate and other indicators met general requirements.Relevant experiments have proven the feasibility of this method,which can be applied to Buck type switch regulated power supply scenarios as needed to improve the loop and output stability.