We propose a new algorithm to control DC-DC converters. The new algorithm is based on Particle Swarm Optimization. The proposed controller does not require any parameter search like classical controllers. We compare the proposed controller with the PI Anti-Windup controller. The proposed controller exhibits better performance in terms of settling time and steady state oscillations.