In this paper, the stability of DC-DC converter in the DC microgrid is studied. A linear switching system model is formulated, which is based on the switching action of the converter. A new switching control method based on the characteristics of PWM wave is proposed, which depends both on time and system state. First, the switching time within each period is determined by the system state error. The switching system must be switched at the end of the period. Then, the duty cycle of the period is achieved by summing the activation time of the subsystems within the period. Simulation and experiment comparison show that this method limits each switching cycle to only one switching, which can reduce the switching frequency of the system. It can respond quickly when the load demand fluctuates. The output voltage is stabilized at the desired value within the ± 1% . The superiority of the switching control method is evaluated. The implementation of this method could reduce the loss of the DC microgrid to a certain extent and improve its stability.