In this paper, a new control algorithm is proposed to achieve optimal dynamic performance for dc-to-dc converters under a load current change and for a given set of circuit parameters, such as the output inductor, output capacitor, switching frequency, input voltage, and output voltage. Using the concept of capacitor charge balance, the proposed algorithm predicts the optimal transient response for a dc-to-dc converter during a large signal load current change. During steady state operation, conventional current mode proportional-integral-derivative (PID) is used. During large signal transient conditions, the new control algorithm takes over. The equations needed to calculate the transient time and the required duty cycle series are presented. By using the proposed algorithm, the optimal transient performances, including the smallest output voltage overshoot/undershoot and the shortest recovery time, is achieved. In addition, since the large signal dynamic response of the power converter is successfully predicted, the large signal stability is guaranteed. Experimental results show that the proposed method produces superior dynamic performance over a conventional current mode PID controller.