This paper presents a non-linear method based on sum-of-squares (SOS), to determine the stability of equilibrium points for the Buck, Boost, Buck-Boost and non-inverter Buck-Boost converters. These converters share a similar structure with a PI controller to regulate the output voltage. A quadratic Lyapunov function is proposed in all cases, and the conditions for stability are evaluated using convex optimization based on SOS models. The methodology is useful for academic purposes but also in practical applications like DC microgrids. Simulation results shows the advantages of the proposed method.