VOLTAGE CONVERSION CIRCUIT, VOLTAGE CONVERTER, AND ELECTRONIC DEVICE

20230327560 · 2023-10-12

Assignee

Inventors

Cpc classification

International classification

Abstract

This application discloses a voltage conversion circuit, a voltage converter, and an electronic device. The voltage conversion circuit mainly includes a detection circuit having a first detection resistor and a second detection resistor, and a buck-boost circuit of an H-bridge structure. The first detection resistor is connected between one input end of the buck-boost circuit and one bridge arm of the H-bridge structure, the second detection resistor is connected between one output end of the buck-boost circuit and the other bridge arm of the H-bridge structure, and the detection circuit may output a current detection signal based on resistor voltages of the first detection resistor and the second detection resistor.

Claims

1. A voltage conversion circuit, comprising a detection circuit having a first resistor and a second resistor, and a buck-boost circuit having an H-bridge structure, wherein: the buck-boost circuit comprises a first bridge arm, a second bridge arm, and an inductor coupled between the first bridge arm and the second bridge arm, two ends of the first bridge arm are connected to two ends of the second bridge arm in a one-to-one correspondence, one end of the first bridge arm is connected to one input end of the buck-boost circuit through the first detection resistor, the other end of the first bridge arm is connected to the other input end of the buck-boost circuit, one end of the second bridge arm is connected to one output end of the buck-boost circuit through the second detection resistor, and the other end of the second bridge arm is connected to the other output end of the buck-boost circuit; and the detection circuit is configured to: separately performing voltage sampling on a first resistor voltage of the first detection resistor and a second resistor voltage of the second detection resistor; and output a current detection signal based on a maximum voltage in the first resistor voltage and the second resistor voltage, wherein the maximum voltage in the first resistor voltage and the second resistor voltage is a voltage of a detection resistor through which an inductor current of the inductor passes, and the current detection signal is used to indicate a value of the inductor current.

2. The voltage conversion circuit according to claim 1, wherein one end of the first bridge arm is connected to a low-potential input end of the buck-boost circuit through the first detection resistor, and the other end of the first bridge arm is connected to a high-potential input end of the buck-boost circuit; and one end of the second bridge arm is connected to a low-potential output end of the buck-boost circuit through the second detection resistor, and the other end of the second bridge arm is connected to a high-potential output end of the buck-boost circuit.

3. The voltage conversion circuit according to claim 1, wherein the buck-boost circuit further comprises an input capacitor, one end of the input capacitor is connected to the high-potential input end of the buck-boost circuit, the other end of the input capacitor is connected to the low-potential input end of the buck-boost circuit, and the first detection resistor is located between the input capacitor and the first bridge arm.

4. The voltage conversion circuit according to claim 2, wherein the buck-boost circuit further comprises an input capacitor, one end of the input capacitor is connected to the high-potential input end of the buck-boost circuit, the other end of the input capacitor is connected to the low-potential input end of the buck-boost circuit, and the first detection resistor is located between the input capacitor and the first bridge arm.

5. The voltage conversion circuit according to claim 1, wherein the buck-boost circuit further comprises an output capacitor, one end of the output capacitor is connected to the high-potential output end of the buck-boost circuit, the other end of the output capacitor is connected to the low-potential output end of the buck-boost circuit, and the second detection resistor is located between the output capacitor and the second bridge arm.

6. The voltage conversion circuit according to claim 1, wherein the detection circuit further comprises a first sampling circuit, a second sampling circuit, and a combiner circuit; the first sampling circuit is separately connected to two ends of the first detection resistor and the combiner circuit, and the second sampling circuit is separately connected to two ends of the second detection resistor and the combiner circuit; the first sampling circuit is configured to output a first sampled signal to the combiner circuit based on the first resistor voltage of the first detection resistor, wherein a voltage of the first sampled signal meets a positive correlation with the first resistor voltage; the second sampling circuit is configured to output a second sampled signal to the combiner circuit based on the second resistor voltage of the second detection resistor, wherein a voltage of the second sampled signal meets a positive correlation with the second resistor voltage; and the combiner circuit is configured to output the current detection signal based on a maximum voltage in the first sampled signal and the second sampled signal.

7. The voltage conversion circuit according to claim 6, wherein the first sampling circuit comprises a first operational amplifier circuit, one input end of the first operational amplifier circuit is connected to one end of the first resistor, the other input end of the first operational amplifier circuit is connected to the other end of the first resistor, and an output end of the first operational amplifier circuit is configured to output the first sampled signal.

8. The voltage conversion circuit according to claim 6, wherein the second sampling circuit comprises a second operational amplifier circuit, one input end of the second operational amplifier circuit is connected to one end of the second resistor, the other input end of the second operational amplifier circuit is connected to the other end of the second resistor, and an output end of the second operational amplifier circuit is configured to output the second sampled signal.

9. The voltage conversion circuit according to claim 7, wherein the second sampling circuit comprises a second operational amplifier circuit, one input end of the second operational amplifier circuit is connected to one end of the second resistor, the other input end of the second operational amplifier circuit is connected to the other end of the second resistor, and an the second operational amplifier circuit is configured to output the second sampled signal.

10. The voltage conversion circuit according to claim 6, wherein the combiner circuit comprises a first diode and a second diode, an anode of the first diode is connected to the first sampling circuit, an anode of the second diode is connected to the second sampling circuit, a cathode of the first diode is connected to a cathode of the second diode through a first connection point, and the first connection point is configured to output the current detection signal.

11. The voltage conversion circuit according to claim 7, wherein the combiner circuit comprises a first diode and a second diode, an anode of the first diode is connected to the first sampling circuit, an anode of the second diode is connected to the second sampling circuit, a cathode of the first diode is connected to a cathode of the second diode through a first connection point, and the first connection point is configured to output the current detection signal.

12. The voltage conversion circuit according to claim 10, wherein the combiner circuit further comprises a third operational amplifier circuit and a fourth operational amplifier circuit; one input end of the fourth operational amplifier circuit is connected to the second sampling circuit, and is configured to receive the second sampled signal; the other input end of the fourth operational amplifier circuit is connected to the cathode of the second diode, and an output end of the fourth operational amplifier circuit is connected to the anode of the second diode; one input end of the third operational amplifier circuit is connected to the first sampling circuit, and is configured to receive the first sampled signal; and the other input end of the third operational amplifier circuit is connected to the cathode of the first diode, and an output end of the third operational amplifier circuit is connected to the anode of the first diode.

13. The voltage conversion circuit according to claim 10, wherein the combiner circuit further comprises a ground resistor, one end of the ground resistor is connected to the first connection point, and the other end of the ground resistor is grounded.

14. The voltage conversion circuit according to claim 1, wherein the buck-boost circuit comprises a plurality of first bridge arms, a plurality of second bridge arms, and a plurality of inductors; and the plurality of first bridge arms are connected in parallel, the plurality of second bridge arms are connected in parallel, the plurality of inductors are connected to the plurality of first bridge arms and the plurality of second bridge arms in a one-to-one correspondence, one end of each inductor is connected to a first bridge arm corresponding to each inductor, and the other end of each inductor is connected to a second bridge arm corresponding to each inductor.

15. An electronic device, comprising: a voltage conversion circuit; a detection circuit having a first detection resistor and a second detection resistor, a buck-boost circuit of an H-bridge structure: and wherein: the buck-boost circuit comprises a first bridge arm, a second bridge arm, and an inductor, the inductor is located between the first bridge arm and the second bridge arm, two ends of the first bridge arm are connected to two ends of the second bridge arm in a one-to-one correspondence, one end of the first bridge arm is connected to one input end of the buck-boost circuit through the first detection resistor, the other end of the first bridge arm is connected to the other input end of the buck-boost circuit, one end of the second bridge arm is connected to one output end of the buck-boost circuit through the second detection resistor, and the other end of the second bridge arm is connected to the other output end of the buck-boost circuit; and the detection circuit is configured to: separately performing voltage sampling on a first resistor voltage of the first detection resistor and a second resistor voltage of the second detection resistor; and output a current detection signal based on a maximum voltage in the first resistor voltage and the second resistor voltage, wherein the maximum voltage in the first resistor voltage and the second resistor voltage is a voltage of a detection resistor through which an inductor current of the inductor passes, and the current detection signal is used to indicate a value of the inductor current.

16. The electronic device according to claim 15, wherein one end of the first bridge arm is connected to a low-potential input end of the buck-boost circuit through the first detection resistor, and the other end of the first bridge arm is connected to a high-potential input end of the buck-boost circuit; and one end of the second bridge arm is connected to a low-potential output end of the buck-boost circuit through the second detection resistor, and the other end of the second bridge arm is connected to a high-potential output end of the buck-boost circuit.

17. The electronic device according to claim 15, wherein the buck-boost circuit further comprises an input capacitor, one end of the input capacitor is connected to the high-potential input end of the buck-boost circuit, the other end of the input capacitor is connected to the low-potential input end of the buck-boost circuit, and the first detection resistor is located between the input capacitor and the first bridge arm.

18. The electronic device according to claim 16, wherein the buck-boost circuit further comprises an input capacitor, one end of the input capacitor is connected to the high-potential input end of the buck-boost circuit, the other end of the input capacitor is connected to the low-potential input end of the buck-boost circuit, and the first detection resistor is located between the input capacitor and the first bridge arm.

Description

BRIEF DESCRIPTION OF DRAWINGS

[0030] FIG. 1 is a schematic diagram of a structure of a voltage converter;

[0031] FIG. 2a is a schematic diagram of a structure of a buck-boost circuit;

[0032] FIG. 2b to FIG. 2e are schematic diagrams of a switching status of a buck-boost circuit;

[0033] FIG. 3 is a schematic diagram of a structure of a voltage converter according to an embodiment of this application;

[0034] FIG. 4 is a schematic diagram of a structure of a buck-boost circuit according to an embodiment of this application;

[0035] FIG. 5a is a schematic diagram of current changes in detection resistors according to an embodiment of this application;

[0036] FIG. 5b is a schematic diagram of a switching status of a buck-boost circuit according to an embodiment of this application;

[0037] FIG. 5c is a schematic diagram of a switching status of a buck-boost circuit according to an embodiment of this application;

[0038] FIG. 6a is a schematic diagram of current changes in detection resistors according to an embodiment of this application;

[0039] FIG. 6b is a schematic diagram of a switching status of a buck-boost circuit according to an embodiment of this application;

[0040] FIG. 6c is a schematic diagram of a switching status of a buck-boost circuit according to an embodiment of this application;

[0041] FIG. 7 is a schematic diagram of a structure of a detection circuit according to an embodiment of this application; and

[0042] FIG. 8 is a schematic diagram of a structure of a combiner circuit according to an embodiment of this application.

DESCRIPTION OF EMBODIMENTS

[0043] To make the objectives, technical solutions, and advantages of this application clearer, the following further describes this application in detail with reference to the accompanying drawings. It should be noted that, in description of this application, “at least one” means one or more, and “a plurality of” means two or more. In view of this, “a plurality of” may also be understood as “at least two” in embodiments of the present invention. The term “and/or” describes an association relationship for describing associated objects and indicates that three relationships may exist. For example, A and/or B may indicate the following three cases: Only A exists, both A and B exist, and only B exists. In addition, unless otherwise specified, the character “/” usually indicates an “or” relationship between associated objects. In addition, it should be understood that in the descriptions of this application, terms such as “first” and “second” are merely used for distinguishing and description, but should not be understood as indicating or implying relative importance, or should not be understood as indicating or implying a sequence.

[0044] It should be noted that the “connection” in embodiments of this application refers to an electric connection, and the connection between two electrical elements may be a direct or indirect connection between the two electrical elements. For example, a connection between A and B may represent that A and B are directly connected to each other, or A and B are indirectly connected to each other by using one or more other electrical elements. For example, the connection between A and B may also represent that A is directly connected to C, C is directly connected to B, and A and B are connected to each other through C. In some scenarios, “connection” may also be understood as coupling, such as electromagnetic coupling between two inductors. In conclusion, A is connected to B, so that electric energy can be transmitted between A and B.

[0045] The following further describes in detail this application.

[0046] A buck-boost circuit is a common voltage (current) conversion circuit, and can implement both buck conversion and boost conversion. Therefore, the buck-boost circuit may be applied to voltage converters in many power systems. FIG. 1 shows an example of a voltage converter. As shown in FIG. 1, a voltage converter 10 mainly includes a buck-boost circuit 11, a controller 12, and a detection circuit 13. The Buck- Boost circuit 11 is separately connected to the controller 12 and the detection circuit 13, and the controller 12 is connected to the detection circuit 13. Specifically:

Buck-boost Circuit 11

[0047] The buck-boost circuit 11 is also commonly referred to as a buck-boost conversion circuit. Specifically, when the buck-boost circuit 11 performs buck conversion, an input voltage Vi of the buck-boost circuit 11 is greater than an output voltage Vo. When the buck-boost circuit 11 performs boost conversion, an input voltage Vi of the buck-boost circuit is less than an output voltage Vo.

[0048] The buck-boost circuit 11 can implement both buck conversion and boost conversion, so that the voltage converter 10 having the buck-boost circuit 11 is widely applied to many power systems. For example, the voltage converter 10 may be a power electronic converter in a power management system of an electric/a hybrid vehicle, may be a battery management system (battery management system, BMS) in a photovoltaic power generation system, or may be a direct current distribution unit in a communications power supply system, or the like. Examples are not listed one by one in this application.

[0049] For example, FIG. 2a is a schematic diagram of a structure of a buck-boost circuit. As shown in FIG. 2a, the buck-boost circuit 11 has an H-bridge structure. The buck-boost circuit 11 mainly includes a bridge arm 111, a bridge arm 112, and an inductor 113, and the inductor 13 is located between the bridge arm 111 and the bridge arm 112.

[0050] In the buck-boost circuit 11, the bridge arm 111 and the bridge arm 112 mainly include a plurality of switching transistors. Charging or discharging of the inductor 113 may be adjusted by changing conduction or opening of the switching transistors. For example, as shown in FIG. 2a, the bridge arm 111 includes a switching transistor S1 and a switching transistor S2, a second electrode of the switching transistor S1 is connected to a first electrode of the switching transistor S2, and a first electrode of the switching transistor S1 and a second electrode of the switching transistor S2 may receive an input voltage V.sub.i. The bridge arm 112 includes a switching transistor S3 and a switching transistor S4, a second electrode of the switching transistor S3 is connected to a first electrode of the switching transistor S4, and a first electrode of the switching transistor S3 and a second electrode of the switching transistor S4 may output an output voltage V.sub.o. One end of the inductor 113 is connected to the second electrode of the switching transistor S1, and the other end of the inductor 13 is connected to the second electrode of the switching transistor S4.

[0051] Usually, the buck-boost circuit 11 may further include an input capacitor C.sub.i. One end of the input capacitor C.sub.i is connected to a high-potential input end of the buck-boost circuit 11, and the other end of the input capacitor C.sub.i is connected to a low-potential input end of the buck-boost circuit 11. The input capacitor C.sub.i may filter the input voltage V.sub.i to reduce a ripple of the input voltage V.sub.i.

[0052] In addition, the buck-boost circuit 11 may further include an output capacitor C.sub.o. One end of the input capacitor C.sub.o is connected to a high-potential output end of the buck-boost circuit 11, and the other end of the input capacitor C.sub.o is connected to a low-potential output end of the buck-boost circuit 11. The output capacitor C.sub.o may filter the output voltage V.sub.o, so that the buck-boost circuit 11 can further continuously output stable output voltages V.sub.o.

[0053] Based on the buck-boost circuit 11 shown in FIG. 2a, voltage conversion of the buck-boost circuit 11 may be implemented by controlling the switching transistor S1 to the switching transistor S4 to be cyclically conducted or opened.

[0054] During buck conversion, each cycle mainly includes the following phases:

[0055] Inductor charging phase: States of the switching transistors in the buck-boost circuit 11 may be shown in FIG. 2b. The switching transistor S1 and the switching transistor S3 are conducted, and the switching transistor S2 and the switching transistor S4 are open.

[0056] An arrow in FIG. 2b shows a current transmission direction. As shown in FIG. 2b, a current is input from the high-potential input end of the buck-boost circuit 11, sequentially flows through the switching transistor S1, the inductor 113, and the switching transistor S3, and is output from the high-potential output end of the buck-boost circuit 11 through the first electrode of the switching transistor S3; and a returning current is input from the low-potential output end of the buck-boost circuit 11, and is output from the low-potential input end of the buck-boost circuit 11.

[0057] In this case, one end that is of the inductor 113 and that is near the switching transistor S1 is at a high potential, and the potential of the end is equal to a potential of the high-potential input end of the buck-boost circuit 11. In this case, the other end that is of the inductor 113 and that is near the switching transistor S3 is at a low potential, and the potential of the end is equal to a potential of the high-potential output end of the buck-boost circuit 11. Because the low-potential input end of the buck-boost circuit 11 is equipotentially connected to the low-potential output end, a voltage of the inductor 113 is V.sub.i-V.sub.o.

[0058] The voltage of the inductor 113 may be understood as a potential difference obtained by subtracting the potential of the other end that is of the inductor 113 and that is near the switching transistor S3 from the potential of the end that is of the inductor 113 and that is near the switching transistor S1. For ease of description, in subsequent embodiments, a voltage of the inductor 113 can be likewise understood, and is not described in detail again.

[0059] A current flowing through the inductor 113 may also be referred to as an inductor current i.sub.L. Because the inductor current i.sub.L cannot be instantly increased, the inductor current i.sub.L gradually increases after the switching transistor S1 and the switching transistor S3 are conducted. In addition, because the input voltage V.sub.i is greater than the output voltage V.sub.o during buck conversion, in this process, the voltage V.sub.i-V.sub.o of the inductor 113 is greater than 0, and the inductor 113 is charged.

[0060] Inductor freewheeling phase: States of the switching transistors in the buck-boost circuit 11 may be shown in FIG. 2c. The switching transistor S1 is open, the switching transistor S2 is conducted, the switching transistor S3 is kept conducted, and the switching transistor S4 is kept open.

[0061] An arrow in FIG. 2c shows a current transmission direction. As shown in FIG. 2c, a current is output from the other end that is of the inductor 113 and that is near the switching transistor S3, and is output from the high-potential output end of the buck-boost circuit 11 through the first electrode of the switching transistor S3. A returning current is input from the low-potential output end of the buck-boost circuit 11, and is returned, through the switching transistor S2, to the end that is of the inductor 113 and that is near the switching transistor S1.

[0062] In this case, the end that is of the inductor 113 and that is near the switching transistor S1 is at a low potential, and the low potential of the end is equal to a potential of the low-potential output end of the buck-boost circuit 11. The other end that is of the inductor 113 and that is near the switching transistor S3 is at a high potential, and the potential of the end is equal to a potential of the high-potential output end of the buck-boost circuit 11. Further, it can be learned that a voltage of the inductor 113 is -V.sub.o.

[0063] Because an inductor current i.sub.L cannot be instantly zeroed, the inductor current i.sub.L gradually decreases after the switching transistor S1 is open. In addition, because the voltage of the inductor 113 is -V.sub.o in this case, the inductor 113 starts to discharge. This process may also be referred to as inductor 113 freewheeling. An inductor current i.sub.L output by the inductor 113 is output through the switching transistor S3.

[0064] Assuming that duration of the inductor charging phase and duration of the inductor discharging phase are equal and are both t, it can be learned according to a volt-second balance principle that (V.sub.i-V.sub.o)t-V.sub.ot=0. Further, it can be learned that V.sub.o=V.sub.i/2. Therefore, buck conversion of the buck-boost circuit 11 can be implemented by using the inductor charging phase and the inductor discharging phase.

[0065] During boost conversion, each cycle mainly includes the following phases:

[0066] Inductor charging phase: States of the switching transistors in the buck-boost circuit 11 may be shown in FIG. 2d. The switching transistor S1 and the switching transistor S4 are conducted, and the switching transistor S2 and the switching transistor S3 are open.

[0067] An arrow in FIG. 2d shows a current transmission direction. As shown in FIG. 2d, a current is input from a first electrode of the switching transistor S1, sequentially flows through the switching transistor S1, the inductor 113, and the switching transistor S4, and is output from the low-potential input end of the buck-boost circuit 11.

[0068] In this case, the end that is of the inductor 113 that is near the switching transistor S1 is at a high potential, and the potential of the end is equal to a potential of the high-potential input end of the buck-boost circuit 11. The other end that is of the inductor 113 that is near the switching transistor S3 is at a low potential, and the potential of the end is equal to a potential of the low-potential input end of the buck-boost circuit 11. Therefore, a voltage of the inductor 113 is V.sub.i.

[0069] In this phase, the inductor 113 is charged, the output capacitor C.sub.o is discharged, and the output voltage V.sub.o is equal to a voltage of the output capacitor C.sub.o.

[0070] Inductor discharging phase: States of the switching transistors in the buck-boost circuit 11 may be shown in FIG. 2e. The switching transistor S3 is conducted, the switching transistor S4 is open, the switching transistor S1 is kept conducted, and the switching transistor S2 is kept opening.

[0071] An arrow in FIG. 2e shows a current transmission direction. As shown in FIG. 2e, a current is input from the high-potential input end of the buck-boost circuit 11, and is output from the high-potential output end of the buck-boost circuit 11 through the switching transistor S3 after being transmitted through the inductor 113. A returning current is input from the low-potential output end of the buck-boost circuit 11, and is output from the low-potential input end of the buck-boost circuit 11.

[0072] In this case, the end that is of the inductor 113 and that is near the switching transistor S1 is at a low potential, and the potential of the end is equal to a potential of the high-potential output end of the buck-boost circuit 11. The end that is of the inductor 113 and that is near the switching transistor S3 is at a high potential, and the potential of the end is equal to a potential of the high-potential output end of the buck-boost circuit 11. Because the low-potential input end of the buck-boost circuit 11 is equipotentially connected to the low-potential output end, a voltage of the inductor 113 is V.sub.i-V.sub.o.

[0073] Because an inductor current i.sub.L cannot be instantly zeroed, the inductor current i.sub.L gradually decreases after the switching transistor S1 and the switching transistor S3 are conducted. In addition, because the input voltage V.sub.i is less than the output voltage V.sub.o during boost conversion, in this process, the voltage V.sub.i-V.sub.o of the inductor 113 is less than 0, and the inductor 113 is discharged.

[0074] Assuming that duration of the inductor charging phase and duration of the inductor discharging phase are equal and are both t, it can be learned according to the volt-second balance principle that V.sub.it+(V.sub.i-V.sub.o)t=0. Further, it can be learned that V.sub.o=2V.sub.i. Therefore, boost conversion of the buck-boost circuit 11 can be implemented by using the inductor charging phase and the inductor discharging phase.

Controller 12

[0075] The controller 12 may separately provide a same control signal or different control signals for the switching transistors S1 to S4, to separately control the switching transistors S1 to S4 to be conducted or open. Further, the foregoing voltage conversion of the buck-boost circuit 11 can be implemented. For example, the controller 12 may be a logic circuit capable of generating a control signal. For example, the controller 12 may be a general-purpose central processing unit (central processing unit, CPU), a general-purpose processor, digital signal processor (digital signal processing, DSP), or an application-specific integrated circuit (application-specific integrated circuits, ASIC), a field programmable gate array (field programmable gate array, FPGA), a microcontroller unit (microcontroller unit, MCU), another programmable logic device, a transistor logic device, a hardware component, or any combination thereof.

Detection Circuit 13

[0076] The detection circuit 13 may detect an operating status of the buck-boost circuit 11, and feed back detected operating status information to the controller 12, so that the controller 12 can adjust, based on the operating state information of the buck-boost circuit 11, control signals provided for the switching transistor S1 to the switching transistor S4. That is, the controller 12 can implement closed-loop control on the buck-boost circuit 11 by using the detection circuit 13.

[0077] In some application scenarios of the buck-boost circuit 11, an inductor current i.sub.L in the buck-boost circuit 11 usually needs to be detected by using the detection circuit 13. For example, the inductor current i.sub.L detected by the detection circuit 13 may be used for closed-loop control. The controller 12 may adjust, based on the inductor current i.sub.L detected by the detection circuit 13, control signals provided for the switching transistors S1 to S4, to implement closed-loop control.

[0078] In addition, the inductor current detected by the detection circuit 13 may be used for over current protection (over current protection, OCP). For example, when the inductor current i.sub.L detected by the detection circuit 13 exceeds a current threshold, the controller 12 may control the buck-boost circuit 11 to stop performing voltage conversion on the input voltage V.sub.i.

[0079] It may be understood that the foregoing describes only two common application scenarios of the inductor current i.sub.L, and other possible application scenarios are not listed one by one in this application.

[0080] In some current detection solutions, the detection circuit 13 mainly includes a current sensor, and the current sensor is a Hall element connected to the inductor 113 in series. When the inductor 113 is charged or discharged, an output signal of the current sensor changes. Therefore, the controller 12 can determine a value of a current inductor current i.sub.L based on an output signal of the current sensor.

[0081] However, at present, costs of most current sensors are relatively high. This does not help save costs of the voltage converter 10. In addition, because the current sensor detects an inductor current i.sub.L based on the Hall effect, a detection latency of the current sensor is relatively large, and consequently application of the inductor current i.sub.L in some scenarios is limited. For example, in an OCP scenario, because a detection latency of the current sensor is relatively large, it is possible that when the inductor current i.sub.L is excessively large, the controller 12 cannot immediately control the buck-boost circuit 11 to stop operating, and consequently a damage risk of the buck-boost circuit 11 is increased.

[0082] In view of this, an embodiment of this application provides a detection circuit, and the detection circuit includes a first detection resistor and a second detection resistor. The first detection resistor and the second detection resistor may be connected to a buck-boost circuit. Regardless of whether the buck-boost circuit is in any one of the states shown in FIG. 2b to FIG. 2e, an inductor current i.sub.L can flow through at least one of the first detection resistor and the second detection resistor. Therefore, the detection circuit can detect the inductor current i.sub.L based on the first detection resistor and the second detection resistor.

[0083] FIG. 3 is a schematic diagram of an example structure of a voltage converter according to an embodiment of this application. As shown in FIG. 3, a voltage converter 30 mainly includes a buck-boost circuit 31 and a detection circuit 33. In a possible implementation, the voltage converter 30 may further include a controller 32, and the controller 32 may control the buck-boost circuit 31 to perform voltage conversion. In addition, the controller 32 may also receive a current detection signal provided by the detection circuit 33. A specific implementation of the controller 32 is similar to that of the foregoing controller 12, and is not described in detail herein.

[0084] As shown in FIG. 3, the buck-boost circuit 31 has an H-bridge structure, including a bridge arm 311, a bridge arm 312, and an inductor 313, and the inductor 313 is located between the bridge arm 311 and the bridge arm 312. It can be learned from FIG. 3 that the H-bridge structure in the buck-boost circuit 31 mainly includes the inductor 313, the bridge arm 311, and the bridge arm 312, and the H-bridge structure is similar to the H-bridge structure (mainly including the inductor 113, the bridge arm 111, and the bridge arm 112) in the buck-boost circuit 11. Repeated parts are not described again.

[0085] In this embodiment of this application, a switching transistor S1 to a switching transistor S4 each may be one or more of a plurality of types of switching transistors, such as a relay, a metal-oxide-semiconductor field-effect transistor (metal oxide semiconductor field effect transistor, MOSFET), a bipolar junction transistor (bipolar junction transistor, BJT), and an insulated gate bipolar transistor (insulated gate bipolar transistor, IGBT). Examples are not listed one by one in this embodiment of this application.

[0086] It should be noted that the H-bridge structure in the buck-boost circuit 31 in FIG. 3 is merely an example. In a specific implementation structure, the buck-boost circuit 31 may be alternatively implemented in another type of manner. For example, as shown in FIG. 4, the bridge arm 311 may include N first bridge arms 311, N second bridge arms 312, and N inductors 113 (an inductor 113-1 to an inductor 113-N), where N is an integer greater than or equal to 1.

[0087] Specifically, a switching transistor S11 and a switching transistor S12 belong to a same first bridge arm, a switching transistor S21 and a switching transistor S22 belong to a same first bridge arm, ..., and a switching transistor SN1 and a switching transistor SN2 belong to a same first bridge arm. A switching transistor S13 and a switching transistor S14 belong to a same second bridge arm, a switching transistor S23 and a switching transistor S24 belong to a same second bridge arm, ..., and a switching transistor SN3 and a switching transistor SN4 belong to a same second bridge arm.

[0088] As shown in FIG. 4, the N first bridge arms are connected in parallel, and the N second bridge arms are connected in parallel. Specifically, a first electrode of the switching transistor S11 to a first electrode of the switching transistor SN1 are all connected to a high-potential input end of the buck-boost circuit 31, a first electrode of the switching transistor S12 to a second electrode of the switching transistor SN2 are all connected to a low-potential input end of the buck-boost circuit 31, a first electrode of the switching transistor S13 to a first electrode of the switching transistor SN3 are all connected to a high-potential output end of the buck-boost circuit 31, and a first electrode of the switching transistor S14 to a second electrode of the switching transistor SN4 are all connected to a low-potential output end of the buck-boost circuit 31.

[0089] The N inductors in the buck-boost circuit 31 are connected to the N first bridge arms and the N second bridge arms in a one-to-one correspondence, one end of each inductor is connected to a corresponding first bridge arm, and the other end of each inductor is connected to a corresponding second bridge arm. For example, in FIG. 4, one end of the inductor 313-1 is connected to the first bridge arm in which the switching transistor S11 and the switching transistor S12 are located, and the other end of the inductor 313-1 is connected to the second bridge arm in which the switching transistor S13 and the switching transistor S14 are located. One end of the inductor 313-2 is connected to the first bridge arm in which the switching transistor S21 and the switching transistor S22 are located, and the other end of the inductor 313-2 is connected to the second bridge arm in which the switching transistor S23 and the switching transistor S24 are located. One end of the inductor 313-N is connected to the first bridge arm in which the switching transistor SN1 and the switching transistor SN2 are located, and the other end of the inductor 313-N is connected to the second bridge arm in which the switching transistor SN3 and the switching transistor SN4 are located.

[0090] For ease of understanding, next, this embodiment of this application provides descriptions by using, as an example, the buck-boost circuit 31 shown in FIG. 3. It should be noted that this embodiment of this application is also applicable to a scenario in which the buck-boost circuit 31 includes two or more inductors 313.

[0091] As shown in FIG. 3, the detection circuit 33 includes a detection resistor R1 and a detection resistor R2. One end of the detection resistor R1 is connected to one input end of the buck-boost circuit 31, the other end of the detection resistor R1 is connected to one end of the bridge arm 311, and the other end of the bridge arm 311 is connected to the other input end of the buck-boost circuit 31. One end of the detection resistor R2 is connected to one output end of the buck-boost circuit 31, the other end of the detection resistor R2 is connected to one end of the bridge arm 312, and the other end of the bridge arm 312 is connected to the other output end of the buck-boost circuit 31.

[0092] One of the two input ends of the buck-boost circuit 31 is the high-potential input end, and the other is the low-potential input end. A potential difference obtained after subtracting a potential of the low-potential input end from a potential of the high-potential input end is an input voltage V.sub.i. One of the two output ends of the buck-boost circuit 31 is the high-potential output end, and the other is the low-potential output end. A potential difference obtained after subtracting a potential of the low-potential output end from a potential of the high-potential output end is an output voltage V.sub.o.

[0093] In this embodiment of this application, “one end of the detection resistor R1 is connected to one input end of the buck-boost circuit 31, the other end of the detection resistor R1 is connected to one end of the bridge arm 311” may be understood that a first electrode of the switching transistor S1 in the bridge arm 311 is connected to the high-potential input end of the buck-boost circuit 31 through the detection resistor R1. In this case, a second electrode of the switching transistor S2 is connected to the low-potential input end of the buck-boost circuit 31.

[0094] “One end of the detection resistor R1 is connected to one input end of the buck-boost circuit 31, the other end of the detection resistor R1 is connected to one end of the bridge arm 311” may be alternatively understood that a second electrode of the switching transistor S2 in the bridge arm 311 is connected to the low-potential input end of the buck-boost circuit 31 through the detection resistor R1. In this case, a first electrode of the switching transistor S1 in the bridge arm 311 is connected to the high-potential input end of the buck-boost circuit 31.

[0095] Connection relationships between the detection resistor R2 and one output end of the buck-boost circuit 31 and one end of the bridge arm 312 can be likewise understood, and are not described in detail.

[0096] If one end of the detection resistor R1 is connected to the low-potential input end of the buck-boost circuit 31 and one end of the detection resistor R2 is connected to the low-potential output end of the buck-boost circuit 31, potentials of the two ends of the detection resistor R1 and potentials of the two ends of the detection resistor R2 are all relatively low, and a common-mode voltage (voltage to earth) of two ends of each of the two detection resistors is relatively low. This helps improve sampling accuracy of the detection circuit 33 for a resistor voltage.

[0097] In this embodiment of this application, as shown in FIG. 3, the buck-boost circuit 31 may further include an input capacitor C.sub.i. One end of the input capacitor C.sub.i is connected to the high-potential input end of the buck-boost circuit 31, and the other end of the input capacitor C.sub.i is connected to the low-potential input end of the buck-boost circuit 31.

[0098] In this case, the detection resistor R1 may be located between the input capacitor C.sub.i and the bridge arm 311. For example, in FIG. 3, one end of the detection resistor R1 is further connected to the other end of the input capacitor C.sub.i, and the other end of the detection resistor R1 is connected to the second electrode of the switching transistor S2 in the bridge arm 311.

[0099] Specifically, because the input capacitor C.sub.i has a filtering function, if the detection resistor R1 is located between the low-potential input end of the buck-boost circuit 31 and the input capacitor C.sub.i, that is, the input capacitor C.sub.i is connected to the low-potential input end of the buck-boost circuit 31 through the detection resistor R1, a current passing through the detection resistor R1 is an average current of an inductor current i.sub.L. In this case, the average current of the inductor current i.sub.L can be detected by using a resistor voltage of the detection resistor R1, but this implementation does not help detect a real-time inductor current i.sub.L.

[0100] However, when the detection resistor R1 is located between the bridge arm 311 and the input capacitor C.sub.i, a filtering function of the input capacitor C.sub.i does not affect a current passing through the detection resistor R1, that is, the current passing through the detection resistor R1 may be a real-time inductor current i.sub.L. Therefore, this helps detect the real-time inductor current i.sub.L by using a resistor voltage of the detection resistor R1.

[0101] Similarly, the buck-boost circuit 31 may further include an output capacitor C.sub.o. One end of the output capacitor C.sub.o is connected to the high-potential output end of the buck-boost circuit 31, and the other end of the output capacitor C.sub.o is connected to the low-potential output end of the buck-boost circuit 31.

[0102] In this case, the detection resistor R2 may be located between the bridge arm 312 and the output capacitor C.sub.o. For example, in FIG. 3, one end of the detection resistor R2 is further connected to the other end of the output capacitor C.sub.o, and the other end of the detection resistor R1 is connected to a second electrode of the switching transistor S4 in the bridge arm 312. This implementation helps detect a real-time inductor current i.sub.L by using a resistor voltage of the detection resistor R2, and details not described.

[0103] Based on the detection resistor R1 and the detection resistor R2, regardless of whether the buck-boost circuit 31 performs boost conversion or buck conversion, an inductor current i.sub.L can pass through at least one of the detection resistor R1 and the detection resistor R2, so that the detection circuit 33 can detect a value of the inductor current i.sub.L by using resistor voltages of the detection resistor R1 and the detection resistor R2.

[0104] As shown in FIG. 3, the detection circuit 33 is separately connected to the detection resistor R1 and the detection resistor R2. Specifically, the detection circuit 33 is separately connected to the two ends of the detection resistor R1 and the two ends of the detection resistor R2. The detection circuit 33 may separately detect a resistor voltage V.sub.R1 of the detection resistor R1 and a resistor voltage V.sub.R2 of the detection resistor R2.

[0105] Further, the detection circuit 33 may output a current detection signal V.sub.a based on a maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2. The maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 may be a voltage of a detection resistor through which an inductor current i.sub.L passes in the detection resistor R1 and the detection resistor R2. Therefore, the current detection signal V.sub.a output based on the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 can indicate a value of an inductor current i.sub.L passing through the detection resistor R1 and/or the detection resistor R2.

[0106] It should be noted that a resistance value of the detection resistor R1 is equal to a resistance value of the detection resistor R2. Based on positions of the detection resistor R1 and the detection resistor R2 in the buck-boost circuit 31, an equiproportional relationship is always kept between the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 and the inductor current i.sub.L, and a ratio is the resistance value of the detection resistor R1 or the detection resistor R2.

[0107] Next, relationships existing between an inductor current i.sub.L and the detection resistor R1 and the detection resistor R2 when the buck-boost circuit 31 performs voltage conversion are further described by using examples.

Buck Conversion

[0108] For example, FIG. 5a is a schematic diagram of current changes in the detection resistor R1 and the detection resistor R2 in a buck conversion process. A buck conversion cycle is T1, that is, the buck-boost circuit 31 can complete buck conversion once every T1 time. In FIG. 5a, each T1 includes two time periods t1 and t2, t1 represents an inductor charging phase in the buck conversion, and t2 represents an inductor freewheeling phase in the buck conversion. i.sub.R2 represents a current flowing through the detection resistor R2, and i.sub.R1 represents a current flowing through the detection resistor R1.

[0109] Inductor charging phase: As described above, refer to FIG. 5b. In the inductor charging phase of the buck conversion, the switching transistor S1 and the switching transistor S3 are conducted, and the switching transistor S2 and the switching transistor S4 are open. A current is input from the high-potential input end of the buck-boost circuit 31, sequentially flows through the switching transistor S1, the inductor 113, and the switching transistor S3, and is output from the high-potential output end of the buck-boost circuit 31 through a first electrode of the switching transistor S3. A returning current is input from the low-potential output end of the buck-boost circuit 31, sequentially flows through the detection resistor R2 and the detection resistor R1, and is output from the low-potential input end of the buck-boost circuit 31.

[0110] In this phase, the inductor 313, the detection resistor R2, and the detection resistor R1 are sequentially connected in series. Therefore, a current i.sub.R1 flowing through the detection resistor R1 and a current i.sub.R2 flowing through the detection resistor R2 are equal to an inductor current i.sub.L. In the inductor charging phase of the buck conversion, the inductor current i.sub.L gradually increases. Therefore, as shown in FIG. 5a, in the time period t1, the current i.sub.R1 flowing through the detection resistor R1 and the current i.sub.R2 flowing through the detection resistor R2 also gradually increase.

[0111] Because the current i.sub.R1 flowing through the detection resistor R1 and the current i.sub.R2 flowing through the detection resistor R2 are equal to the inductor current i.sub.L, and the resistance value of the detection resistor R1 is equal to the resistance value of the detection resistor R2, a resistor voltage V.sub.R1 is equal to a resistor voltage V.sub.R2 in the inductor charging phase of the buck conversion, a maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 is the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2, and ratios of the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 to the inductor current i.sub.L are the resistance values of the detection resistor R1 and the detection resistor R2.

[0112] Inductor freewheeling phase: As described above, refer to FIG. 5c. In the inductor freewheeling phase of the buck conversion, the switching transistor S1 is open, the switching transistor S2 is conducted, the switching transistor S3 is kept conducted, and the switching transistor S4 is kept open. A current is output from an end that is of the inductor 313 and that is near the switching transistor S3, and is output through the high-potential output end of the buck-boost circuit 31 after being transmitted through the switching transistor S3. A returning current is input from the low-potential output end of the buck-boost circuit 31, and the current sequentially flows through the detection resistor R2 and the switching transistor S2 to return to an end that is of the inductor 313 and that is near the switching transistor S1.

[0113] In this phase, the inductor 313 is connected to the detection resistor R2 in series. Therefore, a current i.sub.R2 flowing through the detection resistor R2 is equal to an inductor current i.sub.L. In the inductor freewheeling phase, the inductor current i.sub.L gradually decreases. Therefore, as shown in FIG. 5a, in the time period t2, the current i.sub.R2 flowing through the detection resistor R2 also gradually decreases. Because no current passes through the detection resistor R1 in the inductor freewheeling phase of the buck conversion, as shown in FIG. 5a, a current i.sub.R1 of the detection resistor R1 in the time period t2 is zero.

[0114] Because the current i.sub.R2 flowing through the detection resistor R2 is equal to the inductor current i.sub.L, and the current i.sub.R1 of the detection resistor R1 is zero, a resistor voltage V.sub.R2 is greater than a resistor voltage V.sub.R1, that is, a maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 is the resistor voltage V.sub.R2, and a ratio of the resistor voltage V.sub.R2 to the inductor current i.sub.L is the resistance value of the detection resistor R2.

[0115] Therefore, it can be learned that, in the inductor charging phase and the inductor freewheeling phase of the buck conversion, the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 always keeps an equiproportional relationship with the inductor current i.sub.L, and the ratio is the resistance value of the detection resistor R2.

Boost Conversion

[0116] For example, FIG. 6a is a schematic diagram of current changes in the detection resistor R1 and the detection resistor R2 in a boost conversion process. A boost conversion cycle is T2, that is, the buck-boost circuit 31 can complete boost conversion once every T2 time. In FIG. 6a, each T2 includes two time periods t3 and t4, t3 represents an inductor charging phase in the boost conversion, and t4 represents an inductor freewheeling phase in the boost conversion. i.sub.R2 represents a current flowing through the detection resistor R2, and i.sub.R1 represents a current flowing through the detection resistor R1.

[0117] Inductor charging phase: As described above, refer to FIG. 6b. In the inductor charging phase of the boost conversion, the switching transistor S1 and the switching transistor S4 are conducted, and the switching transistor S2 and the switching transistor S3 are open. A current is input from the high-potential input end of the buck-boost circuit 31, and is output from the low-potential input end of the buck-boost circuit 11 after sequentially flowing through the switching transistor S1, the inductor 113, the switching transistor S4, and the detection resistor R1.

[0118] In this phase, the inductor 313 is connected to the detection resistor R1 in series. Therefore, a current i.sub.R1 flowing through the detection resistor R1 is equal to an inductor current i.sub.L. In the inductor charging phase of the boost conversion, the inductor current i.sub.L gradually increases. Therefore, as shown in FIG. 6a, in the time period t3, the current i.sub.R1 flowing through the detection resistor R1 also gradually increases. Because no current passes through the detection resistor R2 in the inductor charging phase of the boost conversion, as shown in FIG. 6a, a current i.sub.R2 of the detection resistor R2 in the time period t3 is zero.

[0119] Because the current i.sub.R1 flowing through the detection resistor R1 is equal to the inductor current i.sub.L, and the current i.sub.R2 of the detection resistor R2 is zero, a resistor voltage V.sub.R1 is greater than a resistor voltage V.sub.R2, that is, a maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 is the resistor voltage V.sub.R1, and a ratio of the resistor voltage V.sub.R1 to the inductor current i.sub.L is the resistance value of the detection resistor R1.

[0120] Inductor freewheeling phase: As described above, refer to FIG. 6c. In the inductor freewheeling phase of the boost conversion, the switching transistor S3 is conducted, the switching transistor S4 is open, the switching transistor S1 is kept conducted, and the switching transistor S2 is kept open. A current is input from the high-potential input end of the buck-boost circuit 31, sequentially flows through the switching transistor S1, the inductor 313, and the switching transistor S3, and is output from the high-potential output end of the buck-boost circuit 31 through the switching transistor S3. A returning current is input from the low-potential output end of the buck-boost circuit 31, sequentially flows through the detection resistor R2 and the detection resistor R1, and is output through the low-potential input end of the buck-boost circuit 31.

[0121] In this phase, the inductor 313, the detection resistor R2, and the detection resistor R1 are sequentially connected in series. Therefore, a current i.sub.R1 flowing through the detection resistor R1 and a current i.sub.R2 flowing through the detection resistor R2 are equal to an inductor current i.sub.L. In the inductor freewheeling phase of the boost conversion, the inductor current i.sub.L gradually decreases. Therefore, as shown in FIG. 6a, in the time period t4, the current i.sub.R1 flowing through the detection resistor R1 and the current i.sub.R2 flowing through the detection resistor R2 also gradually decrease.

[0122] Because the current i.sub.R1 flowing through the detection resistor R1 and the current i.sub.R2 flowing through the detection resistor R2 are equal to the inductor current i.sub.L, and the resistance value of the detection resistor R1 is equal to the resistance value of the detection resistor R2, a resistor voltage V.sub.R1 is equal to a resistor voltage V.sub.R2 in the inductor charging phase of the buck conversion, a maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 is the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2, and ratios of the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 to the inductor current i.sub.L are the resistance values of the detection resistor R1 and the detection resistor R2.

[0123] Therefore, it can be learned that, in the inductor charging phase and the inductor freewheeling phase of the boost conversion, the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 always keeps an equiproportional relationship with the inductor current i.sub.L, and a correlation coefficient is the resistance value of the detection resistor R1.

[0124] In conclusion, whether in the buck conversion process or in the boost conversion process, the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 always keeps an equiproportional relationship with the inductor current i.sub.L, and correlation coefficients are the resistance values of the detection resistor R1 and the detection resistor R2.

[0125] Therefore, the detection circuit 33 may further output a current detection signal V.sub.a based on the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2, so that the current detection signal V.sub.a can indicate an inductor current i.sub.L passing through the detection resistor R1 and/or the detection resistor R2.

[0126] In this embodiment of this application, because the resistor voltage of the detection resistor R1 and/or the resistor voltage of the detection resistor R2 may change in real time with the inductor current i.sub.L, a detection latency of the detection circuit 33 is relatively short. In addition, costs of the detection resistor R1 and the detection resistor R2 are lower than costs of a current sensor. Therefore, this embodiment of this application further helps reduce costs of the voltage converter 30.

[0127] As described above, the detection circuit 33 may output the current detection signal V.sub.a based on the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2. For example, the current detection signal V.sub.a may be a voltage signal. A one-to-one correspondence exists between a voltage value of the current detection signal V.sub.a and the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2. Because a fixed equiproportional relationship exists between the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 and the inductor current i.sub.L, it may also be considered that a one-to-one correspondence exists between the voltage value of the current detection signal V.sub.a and the value of the inductor current i.sub.L. Further, the voltage value of the current detection signal V.sub.a may indicate the value of the inductor current i.sub.L.

[0128] For a receive end of the current detection signal V.sub.a (for example, the controller 32), the one-to-one correspondence between the voltage value of the current detection signal V.sub.a and the inductor current i.sub.L may be known or can be known, so that the receive end of the current detection signal V.sub.a can determine the value of the inductor current i.sub.L based on the voltage value of the received voltage detection signal V.sub.a and the correlation between the voltage value of the current detection signal V.sub.a and the inductor current i.sub.L.

[0129] For example, the following relationship is met between the inductor current i.sub.L and the maximum voltage V.sub.max in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2:

[00001]Vmax=iL*R­­­(formula 1)

where R represents the resistance value of the detection resistor R1 or the detection resistor R2.

[0130] The one-to-one correspondence between the current detection signal V.sub.a and the maximum voltage V.sub.max meets the following formula:

[00002]Va=aVmax+b­­­(formula 2)

where a and b are any constants.

[0131] It can be learned from both the formula 1 and the formula 2 that the one-to-one correspondence between the current detection signal V.sub.a and the inductor current i.sub.L meets the following formula:

[00003]Va=aiL*R+b­­­(formula 3)

[0132] For the receive end (for example, the controller 32) of the current detection signal V.sub.a, the one-to-one correspondence shown in the formula 3 may be known, and values of a, R, and b may also be known. After receiving the current detection signal V.sub.a, the receive end may obtain the value of the inductor current i.sub.L based on the voltage value of the current detection signal V.sub.a and the one-to-one correspondence shown in the formula 3.

[0133] For ease of understanding, next, this embodiment of this application provides descriptions by using an example in which the one-to-one correspondence between the voltage value of the current detection signal V.sub.a and the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2 is a positive correlation shown in the formula 3, where a is greater than 0. An application scenario in another correlation may be obtained through adaptive adjustment based on subsequent descriptions in this embodiment of this application, and should also be included in this embodiment of this application.

[0134] It may be understood that the foregoing examples are all described by using an example in which only one inductor 313 exists in the buck-boost circuit 31. When a plurality of inductors 313 exist in the buck-boost circuit 31 (as shown in FIG. 4), a value that is of an inductor current i.sub.L and that is indicated by a current detection signal V.sub.a needs to be a sum of inductor currents of one or more inductors 313 in a charging/discharging process in the buck-boost circuit 31.

[0135] Next, the detection circuit 33 is further described by using the following examples in this embodiment of this application.

[0136] FIG. 3 is a schematic diagram of an example structure of a detection circuit according to an embodiment of this application. As shown in FIG. 3, the detection circuit 33 further includes a sampling circuit 331, a sampling circuit 332, and a combiner circuit 333. The sampling circuit 331 is separately connected to the two ends of the detection resistor R1 and the combiner circuit 333, and the sampling circuit 332 is separately connected to the two ends of the detection resistor R2 and the combiner circuit 333.

[0137] The sampling circuit 331 may perform sampling on the resistor voltage V.sub.R1 of the detection resistor R1. Specifically, the sampling circuit 331 may output a sampled signal V.sub.b1 to the combiner circuit 333 based on the resistor voltage V.sub.R1 of the detection resistor R1. For example, the sampled signal V.sub.b1 may be a voltage signal, and a voltage value of the sampled signal V.sub.b1 may be in a positive correlation with a value of the resistor voltage V.sub.R1. That is, a voltage of the sampled signal V.sub.b1 may increase as the resistor voltage V.sub.R1 increases, and decrease as the resistor voltage V.sub.R1 decreases.

[0138] For example, as shown in FIG. 7, the sampling circuit 331 may include an operational amplifier circuit U1. One input end of the operational amplifier circuit U1 is connected to one end of the detection resistor R1, the other input end of the operational amplifier circuit U1 is connected to the other end of the detection resistor R1, and an output end of the operational amplifier circuit U1 is connected to the combiner circuit 333. The operational amplifier circuit U1 may perform differential sampling and amplification on the resistor voltage V.sub.R1 of the detection resistor R1, to output the sampled signal V.sub.b1 from the output end of the operational amplifier circuit U1.

[0139] For a specific implementation structure of the operational amplifier circuit U1, refer to those of various common operational amplifier circuits. This is not limited in this embodiment of this application.

[0140] The sampling circuit 332 may perform sampling on the resistor voltage V.sub.R2 of the detection resistor R2. Specifically, the sampling circuit 332 may output a sampled signal V.sub.b2 to the combiner circuit 333 based on the resistor voltage V.sub.R2 of the detection resistor R2. For example, the sampled signal V.sub.b2 may be a voltage signal, and a voltage value of the sampled signal V.sub.b2 may be in a positive correlation with a value of the resistor voltage V.sub.R2. A voltage of the sampled signal V.sub.b2 may increase as the resistor voltage V.sub.R2 increases, and decrease as the resistor voltage V.sub.R2 decreases.

[0141] For example, as shown in FIG. 7, the sampling circuit 332 may include an operational amplifier circuit U2. One input end of the operational amplifier circuit U2 is connected to the other end of the detection resistor R2, the other input end of the operational amplifier circuit U2 is connected to one end of the detection resistor R2, and an output end of the operational amplifier circuit U2 is connected to the combiner circuit 333. The operational amplifier circuit U2 may perform differential sampling and amplification on the resistor voltage V.sub.R2 of the detection resistor R2, to output the sampled signal V.sub.b2 from the output end of the operational amplifier circuit U2.

[0142] For a specific implementation structure of the operational amplifier circuit U2, refer to those of various common operational amplifier circuits. This is not limited in this embodiment of this application.

[0143] It should be noted that the positive correlation between the sampled signal V.sub.b1 and the resistor voltage V.sub.R1 and the correlation between the sampled signal V.sub.b2 and the resistor voltage V.sub.R2 may be a same positive correlation, to ensure that sampling results of the sampling circuit 331 and the sampling circuit 332 do not cause a change in a relative value relationship between the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2. That is, the operational amplifier circuit U1 and the operational amplifier circuit U2 may have a same circuit structure.

[0144] For example, the voltage of the sampled signal Vb1 is equal to the resistor voltage V.sub.R1, and the voltage of the sampled signal Vb2 is equal to the resistor voltage V.sub.R2. For another example, the voltage of the sampled signal V.sub.b1 is equal to cV.sub.R1+d, and the voltage of the sampled signal V.sub.b2 is equal to cVR2+d, where c is a constant greater than 0, and d is any constant.

[0145] For example, a non-inverting input end (+) of the operational amplifier circuit U1 may be connected to a high-potential end of the detection resistor R1, and an inverting input end (-) of the operational amplifier circuit U1 may be connected to a low-potential end of the detection resistor R1. A non-inverting input end (+) of the operational amplifier circuit U2 may be connected to a high-potential end of the detection resistor R2, and an inverting input end (-) of the operational amplifier circuit U1 may be connected to a low-potential end of the detection resistor R2.

[0146] For example, in FIG. 3, when the detection resistor R1 is connected to the low-potential input end of the buck-boost circuit 11, and the detection resistor R2 is connected to the low-potential output end of the buck-boost circuit 11, a current always flows from a side that is of the detection resistor R1 and that is near the low-potential output end of the buck-boost circuit 11 and/or a side that is of the detection resistor R2 and that is near the low-potential output end of the buck-boost circuit 11 to a side near the low-potential input end of the buck-boost circuit 11.

[0147] That is, one end that is of the detection resistor R1 and that is connected to the low-potential input end of the buck-boost circuit 11 is the low-potential end, and the other end that is of the detection resistor R1 and that is connected to the detection resistor R2 is the high-potential end. One end that is of the detection resistor R2 and that is connected to the low-potential output end of the buck-boost circuit 11 is the high-potential end, and the other end that is of the detection resistor R2 and that is connected to the detection resistor R1 is the low-potential end.

[0148] In view of this, as shown in FIG. 7, the inverting input end of the operational amplifier circuit U1 may be connected to an end that is of the detection resistor R1 and that is near the low-potential input end of the buck-boost circuit 11, and the non-inverting input end of the operational amplifier circuit U1 may be connected to an end that is of the detection resistor R1 and that is near the detection resistor R2. The inverting input end of the operational amplifier circuit U2 may be connected to an end that is of the detection resistor R2 and that is near the detection resistor R1, and the non-inverting input end of the operational amplifier circuit U2 may be connected to an end that is of the detection resistor R2 and that is near the low-potential output end of the buck-boost circuit 11.

[0149] The combiner circuit 333 may receive the sampled signal V.sub.b1 and the sampled signal V.sub.b2 that are provided by the detection circuit 331, and may further output the current detection signal V.sub.a based on a maximum voltage in the sampled signal V.sub.b1 and the sampled signal V.sub.b2. As described above, the positive correlation between the sampled signal V.sub.b1 and the resistor voltage V.sub.R1 and the correlation between the sampled signal V.sub.b2 and the resistor voltage V.sub.R2 may be a same positive correlation. Therefore, the maximum voltage in the sampled signal V.sub.b1 and the sampled signal V.sub.b2 also meet the positive correlation with the maximum voltage in the resistor voltage V.sub.R1 and the resistor voltage V.sub.R2. The combiner circuit 332 may output the current detection signal V.sub.a based on the maximum voltage in the sampled signal V.sub.b1 and the sampled signal V.sub.b2, so that the current detection signal V.sub.a can indicate the value of the inductor current i.sub.L passing through the detection resistor R1 and/or the detection resistor R2.

[0150] For example, as shown in FIG. 8, the combiner circuit 333 mainly includes a diode D1 and a diode D2. An anode of the diode D1 is connected to the sampling circuit 331, and can receive the sampled signal V.sub.b1 provided by the sampling circuit 331. An anode of the diode D2 is connected to the sampling circuit 332, and can receive the sampled signal V.sub.b2 provided by the sampling circuit 332. A cathode of the diode D1 is connected to a cathode of the diode D2 through a connection point P, and a voltage of the connection point P may be used as the current detection signal V.sub.a.

[0151] Specifically, because the cathode of the diode D1 is connected to the cathode of the diode D2, a diode with a larger anode voltage may cause a diode with a lower anode voltage to be cut off. For example, if an anode voltage of the diode D1 is greater than an anode voltage of the diode D2, the diode D2 is cut off. Likewise, if an anode voltage of the diode D2 is greater than an anode voltage of the diode D1, the diode D1 is cut off.

[0152] In this embodiment of this application, the anode voltage of the diode D1 is the voltage of the sampled signal V.sub.b1, and the anode voltage of the diode D2 is the voltage of the sampled signal V.sub.b2. Therefore, when the voltage of the sampled signal V.sub.b1 is greater than the voltage of the sampled signal V.sub.b2, the diode D1 is conducted, and the voltage of the connection point P is the voltage of the sampled signal V.sub.b1. When the voltage of the sampled signal V.sub.b2 is greater than the voltage of the sampled signal V.sub.b1, the diode D2 is conducted, and the voltage of the connection point P is the voltage of the sampled signal V.sub.b2. When the voltage of the sampled signal V.sub.b1 is equal to the voltage of the sampled signal V.sub.b2, the diode D1 and the diode D2 can be both conducted, and the voltage of the connection point P is the voltage of the sampled signal V.sub.b1 or the voltage of the sampled signal V.sub.b2.

[0153] It can be learned that when the combiner circuit 333 shown in FIG. 8 is used, the voltage of the connection point P is the maximum voltage in the voltage of the sampled signal V.sub.b1 and the voltage of the sampled signal V.sub.b2. Therefore, the voltage of the connection point P can be used as the current detection signal V.sub.a.

[0154] In specific implementation, because the diode has a specific conduction voltage drop, the voltage of the connection point P may be slightly lower than the maximum voltage in the voltage of the sampled signal V.sub.b1 and the voltage of the sampled signal V.sub.b2. This does not help improve current detection accuracy. In view of this, in a possible implementation, as shown in FIG. 8, the combiner circuit 333 may further include an operational amplifier circuit U3 and an operational amplifier circuit U4.

[0155] One input end of the operational amplifier circuit U3 is connected to the sampling circuit 331, and can receive the sampled signal V.sub.b1. The other input end of the operational amplifier circuit U3 is connected to the cathode of the diode D1, and an output end of the operational amplifier circuit U3 is connected to the anode of the diode D1.

[0156] One input end of the operational amplifier circuit U4 is connected to the sampling circuit 332, and can receive the sampled signal V.sub.b2. The other input end of the operational amplifier circuit U4 is connected to the cathode of the diode D2, and an output end of the operational amplifier circuit U4 is connected to the anode of the diode D2.

[0157] In the operational amplifier circuit U3, an input end connected to the operational amplifier circuit U1 may be a non-inverting input end, and an input end connected to the diode D1 may be an inverting input end. In the operational amplifier circuit U4, an input end connected to the operational amplifier circuit U2 may be a non-inverting input end, and an input end connected to the diode D2 may be an inverting input end. This connection manner helps keep a voltage output by the diode D1 and/or a voltage output by the diode D2 non-inverting with the voltage of the sampled signal V.sub.b1 and/or the voltage of the sampled signal V.sub.b1.

[0158] The operational amplifier circuit U3 is used as an example. Voltages of the two input ends of the operational amplifier circuit U3 are respectively the voltage of the sampled signal V.sub.b1 and a cathode voltage of the diode D1. According to a “virtual short circuit” characteristic of the operational amplifier circuit, that is, the voltages of the two input ends of the operational amplifier circuit U3 are equal, the voltage of the sampled signal V.sub.b1 can be kept equal to the cathode voltage of the diode D1, thereby achieving a voltage following effect. The operational amplifier circuit U4 can be likewise understood, and is not described in detail.

[0159] For specific implementations of the operational amplifier circuit U3 and the operational amplifier circuit U4, refer to those of common operational amplifier circuits. This is not limited in this embodiment of this application.

[0160] In a possible implementation, as shown in FIG. 7, the combiner circuit 333 may further include a ground resistor R3. One end of the ground resistor R3 is connected to the connection point P, and the other end of the ground resistor R3 is grounded. The ground resistor R3 is added, so that the diode D1 and the diode D2 can be prevented from being short-circuited with the ground, and further, the voltage of the connection point P can be prevented from being locked at 0 V.

[0161] In conclusion, in this embodiment of this application, the detection circuit 33 may generate the current detection signal V.sub.a based on the detection resistor R1 and the detection resistor R2, to detect the inductor current i.sub.L. Compared with a current detection solution based on a current sensor, in this embodiment of this application, sampling is performed by using the detection resistors, so that a sampling result is more accurate and the sampling is faster. It should be noted that the detection circuit 33 in this embodiment of this application may automatically adapt to different voltage conversion processes of the buck-boost circuit 31 without extra control. This further helps save a control resource.

[0162] Based on a same technical concept, an embodiment of this application further provides an electronic device, mainly including the voltage converter provided in any one of the foregoing embodiments of this application. For example, the electronic device may be an electric vehicle, a photovoltaic station, a communications power supply device, or the like.

[0163] It is clear that a person skilled in the art can make various modifications and variations to this application without departing from the protection scope of this application. This application is intended to cover these modifications and variations of this application provided that they fall within the scope of the claims of this application and their equivalent technologies.