# Patent

## Title
Adaptive slope-compensation module and method thereof

## Abstract

An adaptive slope-compensation method is applied for a switch-mode power supply. The switch-mode power supply has a power switch, and an inductor coupled to an input power. The power switch controls the inductor storing energy or releasing energy to generate an output voltage. The adaptive slope-compensation method includes detecting an inductor current passing through the inductor and to generate an inductor-current detecting voltage, detecting a duty cycle of the power switch, detecting a voltage variation of the inductor-current detecting voltage when the power switch is turned on, generating a slope-compensation signal according to the voltage variation and the duty cycle, and adjusting the timing of turning the power switch on or off. In this way, even if the operation conditions of the input power and the output voltage change, the system still can quickly response and does not generate sub-harmonic oscillation.

## Background
BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention is related to an adaptive slope-compensation module, and more particularly, to an adaptive slope-compensation module applied for a switch-mode power supply.
2. Description of the Prior Art
In general, when the duty cycle of the power switch in a switch-mode power supply is over 0.5, sub-harmonic oscillation may be induced. That is, the switch-mode power supply may oscillate with a half of the switching frequency. This problem is often solved by a slope-compensation mechanism. However, in general slope-compensation methods, when the operational condition of the input power or the output voltage of the switch-mode power supply changes, the amount of slope-compensation is easily too much or not enough, causing the sub-harmonic oscillation to still be generated or the system response becomes slow.
SUMMARY OF THE INVENTION
The present invention provides an adaptive slope-compensation method applied to a switch-mode power supply. The switch-mode power supply has a power switch and an inductor coupled to an input power. The power switch controls the inductor to store energy or release energy to generate an output voltage. The adaptive slope-compensation method comprises detecting an inductor current passing through the inductor, thereby generating an inductor-current detecting voltage, detecting a duty cycle of the power switch, detecting a voltage variation of the inductor-current detecting voltage when the power switch is turned-on, generating a slope-compensation signal according to the voltage variation and the duty cycle, and adjusting a timing to turn on or turn off the power switch according to the slope-compensation signal.
The present invention further provides an adaptive slope-compensation module applied to a switch-mode power supply. The switch-mode power supply has a switch control circuit, a power switch, an inductor coupled to an input power, and an inductor-current detecting circuit for detecting an inductor current passing through the inductor, thereby generating an inductor-current detecting voltage. The switch control circuit controls the power switch to turn on or off to control the inductor to store energy or release energy to generate an output voltage. The adaptive slope-compensation module comprises a duty-cycle detecting circuit, a voltage-variation detecting circuit, and a slope-compensation integrating circuit. The duty-cycle detecting circuit is utilized for detecting a duty cycle of the power switch. The voltage-variation detecting circuit is utilized for detecting a voltage variation of the inductor-current detecting voltage when the power switch is turned on. The slope-compensation integrating circuit is utilized for calculating a compensation slope according to the voltage variation and the duty cycle, then integrating the compensation slope to generate a slope-compensation signal.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a diagram illustrating an adaptive slope-compensation module according to an embodiment of the present invention.
FIG. 2 is a waveform diagram of the inductor current passing through the switch-mode power supply in the ideal situation.
FIG. 3 is a waveform diagram of the inductor current in consideration of the influence of a small-signal disturbance.
FIG. 4 is a waveform diagram of the inductor current of the switch-mode power supply after slope-compensation by the adaptive slope-compensation module.
FIG. 5 is a diagram illustrating the operational principle of the slope-compensation integrating circuit of the present invention calculating the compensation slope according to the duty cycle and the voltage variation.
FIG. 6 is a diagram illustrating the slope-compensation signal generated by the slope-compensation integrating circuit according to the compensation slope.
FIG. 7 is a diagram illustrating a voltage-variation detecting circuit according to an embodiment of the present invention.
FIG. 8 is a diagram illustrating a duty-cycle detecting circuit according to an embodiment of the present invention.
FIG. 9 is a diagram illustrating a slope-compensation integrating circuit according to an embodiment of the present invention.



DETAILED DESCRIPTION
Please refer to FIG. 1. FIG. 1 is a diagram illustrating an adaptive slope-compensation module 100 according to an embodiment of the present invention. The adaptive slope-compensation module 100 is applied to switch-mode power supply 200. The switch-mode power supply 200 operates in the continuous current mode (CCM). The adaptive slope-compensation module 100 according to the embodiment of the present invention can be applied to a buck power supply, a boost power supply, and a buck-boost power supply. For convenience sake, it is assumed that the switch-mode power supply 200 is a boost power supply in the following description.
The switch-mode power supply 200 has a switch control circuit 210, a power switch QPW, a diode D1, an inductor L, and an inductor-current detecting circuit 220. The inductor L is coupled to the input power VIN. The switch control circuit 210 controls the power switch QPW to turn on or off to cause the inductor L to store or release energy to generate the output voltage VOUT. The inductor-current detecting circuit 220 detects the current passing through the inductor L to generate an inductor-current detecting voltage VCS. The adaptive slope-compensation module 100 includes a duty-cycle detecting circuit 110, a voltage-variation detecting circuit 120, and a slope-compensation integrating circuit 130. The duty-cycle detecting circuit 110 is utilized for detecting the duty cycle d of the power switch QPW. The voltage-variation detecting circuit 120 is utilized for detecting a voltage variation ΔVCS of the inductor-current detecting voltage VCS when the power switch QPW is turned on. The slope-compensation integrating circuit 130 is utilized for calculating a compensation slope MA according to the duty cycle d and the voltage variation ΔVCS, and integrating the compensation slope MA to generate a slope-compensation signal SSC. The switch control circuit 210 adjusts the timing of turning the power switch QPW on or off according to the slope-compensation signal SSC. In this way, even if the operational conditions of the input power VIN and the output voltage VOUT change, the switch-mode power supply 200 still can quickly respond and does not generate sub-harmonic oscillations. The operational principle is further illustrated in the following description.
Please refer to FIG. 2, FIG. 3, and FIG. 4, which are diagrams illustrating the operational principle of adjusting the timing of turning the power switch QPW on or off according to the slope-compensation signal SSC generated by the adaptive slope-compensation module 100 to avoid sub-harmonic oscillations occurring in the switch-mode power supply. FIG. 2 is a diagram of the inductor current iL passing through the switch-mode power supply 200 in the ideal situation. In FIG. 2, iL(t) represents the waveform of the inductor current; IL0 represents the initial value of the inductor current; iC represents the inductor-current peak-value control signal; d represents the duty cycle of the power switch QPW; TS represents the pulse-width-modulation (PWM) cycle of the power switch QPW (that is, an interval between a timing of turning on the power switch QPW and the next timing of turning on the power switch QPW again); M1 represents the inductor-current slope of the positive half cycle slope; and M2 represents the inductor-current slope of the negative half cycle. The relation among M1, M2, the inductor L, the input power VIN, and the output voltage VOUT of the switch-mode power supply 200 varies with the type of the switch-mode power supply 200, which is shown in Table 1:









TABLE 1







Buck-boost power


Buck power supply
Boost power supply
supply







M1 = (VIN − VOUT)/L
M1 = VIN/L
M1 = VIN/L


M2 = VOUT/L
M2 = (VOUT − VIN)/L
M2 = −VOUT/L









For convenience sake, in the present invention, the switch-mode power supply 200 is illustrated to be a boost power supply only as an example. In FIG. 2, the switch-mode power supply 200 operates in the CCM mode. When the switch-mode power supply 200 is in the steady state, the inductor-current initial value IL0 equals the inductor current iL(TS) of the next time the power switch QPW is turned on again. In other words, the variation of the inductor current iL from the time 0 to TS equals zero. Therefore, the relation among the inductor-current slope M1 of the positive half cycle, the inductor-current slope M2 of the negative half cycle, and the duty cycle d of the power switch QPW is represented as the following formula:

M1·dTS−M2·(1−d)TS=0→M2/M1=d/(1−d)  (1).

In consideration that in practical usage the inductor current iL is affected by a small-signal disturbance iLS, the inductor current iL shown in FIG. 2 changes to be the inductor current shown in FIG. 3. It can be seen in FIG. 3 that since the inductor current iL is affected by the small-signal disturbance iL, the inductor current iL rises up to the peak value in advance at the time (dTS−TCS) so that the switch control circuit 210 turns off the power switch QPW at the time (dTS−TCS), wherein TCS represents the time difference because of the small-signal disturbance ins. Because the rising slope of the inductor current iL when the power switch is turned on still equals M1, the small-signal disturbance iLS(dTS−TCS) at the time (dTS−TCS) equals the small-signal disturbance iLS(0) at the time 0. It can be seen in FIG. 3 that the value of the small-signal disturbance iLS(dTS−TCS) at the time (dTS−TCS) is (M1×TCS). In other words, the small-signal disturbance iLS(0) at the time 0 is represented as the following formula:

iLS(0)=M1×TCS  (2).

Similarly, in consideration of the situation that the inductor current iL is affected by the small-signal disturbance iLS, since the falling slope of the inductor current iL when the power switch is turned off still equals M2, the small-signal disturbance iLS(dTS) at the time (dTS) equals the small-signal disturbance iLS(TS) at the time TS. It can be seen in FIG. 3 that the value of the small-signal disturbance iLS(dTS) at the time (dTS) is (M2×TCS). In other words, the small-signal disturbance iLS(TS) at the time TS is represented as the following formula:

iLS(TS)=M2×TCS=iLS(0)×(M2/M1)  (3).

In this way, according to the formulas (1) and (3) the small-signal disturbance iLS(NTS) at the time (N×TS) is represented as the following formula:

iLS(NTS)=iLS(0)×[d/(1−d)]N  (4).

Consequently, according to the formula (4), it can be known that the small-signal disturbance iLS(NTS) converges only if the modulus of [d/(1−d)] is less than 1. That is, the duty cycle d of the power switch QPW has to be less than 0.5 for the switch-mode power supply 200 to not generate the sub-harmonic oscillation. Please refer to FIG. 4. FIG. 4 is a waveform diagram of the inductor current iL of the switch-mode power supply 200 after slope-compensation by the adaptive slope-compensation module 100. In FIG. 4, equivalently speaking, the inductor-current peak-value control signal iC is compensated by a negative slope MA by means of the slope-compensation mechanism. Similar to the above-mentioned analysis, the small-signal disturbance iLS(0) at the time 0 is represented as the following formula:

iLS(0)=(M1+MA)×TCS  (5).

The falling slope of the inductor current iL when the power switch QPW is turned off still equals M2. Thus, similar to the above-mentioned analysis, the small-signal disturbance iLS(TS) at the time TS is represented as the following formula:

iLS(TS)=(M2−MA)×TCS  (6).

In this way, according to the formulas (5) and (6), the small-signal disturbance iLS(NTS) at the time (N×TS) is represented by the following formula after the slope-compensation by the adaptive slope-compensation module 100:

iLS(NTS)=iLS(0)×{(1−MA/M2)/[(1−d)/d+MA/M2]}N  (7).

As a result, it can be known according to the formula (7) that as long as the compensation slope MA generated by the slope-compensation integrating circuit 130 of the adaptive slope-compensation module 100 is set to be within the range 1⁄2×M2≦MA≦M2 (for example, set the compensation slope MA to be 2⁄3×M2), the sub-harmonic oscillation is avoided even if the duty cycle d of the power switch QPW of the switch-mode power supply 200 is over 0.5.
In conclusion, the compensation slope MA of the adaptive slope-compensation module 100 is determined by the inductor-current slope M2 (M1) of the negative (positive) half cycle according to the embodiment of the present invention. In addition, it can be seen in Table 1 that M1 and M2 can be expressed by a function of the input power VIN, output voltage VOUT, and the inductor L. In other words, when the inductance of the inductor L is known, as long as the adaptive slope-compensation module 100 of the present invention detects the variation of the input power VIN or the output voltage VOUT, or the signal capable of representing the variation of the input power VIN or the output voltage VOUT, the compensation slope MA can be calculated. In this way, the adaptive slope-compensation module 100 of the present invention can generate a proper amount of the slope-compensation (slope-compensation signal SC) according to the above-mentioned slope-compensation MA. Consequently, even if the operation condition of the input power VIN or the output voltage VOUT of the switch-mode power supply 200 changes, the switch control circuit 210 still can properly adjust the timing of turning the power switch QPW on or off according to the slope-compensation signal SSC generated by the adaptive slope-compensation module 100 of the present invention to maintain the response speed of the switch-mode power supply 200 and avoid the switch-mode power supply 200 generating sub-harmonic oscillation.
Please refer to FIG. 5. FIG. 5 is a diagram illustrating the operation principle of the slope-compensation integrating circuit 130 of the present invention calculating the compensation slope MA according to the duty cycle d and the voltage variation ΔVCS. In FIG. 5, VCS represents the inductor-current detecting voltage in proportion to the inductor current iL, wherein the inductor-current detecting voltage VCS is generated by the inductor-current detecting circuit 220 when the power switch QPW is turned-on. Take FIG. 1 as an example. When the power switch QPW is turned on, the inductor current iL passes through the resistor RI to generate the inductor-current detecting voltage VCS. Therefore, the inductor-current detecting voltage VCS equals (iL×RI). The rising slope of the inductor current iL when the power switch QPW is turned on is M1. Hence, the rising slope of the inductor-current detecting voltage VCS when the power switch QPW is turned on is (M1×RI).
It can be seen in FIG. 5 that the inductor-current slope M1 of the positive half cycle can be calculated by the following formula according to the voltage variation ΔVCS of the inductor-current detecting voltage VCS when the power switch QPW is turned-on and the duty cycle d of the power switch QPW:

M1=ΔVCS/(d×TS×RI)  (8).

In this way, the following formula is further obtained according to the formula (1):

M2=ΔVCS/[(1−d)×TS×RI]  (9).

As a result, in the present invention, the slope-compensation integrating circuit 130 calculates the inductor-current slope M2 of the negative half cycle according to the duty cycle d, the PWM cycle TS, and the voltage variation ΔVCS, to determine the proper compensation slope MA. In this way, even if the operational condition of the input power VIN or the output voltage VOUT changes, the slope-compensation integrating circuit 130, according to the variation of the duty cycle d and the voltage variation ΔVCS, still can calculate the inductor-current slope M2 of the negative half cycle corresponding to the changed operational condition.
In other words, the slope-compensation circuit 130 properly adjusts the compensation slope MA according to the change of the operational condition. For instance, the compensation slope MA is set as (2⁄3×M2) so that MA can be assured within the range 1⁄2×M2≦MA≦M2. The slope-compensation integrating circuit 130 further integrates the compensation slope MA to generate the slope-compensation signal SSC, as shown in FIG. 6. In this way, the switch control circuit 210 can adjust the timing of turning the power switch QPW on or off according to the slope-compensation signal SSC.
In an embodiment, the switch control circuit 210 determines a limiting value iLIM of the inductor current iL, compensated inductor-current peak-value control signal (iC−SSC)), according to the slope-compensation signal SSC, and compares the inductor current iL with the limiting value iLIM. When the inductor current iL rises up to the limiting value iLIM, a comparing signal SCMP is generated for controlling the switch control circuit 210 to turn the power switch QPW off. In another embodiment, the switch control circuit 210 turns the power switch QPW off according to the inductor-current detecting voltage VCS, a voltage threshold VTH, and the slope-compensation signal SSC. The inductor-current detecting voltage VCS equals to (iL×RI). The voltage threshold VTH is set as (iC×RI). In addition, for convenience sake, the slope-compensation detecting voltage VCS is obtained by integrating (MA×RI) with respect to time. When the sum of the inductor-current detecting voltage VCS and the slope-compensation signal SSC equals the voltage threshold VTH, the switch control circuit 210 turns the power switch QPW off. No matter which above-mentioned methods is adopted, even if the operational condition of the input power VIN or the output voltage VOUT changes, the switch-mode supply 200 still can maintain fast response and avoid the sub-harmonic oscillations.
Please refer to FIG. 7. FIG. 7 is a diagram illustrating the voltage-variation detecting circuit 120 according to an embodiment of the present invention. The voltage-variation detecting circuit 120 includes a maximum-voltage sampling circuit 121, a minimum-voltage sampling circuit 122, and a subtractor 123. The maximum-voltage sampling circuit 121 is utilized for detecting the inductor-current detecting voltage VCS when the power switch QPW is turned on to record the maximum VCS—MAX of the inductor-current detecting voltage VCS. The structure and the operational principle of the maximum-voltage sampling circuit 121 are well known to those skilled in the art. The maximum-voltage sampling circuit 121 shown in FIG. 7 is merely an example for illustration, and the maximum-voltage sampling circuit 121 of the present invention is not limited to be the circuit shown in FIG. 7. In FIG. 7, the maximum-voltage sampling circuit 121 includes a switch SW1, and a capacitor C1. The capacitor C1 is utilized for recording a recorded voltage VREC1. The control end C of the switch SW1 is utilized for receiving a power-switch control signal VG, wherein the power-switch control signal VG is also utilized for turning the power switch QPW on or off. When the switch SW1 is turned on, the inductor-current detecting voltage VCS charges the capacitor C1. The recorded voltage VREC1 which is recorded by the capacitor C1 until the switch SW1 changes to be turned off again represents the maximum of the inductor-current detecting voltage VCS. The structure and the operational principle of the minimum-voltage sampling circuit 122 are also well known to those skilled in the art. The minimum-voltage sampling circuit 122 shown in FIG. 7 is merely an example for illustration, and the minimum-voltage sampling circuit 122 of the present invention is not limited to be the circuit shown in FIG. 7.
In FIG. 7, the minimum-voltage sampling circuit 122 includes a switch SW2, a capacitor C2, a one-shot circuit 1221, and a logic circuit 1222 (such as an AND gate). When the power-switch control signal VG is logic-high, the one-shot circuit 1221 is triggered to output a delay pulse signal SDELAY of logic-high after a delay period TDELAY. In the pulse period of the delay pulse signal SDELAY, the logic circuit 1222 outputs a signal of logic-high and then changes to output a logic-low, so that the switch SW2 is turned on for a short period and then changes to be turned-off immediately. The capacitor C2 records the inductor-current detecting voltage VCS when the switch SW2 is turned on. In other words, a delay period TDELAY after the power switch QPW is turned on, the minimum-voltage sampling circuit 122 records the inductor-current detecting voltage VCS as the minimum VCS—MIN of the inductor-current detecting voltage VCS, wherein the delay period TDELAY is mainly for avoiding the capacitor C2 recording an incorrect voltage because of the ringing phenomenon of the inductor-current detecting voltage VCS at the moment that the power switch QPW is just turned on. In this way, the voltage-variation detecting circuit 120 can output the voltage variation ΔVCS of the inductor-current detecting voltage VCS when the power switch QPW is turned on by means of the subtractor 123 subtracting the minimum VCS—MIN from the maximum VCS—MAX.
Please refer to FIG. 8 that is a diagram illustrating the duty-cycle detecting circuit 110 according to an embodiment of the present invention. The duty-cycle detecting circuit 110 shown in FIG. 8 detects the input power VIN and the output voltage VOUT to calculate the duty cycle d of the power switch QPW. The duty-cycle detecting circuit 110 shown in FIG. 8 includes a dividing circuit 111 for calculating the ratio of the input power VIN to the output voltage VOUT to obtain the duty cycle d of the power switch QPW. In addition to the duty-cycle detecting circuit 110 shown in FIG. 8, there are still many methods capable of detecting the duty cycle d of the power switch QPW. For example, when the power switch QPW operates in the mode that the power switch QPW has a fixed predetermined PWM cycle TSPRE, the duty-cycle detecting circuit 110 can detect the turned on period TON of the power switch QPW first, and then calculate the duty cycle d of the power switch QPW according to the predetermined PWM cycle TSPRE and the turned on period TON of the power switch QPW. Since the circuits for detecting the duty cycle d of the power switch QPW in different operational modes are well-known to people skilled in the art, those circuits will be omitted for brevity.
Please refer to FIG. 9. FIG. 9 is a diagram illustrating the slope-compensation integrating circuit 130 according to an embodiment of the present invention. In FIG. 9, the slope-compensation integrating circuit 130 includes a dividing circuit 131, a voltage-current converting circuit 132, a capacitor C3, a switch SW3, an AND gate 133, a one-shot circuit 134, a subtracting circuit 135, and a multiplying circuit 136. The multiplying circuit 136 multiplies the duty cycle d and the PWM cycle TS of the power switch QPW to obtain the switch-on period (d×TS) of the power switch QPW. The subtracting circuit 135 is utilized for calculating the switch-off period [(1−d)×TS] of the power switch QPW according to the switch-on period (d×TS) and the PWM cycle TS of the power switch QPW. That is, the slope-compensation integrating circuit 130 can calculate the switch-off period [(1−d)×TS] of the power switch QPW according to the duty cycle d. The dividing circuit 131 is utilized for calculating the compensation slope MA according to the switch-off period [(1−d)×TS] of the power switch QPW and the voltage variation ΔVCS. The voltage-current converting circuit 132 and the capacitor C3 form an integrating circuit for integrating the compensation slope MA to generate the slope-compensation signal SSC. In addition, the one-shot circuit 134 and the AND gate 133 are utilized for controlling the switch SW3 resetting the slope-compensation signal SSC when the power switch QPW is turned on, wherein the operational principle is similar to the minimum-voltage sampling circuit 122 shown in FIG. 7.
In conclusion, in the adaptive slope-compensation module provided by the present invention, the voltage variation of the inductor-current detecting voltage when the power switch is turned on is detected by the voltage-variation detecting circuit, and the duty cycle of the power switch is detected by the duty-cycle detecting circuit. In this way, the adaptive slope-compensation module of the present invention calculates the rising slope or the falling slope of the inductor current according to the duty cycle of the power switch and the voltage variation of the inductor-current detecting voltage, and accordingly obtains the compensation slope. Since the rising slope and the falling slope of the inductor current reveals the change of the input power and the output voltage of the switch-mode power supply. Consequently, the adaptive slope-compensation module of the present invention can generate the proper amount of the slope compensation (slope-compensation signal) according to the compensation slope which is obtained according to the rising slope and the falling slope of the inductor current. In this way, even if the operation of the input power or the output voltage of the switch-mode power supply changes, the switch control circuit of the switch-mode power supply still can properly adjust the timing of turning the power switch on or off according to the slope-compensation signal provided by the adaptive slope-compensation module of the present invention, to maintain the response speed of the switch-mode power supply and avoid the switch-mode power supply generating sub-harmonic oscillations.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention.

## Claims

1. An adaptive slope-compensation method applied to a switch-mode power supply, the switch-mode power supply having a power switch and an inductor coupled to an input power, the power switch controlling the inductor to store energy or release energy to generate an output voltage, the adaptive slope-compensation method comprising:
detecting an inductor current passing through the inductor, thereby generating an inductor-current detecting voltage;
detecting a duty cycle of the power switch;
detecting a maximum and a minimum of the inductor-current detecting voltage and determining a voltage variation of the inductor-current detecting voltage according to the maximum and the minimum of the inductor-current detecting voltage when the power switch is turned on;
generating a slope-compensation signal according to the voltage variation and the duty cycle; and
adjusting a timing to turn on or turn off the power switch according to the slope-compensation signal;
wherein detecting the maximum of the inductor-current detecting voltage comprises:
continuously comparing the inductor-current detecting voltage with a first recorded voltage when the power switch is turned on;
setting voltage level of the first recorded voltage to be equal to voltage level of the inductor-current detecting voltage when the inductor-current detecting voltage is higher than the first recorded voltage; and
outputting the maximum of the inductor-current detecting voltage according to the first recorded voltage.

2. The adaptive slope-compensation method of claim 1, wherein detecting the duty cycle of the power switch comprises:
detecting the input power and the output voltage to detect the duty cycle of the power switch.

3. The adaptive slope-compensation method of claim 1, wherein detecting the duty cycle of the power switch comprises:
detecting a turned-on period of the power switch; and
calculating the duty cycle of the power switch according to a predetermined pulse-width-modulation (PWM) cycle and the turned-on period.

4. The adaptive slope-compensation method of claim 1, wherein detecting the minimum of the inductor-current detecting voltage comprises:
delaying for a period after the power switch is turned on, then detecting and recording the inductor-current detecting voltage as the minimum.

5. The adaptive slope-compensation method of claim 1, wherein generating the slope-compensation signal according to the voltage variation and the duty cycle comprises:
calculating a turned off period of the power switch according to the duty cycle; and
generating the slope-compensation signal according to the voltage variation and the turned off period of the power switch by means of integration.

6. The adaptive slope-compensation method of claim 1, wherein adjusting the timing of turning the power switch on or off according to the slope-compensation signal comprises:
determining a limiting value of the inductor current according to the slope-compensation signal;
comparing the inductor current with the limiting value, and generating a comparing signal; and
adjusting the timing to turn on or turn off the power switch according to the comparing signal.

7. The adaptive slope-compensation method of claim 1, wherein the switch-mode power supply operates in a continuous current mode (CCM).

8. The adaptive slope-compensation method of claim 1, wherein the switch-mode power supply is a buck power supply, a boost power supply, or a buck-boost power supply.

9. An adaptive slope-compensation module, applied in a switch-mode power supply, the switch-mode power supply having a switch control circuit, a power switch, an inductor coupled to an input power, and an inductor-current detecting circuit for detecting an inductor current passing through the inductor, thereby generating an inductor-current detecting voltage, the switch control circuit turning the power switch on or off to control the inductor to store energy or release energy to generate an output voltage, the adaptive slope-compensation module comprising:
a duty-cycle detecting circuit for detecting a duty cycle of the power switch;
a voltage-variation detecting circuit for detecting a voltage variation of the inductor-current detecting voltage when the power switch is turned on; and
a slope-compensation integrating circuit for calculating a compensation slope according to the voltage variation and the duty cycle, then integrating the compensation slope to generate a slope-compensation signal;
wherein the switch control circuit determines a limiting value of the inductor current according to the slope-compensation signal, and compares the inductor current with the limiting value, thereby generating a comparing signal; and the switch control circuit adjusts a timing to turn on or turn off the power switch according to the comparing signal.

10. The adaptive slope-compensation module of claim 9, wherein the voltage-variation detecting circuit comprises a maximum-voltage sampling circuit for detecting the inductor-current detecting voltage when the power switch is turned on, thereby recording a maximum of the inductor-current detecting voltage.

11. The adaptive slope-compensation module of claim 10, wherein the voltage-variation detecting circuit further comprises a minimum-voltage sampling circuit for detecting the inductor-current detecting voltage when the power switch is turned on, thereby recording a minimum of the inductor-current detecting voltage.

12. The adaptive slope-compensation module of claim 9, wherein the duty-cycle detecting circuit detects the input power and the output voltage to calculate the duty cycle of the power switch.

13. The adaptive slope-compensation module of claim 9, wherein the duty-cycle detecting circuit calculates the duty cycle of the power switch according to a predetermined pulse-width-modulation (PWM) cycle of the power switch.

14. The adaptive slope-compensation module of claim 9, wherein the slope-compensation integrating circuit calculates a turned-off period of the power switch according to the duty cycle, and then generates the slope-compensation signal according to the voltage variation of the inductor-current detecting voltage and the turned-off period of the power switch by means of integration.

15. The adaptive slope-compensation module of claim 9, wherein the switch-mode power supply operates in a continuous current mode (CCM).

16. The adaptive slope-compensation module of claim 9, wherein the switch-mode power supply is a buck power supply, a boost power supply, or a buck-boost power supply.

17. An adaptive slope-compensation method applied to a switch-mode power supply, the switch-mode power supply having a power switch and an inductor coupled to an input power, the power switch controlling the inductor to store energy or release energy to generate an output voltage, the adaptive slope-compensation method comprising:
detecting an inductor current passing through the inductor, thereby generating an inductor-current detecting voltage;
detecting a duty cycle of the power switch;
detecting a voltage variation of the inductor-current detecting voltage when the power switch is turned on;
generating a slope-compensation signal according to the voltage variation and the duty cycle;
determining a limiting value of the inductor current according to the slope-compensation signal;
comparing the inductor current with the limiting value, and generating a comparing signal; and
adjusting a timing to turn on or turn off the power switch according to the comparing signal.