Calibration method and device for rotary transformer zero position and rotary transformer ratio and motor controller

By integrating the calibration process of resolver zero position and resolver ratio into a high-performance permanent magnet synchronous motor, and using a preset calculation model to solve the zero position offset angle and actual resolver ratio in one go, the problem of low calibration efficiency in the prior art is solved, production efficiency is improved and noise and stress impact are reduced.

CN121664051APending Publication Date: 2026-03-13AVATR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-10
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The existing technology has low calibration efficiency for resolver zero point and resolver ratio, resulting in low production efficiency and may cause abnormal rotor start-up and shutdown and noise, affecting product quality and reliability.

Method used

By acquiring the measured electrical angle at each known target electrical angle and inputting it into a preset calculation model, the zero-position offset angle and the actual resolver ratio are calculated together. The resolver zero-position self-learning and resolver ratio calibration processes are integrated to achieve a one-time solution.

Benefits of technology

It improves the calibration efficiency of resolver zero point and resolver ratio, avoids multiple abnormal rotor start-stops, reduces noise and stress impact, and improves production efficiency and product reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121664051A_ABST
    Figure CN121664051A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of motor control, and discloses a rotary transformer zero position and rotary transformer ratio calibration method and device and a motor controller, and the method comprises the steps: controlling a motor rotor to be sequentially locked at a set target electrical angle, and obtaining a measurement electrical angle corresponding to each target electrical angle; the target electrical angle and the measured electrical angle are input into a preset calculation model, a zero offset angle and an actual resolver ratio are obtained through joint calculation, and the preset calculation model is constructed according to the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero offset angle and the preset actual resolver ratio; and updating the current zero offset angle by using the zero offset angle obtained by the joint calculation, and updating the current actual resolver ratio by using the actual resolver ratio obtained by the joint calculation. By applying the technical scheme of the invention, the calibration efficiency of the rotary transformer zero position and the rotary transformer ratio can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, specifically to a method, apparatus, and motor controller for calibrating resolver zero position and resolver ratio. Background Technology

[0002] In the vector control system of a high-performance permanent magnet synchronous motor, the resolver, as a key position sensor, directly determines the motor's operating efficiency, torque stability, and noise level through the accuracy of its angle calculation. To ensure the accuracy of the resolver's feedback angle, parameter calibration is required, with the two most critical parameters being the zero-position offset angle and the resolver ratio. Currently, the commonly used calibration method involves calibrating the zero-position offset angle and the resolver ratio sequentially, resulting in a time-consuming calibration process. Summary of the Invention

[0003] In view of the above problems, embodiments of the present invention provide a method, apparatus and motor controller for calibrating resolver zero position and resolver ratio, which solves the problem of low calibration efficiency of resolver zero position and resolver ratio in the prior art.

[0004] According to one aspect of the present invention, a method for calibrating the zero point and the resolver ratio of a resolver is provided, the method comprising: The motor rotor is controlled to lock sequentially at the set target electrical angles, and the measured electrical angle corresponding to each target electrical angle is obtained; The target electrical angle and the measured electrical angle are input into the preset calculation model, and the zero-position offset angle and the actual resolver ratio are calculated together. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio. The current zero-position offset angle is updated using the jointly calculated zero-position offset angle, and the current actual resolver ratio is updated using the jointly calculated actual resolver ratio.

[0005] According to another aspect of the present invention, a calibration apparatus for resolver zero point and resolver ratio is provided, comprising: The acquisition module is used to control the motor rotor to lock sequentially at the set target electrical angles and acquire the measured electrical angles corresponding to each target electrical angle; The calculation module is used to input the target electrical angle and the measured electrical angle into the preset calculation model, and jointly calculate the zero-position offset angle and the actual resolver ratio. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio. The update module is used to update the current zero-position offset angle using the jointly calculated zero-position offset angle, and to update the current actual resolver ratio using the jointly calculated actual resolver ratio.

[0006] According to another aspect of the present invention, a motor controller is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform the operation of the above-described calibration method for resolver zero point and resolver ratio.

[0007] This invention provides a method to obtain the measured electrical angle by locating at each known target electrical angle. The target electrical angle and the measured electrical angle are then input into a preset calculation model. By using the relationship between the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero-position offset angle, and the preset actual resolver ratio in the preset calculation model, the zero-position offset angle and the actual resolver ratio are calculated in one step. This integrates and unifies the two independent and sequential processes of resolver zero-position self-learning and resolver ratio calibration, and jointly solves for the zero-position offset angle and the actual resolver ratio, thereby improving the calibration efficiency of resolver zero-position and resolver ratio.

[0008] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0009] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a first embodiment of the calibration method for resolver zero point and resolver ratio provided by the present invention is shown. Figure 2 A schematic diagram of the overall process of the calibration method for the resolver zero point and resolver ratio provided by the present invention is shown; Figure 3 A schematic diagram of the structure of a first embodiment of the calibration device for refractive zero point and refractive ratio provided by the present invention is shown; Figure 4 A schematic diagram of an embodiment of the motor controller provided by the present invention is shown. Detailed Implementation

[0010] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.

[0011] In the vector control system of a high-performance permanent magnet synchronous motor, the resolver, as a key position sensor, directly determines the motor's operating efficiency, torque stability, and noise level through the accuracy of its angle calculation. To ensure the accuracy of the resolver's feedback angle, parameter calibration is required, with the two most critical parameters being the zero-position offset angle and the resolver ratio. Currently, the commonly used calibration method is as follows: First, self-learning of the zero-position offset angle is performed. Specifically, the control system uses a specific algorithm, such as the high-frequency injection method or the d-axis orientation method, to pull the rotor to a known electrical zero point position and records the resolver's feedback value at this time to calculate the zero-position offset angle. After this process is completed, self-learning of the resolver ratio is performed: the motor rotor is controlled to rotate multiple revolutions or multiple preset mechanical angles, and the deviation between the actual resolver ratio and the nominal value is calculated by comparing the change in the electrical angle fed back by the resolver with the theoretical value.

[0012] The drawbacks of this serial, step-by-step calibration method include: First, the calibration process is inefficient. Because the two stages are independent, the entire calibration process must be performed sequentially, which is time-consuming, especially in large-scale production lines, severely impacting production efficiency. Second, during calibration, the motor needs to perform two different start, positioning, and stop actions, resulting in multiple abnormal starts, stops, and vibrations in the rotor. These abnormal vibrations and noises are perceptible to the user, reducing the product's quality and reliability. Finally, the multiple vibrations during the step-by-step calibration process may also cause unnecessary stress impacts on the motor and its drive mechanical system.

[0013] Therefore, to address the aforementioned issues, this application proposes a calibration method for resolver zero position and resolver ratio. The main technical solution includes: controlling the motor rotor to sequentially lock at set target electrical angles and obtaining the measured electrical angle corresponding to each target electrical angle; inputting the target electrical angle and the measured electrical angle into a preset calculation model, and jointly calculating the zero position offset angle and the actual resolver ratio, wherein the preset calculation model is constructed based on the relationship between the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero position offset angle, and the preset actual resolver ratio; updating the current zero position offset angle using the jointly calculated zero position offset angle, and updating the current actual resolver ratio using the jointly calculated actual resolver ratio.

[0014] This invention provides a method to obtain the measured electrical angle by locating at each known target electrical angle. The target electrical angle and the measured electrical angle are then input into a preset calculation model. By using the relationship between the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero-position offset angle, and the preset actual resolver ratio in the preset calculation model, the zero-position offset angle and the actual resolver ratio are calculated in one step. This integrates and unifies the two independent and sequential processes of resolver zero-position self-learning and resolver ratio calibration, and jointly solves for the zero-position offset angle and the actual resolver ratio, thereby improving the calibration efficiency of resolver zero-position and resolver ratio.

[0015] Furthermore, by calculating the zero-position offset angle and the actual resolver ratio in one step, there is no need to perform independent calibration of the zero-position offset angle and the actual resolver ratio, thereby avoiding the vibration and noise caused by multiple abnormal starts and stops of the rotor.

[0016] Figure 1 A flowchart of a first embodiment of the calibration method for resolver zero point and resolver ratio of the present invention is shown, the method being executed by a motor controller. Figure 1 As shown, the method includes the following steps: Step 110: Control the motor rotor to lock sequentially at the set target electrical angles, and obtain the measured electrical angle corresponding to each target electrical angle.

[0017] In motor control, the target electrical angle refers to the theoretical electrical angular position that the controller desires or instructs the rotor poles (d-axis) to reach. It is a known, precise reference value. This target electrical angle varies depending on the motor type and can be determined based on that type. There can be multiple target electrical angles. For example, during calibration, the motor controller may plan to lock the rotor at four electrical angles: 0°, 90°, 180°, and 270°; these angles are the target electrical angles.

[0018] The measured electrical angle refers to the raw electrical angle value read directly from the resolver decoding chip without any calibration. Due to zero-point bias and resolver ratio errors, this value usually deviates from the target electrical angle. For example, when the motor controller wants the rotor to be at the target electrical angle of 0°, the value read from the resolver chip might be 5.2°, and this 5.2° is the measured electrical angle.

[0019] In one alternative approach, while controlling the motor rotor to lock at a set target electrical angle, a resolver decoder calculates the corresponding measured electrical angle at that target electrical angle. Since the motor rotor can be locked at different target electrical angles, each target electrical angle has a corresponding measured electrical angle, thus obtaining multiple sets of subsequently calculated target electrical angles and measured electrical angles.

[0020] Step 120: Input the target electrical angle and the measured electrical angle into the preset calculation model, and jointly calculate the zero-position offset angle and the actual resolver ratio. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio.

[0021] The preset calculation model is a pre-established formula or algorithm that describes the mathematical relationship between the target electrical angle, the measured electrical angle, the zero-offset angle, and the actual resolver ratio. Calibration essentially involves using multiple sets of data to solve for the unknown parameters in this model. This preset calculation model can be a linear relationship model, for example, target electrical angle = actual resolver ratio * measured electrical angle + zero-offset angle, or it can be other types of linear relationship models.

[0022] The zero-position offset angle refers to the electrical angle fed back by the resolver when the rotor's d-axis is aligned with the theoretical zero point of the stator winding due to mechanical installation errors between the resolver and the motor rotor. This fixed deviation angle is the zero-position offset angle. For example, if the mechanical zero position deviates by 2° electrical angle, then the zero-position offset angle is 2°.

[0023] The actual resolver ratio refers to the inherent ratio of the resolver itself, which is the true ratio after matching the number of pole pairs of the motor. It determines how many degrees the feedback electrical angle changes when the rotor mechanical angle changes by one degree. Due to manufacturing tolerances, it may differ slightly from the nominal resolver ratio. For example, for a 4-pole motor and a nominal 1:10 resolver, the ideal resolver ratio is 40, i.e., 10*4, but the actual value may be 40.1.

[0024] Among them, the preset electrical angle refers to the general representation of the target electrical angle used in model building to derive model relationships. It represents a variable in the model, not a specific target value in a particular calibration. The target electrical angle is the value specifically set in this calibration operation; while the preset electrical angle is a theoretical variable in the model formula. The preset measured electrical angle is the general representation of the measured electrical angle corresponding to the preset electrical angle used in model building, and is also a variable in the model. The preset zero-point offset angle refers to the variable representing the zero-point offset angle parameter that needs to be solved when building the model. The preset actual resolver ratio refers to the variable representing the actual resolver ratio parameter that needs to be solved when building the model.

[0025] In one alternative approach, after simultaneously inputting multiple sets of target electrical angles and measured electrical angles into a preset calculation model, the target electrical angles and measured electrical angles are treated as known quantities, while the zero-offset angle and actual resolver ratio are treated as unknown quantities. The zero-offset angle and actual resolver ratio are then calculated using the least squares method. For example, the preset calculation model is θ_measured = A * θ_target + B. Multiple target electrical angles θ_target are used as independent variables, and the corresponding measured electrical angles θ_measured are used as dependent variables. The least squares method is used to fit a straight line to the collected multiple sets of (θ_target, θ_measured) data. The slope of the fitted line can be used to determine the actual resolver ratio, and the intercept of the line on the Y-axis can be used to determine the zero-offset angle. This method optimally eliminates the influence of random measurement noise.

[0026] Step 130: Update the current zero-position offset angle using the jointly calculated zero-position offset angle, and update the current actual resolver ratio using the jointly calculated actual resolver ratio.

[0027] In one alternative approach, the jointly calculated zero-offset angle and actual resolver ratio can be written into the motor controller's non-volatile memory, such as Flash or EEPROM. Subsequently, each time the motor controller powers on and initializes, these two calibrated parameters are read from this memory to correct the real-time measured electrical angle: Corrected electrical angle = Measured electrical angle * Actual resolver ratio + Zero-offset angle. This method allows for permanent calibration.

[0028] In another alternative approach, the calibrated zero-offset angle and actual resolver ratio are directly updated to the runtime variables or registers used for angle correction in the motor control algorithm, rather than necessarily being immediately written to non-volatile memory. In practical applications, the motor controller will use the updated zero-offset angle and actual resolver ratio to calculate the angle during this power-on cycle. This method is suitable for systems requiring temporary calibration, debugging, or those that allow for self-learning upon each power-on.

[0029] In this embodiment, the measured electrical angle is obtained by positioning at each known target electrical angle, and the target electrical angle and the measured electrical angle are input into a preset calculation model. By using the relationship between the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero-position offset angle and the preset actual resolver ratio in the preset calculation model, the zero-position offset angle and the actual resolver ratio are calculated at once. In this way, the two independent and serial processes of resolver zero-position self-learning and resolver ratio calibration are integrated and unified, and the zero-position offset angle and the actual resolver ratio are solved jointly, which can improve the calibration efficiency of resolver zero-position and resolver ratio.

[0030] In one feasible implementation, step 120 includes: Step 121: Based on each target electrical angle and the corresponding measured electrical angle, the least squares method is used to calculate the scaling factor and offset compensation.

[0031] The least squares method is a mathematical optimization technique that finds the optimal function match for data by minimizing the sum of squared errors. In resolver calibration, it is used to find a straight line θ_measured = A * θ_target + B that minimizes the sum of the squared perpendicular distances from the target electrical angle and the measured electrical angle to this line. The slope A of this line is the scaling factor, and the intercept B is the offset compensation.

[0032] In the linear model fitted by the least squares method, the scaling factor represents the parameter of the slope A. It quantifies the scaling relationship between the measured electrical angle and the target electrical angle. The scaling factor is not equal to the actual resolver ratio; it is a correction coefficient between the actual resolver ratio and the original resolver ratio. Typically, the scaling factor ≈ actual resolver ratio / original resolver ratio.

[0033] In the linear model fitted by the least squares method, the offset compensation represents the parameter of the intercept B. It quantifies the deviation of the target electrical angle when the measured electrical angle is zero. The offset compensation is not equal to the zero-position offset angle; it includes the influence of the resolver ratio error. A conversion is required to obtain the true zero-position offset angle.

[0034] In one alternative approach, assume M sets of data were collected. Let θ_target_i be the i-th target electrical angle, and θ_measured_i be the corresponding i-th measured electrical angle. Calculate the average value of all target electrical angles, y_avg = (Σθ_target_i) / M, and the average value of all measured electrical angles, θ_measured_avg = (∑θ_measured_i) / M. The scaling factor A = [∑((θ_measured_i - θ_measured_avg) * (θ_target_i - θ_target_avg))] / [∑((θ_measured_i - θ_measured_avg)^2)]. The bias compensation B = θ_target_avg - A * θ_measured_avg. The scaling factor and bias compensation can be directly calculated in this way.

[0035] Step 122: Determine the actual resolver ratio based on the scaling factor and the original resolver ratio.

[0036] The initial resolver ratio is a value preset in the motor control system or resolver decoding chip before calibration begins. This value is typically calculated based on the resolver nameplate parameters and the number of motor pole pairs, and is a nominal or initial value. Due to manufacturing and installation tolerances, it may deviate from the true effective resolver ratio, i.e., the actual resolver ratio.

[0037] In one alternative approach, the actual resolver ratio can be obtained by multiplying the scaling factor by the original resolver ratio. Since the scaling factor A reflects the overall gain error of the measurement system, and because the target electrical angle ≈ scaling factor * measured electrical angle, and the measured electrical angle = original resolver ratio * mechanical angle, the target electrical angle ≈ scaling factor * original resolver ratio * mechanical angle. Furthermore, since the target electrical angle = actual resolver ratio * mechanical angle, the above relationship is naturally derived. This method allows for the rapid calculation of the actual resolver ratio.

[0038] It should be noted that the scaling factor is a dimensionless correction coefficient that represents the ratio of the actual resolver ratio to the original resolver ratio. This normalization decouples the calibration process from the specific hardware, avoids directly processing potentially large resolver ratio values, and improves the stability of numerical calculations.

[0039] In another alternative approach, a correspondence table between the scaling factor and the resolver ratio correction can be established experimentally beforehand. After calculating a scaling factor A using the least squares method, instead of directly multiplying, a more accurate resolver ratio correction value is obtained by looking up the table or using an interpolation function. This value is then added to the original resolver ratio: Actual resolver ratio = Original resolver ratio + Correction. This is because a simple multiplication relationship may not be optimal when the system exhibits nonlinearity. This method offers greater flexibility and can be used to compensate for certain nonlinear errors.

[0040] Step 123: Determine the zero-position offset angle based on the offset compensation and scaling factor.

[0041] In one alternative approach, the zero-position offset angle can be obtained from the ratio of the offset compensation to the scaling factor. It should be noted that the offset compensation B is directly derived from the least-squares fit, but it includes the influence of the resolver ratio error. By dividing by the scaling factor A, the zero-position offset angle is normalized to the coordinate system of the actual resolver ratio, eliminating the coupling effect of the resolver ratio error on the zero-position offset. This ensures the purity of the zero-position offset angle and avoids the cumulative error caused by parameter interactions during step-by-step calibration.

[0042] In another alternative approach, the mechanical angle corresponding to the offset compensation can be calculated: Offset mechanical angle = Offset compensation / Original resolver ratio. This mechanical angle is then converted back to an electrical angle, but using the actual resolver ratio: Zero-position offset angle = Offset mechanical angle * Actual resolver ratio. This method first restores the offset compensation to the mechanical angle level using the original resolver ratio, eliminating the influence of inaccurate original resolver ratios. Then, using the accurate actual resolver ratio, the mechanical zero-position deviation is converted back to the true electrical zero-position offset angle.

[0043] In this embodiment, the least squares method provides the statistically optimal estimate and reduces random errors. The least squares method is used to first calculate the scaling factor and bias compensation, and then the original resolver ratio is calibrated based on the calculated scaling factor. The bias ratio is used to eliminate the coupling effect of the resolver ratio error on the zero-position bias, thereby realizing the joint calculation process of the actual resolver ratio and the zero-position bias angle, avoiding multiple operations, shortening the calibration time, and improving the calibration efficiency.

[0044] In one feasible implementation, refer to Figure 2 The calibration method for the resolver zero point and resolver ratio in this application further includes: If the calibration conditions of the resolver zero position and resolver ratio are met, step 110 is executed: the motor rotor is controlled to lock sequentially at different target electrical angles, and the measured electrical angle corresponding to each target electrical angle is obtained.

[0045] The calibration conditions for the resolver zero point and resolver ratio include one of the following: The motor's zero position or resolver ratio was detected as lost.

[0046] The zero position or resolver ratio of the motor was detected to be reset.

[0047] The cumulative driving time or mileage of the vehicle containing the motor reaches the first preset threshold.

[0048] When the motor is running, it is detected that the measured electrical angle or amplitude exceeds the second preset threshold.

[0049] When the motor is running, the motor speed fluctuation exceeds the third preset threshold or the motor torque fluctuation exceeds the fourth preset threshold.

[0050] The motor is in maintenance mode.

[0051] The first, second, third, and fourth preset thresholds mentioned above can be set according to experiments and actual conditions, and are not specifically limited here. When any of the above situations occur, it indicates that the resolver zero point and resolver ratio need to be calibrated. Switch to the resolver zero point and resolver ratio calibration process to calibrate the resolver zero point and resolver ratio, so as to avoid affecting the motor's operating efficiency, torque stability, and noise level.

[0052] Step 120: Input the target electrical angle and the measured electrical angle into the preset calculation model, and jointly calculate the zero-position offset angle and the actual resolver ratio. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio.

[0053] Optionally, based on each target electrical angle and the corresponding measured electrical angle, the least squares method is used to calculate the scaling factor and bias compensation. Based on the scaling factor and the original resolver ratio, the actual resolver ratio is determined. Based on the bias compensation and the scaling factor, the zero-position bias angle is determined.

[0054] Optionally, the actual revolving ratio is obtained based on the product of the scaling factor and the original revolving ratio.

[0055] Optionally, the zero-position offset angle can be obtained based on the ratio of the offset compensation and the scaling factor.

[0056] Step 130: Update the current zero-position offset angle using the jointly calculated zero-position offset angle, and update the current actual resolver ratio using the jointly calculated actual resolver ratio.

[0057] In this embodiment of the application, by setting calibration conditions for the resolver zero position and resolver ratio, when one of the above conditions occurs, it indicates that the resolver zero position and resolver ratio need to be calibrated, and the process of calibrating the resolver zero position and resolver ratio is switched to achieve the calibration of the resolver zero position and resolver ratio, so as to avoid affecting the motor's operating efficiency, torque stability and noise level.

[0058] In one possible implementation, step 110 includes: Step 111: Determine the target electrical angle of the motor based on its type.

[0059] Here, there are at least four target electrical angles, and each target electrical angle is different. When there are four target electrical angles, these target electrical angles can include 0°, 90°, 180°, and 270°.

[0060] It's important to note that setting the target electrical angles to 0°, 90°, 180°, and 270° is crucial. These four data points meet the calculation requirements of the least squares method and cover key points within a complete electrical cycle, obtaining the most representative data with the fewest sampling points, thus enabling high-precision calculation of the resolver ratio and zero-position offset angle. Specifically, choosing these target electrical angle values ​​offers the following advantages: First, the electrical angle of the resolver output is periodic, with one cycle every 360° electrical angle. The goal of calibration is to correct the linear relationship within this cycle, i.e., the straight line represented by θ_measured = A * θ_target + B. If sampling is only performed within a small range, such as between 0° and 45°, it cannot represent the entire cycle and cannot detect any potential periodic errors. Selecting the four points of 0°, 90°, 180°, and 270° is equivalent to sampling at the 0°, 90°, 180°, and 270° phases of a sine wave (or cosine wave). These points are evenly distributed within a complete electrical cycle, ensuring the representativeness and comprehensiveness of the sampled data.

[0061] Second, when using the least squares method for linear fitting, the distribution of input data points has a significant impact on the accuracy and stability of the fitting results. Ideally, the data points should be distributed as evenly and widely as possible across the measurement range. These four points precisely divide the 360° electrical angle into four equal parts, achieving the most uniform distribution with the fewest points. This distribution maximizes variance, as the accuracy of calculating the resolver ratio depends on the variance of the measured electrical angle. The wider the point distribution, the greater the variance, and the more accurate the actual resolver ratio estimate. 0° and 180° are the two points furthest apart, most effectively determining the slope of the straight line for a better determination of the actual resolver ratio.

[0062] Third: Ideally, the resolver signal is a pure sine and cosine signal. However, in reality, harmonic distortion may exist due to manufacturing defects or magnetic field asymmetry. Even harmonics, such as the 2nd and 4th harmonics, may repeat multiple times within an electrical cycle. At the four symmetrical points of 0°, 90°, 180°, and 270°, the cumulative effect of many even harmonic errors can be averaged out or canceled out, resulting in purer fitting data.

[0063] It should also be noted that, in addition to using the above-mentioned representative target electrical angles, namely 0°, 90°, 180° and 270°, more target electrical angles can be selected to further improve the solution accuracy.

[0064] In one alternative approach, disregarding the specific type of motor, a mechanical perspective is adopted. Multiple evenly distributed points are selected as target positions within one mechanical rotation of the motor rotor. Then, based on the number of pole pairs, these mechanical angles are converted into corresponding target electrical angles. Assuming the motor has 4 pole pairs, selecting a point every 90 degrees of mechanical rotation corresponds to 0°, 90°, 180°, and 270° of mechanical rotation. This translates to target electrical angles of 0°, 360°, 720°, and 1080°. Since there are 4 pole pairs, one mechanical cycle corresponds to 4 electrical cycles. Therefore, points should be evenly selected within the range of 0 to 1440 electrical angles, for example, 0°, 360°, 720°, and 1080°. This method ensures that the sampling points cover different electrical positions, is independent of motor type, and has strong versatility.

[0065] For each target electrical angle, perform the following steps: Step 112: Apply d-axis current and control q-axis current to zero to generate a magnetic field whose direction coincides with the d-axis direction of the motor rotor.

[0066] In field-oriented control of a motor, the d-axis current is the current component that generates the excitation magnetic field. Its direction is aligned with the axis of the permanent magnet rotor poles (NS poles), i.e., the d-axis direction. The primary purpose of applying the d-axis current is not to generate torque, but rather to enhance or weaken the magnetic field strength, i.e., the magnetic flux, in the air gap. During calibration, the d-axis current is used to generate a magnetic field aligned with the rotor's d-axis, thereby locking the rotor.

[0067] In the field-oriented control of the motor, the q-axis current is the current component that generates electromagnetic torque. Its direction is perpendicular to the rotor's d-axis. Applying the q-axis current causes the motor to rotate and output torque. During calibration, by controlling the q-axis current to zero, it is ensured that the motor does not generate rotational torque, thereby preventing rotor rotation and allowing only the magnetic force generated by the d-axis current for positioning.

[0068] In one alternative approach, the q-axis current setpoint Iq_ref is directly set to 0 in the current loop. The d-axis current setpoint Id_ref is set to a non-zero fixed value. The FOC algorithm uses the set Id_ref and Iq_ref (=0) through inverse Park transformation and space vector modulation to ultimately generate a three-phase voltage command to drive the inverter. Since Iq_ref=0, the system does not generate drive torque. Because Id_ref is not zero, the stator three-phase windings synthesize a stable static magnetic field whose direction coincides with the d-axis defined internally by the controller. This magnetic field interacts with the rotor permanent magnet magnetic field, attracting the rotor to a position aligned with the stator magnetic field.

[0069] Step 113: By adjusting the magnitude of the d-axis current, the motor rotor is locked in a mechanical position corresponding to the current target electrical angle, and the measured electrical angle corresponding to each mechanical position is obtained.

[0070] In one alternative approach, a position closed loop is introduced. The input to the position regulator, such as a P or PI regulator, is the error between the target electrical angle and the measured electrical angle from the current resolver feedback. The output of the position regulator is no longer the q-axis current command (since Iq is forced to 0), but instead serves as an additional setpoint ΔId for the d-axis current command. The original base value of Id_ref, plus this ΔId, together form the final d-axis current command. This is because when there is an error between the rotor position (measured electrical angle) and the target position, the position regulator outputs a non-zero ΔId. This ΔId alters the strength of the synthetic magnetic field, thus changing the magnitude of the attraction force on the rotor. By adjusting this attraction force, the system generates a small torque to pull the rotor to and precisely lock it in the target position until the position error is zero, and ΔId also approaches zero. This method offers stronger anti-interference capabilities and higher positioning accuracy than simply applying a constant Id in an open loop.

[0071] In this embodiment, the motor controller employs field-oriented control, setting the q-axis current command Iq=0 while simultaneously applying a specific d-axis current command Id. This operation generates a magnetic field aligned with the d-axis direction of the rotor's permanent magnet. Under the influence of this magnetic field, the rotor is automatically attracted and stably locked at a position where the d-axis coincides with the direction of this magnetic field, i.e., the direction defined by the target electrical angle. After the rotor stabilizes, the measured electrical angle is read from the resolver decoding chip. In this way, the target electrical angle used for subsequent calculations and its corresponding measured electrical angle can be determined.

[0072] In another feasible approach, the motor rotor is sequentially locked at set target electrical angles, and the measured electrical angle corresponding to each target electrical angle is acquired. That is, step 110 can also involve switching the motor controller to position closed-loop mode. The target electrical angle is used as the position setpoint and input into a position PID controller. The PID controller calculates the required q-axis torque current based on the deviation between the current position feedback and the setpoint. The system drives the rotor to rotate until the position error is zero, thereby servo-locking the rotor at the target position. After the position error approaches zero, i.e., the system stabilizes, the measured electrical angle is read. This method also achieves the reading of the measured electrical angle.

[0073] In another feasible implementation, besides using the least squares method to calculate the zero-position offset angle and the actual resolver ratio, step 120 includes: Step 221: Calculate the actual resolver ratio based on the electrical angle difference between the first target electrical angle and the second target electrical angle, as well as the electrical angle difference between the second measured electrical angle and the first measured electrical angle.

[0074] Step 222: Calculate the zero-position offset angle based on the first target electrical angle, the first measured electrical angle, and the actual resolver ratio.

[0075] In one alternative approach, two target electrical angles can be selected, denoted as the first target electrical angle and the second target electrical angle. The actual resolver ratio = (second target electrical angle - first target electrical angle) / (second measured electrical angle - first measured electrical angle). This calculates the change in measured value over a given electrical angle span. The zero-point offset angle = first target electrical angle - (first measured electrical angle * actual resolver ratio).

[0076] For example, the first target electrical angle mentioned above can be 0°, and the second target electrical angle can be 180°. Therefore, the electrical angle span here can be set to 180°. Alternatively, the calculation results from more points, such as 90° and 270°, can be averaged to improve accuracy. This calculation method can improve the calculation efficiency of the zero-position offset angle and the actual resolver ratio.

[0077] In this embodiment, by selecting two target electrical angles and their corresponding measured electrical angles, the zero-position offset angle and the actual resolver ratio can be calculated. The calculation process is relatively simple, reducing the difficulty of calibration.

[0078] To better understand the methods described above in this application, the following will combine... Figure 2 A detailed description of the overall process of this application is provided below: S1. Calibration process trigger condition judgment: First, determine if the vehicle meets the calibration conditions, and then determine the conditions for triggering the calibration process.

[0079] S1.1 Vehicle status confirmation: The system is powered on, there are no drive system-related faults, the high voltage system is normal, and the motor shaft is not mechanically locked.

[0080] S1.2 Process trigger condition judgment: ① Key parameters (such as zero position, transformation ratio) are detected to be lost / reset; ② The motor assembly or controller is replaced; ③ The vehicle's cumulative driving time or mileage reaches the preset threshold; ④ During operation, the resolver decoding angle or amplitude is detected to exceed the preset threshold; ⑤ During operation, the speed fluctuates abnormally or the torque fluctuates beyond a certain threshold; ⑥ The system itself is already in maintenance mode.

[0081] S2. At this point, perform multiple d-axis orientation locks.

[0082] S2.1 performs multiple d-axis orientations, rotating the magnetic field vector to multiple predetermined known target electrical angles θ_target[0°, 90°, 180°, 270°] 4 electrical angles. More known angles can also be collected here to further improve the solution accuracy.

[0083] S2.2 At each target electrical angle θ_target, the rotor is locked in that position by controlling the Id current (and Iq=0) according to the characteristics of different types of motors.

[0084] S3. At each locked position, read and record the four raw measured electrical angles θ_measured calculated by the resolver decoder.

[0085] S4. Parameter calculation: The least-squares solution using multiple position angles is more accurate than the traditional resolver zero-position calibration which only finds one position.

[0086] S4.1 Establish a simplified mathematical model, i.e., a preset calculation model, between the measured electrical angle θ_measured (known) and the target electrical angle θ_target (known), the actual resolver ratio K_actual (unknown) and the original resolver ratio K_nominal (known), and the zero-position offset angle θ_offset (unknown), as follows: θ_measured=(K_actual / K_nominal)*(θ_target+θ_offset).

[0087] Let A = K_actual / K_nominal, B = A * θ_offset = (K_actual / K_nominal) * θ_offset; the default calculation model is transformed into θ_measured = A * θ_target + B.

[0088] S4.2 Construct a system of equations using the known measurement parameters θ_target and θ_measured at the four locations, solve for the values ​​of A and B using the least squares method, and reconstruct the actual parameters K_actual and θ_offset.

[0089] S5. Replace the original stored values ​​with the calculated actual K_actual and zero offset angle θ_offset, and save them, waiting for the next calibration process to activate.

[0090] Figure 3 A schematic diagram of an embodiment of the calibration device for the resolver zero point and resolver ratio of the present invention is shown. Figure 3 As shown, the device 300 includes: an acquisition module 310, a calculation module 320, and an update module 330.

[0091] The acquisition module 310 is used to control the motor rotor to lock sequentially at the set target electrical angles and acquire the measured electrical angles corresponding to each target electrical angle; The calculation module 320 is used to input the target electrical angle and the measured electrical angle into the preset calculation model, and jointly calculate the zero-offset angle and the actual resolver ratio. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-offset angle and the preset actual resolver ratio. The update module 330 is used to update the current zero-position offset angle using the jointly calculated zero-position offset angle, and to update the current actual resolver ratio using the jointly calculated actual resolver ratio.

[0092] In an alternative embodiment, the calculation module 320 is further configured to: calculate the scaling factor and offset compensation using the least squares method based on each target electrical angle and the corresponding measured electrical angle; determine the actual resolver ratio based on the scaling factor and the original resolver ratio; and determine the zero-position offset angle based on the offset compensation and the scaling factor.

[0093] In an alternative approach, the calculation module 320 is also used to: obtain the actual resolver ratio based on the product of the scaling factor and the original resolver ratio.

[0094] In an alternative embodiment, the calculation module 320 is also used to: obtain the zero-position offset angle based on the ratio of the offset compensation and the scaling factor.

[0095] In an alternative embodiment, the acquisition module 310 is further configured to: control the motor rotor to lock sequentially at different target electrical angles when the calibration conditions of the resolver zero position and resolver ratio are met; The calibration conditions for the resolver zero point and resolver ratio include one of the following: The motor's zero position or resolver ratio was detected as missing. The zero position or resolver ratio of the motor has been reset. The cumulative driving time or mileage of the vehicle containing the motor reaches the first preset threshold. When the motor is running, it is detected that the measured electrical angle or amplitude exceeds the second preset threshold. When the motor is running, the motor speed fluctuation exceeds the third preset threshold or the motor torque fluctuation exceeds the fourth preset threshold. The motor is in maintenance mode.

[0096] In an alternative embodiment, the acquisition module 310 is further configured to: determine the target electrical angle of the motor according to the type of the motor; for each target electrical angle, apply a d-axis current and control the q-axis current to zero to generate a magnetic field whose direction coincides with the d-axis direction of the motor rotor; lock the motor rotor in a mechanical position corresponding to the current target electrical angle by adjusting the magnitude of the d-axis current, and acquire the measured electrical angle corresponding to each mechanical position.

[0097] In one alternative approach, the target electrical angles include at least four, and each target electrical angle is different, including 0°, 90°, 180° and 270°.

[0098] In an alternative embodiment, the calculation module 320 is further configured to: calculate the actual resolver ratio based on the electrical angle difference between the first target electrical angle and the second target electrical angle and the electrical angle difference between the second measured electrical angle and the first measured electrical angle; and calculate the zero-position offset angle based on the first target electrical angle, the first measured electrical angle and the actual resolver ratio.

[0099] This invention provides a method to obtain the measured electrical angle by locating at each known target electrical angle. The target electrical angle and the measured electrical angle are then input into a preset calculation model. By using the relationship between the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero-position offset angle, and the preset actual resolver ratio in the preset calculation model, the zero-position offset angle and the actual resolver ratio are calculated in one step. This integrates and unifies the two independent and sequential processes of resolver zero-position self-learning and resolver ratio calibration, and jointly solves for the zero-position offset angle and the actual resolver ratio, thereby improving the calibration efficiency of resolver zero-position and resolver ratio.

[0100] Figure 4 The diagram shows a structural schematic of an embodiment of the motor controller of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the motor controller.

[0101] like Figure 4 As shown, the motor controller may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.

[0102] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other network elements such as clients or other servers. The processor 402 executes program 410, specifically performing the relevant steps in the above-described embodiment of the calibration method for resolver zero point and resolver ratio.

[0103] Specifically, program 410 may include program code, which includes computer-executable instructions.

[0104] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The motor controller includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0105] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.

[0106] Specifically, program 410 can be called by processor 402 to cause the motor controller to perform the following operations: The motor rotor is controlled to lock sequentially at the set target electrical angles, and the measured electrical angle corresponding to each target electrical angle is obtained; The target electrical angle and the measured electrical angle are input into the preset calculation model, and the zero-position offset angle and the actual resolver ratio are calculated together. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio. The current zero-position offset angle is updated using the jointly calculated zero-position offset angle, and the current actual resolver ratio is updated using the jointly calculated actual resolver ratio.

[0107] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: Based on each target electrical angle and the corresponding measured electrical angle, the least squares method is used to calculate the scaling factor and offset compensation. The actual revolver ratio is determined based on the scaling factor and the original revolver ratio; The zero-position offset angle is determined based on offset compensation and scaling factor.

[0108] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: The actual revolving ratio is obtained by multiplying the scaling factor and the original revolving ratio.

[0109] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: The zero-position offset angle is obtained based on the ratio of the offset compensation and the scaling factor.

[0110] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: When the calibration conditions of the resolver zero position and resolver ratio are met, the motor rotor is controlled to lock sequentially at the set target electrical angles, and the measured electrical angle corresponding to each target electrical angle is obtained. The calibration conditions for the resolver zero point and resolver ratio include one of the following: The motor's zero position or resolver ratio was detected as missing. The zero position or resolver ratio of the motor has been reset. The cumulative driving time or mileage of the vehicle containing the motor reaches the first preset threshold. When the motor is running, it is detected that the measured electrical angle or amplitude exceeds the second preset threshold. When the motor is running, the motor speed fluctuation exceeds the third preset threshold or the motor torque fluctuation exceeds the fourth preset threshold. The motor is in maintenance mode.

[0111] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: Determine the target electrical angle of the motor based on its type; For each target electrical angle, perform the following steps: Apply d-axis current and control q-axis current to zero to generate a magnetic field whose direction coincides with the d-axis direction of the motor rotor; By adjusting the magnitude of the d-axis current, the motor rotor is locked in a mechanical position corresponding to the current target electrical angle, and the measured electrical angle corresponding to each mechanical position is obtained.

[0112] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: the target electrical angles include at least four and each target electrical angle is different, including 0°, 90°, 180° and 270°.

[0113] In an alternative manner, program 410 is invoked by processor 402 to cause the motor controller to perform the following operations: The actual resolver ratio is calculated based on the electrical angle difference between the first target electrical angle and the second target electrical angle, as well as the electrical angle difference between the second measured electrical angle and the first measured electrical angle. The zero-position offset angle is calculated based on the first target electrical angle, the first measured electrical angle, and the actual resolver ratio.

[0114] This invention provides a method to obtain the measured electrical angle by locating at each known target electrical angle. The target electrical angle and the measured electrical angle are then input into a preset calculation model. By using the relationship between the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, the preset zero-position offset angle, and the preset actual resolver ratio in the preset calculation model, the zero-position offset angle and the actual resolver ratio are calculated in one step. This integrates and unifies the two independent and sequential processes of resolver zero-position self-learning and resolver ratio calibration, and jointly solves for the zero-position offset angle and the actual resolver ratio, thereby improving the calibration efficiency of resolver zero-position and resolver ratio.

[0115] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Furthermore, the embodiments of this invention are not directed to any particular programming language.

[0116] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. Similarly, for the sake of brevity and to aid in understanding one or more aspects of the invention, in the description of exemplary embodiments of the invention above, various features of the embodiments are sometimes grouped together in a single embodiment, figure, or description thereof. The claims, which follow the detailed description, are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.

[0117] Those skilled in the art will understand that the modules in the device of the embodiment can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiment can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components, except that at least some of such features and / or processes or units are mutually exclusive.

[0118] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.

Claims

1. A method for calibrating the zero point and resolver ratio of a resolver, characterized in that, The method includes: The motor rotor is controlled to lock sequentially at the set target electrical angles, and the measured electrical angle corresponding to each target electrical angle is obtained; The target electrical angle and the measured electrical angle are input into a preset calculation model, and the zero-position offset angle and the actual resolver ratio are calculated together. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio. The current zero-position offset angle is updated using the jointly calculated zero-position offset angle, and the current actual resolver ratio is updated using the jointly calculated actual resolver ratio.

2. The method according to claim 1, characterized in that, The step of inputting the target electrical angle and the measured electrical angle into a preset calculation model and jointly calculating the zero-position offset angle and the actual resolver ratio includes: Based on each target electrical angle and the corresponding measured electrical angle, the scaling factor and offset compensation are calculated using the least squares method. The actual refractive ratio is determined based on the scaling factor and the original refractive ratio. The zero-position offset angle is determined based on the offset compensation and the scaling factor.

3. The method according to claim 2, characterized in that, Determining the actual revolver ratio based on the scaling factor and the original revolver ratio includes: The actual refractive ratio is obtained by multiplying the scaling factor and the original refractive ratio.

4. The method according to claim 2, characterized in that, Determining the zero-position offset angle based on the offset compensation and the scaling factor includes: The zero-position offset angle is obtained based on the ratio of the offset compensation and the scaling factor.

5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: When the calibration conditions of the resolver zero position and resolver ratio are met, the motor rotor is controlled to lock sequentially at the set target electrical angles, and the measured electrical angle corresponding to each target electrical angle is obtained; The calibration conditions for the resolver zero point and resolver ratio include one of the following: The zero position or resolver ratio of the motor was detected to be lost; The zero position or resolver ratio of the motor was detected to be reset; The cumulative driving time or mileage of the vehicle containing the motor reaches a first preset threshold. When the motor is running, it is detected that the measured electrical angle or amplitude exceeds a second preset threshold. When the motor is running, the motor speed fluctuation exceeds the third preset threshold or the motor torque fluctuation exceeds the fourth preset threshold. The motor is in maintenance mode.

6. The method according to claim 5, characterized in that, The control motor rotor is sequentially locked at a set target electrical angle, and the measured electrical angle corresponding to each target electrical angle is obtained, including: Determine the target electrical angle of the motor based on its type; For each of the target electrical angles, perform the following steps: Apply d-axis current and control q-axis current to zero to generate a magnetic field whose direction coincides with the d-axis direction of the motor rotor; By adjusting the magnitude of the d-axis current, the motor rotor is locked in a mechanical position corresponding to the current target electrical angle, and the measured electrical angle corresponding to each mechanical position is obtained.

7. The method according to claim 6, characterized in that, The target electrical angles include at least four, and each target electrical angle is different, including 0°, 90°, 180° and 270°.

8. The method according to claim 1, characterized in that, The target electrical angle includes a first target electrical angle and a second target electrical angle, and the measured electrical angle includes a first measured electrical angle and a second measured electrical angle; The step of inputting the target electrical angle and the measured electrical angle into a preset calculation model and jointly calculating the zero-position offset angle and the actual resolver ratio includes: The actual resolver ratio is calculated based on the electrical angle difference between the first target electrical angle and the second target electrical angle, as well as the electrical angle difference between the second measured electrical angle and the first measured electrical angle. The zero-position offset angle is calculated based on the first target electrical angle, the first measured electrical angle, and the actual resolver ratio.

9. A calibration device for resolver zero point and resolver ratio, characterized in that, The device includes: The acquisition module is used to control the motor rotor to lock sequentially at the set target electrical angles, and to acquire the measured electrical angle corresponding to each target electrical angle; The calculation module is used to input the target electrical angle and the measured electrical angle into a preset calculation model, and jointly calculate the zero-position offset angle and the actual resolver ratio. The preset calculation model is constructed based on the preset electrical angle, the preset measured electrical angle corresponding to the preset electrical angle, and the relationship between the preset zero-position offset angle and the preset actual resolver ratio. The update module is used to update the current zero-position offset angle using the jointly calculated zero-position offset angle, and to update the current actual resolver ratio using the jointly calculated actual resolver ratio.

10. A motor controller, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the operation of the calibration method for the resolver zero point and resolver ratio as described in any one of claims 1-8.