Motor sampling current bias calibration method and device, electronic equipment and storage medium

By sampling the current bias before and after the permanent magnet synchronous motor starts, and using space vector pulse width modulation (U111 vector state) to obtain the pure bias value, the motor current is dynamically calibrated, which solves the problem of inaccurate current sampling and improves the accuracy and stability of motor control.

CN121566992APending Publication Date: 2026-02-24GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511533428.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-24
Publication Date
2026-02-24

AI Technical Summary

Technical Problem

Existing technologies for current sampling in permanent magnet synchronous motors are inaccurate and cannot meet the requirements for precise control, especially since it is difficult to guarantee the accuracy of current sampling during motor operation.

Method used

Current signals are sampled before and after motor startup to obtain first and second sampled current biases. The sampling offset is judged and adjusted by determining the offset threshold of the current signal. Pure bias value is obtained by using space vector pulse width modulation (U111 vector state) to dynamically calibrate the motor current.

Benefits of technology

This improves the accuracy of motor control, reduces sampling bias error, ensures that current sampling is closer to the true value, and enhances the stability and control precision of motor operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121566992A_ABST
    Figure CN121566992A_ABST
Patent Text Reader

Abstract

The invention discloses a motor sampling current bias calibration method and device, electronic equipment and a storage medium, and belongs to the technical field of permanent magnet synchronous motor control. The method comprises the following steps: sampling a current signal of a motor before the motor is started to obtain a first sampling current bias; when the motor is started and is in a target state, the current signal of the motor is sampled to obtain a second sampling current bias, and the target state is that a three-phase upper bridge arm power device of the motor is switched on and a three-phase lower bridge arm device of the motor is switched off; determining an offset threshold value of the current signal of the motor; according to the first sampling current bias, the second sampling current bias and an offset threshold value, whether current sampling offset happens to the motor or not is judged; according to the technical scheme of the invention, under the condition that the current sampling offset of the motor occurs, the first sampling current bias is adjusted to obtain the target sampling current of the motor, so that the sampling current of the motor is closer to a real value, the current of the motor is dynamically calibrated in real time, the bias error is reduced, and the accuracy of motor control is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of permanent magnet synchronous motor control technology, specifically relating to a calibration method, device, electronic equipment, and storage medium for motor sampling current bias. Background Technology

[0002] Existing technologies for sampling the current of permanent magnet synchronous motors involve multiple samplings of the motor's phase current sampling resistor before motor startup, when there is no phase current, to obtain the phase current sampling bias. After motor startup, the actual motor current value is obtained by subtracting the phase current sampling bias from the sampled current value. In developing this application, the inventors discovered that the existing technology has at least the following problems: recording the motor's phase current sampling bias only before motor startup cannot guarantee the accuracy of current sampling during motor operation, thus failing to meet the requirements for precise motor control. Summary of the Invention

[0003] The purpose of this application is to provide a calibration method, apparatus, electronic device, and storage medium for motor sampling current bias, which can solve the problem of inaccurate motor sampling current.

[0004] In a first aspect, embodiments of this application provide a calibration method for motor sampling current bias, the method comprising: Before the motor starts, the current signal of the motor is sampled to obtain a first sampled current bias; After the motor starts and is in the target state, the current signal of the motor is sampled to obtain a second sampled current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. Determine the offset threshold of the current signal of the motor; Based on the first sampling current bias, the second sampling current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset; If the motor experiences a current sampling offset, the first sampling current bias is adjusted to obtain the target sampling current of the motor.

[0005] Optionally, determining the offset threshold of the motor's current signal includes: Determine the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and determine the time difference between the maximum turn-on time and the current sampling time; The rated current of the motor is obtained, and the offset threshold of the current signal of the motor is determined based on the time difference and the rated current.

[0006] Optionally, determining whether the motor has experienced a current sampling offset based on the first sampling current bias, the second sampling current bias, and the offset threshold includes: If the absolute value of the difference between the first sampling current bias and the second sampling current bias is greater than or equal to the offset threshold, then it is determined that the motor has experienced a current sampling offset.

[0007] Optionally, adjusting the bias of the first sampling current to obtain the target sampling current of the motor includes: The adjustment step size of the first sampling current bias is determined based on the absolute value of the difference between the first sampling current bias and the second sampling current bias. The first sampling current bias is adjusted according to the adjustment step size to obtain the target sampling current of the motor.

[0008] Optionally, determining the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and determining the time difference between the maximum turn-on time and the current sampling time, includes: The pulse width modulation signals corresponding to the three-phase switching circuit of the motor are obtained respectively, and the maximum turn-on time of the power devices in the three-phase inverter of the motor is determined according to the turn-on time corresponding to the pulse width modulation signal of the three-phase switching circuit. The period of the pulse width modulation signal is obtained, and the current sampling time is determined based on the period of the pulse width modulation signal, so as to obtain the time difference between the maximum on time and the current sampling time.

[0009] Optionally, obtaining the rated current of the motor and determining the offset threshold of the motor's current signal based on the time difference and the rated current includes: Determine the duration of noise when the power devices of the motor are turned on; If the time difference is greater than or equal to the noise duration, the rated current is multiplied by a first preset ratio to obtain the offset threshold of the motor's current signal. If the time difference is less than the noise duration, the rated current is multiplied by a second preset ratio to obtain the offset threshold of the motor's current signal; the second preset ratio is greater than the first preset ratio.

[0010] Optionally, determining the noise duration when the power devices of the motor are turned on includes: Obtain the load inductance, peak current, and power supply voltage of the motor; Based on the load inductance, peak current, and power supply voltage of the motor, the noise duration when the power devices of the motor are turned on is determined according to the following formula: Tnoise=L*Ipeak / Vsupply Where Tnoise is the noise duration, L is the load inductance, Ipeak is the peak current, and Vsupply is the power supply voltage.

[0011] Secondly, embodiments of this application provide a calibration device for motor sampling current bias, the device comprising: The first current sampling module is used to sample the current signal of the motor before the motor starts to obtain a first sampling current bias. The second current sampling module is used to sample the current signal of the motor after the motor starts and when it is in the target state, and obtain the second sampling current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. Offset threshold determination module, used to determine the offset threshold of the current signal of the motor; The sampling offset judgment module is used to determine whether the motor has experienced current sampling offset based on the first sampling current offset, the second sampling current offset, and the offset threshold. The sampling current adjustment module is used to adjust the first sampling current bias to obtain the target sampling current of the motor when the motor experiences a current sampling offset.

[0012] Optionally, the offset threshold determination module includes: The time difference determination submodule is used to determine the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and to determine the time difference between the maximum turn-on time and the current sampling time; The offset threshold determination submodule is used to obtain the rated current of the motor and determine the offset threshold of the motor's current signal based on the time difference and the rated current.

[0013] Optionally, the sampling offset determination module includes: The sampling offset determination submodule is used to determine that the motor has experienced a current sampling offset if the absolute value of the difference between the first sampling current offset and the second sampling current offset is greater than or equal to the offset threshold.

[0014] Optionally, the sampling current adjustment module includes: The step size determination submodule is used to determine the adjustment step size of the first sampling current bias based on the absolute value of the difference between the first sampling current bias and the second sampling current bias. The sampling current adjustment submodule is used to adjust the first sampling current bias according to the adjustment step size to obtain the target sampling current of the motor.

[0015] Optionally, the time difference determination submodule includes: The maximum turn-on time determination unit is used to acquire the pulse width modulation signal corresponding to the three-phase switching circuit of the motor, and determine the maximum turn-on time of the power device in the three-phase inverter of the motor according to the turn-on time corresponding to the pulse width modulation signal of the three-phase switching circuit. The time difference determination unit is used to obtain the period of the pulse width modulation signal and determine the current sampling time according to the period of the pulse width modulation signal, so as to obtain the time difference between the maximum turn-on time and the current sampling time.

[0016] Optionally, the offset threshold determination submodule includes: A noise duration determination unit is used to determine the noise duration when the power devices of the motor are turned on; The first offset threshold determination unit is used to multiply the rated current by a first preset ratio to obtain the offset threshold of the motor's current signal when the time difference is greater than or equal to the noise duration. The second offset threshold determination unit is used to multiply the rated current by a second preset ratio to obtain the offset threshold of the motor's current signal when the time difference is less than the noise duration; the second preset ratio is greater than the first preset ratio.

[0017] Optionally, the noise duration determination unit includes: The motor information acquisition subunit is used to acquire the load inductance, peak current and power supply voltage of the motor. The noise duration determination subunit is used to determine the noise duration when the power devices of the motor are turned on, based on the load inductance, peak current, and power supply voltage of the motor, according to the following formula: Tnoise=L*Ipeak / Vsupply Where Tnoise is the noise duration, L is the load inductance, Ipeak is the peak current, and Vsupply is the power supply voltage.

[0018] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first aspect.

[0019] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0020] The embodiments of this application have the following advantages: This application embodiment can obtain a first sampling current bias by sampling the motor current signal before motor startup, thereby obtaining a bias reference; after motor startup and in the target state, the motor current signal is sampled to obtain a second sampling current bias. The target state is where the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. At this time, the space vector pulse width modulation is in the U111 vector state, and the current through the lower bridge arm sampling resistor is zero, allowing direct sampling to obtain a pure bias value without additional hardware or complex algorithms. An offset threshold for the motor current signal is determined; based on the first sampling current bias, the second sampling current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset, thereby determining whether the current sampling deviation exceeds the allowable range and preventing false alarms; if the motor experiences current sampling offset, the first sampling current bias is adjusted to obtain the target sampling current of the motor, thereby making the motor's sampling current closer to the true value and dynamically calibrating the motor current in real time, reducing bias errors and improving the accuracy of motor control. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a circuit diagram of a three-phase half-bridge power circuit according to an embodiment of this application; Figure 2 This is a schematic diagram of a sector vector distribution according to an embodiment of this application; Figure 3 This is a flowchart illustrating the steps of a calibration method for motor sampling current bias according to an embodiment of this application; Figure 4 This is a flowchart illustrating the steps of another calibration method for motor sampling current bias according to an embodiment of this application; Figure 5 This is a logic diagram of a calibration method for motor sampling current bias according to an embodiment of this application; Figure 6 This is a structural block diagram of a calibration device for motor sampling current bias according to an embodiment of this application. Detailed Implementation

[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0024] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0025] The following description, in conjunction with the accompanying drawings, details a calibration method, apparatus, electronic device, and storage medium for motor sampling current bias provided in this application, through specific embodiments and application scenarios.

[0026] The permanent magnet synchronous motor control hardware system consists of a main control MCU (Microcontroller Unit), a driver chip HVIC (High-Voltage Integrated Circuit), and a three-phase half-bridge power circuit, forming a complete control closed loop. The main control MCU, as the core processing unit, integrates functions such as AD (Analog-to-Digital) sampling, fault detection, algorithm calculation, and logic control. It generates drive pulse commands (Sa, Sb, Sc and their reverse signals Sa', Sb', Sc') to regulate motor operation by real-time acquisition of motor phase current data and execution of control algorithms. The driver chip HVIC is responsible for high-voltage isolation and level conversion, converting the logic level signals output by the MCU into high-voltage / high-current signals that meet the driving requirements of the power devices, ensuring safe and reliable system operation.

[0027] Reference Figure 1This diagram illustrates a circuit diagram of a three-phase half-bridge power circuit according to an embodiment of this application. The three-phase half-bridge power circuit consists of six power devices (VT1-6), which can be semiconductor devices such as IGBTs (Insulated Gate Bipolar Transistors) or MOSFETs (Metal-Oxide-Semiconductor Field-Effect Transistors). They achieve three-phase voltage inversion output through complementary conduction. In the current sampling stage, the system obtains phase current information by detecting the voltage drop across the sampling resistors (Ru, Rv, Rw, Rbus). Due to the small resistance of the sampling resistors, an operational amplifier (OPAmp) is needed for signal amplification. Simultaneously, to accommodate the characteristic that the MCU's AD acquisition module can only handle unipolar inputs, a bias voltage (Offset) is introduced into the circuit. When the motor phase current is zero, the MCU establishes a reference bias value by averaging multiple samples before startup. During operation, the actual current value is calculated by subtracting this bias voltage from the real-time sampled value. However, this method has limitations in practical applications. During motor operation, factors such as temperature drift, sensor aging, and nonlinear characteristics of devices can cause dynamic shifts in the bias voltage. Traditional solutions rely on static bias values ​​before startup for compensation, which is difficult to adapt to changes in operating conditions and ultimately affects control accuracy and system stability.

[0028] To address the aforementioned issues, this application proposes a real-time detection and calibration method for current sampling bias in permanent magnet synchronous motors based on SVPWM (Space Vector Pulse Width Modulation). SVPWM is an advanced PWM technology that treats the three-phase voltage as a space vector and controls the output voltage by controlling the duration of the fundamental vector. Due to its advantages such as high DC voltage utilization and low harmonic content, it is widely used in motor drives and power electronic converters.

[0029] SVPWM synthesizes a voltage vector in any direction by combining eight basic voltage vectors (U000-U111). SVPWM involves eight combined states of three switches (Sa, Sb, Sc). Among them, Sa, Sb, and Sc control the conduction state of the upper tube of the three-phase bridge arm, respectively. 1 indicates that the upper tube is on and 0 indicates that the lower tube is on. The 8 switch combinations correspond to 8 basic voltage vectors: U000 (Sa=0,Sb=0,Sc=0), U001 (Sa=0,Sb=0,Sc=1), U010 (Sa=0,Sb=1,Sc=0), U011 (Sa=0,Sb=1,Sc=1), U100 (Sa=1,Sb=0,Sc=0), U101 (Sa=1,Sb=0,Sc=1), U110 (Sa=1,Sb=1,Sc=0), U111 (Sa=1,Sb=1,Sc=1).

[0030] The voltage vector is composed of two zero vectors, U000 and U111, and six non-zero vectors, which are distributed in a hexagonal pattern in three-dimensional space. This hexagon is divided into six spatial regions, corresponding to six sectors (I to VI). The voltage vector in each sector is synthesized from two adjacent non-zero vectors and two zero vectors at a specific time ratio.

[0031] Reference Figure 2 This diagram illustrates a sector vector distribution according to an embodiment of this application. Taking sector I (0°~30°) as an example, its composite vector is formed by combining four vectors, U000, U100, U110, and U111, within a preset time ratio during the PWM period (Tpwm). During the control process, the MCU calculates the duration of each vector using an algorithm and determines the on-time (CPM1, CMP2, CMP3) of the PWM signals (PWM1, PWM2, PWM3). When the system is in the U111 vector state, the three-phase upper arm power devices (VT1, VT2, VT3) are turned on, and the lower arm devices (VT4, VT6, VT2) are turned off. Due to the inductive load characteristics of the motor, the current is not immediately interrupted. At this time, the three-phase current forms a loop through the freewheeling diodes: the U-phase current flows to the V-phase and W-phase, the V-phase current returns to the U-phase through the freewheeling diode D3 and the power device VT1, and the W-phase current returns to the U-phase through the freewheeling diode D5 and the power device VT1. In this state, no current flows through the sampling resistors (Ru, Rv, Rw, Rbus), and the voltage signal acquired by the AD module only includes the system bias voltage. Similarly, the other five sectors exhibit the same current path and sampling characteristics under specific vector effects.

[0032] Existing solutions for sampling at U000 have significant limitations. Taking sector I (0°~30°) as an example, when the system is in the U000 vector state, the upper bridge arm power devices (VT1, VT2, VT3) are off, and the lower bridge arm devices (VT4, VT6, VT2) are on. Due to the inductive load characteristics of the motor, the current does not immediately interrupt. At this time, the three-phase current forms a loop through the freewheeling diodes: the U-phase current flows to the V and W phases; the V-phase current returns to the U-phase through power device VT6 and freewheeling diode D4; and the W-phase current returns to the U-phase through power device VT2 and freewheeling diode D4. In the U000 state, current still flows through the sampling resistors (Ru, Rv, Rw) for most of the time. It only appears in the U000 vector range near the zero-phase current (phase current is 0), as the phase current gradually decreases to 0. Therefore, sampling at U000 for direct bias voltage compensation has significant limitations, or in other words, existing technology is not suitable for SVPWM permanent magnet synchronous motor control scenarios.

[0033] Reference Figure 3 The diagram illustrates a step-by-step flowchart of a method for calibrating the sampling current bias of a motor according to an embodiment of this application. The method may specifically include the following steps: Step 101: Before the motor starts, the current signal of the motor is sampled to obtain the first sampled current bias; In this embodiment, before the motor starts, the motor current signal can be sampled N times, and the average value is taken as the initial reference value A, i.e., the first sampling current bias. N can be 32~128, balancing accuracy and startup time. Simultaneously, to ensure measurement accuracy, it should be ensured that there is no voltage on the bus, the motor is stationary, and there are no external disturbances. Multi-channel independent calibration can also be performed, sampling each of the three phases separately. This embodiment establishes an initial zero-current reference point by sampling before motor startup in a current-free state.

[0034] Step 102: After the motor starts and is in the target state, the current signal of the motor is sampled to obtain a second sampled current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. In this embodiment, the current signal can be sampled at Tpwm / 2 within the U111 vector interval after the motor starts, to obtain the current bias voltage sample value A1, i.e., the second sampled current bias. The target state is that the three-phase upper bridge arm power devices of the motor are turned on, and the three-phase lower bridge arm devices are turned off, i.e., the U111 vector state. Due to the inductive load characteristics of the motor, the current will not be interrupted immediately. At this time, the three-phase current forms a loop through the freewheeling diodes: the U-phase current flows to the V and W phases; the V-phase current returns to the U-phase through the freewheeling diode D3 and the power device VT1; and the W-phase current returns to the U-phase through the freewheeling diode D5 and the power device VT1. In this state, no current flows through the sampling resistors (Ru, Rv, Rw, Rbus), and the voltage signal collected by the AD module only includes the system bias voltage. Tpwm / 2 is located at the midpoint of the PWM cycle, far from the upper and lower edges, thus avoiding the peak area of ​​switching transient interference.

[0035] Step 103: Determine the offset threshold of the current signal of the motor; In this embodiment, the current sampling signal contains minor fluctuations such as high-frequency switching noise and environmental noise. Without a reasonable threshold, these normal noises may be mistaken for offsets, causing the system to frequently perform unnecessary or even erroneous compensations, thus introducing instability. By determining the offset threshold of the motor's current signal, these meaningless interferences can be effectively shielded, and harmful offsets can be detected in a timely manner.

[0036] Step 104: Based on the first sampling current bias, the second sampling current bias, and the offset threshold, determine whether the motor has experienced current sampling offset; In this embodiment, the offset threshold can be dynamically adjusted to improve the judgment sensitivity based on the time coupling relationship of the switching noise. Since PWM switching action is the main source of sampling noise, the severity of the noise can be quantified by calculating the time difference T1 between the maximum turn-on time and the sampling time. Specifically, the larger T1 is, the earlier the turn-on event occurs, the further the current sampling point is from the switching transient, and the noise is significantly attenuated; the smaller T1 is, the closer the turn-on event is to the sampling point, and the high-frequency noise strongly interferes with the sampling. This embodiment determines whether the motor has experienced current sampling offset based on the first sampling current bias, the second sampling current bias, and the offset threshold. This avoids false triggering of offset alarms when noise is high, improves detection resolution during clean periods, and promptly detects minute drifts.

[0037] Step 105: If the motor experiences a current sampling offset, adjust the first sampling current bias to obtain the target sampling current of the motor.

[0038] In this embodiment, current sampling offset directly contaminates the feedback signal of the current loop. Based on this contaminated signal, the controller issues incorrect PWM commands, leading to unstable motor output torque, vibration, and abnormal noise; inaccurate speed control, especially at low speeds and light loads; and the controller may generate unnecessary current components, resulting in additional heat generation and efficiency loss. By real-time compensation of the first sampling current bias, a target sampling current that is infinitely close to the true current value is obtained. The controller performs calculations based on this signal, thereby restoring the control accuracy of the current loop and effectively avoiding all the aforementioned performance degradation problems. This embodiment adjusts the first sampling current bias when the motor experiences current sampling offset to obtain the target sampling current of the motor, thereby making the motor's sampling current closer to the true value and dynamically calibrating the motor's current in real time, reducing bias errors and improving the accuracy of motor control.

[0039] This application embodiment can obtain a first sampling current bias by sampling the motor current signal before motor startup, thereby obtaining a bias reference; after motor startup and in the target state, the motor current signal is sampled to obtain a second sampling current bias. The target state is where the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. At this time, the space vector pulse width modulation is in the U111 vector state, and the current through the lower bridge arm sampling resistor is zero, allowing direct sampling to obtain a pure bias value without additional hardware or complex algorithms. An offset threshold for the motor current signal is determined; based on the first sampling current bias, the second sampling current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset, thereby determining whether the current sampling deviation exceeds the allowable range and preventing false alarms; if the motor experiences current sampling offset, the first sampling current bias is adjusted to obtain the target sampling current of the motor, thereby making the motor's sampling current closer to the true value and dynamically calibrating the motor current in real time, reducing bias errors and improving the accuracy of motor control.

[0040] Reference Figure 4 The diagram illustrates a flowchart of another method for calibrating the motor sampling current bias according to an embodiment of this application. The method may specifically include the following steps: Step 201: Before the motor starts, the current signal of the motor is sampled to obtain the first sampled current bias; In this embodiment, before the motor starts, the motor current signal can be sampled N times, and the average value is taken as the initial reference value A, i.e., the first sampling current bias. N can be 32~128, balancing accuracy and startup time. Simultaneously, to ensure measurement accuracy, it should be ensured that there is no voltage on the bus, the motor is stationary, and there are no external disturbances. Multi-channel independent calibration can also be performed, sampling each of the three phases separately. This embodiment establishes an initial zero-current reference point by sampling before motor startup in a current-free state.

[0041] Step 202: After the motor starts and is in the target state, the current signal of the motor is sampled to obtain a second sampled current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. In this embodiment, the current signal can be sampled at Tpwm / 2 within the U111 vector interval after the motor starts, to obtain the current bias voltage sample value A1, i.e., the second sampled current bias. The target state is that the three-phase upper bridge arm power devices of the motor are turned on, and the three-phase lower bridge arm devices are turned off, i.e., the U111 vector state. Due to the inductive load characteristics of the motor, the current will not be interrupted immediately. At this time, the three-phase current forms a loop through the freewheeling diodes: the U-phase current flows to the V and W phases; the V-phase current returns to the U-phase through the freewheeling diode D3 and the power device VT1; and the W-phase current returns to the U-phase through the freewheeling diode D5 and the power device VT1. In this state, no current flows through the sampling resistors (Ru, Rv, Rw, Rbus), and the voltage signal collected by the AD module only includes the system bias voltage. Tpwm / 2 is located at the midpoint of the PWM cycle, far from the upper and lower edges, thus avoiding the peak area of ​​switching transient interference.

[0042] Step 203: Determine the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and determine the time difference between the maximum turn-on time and the current sampling time; In one embodiment, the step of determining the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and determining the time difference between the maximum turn-on time and the current sampling time, may further include the following sub-steps: Sub-step S11: Obtain the pulse width modulation signal corresponding to the three-phase switching circuit of the motor, and determine the maximum turn-on time of the power device in the three-phase inverter of the motor according to the turn-on time corresponding to the pulse width modulation signal of the three-phase switching circuit. Sub-step S12: Obtain the period of the pulse width modulation signal, determine the current sampling time based on the period of the pulse width modulation signal, and obtain the time difference between the maximum on time and the current sampling time.

[0043] In this embodiment, due to dead time, control algorithm, etc., the switching times of the three phases (CPM1, CPM2, CPM3) may not be exactly the same. This embodiment ensures that the system considers the worst-case noise by taking CPMmax (maximum turn-on time), i.e., using the action of the last switching device as the starting point of the noise, which greatly improves the reliability of the algorithm. Changes in motor parameters, load current, and bus voltage will affect the actual noise duration t_noise. The time difference T1 between the maximum turn-on time and the current sampling time is a precisely measurable time quantity directly related to the PWM timing. It does not depend on these changing motor parameters, making the detection logic more stable and universal.

[0044] Step 204: Obtain the rated current of the motor, and determine the offset threshold of the current signal of the motor based on the time difference and the rated current; In one embodiment, the step of obtaining the rated current of the motor and determining the offset threshold of the motor's current signal based on the time difference and the rated current may further include the following sub-steps: Sub-step S21: Obtain the load inductance, peak current, and power supply voltage of the motor; Based on the load inductance, peak current, and power supply voltage of the motor, determine the noise duration when the power device of the motor is turned on according to the following formula: Tnoise=L*Ipeak / Vsupply; where Tnoise is the noise duration, L is the load inductance, Ipeak is the peak current, and Vsupply is the power supply voltage; Sub-step S22: If the time difference is greater than or equal to the noise duration, the rated current is multiplied by a first preset ratio to obtain the offset threshold of the motor's current signal. In sub-step S23, if the time difference is less than the noise duration, the rated current is multiplied by a second preset ratio to obtain the offset threshold of the motor's current signal; the second preset ratio is greater than the first preset ratio.

[0045] In this embodiment, L*Ipeak represents the energy stored in the inductor that needs to be released / changed during switching. L*Ipeak / Vsupply reflects the impact of the power supply voltage on the switching speed, thus making noise estimation more accurate. The load inductance L, peak current Ipeak, and power supply voltage Vsupply are all parameters that may change with the motor's operating state. Increased load may lead to an increase in Ipeak, and fluctuations in bus voltage will change Vsupply. By updating these parameters in real time or periodically, the calculated Tnoise can also change accordingly. The system's threshold can adapt not only to fixed hardware characteristics but also to dynamic operating conditions, improving robustness.

[0046] If T1 >= Tnoise, it indicates that the sampling point has exceeded the theoretical noise window, the environment is quiet, and the high-sensitivity mode, i.e., the first preset ratio, can be enabled. If T1 < Tnoise, it indicates that the sampling point is still within the theoretical noise window, the environment is noisy, and the high-robustness mode, i.e., the second preset ratio, can be enabled. Among them, the first preset ratio can be 0.5% of the AD value corresponding to the rated current, and the second preset ratio can be 2% of the AD value corresponding to the rated current. Those skilled in the art can set the first preset ratio and the second preset ratio to other appropriate values according to the idea of this application, and this application does not limit this.

[0047] Step 205, according to the first sampled current bias, the second sampled current bias, and the offset threshold, determine whether the motor has a current sampling offset; In one embodiment, the step of determining whether the motor has a current sampling offset according to the first sampled current bias, the second sampled current bias, and the offset threshold may further include the following sub-steps: Sub-step S31, if the absolute value of the difference between the first sampled current bias and the second sampled current bias is greater than or equal to the offset threshold, determine that the motor has a current sampling offset.

[0048] In the embodiment of this application, if the absolute value of the difference between the first sampled current bias and the second sampled current bias is greater than or equal to the offset threshold, it can be determined that the motor has a current sampling offset. The offset threshold can dynamically adjust the judgment sensitivity according to the time coupling relationship of the switching noise. Since the PWM switching action is the main source of sampling noise, the severity of the noise can be quantified by calculating the time difference T1 between the maximum turn-on moment and the sampling moment. Specifically, the larger T1 is, the earlier the turn-on event occurs, the current sampling point is far from the switch transient, and the noise is significantly attenuated; the smaller T1 is, the closer the turn-on event is to the sampling point, and the high-frequency noise strongly interferes with the sampling. The embodiment of this application determines whether the motor has a current sampling offset according to the first sampled current bias, the second sampled current bias, and the offset threshold, which can avoid mis-triggering the offset alarm in a noisy environment, improve the detection resolution during a clean period, and timely detect minute drifts.

[0049] Step 206, in the case where the motor has a current sampling offset, adjust the first sampled current bias to obtain the target sampled current of the motor.

[0050] In one embodiment, the step of adjusting the first sampled current bias to obtain the target sampled current of the motor may further include the following sub-steps: Sub-step S41: Determine the adjustment step size of the first sampling current bias based on the absolute value of the difference between the first sampling current bias and the second sampling current bias. Sub-step S42: Adjust the first sampling current bias according to the adjustment step size to obtain the target sampling current of the motor.

[0051] In this embodiment, if a fixed compensation amount is used, the system is prone to oscillation around the target value, forming an overshoot-rebound cycle. Determining the adjustment step size S based on the absolute value |ΔA| of the difference between the first and second sampling current biases allows for smooth convergence. For example, if B < |ΔA| <= 2B, S = 1; if 2B < |ΔA| <= 3B, S = B / 4; when 3B < |ΔA|, S = B / 2, where B is the offset threshold, S is the adjustment step size, and |ΔA| is the absolute value of the difference between the first and second sampling current biases. When the offset is large, a larger step size S is used to achieve rapid convergence, quickly pulling the system back from a severely inaccurate state; when the offset is small, a smaller step size S is used for fine-tuning, avoiding oscillations near the equilibrium point and ensuring the system can stabilize smoothly and quietly at the accurate value.

[0052] This application embodiment samples the motor current signal before motor startup to obtain a first sampled current bias, thus obtaining a bias reference. After motor startup and in the target state, the motor current signal is sampled again to obtain a second sampled current bias. The target state is where the three-phase upper bridge arm power devices of the motor are turned on, and the three-phase lower bridge arm devices are turned off. At this time, the space vector pulse width modulation is in the U111 vector state, and the current through the lower bridge arm sampling resistor is zero, allowing direct sampling to obtain a pure bias value without additional hardware or complex algorithms. An offset threshold for the motor current signal is determined. Based on the first sampled current bias, the second sampled current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset, thereby determining whether the current sampling deviation exceeds the allowable range and preventing false alarms. If the motor experiences current sampling offset, the first sampled current bias is adjusted to obtain the target sampled current of the motor, thus making the sampled current of the motor closer to the true value and dynamically calibrating the motor current in real time, reducing bias errors and improving the accuracy of motor control.

[0053] Reference Figure 5 The diagram illustrates a logic diagram of a calibration method for motor sampling current bias provided in an embodiment of this application. To enable those skilled in the art to better understand the embodiments of this application, the following explanation is provided... Figure 5 The embodiments of this application are described below: Step 301: Start sampling to obtain the first sampling current bias; Before the motor starts, the current signal is sampled N times, and the average value is taken as the first sampled current bias A.

[0054] Step 302: After startup, sampling is performed to obtain the second sampling current bias; In the U111 vector interval Tpwm / 2 after the motor starts, the current signal is sampled to obtain the current bias voltage sample value, and the second sample current bias A1 is obtained. Step 303, select the offset threshold B; Based on the time difference between the maximum turn-on time and the current bias voltage sampling time, the corresponding offset threshold B is dynamically selected to adapt to sampling requirements under different noise levels. Specifically, the system contains three PWM signals (PWM1, PWM2, PWM3), which control the power devices in the three-phase inverter respectively. Each PWM signal corresponds to a turn-on time (CPM1, CPM2, CPM3). To determine the power device turn-on time closest to the current bias voltage sampling time, the system first calculates the maximum value of these three turn-on times: CPMmax = max(CPM1, CPM2, CPM3).

[0055] Then, calculate the time difference T1 between the maximum turn-on time and the current bias voltage sampling time: T1 = Tpwm / 2 − CPMmax; where Tpwm is the PWM cycle time. This T1 reflects the relative positional relationship between the power device turn-on time and the bias voltage sampling time.

[0056] Based on the value of T1, the system can dynamically adjust the preset threshold B, the physical meaning of which is as follows: When T1 is large, it means that the turn-on time of the power device is far from the bias voltage sampling time. At this time, the transient noise caused by the PWM switching action is small, so a smaller threshold B can be set to improve the detection sensitivity; when T1 is small, it means that the turn-on time of the power device is close to the bias voltage sampling time. At this time, the noise generated by the switching action is large, so a larger threshold B should be set to avoid misjudgment.

[0057] The duration of the noise caused by the turn-on of the power device is affected by various factors, such as switching speed, circuit parameters, load characteristics, etc., and can be approximated by the following formula: tnoise≈L*Ipeak / Vsupply; where L is the load inductance, Ipeak is the peak current, and Vsupply is the supply voltage. This formula is an approximate model, and in practice, experimental measurements are needed to obtain a more accurate noise duration. In the embodiments of the present application, tnoise = L*Ipeak / Vsupply can be set to calculate the noise duration. Among them, L*Ipeak represents that the energy stored in the inductor needs to be released / changed at the moment of switching, and L*Ipeak / Vsupply reflects the influence of the supply voltage on the switching speed, thereby making the noise calculation more accurate.

[0058] This dynamic threshold adjustment strategy based on the physical timing relationship can effectively adapt to the noise levels under different working conditions and significantly improve the accuracy and stability of current sampling offset detection. The following is an example: when T1>=tnoise, B = 0.5% of the AD value corresponding to the rated current; when T1<tnoise, B = 2% of the AD value corresponding to the rated current.

[0059] Step 304, offset judgment; Calculate the difference between A1 and A, and compare the difference with the offset threshold B corresponding to the current window. If the difference between A1 and A exceeds the offset threshold, it is determined that a current sampling offset has occurred.

[0060] Step 305, offset compensation; If it is determined that an offset has occurred, according to the magnitude of the offset, a multi-level adjustment strategy is adopted to obtain the adjustment step size S. Specifically, calculate the offset value △A = A1 - A; for small offsets, a small step size is used for fine-tuning; for medium offsets, a medium step size is used for adjustment; for large offsets, a large step size is used for rapid adjustment. The following is an example: when B<|△A|<=2B, S = 1; when 2B<|△A|<=3B, S = B / 4; when 3B<|△A|, S = B / 2.

[0061] Step 306, A value update; If △A is positive, then A = A + S; if △A is negative, then A = A - S.

[0062] This application embodiment samples the motor current signal before motor startup to obtain a first sampled current bias, thus obtaining a bias reference. After motor startup and in the target state, the motor current signal is sampled again to obtain a second sampled current bias. The target state is where the three-phase upper bridge arm power devices of the motor are turned on, and the three-phase lower bridge arm devices are turned off. At this time, the space vector pulse width modulation is in the U111 vector state, and the current through the lower bridge arm sampling resistor is zero, allowing direct sampling to obtain a pure bias value without additional hardware or complex algorithms. An offset threshold for the motor current signal is determined. Based on the first sampled current bias, the second sampled current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset, thereby determining whether the current sampling deviation exceeds the allowable range and preventing false alarms. If the motor experiences current sampling offset, the first sampled current bias is adjusted to obtain the target sampled current of the motor, thus making the sampled current of the motor closer to the true value and dynamically calibrating the motor current in real time, reducing bias errors and improving the accuracy of motor control.

[0063] It should be noted that the calibration method for motor sampling current bias provided in this application embodiment can be executed by a calibration device for motor sampling current bias, or by a control module within that calibration device for executing the calibration method for applying the motor sampling current bias. This application embodiment uses the example of a calibration device for motor sampling current bias executing the calibration method for applying the motor sampling current bias to illustrate the calibration method for motor sampling current bias provided in this application embodiment.

[0064] Reference Figure 6 The diagram shows a structural block diagram of a calibration device for motor sampling current bias provided in an embodiment of this application, which may specifically include the following modules: The first current sampling module 401 is used to sample the current signal of the motor before the motor starts to obtain a first sampling current bias. The second current sampling module 402 is used to sample the current signal of the motor after the motor starts and when it is in the target state, and obtain a second sampling current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. Offset threshold determination module 403 is used to determine the offset threshold of the current signal of the motor; The sampling offset judgment module 404 is used to determine whether the motor has experienced current sampling offset based on the first sampling current offset, the second sampling current offset, and the offset threshold. The sampling current adjustment module 405 is used to adjust the first sampling current bias to obtain the target sampling current of the motor when the motor experiences current sampling offset.

[0065] In this embodiment of the application, the offset threshold determination module 403 includes: The time difference determination submodule is used to determine the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and to determine the time difference between the maximum turn-on time and the current sampling time; The offset threshold determination submodule is used to obtain the rated current of the motor and determine the offset threshold of the motor's current signal based on the time difference and the rated current.

[0066] In this embodiment of the application, the sampling offset determination module 404 includes: The sampling offset determination submodule is used to determine that the motor has experienced a current sampling offset if the absolute value of the difference between the first sampling current offset and the second sampling current offset is greater than or equal to the offset threshold.

[0067] In this embodiment of the application, the sampling current adjustment module 405 includes: The step size determination submodule is used to determine the adjustment step size of the first sampling current bias based on the absolute value of the difference between the first sampling current bias and the second sampling current bias. The sampling current adjustment submodule is used to adjust the first sampling current bias according to the adjustment step size to obtain the target sampling current of the motor.

[0068] In this embodiment of the application, the time difference determination submodule includes: The maximum turn-on time determination unit is used to acquire the pulse width modulation signal corresponding to the three-phase switching circuit of the motor, and determine the maximum turn-on time of the power device in the three-phase inverter of the motor according to the turn-on time corresponding to the pulse width modulation signal of the three-phase switching circuit. The time difference determination unit is used to obtain the period of the pulse width modulation signal and determine the current sampling time according to the period of the pulse width modulation signal, so as to obtain the time difference between the maximum turn-on time and the current sampling time.

[0069] In this embodiment of the application, the offset threshold determination submodule includes: A noise duration determination unit is used to determine the noise duration when the power devices of the motor are turned on; The first offset threshold determination unit is used to multiply the rated current by a first preset ratio to obtain the offset threshold of the motor's current signal when the time difference is greater than or equal to the noise duration. The second offset threshold determination unit is used to multiply the rated current by a second preset ratio to obtain the offset threshold of the motor's current signal when the time difference is less than the noise duration; the second preset ratio is greater than the first preset ratio.

[0070] In this embodiment of the application, the noise duration determination unit includes: The motor information acquisition subunit is used to acquire the load inductance, peak current and power supply voltage of the motor. The noise duration determination subunit is used to determine the noise duration when the power devices of the motor are turned on, based on the load inductance, peak current, and power supply voltage of the motor, according to the following formula: Tnoise=L*Ipeak / Vsupply Where Tnoise is the noise duration, L is the load inductance, Ipeak is the peak current, and Vsupply is the power supply voltage.

[0071] The calibration device for the motor sampling current bias in this application embodiment can be a device, or it can be a component, integrated circuit, or chip in a terminal. This device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. This application embodiment does not impose specific limitations.

[0072] The calibration device for the motor sampling current bias in this embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment does not specifically limit its use.

[0073] The calibration device for motor sampling current bias provided in this application embodiment can achieve Figures 1 to 5 The various processes of the calibration method for motor sampling current bias in the method embodiment will not be described again here to avoid repetition.

[0074] This application embodiment samples the motor current signal before motor startup to obtain a first sampled current bias, thus obtaining a bias reference. After motor startup and in the target state, the motor current signal is sampled again to obtain a second sampled current bias. The target state is where the three-phase upper bridge arm power devices of the motor are turned on, and the three-phase lower bridge arm devices are turned off. At this time, the space vector pulse width modulation is in the U111 vector state, and the current through the lower bridge arm sampling resistor is zero, allowing direct sampling to obtain a pure bias value without additional hardware or complex algorithms. An offset threshold for the motor current signal is determined. Based on the first sampled current bias, the second sampled current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset, thereby determining whether the current sampling deviation exceeds the allowable range and preventing false alarms. If the motor experiences current sampling offset, the first sampled current bias is adjusted to obtain the target sampled current of the motor, thus making the sampled current of the motor closer to the true value and dynamically calibrating the motor current in real time, reducing bias errors and improving the accuracy of motor control.

[0075] Optionally, embodiments of this application also provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described calibration method embodiment for motor sampling current bias and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0076] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0077] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described calibration method for motor sampling current bias and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0078] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0079] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0080] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0081] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A calibration method for motor sampling current bias, characterized in that, The method includes: Before the motor starts, the current signal of the motor is sampled to obtain a first sampled current bias; After the motor starts and is in the target state, the current signal of the motor is sampled to obtain a second sampled current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. Determine the offset threshold of the current signal of the motor; Based on the first sampling current bias, the second sampling current bias, and the offset threshold, it is determined whether the motor has experienced current sampling offset; If the motor experiences a current sampling offset, the first sampling current bias is adjusted to obtain the target sampling current of the motor.

2. The calibration method for motor sampling current bias according to claim 1, characterized in that, Determining the offset threshold of the motor's current signal includes: Determine the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and determine the time difference between the maximum turn-on time and the current sampling time; The rated current of the motor is obtained, and the offset threshold of the current signal of the motor is determined based on the time difference and the rated current.

3. The calibration method for motor sampling current bias according to claim 1, characterized in that, The step of determining whether the motor has experienced current sampling offset based on the first sampling current bias, the second sampling current bias, and the offset threshold includes: If the absolute value of the difference between the first sampling current bias and the second sampling current bias is greater than or equal to the offset threshold, then it is determined that the motor has experienced a current sampling offset.

4. The calibration method for motor sampling current bias according to claim 1, characterized in that, The step of adjusting the bias of the first sampling current to obtain the target sampling current of the motor includes: The adjustment step size of the first sampling current bias is determined based on the absolute value of the difference between the first sampling current bias and the second sampling current bias. The first sampling current bias is adjusted according to the adjustment step size to obtain the target sampling current of the motor.

5. The calibration method for motor sampling current bias according to claim 2, characterized in that, The step of determining the maximum turn-on time among the turn-on times corresponding to the three-phase switching circuit of the motor, and determining the time difference between the maximum turn-on time and the current sampling time, includes: The pulse width modulation signals corresponding to the three-phase switching circuit of the motor are obtained respectively, and the maximum turn-on time of the power devices in the three-phase inverter of the motor is determined according to the turn-on time corresponding to the pulse width modulation signal of the three-phase switching circuit. The period of the pulse width modulation signal is obtained, and the current sampling time is determined based on the period of the pulse width modulation signal, so as to obtain the time difference between the maximum on time and the current sampling time.

6. The calibration method for motor sampling current bias according to claim 2, characterized in that, The step of obtaining the rated current of the motor and determining the offset threshold of the motor's current signal based on the time difference and the rated current includes: Determine the duration of noise when the power devices of the motor are turned on; If the time difference is greater than or equal to the noise duration, the rated current is multiplied by a first preset ratio to obtain the offset threshold of the motor's current signal. If the time difference is less than the noise duration, the rated current is multiplied by a second preset ratio to obtain the offset threshold of the motor's current signal; the second preset ratio is greater than the first preset ratio.

7. The calibration method for motor sampling current bias according to claim 6, characterized in that, Determining the noise duration when the power devices of the motor are turned on includes: Obtain the load inductance, peak current, and power supply voltage of the motor; Based on the load inductance, peak current, and power supply voltage of the motor, the noise duration when the power devices of the motor are turned on is determined according to the following formula: Tnoise=L*Ipeak / Vsupply Where Tnoise is the noise duration, L is the load inductance, Ipeak is the peak current, and Vsupply is the power supply voltage.

8. A calibration device for motor sampling current bias, characterized in that, The device includes: The first current sampling module is used to sample the current signal of the motor before the motor starts to obtain a first sampling current bias. The second current sampling module is used to sample the current signal of the motor after the motor starts and when it is in the target state, and obtain the second sampling current bias; the target state is that the three-phase upper bridge arm power devices of the motor are turned on and the three-phase lower bridge arm devices are turned off. Offset threshold determination module, used to determine the offset threshold of the current signal of the motor; The sampling offset judgment module is used to determine whether the motor has experienced current sampling offset based on the first sampling current offset, the second sampling current offset, and the offset threshold. The sampling current adjustment module is used to adjust the first sampling current bias to obtain the target sampling current of the motor when the motor experiences a current sampling offset.

9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the calibration method for motor sampling current bias as described in claims 1-7.

10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the calibration method for motor sampling current bias as described in claims 1-7.