Vehicle and phase current sampling circuit used therein
By using a combination of sampling resistors, regular phase amplifier circuits, inverting amplifier circuits and analog-to-digital converters in the motor control system, adjusting the gain and reference voltage, the problem of insufficient current sampling accuracy of the motor phase is solved, and high-precision and low-cost current sampling is achieved.
Patent Information
- Application Number
- CN202410041707.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2025-07-11
AI Technical Summary
The prior art is difficult to achieve high-precision sampling of motor phase currents in a wide range, especially when the current is large or small, the sampling accuracy is insufficient, and the existing solutions increase hardware costs or fail to effectively solve the reference voltage problem.
Using a combination of sampling resistors, regular phase amplifier circuits, inverting amplifier circuits, op amps and analog-to-digital converters, high-precision sampling of phase currents is achieved by adjusting the gain and reference voltage of the operational amplifier to adapt to different current ranges.
High-precision sampling of motor phase current is achieved in a wide range, improving sampling resolution, reducing hardware costs, and adapting to the positive and negative direction changes of current.
Smart Images

Figure CN120294399A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle control, and more particularly to a vehicle and a phase current sampling circuit used therein. Background Art
[0002] Various motors such as brushless DC motors or permanent magnet synchronous motors are increasingly widely used in vehicle products such as electric vehicles, which puts higher requirements on the accuracy of motor control. The phase current of the motor is an important parameter for motor control, which directly determines the accuracy of the output torque of the motor. Considering that the maximum value of the phase current of the motor may reach ±150 A or even higher, in order to improve the accuracy of motor control, in addition to improving the sampling accuracy of the phase current of the motor, it is also necessary to achieve wide-range sampling of the phase current of the motor. Summary of the Invention
[0003] A phase current sampling circuit used in a vehicle according to an embodiment of the present invention includes a sampling resistor, a non-inverting amplifier circuit, an inverting amplifier circuit, an operational amplifier, and an analog-to-digital converter, wherein: the sampling resistor is configured to generate a phase current sampling voltage based on the phase current of a motor used in the vehicle; the non-inverting amplifier circuit and the inverting amplifier circuit are configured to adjust the gain of the operational amplifier based on a phase current sampling signal generated by the analog-to-digital converter; the operational amplifier is configured to generate a phase current characterization voltage based on the phase current sampling voltage; and the analog-to-digital converter is configured to generate a phase current sampling signal based on the phase current characterization voltage.
[0004] A vehicle according to an embodiment of the present invention includes the above-mentioned phase current sampling circuit used in the vehicle. Brief Description of the Drawings
[0005] The present invention can be better understood from the following description of the specific embodiments in conjunction with the accompanying drawings, wherein:
[0006] Figure 1 Shows an example circuit diagram of a conventional phase current sampling circuit used in a vehicle.
[0007] Figure 2 Shows an example circuit diagram of a phase current sampling circuit used in a vehicle according to an embodiment of the present invention. Detailed Description
[0008] Aspects and exemplary embodiments of the present invention will be described in detail below. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to those skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely provided to better understand the present invention by showing examples of the present invention. The present invention is in no way limited to any specific configuration and algorithm set forth below, but covers any modifications, substitutions, and improvements of elements, components, and algorithms without departing from the spirit of the present invention. Well-known structures and technologies are not shown in the drawings and the following description in order to avoid unnecessarily obscuring the present invention. Additionally, it should be noted that the term "A is connected to B" used herein may mean "A is directly connected to B" or "A is indirectly connected to B via one or more other elements."
[0009] Generally, a motor is driven using a drive axle, and a sampling resistor can be added between the lower side of the drive axle and the ground to sample the phase current of the motor. Specifically, when the phase current of the motor flows through the sampling resistor, the sampling of the phase current of the motor can be achieved by sampling the voltage across the sampling resistor.
[0010] Figure 1 An example circuit diagram of a conventional phase current sampling circuit used in a vehicle is shown. In Figure 1 the shown phase current sampling circuit 100, R1 is the sampling resistor, which is used to sample the phase current of the motor to generate a phase current sampling voltage; the resistors R2, R3 and the capacitors C1, C2, C3 form a filter circuit, which is used to filter the phase current sampling voltage to suppress common-mode interference and / or differential-mode interference; G is an operational amplifier, which is used to amplify the filtered phase current sampling voltage to generate a phase current characterization voltage Vadc; Vref is a reference voltage, which is used to convert the phase current characterization voltage Vadc into the sampling range of an analog-to-digital converter (ADC) in a micro control unit (MCU) (for example, the sampling range of the ADC is 0 - 5V); the ADC in the MCU is used to convert the phase current characterization voltage Vadc into a phase current sampling signal.
[0011] According to Figure 1 the circuit principle of the shown phase current sampling circuit 100, the phase current I of the motor can be calculated as shown in Equation (1):
[0012]
[0013] where Reg represents the value read from the ADC register (i.e., the value corresponding to the phase current sampling signal generated by the ADC based on the phase current characterizing voltage Vadc, with a maximum value of 2 n -1), n represents the number of bits of the ADC register (determined by the sampling range of the ADC, usually 12 bits), and G represents the gain of the operational amplifier G. Here, the selection of the gain G needs to satisfy the following conditions:
[0014] R1*I max *G+V ref <ADC max (2)
[0015] R1*I min *G+V ref >ADC min (3)
[0016] where Imax represents the positive maximum value of the phase current of the motor, Imin represents the negative maximum value of the phase current of the motor, ADCmax represents the upper limit value of the sampling range of the ADC, and ADCmin represents the lower limit value of the sampling range of the ADC.
[0017] To minimize the power loss caused by the phase current of the motor and reduce the heating problem of the sampling resistor R1, a high-precision small resistor with a resistance value between 0.5 and 2 mΩ is usually used as the sampling resistor R1. The vehicle electronic system is often a 12V system, and the phase current of the motor is usually in the range of (-150A, 150A). When the motor operates in the maximum efficiency range or typical operating conditions, its phase current is much smaller than the maximum current (±150A). Due to the influence of factors such as temperature drift, noise, and calculation errors, it is easy to cause quantization errors when the phase current of the motor is small (for example, below ±30A). Therefore, it is necessary to increase the gain of the operational amplifier G to improve the sampling accuracy of the phase current of the motor. At the same time, to be compatible with the case where the phase current of the motor is large (for example, ±150A), it is necessary to reduce the gain of the operational amplifier G to adapt to the sampling range of the ADC. It can be seen that Figure 1 the phase current sampling circuit 100 shown is difficult to achieve high-precision sampling of the phase current of the motor.
[0018] Currently, different phase current sampling circuits are combined to adjust the sampling range of the phase current of the motor. Specifically, it can be in Figure 1In the phase current sampling circuit 100 shown, a plurality of sampling resistors and relays are added. Each sampling resistor and relay can adapt to different current ranges. When reaching the boundary of a certain current range, the relay is controlled to switch the sampling resistor, so as to achieve high-precision sampling of the phase current of the motor within multiple current ranges. Although the above solution can solve the sampling accuracy problem of the phase current of the motor to a certain extent, it greatly increases the hardware cost (because the relay and sampling resistor are expensive and large in size and not suitable for engineering applications). In addition, the above solution only solves the gain problem and does not solve the reference voltage problem. Considering that the phase current of the motor may be either a positive current or a negative current, the above solution cannot maximize the sampling accuracy of the phase current of the motor.
[0019] In view of the above situation, a phase current sampling circuit used in a vehicle according to an embodiment of the present invention is proposed, which can achieve high-precision sampling of the phase current of the motor.
[0020] Figure 2 An exemplary circuit diagram of a phase current sampling circuit 200 used in a vehicle according to an embodiment of the present invention is shown. As Figure 2 shown, the phase current sampling circuit 200 includes a sampling resistor Rs, a non-inverting amplifier circuit 202, an inverting amplifier circuit 204, an operational amplifier G1, and an ADC 208, wherein: the sampling resistor Rs is configured to generate a phase current sampling voltage based on the phase current of the motor used in the vehicle; the non-inverting amplifier circuit 202 and the inverting amplifier circuit 204 are configured to adjust the gain of the operational amplifier G1 based on the phase current sampling signal generated by the ADC 208; the operational amplifier G1 is configured to generate a phase current characterization voltage Vadc based on the phase current sampling voltage; and the ADC 208 is configured to generate a phase current sampling signal based on the phase current characterization voltage Vadc.
[0021] In the phase current sampling circuit 200 according to an embodiment of the present invention, the gain of the operational amplifier G1 can be adjusted according to the magnitude of the phase current of the motor, so as to achieve high-precision sampling of the phase current of the motor to a certain extent.
[0022] As Figure 2 shown, in some embodiments, the ADC 208 may be an ADC included in the MCU 210, and the MCU 210 may generate a gain control signal and / or a voltage control signal based on the phase current sampling signal and a pre-stored gain control look-up table and / or voltage control look-up table.
[0023] As Figure 2As shown, in some embodiments, the phase current sampling circuit 200 may further include a voltage biasing circuit 206 and a voltage follower G2, where: the voltage biasing circuit 206 is configured to generate a reference voltage Vref for adjusting the phase current characterization voltage Vadc to the sampling range of the ADC 208 based on a voltage control signal generated from the MCU 210 based on the phase current sampling signal (e.g., generating the reference voltage Vref based on the voltage control signal and the supply voltage VCC of the MCU 210); and the voltage follower G2 is configured to provide the reference voltage Vref to the positive input terminal or the output terminal of the operational amplifier G1. In this case, high-precision sampling of the phase current of the motor can be achieved within a large range.
[0024] As Figure 2 As shown, in some embodiments, the first terminal of the non-inverting amplifier circuit 202 is connected to the first terminal of the sampling resistor Rs, the second terminal is connected to the positive input terminal of the operational amplifier G1, and the third terminal is connected to the output terminal of the voltage follower G2. The first terminal of the inverting amplifier circuit 204 is connected to the second terminal of the sampling resistor Rs, the second terminal is connected to the inverting input terminal of the operational amplifier G1, and the third terminal is connected to the output terminal of the operational amplifier G1.
[0025] As Figure 2 As shown, in some embodiments, each of the non-inverting amplifier circuit 202 and the inverting amplifier circuit 204 may further be configured to adjust the gain of the operational amplifier G1 based on a gain control signal generated from the MCU 210 based on the phase current sampling signal; and / or the voltage biasing circuit G2 may further be configured to adjust the reference voltage Vref based on a voltage control signal generated from the MCU 210 based on the phase current sampling signal.
[0026] As Figure 2 As shown, in some embodiments, the non-inverting amplifier circuit 202 includes switches S1 and S2, the inverting amplifier circuit 204 includes switches S3 and S4, the gain control signal includes a gain control signal P1 and a gain control signal P2, the switches S1 and S3 are simultaneously in the on or off state under the control of the gain control signal P1, and the switches S2 and S4 are simultaneously in the on or off state under the control of the gain control signal P2.
[0027] As Figure 2As shown, in some embodiments, the non-inverting amplifier circuit 202 may further include resistors R1, R2, and R3, and the inverting amplifier circuit 204 may further include resistors R4, R5, and R6, and wherein: Resistor R1 and switch S1 are serially connected between the first terminal of the sampling resistor Rs and the non-inverting input terminal of the operational amplifier G1, resistor R2 and switch S2 are serially connected between the first terminal of the sampling resistor Rs and the non-inverting input terminal of the operational amplifier G1, and resistor R3 is connected between the first terminal of the sampling resistor Rs and the non-inverting input terminal of the operational amplifier G1; Resistor R4 and switch S3 are serially connected between the second terminal of the sampling resistor Rs and the inverting input terminal of the operational amplifier G1, resistor R5 and switch S4 are serially connected between the second terminal of the sampling resistor Rs and the inverting input terminal of the operational amplifier G1, and resistor R6 is connected between the second terminal of the sampling resistor Rs and the inverting input terminal of the operational amplifier G1. Here, resistor R1 and resistor R4 have equal resistance values (for example, 0.8 KΩ), resistor R2 and resistor R5 have equal resistance values (for example, 1 KΩ), and resistor R3 and resistor R6 have equal resistance values (for example, 1 KΩ).
[0028] As Figure 2 shown, in some embodiments, the non-inverting amplifier circuit 202 may further include resistor R7, and the inverting amplifier circuit 204 further includes resistor R8, wherein: Resistor R7 is connected between the non-inverting input terminal of the operational amplifier G1 and the output terminal of the voltage follower G2; Resistor R8 is connected between the inverting input terminal and the output terminal of the operational amplifier G1. Here, resistor R7 and resistor R8 have equal resistance values (for example, 40 KΩ).
[0029] As Figure 2 shown, in some embodiments, the first terminal of the voltage bias circuit 206 is connected to the supply voltage VCC of the MCU 210, the second terminal is connected to the non-inverting input terminal of the voltage follower G2, and the third terminal is connected to ground.
[0030] As Figure 2 shown, in some embodiments, the voltage bias circuit 206 includes switches S5 and S6, the voltage control signals include voltage control signals P3 and P4, switch S5 is in an on or off state under the control of the voltage control signal P3, and switch S6 is in an on or off state under the control of the voltage control signal P4.
[0031] As Figure 2As shown, in some embodiments, the voltage bias circuit 206 may further include resistors R9, R10, R11, and R12, where: resistor R9 and switch S5 are serially connected between the positive input terminal of voltage follower G2 and ground, and resistor R10 and switch S6 are serially connected between the positive input terminal of voltage follower G2 and the supply voltage VCC of MCU 210; resistor R11 is connected between the positive input terminal of voltage follower G2 and ground, and resistor R12 is connected between the positive input terminal of voltage follower G2 and the supply voltage VCC of MCU 210.
[0032] Next, for convenience, let Rin1 denote the combined resistor formed by resistors R1, R2, and R3 under different state combinations of switches S1 and S2 being conductive and / or non-conductive, let Rin2 denote the combined resistor formed by resistors R4, R5, and R6 under different state combinations of switches S3 and S4 being conductive and / or non-conductive, let Rlow denote the combined resistor formed by resistors R9 and R11 when switch S5 is conductive or non-conductive, and let Rup denote the combined resistor formed by resistors R10 and R12 when switch S6 is conductive or non-conductive. It should be understood that each of switches S1, S2, S3, S4, S5, and S6 can be implemented as a transistor or a Metal-Oxide-Semiconductor Field-Effect Transistor (MOSFET for short).
[0033] In Figure 2 In the phase current sampling circuit 200 shown, the gain of operational amplifier G1 is determined by resistors R7 and Rin1 (or resistors R8 and Rin2), the reference voltage Vref provided by voltage follower G2 is determined by the supply voltage VCC of MCU 210 and resistors Rlow and Rup, and the phase current sampling voltage on sampling resistor Rs is amplified by operational amplifier G1 and added to the reference voltage Vref provided by voltage follower G2 to obtain the phase current characterization voltage Vadc input to ADC 208. Specifically, the phase current I of the motor can be calculated as shown in equations (4) to (6):
[0034]
[0035] G1 = R7 / Rin1 (R8 / Rin2) (5)
[0036] Vref = Vcc*R low / (R up +R low ) (6)
[0037] Among them, Reg represents the value read from the ADC register (i.e., the value corresponding to the phase current sampling signal generated by the ADC 208 based on the phase current characterizing voltage Vadc, with a maximum value of 2 n -1), n represents the number of bits of the ADC register (determined by the sampling range of the ADC 208, usually 12 bits), Vcc represents the supply voltage VCC of the MCU 210, and G1 represents the gain of the operational amplifier G1.
[0038] In Figure 2 In the phase current sampling circuit 200 shown, when the switch S2 and the switch S4 are in the conducting state and the switch S1 and the switch S3 are in the off state:
[0039] R in1 =(R2 + R3) / (R2 * R3) (7)
[0040] R in2 =(R5 + R6) / (R5 * R6) (8)
[0041] G1 = R in1 / R7 or G1 = R in2 / R8 (9)
[0042] According to different state combinations of the on and / or off states of the switches S1, S2, S3, and S4, a parameter table related to the gain G1 of the operational amplifier G1 can be obtained, as shown in Table 1:
[0043]
[0044] Table 1
[0045] Assuming that the supply voltage VCC of the MCU 210 is 5V, based on different solid-state combinations of the on and / or off states of the switches S5 and S6, a parameter table related to the reference voltage Vref can be obtained, as shown in Table 2:
[0046] S5 S6 R9 (KΩ) R10 (KΩ) Rup (KΩ) Rlow (KΩ) Vref (V) Off Off 0 0 10 10 10 / (10+10)*5=2.5 On Off 1 0 10 0.91 0.91 / (0.91+10)*5=0.42 Off On 0 1 0.91 10 10 / (10+0.91)*5=4.58 On On 1 1 0.91 0.91 0.91 / (0.91+0.91)=2.5
[0047] Table 2
[0048] Assume that the number of bits of the ADC register is 12 bits, the sampling range of the ADC 208 is (0V, 5V), the range of the phase current of the motor is (+150A, -150A), and the resistance value of the sampling resistor Rs is 0.7 mohm. According to the different values in Table 1 and Table 2, the phase current of the motor can be segmented and different gains G1 and reference voltages Vref can be applied to different phase current ranges, as shown in Table 3:
[0049]
[0050] Table 3
[0051] As shown in Table 3, different gains G1 can be used for different ranges of the phase current. At the same time, different reference voltages Vref can be used for different cases of the phase current being a positive current and a negative phase current. It can be seen from the results that within the limited sampling range of the phase current, the sampling resolution of the phase current is greatly improved.
[0052] The present invention may be embodied in other specific forms without departing from its spirit and essential characteristics. For example, the algorithms described in specific embodiments may be modified without departing from the basic spirit of the present invention in terms of the system architecture. Therefore, the current embodiments are to be considered in all respects as illustrative and not restrictive, the scope of the present invention being defined by the appended claims rather than the above description, and all changes falling within the meaning and scope of equivalents of the claims are therefore included in the scope of the present invention.
Claims
1. A phase current sampling circuit used in a vehicle, comprising a sampling resistor, a non-inverting amplifier circuit, an inverting amplifier circuit, an operational amplifier, and an analog-to-digital converter, wherein: The sampling resistor is configured to generate a phase current sampling voltage based on the phase current of a motor used in the vehicle; The non-inverting amplifier circuit and the inverting amplifier circuit are configured to adjust the gain of the operational amplifier based on a phase current sampling signal generated by the analog-to-digital converter; The operational amplifier is configured to generate a phase current characterization voltage based on the phase current sampling voltage; and The analog-to-digital converter is configured to generate the phase current sampling signal based on the phase current characterization voltage.
2. The phase current sampling circuit according to claim 1, wherein, The analog-to-digital converter is included in a microcontroller unit.
3. The phase current sampling circuit according to claim 2, wherein, Each of the non-inverting amplifier circuit and the inverting amplifier circuit is further configured to adjust the gain of the operational amplifier based on a gain control signal generated by the microcontroller unit based on the phase current sampling signal.
4. The phase current sampling circuit according to any one of claims 1-3, wherein, The non-inverting amplifier circuit includes a first switch and a second switch, the inverting amplifier circuit includes a third switch and a fourth switch, the gain control signal includes a first gain control signal and a second gain control signal, the first switch and the third switch are simultaneously in an on or off state under the control of the first gain control signal, and the second switch and the fourth switch are simultaneously in an on or off state under the control of the second gain control signal.
5. The phase current sampling circuit according to claim 4, wherein, The non-inverting amplifier circuit further includes a first resistor, a second resistor, and a third resistor, the inverting amplifier circuit further includes a fourth resistor, a fifth resistor, and a sixth resistor, and wherein: The first resistor and the first switch are serially connected between a first terminal of the sampling resistor and the non-inverting input terminal of the operational amplifier, the second resistor and the second switch are serially connected between the first terminal of the sampling resistor and the non-inverting input terminal of the operational amplifier, and the third resistor is connected between the first terminal of the sampling resistor and the non-inverting input terminal of the operational amplifier; and The fourth resistor and the third switch are serially connected between a second terminal of the sampling resistor and the inverting input terminal of the operational amplifier, the fifth resistor and the fourth switch are serially connected between the second terminal of the sampling resistor and the inverting input terminal of the operational amplifier, and the sixth resistor is connected between the second terminal of the sampling resistor and the inverting input terminal of the operational amplifier.
6. The phase current sampling circuit according to claim 5, wherein, The non-inverting amplifier circuit further includes a seventh resistor, the inverting amplifier circuit further includes an eighth resistor, and wherein: The seventh resistor is connected between the non-inverting input terminal of the operational amplifier and the output terminal of the voltage follower; and The eighth resistor is connected between the inverting input terminal and the output terminal of the operational amplifier.
7. The phase current sampling circuit according to claim 2, further comprising a voltage bias circuit and a voltage follower, wherein: The voltage bias circuit is configured to generate a reference voltage for adjusting the phase current characterization voltage to the sampling range of the analog-to-digital converter based on a voltage control signal generated by the microcontroller unit based on the phase current sampling signal; and The voltage follower is configured to provide the reference voltage to the positive input terminal or the output terminal of the operational amplifier.
8. The phase current sampling circuit according to claim 7, wherein, The voltage bias circuit includes a fifth switch and a sixth switch, the voltage control signal includes a first voltage control signal and a second voltage control signal, the fifth switch is in an on or off state under the control of the first voltage control signal, and the sixth switch is in an on or off state under the control of the second voltage control signal.
9. The phase current sampling circuit according to claim 8, wherein The voltage bias circuit further includes a ninth resistor, a tenth resistor, an eleventh resistor, and a twelfth resistor, and wherein: The ninth resistor and the fifth switch are serially connected between the positive input terminal of the voltage follower and the ground, and the tenth resistor and the sixth switch are serially connected between the positive input terminal of the voltage follower and the supply voltage of the microcontroller unit; and The eleventh resistor is connected between the positive input terminal of the voltage follower and the ground, and the twelfth resistor is connected between the positive input terminal of the voltage follower and the supply voltage of the microcontroller unit.
10. A vehicle, comprising the phase current sampling circuit according to any one of claims 1 to 9.