A system, method and apparatus for controlling boost and buck-boost converters using input-output linearization and leading-edge modulation is provided. The controller includes a summing circuit connected to the converter to create a third voltage representing a difference between the first voltage and the second voltage. A gain circuit is connected to the summing circuit to adjust the third voltage by an appropriate gain. A modulating circuit is connected to the gain circuit, the converter, the first voltage, the second voltage and the second current to create a control signal based on the first voltage, the second voltage, the adjusted third voltage, the fourth voltage and the first current. The control signal is used to control the converter. Typically, the first voltage is a converter output voltage, the second voltage is a reference voltage, the fourth voltage is a converter input voltage, and first current is a converter inductor current.