The invention discloses a shared integral term PID dual-closed-loop controller for a PWM digital power supply. The dual-closed-loop controller comprises a dual-closed-loop PID control module, wherein the dual-closed-loop PID control module comprises an error module, a proportional term calculation module, a differential term calculation model, an integral term calculation module and an output module; the error module is used for measuring and calculating
voltage error and current error in each sampling period, and transmitting the error to the proportional term calculation module, the differential term calculation model and the integral term calculation module separately; the proportional term calculation module is used for measuring and calculating the
voltage loop proportional term and the
current loop proportional term of the sampling period; the differential term calculation model is used for measuring and calculating the
voltage loop differential term and the
current loop differential term of the sampling period; the integral term calculation module is used for performing assignment on the shared integral term integral factor according to the size of the
voltage loop proportional term and the
current loop proportional term of the sampling period, and calculating the value of the shared integral term according to the integral factor; the adjustment amount of the measured and calculated
voltage loop or current loop is output by the output module; and a DC / DC power supply is controlled through PWM. By virtue of the shared integral term PID dual-closed-loop controller, an overshoot phenomenon of the PWM digital switch power supply can be effectively avoided, and high dynamic characteristic and
high frequency bandwidth are achieved.