Background
At present, the switch power supply is increasingly widely applied, and the requirements on the precision of a power supply main control chip are higher and higher no matter the switch power supply is an AC-DC/DC-DC power supply. The switching power supply generally comprises a switching device and a switching control circuit, and is matched with an inductor, a capacitor, a switching tube, a sampling resistor and the like, different elements are selected according to different application conditions, a peripheral topological structure is built according to different connection relations, the basic control principle is the same or similar, the output quantity or the input quantity is fed back into the switching control circuit, and the duty ratio of the switching device is adjusted according to the change of the output quantity or the input quantity. The output quantity and the input quantity refer to parameters such as input voltage, input current, output voltage, output current and the like when the system works.
One common control scheme is to sample the current of the inductor and the switching device, feed it back into the control loop, and adjust the duty cycle of the switching device. The control circuit for realizing the regulation mode generally comprises a power tube current sampling circuit, a power tube driving circuit, a comparison circuit and the like, wherein the comparison circuit compares a current signal acquired by the power tube current sampling circuit with a set current value to obtain a comparison result, and the driving circuit outputs square waves with different duty ratios to drive the power tube to work according to the comparison result of the comparison circuit.
In an ideal state, after the inductance current flows through the conducting power tube, the voltage reflecting the current of the power tube is transmitted to an Ics port of the main control circuit for receiving a current sampling signal of the power tube through the sampling resistor, when the detected voltage of the Ics port is equal to the threshold voltage Vset, the power tube is immediately controlled to be turned off, and the inductance peak current is determined by the following formula
Iset=Vset/Rcs=(Vin/Lp)×Ton
In actual operation, after the Ics port detection voltage is equal to the threshold voltage Vset, the internal control signal turns off the power tube for a delay time, which is caused by various factors, such as delay of a driving circuit for driving the power tube switch, delay caused by parasitic factors in a signal transmission process, and the like; the actual peak inductor current is thus determined by:
Ipeak=(Vin/Lp)×(Ton+Td)=(Vin/Lp)×Ton+(Vin/Lp)×Td=Iset+ΔI
wherein:
vset: the threshold voltage is set in the chip and used for controlling the peak inductance current;
iset: a set inductance peak current value;
vin: an inductance input voltage;
lp: inductance value;
ton: the power tube starts to be conducted until the voltage of the Ics port reaches the corresponding time of the Vset voltage;
td: after the Ics port voltage reaches Vset, delay time from sending out the control signal to turning off the power tube;
ipeak: actual inductance peak current value;
Δi: a current error value due to the delay time Td.
As can be seen from the equation, the actual peak inductance current varies with Lp, vin, td, and the prior art generally compensates for this in two ways: one is to superimpose a slope voltage with a fixed slope changing along with Ton time on a threshold voltage Vset, the range of variation of Lp and Vin is very large in practical application, and the compensation mode of the fixed slope cannot be changed correspondingly under the condition of different Lp and Vin, so that optimal compensation and accurate control are difficult to realize; one is to utilize a chip pin external resistor to Vin, compensate Vset voltage value through sampling different Vin voltage values, thereby this scheme has increased the chip pin and has increased the cost, and when Vin voltage value belongs to high voltage, needs high-voltage device to sample, further increases circuit cost. The prior art cannot make self-adaptive adjustment according to the change of Lp, vin, td, the delay time Td is determined by the switching device itself and the switching control circuit, and Vin does not have a certain range of fluctuation at the same time, so Δi cannot be accurately controlled, and Ipeak cannot be accurately controlled.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a high-precision peak current control method of a switching power supply, which comprises the following steps:
s1, detecting current Ics flowing through an inductance coil in the current period of a switching power supply, and recording a current peak value Icsmax;
s2, comparing a current peak value Icsmax of the period with a preset value Ith, and adjusting the value of the inductance threshold current Iset of the next period according to a first comparison result;
s3, outputting a control signal according to a second comparison result of the current Ics of the current period and the inductance threshold current Iset of the current period.
Wherein, the inductance threshold current Iset value in the period is the Iset value adjusted in the previous period;
the preset value Ith includes a first preset value Ith1 and a second preset value Ith2, the first preset value Ith1 is greater than the inductance threshold current Iset, the second preset value Ith2 is greater than or equal to the inductance threshold current Iset, and the first preset value Ith1 is greater than the second preset value Ith2.
The sampling current peak value Icsmax in the present period is respectively compared with a first preset value Ith1 and a second preset value Ith2, and according to a first comparison result, the inductance threshold current Iset value in the next period is adjusted, specifically:
if the current peak value Icsmax of the current period is larger than or equal to a first preset value Ith1, the inductance threshold current Iset value of the next period is regulated down;
if the current peak value Icsmax of the current period is smaller than or equal to the second preset value Ith2, the inductance threshold current Iset of the next period is increased.
The invention also provides a high-precision peak current detection control circuit of the switching power supply, which comprises a sampling circuit (20), a comparison setting circuit (30), a preset value circuit (40) and a comparison circuit (A);
the sampling circuit (20) is used for detecting the current Ics and sampling the peak value Icsmax of the current Ics;
the preset value circuit (40) is used for providing a preset value Ith;
the comparison setting circuit (30) is used for comparing the sampling current peak value Icsmax of the current period with a preset value Ith, and setting an inductance threshold current Iset value of the next period according to a first comparison result;
the comparison circuit (A) is used for comparing the sampling current Ics of the current period with the inductance threshold current Iset value of the current period and outputting a control signal according to a second comparison result.
Wherein, the inductance threshold current Iset value in the period is the Iset value adjusted in the previous period;
the preset value Ith comprises a first preset value Ith1 and a second preset value Ith2, wherein the first preset value Ith1 is larger than the inductance threshold current Iset, the second preset value Ith2 is larger than or equal to the inductance threshold current Iset, and the first preset value Ith1 is larger than the second preset value Ith2.
The comparison setting circuit (30) compares the sampling current peak value Icsmax of the current period with a preset value Ith, and adjusts the inductance threshold current Iset value of the next period according to a first comparison result, specifically:
if the current peak value Icsmax of the current period is larger than or equal to a first preset value Ith1, the inductance threshold current Iset value of the next period is regulated down;
if the current peak value Icsmax of the current period is smaller than or equal to the second preset value Ith2, the inductance threshold current Iset of the next period is increased.
Wherein, the detection control circuit is a control chip.
The invention also provides a high-precision peak current circuit of the switching power supply, which comprises an inductance coil (L), a power tube (M), a sampling resistor (R) and a detection control circuit (10); the detection control circuit (10) comprises a sampling circuit (20), a comparison setting circuit (30), a preset value circuit (40) and a comparison circuit (A);
the sampling circuit (20) is used for detecting the inductance coil current Ics and sampling the peak value Icsmax of the current Ics;
the preset value circuit (40) is used for providing a preset value Ith;
the comparison setting circuit (30) is used for comparing the sampling current peak value Icsmax of the current period with a preset value Ith, and setting an inductance threshold current Iset value of the next period according to a first comparison result;
the comparison circuit (A) is used for comparing the inductance coil current Ics of the current period with the inductance threshold current Iset value of the current period and outputting a control signal to control the on or off of the power tube according to a second comparison result;
the induction coil (L), the power tube (M) and the sampling resistor (R) are sequentially connected, the sampling resistor (R) is grounded, the input end of the detection control circuit (10) is connected to the output end of the power tube (M), and the output end of the detection control circuit (10) is connected to the control end of the power tube (M).
Wherein, the inductance threshold current Iset value in the period is the Iset value adjusted in the previous period;
the preset value Ith comprises a first preset value Ith1 and a second preset value Ith2, wherein the first preset value Ith1 is larger than the inductance threshold current Iset, the second preset value Ith2 is larger than or equal to the inductance threshold current Iset, and the first preset value Ith1 is larger than the second preset value Ith2;
if the current peak value Icsmax of the current period is larger than or equal to a first preset value Ith1, the inductance threshold current Iset value of the next period is regulated down, so that the current peak value Icsmax of the next period is reduced;
if the current peak value Icsmax in the current period is smaller than or equal to the second preset value Ith2, the inductance threshold current Iset value in the next period is increased, and therefore the current peak value Icsmax in the next period is increased.
The invention relates to a high-precision peak current threshold value adjusting circuit of a switching power supply, which comprises a sampling circuit (20), a comparison setting circuit (30) and a preset value circuit (40);
the sampling circuit (20) is used for detecting the current Ics and sampling the peak value Icsmax of the current Ics;
the preset value circuit (40) is used for providing a preset value Ith;
the comparison setting circuit (30) is used for comparing the current peak value Icsmax with a preset value Ith and adjusting the value of the inductance threshold current Iset of the next cycle according to the first comparison result.
The invention realizes high-precision control of the peak current of the switching power supply and improves the power supply precision.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
As shown in fig. 1, a high-precision peak current circuit of a switching power supply of the present invention includes: an inductance coil (L), a power tube (M), a sampling resistor (R) and a detection control circuit (10). The induction coil (L), the power tube (M) and the sampling resistor (R) are sequentially connected, the sampling resistor (R) is grounded, the input end of the detection control circuit (10) is connected to the output end of the power tube (M), and the output end of the detection control circuit (10) is connected to the control end of the power tube (M). The inductance coil (L) is a primary inductance coil.
The detection control circuit (10) comprises a sampling circuit (20), a comparison setting circuit (30), a preset value circuit (40) and a comparison circuit (A). The sampling circuit (20) is connected with the second input end of the comparison circuit (A) and the output end of the power tube (M), and the comparison setting circuit (30) is connected with the sampling circuit (20), the preset value circuit (40) and the first input end of the comparison circuit (A). The output end of the comparison circuit (A) is connected to the control end of the power tube (M). Preferably, the detection control circuit is a control chip.
The sampling circuit (20) is used for detecting the current Ics and sampling the peak value Icsmax of the current Ics;
the preset value circuit (40) is used for providing a preset value Ith;
the comparison setting circuit (30) is used for comparing the sampling current peak value Icsmax of the current period with a preset value Ith, and setting an inductance threshold current Iset value of the next period according to a first comparison result;
the preset value Ith includes a first preset value Ith1 and a second preset value Ith2, the first preset value Ith1 is greater than the inductance threshold current Iset, the second preset value Ith2 is greater than or equal to the inductance threshold current Iset, and the first preset value Ith1 is greater than the second preset value Ith2.
The comparison circuit (A) is used for comparing the sampling current Ics of the current period with the inductance threshold current Iset value of the current period and outputting a control signal PWM according to a second comparison result. The inductance threshold current Iset value of the current period is the Iset value after the adjustment of the previous period. The Iset value after the adjustment of the previous cycle means that the comparison setting circuit (30) compares the sampling current peak value Icsmax of the previous cycle with a first preset value Ith1 and a second preset value Ith2 respectively, and adjusts to obtain the inductance threshold current Iset value of the previous cycle according to the first comparison result.
The output control signal PWM according to the second comparison result is specifically: when the sampling current Ics is larger than or equal to the inductance threshold current Iset, the comparison circuit (A) outputs a control signal PWM to control the power tube switch; the driving tube M controls the magnitude of the current flowing through the driving tube M according to the control signal PWM.
In operation, the voltage drop across the power tube (M) and the voltage drop across the sampling resistor are much smaller than the voltage drop across the inductor L, and the voltage across the inductor can be considered to be equal to the input voltage Vin, the detection control circuit (10) detects the voltage Vcs across the sampling resistor (R), and since the sampling resistor (R) is fixed, the voltage Vcs corresponds to the current Ics flowing through the inductor L, and the detected voltage Vcs corresponds to the detected current Ics flowing through the inductor L; when the sampling current Ics is larger than or equal to the inductance threshold current Iset, the comparison circuit (A) outputs a control signal PWM to control the power tube to be turned off; the sampling circuit (20) takes the current peak value Icsmax of the sample period, the comparison setting circuit (30) adjusts the value of the inductance threshold current Iset period by period, the current peak value Icsmax is respectively compared with a first preset value Ith1 and a second preset value Ith2, and the value of the inductance threshold current Iset of the next period is adjusted according to the first comparison result. The first preset value Ith1 is greater than the second preset value Ith2.
In one embodiment of the present invention, the sampling current peak value Icsmax of the present period is compared with a first preset value Ith1 and a second preset value Ith2, respectively, and according to the first comparison result, an inductance threshold current Iset value of the next period is set, specifically: if the current peak value Icsmax of the current period is larger than or equal to the first preset value Ith1, the inductance threshold current Iset of the next period is regulated down. In the next period, the sampling circuit (20) samples the value of the current Ics, and transmits the current peak value Ics max of the next period to the comparison setting circuit (30), the comparison circuit (A) compares the current Ics value of the next period with the inductance threshold current Iset of the next period which is regulated down in the current period, and a control signal PWM is output to control the turn-off of the power tube (M) according to a second comparison result. And the current Ics value reaches the time of the next period inductance threshold current Iset to shorten because the next period inductance threshold current Iset is regulated down, so that the power tube (M) is turned off in advance in the next period, and the value of the next period current peak value Icsmax is reduced.
If the current peak value Icsmax of the current period is smaller than or equal to a second preset value Ith2, the inductance threshold current Iset value of the next period is regulated; in the next period, the sampling circuit (20) samples the value of the current Ics, and transmits the current peak value Ics max of the next period to the comparison setting circuit (30), the comparison circuit (A) compares the current Ics value of the next period with the inductance threshold current Iset of the next period adjusted in the current period, and a control signal PWM is output to control the turn-off of the power tube (M) according to a second comparison result. Because the inductance threshold current Iset of the next cycle is increased, the time for the current Ics value to reach the inductance threshold current Iset of the next cycle is increased, so that the power tube (M) is turned off in the next cycle in a delayed manner, and the value of the current peak value Ics max of the next cycle is improved.
The comparison setting circuit (30) compares the current peak value Icsmax of the next period with a first preset value Ith1 and a second preset value Ith2 respectively, and sets the inductance threshold current Iset value of the next period according to the comparison result.
In the next cycle, the process of the previous cycle is repeated.
The inductance threshold current Iset value is adjusted cycle by cycle, so that the current peak value Icsmax value is limited between the first preset value Ith1 and the second preset value Ith2, the fluctuation range of the current peak value Icsmax is controlled, and the precision of the current Ics is improved.
Fig. 2 is a schematic diagram of a comparison setting circuit (30) in a high-precision peak current circuit of a switching power supply according to the present invention, and as shown in fig. 2, the comparison setting circuit (30) includes a first comparison circuit (P1), a second comparison circuit (P2) and a setting adjustment circuit (31). The input ends of the first comparison circuit (P1) and the second comparison circuit (P2) are respectively connected with the sampling circuit (20) and the preset value circuit (40). Two input ends of the first comparison circuit (P1) are respectively connected with a first preset value Ith1 output end and a sampling current peak value Icsmax of the preset value circuit (40), two input ends of the second comparison circuit (P2) are respectively connected with a second preset value Ith2 output end and a sampling current peak value Icsmax of the preset value circuit (40), the output ends of the first comparison circuit (P1) and the second comparison circuit (P2) are connected with a setting and adjusting circuit (31), and the setting and adjusting circuit (31) is used for adjusting the inductance threshold current Iset according to the output of the first comparison circuit (P1) and the output of the second comparison circuit (P2). The first comparison circuit (P1) is used for comparing the current peak value Icsmax with a first preset value Ith1, the second comparison circuit (P2) is used for comparing the current peak value Icsmax with a second preset value Ith2, and the setting adjustment circuit (31) is used for adjusting the value of the inductance threshold current Iset of the next period according to a first comparison result; the first preset value Ith1 is greater than the second preset value Ith2.
As shown in fig. 3, the high-precision peak current detection control circuit of the switching power supply of the invention comprises a sampling circuit (20), a comparison setting circuit (30), a comparison circuit (a) and a preset value circuit (40);
the sampling circuit (20) is connected with the second input end of the comparison circuit (A) and the output end of the power tube (M), and the comparison setting circuit (30) is connected with the sampling circuit (20), the preset value circuit (40) and the first input end of the comparison circuit (A).
The sampling circuit (20) is used for detecting the current Ics and sampling the peak value Icsmax of the current Ics;
the preset value circuit (40) is used for providing a preset value Ith;
the comparison setting circuit (30) is used for comparing the sampling current peak value Icsmax of the current period with a preset value Ith, and setting an inductance threshold current Iset value of the next period according to a first comparison result;
the comparison circuit (A) is used for comparing the sampling current Ics of the current period with the inductance threshold current Iset value of the current period and outputting a control signal PWM according to a second comparison result.
The inductance threshold current Iset value in the period is the Iset value adjusted in the previous period;
the preset value Ith comprises a first preset value Ith1 and a second preset value Ith2, wherein the first preset value Ith1 is larger than the inductance threshold current Iset, the second preset value Ith2 is larger than or equal to the inductance threshold current Iset, and the first preset value Ith1 is larger than the second preset value Ith2.
The comparison setting circuit (30) includes a first comparison circuit (P1), a second comparison circuit (P2), and an adjustment circuit 31. The input ends of the first comparison circuit (P1) and the second comparison circuit (P2) are respectively connected with the sampling circuit (20) and the preset value circuit (40). Two input ends of the first comparison circuit (P1) are respectively connected with a first preset value Ith1 output end and a sampling current peak value Icsmax of the preset value circuit (40), two input ends of the second comparison circuit (P2) are respectively connected with a second preset value Ith2 output end and a sampling current peak value Icsmax of the preset value circuit (40), the output ends of the first comparison circuit (P1) and the second comparison circuit (P2) are connected with an adjusting circuit 31, and the adjusting circuit 31 is used for adjusting the inductance threshold current Iset according to the output of the first comparison circuit (P1) and the output of the second comparison circuit (P2).
In one embodiment of the present invention, the sampling current peak value Icsmax of the present period is compared with a first preset value Ith1 and a second preset value Ith2, respectively, and according to the first comparison result, an inductance threshold current Iset value of the next period is set, specifically: if the current peak value Icsmax of the current period is larger than or equal to a first preset value Ith1, the inductance threshold current Iset value of the next period is regulated down; in the next period, the sampling circuit (20) samples the value of the current Ics, and transmits the current peak value Ics max of the next period to the comparison setting circuit (30), the comparison circuit (A) compares the current Ics value of the next period with the inductance threshold current Iset of the next period which is regulated down in the current period, and a control signal PWM is output to control the turn-off of the power tube (M) according to a second comparison result. And the current Ics value reaches the time of the next period inductance threshold current Iset to shorten because the next period inductance threshold current Iset is regulated down, so that the power tube (M) is turned off in advance in the next period, and the value of the next period current peak value Icsmax is reduced.
If the current peak value Icsmax of the current period is smaller than or equal to a second preset value Ith2, the inductance threshold current Iset value of the next period is regulated; in the next period, the sampling circuit (20) samples the value of the current Ics, and transmits the current peak value Ics max of the next period to the comparison setting circuit (30), the comparison circuit (A) compares the current Ics value of the next period with the adjusted inductance threshold current Iset of the next period, and a control signal PWM is output to control the turn-off of the power tube (M) according to the second comparison result. Because the inductance threshold current Iset of the next cycle is increased, the time for the current Ics value to reach the inductance threshold current Iset of the next cycle is increased, so that the power tube (M) is turned off in the next cycle in a delayed manner, and the value of the current peak value Ics max of the next cycle is improved.
The comparison circuit (A) compares the sampling current Ics of the current period with the inductance threshold current Iset value of the current period, and outputs a control signal according to a second comparison result, specifically: the inductance threshold current Iset value in the period is the Iset value adjusted in the previous period; the Iset value after the adjustment of the previous cycle means that the comparison setting circuit (30) compares the sampling current peak value Icsmax of the previous cycle with a first preset value Ith1 and a second preset value Ith2 respectively, and adjusts to obtain the inductance threshold current Iset value of the previous cycle according to the first comparison result.
Preferably, the detection control circuit is a control chip.
Fig. 4 is a high-precision peak current threshold adjustment circuit of the switching power supply, wherein the current threshold adjustment circuit comprises a sampling circuit (20), a comparison setting circuit (30) and a preset value circuit (40); the sampling circuit (20) is connected with the comparison setting circuit (30);
the sampling circuit (20) is used for detecting the current Ics and sampling the peak value Icsmax of the current Ics;
the preset value circuit (40) is used for providing a preset value Ith;
the comparison setting circuit (30) is used for comparing the current peak value Icsmax with a preset value Ith and adjusting the value of the inductance threshold current Iset of the next cycle according to the first comparison result.
The preset value Ith comprises a first preset value Ith1 and a second preset value Ith2, wherein the first preset value Ith1 is larger than the inductance threshold current Iset, the second preset value Ith2 is larger than or equal to the inductance threshold current Iset, and the first preset value Ith1 is larger than the second preset value Ith2.
The comparison setting circuit (30) comprises a first comparison circuit (P1), a second comparison circuit (P2) and a setting adjustment circuit (31); the first comparison circuit (P1) is used for comparing the current peak value Icsmax with a first preset value Ith1, the second comparison circuit (P2) is used for comparing the current peak value Icsmax with a second preset value Ith2, and the setting adjustment circuit (31) is used for adjusting the value of the inductance threshold current Iset of the next period according to a first comparison result; the first preset value Ith1 is greater than the second preset value Ith2.
Fig. 5 shows a high-precision peak current control method of a switching power supply according to the present invention, including:
s1, detecting current Ics flowing through an inductance coil in the current period of a switching power supply, and recording a current peak value Icsmax;
s2, comparing a current peak value Icsmax of the period with a preset value Ith, and adjusting the value of the inductance threshold current Iset of the next period according to a first comparison result;
s3, outputting a control signal according to a second comparison result of the current Ics of the current period and the inductance threshold current Iset of the current period.
The inductance threshold current Iset value in the period is the Iset value adjusted in the previous period, and a set value can be adopted for the first inductance threshold current Iset value after the switching power supply is started;
the preset value Ith includes a first preset value Ith1 and a second preset value Ith2, the first preset value Ith1 is greater than the inductance threshold current Iset, the second preset value Ith2 is greater than or equal to the inductance threshold current Iset, and the first preset value Ith1 is greater than the second preset value Ith2.
In one embodiment of the present invention, the sampling current peak value Icsmax of the present period is compared with a first preset value Ith1 and a second preset value Ith2, respectively, and according to the first comparison result, an inductance threshold current Iset value of the next period is set, specifically: if the current peak value Icsmax of the current period is larger than or equal to a first preset value Ith1, according to a first comparison result, the inductance threshold current Iset value of the next period is regulated down, and meanwhile, a control signal is output according to a second comparison result of the current Ics of the current period and the inductance threshold current Iset of the current period; and in the next period, sampling the value of the current Ics, recording the current peak value Icsmax of the next period, comparing the current Ics value of the next period with the inductance threshold current Iset of the next period which is regulated down in the current period, and outputting a control signal PWM according to a second comparison result. And the current Ics value reaches the time of the next period inductance threshold current Iset to shorten because the next period inductance threshold current Iset is regulated down, so that the power tube (M) is turned off in advance in the next period, and the value of the next period current peak value Icsmax is reduced.
If the current peak value Icsmax of the current period is smaller than or equal to a second preset value Ith2, according to the first comparison result, the inductance threshold current Iset value of the next period is regulated, and meanwhile, a control signal is output according to the second comparison result of the current Ics of the current period and the inductance threshold current Iset of the current period; and in the next period, sampling the value of the current Ics, recording a period current peak value Icsmax, comparing the current Ics value of the next period with the inductance threshold current Iset of the next period adjusted in the current period, and outputting a control signal PWM according to a second comparison result. Because the inductance threshold current Iset of the next cycle is increased, the time for the current Ics value to reach the inductance threshold current Iset of the next cycle is increased, so that the power tube (M) is turned off in the next cycle in a delayed manner, and the value of the current peak value Ics max of the next cycle is improved. The current peak value Icsmax is dynamically fixed between the first preset value Ith1 and the second preset value Ith2 by adjusting the inductance threshold current Iset cycle by cycle. Preferably, the detection of the current Ics is performed by detecting the voltage Vcs.
While the present invention has been described by way of example, those of ordinary skill in the art will recognize that there are many variations and modifications of the present invention without departing from the spirit of the invention, and it is intended that the appended claims encompass such variations and modifications as do not depart from the spirit of the invention.