Motor rotation angle error compensation method, device, storage medium and vehicle

By using the primary zero-crossing signal to determine the integral window in new energy vehicles, the feedback signal of the resolver is converted and compensated, thus solving the problems of signal interference and phase delay in the angle calculation of the motor resolver and improving the stability of motor operation and the safety performance of the vehicle.

CN122394464APending Publication Date: 2026-07-14BYD CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BYD CO LTD
Filing Date
2025-10-11
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

In new energy vehicles, during the calculation of the motor rotary transformer angle, signal interference and phase delay can cause unstable motor operation, affecting the vehicle's driving stability and safety.

Method used

By detecting the motor rotation, the integral window is determined using the main zero-crossing signal, the resolver feedback signal is converted to obtain the first rotor angle, and compensation is performed according to the target phase error. The result is then input to the motor controller to control the motor operation.

Benefits of technology

It improves the anti-interference capability of the resolver feedback signal, enhances the accuracy of motor resolver angle calculation, avoids vehicle loss of control due to motor instability, and improves vehicle safety performance and driving stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122394464A_ABST
    Figure CN122394464A_ABST
Patent Text Reader

Abstract

The application discloses a motor resolver angle error compensation method and device, a storage medium and a vehicle. The specific implementation scheme is as follows: in the case of detecting motor rotation, a main zero-crossing signal is determined according to a resolver feedback signal, the resolver feedback signal is converted by taking the main zero-crossing signal as an integral window, and a first rotor angle is obtained; the first rotor angle is compensated according to a target phase error to obtain a target rotor angle, and the target rotor angle is input to a controller of the motor to control the operation of the motor. The technical scheme of the present application can improve the anti-interference of the resolver feedback signal by determining the integral window with the main zero-crossing signal, thereby improving the accuracy of the motor resolver angle calculation and the stability of the motor operation. At the same time, the vehicle is prevented from losing control due to unstable motor operation, which helps to improve the safety performance of the vehicle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy vehicle technology, specifically to a method, device, storage medium, and vehicle for compensating for motor resolver angle error. Background Technology

[0002] In the angle calculation process of the resolver in new energy vehicle motors, signal interference and phase delay are the main factors affecting the accuracy of angle calculation. Vehicles may vibrate due to unstable motor operation, and at high speeds on bumpy roads, loss of control may occur. Therefore, there is an urgent need for a motor resolver angle error compensation design that is resistant to signal interference to improve the stability of motor operation. Summary of the Invention

[0003] This invention provides a method, device, storage medium, and vehicle for compensating for motor resolver angle errors, aiming to solve the problem of unstable motor operation caused by signal interference and phase delay.

[0004] Firstly, a method for compensating for motor resolver angle error is provided, including: When motor rotation is detected, the main zero-crossing signal is determined based on the resolver feedback signal, and the resolver feedback signal is converted using the main zero-crossing signal as the integration window to obtain the first rotor angle; The target rotor angle is obtained by compensating the first rotor angle based on the target phase error, and then input to the motor controller to control the motor operation.

[0005] Secondly, this application also provides a computer device, including one or more processors and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to perform the motor resolver angle error compensation method provided in the first aspect.

[0006] Thirdly, this application also provides a computer storage medium storing a computer program. When the computer program is run on a computer device, the computer program is used to cause the computer device to perform the motor resolver angle error compensation method provided in the first aspect.

[0007] Fourthly, this application also provides a vehicle that includes the aforementioned computer equipment.

[0008] According to the technical solution of this disclosure, determining the integral window through the primary zero-crossing signal can improve the anti-interference capability of the resolver feedback signal, thereby improving the accuracy of the motor resolver angle calculation and thus enhancing the stability of motor operation. Furthermore, it helps improve vehicle safety by preventing vehicle loss of control due to motor instability. Simultaneously, it optimizes the motor's dynamic response under complex driving conditions such as low speed, high speed, and frequent deceleration, thereby improving vehicle driving stability. Attached Figure Description

[0009] 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.

[0010] Figure 1 This is a schematic diagram of the motor resolver angle error compensation process provided in some embodiments of this application; Figure 2 This is a schematic diagram of the overall process for motor resolver angle error compensation provided in some embodiments of this application; Figure 3 This is a schematic diagram illustrating the determination of the starting point of the integration window using the main zero-crossing signal, provided in some embodiments of this application. Figure 4 This is a schematic diagram of angle delay compensation provided in some embodiments of this application; Figure 5 This is a schematic flowchart of motor resolver fault handling provided in some embodiments of this application; Figure 6 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0011] 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, and 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.

[0012] In the description of the embodiments of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, features defined with "first" and "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0013] The use of "applies to" or "configured to" in this application implies open and inclusive language, which does not exclude the applicability to or configuration to devices performing additional tasks or steps. Additionally, the use of "based on" implies openness and inclusivity, because processes, steps, calculations, or other actions "based on" one or more of the stated conditions or values ​​may in practice be based on additional conditions or values ​​beyond those stated.

[0014] In existing technologies, the electric motor, as the core power component of a vehicle, directly impacts the vehicle's driving quality, safety, and energy efficiency through its stable and precise performance control. The resolver, a key sensor in the motor system used for accurately measuring the rotor angle, outputs a rotor angle that is a crucial input parameter for core algorithms such as motor vector control and torque control. The accuracy of the angle calculation plays a decisive role in the motor's control performance. However, in the actual operating environment of new energy vehicles, the resolver angle calculation process faces numerous interference factors, among which signal interference and phase delay are key issues affecting calculation accuracy. Therefore, solving the signal interference and phase delay problems in the resolver angle calculation process of new energy vehicle motors, and improving the accuracy and reliability of angle calculation, is of significant practical importance for enhancing the overall performance of new energy vehicles.

[0015] To at least partially address one or more of the aforementioned problems and other potential issues, this disclosure proposes a motor resolver angle error compensation scheme. The scheme includes: upon detecting motor rotation, determining a primary zero-crossing signal based on the resolver feedback signal; using the primary zero-crossing signal as an integration window to convert the resolver feedback signal to obtain a first rotor angle; compensating the first rotor angle based on a target phase error to obtain a target rotor angle, and inputting this target rotor angle to the motor controller to control motor operation. Thus, by determining the integration window using the primary zero-crossing signal, the anti-interference capability of the resolver feedback signal can be improved, thereby increasing the accuracy of the motor resolver angle calculation and ultimately improving the stability of motor operation. Simultaneously, it avoids vehicle loss of control due to motor instability, contributing to improved vehicle safety performance.

[0016] Figure 1 This is a schematic flowchart of motor resolver angle error compensation according to an embodiment of this disclosure, as shown below. Figure 1 As shown, the method includes at least the following steps: S101: When the motor rotation is detected, the main zero-crossing signal is determined according to the resolver feedback signal, and the resolver feedback signal is converted using the main zero-crossing signal as the integration window to obtain the first rotor angle; S102: The first rotor angle is compensated according to the target phase error to obtain the target rotor angle, and then input to the motor controller to control the motor operation.

[0017] In some embodiments, the motor refers to a rotary motor that requires precise detection and control of rotor position or angle through a resolver. Here, the resolver acts as a high-precision electromagnetic sensor. It can accurately measure key parameters such as the angle, position, and speed of a rotating object, providing reliable data support for the precise control of the motor. During motor operation, the resolver, based on the law of electromagnetic induction, utilizes the change in magnetic flux caused by the change in the relative position between the stator and rotor to accurately convert mechanical quantities such as the angular displacement and axial position of the motor rotor into electrical parameter signals that have a specific functional relationship with it, i.e., resolver feedback signals. After reading the resolver feedback signals in an oversampling manner through an analog-to-digital converter, the resolver feedback signals are decoded to obtain the first resolver feedback signal (Sin) and the second resolver feedback signal (Cos).

[0018] In some embodiments, the primary zero-crossing signal is used as the starting point of the resolver feedback signal integration window, providing a reference timing for the weighted integration of the first and second resolver feedback signals within the subsequent half-cycle of excitation. Simultaneously, it is determined whether the current excitation cycle is the first or second half-cycle to ascertain whether the first and second resolver feedback signals need to be flipped.

[0019] In some embodiments, the first rotor angle refers to the real-time rotor angle value obtained after converting the resolver feedback signal using the main zero-crossing signal as the integration window. This first rotor angle is the initial angle information obtained by converting the resolver feedback signal. This first rotor angle is used as the core feedback for motor closed-loop control (such as vector control or servo control).

[0020] In some embodiments, the target phase error refers to the error between the first rotor angle and the target rotor angle. The first rotor angle is the initial rotor angle to be corrected obtained from the resolver feedback signal; the target rotor angle is the corrected rotor angle obtained after compensating for the target phase error.

[0021] In some embodiments, the motor controller is an electronic device for controlling the operation of the motor. The controller can receive various input signals (such as rotor angle, speed command, current feedback, etc.) and output corresponding control signals to adjust the motor's operating parameters such as speed, torque, and direction.

[0022] Figure 2 A schematic diagram of the overall process for motor resolver angle error compensation is shown, as follows: Figure 2 As shown, the process may include: S201: Reads the resolver feedback signal via an analog-to-digital converter using an oversampling method; Here, oversampling refers to acquiring the resolver feedback signal using a sampling frequency that is twice the highest frequency of the signal; this can improve the resolution and accuracy of the resolver feedback signal and reduce the impact of quantization errors and noise.

[0023] S202: Decode the resolver feedback signal to obtain the first resolver feedback signal and the second resolver feedback signal; S202a: Read the first zero-crossing index corresponding to the first resolver feedback signal and the second zero-crossing index corresponding to the second resolver feedback signal according to the watchdog timer built into the analog-to-digital converter (ADC); whereby the watchdog timer built into the ADC is a safety monitoring mechanism in the embedded system.

[0024] S202b: Within a complete excitation cycle, sample data is collected for the first zero-crossing sequence number and the second zero-crossing sequence number to obtain the first sampled data corresponding to the first zero-crossing sequence number and the second sampled data corresponding to the second zero-crossing sequence number; the amplitudes of the first sampled data and the second sampled data are calculated respectively; the zero-crossing sequence number corresponding to the sampled data with the larger amplitude is determined as the main zero-crossing signal. S202c: The main zero-crossing signal is used as the starting point of the integration window; within half an excitation cycle from this starting point, 16 points are taken from the first zero-crossing index and the second zero-crossing index respectively, and the weighted integration is performed and the average is taken to obtain the first resolver feedback signal and the second resolver feedback signal; refer to Figure 3 , Figure 3 This diagram illustrates how the starting point of the integration window is determined using the primary zero-crossing signal. It should be noted that: it is necessary to determine whether the above excitation cycle is the upper half cycle or the lower half cycle; if it is the upper half cycle, the corresponding first resolver feedback signal and the second resolver feedback signal will not flip; if it is the lower half cycle, the corresponding first resolver feedback signal and the second resolver feedback signal will flip.

[0025] Specifically, the first resolver feedback signal A is calculated according to the following formula:

[0026] in, The sampling point with the first zero-crossing index; This represents the integral weight of the first resolver feedback signal.

[0027] The second resolver feedback signal B is calculated using the following formula:

[0028] in, The sampling point indicating the second zero-crossing index; This represents the integral weight of the second resolver feedback signal.

[0029] S203: Using the main zero-crossing signal as the integration window, the first resolver feedback signal and the second resolver feedback signal are orthogonally demodulated to obtain the first rotor angle; Here, quadrature demodulation uses the idea of ​​complex number addition and multiplication, and takes advantage of the principle that the quadrature product is 0 to convert the resolver feedback signal into the first rotor angle.

[0030] Specifically, the first rotor angle is calculated according to the following formula:

[0031] in: A represents the first rotor angle; B represents the first resolver feedback signal; and C represents the second resolver feedback signal.

[0032] S204: When motor rotation is detected, generate the target phase accumulation value; S204a: When motor rotation is detected, the original phase accumulation value C is obtained; S204b: Initialize based on the original phase accumulation value to obtain the first compensation coefficient and the second compensation coefficient; calculate the first compensation coefficient a1 according to the following formula:

[0033] The second compensation coefficient b1 is calculated using the following formula:

[0034] Where C1 is the phase accumulation value of the c1th group; C2 is the phase accumulation value of the c2th group.

[0035] S205: The target phase error is calculated based on the accumulated value of the target phase and the rotation frequency of the motor; Specifically, the phase difference between adjacent angles is calculated and converted into clock phase: at a fixed rotational speed, the phase difference between adjacent angles is calculated to obtain the corresponding clock phase; Each rotation has Each data acquisition session captures the sine and cosine values ​​of V at the corresponding angle. The angle value is then calculated using the formula to obtain the result at a rotational speed of [missing value]. The average value of the difference between adjacent angles at a given rotational speed is the clock phase difference error value; then for the th... Phase error value per clock cycle The following relationship exists:

[0036] in, It is the motor speed. It is the sampling rate.

[0037] The target phase error is calculated using the following formula:

[0038] in, This represents the accumulated value of the target phase. The number of data collections per revolution. This represents the target phase error at a fixed rotational speed.

[0039] The target phase error value is not a constant. It is calculated using a formula and stored in a buffer. The target phase error value is then processed at a sampling rate... The phase error is calculated and stored in a phase array for each clock cycle. For each clock cycle's phase error value, the first value in the array is removed, and then the new phase error value for the current cycle is added. A fixed number of values ​​are stored using a First-In-First-Out (FIFO) method, and the array is continuously updated. To ensure the phase array has a fixed length, if... If so, the phase array will increase by 1 value. If the phase array is empty, then one value is deleted; calculate the clock phase difference using the following formula:

[0040] in, Indicates the motor speed; This indicates the sampling rate.

[0041] Calculate the following formula: Angle corresponding to each clock cycle :

[0042] The sampling rate of the ADC is based on the pulse count corresponding to one revolution of the resolver. The minimum sampling interval of the ADC is obtained based on the highest sampling rate. The number of sampling points is multiplied by the highest ADC rate to calculate the minimum sampling interval. Multiplying the minimum sampling interval by 2 or 3 satisfies the phase angle sampling requirement, that is, the minimum sampling interval must satisfy the following relationship:

[0043]

[0044] in, Indicates the minimum sampling interval; Indicates the number of sampling points; Indicates the maximum ADC rate; Indicates the time it takes for the rotor to complete one revolution; This indicates the minimum rotation period of the shaft.

[0045] S206: The target rotor angle, obtained by compensating for the first rotor angle based on the target phase error, is input to the motor controller to control the motor operation; refer to Figure 4 , Figure 4 A schematic diagram of angle delay compensation is shown.

[0046] Specifically, the target rotor angle is calculated according to the following formula:

[0047] in, Indicates the angle compensation value; Indicates an estimate; This indicates the delay time. To accurately determine the rotor position of the sampled phase current, it is necessary to compensate for the total delay time between the time the resolver feedback signal is sampled and the time the phase current is sampled. .

[0048] Delay time The components may include:

[0049] Total delay time This may include: hardware loop delay time Resolver signal sampling conversion time Resolver signal integration delay and waiting time for current sampling to complete Hardware loop delay time The time required for the signal from the resolver sensor to be processed by the hardware amplification circuit and finally transmitted to the chip (obtained by oscilloscope testing and calibration). This refers to the time required for the ADC module to go from sampling an analog signal to outputting a digital signal (usually provided by the chip manufacturer). It also includes the time to wait for current sampling to complete. for:

[0050] Among them, a timestamp is added at the moment when the resolver feedback signal sampling is completed. A timestamp is applied at the moment the phase current sampling is completed. .

[0051] It should be noted that during the resolver angle calculation process in the new energy vehicle environment, various factors (such as interference during signal transmission and non-ideal characteristics of hardware circuits) can lead to phase errors. This error is not a fixed value; it changes with time and system state. By calculating, storing, and updating the target phase error value in step S205, these changing phase errors can be continuously tracked and compensated for according to the angle calculation in step S206, thereby reducing the impact of phase errors on the final angle calculation result and improving the accuracy of the angle calculation. Furthermore, the phase difference between adjacent angles changes when the motor operates at different speeds. In step S205, a fixed number of phase error values ​​are stored using a FIFO, and the length of the phase array is dynamically adjusted according to the relationship between the sampling rate f and the motor speed N. This maintains the stability and effectiveness of the phase array. If the phase array is too long, it may contain some outdated error values ​​that are not relevant to the current angle calculation; if the phase array is too short, it may not accurately reflect the changing trend of the phase error. By dynamically adjusting the length of the phase array, it can be ensured that it always contains the latest and valid phase error information, thereby providing reliable error compensation data for angle calculation.

[0052] In this embodiment of the scheme, when motor rotation is detected, a primary zero-crossing signal is determined based on the resolver feedback signal. The resolver feedback signal is then converted using the primary zero-crossing signal as an integration window to obtain a first rotor angle. The first rotor angle is compensated for based on the target phase error to obtain a target rotor angle, which is then input to the motor controller to control motor operation. Thus, by determining the integration window using the primary zero-crossing signal, the anti-interference capability of the resolver feedback signal can be improved, thereby increasing the accuracy of the motor resolver angle calculation and ultimately improving the stability of motor operation. Simultaneously, it avoids vehicle loss of control due to motor instability, contributing to improved vehicle safety performance.

[0053] In this embodiment of the disclosure, determining the primary zero-crossing signal based on the resolver feedback signal includes: calculating the amplitude of the sampled data corresponding to the first zero-crossing point number and the second zero-crossing point number of the resolver feedback signal respectively within one excitation cycle to determine the primary zero-crossing signal.

[0054] In some embodiments, the zero-crossing detection module is a module capable of detecting when a signal waveform crosses a zero-level point (i.e., a point where the signal value changes from positive to negative or from negative to positive). The first zero-crossing number refers to the sequential number of the zero-crossing point among all sampling points when the resolver feedback signal first crosses the zero-level point within a specific time range (e.g., one excitation cycle). The second zero-crossing number refers to the sequential number of the zero-crossing point among all sampling points when the resolver feedback signal crosses the zero-level point for the second time within a specific time range (e.g., one excitation cycle).

[0055] In some embodiments, the excitation cycle is the complete cycle time for providing the excitation signal (high-frequency sinusoidal signal) to the resolver. Its core function is to provide a stable electromagnetic coupling basis for the resolver, ensuring accurate measurement of rotor position and speed.

[0056] Thus, by detecting the zero-crossing index in the resolver feedback signal, the stability of its phase characteristics can be utilized to effectively avoid misjudgments caused by abnormal signal amplitude, thereby improving the reliability and anti-interference capability of the resolver feedback signal during angle calculation.

[0057] In this embodiment of the disclosure, the resolver feedback signal is converted using the primary zero-crossing signal as the integration window to obtain the first rotor angle. This includes: reading the resolver feedback signal in an oversampling manner using an analog-to-digital converter, decoding the resolver feedback signal to obtain the first resolver feedback signal and the second resolver feedback signal; and performing quadrature demodulation of the first resolver feedback signal and the second resolver feedback signal using the primary zero-crossing signal as the integration window to obtain the first rotor angle.

[0058] In some embodiments, the resolver feedback signal is read in an oversampling manner via an analog-to-digital converter; exemplarily, the analog-to-digital sensor may be a Sigma-Delta analog-to-digital converter. It should be noted that the above is merely illustrative and is not intended to limit the scope to all possible types of analog-to-digital converters; it is simply not an exhaustive list.

[0059] In some embodiments, the first resolver feedback signal (Sin) is a non-zero signal carrying effective information of the excitation wave; the second resolver feedback signal (Cos) is a near-zero phase interference suppression signal.

[0060] Table 1 shows a comparison of angle accuracy data before and after the introduction of the main zero-crossing processing when the motor speed is 10000 r / min.

[0061] Table 1 In some embodiments, the quadrature demodulation employs a non-synchronous triggering method to convert the first resolver feedback signal and the second resolver feedback signal into a first rotor angle. Combined with an integral-derivative (Sigma-Delta) ADC, a high-frequency digital demodulation, and angle tracking architecture, this architecture fully leverages the performance advantages of a fast ADC, enabling oversampling of the high-frequency feedback signal in a very short time, ensuring the progress and real-time performance of the feedback signal sampling. In scenarios with extremely high real-time requirements for signal processing, such as high-speed motor operation, this architecture can respond quickly, demodulating and processing the acquired signals promptly, ensuring that angle calculations keep pace with the high-speed changes of the motor.

[0062] This reduces the angle calculation deviation caused by demodulation errors, making the angle calculation results closer to the true value, and providing reliable data support for the precise control of motor torque in new energy vehicles.

[0063] In this embodiment of the present disclosure, the motor resolver angle error compensation method further includes: when the gain ratio of the first resolver feedback signal and the second resolver feedback signal is inconsistent, calculating the error value between the first resolver feedback signal and the second resolver feedback signal, so as to correct the gain ratio according to the error value.

[0064] In some embodiments, when the first resolver feedback signal acquired by the ADC is detected... Second rotary transformer feedback signal Since the gain ratios are inconsistent, the error value between the first resolver feedback signal and the second resolver feedback signal is calculated, and the gain ratio is corrected based on the error value; the calculation is performed according to the following formula:

[0065]

[0066] in, , They are respectively and The sine and cosine values, and These are the calculated values ​​after filtering; and The sine and cosine values ​​are the output of the ADC, and the gain ratio is the ratio of the gain of the first resolver feedback signal to the gain of the second resolver feedback signal (sine and cosine). To reduce algorithm complexity, while adding an ADC, the gain of one signal also needs to be reduced or the signal gain increased in the hardware circuit.

[0067] Thus, by calculating the error between the first and second resolver feedback signals in real time and correcting the gain ratio when the gain ratio of the first and second resolver feedback signals is detected to be inconsistent, the accuracy and stability of angle calculation can be improved, and error accumulation caused by gain imbalance can be avoided.

[0068] In this embodiment of the disclosure, the target phase error is obtained as follows: when the motor rotation is detected, a target phase accumulation value is generated; the target phase error is calculated based on the target phase accumulation value and the rotation frequency of the motor.

[0069] In some embodiments, the rotational frequency of the motor refers to the number of complete rotations completed by the motor rotor per unit time.

[0070] Thus, by dynamically generating the target phase accumulation value when the motor rotation is detected, and accurately calculating the target phase error in combination with the real-time rotation frequency of the motor, the phase compensation process can be strictly synchronized with the actual speed of the motor, effectively eliminating the phase tracking delay caused by sudden speed changes or dynamic loads, thereby improving the dynamic response accuracy and anti-interference capability of the resolver angle calculation, and ensuring that the motor control algorithm achieves stable and high-precision position closed-loop control across the entire speed range.

[0071] In this embodiment of the present disclosure, when the rotation of the motor is detected, a target phase accumulation value is generated, including: initializing the original phase accumulation value to obtain a first compensation coefficient and a second compensation coefficient; wherein the original phase accumulation value is generated at the initial moment of the motor rotation; and obtaining the target phase accumulation value based on the first compensation coefficient and the second compensation coefficient; wherein the target phase accumulation value is dynamically adjusted according to the rotation frequency of the motor.

[0072] Specifically, if the rotation frequency increases, the update frequency of the phase accumulation value increases; if the rotation frequency decreases, the update frequency decreases. In the motor resolver angle error compensation method of this application, the update frequency of the phase accumulation value needs to be dynamically adapted to the motor rotation frequency. This is because the motor rotation frequency directly determines the degree of change in the phase difference between adjacent rotor angles (the higher the rotation frequency, the more drastic the change in phase difference; conversely, the lower the frequency, the smoother the change).

[0073] In some embodiments, the original phase accumulation value refers to the reference phase value generated based on the preset parameters or initial measurement values ​​of the motor at the initial moment of motor rotation (such as the start-up or reset phase).

[0074] In this way, by initializing the compensation coefficient with the original phase accumulation value and dynamically adjusting the target phase accumulation value in combination with the real-time speed, the initial deviation can be eliminated and the speed change can be responded to quickly. At the same time, the error accumulation is suppressed by adaptive compensation, thereby improving the angle calculation accuracy and system stability, and ensuring the stable operation of the motor under complex working conditions.

[0075] Table 2 shows a comparison of data before and after motor resolver angle error compensation.

[0076] Table 2 In this embodiment of the present disclosure, the motor resolver angle error compensation method further includes: acquiring the target rotor angle; detecting the target rotor angle based on the motor's observer, and executing a first processing strategy or a second processing strategy according to the detection result; wherein, the first processing strategy is to input the target rotor angle to the motor's controller to execute a vector control algorithm to control the motor operation; the second processing strategy is to switch to a standby mode and acquire fault data; the fault data is used to determine the resolver fault type and fault handling strategy to control the motor to execute the fault handling strategy.

[0077] In some embodiments, if N (calibrated) consecutive P-wave cycles do not exceed a preset threshold, the motor resolver is normal, and a first processing strategy is executed. This first processing strategy may include: inputting the target rotor angle and speed value ω into the motor controller; and executing a vector control algorithm based on the target rotor angle and speed value ω to control the motor operation.

[0078] In some embodiments, if N (calibrated) consecutive P-wave cycles exceed a preset threshold, the motor resolver is abnormal, and a second processing strategy is executed. This second processing strategy may include: switching to a standby mode; acquiring fault data and determining the resolver fault type based on the fault data; executing a fault handling strategy based on the resolver fault type; and storing the fault data for subsequent fault analysis.

[0079] Figure 5 This is a schematic flowchart of a motor resolver fault handling method according to an embodiment of the present disclosure, as shown below. Figure 5 As shown, the process includes at least the following steps: S501: Obtain the target rotor angle; S502: Detect the target rotor angle and obtain the detection result; Is the detection result normal? If yes, proceed to S503; if no, proceed to S504; Specifically, if N (calibrated) consecutive P-wave cycles exceed the preset threshold, the motor resolver is abnormal; if N (calibrated) consecutive P-wave cycles do not exceed the preset threshold, the motor resolver is normal. S503: First processing strategy; specifically, the first processing strategy is to input the target rotor angle and speed value ω to the motor controller to execute a vector control algorithm to control the motor operation; wherein, the speed value ω can be obtained by methods such as the sliding mode observer method.

[0080] S504: Second processing strategy; specifically, the second processing strategy is to switch to standby mode and acquire fault data; here, the standby mode may include sliding mode control and extended Kalman filtering; S504a: Determine the resolver fault type based on the fault data; here, the resolver fault type may include: open circuit, short circuit, amplitude exceeding threshold, signal quality degradation; S504b: Control the motor to execute a fault handling strategy according to the resolver fault type; wherein, the fault handling strategy may include: requesting shutdown, redundancy switching; S504c: Stores fault data for subsequent fault analysis.

[0081] In some embodiments, when the detection result indicates an abnormal motor resolver, after switching to standby mode, historical angle data and historical operating data of the motor are acquired; prediction is made based on the historical angle data and historical operating data to obtain the predicted rotor angle; the predicted rotor angle and speed value are input to the motor controller to maintain normal motor operation.

[0082] Thus, by setting a comparison rule between N consecutive P-wave cycles and a preset threshold to determine the motor resolver state, the accuracy of fault detection can be improved through quantitative detection. Simultaneously, it provides reliable data support for subsequent different control strategies.

[0083] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0084] This application also provides a computer device, such as... Figure 6 As shown, it illustrates a structural schematic diagram of the computer device involved in the embodiments of this application, specifically: The computer device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that... Figure 6 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 601 is the control center of the computer device, connecting various parts of the computer device through various interfaces and lines. It performs various functions and processes data by running or executing computer programs and / or modules stored in the memory 602, and by calling data stored in the memory 602. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.

[0085] The memory 602 can be used to store computer programs and modules. The processor 601 executes various functional applications and vehicle control by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as motor resolver angle error compensation function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory computer device to provide the processor 601 with access to the memory 602.

[0086] The computer device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0087] The computer device may also include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0088] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the computer device loads the executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 runs the computer programs stored in the memory 602 to realize various functions, such as: When motor rotation is detected, the main zero-crossing signal is determined based on the resolver feedback signal, and the resolver feedback signal is converted using the main zero-crossing signal as the integration window to obtain the first rotor angle; The target rotor angle is obtained by compensating the first rotor angle based on the target phase error, and then input to the motor controller to control the motor operation.

[0089] Therefore, the computer device provided in this application embodiment, by determining the integration window through the main zero-crossing signal, can improve the anti-interference capability of the resolver feedback signal, thereby improving the accuracy of the motor resolver angle calculation and thus improving the stability of motor operation. Simultaneously, it avoids vehicle loss of control due to motor instability, contributing to improved vehicle safety performance.

[0090] For details on the specific implementation methods and corresponding beneficial effects of each of the above operations, please refer to the detailed description of the motor resolver angle error compensation method above, which will not be repeated here.

[0091] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a storage medium and loaded and executed by a processor.

[0092] Therefore, embodiments of this application provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the motor resolver angle error compensation methods provided in embodiments of this application. For example, the computer program can execute the following steps: When motor rotation is detected, the main zero-crossing signal is determined based on the resolver feedback signal, and the resolver feedback signal is converted using the main zero-crossing signal as the integration window to obtain the first rotor angle; The target rotor angle is obtained by compensating the first rotor angle based on the target phase error, and then input to the motor controller to control the motor operation.

[0093] Therefore, the storage medium provided in this application embodiment, by determining the integration window through the primary zero-crossing signal, can improve the anti-interference capability of the resolver feedback signal, thereby improving the accuracy of the motor resolver angle calculation and thus enhancing the stability of motor operation. Simultaneously, it avoids vehicle loss of control due to motor instability, contributing to improved vehicle safety performance.

[0094] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the previous embodiments, which will not be repeated here.

[0095] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0096] Since the computer program stored in the storage medium can execute the steps in any of the motor resolver angle error compensation methods provided in the embodiments of this application, the beneficial effects that any of the motor resolver angle error compensation methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0097] This application also provides a vehicle that includes the aforementioned computer equipment.

[0098] This application does not limit the specific structure of the vehicle. The specific implementation methods and corresponding beneficial effects of the various operations of the computer equipment described above are also applicable to this vehicle. For details, please refer to the detailed description of the motor resolver angle error compensation method above, which will not be repeated here.

[0099] The foregoing has provided a detailed description of a motor resolver angle error compensation method, computer equipment, storage medium, and vehicle provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for compensating for motor resolver angle error, characterized in that, The method includes: When motor rotation is detected, the main zero-crossing signal is determined based on the resolver feedback signal, and the resolver feedback signal is converted using the main zero-crossing signal as an integration window to obtain the first rotor angle; The target rotor angle is obtained by compensating the first rotor angle based on the target phase error, and then input to the controller of the motor to control the operation of the motor.

2. The method according to claim 1, characterized in that, The step of determining the primary zero-crossing signal based on the resolver feedback signal includes: Within one excitation cycle, the amplitude of the sampled data corresponding to the first and second zero-crossing points of the resolver feedback signal is calculated to determine the main zero-crossing signal.

3. The method according to claim 2, characterized in that, The step of converting the resolver feedback signal using the main zero-crossing signal as an integration window to obtain the first rotor angle includes: After reading the resolver feedback signal in an oversampling manner using an analog-to-digital converter, the resolver feedback signal is decoded to obtain the first resolver feedback signal and the second resolver feedback signal. Using the primary zero-crossing signal as the integration window, the first resolver feedback signal and the second resolver feedback signal are orthogonally demodulated to obtain the first rotor angle.

4. The method according to claim 3, characterized in that, The method further includes: When the gain ratios of the first resolver feedback signal and the second resolver feedback signal are inconsistent, the error value between the first resolver feedback signal and the second resolver feedback signal is calculated, and the gain ratio is corrected based on the error value.

5. The method according to claim 1, characterized in that, The target phase error is obtained in the following way: Upon detecting motor rotation, a target phase accumulation value is generated; The target phase error is calculated based on the accumulated target phase value and the rotation frequency of the motor.

6. The method according to claim 5, characterized in that, The step of generating a target phase accumulation value when motor rotation is detected includes: The original phase accumulation value is initialized to obtain the first compensation coefficient and the second compensation coefficient; wherein, the original phase accumulation value is generated at the initial moment of the motor rotation; The target phase accumulation value is obtained based on the first compensation coefficient and the second compensation coefficient; wherein the target phase accumulation value is dynamically adjusted according to the rotation frequency of the motor.

7. The method according to claim 1, characterized in that, The method further includes: Obtain the target rotor angle; The target rotor angle is detected by the observer of the motor, and a first processing strategy or a second processing strategy is executed according to the detection result. The first processing strategy involves inputting the target rotor angle to the motor controller to execute a vector control algorithm to control the motor operation; the second processing strategy involves switching to a standby mode and acquiring fault data; the fault data is used to determine the resolver fault type and fault handling strategy to control the motor to execute the fault handling strategy.

8. A computer device, characterized in that, It includes one or more processors and a memory, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the motor resolver angle error compensation method according to any one of claims 1 to 7.

9. A storage medium, characterized in that, Includes a computer program, which, when run on a computer device, causes the computer device to perform the steps of the motor resolver angle error compensation method according to any one of claims 1 to 7.

10. A vehicle, characterized in that, The vehicle includes the computer equipment as described in claim 8.