Apparatus for regulating the delivery of power from a DC power source to a load, said apparatus comprising:
- (a) a switch mode DC-DC power supply controllable in response to a pulse width modulation (PWM) signal having a controllable PWM on-time, said power supply comprising:
- (i) an input connectable with said source for receiving power from said source;
- (ii) an output connectable with said load for delivering power to said load;
- and,
- (iii) a PWM input for receiving said PWM signal;
- (b) a voltage sensor operatively connected to the output of said power supply for sensing output voltage and for providing a first control signal corresponding to the voltage sensed;
- (c) a current sensor operatively connected to the output of said power supply for sensing output current and for providing a second control signal corresponding the current sensed;
- and,
- (d) a controller operatively connected to said PWM input and to said sensors for receiving said first and second control signals and for providing said PWM signal to said power supply, said controller comprising:
- (i) selection means for selecting whether to control said power supply by tracking said output voltage or by tracking said output current;
- (ii) signal processing means for repetitively computing from said first control signal an average voltage value representative of average voltage at said output of said power supply;
- (iii) means for comparing said average voltage value as computed on each repetition with said average voltage value as computed on each immediately preceding repetition;
- (iv) signal processing means for repetitively computing from said second control signal an average current value representative of average current at said output of said power supply;
- (v) means for comparing said average current value as computed on each repetition with said average current value as computed on each immediately preceding repetition;
- (vi) means responsive when said selection means has selected output voltage tracking for increasing said PWM on-time if said average voltage value as computed on a given repetition is greater than said average voltage value as computed on an immediately preceding repetition, and for decreasing said PWM on-time if said average voltage value as computed on a given repetition is less than said average voltage value as computed on an immediately preceding repetition;
- and,
- (vii) means responsive when said selection means has selected output current tracking for increasing said PWM on-time if said average current value as computed on a given repetition is greater than said average current value as computed on an immediately preceding repetition, and for decreasing said PWM on-time if said average current value as computed on a given repetition is less than said average current value as computed on an immediately preceding repetition.