Motor controller three-phase current equalization detection circuit and method, medium and equipment
By designing hardware circuits in the motor controller for three-phase current equalization detection, the lack of equalization detection function in the prior art and the problem of false alarms and slow response periods in the detection of software algorithms is solved, and the stable operation and efficient detection of the motor are achieved.
Patent Information
- Application Number
- CN202411815061.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-04
AI Technical Summary
The existing motor controllers lack the three-phase current balance detection function, resulting in uneven heating of the motor, fluctuations in torque, reduced efficiency, and even damage. Existing software algorithms detect problems such as risk of false alarms and slow response cycles.
A three-phase current equalization detection circuit of the motor controller is designed, and the three-phase current value is sampled in real time through the hardware circuit, and the MCU control module is used to adjust the duty cycle of the PWM wave, set the detection and comparison threshold, so as to realize the three-phase current equalization judgment and real-time monitoring.
It realizes fast, accurate and reliable three-phase current balance detection, avoiding damage caused by uneven heating of the motor, and is suitable for new energy vehicles with higher functional safety levels.
Smart Images

Figure CN119758062A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of new energy vehicles, and in particular to a three-phase current balancing detection circuit, method, medium and equipment for a motor controller. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] At present, most motor controller products do not have the function of three-phase current balance detection; however, in the motor control system, the balance of three-phase current is crucial to the stable operation of the motor. If the three-phase current is unbalanced, it may cause problems such as uneven heating of the motor, torque fluctuation, reduced efficiency, and even damage the motor and controller.
[0004] For this reason, the prior art has adopted software algorithms to realize three-phase current balance detection, that is, by collecting three-phase currents, and then using software algorithms to perform threshold comparison operations to determine whether the three-phase currents are balanced. A common detection algorithm is to calculate the average value and standard deviation of the three-phase currents. When the deviation of a phase current from the average value exceeds a certain multiple of the standard deviation, the phase current is considered to be unbalanced.
[0005] However, when the software algorithm operates abnormally, it cannot accurately judge the balance of the three-phase current, and there may even be a risk of false alarm; therefore, it is necessary to design a hardware circuit to realize the three-phase current balance judgment; at the same time, compared with the hardware circuit, the software algorithm judgment response cycle will be slower, and it is impossible to accurately, reliably and monitor the balance of the three-phase current in real time. Summary of the invention
[0006] In order to overcome the shortcomings of the background technology, the present invention provides a motor controller three-phase current balance detection circuit, method, medium and equipment, which realize three-phase current balance judgment through hardware circuit and can monitor the balance of three-phase current in real time.
[0007] The technical solution adopted by the present invention is: a three-phase current balancing detection circuit of a motor controller, comprising a current sampling module, an MCU control module and a three-phase current balancing detection module;
[0008] The current sampling module samples the three-phase current values in real time, and sends the three-phase current values to the three-phase current balancing detection module and the MCU control module;
[0009] The MCU control module adjusts the duty cycle of the PWM wave according to the three-phase current value, and sends the PWM wave to the three-phase current balancing detection module;
[0010] The three-phase current balance detection module sets a detection comparison threshold for three-phase current balance detection according to the PWM wave, then detects and processes the three-phase current value based on the detection comparison threshold, and outputs a detection signal to the MCU control module.
[0011] Further,
[0012] The three-phase current balancing detection module includes a three-phase summing module, a threshold comparison module, a threshold setting module and an alarm module;
[0013] The three-phase summing module is used to sum the three-phase current values sampled in real time and output a summing signal Idiff;
[0014] The threshold setting module receives the PWM wave output by the MCU control module, and outputs an upper threshold Is_up and a lower threshold Is_down to the threshold comparison module according to the PWM wave;
[0015] The threshold comparison module compares the sum signal Idiff with the upper threshold Is_up and the lower threshold Is_down, and then outputs a detection signal Is to the alarm module and the MCU control module;
[0016] The alarm module performs an alarm indication according to the detection signal Is.
[0017] Further,
[0018] The threshold setting module includes two second-order RC filter circuits;
[0019] The PWM waves output by the MCU control module include MCU_PWM1 and MCU_PWM2;
[0020] The MCU_PWM1 outputs the upper threshold value Is_up after passing through the first second-order RC filter circuit;
[0021] The MCU_PWM2 outputs the lower threshold value Is_down after passing through the second second-order RC filter circuit.
[0022] Further,
[0023] The MCU_PWM1 also outputs a first read-back signal Is_up_mcu to the MCU control module after passing through the first second-order RC filter circuit;
[0024] The MCU_PWM2 also outputs a second read-back signal Is_down_mcu to the MCU control module after passing through the second second-order RC filter circuit.
[0025] Further,
[0026] The threshold comparison module includes a first operational comparator U1A, a second operational comparator U1B, an input resistor R3 and an input resistor R4;
[0027] The upper threshold value Is_up is connected to the non-inverting input terminal of the first operational comparator U1A, and the lower threshold value Is_down is connected to the inverting input terminal of the second operational comparator U1B;
[0028] Connecting the sum signal Idiff to the inverting input terminal of the first operational comparator U1A via the input resistor R3;
[0029] Connecting the sum signal Idiff to the non-inverting input terminal of the second operational comparator U1B via the input resistor R4;
[0030] The output end of the first operational comparator U1A is connected to the output end of the second operational comparator U1B and then outputs the detection signal Is.
[0031] Further,
[0032] The threshold comparison module also includes a voltage dividing resistor R9 and a voltage dividing resistor R10;
[0033] The voltage-dividing resistors R9 and R10 are used to add a forward bias to the sum signal Idiff by means of voltage division.
[0034] Further,
[0035] The alarm module includes a current limiting resistor R5 and an indicator light LED;
[0036] The indicator light LED is a light emitting diode, the cathode end of the light emitting diode is electrically connected to the output ends of the first operational comparator U1A and the second operational comparator U1B, and the anode end of the light emitting diode is electrically connected to a power supply via the resistor R5.
[0037] Further,
[0038] The three-phase summing module includes an operational amplifier U2B, an input resistor R1, a feedback resistor R2, an input resistor R6, an input resistor R7 and an input resistor R8;
[0039] The three-phase current values are respectively connected to the inverting input terminal of the operational amplifier U2B through input resistor R6, input resistor R7 and input resistor R8;
[0040] The feedback resistor R2 is connected between the inverting input terminal and the output terminal of the operational amplifier U2B;
[0041] The non-inverting input terminal of the operational amplifier U2B is grounded through the input resistor R1;
[0042] The output terminal of the operational amplifier U2B outputs the sum signal Idiff.
[0043] The present invention also provides a motor controller three-phase current balancing detection method, which is applied to the above-mentioned motor controller three-phase current balancing detection circuit, and the method comprises:
[0044] The current sampling module samples the three-phase current value in real time, and sends the three-phase current value to the three-phase current balancing detection module and the MCU control module;
[0045] The MCU control module receives the three-phase current value, adjusts the duty cycle of the PWM wave according to the three-phase current value, and sends the PWM wave to the three-phase current balance detection module;
[0046] The three-phase current balancing detection module receives the three-phase current value and the PWM wave, sets a detection comparison threshold for three-phase current balancing detection according to the PWM wave, then detects and processes the three-phase current value based on the detection comparison threshold, and outputs a detection signal to the MCU control module.
[0047] Further,
[0048] The method further comprises:
[0049] After receiving the detection signal, the MCU control module also performs imbalance compensation through a software algorithm.
[0050] Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing one or more programs, which, when executed, can implement the aforementioned motor controller three-phase current balancing detection method.
[0051] Based on the same inventive concept, the present invention also provides an electronic device, including a processor, a communication interface, a computer-readable storage medium as described above, and a communication bus; wherein the processor, the communication interface, and the computer-readable storage medium communicate with each other via the communication bus; and the processor is used to execute the program stored in the computer-readable storage medium.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1. The three-phase current balance judgment is realized through the hardware circuit, and the balance of the three-phase current can be monitored in real time; when the three-phase current is unbalanced, the balance fault can be reported, and timely adjustments can be made through the software algorithm, thereby effectively avoiding damage to the motor caused by uneven heating;
[0054] 2. The MCU control module sets the threshold value, and can adjust the duty cycle of the input MCU_PWM1 and MCU_PWM2 waveforms according to the real-time sampled three-phase current values, thereby adjusting the threshold point in real time according to the current operating conditions, and realizing real-time and accurate detection of the balance of the three-phase current;
[0055] 3. It can monitor the balance of three-phase current in real time more quickly and accurately, and can be applied to new energy vehicles with a higher functional safety level. It can reduce the failure rate of the motor due to unbalanced phase current. At the same time, it can cooperate with the existing software algorithm detection scheme to perform phase current balance detection, and can verify the results of the balance detection, so as to provide reliable and accurate detection results.
[0056] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures pointed out in the description, claims and drawings.
[0057] The present invention will be further described below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0059] Figure 1 A schematic diagram of the framework structure of a three-phase current balancing detection circuit of a motor controller according to an embodiment of the present invention;
[0060] Figure 2 This is an overall circuit diagram of a three-phase current balancing detection module according to an embodiment of the present invention;
[0061] Figure 3 A circuit diagram of a threshold setting module according to an embodiment of the present invention;
[0062] Figure 4 A circuit diagram of a threshold comparison module according to an embodiment of the present invention;
[0063] Figure 5 A circuit diagram of a three-phase summing module according to an embodiment of the present invention;
[0064] Figure 6 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solution and advantages of the implementation of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0066] like Figures 1 to 5 As shown, an embodiment of the present invention provides a three-phase current balancing detection circuit of a motor controller, including a current sampling module, an MCU control module and a three-phase current balancing detection module;
[0067] The current sampling module samples the three-phase current values in real time, and sends the three-phase current values to the three-phase current balancing detection module and the MCU control module;
[0068] The MCU control module adjusts the duty cycle of the PWM wave according to the three-phase current value, and sends the PWM wave to the three-phase current balancing detection module;
[0069] The three-phase current balance detection module sets a detection comparison threshold for three-phase current balance detection according to the PWM wave, then detects and processes the three-phase current value based on the detection comparison threshold, and outputs a detection signal to the MCU control module.
[0070] In the above technical solution, the three-phase current value of the electric vehicle motor is sampled in real time by the current sampling module, and then the detection signal is output to the MCU control module after detection and processing by the three-phase current balance detection module, and the imbalance compensation is performed through the software algorithm strategy; at the same time, the real-time sampled three-phase current value is fed back to the MCU control module, and the control algorithm adjusts the duty cycle of the PWM wave through this feedback value, and at the same time, the PWM square wave signal is transmitted to the three-phase current detection balance module for threshold setting, so as to realize the flexible real-time adjustment of the detection comparison threshold value for each working condition. The above technical solution realizes the three-phase current balance judgment through the hardware circuit, and can monitor the balance of the three-phase current in real time. Compared with the existing three-phase current balance judgment realized by the software algorithm, the embodiment of the present invention realizes the response cycle of the three-phase current balance judgment through the hardware circuit, which can achieve accurate, reliable and real-time monitoring of the balance of the three-phase current. Furthermore, the balance fault can be reported in the state of three-phase current imbalance, and timely adjustment can be made through the software algorithm, so as to effectively avoid the damage of the motor caused by uneven heating.
[0071] As a preferred technical solution, Figure 1As shown, the three-phase current balancing detection module includes a three-phase summing module, a threshold comparison module, a threshold setting module and an alarm module; the three-phase summing module is used to sum the three-phase current values sampled in real time and output a summing signal Idiff; the threshold setting module receives the PWM wave output by the MCU control module, and outputs an upper threshold Is_up and a lower threshold Is_down to the threshold comparison module according to the PWM wave; the threshold comparison module compares the summing signal Idiff with the upper threshold Is_up and the lower threshold Is_down, and then outputs a detection signal Is to the alarm module and the MCU control module; the alarm module gives an alarm indication according to the detection signal Is. The overall circuit of the three-phase current balancing detection module of this embodiment is shown in FIG. Figure 2 shown.
[0072] In this embodiment, the three-phase current balance detection module includes a three-phase summation module, a threshold comparison module, a threshold setting module and an alarm module, which are reasonably designed and can well realize the three-phase current balance detection function; this embodiment designs a three-phase summation module based on the fact that the sum of the instantaneous values of the three-phase current of the three-phase AC motor at any time is 0, and the three-phase summation module can sum and output the real-time sampling signals of the three-phase current; the threshold setting module outputs the upper threshold value Is_up and the lower threshold value Is_down according to the PWM wave (i.e., the PWM signal), which can facilitate the threshold comparison module to compare the sum signal Idiff with the upper threshold value Is_up and the lower threshold value Is_down and output the detection signal Is.
[0073] As a preferred technical solution, Figure 3 As shown, the threshold setting module includes two second-order RC filter circuits; the PWM waves output by the MCU control module include MCU_PWM1 and MCU_PWM2; the MCU_PWM1 outputs the upper threshold value Is_up after passing through the first second-order RC filter circuit; the MCU_PWM2 outputs the lower threshold value Is_down after passing through the second second-order RC filter circuit.
[0074] In this embodiment, MCU_PWM1 is a PWM signal sent by the PWM port of the MCU control module, which is actually a PWM signal for setting the upper threshold, and MCU_PWM2 is a PWM signal for setting the lower threshold; the MCU control module inputs MCU_PWM1 and MCU_PWM2 to the threshold setting module, and MCU_PWM1 and MCU_PWM2 are smoothly output as the upper threshold Is_up and the lower threshold Is_down through the second-order RC filtering of the threshold setting module. The MCU control module sets the threshold, and the duty cycle of the waveforms of the input MCU_PWM1 and MCU_PWM2 can be adjusted according to the real-time sampled three-phase current value, so as to adjust the threshold point in real time according to the current operating conditions, and realize real-time and accurate detection of the balance of the three-phase current.
[0075] The main function of the second-order RC filter circuit in this embodiment is to convert the PWM square wave signal output by the MCU control module into a DC signal. The working principle of the second-order RC filter circuit: The second-order RC filter circuit will filter the PWM signal twice. First, the PWM signal enters the first RC link, and the capacitor will charge on the rising edge of the pulse and discharge on the falling edge; because both charging and discharging take time, the high-frequency components begin to be filtered out, and the degree of signal mutation is reduced. Then, the signal that has passed the first RC link enters the second RC link to further filter out the remaining high-frequency components. As the high-frequency components in the signal are continuously absorbed by the capacitor and consumed by the resistor, the final output signal approaches a stable DC signal. The voltage value of this DC signal is related to the duty cycle of the PWM signal. For example, the duty cycle of the PWM signal is 50%, and the voltage of the DC signal after filtering is about half of the high-level voltage of the PWM signal; when the duty cycle is 20%, the DC signal voltage will become correspondingly lower, about 20% of the high-level voltage.
[0076] Figure 3 In the circuit design, the upper threshold is set by a pull-up resistor, and the lower threshold is set by a pull-down resistor. Specifically, R11 is a pull-up resistor, and the voltage of the output value Is_up is calculated by the positive duty cycle of the PWM signal as the upper threshold, and R15 is a pull-down resistor, and the voltage of the output value Is_down is calculated by the negative duty cycle of the PWM signal as the lower threshold. The second-order RC filter circuit can be further referred to the prior art, which will not be described in detail here.
[0077] As a preferred technical solution, the MCU_PWM1 also outputs a first read-back signal Is_up_mcu to the MCU control module after passing through the first second-order RC filter circuit; the MCU_PWM2 also outputs a second read-back signal Is_down_mcu to the MCU control module after passing through the second second-order RC filter circuit.
[0078] In this embodiment, Is_up_mcu and Is_down_mcu are the MCU readback values of the upper threshold and the lower threshold, respectively; the Is_up signal is sent to the threshold comparison module to determine the balance of the three-phase current, and the Is_up_mcu is a DC signal after the second-order RC filter and is sent to the MCU for readback to verify whether it is consistent with the designed upper threshold; the Is_down signal is sent to the threshold comparison module to determine the balance of the three-phase current, and the Is_down_mcu is a DC signal after the second-order RC filter and is sent to the MCU for readback to verify whether it is consistent with the designed lower threshold.
[0079] As a preferred technical solution, Figure 4 As shown, the threshold comparison module includes a first operational comparator U1A, a second operational comparator U1B, an input resistor R3 and an input resistor R4; the upper threshold value Is_up is connected to the non-inverting input terminal of the first operational comparator U1A, and the lower threshold value Is_down is connected to the inverting input terminal of the second operational comparator U1B; the sum signal Idiff is connected to the inverting input terminal of the first operational comparator U1A through the input resistor R3; the sum signal Idiff is connected to the non-inverting input terminal of the second operational comparator U1B through the input resistor R4; the output terminal of the first operational comparator U1A is connected to the output terminal of the second operational comparator U1B, and then the detection signal Is is output.
[0080] In this embodiment, the MCU control module outputs the upper threshold value Is_up and the lower threshold value Is_down in real time after the threshold setting module; the output result of the three-phase summation module is respectively connected to the inverting input terminal of the first operational amplifier U1A through the input resistor R3 and to the non-inverting input terminal of the second operational amplifier U1B through the input resistor R4. Preferably, the first operational comparator U1A and the second operational comparator U1B use the same operational amplifier chip, which has dual operational amplifiers inside, SOP-8 packaging, and uses the same power supply and ground pins.
[0081] As a preferred technical solution, the threshold comparison module further includes a voltage-dividing resistor R9 and a voltage-dividing resistor R10; the voltage-dividing resistor R9 and the voltage-dividing resistor R10 add a forward bias to the sum signal Idiff by voltage division. In order to facilitate the hardware circuit to perform calculations better, in this embodiment, the voltage-dividing resistors R9 and R10 add a forward bias to the inverted sum output Idiff by voltage division, and set R9 and R10 according to the three-phase current balance requirements to adjust the forward bias.
[0082] The purpose of adding a forward bias to Idiff in this embodiment is to make Iu+Iv+Iw=0 a balanced state. For example, in an unbalanced state, the sum of the three-phase currents may be a negative number. Negative numbers cannot be calculated in a hardware circuit, so a forward bias needs to be added.
[0083] In this embodiment, the three-phase current balance is measured by the three-phase current imbalance. The three-phase current imbalance is calculated as follows: the difference between the largest phase current of the three phases and the average value of the three-phase current, and then divided by the average value of the three-phase current multiplied by 100%. The calculated result is used to measure the imbalance of the three-phase current. Under normal circumstances, the three-phase current imbalance of the motor is required not to exceed 10% to 15%. In order to keep the motor running stably for a long time and avoid damage caused by heat, it needs to be controlled within this range. For example, the design requires that the imbalance of the three-phase current of the motor does not exceed 10%, that is, the maximum negative deviation is 10%, then the voltage division value of R9 and R10 must be greater than 10% of the power supply of the MCU's GPIO port; assuming that the voltage of the MCU's GPIO port is 5V, that is, the voltage division value of R9 and R10 must be greater than 0.5V, and VDD1 is 5V, then the voltage division value of R9 and R10 can be set to 2V, that is, R9 can be selected as 3KΩ, and R10 can be selected as 2KΩ; then the forward bias Idiff voltage is set to 2V, Is_up sets the upper boundary threshold of 2.5V by adjusting the PWM duty cycle (50%), and Is_down sets the lower boundary threshold of 1.5V by adjusting the PWM duty cycle (30%). The balance requirement of three-phase current varies according to design requirements. For example, if the imbalance requirement of high-precision motor is within 5%, the upper boundary threshold of Is_up and the lower boundary threshold of Is_down need to be modified. When the margin of Idiff setting forward bias is large, R9 and R10 do not need to be modified. For example, the Idiff set above is 2V, which far exceeds the design requirement of 10%, that is, no negative number will appear.
[0084] In this embodiment, one end of the voltage-dividing resistor R9 is electrically connected to the power supply VDD1, one end of the voltage-dividing resistor R10 is grounded, and the other end of the voltage-dividing resistor R9 and the other end of the voltage-dividing resistor R10 are both electrically connected to the output end of the three-phase summing module (the output end of the operational amplifier U2B in this embodiment), thereby adding a forward bias to the inverted summing output Idiff by voltage division.
[0085] As a preferred technical solution, the alarm module includes a current limiting resistor R5 and an indicator light LED; the indicator light LED adopts a light emitting diode, the cathode end of the light emitting diode is electrically connected to the output end of the first operational comparator U1A and the second operational comparator U1B, and the anode end of the light emitting diode is electrically connected to the power supply via the resistor R5.
[0086] In this embodiment, the indicator LED uses a light-emitting diode to indicate an alarm. When the three-phase current is unbalanced, the sum signal Idiff output result is not 0, and the threshold comparison module will output a detection signal Is. At this time, Is is low, and the LED lights up to display the alarm state. In this embodiment, the anode end of the light-emitting diode is electrically connected to the power supply VDD2 through the resistor R5.
[0087] Is in this embodiment is the signal of the final detection result, which needs to be sent to the GPIO port of the MCU. The GPIO power supply of the MCU depends on the MCU model platform. Currently, 3.3V or 5V are commonly used in the market; that is, the power supply VDD2 is determined by the high level of the GPIO + the forward conduction voltage of the LED; in this embodiment, the power supply VDD2 may also be the same as the power supply VDD1. Whether one power supply can be used depends on the platform where the MCU is located.
[0088] As a preferred technical solution, Figure 5 As shown, the three-phase summing module includes an operational amplifier U2B, an input resistor R1, a feedback resistor R2, an input resistor R6, an input resistor R7 and an input resistor R8; the three-phase current values are respectively connected to the inverting input terminal of the operational amplifier U2B through the input resistor R6, the input resistor R7 and the input resistor R8; the feedback resistor R2 is connected between the inverting input terminal and the output terminal of the operational amplifier U2B; the non-inverting input terminal of the operational amplifier U2B is grounded through the input resistor R1; the output terminal of the operational amplifier U2B outputs the summing signal Idiff.
[0089] In this embodiment, the three-phase summing module adopts a reverse summing circuit, through which the real-time sampling signals of the three-phase current can be summed and output. In the three-phase current balance detection, by inputting the three-phase current values into the reverse summing circuit respectively, when the three-phase current is completely balanced, the summation result is zero. If the three-phase current is unbalanced, a non-zero output signal will be generated, and the size of the signal reflects the degree of imbalance of the three-phase current. The operational amplifier U2B of this embodiment is powered by the controller system architecture power supply VDD1. Using a power supply on the same PCBA is convenient for layout and wiring, and no additional power supply cost is required; in this embodiment, the power supply of the operational comparator (including the first operational comparator U1A and the second operational comparator U1B) and the power supply of the operational amplifier U2B are powered by the same system, that is, the controller system architecture power supply VDD1 is used. Figure 5 The capacitor C2 in the circuit mainly plays a filtering role. Because the power supply shares the system architecture power supply, the circuit may be far away from the power output, and the wiring will be far away, which is easy to generate ripples. Therefore, a filtering process is performed at the power supply port of the op amp to ensure the stable operation of the op amp circuit.
[0090] In the detection circuit of this embodiment, the non-inverting input terminal of the reverse summing circuit module (i.e., the three-phase summing module) is grounded, and the integrated operational amplifier operates in the "virtual ground" state, making the common-mode impedance at the input terminal of the integrated operational amplifier very small. This can effectively reduce the influence of common-mode interference signals on the monitoring results and improve the monitoring accuracy. When the motor is running, common-mode interference may be generated. Since the common-mode impedance at the input terminal of the integrated operational amplifier in the circuit is small, the ability to resist common-mode interference is effectively improved. The three-phase current balance detection circuit of the motor controller designed as above has good common-mode rejection ability, small common-mode interference, and stronger common-mode interference resistance ability. It can improve the results of three-phase current balance detection. Good common-mode interference resistance ability can ensure the stability of the circuit and help reduce the influence of interference signals on the reliability and lifespan of the components in the circuit. Continuous common-mode interference may cause the voltage or current of electronic components to exceed the normal承受 range, accelerating the aging of the components.
[0091] To more clearly show the working process of the three-phase current balance detection circuit of the motor controller in the embodiment of the present invention, the following detection circuit logic is also provided here:
[0092] The three-phase summing module realizes: Iu + Iv + Iw = Idiff
[0093] ① When Idiff > Is_up, Is outputs a low level L, and the alarm LED lights up, indicating that the balance degree of the three-phase current detection does not meet the requirements;
[0094] ② When Idiff < Is_down, Is outputs a low level L, and the alarm LED lights up, indicating that the balance degree of the three-phase current detection does not meet the requirements;
[0095] ③ When Is_down < Idiff < Is_up, Is outputs a high level H, and the alarm LED does not light up, indicating that the balance degree of the three-phase current detection meets the requirements.
[0096] For example, assume that the motor controller runs at the peak operating condition. The three-phase current Iu at a certain moment is 500A, Iv is -360A, and Iw is 200A. The forward bias is set to 2V, the unbalance degree is designed according to 10%, the upper limit threshold Is_up is set to 2.5V, and the lower limit threshold Is_down is set to 1.5V. That is, the analog voltage value corresponding to Iu + Iv + Iw is -60 / 500 * 5V = -0.6V. After adding the forward bias, the voltage value of Idiff is 1.4V; then Idiff < Is_down. At this time, Is outputs a low level, the alarm LED lights up, and it is reported that the three-phase balance degree does not meet the design requirements.
[0097] Assume that the three-phase current Iu at a certain moment is 200A, Iv is 380A, and Iw is 500A. The analog voltage value corresponding to Iu+Iv+Iw is 80 / 500*5V=0.8V. After the forward bias, the voltage value of Idiff is 2.8V, then Idiff>Is_up. At this time, the Is output is low, the alarm LED lights up, and it is reported that the three-phase balance does not meet the design requirements.
[0098] The present invention also provides a motor controller three-phase current balancing detection method, which is applied to the above-mentioned motor controller three-phase current balancing detection circuit, and the method comprises:
[0099] The current sampling module samples the three-phase current value in real time, and sends the three-phase current value to the three-phase current balancing detection module and the MCU control module;
[0100] The MCU control module receives the three-phase current value, adjusts the duty cycle of the PWM wave according to the three-phase current value, and sends the PWM wave to the three-phase current balance detection module;
[0101] The three-phase current balancing detection module receives the three-phase current value and the PWM wave, sets a detection comparison threshold for three-phase current balancing detection according to the PWM wave, then detects and processes the three-phase current value based on the detection comparison threshold, and outputs a detection signal to the MCU control module.
[0102] In the above technical solution, the three-phase current value of the electric vehicle motor is sampled in real time by the current sampling module, and then the detection signal is output to the MCU control module after detection and processing by the three-phase current balancing detection module; at the same time, the real-time sampled three-phase current value is fed back to the MCU control module, and the control algorithm adjusts the duty cycle of the PWM wave through this feedback value, and at the same time transmits the PWM square wave signal to the threshold setting module of the three-phase current detection balancing module, thereby realizing flexible real-time adjustment of the detection comparison threshold value for each working condition.
[0103] As a preferred technical solution, the motor controller three-phase current balance detection method further includes: after the MCU control module receives the detection signal, it also performs imbalance compensation through a software algorithm.
[0104] In some embodiments, the MCU control module can use a software algorithm strategy to compensate for the problem of three-phase current imbalance. This embodiment can be implemented through a current feedback regulation algorithm, a vector control-based compensation algorithm, or a harmonic compensation algorithm. The specific algorithm used for compensation depends on the software model.
[0105] After adopting the above technical solution, the balance fault can be reported in the state of three-phase current imbalance, and timely adjustments can be made through software algorithms (including but not limited to current feedback regulation algorithms, compensation algorithms based on vector control, and harmonic compensation algorithms), thereby effectively avoiding damage to the motor caused by uneven heating. In this embodiment, the balance fault is reported by the three-phase current balance detection module outputting the detection signal Is to the MCU control module, specifically to the GPIO port of the MCU, such as Figure 1 shown.
[0106] The following is a brief description of the above three algorithms.
[0107] 1. Current feedback regulation algorithm
[0108] The compensation amount is obtained by performing difference calculation based on the values collected in real time from the three-phase current. For example, if the current of phase A is larger than the reference value, and the currents of phases B and C are smaller than the reference value, it is necessary to reduce the given value of the current of phase A, and increase the given values of the currents of phases B and C. The compensation signal is calculated using a PID (proportional-integral-differential) controller. The PI controller can adjust the compensation signal based on the proportion and integral part of the current deviation, so that the three-phase current gradually tends to balance. On this basis, the PID controller also takes into account the rate of change of the deviation, and can make adjustments more quickly and accurately.
[0109] 2. Compensation algorithm based on vector control
[0110] In the vector control strategy, the three-phase current is converted into current components (such as dq axis current) in a rotating coordinate system. By detecting the imbalance of the dq axis current, compensation is performed in the rotating coordinate system; for example, when the d axis current imbalance is detected, the given value of the d axis current is adjusted in the rotating coordinate system, and then the compensated dq axis current is converted back to three-phase current, thereby achieving the balance of the three-phase current. This method can more effectively deal with the problem of three-phase current imbalance in the dynamic process of the motor because it takes into account the relationship between the motor magnetic field and torque.
[0111] 3. Harmonic compensation algorithm
[0112] Three-phase current imbalance may be accompanied by the emergence of harmonic current. A harmonic compensation algorithm can be used to reduce the impact of harmonics on current balance. First, the three-phase current is analyzed through spectrum analysis tools such as fast Fourier transform (FFT) to identify the harmonic components, and then a compensation current signal with the same magnitude and opposite direction as the harmonic current is generated and superimposed on the given value of the three-phase current to offset the harmonic current and thereby improve the balance of the three-phase current.
[0113] In summary, compared with the prior art, the advantages of the present invention are:
[0114] 1. It is possible to quickly discover problems in the early test stage of motor controller development, so as to find solutions to avoid and solve the phase current balance problem, avoid batch problems in the mass production stage, greatly reduce customer complaints and claims risks, and lay a solid foundation for winning a good reputation with customers. The embodiment of the present invention reports the three-phase current imbalance performance, but the current prior art does not have such a detection circuit solution. In addition, general motor controllers use oscilloscopes to collect data for calculation in the early development test stage, so there will be more test equipment and the test will be more complicated. The detection circuit of the embodiment of the present invention can quickly obtain results, and can also calibrate the three-phase current balance under different working conditions.
[0115] 2. It can monitor the balance of three-phase current in real time more quickly and accurately, and can be applied to new energy vehicles with higher functional safety levels. It can reduce the failure rate of motors caused by unbalanced phase currents. At the same time, it cooperates with the existing software algorithm detection scheme to perform phase current balance detection, and can verify the results of the balance detection, thereby providing reliable and accurate detection results. The existing software algorithm detection scheme and the detection circuit of the embodiment of the present invention can be detected independently. The detection result of the detection circuit of the embodiment of the present invention will be faster than the software. The software algorithm detection scheme needs to execute the software algorithm, and the result of the software algorithm is then proofread to the result of this scheme. The two are used in combination for redundant design, and this combination can be adopted for some systems with higher functional safety requirements.
[0116] Based on the same inventive concept, the present invention also provides a computer-readable storage medium storing one or more programs, which, when executed, can implement the aforementioned motor controller three-phase current balancing detection method.
[0117] Based on the same inventive concept, the present invention also provides an electronic device, such as Figure 6 As shown, it includes a processor, a communication interface, a computer-readable storage medium as described above, and a communication bus; wherein the processor, the communication interface, and the computer-readable storage medium communicate with each other via the communication bus; and the processor is used to execute the program stored in the computer-readable storage medium.
[0118] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0119] In the above embodiments, the description of each embodiment has its own emphasis. For the part not described in detail in one embodiment, please refer to the relevant description of other embodiments. The parts not involved in the above embodiments are the same as the prior art or can be implemented by the prior art, and no further description is given here.
[0120] Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent substitutions for some of the technical features therein; and these modifications or substitutions do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A three-phase current balancing detection circuit for a motor controller, characterized in that: It includes current sampling module, MCU control module and three-phase current balancing detection module; The current sampling module samples the three-phase current values in real time, and sends the three-phase current values to the three-phase current balancing detection module and the MCU control module; The MCU control module adjusts the duty cycle of the PWM wave according to the three-phase current value, and sends the PWM wave to the three-phase current balancing detection module; The three-phase current balance detection module sets a detection comparison threshold for three-phase current balance detection according to the PWM wave, then detects and processes the three-phase current value based on the detection comparison threshold, and outputs a detection signal to the MCU control module.
2. A motor controller three-phase current balancing detection circuit according to claim 1, characterized in that: The three-phase current balancing detection module includes a three-phase summing module, a threshold comparison module, a threshold setting module and an alarm module; The three-phase summing module is used to sum the three-phase current values sampled in real time and output a summing signal Idiff; The threshold setting module receives the PWM wave output by the MCU control module, and outputs an upper threshold Is_up and a lower threshold Is_down to the threshold comparison module according to the PWM wave; The threshold comparison module compares the sum signal Idiff with the upper threshold Is_up and the lower threshold Is_down, and then outputs a detection signal Is to the alarm module and the MCU control module; The alarm module performs an alarm indication according to the detection signal Is.
3. A motor controller three-phase current balancing detection circuit according to claim 2, characterized in that: The threshold setting module includes two second-order RC filter circuits; The PWM waves output by the MCU control module include MCU_PWM1 and MCU_PWM2; The MCU_PWM1 outputs the upper threshold value Is_up after passing through the first second-order RC filter circuit; The MCU_PWM2 outputs the lower threshold value Is_down after passing through the second second-order RC filter circuit.
4. A three-phase current balancing detection circuit for a motor controller according to claim 3, characterized in that: The MCU_PWM1 also outputs a first read-back signal Is_up_mcu to the MCU control module after passing through the first second-order RC filter circuit; The MCU_PWM2 also outputs a second read-back signal Is_down_mcu to the MCU control module after passing through the second second-order RC filter circuit.
5. A three-phase current balancing detection circuit for a motor controller according to claim 2, characterized in that: The threshold comparison module includes a first operational comparator U1A, a second operational comparator U1B, an input resistor R3 and an input resistor R4; The upper threshold value Is_up is connected to the non-inverting input terminal of the first operational comparator U1A, and the lower threshold value Is_down is connected to the inverting input terminal of the second operational comparator U1B; Connecting the sum signal Idiff to the inverting input terminal of the first operational comparator U1A via the input resistor R3; Connecting the sum signal Idiff to the non-inverting input terminal of the second operational comparator U1B via the input resistor R4; The output end of the first operational comparator U1A is connected to the output end of the second operational comparator U1B and then outputs the detection signal Is.
6. A three-phase current balancing detection circuit for a motor controller according to claim 5, characterized in that: The threshold comparison module also includes a voltage dividing resistor R9 and a voltage dividing resistor R10; The voltage-dividing resistors R9 and R10 are used to add a forward bias to the sum signal Idiff by means of voltage division.
7. A three-phase current balancing detection circuit for a motor controller according to claim 5, characterized in that: The alarm module includes a current limiting resistor R5 and an indicator light LED; The indicator light LED is a light emitting diode, the cathode end of the light emitting diode is electrically connected to the output ends of the first operational comparator U1A and the second operational comparator U1B, and the anode end of the light emitting diode is electrically connected to a power supply via the resistor R5.
8. A three-phase current balancing detection circuit for a motor controller according to any one of claims 2 to 7, characterized in that: The three-phase summing module includes an operational amplifier U2B, an input resistor R1, a feedback resistor R2, an input resistor R6, an input resistor R7 and an input resistor R8; The three-phase current values are respectively connected to the inverting input terminal of the operational amplifier U2B through input resistor R6, input resistor R7 and input resistor R8; The feedback resistor R2 is connected between the inverting input terminal and the output terminal of the operational amplifier U2B; The non-inverting input terminal of the operational amplifier U2B is grounded through the input resistor R1; The output terminal of the operational amplifier U2B outputs the sum signal Idiff.
9. A motor controller three-phase current balancing detection method, applied to the motor controller three-phase current balancing detection circuit according to any one of claims 1 to 8, characterized in that: The method comprises: The current sampling module samples the three-phase current value in real time, and sends the three-phase current value to the three-phase current balancing detection module and the MCU control module; The MCU control module receives the three-phase current value, adjusts the duty cycle of the PWM wave according to the three-phase current value, and sends the PWM wave to the three-phase current balance detection module; The three-phase current balancing detection module receives the three-phase current value and the PWM wave, sets a detection comparison threshold for three-phase current balancing detection according to the PWM wave, then detects and processes the three-phase current value based on the detection comparison threshold, and outputs a detection signal to the MCU control module.
10. A motor controller three-phase current balancing detection method according to claim 9, characterized in that: The method further comprises: After receiving the detection signal, the MCU control module also performs imbalance compensation through a software algorithm.
11. A computer-readable storage medium storing one or more programs, characterized in that: When the one or more programs are executed, the motor controller three-phase current balancing detection method described in claim 9 or 10 can be implemented.
12. An electronic device comprising a processor, a communication interface, the computer-readable storage medium of claim 11, and a communication bus; wherein: The processor, the communication interface, and the computer-readable storage medium communicate with each other via a communication bus; It is characterized in that The processor is configured to execute a program stored in a computer-readable storage medium.
Citation Information
Cited By
Three-phase current overcurrent detection circuit and method for motor controller
CN120652158A
Insulation detection system based on vehicle-mounted power supply
CN121454255A