Switching circuit and LED driving circuit
By using a sampling resistor and a filter unit in the LED drive switching circuit to sample the inductor current for average current, the problem of difficulty in sampling negative values of the inductor current is solved, the control accuracy and linearity of the output current are improved, the control method is simplified and the cost is reduced cost.
Patent Information
- Application Number
- CN202111404169.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-24
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2041-11-24
AI Technical Summary
Existing LED drive switching circuits cannot effectively sample the negative value of the inductor current during the dimming process, resulting in output current control errors and nonlinear problems. Although forced valley conduction avoids nonlinearity, it will introduce low-frequency jitter, making the control method complex and costly. high.
A sampling resistor is set in the switching circuit and combined with the filter unit to process the sampling signal through low-pass filtering to achieve average current sampling of the inductor current and generate a more precise control signal to adjust the on/off of the power switch tube.
The control accuracy and linearity of the output current are improved, the low-frequency jitter problem caused by forced valley conduction is avoided, the control method is simplified and the cost is reduced.
Smart Images

Figure CN114710856B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power electronics, and in particular to a switch circuit and an LED drive circuit. Background Art
[0002] LED has the advantages of small size, high brightness, low power consumption, low heat generation, long service life and rich colors, and has been widely used in many fields such as lighting and display. At present, LED drivers often use switching power supplies with low power factors (for example, power factors less than 0.7) to drive LEDs. The power switch tube is periodically turned on / off to obtain a stable output on the load. In LED applications, the brightness of LED lamps needs to be adjusted and controlled in some occasions, that is, dimming is achieved by adjusting the average output current of the LED load. Usually, the brightness of the LED load can be adjusted by controlling the on / off of the power switch tube through a dimming control circuit.
[0003] The control scheme of the switch circuit includes a constant on-time control method and a constant off-time control method. Figure 1 The constant on-time control circuit shown and Figure 2 The constant off-time control circuit shown in the figure, the two existing control methods are mostly to set a sampling resistor Rs in the switch circuit, and directly sample the voltage signal V1 across the sampling resistor Rs as the output voltage feedback signal, and obtain a current reference signal after the output voltage feedback signal and the reference voltage signal Vref are passed through the operational amplifier U1 and the compensation unit 1. L ) is compared in the comparator U2, and then converted by the logic circuit to generate the control signal Vgs_Q1 for controlling the power switch tube Q1 to turn off. The dimming signal is used to adjust the size of the reference voltage signal Vref to adjust the size of the output current, thereby realizing the dimming function.
[0004] However, the existing dimming solutions cannot achieve the inductor current I L However, in the discontinuous mode (DCM) of the switching circuit, the inductor current I L Will resonate to negative values, refer to Figure 3 , the turn-on moment of the power switch Q1 in the next cycle occurs at a different position after resonance (for example, corresponding to Figure 3At different moments in the time period t1-t5 in the middle), if this negative value is not sampled into the closed-loop current loop, it will cause a control error of the output current, that is, the output current deviates from the set value. In addition, the average current nonlinearity of the output current will occur. For this situation. The existing technical solutions generally do not take countermeasures for this or simply deal with it by forcing the power switch tube Q1 to turn on at the bottom position of its drain-source voltage Vds_Q1 waveform (referred to as forced valley bottom conduction). Forced valley bottom conduction does not consider the inductor current I L The continuous change of the output current can avoid the problem of nonlinearity of the output current, but forced valley conduction may cause low-frequency jitter of the output current. Therefore, in order to prevent low-frequency jitter, a forced frequency jitter mechanism needs to be added to the circuit to ensure that low-frequency jitter does not occur. The control method is complex and the cost is high.
[0005] Therefore, it is necessary to provide an improved technical solution to overcome the above technical problems existing in the prior art. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a switching circuit and an LED driving circuit, which can eliminate the influence of negative pressure sampling on the sampling accuracy, improve the control accuracy and linearity of the output current of the circuit output, and at the same time will not affect the instantaneous control of the inductor current. The method is simple and easy to implement.
[0007] According to a first aspect of the present invention, there is provided a switch circuit, comprising: a power switch tube and an inductor connected to each other;
[0008] A sampling resistor, used to sample the instantaneous current flowing through the inductor to obtain a first sampling signal;
[0009] A filtering unit, configured to perform low-pass filtering on the first sampling signal and then output a second sampling signal, so as to sample the average current flowing through the inductor;
[0010] A control unit is used to generate a control signal for controlling the power switch tube to be turned on / off according to the first sampling signal and the second sampling signal.
[0011] Optionally, the filtering unit is an RC filtering unit, comprising a first resistor and a first capacitor;
[0012] The first resistor and the first capacitor are connected in series and then connected in parallel with the sampling resistor, and a connection node between the first resistor and the first capacitor outputs the second sampling signal.
[0013] Optionally, the control unit includes:
[0014] The reference current generating circuit is used for converting the second sampling signal into a current signal, and integrating the converted current signal to generate a current reference signal for controlling the inductor current.
[0015] Optionally, the reference current generating circuit includes:
[0016] a transconductance amplifier, wherein the input terminal receives the second sampling signal and the output terminal outputs the converted current signal;
[0017] A second resistor and a second capacitor are connected in series between the output terminal of the transconductance amplifier and a reference ground in sequence, and integrate the converted current signal to generate the current reference signal.
[0018] Optionally, the control unit includes:
[0019] an operational amplifier circuit, configured to perform a differential operation on the second sampling signal and a reference voltage signal;
[0020] The compensation unit is configured to compensate the operation result of the operational amplifier circuit to generate a current reference signal for controlling the inductor current.
[0021] Optionally, the control unit further includes:
[0022] The comparison circuit is configured to compare the current reference signal with the first sampling signal, or to compare the current reference signal with a preset triangular wave signal, and to generate a shutdown trigger signal for the power switch tube according to the comparison result.
[0023] Optionally, the control unit also includes a zero-crossing detection unit, which is configured to obtain the zero-crossing moment of the current on the inductor according to the first sampling signal, and generate a turn-on trigger signal for the power switch tube at the zero-crossing moment or after a preset time starting from the zero-crossing moment.
[0024] Optionally, the triangular wave signal is provided by a signal generator, and the signal generator is configured to start providing the triangular wave signal after the zero-crossing detection unit detects the zero-crossing moment of the current on the inductor.
[0025] Optionally, the control unit further includes a constant off-time control unit, which is configured to generate a turn-on trigger signal for the power switch tube after a fixed time from receiving the turn-off trigger signal.
[0026] The present invention also provides an LED driving circuit, comprising a power switch tube and an inductor connected to each other;
[0027] A sampling resistor, used to sample the instantaneous current flowing through the inductor to obtain a first sampling signal;
[0028] A filtering unit, configured to perform low-pass filtering on the first sampling signal and then output a second sampling signal, so as to sample the average current flowing through the inductor;
[0029] The control unit is used to generate a control signal for controlling the power switch tube to be turned on / off according to the first sampling signal and the second sampling signal, so as to drive the LED.
[0030] Optionally, the filtering unit is an RC filtering unit, comprising a first resistor and a first capacitor;
[0031] The first resistor and the first capacitor are connected in series and then connected in parallel with the sampling resistor, and a connection node between the first resistor and the first capacitor outputs the second sampling signal.
[0032] Optionally, the control unit includes:
[0033] The reference current generating circuit is used for converting the second sampling signal into a current signal, and integrating the converted current signal to generate a current reference signal for controlling the inductor current.
[0034] Optionally, the reference current generating circuit includes:
[0035] a transconductance amplifier, wherein the input terminal receives the second sampling signal and the output terminal outputs the converted current signal;
[0036] A second resistor and a second capacitor are connected in series between the output terminal of the transconductance amplifier and a reference ground in sequence, and integrate the converted current signal to generate the current reference signal.
[0037] Optionally, the control unit includes:
[0038] an operational amplifier circuit, configured to perform a differential operation on the second sampling signal and a reference voltage signal;
[0039] The compensation unit is configured to compensate the operation result of the operational amplifier circuit to generate a current reference signal for controlling the inductor current.
[0040] Optionally, the control unit further includes:
[0041] The comparison circuit is configured to compare the current reference signal with the first sampling signal, or to compare the current reference signal with a preset triangular wave signal, and to generate a shutdown trigger signal for the power switch tube according to the comparison result.
[0042] The beneficial effects of the present invention include at least: the switch circuit and LED drive circuit provided by the present invention can realize sampling of the instantaneous value of the inductor current by setting a sampling resistor in the switch circuit or the LED drive circuit, and at the same time, a filter unit is connected in parallel at both ends of the sampling resistor, and the sampling signal of the sampling resistor is filtered, so that the negative value part of the inductor current in the DCM working mode can be smoothed or even filtered out, so as to realize sampling of the average current of the inductor, overcome the influence of negative pressure sampling on the sampling accuracy, and thus avoid the problem of nonlinearity of the output current of the circuit without the need for forced valley bottom conduction setting, thereby improving the control accuracy and linearity of the output current of the circuit, and at the same time, it will not affect the instantaneous control of the inductor current, and the method is simple and easy to implement.
[0043] It should be noted that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 A schematic diagram showing the structure of a switch circuit in a conventional constant on-time control mode;
[0045] Figure 2 A schematic diagram showing the structure of a switch circuit in an existing constant off-time control mode;
[0046] Figure 3 A schematic diagram showing the timing waveforms of some signals in a switching circuit;
[0047] Figure 4 A schematic diagram showing the structure of a switch circuit in a constant off-time control mode provided in a first embodiment of the present invention is shown;
[0048] Figure 5 A schematic diagram showing the structure of a switch circuit in a constant on-time control mode provided in a first embodiment of the present invention is shown;
[0049] Figure 6 A schematic diagram showing the structure of a switch circuit in a constant off-time control mode provided in a second embodiment of the present invention is shown;
[0050] Figure 7 A schematic diagram of the structure of a switch circuit in a constant on-time control mode provided by a second embodiment of the present invention is shown. DETAILED DESCRIPTION
[0051] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. The preferred embodiments of the present invention are shown in the drawings. However, the present invention can be implemented in different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0052] like Figure 4 and Figure 5 As shown, the switch circuit disclosed in the first embodiment of the present invention takes a step-down circuit as an example, and includes: an input capacitor Ci, an output capacitor Co, a power switch tube Q1, an inductor L, a diode D1, a sampling resistor Rs, a filtering unit 10 and a control unit 20.
[0053] The drain of the power switch tube Q1 is connected to the input end of the circuit to receive the input voltage Vin, the gate of the power switch tube Q1 is connected to the control unit 20, the source of the power switch tube Q1 is connected to the first output end of the circuit via the inductor L, the power switch tube Q1 receives the input voltage Vin, and is turned on / off based on the control signal provided by the control unit 20, thereby generating an output voltage Vo between the first output end and the second output end of the circuit to provide an output current to the load. In a possible embodiment, the power switch tube Q1 is an NMOS field effect transistor.
[0054] The diode D1 is a freewheeling diode, a cathode of which is connected to the source of the power switch tube Q1 , and an anode of which is connected to the reference ground.
[0055] The input capacitor Ci is connected between the drain of the power switch tube Q1 and the reference ground to filter the input voltage Vin. The output capacitor Co is connected between the first output terminal and the second output terminal of the switch circuit.
[0056] The sampling resistor Rs is connected in series in the output loop of the switch circuit. Specifically, the sampling resistor Rs is connected between the second output terminal of the switch circuit and the reference ground to sample the instantaneous current flowing through the inductor L to obtain the first sampling signal V1.
[0057] The filter unit 10 is connected in parallel to the sampling resistor Rs to receive the first sampling signal V1 and output the second sampling signal V2 after low-pass filtering the first sampling signal V1 to sample the average current flowing through the inductor L (ie, the average value of the output current of the circuit).
[0058] Exemplarily, the filter unit 10 disclosed in the embodiment of the present invention includes at least one level of RC filter unit, wherein each level of RC filter unit specifically includes a first resistor R1 and a first capacitor C1. Exemplarily, taking a first-level RC filter unit as an example, the first resistor R1 and the first capacitor C1 are connected in series and then connected in parallel with the sampling resistor Rs, and the filter unit 10 receives a first sampling signal V1 at a connection node between the first resistor R1 and the sampling resistor Rs, and outputs a second sampling signal V2 at a connection node between the first resistor R1 and the first capacitor C1. Based on the working principle of the RC filter unit, it can be known that by reasonably setting the resistance value of the first resistor R1 and the capacitance value of the first capacitor C1 in the RC filter unit, the inductor current I can be smoothed or even filtered. LThe negative part of the inductor current I is used to sample the average current of the inductor L. When setting the resistance value of the first resistor R1 and the capacitance value of the first capacitor C1, it is not necessary to select a larger value. L The negative part of the circuit can be filtered out to reduce the circuit cost.
[0059] Based on the sampling resistor Rs and the filter unit 10, the present invention can simultaneously realize the inductor current I L The instantaneous value and average value of the sampling are sampled, where the characterization of the inductor current I obtained based on the sampling resistor Rs L The first sampling signal V1 of the instantaneous value can be used to realize the instantaneous current based on the inductor L, that is, the inductor current I L The instantaneous value control of the inductor current, such as the zero-crossing detection of the inductor current, the peak value control of the inductor current, etc.; and the inductor current I obtained by the filtering unit 10 L The average value of the second sampling signal V2 is the average value of the inductor L. Since the average current of the inductor L is not sensitive to time, it can overcome the inductor current I in the switching circuit. L The negative value sampling problem is solved, thereby eliminating the influence of negative voltage sampling on the sampling accuracy, so that the present invention does not need to perform forced valley conduction control on the power switch tube Q1, and can also avoid the problem of nonlinearity of the output current of the circuit, thereby improving the control accuracy and linearity of the output current of the circuit.
[0060] The control unit 20 is used for generating a control signal Vgs_Q1 for controlling the power switch tube Q1 to be turned on / off according to the first sampling signal V1 , the second sampling signal V2 and the reference voltage signal Vref.
[0061] Optionally, refer to Figure 4 , the control unit 20 can be configured to realize the on and off control of the power switch tube Q1 in a constant off time control manner. At this time, the control unit 20 further includes: an operational amplifier circuit U1, a compensation unit 1, a comparison circuit U2 and a constant off time control unit 6. Among them, the operational amplifier circuit U1 is configured to receive the second sampling signal V2 and the reference voltage signal Vref, and perform a differential operation on the second sampling signal V2 and the reference voltage signal Vref; the compensation unit 1 is configured to compensate the operation result of the operational amplifier circuit U2 to generate a current reference signal; the comparison circuit U2 is configured to compare the current reference signal with the first sampling signal V1, or to compare the current reference signal with a preset triangular wave signal, and generate a turn-off trigger signal of the power switch tube Q1 according to the comparison result. The constant off time control unit 6 is configured to generate a turn-on trigger signal of the power switch tube Q1 after a fixed time of receiving the turn-off trigger signal. Exemplarily, the constant off time control unit 6 is, for example, a delay unit or a timing unit.
[0062] Optionally, refer to Figure 5 , the control unit 20 can also be configured to realize the on and off control of the power switch tube Q1 in a constant on-time control manner. At this time, the control unit 20 further includes: an operational amplifier circuit U1, a compensation unit 1, a comparison circuit U2 and a zero-crossing detection unit 3. Among them, the operational amplifier circuit U1 is configured to receive the second sampling signal V2 and the reference voltage signal Vref, and perform a differential operation on the second sampling signal V2 and the reference voltage signal Vref; the compensation unit 1 is configured to compensate the operation result of the operational amplifier circuit U2 to generate a current reference signal; the comparison circuit U2 is configured to compare the current reference signal with the first sampling signal V1, or compare the current reference signal with a preset triangular wave signal, and generate a shutdown trigger signal for the power switch tube Q1 according to the comparison result. The zero-crossing detection unit 3 is configured to obtain the zero-crossing moment of the current on the inductor L according to the first sampling signal V1, and generate a conduction trigger signal for the power switch tube Q1 at the zero-crossing moment or after a preset time from the zero-crossing moment. It should be noted that the specific principle of the zero-crossing detection unit 3 obtaining the zero-crossing moment of the current on the inductor L can be understood by referring to the prior art, and the present invention will not be described in detail.
[0063] Exemplarily, when the comparison circuit U2 generates a turn-off trigger signal for the power switch tube Q1 by comparing the current reference signal with a preset triangular wave signal, the triangular wave signal received by the comparison circuit U2 may be provided by the signal generator 2. Furthermore, the signal generator 2 is configured to start providing the triangular wave signal after the zero-crossing detection unit 3 detects the zero-crossing moment of the current on the inductor L, so as to reduce power consumption.
[0064] It should be noted that the reference voltage signal Vref received by the operational amplifier circuit U1 is provided by a reference voltage generating circuit. Optionally, the reference voltage generating circuit may be a subunit provided in the control unit 20, or may be an independent module provided outside the control unit 20. When the switch circuit of the present invention is applied to a lighting system, it may provide a reference voltage signal Vref of different voltage values under the control of an analog dimming signal or a digital dimming signal, so as to adjust the magnitude of the driving current of the driving LED.
[0065] Further, on the basis of the above-mentioned embodiment, the present invention can also set an RS trigger 4 and a driver 5 in the control unit 20 to perform logic conversion on the generated on trigger signal and the off trigger signal. Among them, the reset end of the RS trigger 4 receives the off trigger signal, the set end of the RS trigger 4 receives the on trigger signal, and the output end of the RS trigger 4 is connected to the gate of the power switch tube Q1 through the driver 5 to provide the control signal Vgs_Q1 to the gate of the power switch tube Q1.
[0066] Furthermore, if Figure 6 and Figure 7 As shown, the switch circuit disclosed in the second embodiment of the present invention takes a step-down circuit as an example, and includes: an input capacitor Ci, an output capacitor Co, a power switch tube Q1, an inductor L, a diode D1, a sampling resistor Rs, a filter unit 10, and a control unit 30. Among them, the circuit structure of the switch circuit disclosed in the second embodiment of the present invention is basically the same as that of the switch circuit disclosed in the first embodiment. The similarities can be understood by referring to the above description of the first embodiment, and will not be repeated here.
[0067] The difference is that the control unit 30 in this embodiment is used to generate a control signal for controlling the power switch tube Q1 to be turned on / off according to the first sampling signal V1 and the second sampling signal V2.
[0068] Optionally, refer to Figure 6 , the control unit 30 can be configured to realize the on and off control of the power switch tube Q1 in a constant off time control manner. At this time, the control unit 30 further includes: a reference current generating circuit 7, a comparison circuit U2 and a constant off time control unit 6. Among them, the reference current generating circuit 7 is used to convert the second sampling signal V2 into a current signal, and integrate the converted current signal to generate a current reference signal; the comparison circuit U2 is configured to compare the current reference signal with the first sampling signal V1, or to compare the current reference signal with a preset triangular wave signal, and generate a shutdown trigger signal for the power switch tube Q1 according to the comparison result. The constant off time control unit 6 is configured to generate a turn-on trigger signal for the power switch tube Q1 after a fixed time of receiving the shutdown trigger signal. Exemplarily, the constant off time control unit 6 is, for example, a delay unit or a timing unit.
[0069] Optionally, refer to Figure 7 , the control unit 30 can also be configured to realize the on and off control of the power switch tube Q1 in a constant on-time control manner. At this time, the control unit 30 further includes: a reference current generating circuit 7, a comparison circuit U2 and a zero-crossing detection unit 3. Among them, the reference current generating circuit 7 is used to convert the second sampling signal V2 into a current signal, and integrate the converted current signal to generate a current reference signal; the comparison circuit U2 is configured to compare the current reference signal with the first sampling signal V1, or compare the current reference signal with a preset triangular wave signal, and generate a shutdown trigger signal for the power switch tube Q1 according to the comparison result. The zero-crossing detection unit 3 is configured to obtain the zero-crossing moment of the current on the inductor L according to the first sampling signal V1, and generate a conduction trigger signal for the power switch tube Q1 at the zero-crossing moment or after a preset time from the zero-crossing moment.
[0070] In this embodiment, the reference current generating circuit 7 includes: a transconductance amplifier U3, a second capacitor C2 and a second resistor R2. Among them, the input end of the transconductance amplifier U3 receives the second sampling signal V2, and the output end of the transconductance amplifier U3 outputs the converted current signal. The second capacitor C2 and the second resistor R2 form a series circuit, the first end of the series circuit is connected to the output end of the transconductance amplifier U3, and the second end is connected to the reference ground. In this embodiment, the voltage signal at both ends of the series circuit is the current reference signal generated by integrating the converted current signal. It can be understood that the resistance value of the second resistor R2 and the capacitance value of the second capacitor C2 in the reference current generating circuit 7 should be reasonably set according to the rules of the integration circuit and the actual integration needs, and the second resistor R2 is used to adjust the gain after current integration.
[0071] In this embodiment, the reference current generating circuit 7 provided in the control unit 30 can utilize the transconductance amplifier U3 to convert the voltage-type second sampling signal V2 into a current signal, and utilize the second capacitor C2 to integrate the current signal to generate a current reference signal. In this way, the problem of output signal loss caused by the rapid saturation of the operational amplifier circuit U1 in the process of generating the current reference signal by error comparison (for example, the solution of generating the current reference signal based on the operational amplifier circuit U1 in the first embodiment of the present invention) can be avoided, and the reliability is higher.
[0072] Further, on the basis of the above-mentioned embodiment, the present invention can also set an RS trigger 4 and a driver 5 in the control unit 30 to perform logic conversion on the generated on trigger signal and the off trigger signal. Among them, the reset end of the RS trigger 4 receives the off trigger signal, the set end of the RS trigger 4 receives the on trigger signal, and the output end of the RS trigger 4 is connected to the gate of the power switch tube Q1 through the driver 5 to provide the control signal Vgs_Q1 to the gate of the power switch tube Q1.
[0073] by Figure 4 , Figure 5 , Figure 6 and Figure 7 Taking the switch circuit shown in FIG. 1 as an example, the control unit 20 or the control unit 30 obtains the characteristic inductor current I based on the sampling resistor RS. L The first sampling signal V1 of the instantaneous value of the inductor current I output by the filter unit 10 L The second sampling signal V2 of the average value of the current (i.e., the output current) can realize the precise control of the on and off of the power switch tube Q1, thereby realizing the step-down output of the switch circuit for the input voltage Vin, that is, Figure 4 , Figure 5 , Figure 6 and Figure 7An example of applying the technical solution disclosed in the present application to a buck circuit topology is shown. However, it should be understood that the technical solution disclosed in the present application is also applied to a boost circuit topology. The present invention does not limit this.
[0074] It should be noted that the switch circuit disclosed in each embodiment of the present invention can be applied to the topology field of the switching power supply to realize the boost or buck topology of the switching power supply. It can also be applied to the lighting system such as the LED dimming field. In this case, the above switch circuit can be equivalently regarded as an LED driving circuit for driving the LED.
[0075] In summary, the present invention can realize sampling of the instantaneous value of the inductor current by setting a sampling resistor in the switch circuit, and at the same time, a filter unit is connected in parallel at both ends of the sampling resistor. By filtering the sampling signal of the sampling resistor, the negative value part of the inductor current can be smoothed or even filtered out, and the average current of the inductor can be sampled, which overcomes the influence of negative pressure sampling on the sampling accuracy, and thus does not need to perform a forced valley bottom conduction setting, and can also avoid the problem of nonlinear output current of the circuit, thereby improving the control accuracy and linearity of the output current of the circuit, and at the same time, it will not affect the instantaneous control of the inductor current, and the method is simple and easy to implement. The present invention does not sample the output current but obtains the average inductor current by filtering the inductor current, and only requires one sampling node.
[0076] Finally, it should be noted that: Obviously, the above embodiments are only examples for clearly explaining the present invention, and are not intended to limit the implementation methods. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection of the present invention.
Claims
1. A switching circuit, wherein: include: The connected power switch tube and inductor; A sampling resistor, used to sample the instantaneous current flowing through the inductor to obtain a first sampling signal; A filtering unit, configured to perform low-pass filtering on the first sampling signal and then output a second sampling signal, so as to sample the average current flowing through the inductor; a control unit, configured to generate a control signal for controlling the on / off of the power switch tube according to the first sampling signal and the second sampling signal, Wherein, the control unit comprises: an operational amplifier circuit, configured to perform a differential operation on the second sampling signal and a reference voltage signal to generate a current reference signal; The comparison circuit is configured to compare the current reference signal with the first sampling signal, and generate a shutdown trigger signal for the power switch tube according to the comparison result.
2. The switch circuit according to claim 1, wherein: The filtering unit is an RC filtering unit, comprising a first resistor and a first capacitor; The first resistor and the first capacitor are connected in series and then connected in parallel with the sampling resistor, and a connection node between the first resistor and the first capacitor outputs the second sampling signal.
3. The switch circuit according to claim 1, wherein: The operational amplifier circuit is replaced by a reference current generating circuit. The reference current generating circuit is used for converting the second sampling signal into a current signal, and integrating the converted current signal to generate a current reference signal for controlling the inductor current.
4. The switch circuit according to claim 3, wherein: The reference current generating circuit comprises: a transconductance amplifier, wherein the input terminal receives the second sampling signal and the output terminal outputs the converted current signal; A second resistor and a second capacitor are connected in series between the output terminal of the transconductance amplifier and a reference ground in sequence, and integrate the converted current signal to generate the current reference signal.
5. The switch circuit according to claim 1, wherein: The control unit also includes: The compensation unit is configured to generate the current reference signal after compensating the operation result of the operational amplifier circuit to control the inductor current.
6. The switch circuit according to any one of claims 3 to 5, wherein: The comparison circuit is replaced by: comparing the current reference signal with a preset triangular wave signal, and generating a shutdown trigger signal for the power switch tube according to the comparison result; The triangular wave signal starts to be provided after the zero-crossing moment of the current in the inductor, and the zero-crossing moment of the current in the inductor is obtained according to the first sampling signal.
7. The switch circuit according to claim 6, wherein: The control unit also includes a zero-crossing detection unit, which is configured to obtain a zero-crossing moment of the current on the inductor according to the first sampling signal, and generate a turn-on trigger signal for the power switch tube at the zero-crossing moment or after a preset time starting from the zero-crossing moment.
8. The switch circuit according to claim 7, wherein: The triangular wave signal is provided by a signal generator.
9. The switch circuit according to claim 6, wherein: The control unit further includes a constant off-time control unit, which is configured to generate a turn-on trigger signal for the power switch tube after a fixed time from receiving the turn-off trigger signal.
10. An LED driving circuit, comprising: The connected power switch tube and inductor; A sampling resistor, used to sample the instantaneous current flowing through the inductor to obtain a first sampling signal; A filtering unit, configured to perform low-pass filtering on the first sampling signal and then output a second sampling signal, so as to sample the average current flowing through the inductor; a control unit, configured to generate a control signal for controlling the power switch tube to be turned on / off according to the first sampling signal and the second sampling signal, so as to drive the LED; Wherein, the control unit comprises: an operational amplifier circuit, configured to perform a differential operation on the second sampling signal and a reference voltage signal to generate a current reference signal; The comparison circuit is configured to compare the current reference signal with the first sampling signal, and generate a shutdown trigger signal for the power switch tube according to the comparison result.
11. The LED driving circuit according to claim 10, wherein: The filtering unit is an RC filtering unit, comprising a first resistor and a first capacitor; The first resistor and the first capacitor are connected in series and then connected in parallel with the sampling resistor, and a connection node between the first resistor and the first capacitor outputs the second sampling signal.
12. The LED driving circuit according to claim 10, wherein: The operational amplifier circuit is replaced by a reference current generating circuit. The reference current generating circuit is used for converting the second sampling signal into a current signal, and integrating the converted current signal to generate a current reference signal for controlling the inductor current.
13. The LED driving circuit according to claim 12, wherein: The reference current generating circuit comprises: a transconductance amplifier, wherein the input terminal receives the second sampling signal and the output terminal outputs the converted current signal; A second resistor and a second capacitor are connected in series between the output terminal of the transconductance amplifier and a reference ground in sequence, and integrate the converted current signal to generate the current reference signal.
14. The LED driving circuit according to claim 10, wherein: The control unit also includes: The compensation unit is configured to generate the current reference signal after compensating the operation result of the operational amplifier circuit to control the inductor current.
15. The LED driving circuit according to any one of claims 12 to 14, wherein: The comparison circuit is replaced by: comparing the current reference signal with a preset triangular wave signal, and generating a shutdown trigger signal for the power switch tube according to the comparison result; The triangular wave signal starts to be provided after the zero-crossing moment of the current in the inductor, and the zero-crossing moment of the current in the inductor is obtained according to the first sampling signal.
