Motor zero position identification method, device and equipment and storage medium

By performing high-frequency injection and adaptive voltage regulation on the motor, combined with the calculation of the average motor frequency and angle, the accuracy problem of motor zero-position identification under test bench conditions was solved, achieving high-precision and high-reliability zero-position identification, and improving the motor's torque output and working efficiency.

CN120934394APending Publication Date: 2025-11-11GZK INTELLIGENT POWER TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511097428.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

Existing methods for identifying the zero position of motors cannot be implemented in situations where there is no test bench or it is inconvenient to use a test bench, and the zero position accuracy is low due to changes in speed during the free deceleration of the motor.

Method used

By injecting high frequency into the target motor, monitoring the high frequency current and adaptively adjusting the high frequency voltage, and combining the cumulative average value of the motor frequency and real-time angle, the zero position of the motor is determined, avoiding reliance on inaccurate speed information.

Benefits of technology

It improves the accuracy and reliability of motor zero-position identification, enhances the motor's torque output capability and working efficiency, and avoids accuracy problems caused by speed changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120934394A_ABST
    Figure CN120934394A_ABST
Patent Text Reader

Abstract

The invention discloses a motor zero position identification method, device and equipment and a storage medium, and relates to the technical field of motor control, and the method comprises the steps: carrying out the high-frequency injection of a target motor, monitoring the high-frequency current of the target motor in the starting process, and adjusting the high-frequency voltage in the high-frequency injection process according to the high-frequency current; monitoring the motor frequency and the real-time motor angle after the high-frequency voltage is adjusted; a first average angle is determined according to the motor frequency, a second average angle is determined according to the real-time motor angle, and a zero position is determined based on the difference between the first average angle and the second average angle. The problems that zero position identification cannot be achieved under the working condition that no rack exists or the rack is inconvenient to use, and the zero position precision is low due to rotating speed changes in the free speed reduction process of the motor are solved, angle calculation precision can be guaranteed without manual adjustment of a user, the accuracy and reliability of zero position identification are improved through mean value calculation, and the method is suitable for popularization and application. And the torque output capability and the working efficiency of the motor are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of motor control technology, and in particular to a method, device, equipment and storage medium for identifying the zero position of a motor. Background Technology

[0002] For permanent magnet synchronous motors, their position is typically obtained using position sensors such as resolvers, eddy current generators, or Hall effect sensors. These sensors provide relative position signals, but to obtain the absolute position signal, it is necessary to identify the motor's zero position. Furthermore, the motor's output torque is directly affected by its position; therefore, the accuracy of the motor's zero position directly determines its torque output capability and operating efficiency.

[0003] Existing methods for identifying motor zero-position require dragging the motor to a certain speed on a test bench and then performing arctangent calculations on the direct-axis and quadrature-axis voltages under zero-current control. However, this method requires the test bench to rotate at high speed, which is impractical for situations where a test bench is unavailable or inconvenient to use. To address this, a technical solution has been proposed that uses open-loop control to pull a single motor to a certain speed, or uses DC positioning to coarsely mark a zero position and rotate the motor to a certain speed. Then, during free-deceleration, the arctangent calculations on the direct-axis and quadrature-axis voltages are performed to obtain the zero position. However, during the free-deceleration process, the motor speed constantly changes due to frictional resistance, resulting in low accuracy of the final calculated zero position. Summary of the Invention

[0004] The main objective of this application is to provide a method, device, equipment, and storage medium for identifying the zero position of a motor, aiming to solve the technical problem of how to improve the accuracy of motor zero position identification.

[0005] To achieve the above objectives, this application proposes a method for identifying the zero position of a motor, the method comprising:

[0006] High-frequency injection is applied to the target motor to start it;

[0007] Monitor the high-frequency current of the target motor during the start-up process, and adjust the high-frequency voltage during the high-frequency injection process according to the high-frequency current;

[0008] Monitor the motor frequency and real-time motor angle of the target motor after the high-frequency voltage is adjusted;

[0009] The first average angle of the target motor is determined based on the motor frequency, the second average angle of the target motor is determined based on the real-time motor angle, and the zero position of the target motor is determined based on the difference between the first average angle and the second average angle.

[0010] In one embodiment, the high-frequency current includes a high-frequency direct-axis current, and the step of adjusting the high-frequency voltage during the high-frequency injection process based on the high-frequency current includes:

[0011] The high-frequency direct-axis current error value is determined based on the preset expected value of the high-frequency direct-axis current and the high-frequency direct-axis current.

[0012] Based on the integral value of the preset high-frequency injection integral factor and the high-frequency direct-axis current error value, the high-frequency voltage during the high-frequency injection process is adjusted until the high-frequency current is greater than or equal to the expected value of the high-frequency direct-axis current.

[0013] In one embodiment, the step of determining the first average angle of the target motor based on the motor frequency includes:

[0014] The first motor angle of the target motor is determined based on the motor frequency;

[0015] The first average angle of the target motor is determined based on the angles of each first motor within a preset time interval.

[0016] In one embodiment, the step of determining the first average angle of the target motor based on the angles of each first motor within a preset time interval includes:

[0017] Determine the first initial motor angle of the target motor among the first motor angles within a preset time interval, and determine whether the first initial motor angle is within a preset angle range, wherein the preset angle range includes zero degrees;

[0018] When the first initial motor angle is within a preset angle range, the remaining first motor angles among the first motor angles are restricted to a semi-circular range to obtain the restricted remaining first motor angles, and the first average angle of the target motor is determined based on the first initial motor angle and the remaining first motor angles.

[0019] If the first initial motor angle exceeds the preset angle range, the first average angle of the target motor is determined based on the first initial motor angle and the remaining first motor angles among the first motor angles.

[0020] In one embodiment, the step of determining the second average angle of the target motor based on the real-time motor angle includes:

[0021] Determine the second initial motor angle of the target motor among the real-time motor angles within a preset time interval, and determine whether the second initial motor angle is within a preset angle range, wherein the preset angle range includes zero degrees;

[0022] When the second initial motor angle is within a preset angle range, the remaining real-time motor angles among the real-time motor angles are restricted to a semi-circular range to obtain the restricted remaining real-time motor angles, and the second average angle of the target motor is determined based on the first initial motor angle and the remaining real-time motor angles.

[0023] If the second initial motor angle exceeds the preset angle range, the second average angle of the target motor is determined based on the second initial motor angle and the remaining real-time motor angles among the real-time motor angles.

[0024] In one embodiment, after the steps of determining the first average angle of the target motor based on the motor frequency and determining the second average angle of the target motor based on the real-time motor angle, the method further includes:

[0025] Obtain the latest high-frequency direct-axis current within a preset time interval, and determine whether the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under a preset coefficient;

[0026] If the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under a preset coefficient, the step of determining the zero position of the target motor based on the difference between the first average angle and the second average angle is performed.

[0027] If the latest high-frequency direct-axis current is less than or equal to the expected value of the high-frequency direct-axis current under a preset coefficient, return to the steps of determining the first average angle of the target motor based on the motor frequency and determining the second average angle of the target motor based on the real-time motor angle.

[0028] In one embodiment, the step of determining the zero position of the target motor based on the difference between the first average angle and the second average angle further includes:

[0029] A square wave positive voltage is injected into the target motor to obtain the absolute value of the first direct-axis current in the last pulse width modulation (PWM) cycle during the square wave positive voltage injection process. The angle of the square wave positive voltage is the first average angle, and the amplitude is the adjusted positive high-frequency voltage.

[0030] A square wave negative voltage is injected into the target motor to obtain the absolute value of the second direct-axis current in the last PWM cycle during the square wave negative voltage injection process. The angle of the square wave negative voltage is the first average angle, and the amplitude is the adjusted negative high-frequency voltage.

[0031] Compare the absolute values ​​of the first direct-axis current and the absolute values ​​of the second direct-axis current;

[0032] When the absolute value of the first direct-axis current is less than or equal to the absolute value of the second direct-axis current, the zero position is accumulated at a flat angle, and the zero position after the flat angle accumulation is restricted within the circumference range to obtain the updated zero position.

[0033] Furthermore, to achieve the above objectives, this application also proposes a motor zero-position identification device, which includes:

[0034] A high-frequency injection module is used to inject high frequency into the target motor to start the target motor;

[0035] A voltage regulation module is used to monitor the high-frequency current of the target motor during the starting process and adjust the high-frequency voltage during the high-frequency injection process according to the high-frequency current.

[0036] The parameter monitoring module is used to monitor the motor frequency and real-time motor angle of the target motor after the high-frequency voltage is adjusted.

[0037] The zero-position determination module is used to determine the first average angle of the target motor based on the motor frequency, determine the second average angle of the target motor based on the real-time motor angle, and determine the zero position of the target motor based on the difference between the first average angle and the second average angle.

[0038] In addition, to achieve the above objectives, this application also proposes an electronic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the motor zero-position identification method as described above.

[0039] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the motor zero-position identification method described above.

[0040] One or more technical solutions proposed in this application have at least the following technical effects:

[0041] This application first performs high-frequency injection on the target motor, monitors the high-frequency current of the target motor during startup, and adjusts the high-frequency voltage during the high-frequency injection process based on the high-frequency current, thereby achieving adaptive calculation of the high-frequency injection voltage. That is, during startup, the high-frequency voltage is adjusted according to the monitored high-frequency current to obtain a suitable injection voltage without manual adjustment by the user, thus ensuring the accuracy of the high-frequency injection angle calculation and providing a foundation for accurate identification of the motor zero position. Next, the motor frequency and real-time motor angle of the target motor after the high-frequency voltage adjustment are monitored. The first average angle of the target motor is determined based on the motor frequency, and the second average angle is determined based on the real-time motor angle. The zero position of the target motor is determined based on the difference between the first average angle and the second average angle. By using cumulative averaging calculation, the angle corresponding to the motor frequency (i.e., the first average angle) and the real-time motor angle detected by the position sensor (i.e., the second average angle) are accumulated and averaged respectively, improving the accuracy of zero position identification. Meanwhile, the motor zero position is determined based on the difference between these two average angles, which integrates angle information from different sources, further improving the accuracy of zero position identification and providing a guarantee for improving the motor's torque output capability and working efficiency.

[0042] In summary, this application achieves adaptive high-frequency voltage regulation by injecting high-frequency current into the target motor and monitoring and adjusting the high-frequency current. Simultaneously, it monitors the adjusted motor frequency and real-time motor angle, and uses cumulative averaging to calculate the average angle difference to identify the zero position. This eliminates the need to rely on inaccurate motor speed for zero-position identification, thus avoiding the problems of existing methods failing to identify zero position in situations where a test bench is unavailable or inconvenient to use, and the low zero-position accuracy caused by speed changes during motor free-speed reduction. It ensures high-frequency injection angle calculation accuracy without manual user adjustment, and improves the accuracy and reliability of motor zero-position identification through cumulative averaging, thereby enhancing the motor's torque output capability and operating efficiency. Attached Figure Description

[0043] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0044] Figure 1 This is a flowchart illustrating an embodiment of the motor zero-position identification method of this application.

[0045] Figure 2 This is a flowchart illustrating Embodiment 2 of the motor zero-position identification method of this application;

[0046] Figure 3 This is a flowchart illustrating Embodiment 3 of the motor zero-position identification method of this application;

[0047] Figure 4 A simplified flowchart illustrating the motor zero-position identification method provided in Embodiment 3 of this application;

[0048] Figure 5 This is a schematic diagram of the high-frequency injection process for the motor zero-position identification method provided in Embodiment 3 of this application;

[0049] Figure 6 This is a schematic diagram of the voltage adjustment process of the motor zero-position identification method provided in Embodiment 3 of this application;

[0050] Figure 7 This is a schematic diagram of the overall process for calculating the mean value of the motor zero-position identification method provided in Embodiment 3 of this application;

[0051] Figure 8 This is a schematic diagram of the mean calculation part of the motor zero-position identification method provided in Embodiment 3 of this application;

[0052] Figure 9 This is a schematic diagram of another mean calculation part of the motor zero-position identification method provided in Embodiment 3 of this application;

[0053] Figure 10 This is a schematic diagram of the verification and judgment process of the motor zero-position identification method provided in Embodiment 3 of this application;

[0054] Figure 11 This is a schematic diagram of the polarity learning process of the motor zero-position identification method provided in Embodiment 3 of this application;

[0055] Figure 12 This is a schematic diagram of the module structure of the motor zero-position identification device according to an embodiment of this application;

[0056] Figure 13 This is a schematic diagram of the device structure of the hardware operating environment involved in the motor zero-position identification method in the embodiments of this application. Detailed Implementation

[0057] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0058] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0059] The main solution of this application embodiment is: to inject high frequency into the target motor to start the target motor; to monitor the high frequency current of the target motor during the start-up process, and to adjust the high frequency voltage during the high frequency injection process according to the high frequency current; to monitor the motor frequency and the real-time motor angle of the target motor after adjusting the high frequency voltage; to determine the first average angle of the target motor according to the motor frequency, to determine the second average angle of the target motor according to the real-time motor angle, and to determine the zero position of the target motor based on the difference between the first average angle and the second average angle.

[0060] Existing methods for identifying motor zero-position require dragging the motor to a certain speed on a test bench and then performing arctangent calculations on the direct-axis and quadrature-axis voltages under zero-current control. However, this method requires the test bench to rotate at high speed, which is impractical for situations where a test bench is unavailable or inconvenient to use. To address this, a technical solution has been proposed that uses open-loop control to pull a single motor to a certain speed, or uses DC positioning to coarsely mark a zero position and rotate the motor to a certain speed. Then, during free deceleration, the arctangent calculations on the direct-axis and quadrature-axis voltages are performed to obtain the zero position. However, during the free deceleration process, the motor speed constantly changes due to frictional resistance, resulting in low accuracy of the final calculated zero position.

[0061] This application provides a solution that achieves adaptive high-frequency voltage regulation by injecting high-frequency current into the target motor and monitoring and adjusting the high-frequency current. Simultaneously, it monitors the adjusted motor frequency and real-time motor angle, and calculates the average angle difference through cumulative averaging to identify the zero position. This eliminates the need to rely on inaccurate motor speed for zero-position identification, thus avoiding the problems of existing methods failing to identify zero position in situations where a test bench is unavailable or inconvenient to use, and the low zero-position accuracy caused by speed changes during motor free-speed reduction. It ensures high-frequency injection angle calculation accuracy without manual user adjustment, and improves the accuracy and reliability of motor zero-position identification through cumulative averaging calculation, thereby enhancing the motor's torque output capability and operating efficiency.

[0062] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or controller capable of performing the above functions. The following description uses a controller as an example to illustrate this embodiment and the subsequent embodiments.

[0063] Based on this, the embodiments of this application provide a method for identifying the zero position of a motor, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the motor zero-position identification method of this application.

[0064] In this embodiment, the motor zero-position identification method includes steps S10 to S40:

[0065] Step S10: High-frequency injection is performed on the target motor to start the target motor;

[0066] It should be noted that the target motor is a permanent magnet synchronous motor that requires zero-position identification. This motor is the object of operation in the entire technical solution, and the accuracy of its zero position directly affects the motor's torque output and working efficiency.

[0067] Step S20: Monitor the high-frequency current of the target motor during the start-up process, and adjust the high-frequency voltage during the high-frequency injection process according to the high-frequency current;

[0068] It should be noted that the high-frequency current is the current with a high frequency component flowing through the target motor during the high-frequency injection starting process. This current is a key parameter for monitoring the motor's starting status and adjusting the high-frequency voltage. The high-frequency voltage is the high-frequency voltage applied to the target motor to start it. By monitoring and adjusting the high-frequency current, the requirements of the motor starting process can be met and the accuracy of the high-frequency injection angle calculation can be ensured.

[0069] Understandably, step S20 is performed in order to adjust the voltage during the high-frequency injection process in real time to adapt to the dynamic characteristics of the motor during startup. This avoids the inconvenience of manually adjusting the high-frequency voltage and the problems of abnormal motor startup or inaccurate calculation of the high-frequency injection angle caused by voltage mismatch. Thus, adaptive high-frequency voltage adjustment for the target motor is achieved, ensuring the accuracy of the high-frequency injection angle calculation and providing a reliable foundation for accurate identification of the motor zero position.

[0070] For example, a high-frequency square wave injection method is used to inject positive and negative high-frequency voltages with amplitudes of U0 into the output voltage along the d-axis (i.e., the direct axis), with an injection frequency of f0. Taking an 8kHz switching frequency as an example, if a high-frequency square wave voltage of f0 = 1kHz needs to be injected, then a cycle is formed with n = 8 switching periods. The first 4 switching periods inject a voltage with an amplitude of +U0, and the last 4 switching periods inject a voltage with an amplitude of -U0 to achieve a 1kHz high-frequency voltage injection, where U0 is the user-set initial voltage value. Next, the sampled high-frequency currents Id (high-frequency direct-axis current) and Iq (high-frequency quadrature-axis current) are high-pass filtered to remove the low-frequency DC current. After high-pass filtering, the maximum absolute values ​​of the currents IdH and IqH corresponding to the positive and negative injection cycles are determined. Then, the high-frequency voltage during the high-frequency injection process is adjusted based on these high-frequency currents.

[0071] Step S30: Monitor the motor frequency and real-time motor angle of the target motor after adjusting the high-frequency voltage;

[0072] It should be noted that the motor frequency refers to the frequency at which the target motor operates, reflecting the motor's operating status and speed information; the real-time motor angle is the real-time position angle of the motor rotor determined by the position sensor configured on the target motor, reflecting the real-time position of the motor rotor during operation; the position sensor is an angle sensor installed on the target motor to detect the position of the motor rotor, such as a resolver, eddy current sensor, or Hall sensor, providing data for obtaining the real-time motor angle.

[0073] For example, a phase-locked loop (PLL) calculation is performed on the phase-locked current, i.e., IqH, of the quadrature axis to obtain the motor frequency fpll of the target motor. The target IqHs is then phase-locked to 0, fpll = kp_pll * IqH + ∫ki_pll * IqH, where kp_pll and ki_pll are the proportional and integral parameters of the PLL, respectively.

[0074] Step S40: Determine the first average angle of the target motor based on the motor frequency, determine the second average angle of the target motor based on the real-time motor angle, and determine the zero position of the target motor based on the difference between the first average angle and the second average angle.

[0075] It should be noted that the first average angle is an average angle calculated based on the motor frequency. It is a statistical and abstract representation of the motor's operating state and is used for subsequent comparison and analysis with the second average angle to determine the zero position. The second average angle is an average angle calculated based on the real-time motor angle, reflecting the average position of the motor rotor in actual operation. It is combined with the first average angle to determine the motor's zero position. The zero position of the target motor refers to the initial position or reference position of the target motor rotor, and its accuracy is crucial for the precise control and torque output of the motor.

[0076] Understandably, step S40 is performed in order to improve the accuracy and reliability of zero-position identification by using the cumulative average calculation method. This avoids the problem of low zero-position accuracy caused by speed changes during the motor's free-speed reduction process. By comprehensively considering the motor frequency and real-time motor angle, the zero-position identification accuracy is cleverly improved, thereby enhancing the motor's torque output capability and working efficiency.

[0077] For example, to determine the first average angle, the motor frequency is monitored in real time during motor operation. Within a preset time interval (e.g., 10ms), the first motor angle corresponding to each PWM cycle is calculated according to the relationship between motor frequency and angle: angle = angle of the previous PWM (Pulse-Width Modulation) cycle + frequency × time × 360°. Then, these first motor angles are arithmetically averaged to obtain the first average angle HFIThetaAvg. To determine the second average angle, the real-time motor rotor angle provided by the position sensor is acquired in real time. Within the same preset time interval, all real-time motor angles are arithmetically averaged to obtain the second average angle SensorThetaAvg. Finally, the difference between the first average angle and the second average angle is calculated, and this difference is used as the zero-point correction value for the target motor, i.e., the zero-point ThetaZero of the target motor = HFIThetaAvg - SensorThetaAvg. ThetaZero is then limited to between 0 and 360°; that is, if it is less than 0°, ThetaZero is increased by 360°, and if it is greater than 360°, ThetaZero is decreased by 360°. In this way, the influence of random fluctuations or noise during motor operation on angle measurement can be reduced, improving the accuracy and reliability of zero-point identification.

[0078] This embodiment provides a method for identifying motor zero position. It achieves adaptive high-frequency voltage regulation by injecting high-frequency current into the target motor and monitoring and adjusting the high-frequency current. Simultaneously, it monitors the adjusted motor frequency and real-time motor angle, and calculates the average angle difference using cumulative averaging to identify the zero position. This eliminates the need to rely on inaccurate motor speed for zero position identification, thus avoiding the problems of existing methods failing to identify zero position in situations where a test bench is unavailable or inconvenient to use, and the low zero position accuracy caused by speed changes during motor free-speed reduction. It ensures high-frequency injection angle calculation accuracy without manual user adjustment, and improves the accuracy and reliability of motor zero position identification through cumulative averaging calculation, thereby enhancing the motor's torque output capability and operating efficiency.

[0079] In one feasible implementation, the high-frequency current includes a high-frequency direct-axis current, and the step of adjusting the high-frequency voltage during the high-frequency injection process according to the high-frequency current in step S20 may include steps S21 to S22:

[0080] Step S21: Determine the high-frequency direct-axis current error value based on the preset expected value of the high-frequency direct-axis current and the high-frequency direct-axis current;

[0081] It should be noted that the expected value of the high-frequency direct-axis current refers to a pre-set desired direct-axis current value, used as a reference standard for the direct-axis current during high-frequency injection. By adjusting the high-frequency injection voltage, the actual high-frequency direct-axis current is made to approach this expected value, thereby achieving precise control of the motor. The high-frequency direct-axis current refers to the current component flowing along the motor's direct axis during high-frequency injection, i.e., in the same direction as the motor torque generation. This current component plays a crucial role in motor starting and control, and its magnitude affects the motor's operating state and control accuracy. The high-frequency direct-axis current error value refers to the difference between the preset expected value and the actual monitored high-frequency direct-axis current. This error value reflects the degree of deviation between the actual current and the expected current. By calculating and processing this error value, the high-frequency injection voltage can be adjusted to reduce current deviation, making the motor operation more stable and precise.

[0082] Understandably, due to the need for precise control of the high-frequency direct-axis current, step S21 is performed. This involves comparing the preset expected value of the high-frequency direct-axis current with the actual high-frequency direct-axis current, and calculating the difference between the two, i.e., the high-frequency direct-axis current error value. This error value allows for real-time monitoring of the deviation between the current high-frequency direct-axis current and the expected value, thus providing a basis for subsequent voltage regulation. This avoids abnormal motor operation caused by current fluctuations or instability, improving the accuracy and stability of motor control.

[0083] For example, in high-frequency injection calculations, IqH is phase-locked to 0, while the magnitude of IdH depends on the injection voltage and injection frequency. If IdH is small, it is difficult to separate it from IqH, which needs to be locked to 0, or it increases the errors caused by sampling, current variations, and filters, thus further affecting the angle error. The injection frequency is generally an integer multiple of the switching frequency, and adjusting this multiple has a significant impact on the feedback current and cannot be continuously adjusted. Therefore, adaptive integration calculation is performed on the injected high-frequency voltage to obtain appropriate current feedback and improve calculation accuracy. Let the high-frequency direct-axis current error value IdHerr = IdHlimit – IdH, where IdHlimit is the desired minimum high-frequency direct-axis current feedback, i.e., the preset expected value of the high-frequency direct-axis current, which is at least 0.15 times the rated current. Users can increase this value, and if IdHerr < 0, let IdHerr = 0.

[0084] Step S22: Based on the preset high-frequency injection integral factor and the integral value of the high-frequency direct-axis current error value, the high-frequency voltage during the high-frequency injection process is adjusted until the high-frequency current is greater than or equal to the expected value of the high-frequency direct-axis current.

[0085] It should be noted that the high-frequency injection integral factor is a coefficient used in integral calculations during the high-frequency injection process. When adjusting the high-frequency voltage, the amplitude and direction of voltage adjustment are determined by integrating the high-frequency direct-axis current error value and combining it with the integral factor. The magnitude of the integral factor affects the adjustment speed and accuracy, and needs to be set appropriately according to the motor characteristics and control requirements.

[0086] Understandably, in order to dynamically adjust the high-frequency injection voltage based on the high-frequency direct-axis current error value, step S22 is performed. By integrating the high-frequency direct-axis current error value and combining it with a preset high-frequency injection integration factor, a suitable voltage adjustment amount can be calculated. This avoids excessive deviation between the high-frequency current and the expected value caused by factors such as changes in motor parameters or load disturbances, thereby achieving precise control of the high-frequency current. By continuously adjusting the high-frequency voltage until the high-frequency current reaches or exceeds the expected value, it ensures that the motor obtains sufficient starting torque during the high-frequency injection process, improving the motor's starting performance and control reliability.

[0087] For example, the high-frequency voltage during the high-frequency injection process is adjusted based on the following formula:

[0088] Uinj=U0+∫ki_inj*IdHerr

[0089] Where Uinj is the adjusted high-frequency voltage, U0 is the high-frequency voltage before adjustment, ki_inj is the preset high-frequency injection integration factor, and IdHerr is the high-frequency direct-axis current error value. The adaptive integration calculation ends when IdH is greater than or equal to IdHlimit.

[0090] In this embodiment, the error value is determined based on the preset expected value of the high-frequency direct-axis current and the actual high-frequency direct-axis current. The high-frequency voltage is adjusted by integrating the preset high-frequency injection integral factor with the error value until the high-frequency current reaches or exceeds the expected value. This avoids the insufficient accuracy caused by manual adjustment of the high-frequency voltage in traditional methods, as well as the control instability caused by current fluctuations or parameter changes during motor operation. It achieves adaptive and precise adjustment of the high-frequency voltage, improves the stability and accuracy of motor control, and ensures that the motor can operate with the expected current during high-frequency injection starting, thereby improving the starting performance and control reliability of the motor.

[0091] In one feasible implementation, the step of determining the first average angle of the target motor based on the motor frequency in step S40 may include steps S41 to S42:

[0092] Step S41: Determine the first motor angle of the target motor based on the motor frequency;

[0093] It should be noted that the first motor angle refers to the theoretical position angle of the motor rotor at a certain moment, calculated based on the target motor's frequency. During motor operation, the motor frequency reflects the motor's speed and operating state, and the rotor's rotational speed can be calculated from the motor frequency. Based on the formula relating motor frequency and angle: Angle = Angle of the previous PWM cycle + Frequency × Time × 360°, the theoretical position angle of the motor rotor corresponding to each PWM cycle can be calculated, i.e., the first motor angle. This angle is a theoretical value derived from the motor's operating parameters (i.e., motor frequency) and is used for subsequent average angle calculations to more accurately determine the motor's zero position.

[0094] Understandably, step S41 is performed to convert motor frequency into angle information to reflect the real-time position of the motor rotor. Calculating the first motor angle using the motor frequency avoids errors and delays that may arise from directly obtaining the angle from a position sensor, especially during motor startup or low-speed operation when the position sensor signal may be unstable or inaccurate. Calculating the angle using the motor frequency provides an angle reference based on the motor's electrical characteristics, ensuring a more reliable and continuous source of angle data in subsequent average angle calculations, thus improving the accuracy of zero-position identification.

[0095] For example, the click frequency fpll obtained from phase-locked loop (PLL) is low-pass filtered to remove some glitches, resulting in the filtered frequency fpll_lpf. Then, the first motor angle Theta is calculated based on the filtered motor frequency: Theta = Theta_Z1 + fpll_lpf * Tpwm, where Theta_Z1 is the first motor angle calculated in the previous PWM cycle, and Tpwm is the PWM cycle time.

[0096] Step S42: Determine the first average angle of the target motor based on the angles of each first motor within a preset time interval.

[0097] Understandably, to reduce the impact of random fluctuations and noise during motor operation on motor angle measurement, step S42 is performed. By averaging multiple first motor angles over a preset time interval, the interference of accidental errors in a single measurement value on the final result can be avoided. Examples include brief angle fluctuations caused by sudden load changes or angle jumps caused by instantaneous interference in the motor control system. Calculating the average angle enables a more accurate estimation of the motor position, improving the accuracy and reliability of motor zero-position identification. Furthermore, the average angle calculation reflects the average operating state of the motor over a period of time, providing a more stable reference for subsequent zero-position identification, thereby enhancing the stability and accuracy of motor control.

[0098] In this embodiment, by first determining the first motor angle corresponding to the motor frequency, and then averaging multiple first motor angles within a preset time interval to determine the first average angle, the problem of inaccurate first average angle caused by instantaneous fluctuations during motor operation or single measurement errors is avoided. For example, there are cases where individual angle data deviations are large due to sudden changes in motor load or measurement noise. By calculating the average value of multiple first motor angles within the preset time interval, a more accurate estimation of the motor position is achieved, improving the stability and reliability of the first average angle. This provides a more accurate reference for subsequent zero-position identification based on the average angle difference, enhancing the accuracy and anti-interference capability of motor zero-position identification.

[0099] In one feasible implementation, step S42 may include steps S421 to S423:

[0100] Step S421: Determine the first initial motor angle of the target motor among the first motor angles within the preset time interval, and determine whether the first initial motor angle is within the preset angle range, wherein the preset angle range includes zero degrees.

[0101] It should be noted that the first initial motor angle refers to the first motor angle value of the target motor within the preset time interval. It is the motor angle recorded for the first time within this time interval and serves as the starting point data for subsequent judgment and processing, providing key information for determining the initial position of the motor. The preset angle range refers to a pre-set angle range, usually including zero degrees, used to determine whether the first initial motor angle is within a reasonable or expected range. Setting this range helps to limit and process the motor angle in the future, ensuring that the calculated average angle has practical significance and representativeness.

[0102] It is understandable that, in order to ensure the accuracy and reliability of angle calculation, step S421 is performed. By determining the first initial motor angle within the preset time interval and judging whether it is within the preset angle range, subsequent calculation deviations caused by abnormal or unexpected initial angles can be avoided. This ensures that the initial data used for subsequent calculations is reasonable and effective, thereby providing reliable basic data for subsequent angle constraints or direct calculation of the average angle.

[0103] For example, the first initial motor angle of the target motor is determined among the first motor angles in the preset time interval. That is, when entering the first cycle of the cumulative average calculation, the first first motor angle calculated is taken as the first initial motor angle HFITheta1, and it is determined whether the first initial motor angle is within the preset angle range, such as whether it is between 0-60° or 300-360°.

[0104] Step S422: When the first initial motor angle is within a preset angle range, the remaining first motor angles among the first motor angles are restricted to a semicircular range to obtain the restricted remaining first motor angles, and the first average angle of the target motor is determined based on the first initial motor angle and the remaining first motor angles.

[0105] It should be noted that the remaining first motor angles refer to all first motor angle values ​​other than the initial first motor angle within the preset time interval. These angle values ​​may be limited or directly used in calculations based on the initial first motor angle in subsequent processing to determine the first average angle of the target motor.

[0106] It is understandable that when the first initial motor angle is within the preset angle range, the other angles may fluctuate significantly or exceed the reasonable range. Therefore, step S422 is performed to limit these other first motor angles to a semi-circular range. This avoids the impact of inconsistencies or excessive fluctuations in angle data on the average angle calculation, such as angle jumps or periodic errors. This achieves smoothing and correction of the angle data, ensuring that the calculated first average angle is more stable and accurate.

[0107] For example, if the first initial motor angle HFITheta1 is within the range of 0-60° or 300-360°, then it is determined whether all subsequent angles, i.e., the remaining first motor angles, are greater than 180°. If they are, 180° is subtracted; otherwise, it remains unchanged. All subsequent angles are summed and accumulated in HFIThetaSum. After the last accumulation, HFIThetaSum is divided by the number of accumulations to obtain the first average angle HFIThetaAvg of the target motor. The first average angle is then limited to between 0-360°. That is, if it is less than 0°, 360° is added to the result; if it is greater than 360°, 360° is subtracted from the result to obtain the adjusted first average angle HFIThetaAvg.

[0108] Step S423: If the first initial motor angle exceeds the preset angle range, determine the first average angle of the target motor based on the first initial motor angle and the remaining first motor angles among the first motor angles.

[0109] It is understandable that since there is no need to limit the other angles when the first initial motor angle exceeds the preset angle range, step S423 is performed. By directly averaging the first initial motor angle and the other first motor angles, it can be ensured that the first average angle can still be reasonably calculated even when the initial angle is abnormal. This improves the flexibility and adaptability of the entire calculation process and ensures that a relatively accurate first average angle can be obtained under different initial conditions.

[0110] For example, if the first initial motor angle HFITheta1 is not within the range of 0-60° or 300-360°, then the angles of each first motor are kept unchanged, all the angles of the first motor are summed and accumulated in HFIThetaSum. After the last accumulation is completed, HFIThetaSum is divided by the number of accumulations to obtain the first average angle HFIThetaAvg of the target motor. The first average angle is then limited to between 0-360°. That is, if it is less than 0°, the result is added by 360°, and if it is greater than 360°, the result is subtracted by 360° to obtain the adjusted first average angle HFIThetaAvg.

[0111] In this embodiment, a technical solution is implemented by first determining the initial motor angle within a preset time interval and judging whether it falls within a preset angle range including zero degrees, and then processing the remaining first motor angles according to the judgment result. If the initial motor angle is within the preset angle range, the remaining first motor angles are restricted to a semi-circular range and then calculated together with the initial motor angle to obtain the first average angle. If they are not within the preset angle range, the first average angle is calculated directly based on all the first motor angles. This avoids the problem of inaccurate calculation of the first average angle due to abnormal initial angles or excessive fluctuations in angle data. For example, initial angles deviating from the expected range may introduce large errors, or periodic fluctuations in angle data may affect the stability of the average value. Through this conditional judgment and targeted data processing method, reasonable constraints and effective utilization of angle data are achieved, improving the accuracy and reliability of the first average angle calculation and ensuring the accuracy of subsequent motor zero-position identification based on the average angle difference.

[0112] In one feasible implementation, the step of determining the second average angle of the target motor based on the real-time motor angle in step S40 may include steps S43 to S45:

[0113] Step S43: Determine the second initial motor angle of the target motor in each real-time motor angle within a preset time interval, and determine whether the second initial motor angle is within a preset angle range, wherein the preset angle range includes zero degrees.

[0114] It should be noted that the second initial motor angle refers to the first angle value determined from the real-time motor angle data of the target motor within a preset time interval. It is called "second" to distinguish it from the theoretical angle value derived from the motor frequency in the preceding sequence, which is the first initial angle.

[0115] For example, in the first cycle of the cumulative average calculation, the angle of the position sensor, i.e. the second initial motor angle SensorTheta1, is determined to be near 0°, i.e., whether it is between 0-60° or 300-360°.

[0116] Understandably, in order to ensure the rationality and validity of the real-time motor angle data, step S43 is performed. By determining the first real-time motor angle within the preset time interval, which is also the second initial motor angle, and judging whether it is within the preset angle range including zero degrees, it is possible to avoid subsequent calculation deviations caused by abnormal or unexpected initial real-time motor angles. This ensures that the initial data on which subsequent calculations are based is reasonable and valid, thereby providing reliable basic data for subsequent angle constraints or direct calculation of the average angle.

[0117] Step S44: When the second initial motor angle is within a preset angle range, restrict the remaining real-time motor angles among the real-time motor angles to a semi-circular range to obtain the restricted remaining real-time motor angles, and determine the second average angle of the target motor based on the first initial motor angle and the remaining real-time motor angles.

[0118] It should be noted that the remaining real-time motor angles refer to all real-time motor angle values ​​other than the second initial motor angle in the real-time motor angle data of the target motor within the preset time interval; the semi-circular range refers to the angle range of taking half of a circle (360 degrees), that is, the range of 0 to 180 degrees.

[0119] It is understandable that when the second initial motor angle is within the preset angle range, the other real-time motor angles may fluctuate significantly or exceed a reasonable range. Therefore, step S44 is performed to limit the other real-time motor angles to a semi-circular range. This avoids the impact of inconsistencies or excessive fluctuations in angle data on the average angle calculation, such as angle jumps or periodic errors. This achieves smoothing and correction of the angle data, ensuring that the calculated second average angle is more stable and accurate.

[0120] For example, if the second initial motor angle SensorTheta1 is within the range of 0-60° or 300-360°, then it is determined whether all subsequent angles, i.e., the remaining real-time motor angles, are greater than 180°. If they are greater, 180° is subtracted; otherwise, it remains unchanged. All subsequent angles are summed and accumulated in SensorThetaSum. After the last accumulation, SensorThetaSum is divided by the number of accumulations to obtain the second average angle SensorThetaAvg of the target motor. The second average angle is then limited to between 0-360°; that is, if it is less than 0°, 360° is added to the result to obtain the adjusted second average angle SensorThetaAvg.

[0121] Step S45: If the second initial motor angle exceeds the preset angle range, determine the second average angle of the target motor based on the second initial motor angle and the remaining real-time motor angles among the real-time motor angles.

[0122] It is understandable that, since there is no need to limit the other angles when the second initial motor angle exceeds the preset angle range, step S45 is performed. By directly averaging the second initial motor angle and the other real-time motor angles, it can be ensured that the second average angle can still be reasonably calculated even when the initial angle is abnormal. This improves the flexibility and adaptability of the entire calculation process and ensures that a relatively accurate second average angle can be obtained under different initial conditions.

[0123] For example, if the second initial motor angle SensorTheta1 is not within the range of 0-60° or 300-360°, then each second motor angle is kept unchanged, all second motor angles are summed and accumulated in SensorThetaSum. After the last accumulation is completed, SensorThetaSum is divided by the number of accumulations to obtain the second average angle SensorThetaAvg of the target motor. The second average angle is then limited to between 0-360°. That is, if it is less than 0°, the result is added by 360° to obtain the adjusted second average angle SensorThetaAvg.

[0124] In this embodiment, the second initial motor angle within a preset time interval is first determined, and it is determined whether it is within a preset angle range including zero degrees. If it is, the remaining real-time motor angles are restricted to a semi-circular range and then calculated together with the second initial motor angle to obtain the second average angle. If it is not, the second average angle is calculated directly based on all real-time motor angles. This avoids the problem of inaccurate average angle calculation caused by initial deviations or fluctuations in real-time motor angle data, realizes reasonable constraints and effective utilization of real-time motor angle data, improves the accuracy and reliability of the second average angle calculation, and thus provides a more accurate basis for motor zero-position identification.

[0125] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 After step S40, which involves determining the first average angle of the target motor based on the motor frequency and the second average angle of the target motor based on the real-time motor angle, the motor zero-position identification method further includes steps S100 to S300:

[0126] Step S100: Obtain the latest high-frequency direct-axis current within a preset time interval, and determine whether the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under a preset coefficient.

[0127] It should be noted that the latest high-frequency direct-axis current refers to the high-frequency direct-axis current value monitored at the most recent moment within the preset time interval. This value reflects the high-frequency direct-axis current state of the motor at the most recent moment.

[0128] It is understandable that during the zero-position identification calculation of the motor, the motor may be subjected to external forces that cause sudden rotation, or there may be risks of faults such as current control, controller nonlinearity, or program running errors. Therefore, step S100 is performed to obtain the latest high-frequency direct-axis current and determine whether it meets the conditions, i.e. whether it is greater than the expected value under the preset coefficient. This can avoid inaccurate zero-position identification under abnormal motor conditions and ensure that zero-position calculation is only performed when the motor operating state is relatively stable and the current control is normal, thereby improving the reliability of zero-position identification.

[0129] For example, in the last PWM calculation cycle, i.e. the same cycle as the zero-position calculation, a verification judgment is performed to obtain the latest high-frequency direct-axis current IdH_last of the high-frequency direct-axis current Id at the last cumulative calculation, and to determine whether the absolute value of IdH_last is greater than 0.66*IdHlimit, where 0.66 is a preferred preset coefficient and IdHlimit is the expected value of the high-frequency direct-axis current.

[0130] Step S200: If the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under a preset coefficient, perform the step of determining the zero position of the target motor based on the difference between the first average angle and the second average angle.

[0131] It is understandable that when the latest high-frequency direct-axis current meets the condition, that is, when it is greater than the expected value under the preset coefficient, it indicates that the motor operation is relatively stable and less affected by external interference or system failure. Therefore, performing step S200 can avoid zero-position identification errors caused by abnormal motor conditions, ensure that the zero-position calculation is based on reliable motor operation data, thereby achieving accurate zero-position identification and improving the accuracy and efficiency of motor control.

[0132] For example, if the absolute value of IdH_last is greater than 0.66*IdHlimit, the verification is considered successful and the process proceeds to the next step.

[0133] Step S300: If the latest high-frequency direct-axis current is less than or equal to the expected value of the high-frequency direct-axis current under a preset coefficient, return to the steps of determining the first average angle of the target motor based on the motor frequency and determining the second average angle of the target motor based on the real-time motor angle.

[0134] It is understandable that when the latest high-frequency direct-axis current does not meet the conditions, that is, when it is less than or equal to the expected value under the preset coefficient, there may be risks of the motor being disturbed by external forces, abnormal current control, or other faults. Therefore, by performing step S300 and recalculating the average angle, inaccurate zero-position identification can be avoided under abnormal conditions, ensuring that the controller can obtain more reliable motor operation data again, thereby improving the robustness and reliability of motor zero-position identification.

[0135] For example, if the absolute value of IdH_last is less than or equal to 0.66*IdHlimit, the cumulative mean is recalculated. Furthermore, if, for example, five consecutive attempts fail, a zero-position self-learning failure is reported, and the current zero-position identification task is exited. Here, five attempts are merely an example count and do not impose a specific preset threshold.

[0136] In this embodiment, a verification step is added: the latest high-frequency direct-axis current within a preset time interval is obtained, and it is determined whether it is greater than the expected value of the high-frequency direct-axis current under a preset coefficient. If it is greater, the step of determining the zero position based on the average angle difference is executed; if it is less than or equal to, the step of recalculating the average angle is returned, forming a closed-loop monitoring and verification mechanism. This effectively avoids high-frequency injection identification failure or result deviation caused by unforeseen factors such as sudden rotation of the motor due to external force, abnormal current control, controller nonlinearity, and program running errors. It improves the reliability and anti-interference capability of the motor zero-position identification process, ensures the accuracy of the final zero-position identification result, and thus enhances the stability and robustness of the entire motor control system.

[0137] Based on the first and / or third embodiments of this application, the content that is the same as or similar to that in the first and second embodiments described above in the third embodiment of this application can be referred to the above description and will not be repeated hereafter. Based on this, please refer to... Figure 3 After step S40, the motor zero-position identification method further includes steps S50 to S80:

[0138] Step S50: Inject a square wave positive voltage into the target motor to obtain the absolute value of the first direct-axis current in the last pulse width modulation (PWM) cycle during the square wave positive voltage injection process. The angle of the square wave positive voltage is the first average angle, and the amplitude is the adjusted positive high-frequency voltage.

[0139] It should be noted that the first absolute value of the direct-axis current refers to the absolute value of the direct-axis current measured in the last PWM cycle when a square wave positive voltage is injected into the target motor. It is called "first" to distinguish it from the subsequent "second absolute value of the direct-axis current," which corresponds to key measurement values ​​in the positive and negative voltage injection processes, respectively, and is used for subsequent comparison and zero-point correction operations.

[0140] Understandably, since the angle obtained after phase-locking following high-frequency square wave injection may have two possible offsets—0 degrees and 180 degrees—step S50 is performed. By injecting a square wave with an angle equal to the first average angle and an amplitude equal to the adjusted positive high-frequency voltage, a reference current value can be obtained. This avoids zero-point identification errors caused by angle offset and ensures that subsequent polarity determination can be based on accurate current data. Therefore, it provides a basis for determining the correct zero-point polarity.

[0141] For example, a square wave voltage of magnitude Uinj is injected into the target motor at an angle of HFIThetaAvg, and this injection is continued for 2*n PWM cycles, where n is the number of switching cycles in the high-frequency injection. In the last cycle of the 2*n PWM cycles, the absolute value of the current direct-axis current, i.e., the absolute value of the first direct-axis current Id_pos, is extracted.

[0142] Step S60: Inject a square wave negative voltage into the target motor to obtain the absolute value of the second direct-axis current in the last PWM cycle during the square wave negative voltage injection process. The angle of the square wave negative voltage is the first average angle, and the amplitude is the adjusted negative high-frequency voltage.

[0143] It should be noted that the absolute value of the second direct-axis current refers to the absolute value of the direct-axis current measured in the last PWM cycle when a square wave negative voltage is injected into the target motor.

[0144] Understandably, in order to compare the current situation after positive and negative voltage injection to determine the polarity of the zero point, step S60 is further performed on the basis of square wave positive voltage injection. Another current value is obtained by injecting a square wave negative voltage with an injection angle of the first average angle and an amplitude of the adjusted negative high-frequency voltage for subsequent comparison. This avoids the possibility of polarity judgment errors that may be caused by relying solely on the unidirectional current value and ensures that the polarity of the zero point can be accurately determined by comparing the current values ​​in two directions.

[0145] For example, a square wave voltage of magnitude -Uinj is injected into the target motor at an angle of HFIThetaAvg, and this injection is continued for 2*n PWM cycles. In the last cycle of the 2*n PWM cycles, the absolute value of the current direct-axis current, i.e., the absolute value of the second direct-axis current Id_neg, is extracted.

[0146] Step S70: Compare the absolute value of the first direct-axis current with the absolute value of the second direct-axis current;

[0147] Understandably, in order to determine the correct polarity of the zero point, step S70 is performed. By comparing the magnitudes of the positive and negative current values, it can be determined which direction of the current response under positive and negative voltage injection is more in line with expectations. This avoids the identification ambiguity caused by the inability to distinguish between the two possible zero point polarities, and ensures that the correct zero point direction can be determined based on the difference in current response, thereby achieving an accurate judgment of the zero point polarity.

[0148] Step S80: When the absolute value of the first direct-axis current is less than or equal to the absolute value of the second direct-axis current, the zero position is accumulated at a flat angle, and the zero position after the flat angle accumulation is restricted to the circumference range to obtain the updated zero position.

[0149] It should be noted that the circumferential range refers to the complete rotational angle range of the motor rotor position, that is, from 0 degrees to 360 degrees.

[0150] Understandably, since the comparison results need to be effectively utilized to correct any potential offset in the zero position, step S80 is performed. If the absolute value of the first direct-axis current is less than or equal to the absolute value of the second direct-axis current, the zero position is accumulated using a flat angle, and the accumulated zero position is restricted within a circular range. This involves dynamic adjustment and optimization of the zero position, while simultaneously restricting it within a circular range to ensure the consistency and accuracy of the angle representation. This avoids the accumulation of long-term zero position deviations and the problem of angles exceeding reasonable ranges, ensuring that the zero position is within the correct angle range and can be continuously corrected. This achieves precise zero position correction and optimization, improving the accuracy and reliability of motor control.

[0151] For example, if Id_pos>Id_neg, then ThetaZero remains unchanged; otherwise, ThetaZero = ThetaZero + 180°, and ThetaZero is restricted to between 0 and 360°, that is, if it is less than 0°, the result is added by 360°, and if it is greater than 360°, the result is subtracted by 360°.

[0152] In this embodiment, a polarity judgment and correction step is added after the zero position is identified. Specifically, for the motor, a square wave positive and negative voltage with an injection angle of the first average angle is applied. The corresponding absolute values ​​of the direct-axis current are obtained and compared. Based on the comparison results, the zero position is accumulated or maintained at a flat angle and limited to a circular range, forming a closed-loop zero position correction mechanism. This avoids the uncertainty of a 180-degree shift in the phase-locked angle caused by high-frequency square wave injection, and the resulting zero position polarity error. Automatic judgment and correction of the zero position polarity are achieved, ensuring the accuracy and uniqueness of the zero position, further improving the precision and reliability of motor control, and enhancing the robustness and practicality of the entire motor zero position identification method.

[0153] For example, to help understand the implementation process of the motor zero-position identification method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 4 , Figure 4 A simplified flowchart of a method for identifying the zero position of a motor is provided, specifically:

[0154] First, the motor is initially positioned using square wave high-frequency injection. An integral method is used to adaptively calculate and adjust the injected high-frequency voltage to obtain an injection voltage that ensures identification accuracy. This high-frequency voltage is then used for subsequent high-frequency injections. Next, the cumulative average values ​​of the high-frequency injection angle and the position sensor angle are calculated to obtain the first and second average angles, thus initially determining the motor's zero position. High-frequency current feedback is then used to verify the zero-position identification, preventing identification errors caused by motor position changes or control malfunctions. After successful verification, polarity learning is performed to determine whether the initially obtained motor zero position needs to be increased by 180 degrees. Finally, the learned zero position is stored in the chip's memory.

[0155] Further, please refer to Figure 5 In the high-frequency injection process, high-frequency voltage injection is first performed, and the collected quadrature-axis current is high-pass filtered to obtain the quadrature-axis phase-locked current. Then, the current is phase-locked by a phase-locked loop and frequency filtered to calculate the motor frequency. Based on the motor frequency, the angle is calculated to obtain the first motor angle.

[0156] Further, please refer to Figure 6 During the voltage regulation process, high-frequency injection calculation is first performed to obtain the high-frequency direct-axis current. Then, based on the preset expected value of the high-frequency direct-axis current and the error value of the high-frequency direct-axis current, adaptive integral calculation is performed to regulate the high-frequency voltage during the high-frequency injection process.

[0157] Further, please refer to Figure 7 During the mean calculation process, the first initial motor angle HFITheta1 and the second initial motor angle SensorTheta1 are determined simultaneously during high-frequency injection. Then, the cumulative summation and average calculation are performed to obtain the first average angle and the second average angle, and the zero position is calculated based on the two.

[0158] Further, please refer to Figure 8 In the process of obtaining the first average angle, it is first determined whether the first initial motor angle HFITheta1 is within the preset angle range of 0-60° or 300-360°. If it is, the angles of the other first motors are restricted to a semi-circular range, that is, it is determined whether the angles of the other first motors are greater than 180°. If they are greater, 180° is subtracted; if they are less, the angles of each first motor remain unchanged. If they are not, the angles of each first motor remain unchanged. Then, the angles of each first motor are accumulated, averaged, and the calculated first average angle is restricted to a circular range between 0 and 360°.

[0159] Further, please refer to Figure 9In the process of obtaining the second average angle, it is first determined whether the second initial motor angle SensorTheta1 is within the preset angle range of 0-60° or 300-360°. If it is, the remaining second motor angles are restricted to a semi-circular range, that is, it is determined whether the remaining second motor angles are greater than 180°. If they are greater, 180° is subtracted; if they are less, the angles of each second motor remain unchanged. If they are not, the angles of each second motor remain unchanged. Then, the angles of each second motor are accumulated, averaged, and the calculated second average angle is restricted to a circular range between 0 and 360°.

[0160] Further, please refer to Figure 10 During the verification and judgment process, the latest high-frequency direct-axis current within the preset time interval, i.e., the high-frequency Id, is first extracted. The amplitude of the direct axis is judged to determine whether the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under the preset coefficient. Based on the judgment result, the state transition is performed.

[0161] Further, please refer to Figure 11 During polarity learning, a positive voltage can be injected first, and a positive current can be extracted to obtain the absolute value of the first direct-axis current. Then, a negative voltage can be injected, and a negative current can be extracted to obtain the absolute value of the second direct-axis current. Then, the current is compared, and the zero position is updated based on the comparison result.

[0162] This application also provides a motor zero-position identification device, please refer to... Figure 12 The motor zero-position identification device includes:

[0163] The high-frequency injection module 10 is used to inject high frequency into the target motor to start the target motor;

[0164] The voltage regulation module 20 is used to monitor the high-frequency current of the target motor during the starting process and adjust the high-frequency voltage during the high-frequency injection process according to the high-frequency current.

[0165] The parameter monitoring module 30 is used to monitor the motor frequency and the real-time motor angle of the target motor after the high-frequency voltage is adjusted.

[0166] The zero-position determination module 40 is used to determine the first average angle of the target motor based on the motor frequency, determine the second average angle of the target motor based on the real-time motor angle, and determine the zero position of the target motor based on the difference between the first average angle and the second average angle.

[0167] The motor zero-position identification device provided in this application, employing the motor zero-position identification method in the above embodiments, can solve the technical problem of how to improve the accuracy of motor zero-position identification. Compared with the prior art, the beneficial effects of the motor zero-position identification device provided in this application are the same as those of the motor zero-position identification method provided in the above embodiments, and other technical features in the motor zero-position identification device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0168] This application provides an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the motor zero-position identification method in Embodiment 1 above.

[0169] The following is for reference. Figure 13 The diagram illustrates a structural schematic of an electronic device suitable for implementing embodiments of this application. The electronic devices in these embodiments may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 13 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0170] like Figure 13As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. The communication device 1009 allows the electronic device to communicate wirelessly or wiredly with other devices to exchange data.

[0171] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0172] The electronic device provided in this application, employing the motor zero-position identification method in the above embodiments, can solve the technical problem of how to improve the accuracy of motor zero-position identification. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the motor zero-position identification method provided in the above embodiments, and other technical features of this electronic device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0173] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the motor zero-position identification method in the above embodiments.

[0174] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0175] The aforementioned computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: inject high frequency into a target motor to start the target motor; monitor the high frequency current of the target motor during the starting process and adjust the high frequency voltage during the high frequency injection process according to the high frequency current; monitor the motor frequency and the real-time motor angle of the target motor after adjusting the high frequency voltage; determine a first average angle of the target motor according to the motor frequency, determine a second average angle of the target motor according to the real-time motor angle, and determine the zero position of the target motor based on the difference between the first average angle and the second average angle.

[0176] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages.

[0177] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described motor zero-position identification method, thereby solving the technical problem of how to improve the accuracy of motor zero-position identification. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the motor zero-position identification method provided in the above embodiments, and will not be repeated here.

Claims

1. A method for identifying the zero position of a motor, characterized in that, The motor zero-position identification method includes: High-frequency injection is applied to the target motor to start it; Monitor the high-frequency current of the target motor during the start-up process, and adjust the high-frequency voltage during the high-frequency injection process according to the high-frequency current; Monitor the motor frequency and real-time motor angle of the target motor after the high-frequency voltage is adjusted; The first average angle of the target motor is determined based on the motor frequency, the second average angle of the target motor is determined based on the real-time motor angle, and the zero position of the target motor is determined based on the difference between the first average angle and the second average angle.

2. The motor zero-position identification method as described in claim 1, characterized in that, The high-frequency current includes a high-frequency direct-axis current, and the step of adjusting the high-frequency voltage during the high-frequency injection process based on the high-frequency current includes: The high-frequency direct-axis current error value is determined based on the preset expected value of the high-frequency direct-axis current and the high-frequency direct-axis current. Based on the integral value of the preset high-frequency injection integral factor and the high-frequency direct-axis current error value, the high-frequency voltage during the high-frequency injection process is adjusted until the high-frequency current is greater than or equal to the expected value of the high-frequency direct-axis current.

3. The motor zero-position identification method as described in claim 1, characterized in that, The step of determining the first average angle of the target motor based on the motor frequency includes: The first motor angle of the target motor is determined based on the motor frequency; The first average angle of the target motor is determined based on the angles of each first motor within a preset time interval.

4. The motor zero-position identification method as described in claim 3, characterized in that, The step of determining the first average angle of the target motor based on the angles of each first motor within a preset time interval includes: Determine the first initial motor angle of the target motor among the first motor angles within a preset time interval, and determine whether the first initial motor angle is within a preset angle range, wherein the preset angle range includes zero degrees; When the first initial motor angle is within a preset angle range, the remaining first motor angles among the first motor angles are restricted to a semi-circular range to obtain the restricted remaining first motor angles, and the first average angle of the target motor is determined based on the first initial motor angle and the remaining first motor angles. If the first initial motor angle exceeds the preset angle range, the first average angle of the target motor is determined based on the first initial motor angle and the remaining first motor angles among the first motor angles.

5. The motor zero-position identification method as described in claim 1, characterized in that, The step of determining the second average angle of the target motor based on the real-time motor angle includes: Determine the second initial motor angle of the target motor among the real-time motor angles within a preset time interval, and determine whether the second initial motor angle is within a preset angle range, wherein the preset angle range includes zero degrees; When the second initial motor angle is within a preset angle range, the remaining real-time motor angles among the real-time motor angles are restricted to a semi-circular range to obtain the restricted remaining real-time motor angles, and the second average angle of the target motor is determined based on the first initial motor angle and the remaining real-time motor angles. If the second initial motor angle exceeds the preset angle range, the second average angle of the target motor is determined based on the second initial motor angle and the remaining real-time motor angles among the real-time motor angles.

6. The motor zero-position identification method as described in claim 1, characterized in that, After the steps of determining the first average angle of the target motor based on the motor frequency and determining the second average angle of the target motor based on the real-time motor angle, the method further includes: Obtain the latest high-frequency direct-axis current within a preset time interval, and determine whether the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under a preset coefficient; If the latest high-frequency direct-axis current is greater than the expected value of the high-frequency direct-axis current under a preset coefficient, the step of determining the zero position of the target motor based on the difference between the first average angle and the second average angle is performed. If the latest high-frequency direct-axis current is less than or equal to the expected value of the high-frequency direct-axis current under a preset coefficient, return to the steps of determining the first average angle of the target motor based on the motor frequency and determining the second average angle of the target motor based on the real-time motor angle.

7. The motor zero-position identification method as described in claim 1, characterized in that, The step of determining the zero position of the target motor based on the difference between the first average angle and the second average angle further includes: A square wave positive voltage is injected into the target motor to obtain the absolute value of the first direct-axis current in the last pulse width modulation (PWM) cycle during the square wave positive voltage injection process. The angle of the square wave positive voltage is the first average angle, and the amplitude is the adjusted positive high-frequency voltage. A square wave negative voltage is injected into the target motor to obtain the absolute value of the second direct-axis current in the last PWM cycle during the square wave negative voltage injection process. The angle of the square wave negative voltage is the first average angle, and the amplitude is the adjusted negative high-frequency voltage. Compare the absolute values ​​of the first direct-axis current and the absolute values ​​of the second direct-axis current; When the absolute value of the first direct-axis current is less than or equal to the absolute value of the second direct-axis current, the zero position is accumulated at a flat angle, and the zero position after the flat angle accumulation is restricted within the circumference range to obtain the updated zero position.

8. A motor zero-position identification device, characterized in that, The motor zero-position identification device includes: A high-frequency injection module is used to inject high frequency into the target motor to start the target motor; A voltage regulation module is used to monitor the high-frequency current of the target motor during the starting process and adjust the high-frequency voltage during the high-frequency injection process according to the high-frequency current. The parameter monitoring module is used to monitor the motor frequency and real-time motor angle of the target motor after the high-frequency voltage is adjusted. The zero-position determination module is used to determine the first average angle of the target motor based on the motor frequency, determine the second average angle of the target motor based on the real-time motor angle, and determine the zero position of the target motor based on the difference between the first average angle and the second average angle.

9. An electronic device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the motor zero-position identification method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the motor zero-position identification method as described in any one of claims 1 to 7.