Motor current sensor acquisition current calibration method and motor controller

CN122815299APending Publication Date: 2026-09-25SHANGHAI JINMAI ELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611099137.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

然而,上述方法对环境设备要求高,需通过外部散热保证电机控制器的安全,且磁场定向控制采用闭环控制较为复杂(即,通过三相六路的发波模式控制电机晶体管产生三相电流),无法在项目集成时复用三相六路脉冲软件驱动,实现对电机电流传感器采集电流标定,致使电机控制器控制集成复杂度较高

Benefits of technology

[0014]本发明实施例通过运行脉冲标定模式,即获取电机桥臂导通模式,根据电机桥臂导通模式控制电机运行和产生电流处理指令,即实现复用三相六路PWM脉冲软件驱动电机输出稳定的脉冲电流;根据电流处理指令获取电流传感器采集的三相模拟电流电压数据,并根据三相模拟电流电压数据确定三相电压峰值和零电流三相电压;获取示波器采集的三相数字电流数据,并根据三相电压峰值、零电流三相电压以及三相数字电流数据确定标定系数;由此,本方案实现以复用三相六路PWM脉冲软件驱动电机输出稳定的脉冲电流,进而实现对电机电流传感器采集电流标定,从而降低电机控制器集成控制的复杂度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122815299A_ABST
    Figure CN122815299A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a motor current sensor current collection calibration method and a motor controller. The motor current sensor current collection calibration method comprises the following steps: running a pulse calibration mode; the pulse calibration mode comprises the following steps: acquiring a motor bridge arm conduction mode, controlling the motor to run and generating a current processing instruction according to the motor bridge arm conduction mode; acquiring three-phase analog current voltage data collected by a current sensor according to the current processing instruction, and determining three-phase voltage peaks and zero-current three-phase voltage according to the three-phase analog current voltage data; acquiring three-phase digital current data collected by an oscilloscope, and determining a calibration coefficient according to the three-phase voltage peaks, the zero-current three-phase voltage and the three-phase digital current data. Thus, the scheme can reuse three-phase six-way PWM pulse software to drive the motor to output stable pulse current, realizes calibration of motor current sensor current collection, and reduces the integrated control complexity of the motor controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, and in particular to a method for calibrating current collected by a motor current sensor and a motor controller. Background Technology

[0002] Currently, the calibration method for motor current sensors mainly involves using field-oriented control to output a stable, continuous current, and then measuring the actual current of the motor and the corresponding current sampling value at the motor controller to calculate the calibration coefficient. However, this method has high requirements for environmental equipment, requiring external heat dissipation to ensure the safety of the motor controller. Furthermore, the closed-loop control used in field-oriented control is quite complex (i.e., controlling the motor transistors to generate three-phase current through a three-phase, six-channel waveform mode), making it impossible to reuse the three-phase, six-channel pulse software driver during project integration to calibrate the motor current sensor's current acquisition. This results in a high complexity for motor controller integration. Summary of the Invention

[0003] This invention provides a method for calibrating current collected by a motor current sensor and a motor controller. The method uses a three-phase six-channel PWM pulse software to drive the motor to output a stable pulse current, thereby calibrating the current collected by the motor current sensor and reducing the complexity of the integrated control of the motor controller.

[0004] In a first aspect, embodiments of the present invention provide a method for calibrating a motor current sensor, which is executed by a motor controller, and includes: Run pulse calibration mode; The operation of the pulse calibration mode includes: Obtain the motor arm conduction mode, and control the motor operation and generate current processing commands according to the motor arm conduction mode; The three-phase analog current and voltage data collected by the current sensor are obtained according to the current processing instruction, and the peak value of the three-phase voltage and the zero-current three-phase voltage are determined according to the three-phase analog current and voltage data. Acquire the three-phase digital current data collected by the oscilloscope, and determine the calibration coefficients based on the three-phase voltage peak value, the zero-current three-phase voltage, and the three-phase digital current data.

[0005] Optionally, controlling the motor operation according to the motor bridge arm conduction mode includes: A wave generation control command is generated based on the motor bridge arm conduction mode; The motor is controlled to operate according to the wave control command.

[0006] Optionally, determining the peak three-phase voltage and the zero-current three-phase voltage based on the three-phase simulated current and voltage data includes: The three-phase analog current and voltage data are converted into three-phase digital current and voltage data; The peak value of the three-phase voltage and the zero-current three-phase voltage are determined based on the three-phase digital current and voltage data.

[0007] Optionally, after determining the peak value of the three-phase voltage based on the three-phase digital current and voltage data, the method further includes: Based on the three-phase voltage peak values, determine the first time corresponding to the three-phase voltage peak values.

[0008] Optionally, after determining the first time corresponding to the peak value of the three-phase voltage, the method further includes: The total motor running time is determined based on the first time. Monitor the motor running time of the motor, and generate a shutdown command when the motor running time equals the total motor running time; The motor is controlled to stop running according to the shutdown command.

[0009] Optionally, determining the calibration coefficients based on the three-phase voltage peak values, the zero-current three-phase voltage, and the three-phase digital current data includes: The peak value of the three-phase current is determined based on the three-phase digital current data; The calibration coefficients are determined based on the peak values ​​of the three-phase voltages, the zero-current three-phase voltages, and the peak values ​​of the three-phase currents.

[0010] Optionally, the three-phase voltage peak values ​​include the U-phase voltage peak value, the V-phase voltage peak value, and the W-phase voltage peak value; The zero-current three-phase voltage includes the U-phase zero-current voltage, the V-phase zero-current voltage, and the W-phase zero-current voltage; The three-phase current peak values ​​include the U-phase current peak value, the V-phase current peak value, and the W-phase current peak value; The calibration coefficients include the U-phase calibration coefficient, the V-phase calibration coefficient, and the W-phase calibration coefficient.

[0011] Optionally, determining the calibration coefficients based on the peak values ​​of the three-phase voltages, the zero-current three-phase voltages, and the peak values ​​of the three-phase currents includes: U-phase calibration coefficient = (U-phase voltage peak value - U-phase zero current voltage) / U-phase current peak value; V-phase calibration coefficient = (V-phase voltage peak value - V-phase zero current voltage) / V-phase current peak value; W-phase calibration coefficient = (W-phase voltage peak value - W-phase zero current voltage) / W-phase current peak value.

[0012] Optionally, before running the pulse calibration mode, the following is also included: Obtain the motor operating parameters of the motor; The motor operating status is determined based on the motor operating parameters; When the motor is in a fault state, the GPIO calibration mode is activated. When the motor is in normal operating condition, the pulse calibration mode is run.

[0013] Secondly, embodiments of the present invention also provide a motor controller, the motor controller comprising: Pulse calibration module; The pulse calibration module includes: The control unit is used to acquire the motor bridge arm conduction mode and control the motor operation and generate current processing commands according to the motor bridge arm conduction mode. The data processing unit is used to acquire three-phase analog current and voltage data collected by the current sensor according to the current processing instruction, and to determine the peak value of the three-phase voltage and the zero-current three-phase voltage according to the three-phase analog current and voltage data. The calibration unit is used to acquire the three-phase digital current data collected by the oscilloscope and determine the calibration coefficients based on the three-phase voltage peak, the zero-current three-phase voltage, and the three-phase digital current data.

[0014] This invention, through the implementation of a pulse calibration mode (i.e., acquiring the motor arm conduction mode), controls motor operation and generates current processing commands based on the motor arm conduction mode, thereby achieving stable pulse current output from the motor driven by multiplexed three-phase six-channel PWM pulse software. It acquires three-phase analog current and voltage data from the current sensor based on the current processing commands, and determines the peak three-phase voltage and zero-current three-phase voltage based on this data. It also acquires three-phase digital current data from the oscilloscope, and determines calibration coefficients based on the peak three-phase voltage, zero-current three-phase voltage, and the three-phase digital current data. Thus, this solution achieves stable pulse current output from the motor driven by multiplexed three-phase six-channel PWM pulse software, thereby calibrating the current collected by the motor current sensor and reducing the complexity of integrated control of the motor controller. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 A flowchart illustrating a pulse calibration mode for use in an embodiment of the present invention; Figure 2 A pulse diagram of a wave transmission channel provided in an embodiment of the present invention; Figure 3 A U-phase bridge arm conduction time and U-phase current curve provided for an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a motor controller provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of another motor controller provided in an embodiment of the present invention. Detailed Implementation

[0017] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0018] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0019] This invention provides a method for calibrating the current collected by a motor current sensor. This method is applicable to situations where it is necessary to calibrate the current collected by the motor current sensor. The current collection calibration method is executed by a motor controller, which can be implemented in hardware and / or software.

[0020] The current calibration method for motor current sensors includes the running pulse calibration mode.

[0021] The pulse calibration mode refers to using a three-phase, six-channel pulse software driver to calibrate the motor current sensor through short pulse peak current. Specifically, the pulse control activates the transistors in the motor bridge arm, changing the current peak value to obtain the software-sampled peak value (the peak value of the three-phase current acquired by the current sensor) and the actual three-phase current peak value acquired by an external oscilloscope. This allows for the calibration of the motor's three-phase current acquired by the current sensor. Therefore, the pulse calibration mode calibrates the three-phase current acquired by the motor current sensor, and the pulse control of the motor bridge arm transistors is simple, reducing the complexity of integrated control of the motor controller.

[0022] Figure 1 This is a flowchart illustrating a pulse calibration mode provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the specific steps of this pulse calibration mode include: S110: Obtain the motor arm conduction mode, and control the motor operation and generate current processing commands according to the motor arm conduction mode.

[0023] The motor arm conduction mode refers to the different conduction combinations of the six motor arms controlled by the motor controller, including UHVLWL conduction mode, ULVHWL conduction mode, ULVLWH conduction mode, UH conduction mode, VH conduction mode, and WH conduction mode. The current processing command is the instruction to acquire and process the three-phase analog current and voltage data output from the current sensor.

[0024] Specifically, if the motor arm conduction mode is UHVLWL conduction mode, it means the upper U-phase tube of the motor is conducting, the lower V-phase tube is conducting, and the lower W-phase tube is conducting; if the motor arm conduction mode is ULVHWL conduction mode, it means the lower U-phase tube of the motor is conducting, the upper V-phase tube is conducting, and the lower W-phase tube is conducting; if the motor arm conduction mode is ULVLWH conduction mode, it means the lower U-phase tube of the motor is conducting, the lower V-phase tube is conducting, and the upper W-phase tube is conducting; if the motor arm conduction mode is UH conduction mode, it means only the upper U-phase tube of the motor is conducting, while the V and W phases are completely turned off. In this case, the controller's U-phase terminal is connected to the motor's U-phase, and the high-voltage negative terminal is connected to the motor's neutral point. The other two phases are left floating. If the motor bridge arm conduction mode is VH conduction mode, that is, only the upper tube of the V phase of the motor is controlled to conduct, while the U phase and W phase are completely turned off. At this time, the V phase terminal of the controller is connected to the V phase of the motor, the high voltage negative terminal is connected to the neutral point of the motor, and the other two phases are left floating. If the motor bridge arm conduction mode is WH conduction mode, that is, only the upper tube of the W phase of the motor is controlled to conduct, while the U phase and V phase are completely turned off. At this time, the W phase terminal of the controller is connected to the W phase of the motor, the high voltage negative terminal is connected to the neutral point of the motor, and the other two phases are left floating.

[0025] S120. Obtain the three-phase analog current and voltage data collected by the current sensor according to the current processing instruction, and determine the peak value of the three-phase voltage and the zero-current three-phase voltage according to the three-phase analog current and voltage data.

[0026] After the motor starts running, it generates current. At this time, the three-phase analog current and voltage data collected by the current sensor are acquired according to the current processing command. The largest three-phase analog current and voltage data is converted from analog to digital to obtain the digital three-phase voltage peak value. The zero-current three-phase voltage is the three-phase voltage corresponding to the motor's three-phase current being zero during operation.

[0027] S130. Acquire the three-phase digital current data collected by the oscilloscope, and determine the calibration coefficients based on the three-phase voltage peak, zero-current three-phase voltage, and three-phase digital current data.

[0028] The actual three-phase current (three-phase digital current data) obtained through an external oscilloscope can determine the maximum value of the actual three-phase current. Specifically, the peak value of the three-phase voltage is corrected using zero-current three-phase voltage, and the corrected peak value of the three-phase voltage is fitted with the maximum value of the actual three-phase current to obtain the calibration coefficient.

[0029] This invention, through the implementation of a pulse calibration mode (i.e., acquiring the motor arm conduction mode), controls motor operation and generates current processing commands based on the motor arm conduction mode, thereby achieving stable pulse current output from the motor driven by multiplexed three-phase six-channel PWM pulse software. It acquires three-phase analog current and voltage data from the current sensor based on the current processing commands, and determines the peak three-phase voltage and zero-current three-phase voltage based on this data. It also acquires three-phase digital current data from the oscilloscope, and determines calibration coefficients based on the peak three-phase voltage, zero-current three-phase voltage, and the three-phase digital current data. Thus, this solution achieves stable pulse current output from the motor driven by multiplexed three-phase six-channel PWM pulse software, thereby calibrating the current collected by the motor current sensor and reducing the complexity of integrated control of the motor controller.

[0030] Based on the above embodiments, optionally, controlling the motor operation according to the motor arm conduction mode includes: generating a wave control command according to the motor arm conduction mode; and controlling the motor operation according to the wave control command.

[0031] Among them, the three-phase six-channel pulse mode uses 100% and 0% duty cycle to achieve high and low levels, and the three-phase six-channel pulse mode includes 9 pulse channels. Figure 2 A pulse diagram of a wave transmission channel provided in an embodiment of the present invention, as shown below. Figure 2As shown, when the falling edge of the PWM reference channel arrives, the count value begins to accumulate. When the count value equals the preset period comparison value, a calibration interrupt is generated. The period of the calibration interrupt can be controlled by controlling the preset period comparison value. In the calibration interrupt, the conduction and shutdown of the six bridge arm channels are controlled by 100% and 0% duty cycles, respectively. When a wave transmission control command is received, the switching transistors of the U, V, and W phase bridge arms of the motor are switched according to the preset conduction mode (…). Figure 2 (UHVLWL conduction mode) generates current when it is turned on.

[0032] Based on the above embodiments, alternatively, refer to the following: Figure 2 The process of acquiring three-phase analog current and voltage data from the current sensor according to the current processing command is described as follows: During the calibration interruption period and after the motor bridge arm is turned on, the motor's UVW three-phase analog current and voltage data are acquired from the current sensor according to the current processing command. Acquisition of the motor's UVW three-phase analog current and voltage data continues until the total sampling duration is reached, at which point acquisition stops. The total sampling duration is consistent with the calibration interruption period.

[0033] Based on the above embodiments, optionally, the peak value of the three-phase voltage and the zero-current three-phase voltage are determined according to the three-phase analog current and voltage data, including: converting the three-phase analog current and voltage data into three-phase digital current and voltage data; and determining the peak value of the three-phase voltage and the zero-current three-phase voltage according to the three-phase digital current and voltage data.

[0034] The process involves analog-to-digital conversion of the three-phase analog current and voltage data to obtain three-phase digital current and voltage data. The maximum value in the three-phase digital current and voltage data is selected as the peak value of the three-phase voltage, which corresponds to the three-phase voltage when the motor's three-phase current is zero (zero-current three-phase voltage).

[0035] Based on the above embodiments, optionally, after determining the three-phase voltage peak value based on the three-phase digital current and voltage data, the method further includes: determining the first time corresponding to the three-phase voltage peak value based on the three-phase voltage peak value.

[0036] For example, Figure 3 A U-phase bridge arm conduction time and U-phase current curve is provided for an embodiment of the present invention, such as... Figure 3 As shown, the peak value of the three-phase voltage corresponds to the maximum value of the three-phase simulated current and voltage data, and the first time corresponding to the peak value of the three-phase voltage is the time corresponding to the maximum value of the three-phase simulated current and voltage data.

[0037] Based on the above embodiments, optionally, after determining the first time corresponding to the peak value of the three-phase voltage, the following steps are also included: S210. Determine the total running time of the motor based on the first time.

[0038] The total motor running time is equal to the sum of the first time and the preset delay time. The preset delay time is the time the motor can continue running after its three-phase simulated current and voltage data reach their maximum values.

[0039] S220 monitors the motor running time and generates a shutdown command when the motor running time equals the total motor running time.

[0040] S230: Control the motor to stop running according to the shutdown command.

[0041] Specifically, the motor bridge arms are controlled to turn off according to the shutdown command (i.e., to stop generating pulse waves that control the three phases UVW of the motor), thereby controlling the motor to stop running.

[0042] Based on the above embodiments, optionally, the steps for determining the calibration coefficients based on the three-phase voltage peak, zero-current three-phase voltage, and three-phase digital current data are described as follows: S310. Determine the peak value of the three-phase current based on the three-phase digital current data.

[0043] Among them, the peak value of the three-phase current is the maximum value of the three-phase digital current data.

[0044] S320. Determine the calibration coefficients based on the peak value of the three-phase voltage, the zero-current three-phase voltage, and the peak value of the three-phase current.

[0045] Among them, the three-phase voltage peak values ​​include the U-phase voltage peak value, the V-phase voltage peak value, and the W-phase voltage peak value; the zero-current three-phase voltage includes the U-phase zero-current voltage, the V-phase zero-current voltage, and the W-phase zero-current voltage; the three-phase current peak values ​​include the U-phase current peak value, the V-phase current peak value, and the W-phase current peak value; and the calibration coefficients include the U-phase calibration coefficient, the V-phase calibration coefficient, and the W-phase calibration coefficient.

[0046] Specifically, the calibration coefficient for phase U is (peak voltage of phase U - zero current voltage of phase U) / peak current of phase U; the calibration coefficient for phase V is (peak voltage of phase V - zero current voltage of phase V) / peak current of phase V; and the calibration coefficient for phase W is (peak voltage of phase W - zero current voltage of phase W) / peak current of phase W.

[0047] Based on the above embodiments, optionally, the following steps are also included before running the pulse calibration mode: S410: Obtain the motor operating parameters.

[0048] The motor operating parameters include the operating parameters of each component of the motor. For example, the current, voltage, and temperature of each component.

[0049] S420. Determine the motor's operating status based on the motor's operating parameters.

[0050] The motor's operating parameters determine whether it is in a fault state or a normal state. For example, if the motor's operating parameters do not meet the specifications, the motor is in a fault state; if the motor's operating parameters meet the specifications, the motor is in a normal state.

[0051] S430: When the motor is in a fault state, run the GPIO calibration mode.

[0052] Among them, the GPIO calibration mode directly controls the on / off state of the motor transistors to enable the motor to generate three-phase current.

[0053] S440. When the motor is in normal operating condition, run the pulse calibration mode.

[0054] Figure 4 A schematic diagram of the structure of a motor controller provided in an embodiment of the present invention is shown below. Figure 4 As shown, the motor controller includes: Pulse calibration module 10; Pulse calibration module 10 includes: Control unit 110 is used to acquire the motor bridge arm conduction mode, and control the motor operation and generate current processing commands according to the motor bridge arm conduction mode; The data processing unit 120 is used to acquire the three-phase analog current and voltage data collected by the current sensor according to the current processing instruction, and to determine the peak value of the three-phase voltage and the zero-current three-phase voltage according to the three-phase analog current and voltage data. The calibration unit 130 is used to acquire the three-phase digital current data collected by the oscilloscope and determine the calibration coefficients based on the three-phase voltage peak, zero-current three-phase voltage and three-phase digital current data.

[0055] The control unit 110 is connected to the data processing unit 120, and the control unit 110 transmits current processing commands to the data processing unit 120; the data processing unit 120 is connected to the calibration unit 130, and the data processing unit 120 transmits the three-phase voltage peak and zero-current three-phase voltage to the calibration unit 130.

[0056] In this embodiment of the invention, the pulse calibration module 10 operates in pulse calibration mode, that is, the control unit 110 acquires the motor bridge arm conduction mode, controls the motor operation and generates current processing commands according to the motor bridge arm conduction mode, thereby realizing the multiplexing of three-phase six-channel PWM pulse software to drive the motor to output a stable pulse current; the data processing unit 120 acquires the three-phase analog current and voltage data collected by the current sensor according to the current processing commands, and determines the three-phase voltage peak and zero-current three-phase voltage according to the three-phase analog current and voltage data; the calibration unit 130 acquires the three-phase digital current data collected by the oscilloscope, and determines the calibration coefficients according to the three-phase voltage peak, zero-current three-phase voltage and three-phase digital current data; thus, this solution realizes the driving of the motor to output a stable pulse current by multiplexing three-phase six-channel PWM pulse software, thereby realizing the calibration of the current collected by the motor current sensor, thereby reducing the complexity of the integrated control of the motor controller.

[0057] Based on the above embodiments, optionally, Figure 5 This is a schematic diagram of another motor controller provided in an embodiment of the present invention. Figure 5 As shown, the control unit 110 includes a wave generation command subunit 111 and a wave generation control subunit 112; both the wave generation control subunit 112 and the data processing unit 120 are connected to the wave generation command subunit 111; the wave generation command subunit 111 is used to acquire the motor bridge arm conduction mode and generate wave generation control commands and current processing commands according to the motor bridge arm conduction mode; the wave generation control subunit 112 is used to control the motor operation according to the wave generation control commands.

[0058] Based on the above embodiments, alternatively, refer to the following: Figure 5 The data processing unit 120 includes a current analog-to-digital conversion subunit 121 and a peak value determination subunit 122. The current analog-to-digital conversion subunit 121 is connected to the wave generation command subunit 111, and the peak value determination subunit 122 is connected to the calibration unit 130. The current analog-to-digital conversion subunit 121 is used to acquire three-phase analog current and voltage data collected by the current sensor according to the current processing command, and convert the three-phase analog current and voltage data into three-phase digital current and voltage data. The peak value determination subunit 122 is used to determine the three-phase voltage peak value and the zero-current three-phase voltage according to the three-phase digital current and voltage data.

[0059] Based on the above embodiments, alternatively, refer to the following: Figure 5 The peak value determination subunit 122 is also used to determine the first time corresponding to the three-phase voltage peak value based on the three-phase voltage peak value.

[0060] Based on the above embodiments, alternatively, refer to the following: Figure 5The pulse calibration module 10 also includes a pulse emission time management unit 140; the pulse emission time management unit 140 is connected to the peak value determination subunit 122; the pulse emission time management unit 140 determines the total motor running time based on the first time, monitors the motor running time, and generates a shutdown command when the motor running time equals the total motor running time. The pulse emission time management unit 140 is connected to the pulse emission control subunit 112, which is also used to control the motor to stop running according to the shutdown command.

[0061] Based on the above embodiments, alternatively, refer to the following: Figure 5 The calibration unit 130 is specifically used to: determine the peak value of the three-phase current based on the three-phase digital current data; and determine the calibration coefficient based on the peak value of the three-phase voltage, the zero-current three-phase voltage, and the peak value of the three-phase current.

[0062] Based on the above embodiments, alternatively, refer to the following: Figure 5 The motor controller also includes a hardware fault protection module 20 and a GPIO calibration module 30. The hardware fault protection module 20 is connected to the wave generation control subunit 112 and the GPIO calibration module 30. The hardware fault protection module 20 is used to acquire the motor operating parameters and determine the motor operating status based on the motor operating parameters. When the motor operating status is faulty, it controls the GPIO calibration module 30 to run the GPIO calibration mode and locks the wave generation control subunit 112 (it cannot generate pulse waves). When the motor operating status is normal, it controls the pulse calibration module to run the pulse calibration mode and unlocks the wave generation control subunit 112 (it can generate pulse waves).

[0063] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0064] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A method for calibrating current collected by a motor current sensor, executed by a motor controller, characterized in that, include: Run pulse calibration mode; The operation of the pulse calibration mode includes: Obtain the motor arm conduction mode, and control the motor operation and generate current processing commands according to the motor arm conduction mode; The three-phase analog current and voltage data collected by the current sensor are obtained according to the current processing instruction, and the peak value of the three-phase voltage and the zero-current three-phase voltage are determined according to the three-phase analog current and voltage data. Acquire the three-phase digital current data collected by the oscilloscope, and determine the calibration coefficients based on the three-phase voltage peak value, the zero-current three-phase voltage, and the three-phase digital current data.

2. The method for calibrating the current collected by the motor current sensor according to claim 1, characterized in that, The step of controlling motor operation according to the motor bridge arm conduction mode includes: A wave generation control command is generated based on the motor bridge arm conduction mode; The motor is controlled to operate according to the wave control command.

3. The method for calibrating the current collected by the motor current sensor according to claim 1, characterized in that, The step of determining the peak three-phase voltage and the zero-current three-phase voltage based on the three-phase simulated current and voltage data includes: The three-phase analog current and voltage data are converted into three-phase digital current and voltage data; The peak value of the three-phase voltage and the zero-current three-phase voltage are determined based on the three-phase digital current and voltage data.

4. The method for calibrating current acquisition by a motor current sensor according to claim 3, characterized in that, After determining the peak value of the three-phase voltage based on the three-phase digital current and voltage data, the method further includes: Based on the three-phase voltage peak values, determine the first time corresponding to the three-phase voltage peak values.

5. The method for calibrating current acquisition by a motor current sensor according to claim 4, characterized in that, After determining the first time corresponding to the peak value of the three-phase voltage, the process also includes: The total motor running time is determined based on the first time. Monitor the motor running time of the motor, and generate a shutdown command when the motor running time equals the total motor running time; The motor is controlled to stop running according to the shutdown command.

6. The method for calibrating current acquisition by a motor current sensor according to claim 1, characterized in that, The step of determining the calibration coefficients based on the three-phase voltage peak value, the zero-current three-phase voltage, and the three-phase digital current data includes: The peak value of the three-phase current is determined based on the three-phase digital current data; The calibration coefficients are determined based on the peak value of the three-phase voltage, the zero-current three-phase voltage, and the peak value of the three-phase current.

7. The method for calibrating current acquisition by a motor current sensor according to claim 6, characterized in that, The three-phase voltage peak values ​​include the U-phase voltage peak value, the V-phase voltage peak value, and the W-phase voltage peak value; The zero-current three-phase voltage includes the U-phase zero-current voltage, the V-phase zero-current voltage, and the W-phase zero-current voltage; The three-phase current peak values ​​include the U-phase current peak value, the V-phase current peak value, and the W-phase current peak value; The calibration coefficients include the U-phase calibration coefficient, the V-phase calibration coefficient, and the W-phase calibration coefficient.

8. The method for calibrating current acquisition by a motor current sensor according to claim 7, characterized in that, The step of determining the calibration coefficients based on the peak value of the three-phase voltage, the zero-current three-phase voltage, and the peak value of the three-phase current includes: U-phase calibration coefficient = (U-phase voltage peak value - U-phase zero current voltage) / U-phase current peak value; V-phase calibration coefficient = (V-phase voltage peak value - V-phase zero current voltage) / V-phase current peak value; W-phase calibration coefficient = (W-phase voltage peak value - W-phase zero current voltage) / W-phase current peak value.

9. The method for calibrating current acquisition by a motor current sensor according to claim 1, characterized in that, Before running the pulse calibration mode, the following is also included: Obtain the motor operating parameters of the motor; The motor operating status is determined based on the motor operating parameters; When the motor is in a fault state, the GPIO calibration mode is activated. When the motor is in normal operating condition, the pulse calibration mode is run.

10. A motor controller, characterized in that, include: Pulse calibration module; The pulse calibration module includes: The control unit is used to acquire the motor bridge arm conduction mode and control the motor operation and generate current processing commands according to the motor bridge arm conduction mode. The data processing unit is used to acquire three-phase analog current and voltage data collected by the current sensor according to the current processing instruction, and to determine the peak value of the three-phase voltage and the zero-current three-phase voltage according to the three-phase analog current and voltage data. The calibration unit is used to acquire the three-phase digital current data collected by the oscilloscope and determine the calibration coefficients based on the three-phase voltage peak, the zero-current three-phase voltage, and the three-phase digital current data.