Motor rotary transformer zero deflection angle self-learning method, system and equipment and storage medium
By utilizing back EMF and a phase-locked loop structure while the motor is suspended, the zero-position deflection angle calibration of the motor resolver is completed automatically, solving the problem of low efficiency in manual calibration in existing technologies and achieving high-precision and convenient zero-position deflection angle calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-07
AI Technical Summary
The existing motor resolver zero-position offset calibration process relies on manual intervention, which is inefficient and difficult to guarantee accuracy, and cannot meet the needs of end users for convenient operation.
By rotating the motor in a suspended state, the back EMF is used as a high signal-to-noise ratio position signal source. Combined with the zero-current control target and the phase-locked loop structure, automated decoupling calculation and iterative calibration are achieved, and high-precision zero-position deviation angle calibration is automatically completed.
It achieves high-precision automated calibration, improves the portability and convenience of the user terminal, reduces maintenance costs and time, and adapts to on-site operation by end users.
Smart Images

Figure CN121813952A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of motor control, and more specifically, to a self-learning method, system, device, and storage medium for the zero-position deflection angle of a motor resolver. Background Technology
[0002] With the development of new energy travel, electric motorcycles have become a mainstream mode of transportation due to their performance advantages. The high-performance control of their core power unit, the permanent magnet synchronous motor, relies entirely on the precise sensing of the rotor position. This information is usually provided by a resolver, but due to mechanical installation tolerances, there is a fixed deviation angle between the resolver's own electrical zero position and the theoretical coordinate axis of the motor stator, namely the resolver zero-position deflection angle.
[0003] Accurate calibration of the resolver's zero-position deflection angle is a fundamental prerequisite for ensuring motor control performance and safety. However, calibrating this zero-position deflection angle currently faces challenges at both the factory and user ends. In the factory production line, traditional methods often rely on operators manually tapping and adjusting the resolver position while observing the drive waveform, resulting in low efficiency and difficulty in guaranteeing accuracy. At the user end, when motor replacement is required, the vehicle often must be returned to the factory or sent to a specialized repair shop for recalibration using specialized equipment, leading to a cumbersome and costly process.
[0004] In summary, existing calibration processes not only rely on manual intervention and have low automation levels, but also have stringent requirements for the calibration environment, failing to meet the needs of end-users for convenient on-site operation. This restricts the improvement of production efficiency and user experience. Therefore, there is an urgent need for a new method that can efficiently and conveniently complete the self-learning of the zero-position deflection angle of motor resolvers. Summary of the Invention
[0005] The purpose of this application is to provide a method, system, device and storage medium for self-learning the zero-position deflection angle of a motor resolver, which can efficiently and conveniently complete the self-learning of the zero-position deflection angle of a motor resolver.
[0006] This application is implemented as follows: In a first aspect, this application provides a self-learning method for the zero-position deflection angle of a motor resolver, applied to an electronic control unit. The method includes the following steps: acquiring an initial control dataset, which includes an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment; driving a suspended motor to rotate to a stable speed using an open-loop control method based on the initial control dataset; during the stable rotation of the motor, acquiring the motor's voltage and current signals in real time, and processing them into voltage and current components in a rotating coordinate system through coordinate transformation; using zero as the current control target for the direct and quadrature axes, decoupling the voltage and current components in the rotating coordinate system according to the motor voltage equation to obtain the corresponding back EMF estimation value; calculating the real-time electrical angular velocity of the motor based on the back EMF estimation value, and constructing a phase error signal; inputting the phase error signal into a phase-locked loop to iteratively update the internal angle estimation value based on the phase error signal and the real-time electrical angular velocity, until the angle estimation value converges to a stable zero-position deflection angle calibration value.
[0007] Secondly, this application provides a self-learning system for the zero-position deflection angle of a motor resolver, integrated into an electronic control unit. The system includes: a parameter acquisition module configured to acquire an initial control dataset, the initial control dataset including an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment; a motor drive module configured to drive a suspended motor to rotate to a stable speed using open-loop control based on the initial control dataset; and a signal conversion module configured to collect the motor's voltage and current signals in real time during stable motor rotation and process them into an electrical signal in a rotating coordinate system. The system comprises two calculation modules: a first calculation module, configured to: use zero as the current control target on the direct and quadrature axes, and decouple the voltage and current components in the rotating coordinate system according to the motor voltage equation to obtain the corresponding back EMF estimate; a second calculation module, configured to: calculate the real-time electrical angular velocity of the motor based on the back EMF estimate and construct a phase error signal; and a zero-position estimation module, configured to: input the phase error signal into the phase-locked loop to iteratively update the internal angle estimate based on the phase error signal and the real-time electrical angular velocity until the angle estimate converges to a stable zero-position deflection angle calibration value.
[0008] Thirdly, this application provides an electronic device including a memory for storing one or more programs; a processor; and, when the one or more programs are executed by the processor, implementing the method as described in any one of the first aspects above.
[0009] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as described in any one of the first aspects above.
[0010] Fifthly, this application provides a computer program product including computer program instructions that, when executed by a processor, implement the method as described in any one of the first aspects above.
[0011] Compared with the prior art, this application has at least the following advantages or beneficial effects: This application achieves high-precision automated calibration, completely replacing the inefficient, experience-dependent manual tapping method, ensuring accuracy and consistency. Furthermore, it significantly improves user portability; when replacing the motor, users only need to ensure the wheels are off the ground and trigger self-learning through simple interaction, eliminating the need for factory returns or specialized equipment, thus drastically reducing maintenance costs and time.
[0012] Specifically, by running the motor to a stable speed in a suspended state and utilizing the back EMF generated during its rotation as a natural high signal-to-noise ratio position signal source, it sets virtual control targets of zero direct-axis and quadrature-axis currents and decouples the transformed electrical quantities based on the motor voltage equation. This utilizes the zero-current condition, theoretically eliminating the coupling terms in the voltage equation related to the motor inductance parameters. This simplifies the complex motor model into an observer model directly related only to the back EMF (i.e., rotor position and speed), significantly reducing sensitivity to motor inductance parameters and providing a clean input signal for subsequent accurate tracking.
[0013] Meanwhile, this application introduces a phase-locked loop (PLL) structure and converts the back EMF estimate into a phase error, which is then used to iteratively update the internal angle estimate in conjunction with the real-time electrical angular velocity until convergence. The PLL acts as a high-gain narrowband tracking filter, effectively suppressing measurement noise and dynamically correcting the estimate through closed-loop feedback. The "combination with real-time electrical angular velocity" allows the algorithm's convergence speed to adapt to the actual motor speed, ensuring both speed and stability. Attached Figure Description
[0014] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart of an embodiment of a self-learning method for zero-position deflection angle of a motor resolver according to this application; Figure 2 This application provides a flowchart detailing the steps for calculating the real-time electrical angular velocity of the motor based on the back EMF estimate and constructing the phase error signal. Figure 3 This is a structural block diagram of an embodiment of a motor resolver zero-position deflection angle self-learning system according to this application; Figure 4 This is a structural block diagram of an electronic device provided in an embodiment of this application.
[0016] Icons: 101, Parameter acquisition module; 102, Motor drive module; 103, Signal conversion module; 104, First calculation module; 105, Second calculation module; 106, Zero position estimation module; 201, Processor; 202, Memory; 203, Communication interface. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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. It should be understood that this application is not limited to the exemplary embodiments described herein.
[0018] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0019] Application Overview For electric motorcycles, the high-performance control of their permanent magnet synchronous motors relies entirely on the precise sensing of the rotor position. This information is typically provided by a resolver, but due to mechanical installation tolerances, there is a fixed deviation angle between the resolver's electrical zero point and the theoretical coordinate axis of the motor stator—this is known as the resolver zero-point deflection angle. Accurately calibrating this deflection angle is a prerequisite for ensuring stable motor operation, precise torque and power output, and preventing safety risks such as runaway motoring. This zero-point learning is mandatory whether the motor is off the production line or being replaced by a user.
[0020] However, in the process of developing this application, the inventors discovered that the current methods, which rely on manual hammering at the factory and require users to return the motor for calibration, have a fundamental flaw: the calibration process heavily depends on external intervention and specific environments, failing to achieve autonomous, closed-loop learning of the motor in its final application state. This leads to two core pain points: low production efficiency and high user maintenance costs.
[0021] To address the aforementioned technical issues, this application provides a self-learning method for the zero-position deflection angle of a motor resolver. By allowing the motor to rotate in a suspended state, the back electromotive force (EMF) generated during its operation is utilized as a natural high signal-to-noise ratio position signal source. Subsequently, by setting a zero-current control target and decoupling the back EMF based on the motor voltage equation, a phase-locked loop (PLL) is used to perform closed-loop tracking and iteration of the back EMF signal. Finally, the resolver's zero-position deflection angle is automatically and accurately calibrated while the motor is running in a suspended state. This makes the calibration process not only simple and efficient but also allows for calibration at the user end using the electronic control unit (ECU) (the motor's controller unit), eliminating the need for factory returns or professional repair shops, perfectly meeting the needs of end-users for convenient on-site operation.
[0022] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings. Unless otherwise specified, the various embodiments and features described below can be combined with each other.
[0023] Exemplary methods Please see Figure 1 This self-learning method for the zero-position deflection angle of a motor resolver, applied to an electronic control unit, includes the following steps: Step S101: Obtain the initial control dataset, which includes the initial virtual angle, non-zero direct-axis current command, zero quadrature-axis current command, and frequency increment.
[0024] In step S101 above, when obtaining the initial control dataset, the basic motor parameters input by the user can be obtained through interfaces such as mini-programs. Among them, the "initial virtual angle" provides an initial phase reference for coordinate transformation; the "non-zero direct-axis current command" is used to generate a fixed direct-axis magnetic field, whose main function is to generate a clear directional magnetic pull on the rotor in the early stage of startup, helping the motor to start smoothly and overcome static friction, rather than for acceleration; the "zero quadrature-axis current command" ensures that no torque is actively output during the startup process, maintaining stability; and the "frequency increment" determines the frequency ramp-up rate of the open-loop drive signal, indirectly controlling the acceleration process of the motor.
[0025] In other words, by acquiring an initial control dataset including the initial virtual angle, non-zero direct-axis current command, zero quadrature-axis current command, and frequency increment, raw data support can be provided for subsequent open-loop motor control. It should be noted that using direct-axis current instead of quadrature-axis current for starting avoids the risk of severe jitter or loss of control due to improper torque commands when the zero position is unknown. Parameterized settings allow the algorithm to adapt to different motor models, improving its versatility.
[0026] Step S102: Based on the initial control dataset, drive the suspended motor to rotate to a stable speed using open-loop control.
[0027] In step S102 above, the motor in the "suspended" special condition is driven in an open-loop control mode based on the initial control dataset. Position feedback is ignored (because the zero position is unknown and the feedback is unreliable). The motor is driven by generating three-phase voltage commands through coordinate inverse transformation based only on the preset virtual angle and frequency increment. This causes the motor speed to rise smoothly and eventually stabilize in a preset medium speed range (usually below the base speed).
[0028] It's important to note that "suspended" eliminates load torque interference, making the motor's dynamic characteristics closer to the ideal model; "stable speed" ensures that the motor's back EMF has a stable and sufficiently large amplitude, providing a key signal source with a high signal-to-noise ratio for subsequent steps. Here, a suspended motor refers to a motor whose output shaft (i.e., the transmission part connected to the wheels, gears, or load) is in a free-rotating state completely detached from any external mechanical load. Specifically, for situations like electric motorcycles where the load cannot be completely removed, this means lifting the drive wheels completely off the ground, allowing them to spin freely. On a factory test bench, this means the motor shaft is not connected to any dynamometer or load simulator, and is in an unloaded state.
[0029] Step S103: During the stable rotation of the motor, the voltage and current signals of the motor are collected in real time and processed into voltage and current components in a rotating coordinate system through coordinate transformation.
[0030] After the motor stabilizes at the target speed, step S103 synchronously acquires the three-phase stator current and voltage of the motor (which can be obtained by reconstructing the bus voltage and PWM duty cycle). Subsequently, the current and voltage in the three-phase stationary coordinate system can be converted into components in the two-phase stationary coordinate system (α-β) using Clark transformation. Then, using Park transformation and the virtual angle currently used for control, they are further transformed into the dq coordinate system that rotates synchronously with the rotor magnetic field to obtain the direct-axis / quadrature-axis voltage components. , ) and current component ( , ).
[0031] Step S104: Using zero as the current control target for the direct axis and quadrature axis, decouple the voltage and current components in the rotating coordinate system according to the motor voltage equation to obtain the corresponding back EMF estimate.
[0032] In step S104 above, although the current component ( , The back EMF term may not be zero, but the voltage will be adjusted to track the zero command. Thus, in the motor voltage equation, the back EMF term and the current coupling term coexist. By setting the current command to zero and compensating for it using current feedback in the calculation, approximate decoupling of the back EMF term and the inductive coupling term can be achieved algorithmically. When the current is well controlled, the estimated... (Estimated d-axis back electromotive force) and The (q-axis back EMF estimate) will primarily contain back EMF information. Therefore, even with some errors in the motor parameters, a fairly accurate back EMF estimate can be obtained because it bypasses the strong dependence on the accuracy of the motor inductance parameters. This greatly enhances the robustness and universality of the algorithm, which is key to its applicability to different batches and models of motors.
[0033] Step S105: Calculate the real-time electric angular velocity of the motor based on the back EMF estimate, and construct a phase error signal.
[0034] Step S106: Input the phase error signal into the phase-locked loop to iteratively update the internal angle estimate based on the phase error signal and the real-time electrical angular velocity until the angle estimate converges to a stable zero-position deflection calibration value.
[0035] By using the phase error signal generated in step S105 Input a digital phase-locked loop (PLL). This allows the calculation of a correction value based on the phase error signal and its integral. This correction value can then be used to multiply the real-time electrical angular velocity (for example, the absolute value of the correction value and the real-time electrical angular velocity can be multiplied), enabling the convergence speed to adapt to the motor speed. Thus, the phase error signal drives the updating of the angle estimate, which in turn changes the angle used in the Park transformation in step S103 (through feedback), thereby changing the angle calculated in the next step. and until As the angle approaches zero, the estimated angle stops changing, and this estimated angle is the final zero-position deflection angle calibration value.
[0036] It should be noted that in step S106 above, the phase-locked loop (PLL) acts as a high-performance state observer. It not only accurately tracks and locks the fixed deflection angle hidden in the dynamic signal, but its closed-loop characteristics also endow the algorithm with strong anti-interference capabilities, filtering out high-frequency noise in the signal. Ultimately, a stable and reliable digital calibration value can be output, which can be automatically stored in non-volatile memory by the electronic control unit for use in all subsequent vector control cycles, thus solving the zero-position inaccuracy problem once and for all.
[0037] In summary, the main purpose of this application is to enable the motor to run to a stable speed in a suspended state, and to use the back electromotive force generated during its rotation as a natural high signal-to-noise ratio position signal source, and to automatically complete the zero-position calibration through a closed-loop algorithm.
[0038] This approach involves setting virtual control targets for zero direct-axis and quadrature-axis currents and decoupling the calculations of transformed electrical quantities based on the motor voltage equation. This cleverly utilizes the zero-current condition, theoretically eliminating the coupling terms in the voltage equation related to the motor inductance parameters. This simplifies the complex motor model into an observer model directly related only to the back EMF (i.e., rotor position and speed), significantly reducing sensitivity to motor inductance parameters and providing a clean input signal for subsequent accurate tracking.
[0039] Simultaneously, this application introduces a phase-locked loop (PLL) structure and converts the back EMF estimate into a phase error, which is then used to iteratively update the internal angle estimate in conjunction with the real-time electrical angular velocity until convergence. The PLL acts as a high-gain narrowband tracking filter, effectively suppressing measurement noise and dynamically correcting the estimate through closed-loop feedback. The "combination with real-time electrical angular velocity" allows the algorithm's convergence speed to adapt to the actual motor speed, ensuring both speed and stability. The entire process can be automatically executed by the electronic control unit's software algorithm, forming a complete closed loop from "driving" to "observation" to "correction," without any external intervention.
[0040] In summary, this application achieves high-precision automated calibration through the aforementioned processing, completely replacing the inefficient, experience-dependent manual tapping method, thus ensuring accuracy and consistency. Furthermore, it significantly improves user portability; when replacing the motor, users only need to ensure the wheels are suspended and trigger self-learning through simple interaction, eliminating the need for factory returns or specialized equipment, thereby drastically reducing maintenance costs and time.
[0041] Based on the aforementioned scheme, in some implementations of this application, the step of driving the suspended motor to rotate to a stable speed includes: gradually increasing the given frequency of the motor through the frequency increment, so that the motor accelerates to a preset stable speed range below the base speed point.
[0042] In the above implementation method, soft start is achieved by gradually increasing the frequency, avoiding current surges and mechanical vibrations caused by sudden frequency increases, and ensuring a smooth and reliable start-up process. Secondly, the base speed point is usually the turning point between constant torque and constant power operation of the motor. When operating below this point, the amplitude of the motor's back EMF is moderate and controllable, which can provide a sufficiently strong signal for subsequent operation while avoiding voltage saturation or control complexity due to excessive speed. This creates the optimal and safe operating conditions for subsequent accurate calculations based on back EMF.
[0043] Based on the aforementioned scheme, in some implementations of this application, the motor voltage equation includes: .in, The d-axis stator voltage, This is the q-axis stator voltage. For stator resistance, The stator current is the d-axis current. This represents the q-axis stator current. Let be the self-inductance of the stator winding on the d-axis. The self-inductance of the stator winding on the q-axis, Let be the electric angular velocity of the motor rotor. For q-axis magnetic flux, denoted as d-axis magnetic flux.
[0044] In the above implementation, by setting a zero-current control target within the framework of the motor voltage equation and performing mathematical derivation, the back EMF component can be accurately separated from the measurable voltage and current, thereby extracting pure rotor position information.
[0045] For example, the formula for calculating the back potential estimate is as follows:
[0046] in, This refers to the d-axis component of the back EMF signal. This is the q-axis component of the back EMF signal.
[0047] Based on the aforementioned solution, please refer to Figure 2 In some implementations of this application, the steps of calculating the real-time electrical angular velocity of the motor based on the back EMF estimation value and constructing a phase error signal include: Step S201: performing a low-pass filter on the back EMF estimation value to obtain a filtered back EMF signal; Step S202: calculating the composite amplitude of the filtered back EMF signal; Step S203: constructing the phase error signal based on the ratio of the direct-axis component in the filtered back EMF signal to the composite amplitude; Step S204: calculating the real-time electrical angular velocity based on the back EMF estimation value or the composite amplitude.
[0048] The above implementation includes two parallel processing steps: the construction of the phase error signal and the acquisition of the real-time electrical angular velocity. In the construction of the phase error signal (S201-S203), the original back EMF estimate is first low-pass filtered to effectively suppress high-frequency noise introduced by the power device switching, thus improving signal quality. Then, its composite amplitude is calculated. Finally, the normalized phase error signal is obtained by comparing the filtered direct-axis back EMF component with this composite amplitude (exemplarily, it could be...). The theoretical basis of this construction method is that, under an ideal model, this ratio is proportional to the sine of the rotor position estimation error. When the error is small, it is approximately equal to the error itself, and this ratio processing eliminates the dependence of the signal amplitude on the rotational speed. In the real-time electrical angular velocity acquisition process (S204), the electrical angular velocity can be obtained directly from the frequency given in the open loop, or indirectly calculated from the back EMF amplitude (which is proportional to the rotational speed), providing the necessary dynamic parameters for the phase-locked loop.
[0049] For example, when performing a low-pass filter on the back potential estimate, the following calculation formula can be used:
[0050] in, This refers to the quadrature-axis (q-axis) component in the filtered back EMF signal. This refers to the direct-axis (d-axis) component of the filtered back EMF signal. These are preset coefficients.
[0051] The corresponding composite amplitude The formula for calculation is:
[0052] in, This is for processing to calculate the square root.
[0053] Based on the aforementioned scheme, in some implementations of this application, the formula for calculating the phase error signal is as follows: ;in, This is a phase error signal. This refers to the direct-axis (d-axis) component of the filtered back EMF signal. This represents the composite amplitude.
[0054] It should be noted that, ideally, the direct-axis back EMF is proportional to the sine of the rotor position estimation error angle, and the combined amplitude remains essentially constant at stable speeds. Therefore, the ratio of the two directly reflects the magnitude and direction of the angular error, and can be linearly approximated when the error is small. Thus, the above processing decouples the amplitude range of the phase error signal from the actual motor speed (back EMF magnitude). Regardless of whether the motor operates at a higher or lower speed, the phase error signal received by the phase-locked loop is normalized to a similar amplitude level. This ensures that a single set of parameters can adapt to a wide speed range, while guaranteeing consistent convergence speed and steady-state accuracy at different speeds, improving the adaptability and reliability of subsequent calculations.
[0055] Based on the aforementioned scheme, in some implementations of this application, when iteratively updating the internal angle estimate based on the phase error signal and real-time electrical angular velocity, the update is performed according to the following formula:
[0056] in, ; To process the absolute value, For real-time electrical angular velocity, This is the updated angle estimate. The angle estimate before the update. and For regulator parameters, This is the phase error signal from the previous moment.
[0057] Based on the aforementioned scheme, in some implementations of this application, after the angle estimate converges to a stable zero-position offset angle calibration value, the method further includes: converging the angle estimate to a stable zero-position offset angle calibration value and storing the value in a non-volatile memory; when performing vector control on the motor subsequently, adding the original angle detected in real time by the rotary transformer to the zero-position offset angle calibration value to obtain the rotor position angle used to control the motor.
[0058] In the above steps, the stable zero-position offset angle calibration value of the converged output is stored in the non-volatile memory (such as Flash) of the electronic control unit. During subsequent normal operation of all motors, this zero-position offset angle calibration value is added to the original angle detected in real time by the resolver to obtain the accurate rotor position angle for vector control. This not only ensures that the motor operates based on the true rotor position at all times, guaranteeing the accuracy of torque output and system stability, but also completely eliminates the risk of power anomalies or "runaway" due to zero-position errors. Furthermore, it allows users or production lines to benefit permanently after a single self-learning process, offering simple and reliable operation.
[0059] Exemplary System Please see Figure 3This application provides a self-learning system for the zero-position deflection angle of a motor resolver, integrated into an electronic control unit. The system includes: a parameter acquisition module 101, configured to acquire an initial control dataset, which includes an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment; a motor drive module 102, configured to drive a suspended motor to rotate to a stable speed using an open-loop control method based on the initial control dataset; and a signal conversion module 103, configured to collect the motor's voltage and current signals in real time during stable motor rotation and convert them into electrical signals in a rotating coordinate system through coordinate transformation. The voltage and current components are calculated. The first calculation module 104 is configured to: use zero as the current control target on the direct and quadrature axes, and decouple the voltage and current components in the rotating coordinate system according to the motor voltage equation to obtain the corresponding back EMF estimate. The second calculation module 105 is configured to: calculate the real-time electric angular velocity of the motor based on the back EMF estimate and construct a phase error signal. The zero-position estimation module 106 is configured to: input the phase error signal into the phase-locked loop, and iteratively update the internal angle estimate based on the phase error signal and the real-time electric angular velocity until the angle estimate converges to a stable zero-position deflection angle calibration value.
[0060] For the specific implementation process of the above system, please refer to the self-learning method for zero-position deflection angle of motor resolver provided in the "Exemplary Methods" section, which will not be repeated here.
[0061] Based on the aforementioned scheme, in some implementations of this application, the step of driving the suspended motor to rotate to a stable speed includes: gradually increasing the given frequency of the motor through the frequency increment, so that the motor accelerates to a preset stable speed range below the base speed point.
[0062] Based on the aforementioned scheme, in some implementations of this application, the motor voltage equation includes: .in, The d-axis stator voltage, This is the q-axis stator voltage. For stator resistance, The stator current is the d-axis current. This represents the q-axis stator current. Let be the self-inductance of the stator winding on the d-axis. The self-inductance of the stator winding on the q-axis, Let be the electric angular velocity of the motor rotor. For q-axis magnetic flux, denoted as d-axis magnetic flux.
[0063] Based on the aforementioned scheme, in some implementations of this application, the step of calculating the real-time electrical angular velocity of the motor based on the back EMF estimation value and constructing a phase error signal includes: Step S201: performing a low-pass filter on the back EMF estimation value to obtain a filtered back EMF signal; Step S202: calculating the composite amplitude of the filtered back EMF signal; Step S203: constructing the phase error signal based on the ratio of the direct-axis component in the filtered back EMF signal to the composite amplitude; Step S204: calculating the real-time electrical angular velocity based on the back EMF estimation value or the composite amplitude.
[0064] Based on the aforementioned scheme, in some implementations of this application, the formula for calculating the phase error signal is as follows: ;in, This is a phase error signal. This represents the direct-axis component of the filtered back EMF signal. This represents the composite amplitude.
[0065] Based on the aforementioned scheme, in some implementations of this application, when iteratively updating the internal angle estimate based on the phase error signal and real-time electrical angular velocity, the update is performed according to the following formula:
[0066] in, ; To process the absolute value, For real-time electrical angular velocity, This is the updated angle estimate. The angle estimate before the update. and For regulator parameters, This is the phase error signal from the previous moment.
[0067] Based on the aforementioned scheme, in some implementations of this application, after the angle estimate converges to a stable zero-position offset angle calibration value, the method further includes: converging the angle estimate to a stable zero-position offset angle calibration value and storing the value in a non-volatile memory; when performing vector control on the motor subsequently, adding the original angle detected in real time by the rotary transformer to the zero-position offset angle calibration value to obtain the rotor position angle used to control the motor.
[0068] Exemplary electronic devices Please see Figure 4This application provides an electronic device including at least one processor 201 and at least one memory 202. The processor 201 and memory 202 are directly connected to each other, or communicate with each other through a communication interface 203, or are electrically connected through one or more communication buses or signal lines to achieve data transmission or interaction. The memory 202 stores program instructions executable by the processor 201. The processor 201 can call and execute the program instructions to implement a self-learning method for the zero-position deflection angle of a motor resolver according to various embodiments of this application, as described in the "Exemplary Methods" section above. For example, implementing: An initial control dataset is acquired, comprising an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment. Based on the initial control dataset, the suspended motor is driven to rotate to a stable speed using open-loop control. During the stable rotation of the motor, the motor's voltage and current signals are acquired in real time and processed into voltage and current components in a rotating coordinate system through coordinate transformation. Using zero as the current control target for the direct and quadrature axes, the voltage and current components in the rotating coordinate system are decoupled and calculated according to the motor voltage equation to obtain the corresponding back EMF estimation value. Based on the back EMF estimation value, the real-time electrical angular velocity of the motor is calculated, and a phase error signal is constructed. The phase error signal is input into a phase-locked loop (PLL) to iteratively update the internal angle estimation value based on the phase error signal and the real-time electrical angular velocity until the angle estimation value converges to a stable zero-position offset angle calibration value.
[0069] The memory 202 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0070] The processor 201 can be an integrated circuit chip with signal processing capabilities. The processor 201 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0071] Understandable. Figure 4 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 4 The more or fewer components shown, or having the same Figure 4 The different configurations shown. Figure 4 The components shown can be implemented using hardware, software, or a combination thereof.
[0072] Exemplary computer-readable storage media and computer program products This application provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor 201, the computer program implements a self-learning method for the zero-position deflection angle of a motor resolver according to various embodiments of this application as described in the "Exemplary Methods" section above. For example, it implements: An initial control dataset is acquired, comprising an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment. Based on the initial control dataset, the suspended motor is driven to rotate to a stable speed using open-loop control. During the stable rotation of the motor, the motor's voltage and current signals are acquired in real time and processed into voltage and current components in a rotating coordinate system through coordinate transformation. Using zero as the current control target for the direct and quadrature axes, the voltage and current components in the rotating coordinate system are decoupled and calculated according to the motor voltage equation to obtain the corresponding back EMF estimation value. Based on the back EMF estimation value, the real-time electrical angular velocity of the motor is calculated, and a phase error signal is constructed. The phase error signal is input into a phase-locked loop (PLL) to iteratively update the internal angle estimation value based on the phase error signal and the real-time electrical angular velocity until the angle estimation value converges to a stable zero-position offset angle calibration value.
[0073] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0074] Furthermore, embodiments of this application can also be computer program products, including computer program instructions that, when executed by a processor, implement the steps of a self-learning method for the zero-position deflection angle of a motor resolver according to various embodiments of this application as described in the "Exemplary Methods" section above. For example, implementing: An initial control dataset is acquired, comprising an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment. Based on the initial control dataset, the suspended motor is driven to rotate to a stable speed using open-loop control. During the stable rotation of the motor, the motor's voltage and current signals are acquired in real time and processed into voltage and current components in a rotating coordinate system through coordinate transformation. Using zero as the current control target for the direct and quadrature axes, the voltage and current components in the rotating coordinate system are decoupled and calculated according to the motor voltage equation to obtain the corresponding back EMF estimation value. Based on the back EMF estimation value, the real-time electrical angular velocity of the motor is calculated, and a phase error signal is constructed. The phase error signal is input into a phase-locked loop (PLL) to iteratively update the internal angle estimation value based on the phase error signal and the real-time electrical angular velocity until the angle estimation value converges to a stable zero-position offset angle calibration value.
[0075] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0076] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A self-learning method for the zero-position deflection angle of a motor resolver, characterized in that, Applied to an electronic control unit, the method includes the following steps: Acquire an initial control dataset, which includes an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment; Based on the initial control dataset, the suspended motor is driven to rotate to a stable speed using open-loop control. During the stable rotation of the motor, the voltage and current signals of the motor are collected in real time and processed into voltage and current components in a rotating coordinate system through coordinate transformation. With zero as the current control target for the direct and quadrature axes, the voltage and current components in the rotating coordinate system are decoupled and calculated according to the motor voltage equation to obtain the corresponding back EMF estimate. Based on the back EMF estimate, the real-time electric angular velocity of the motor is calculated, and a phase error signal is constructed. The phase error signal is input into the phase-locked loop to iteratively update the internal angle estimate based on the phase error signal and the real-time electrical angular velocity until the angle estimate converges to a stable zero-position deflection calibration value.
2. The method according to claim 1, characterized in that, The step of driving the suspended motor to rotate to a stable speed includes: gradually increasing the given frequency of the motor through the frequency increment, so that the motor accelerates to a preset stable speed range below the base speed point.
3. The method according to claim 1, characterized in that, The motor voltage equation includes: in, The d-axis stator voltage, This is the q-axis stator voltage. For stator resistance, The stator current is the d-axis current. This represents the q-axis stator current. Let be the self-inductance of the stator winding on the d-axis. The self-inductance of the stator winding on the q-axis, Let be the electric angular velocity of the motor rotor. For q-axis magnetic flux, denoted as d-axis magnetic flux.
4. The method according to claim 1, characterized in that, The steps of calculating the real-time electrical angular velocity of the motor based on the back EMF estimate and constructing the phase error signal include: The back EMF estimate is low-pass filtered to obtain the filtered back EMF signal; Calculate the composite amplitude of the filtered back EMF signal; The phase error signal is constructed based on the ratio of the direct-axis component in the filtered back EMF signal to the synthesized amplitude. The real-time electric angular velocity is calculated based on the back electromotive force estimate or the composite amplitude.
5. The method according to claim 4, characterized in that, The formula for calculating the phase error signal is as follows: ;in, This is a phase error signal. This represents the direct-axis component of the filtered back EMF signal. This represents the composite amplitude.
6. The method according to claim 5, characterized in that, When iteratively updating the internal angle estimate based on the phase error signal and real-time electrical angular velocity, the update is performed according to the following formula: in, ; To process the absolute value, For real-time electrical angular velocity, This is the updated angle estimate. The angle estimate before the update. and For regulator parameters, This is the phase error signal from the previous moment.
7. The method according to claim 1, characterized in that, After the angle estimate converges to a stable zero-position deflection calibration value, the following is also included: The angle estimate is converged to a stable zero-position deflection calibration value, and the value is stored in a non-volatile memory. When performing vector control on the motor in the future, the original angle detected in real time by the rotary transformer is added to the zero-position offset angle calibration value to obtain the rotor position angle used to control the motor.
8. A self-learning system for zero-position deflection angle of a motor resolver, characterized in that, Integrated into the electronic control unit, the system includes: The parameter acquisition module is configured to acquire an initial control dataset, which includes an initial virtual angle, a non-zero direct-axis current command, a zero quadrature-axis current command, and a frequency increment. The motor drive module is configured to drive the suspended motor to rotate to a stable speed in an open-loop control manner according to the initial control dataset. The signal conversion module is configured to: acquire the voltage and current signals of the motor in real time during the stable rotation of the motor, and process them into voltage and current components in a rotating coordinate system through coordinate transformation; The first calculation module is configured to: take zero as the current control target of the direct axis and the quadrature axis, and perform decoupled calculation of the voltage component and current component in the rotating coordinate system according to the motor voltage equation to obtain the corresponding back EMF estimate. The second calculation module is configured to: calculate the real-time electric angular velocity of the motor based on the back EMF estimation value, and construct a phase error signal; The zero-position estimation module is configured to input the phase error signal into the phase-locked loop, and iteratively update the internal angle estimation value based on the phase error signal and the real-time electrical angular velocity, until the angle estimation value converges to a stable zero-position deflection angle calibration value.
9. An electronic device, characterized in that, include: Memory, used to store one or more programs; processor; When the one or more programs are executed by the processor, the method as described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-7.