Method for measuring and compensating cogging torque of permanent magnet synchronous motor
By establishing and fitting the cogging torque compensation model of the permanent magnet motor, and calculating and compensating the cogging torque in real time, the vibration and noise problems caused by cogging torque in the permanent magnet motor are solved, and high-precision and low-cost cogging torque compensation are achieved.
Patent Information
- Application Number
- CN202411632807.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-25
AI Technical Summary
In the prior art, cogging torque causes vibration and noise of permanent magnet motors, making it difficult to achieve precise control, and the existing compensation methods have problems such as insufficient accuracy, large data volume, and difficulty in storage.
By establishing a permanent magnet motor torque output model, parameter identification model and compensation current calculation model, collecting data for fitting, establishing a cogging torque compensation model, and calculating and compensating cogging torque in real time.
It improves the robustness and accuracy of cogging torque compensation, achieves accurate and fast compensation of cogging torque, reduces storage space requirements and costs, and is universal and easy to use.
Smart Images

Figure CN119519508A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor control, and in particular to a method for measuring and compensating cogging torque of a permanent magnet synchronous motor. Background Art
[0002] Permanent magnet synchronous motors have the advantages of high efficiency, high power density, fast response speed and brushless design. They are widely used in various fields such as aerospace, industrial automation, and new energy. Cogging torque is an inherent disturbance in the permanent magnet motor system, caused by the mutual attraction between the permanent magnet and the stator core. The size of the cogging torque shows a periodic change relative to the spatial mechanical angle of the rotation direction, and its periodic size is determined by the number of poles and slots of the permanent magnet motor.
[0003] In the process of motor control, cogging torque will cause vibration and noise of the motor, which brings great difficulties to the precise control of the motor. In the prior art, the observer method is a method for estimating and compensating cogging torque. However, due to the limited bandwidth of the disturbance observer, the estimation accuracy of fast-changing disturbances such as friction torque is poor. In addition, although the observer method has the advantages of simple structure and robustness to disturbances, its control accuracy depends on the feedback gain of the system, and high-gain feedback control will cause jitter of the control input, which is difficult to implement in engineering. Although the table lookup method can compensate for the cogging torque to a certain extent, it has a large amount of data and is difficult to store, and its compensation accuracy depends on the accuracy of the test instrument. Summary of the invention
[0004] The present invention aims to solve the technical problem in the prior art that the cogging torque causes vibration and noise in a permanent magnet motor, and provides a method for measuring and compensating the cogging torque of a permanent magnet synchronous motor.
[0005] In order to solve the above technical problems, the technical solutions of the present invention are as follows:
[0006] A method for measuring and compensating the cogging torque of a permanent magnet synchronous motor comprises the following steps:
[0007] Step 1: Establish a permanent magnet motor torque output model;
[0008] Step 2: Establish parameter identification model;
[0009] Step 3: Establish a compensation current calculation model;
[0010] Step 4: Collect compensation current data and position data;
[0011] Control the servo motor to rotate forward, and based on the parameter identification model in step 2 and the compensation current calculation model in step 3, collect the position data of multiple turns of the servo motor and the compensation current data obtained in step 3;
[0012] Step 5: Data fitting and cogging torque compensation model establishment;
[0013] Performing data fitting on the multiple turns position data and compensation current data collected in step 4, and then obtaining a fitting function, which is the cogging torque compensation model;
[0014] Step 6: Cogging torque compensation;
[0015] Add the fitting function obtained in step five to the speed loop control of the control system for feedforward control.
[0016] In the above technical solution, step one is specifically as follows:
[0017] The equation of the permanent magnet motor torque output model is:
[0018]
[0019] Where:
[0020] T l ——External load torque;
[0021] T e ——Electromagnetic torque output by the motor;
[0022] B——viscous friction coefficient;
[0023] ω r ——mechanical angular velocity;
[0024] J——moment of inertia;
[0025] n p ——Number of motor pole pairs;
[0026] ——permanent magnet flux;
[0027] i q ——Motor q-axis current.
[0028] In the above technical solution, step one further includes:
[0029] Discretize equation (1) and get:
[0030]
[0031] Among them, T s is the speed sampling period;
[0032] According to: T l (k-1) = T l (k-2)(4)
[0033] Subtracting (2) from (3) yields:
[0034]
[0035] in: λ is the identification parameter, ω r (k) is the mechanical angular velocity at time k.
[0036] In the above technical solution, step 2 is specifically as follows:
[0037] A least squares recursive parameter identification model with a forgetting factor is established, as shown in formula (6), where λ is the required identification parameter:
[0038]
[0039] in:
[0040]
[0041] Among them: y(k) is the observation matrix, is the input matrix, K 1 is the gain matrix, P(k) is the covariance matrix, X is the parameter matrix to be identified, K(k) is the algebraic matrix, I is the identity matrix, [] T is the transpose of the matrix.
[0042] In the above technical solution, step three is specifically as follows:
[0043] Let T l =λi qcom , where i qcom To compensate the current, Substituting into formula (1), the compensation current calculation model is obtained:
[0044]
[0045] In the above technical solution, in step five, when data fitting is performed on the multiple turns position data and compensation current data collected in step four, the position is the horizontal coordinate and the compensation current is the vertical coordinate.
[0046] In the above technical solution, in step five, the input of the fitting function is the horizontal coordinate, and the output of the fitting function is the fitted cogging torque compensation current.
[0047] The present invention has the following beneficial effects:
[0048] The permanent magnet synchronous motor cogging torque measurement and compensation method of the present invention does not require motor related parameters, identifies motor parameters through the recursive least square method with a forgetting factor, improves the robustness of cogging torque compensation, and calculates the cogging torque compensation current in real time based on the identification result with higher accuracy; by performing function fitting between motor position information and the cogging torque compensation current, the cogging torque compensation current is calculated in real time based on the position information, and compared with the observer method, the compensation torque is more stable and accurate, and the dynamic performance is better; compared with the table lookup method, the method of the present invention occupies less storage space, has higher accuracy, does not need to rely on external measuring instruments and equipment, has lower cost, and has universality, ease of operation, and parameter robustness. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0050] Figure 1 Schematic diagram of the cogging torque compensation parameter identification structure.
[0051] Figure 2 Schematic diagram of the compensation structure of the tooth groove torque fitting function.
[0052] Figure 3 Schematic diagram of actual position and torque compensation current.
[0053] Figure 4 It is a schematic diagram of the actual position and torque compensation current fitting curve.
[0054] Figure 5 Schematic diagram of the motor speed waveform before cogging torque compensation.
[0055] Figure 6 This is a schematic diagram of the motor speed waveform after cogging torque compensation. DETAILED DESCRIPTION
[0056] The inventive concept of the present invention is:
[0057] The permanent magnet synchronous motor cogging torque measurement and compensation method of the present invention accurately measures the cogging torque based on parameter identification, and establishes a cogging torque compensation model to improve the running stability and control accuracy of the motor.
[0058] The permanent magnet synchronous motor cogging torque measurement and compensation method of the present invention identifies motor parameters by a recursive least square method with a forgetting factor, thereby improving the accuracy and real-time performance of parameter identification, and calculates the cogging torque compensation current by motor position information and current information. Finally, the cogging torque compensation current is fitted by a fitting function, a cogging torque compensation model is established, and accurate and rapid compensation for the cogging torque is achieved.
[0059] The present invention is described in detail below with reference to the accompanying drawings.
[0060] The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor of the present invention comprises the following steps:
[0061] Step 1: Establish a permanent magnet motor torque output model;
[0062] The torque model equation of the surface mounted permanent magnet synchronous motor is:
[0063]
[0064] Where:
[0065] T l ——External load torque;
[0066] T e ——Electromagnetic torque output by the motor;
[0067] B——viscous friction coefficient;
[0068] ω r ——mechanical angular velocity;
[0069] J——moment of inertia;
[0070] n p ——Number of motor pole pairs;
[0071] ——permanent magnet flux;
[0072] i q ——Motor q-axis current.
[0073] Since the velocity sampling frequency is high enough, the viscous damping coefficient can be ignored, and the discretization of equation (1) yields:
[0074]
[0075] Where T s is the speed sampling period. Since the sampling period is very small, the default is:
[0076] T l (k-1) = T l (k-2) (4)
[0077] Subtracting formula (2) from formula (3), we get:
[0078]
[0079] in: λ is the identification parameter, ω r (k) is the mechanical angular velocity at time k.
[0080] Step 2: Establish parameter identification model;
[0081] A least squares recursive parameter identification model with a forgetting factor is established, as shown in formula (6), where λ is the required identification parameter:
[0082]
[0083] in:
[0084]
[0085] Among them: y(k) is the observation matrix, is the input matrix, K 1 is the gain matrix, P(k) is the covariance matrix, X is the parameter matrix to be identified, K(k) is the algebraic matrix, I is the identity matrix, [] T is the transpose of the matrix.
[0086] Step 3: Establish a compensation current calculation model;
[0087] Let T l =λi qcom , where i qcom To compensate the current, Substituting into formula (1), the compensation current calculation model is obtained:
[0088]
[0089] Step 4: Collect compensation current data and position data;
[0090] The servo motor is controlled to rotate forward, and based on the parameter identification model and the compensation current calculation model described in steps one to three, the position data of multiple turns of the servo motor and the compensation current data obtained in step three are collected.
[0091] Step 5: Data fitting and cogging torque compensation model establishment;
[0092] The multiple turns position data and compensation current data collected in step 4 are fitted, where the position is the horizontal coordinate and the compensation current is the vertical coordinate; then a fitting function (i.e., the cogging torque compensation model) is obtained, where the horizontal coordinate is the function input and the function output is the fitted cogging torque compensation current.
[0093] Step 6: Cogging torque compensation;
[0094] Add the fitting function obtained in step five to the speed loop control of the control system for feedforward control.
[0095] The specific implementation modes of the present invention will be further described in detail below with reference to the accompanying drawings.
[0096] like Figure 1 and 2 As shown, Figure 1 This is the least squares parameter identification and compensation current calculation structure diagram. After fitting the obtained compensation current and position information, the cogging torque compensation fitting function is added to the speed loop output, such as Figure 2 shown.
[0097] In this embodiment, the compensated motor has 81 slots and 10 pairs of poles. First, the compensation current and rotor position information are collected. At this time, the motor maintains a low speed of 0.01 rad / s. The compensation current is calculated in real time by the parameter identification model and the compensation current calculation model. The compensation current and rotor position information are as follows: Figure 3 As shown. Perform function fitting on position and torque, and the result after fitting is shown in Figure 4 shown.
[0098] Figure 5 is the motor speed output waveform without cogging torque compensation, Figure 6 This is the motor speed waveform after adding the cogging torque compensation model based on the method of the present invention. By comparing the two figures, it can be seen that the method of the present invention has a good compensation effect on the cogging torque of the permanent magnet synchronous motor.
[0099] The permanent magnet synchronous motor cogging torque measurement and compensation method of the present invention does not require motor related parameters, identifies motor parameters through the recursive least square method with a forgetting factor, improves the robustness of cogging torque compensation, and calculates the cogging torque compensation current in real time based on the identification result with higher accuracy; by performing function fitting between motor position information and the cogging torque compensation current, the cogging torque compensation current is calculated in real time based on the position information, and compared with the observer method, the compensation torque is more stable and accurate, and the dynamic performance is better; compared with the table lookup method, the method of the present invention occupies less storage space, has higher accuracy, does not need to rely on external measuring instruments and equipment, has lower cost, and has universality, ease of operation, and parameter robustness.
[0100] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.
Claims
1. A method for measuring and compensating the cogging torque of a permanent magnet synchronous motor, characterized in that: The following steps are involved: Step 1: Establish a permanent magnet motor torque output model; Step 2: Establish parameter identification model; Step 3: Establish a compensation current calculation model; Step 4: Collect compensation current data and position data; Control the servo motor to rotate forward, and based on the parameter identification model in step 2 and the compensation current calculation model in step 3, collect the position data of multiple turns of the servo motor and the compensation current data obtained in step 3; Step 5: Data fitting and cogging torque compensation model establishment; Performing data fitting on the multiple turns position data and compensation current data collected in step 4, and then obtaining a fitting function, which is the cogging torque compensation model; Step 6: Cogging torque compensation; Add the fitting function obtained in step five to the speed loop control of the control system for feedforward control.
2. The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor according to claim 1, characterized in that: Step 1 is as follows: The equation of the permanent magnet motor torque output model is: Where: T l ——External load torque; T e ——Electromagnetic torque output by the motor; B——viscous friction coefficient; ω r ——mechanical angular velocity; J——moment of inertia; n p ——Number of motor pole pairs; ——permanent magnet flux; i q ——Motor q-axis current.
3. The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor according to claim 2, characterized in that: Step one further includes: Discretize equation (1) and get: Among them, T s is the speed sampling period; According to: T l (k-1) = T l (k-2)(4) Subtracting (2) from (3) yields: in: λ is the identification parameter, ω r (k) is the mechanical angular velocity at time k.
4. The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor according to any one of claims 1 to 3, characterized in that: Step 2 is as follows: A least squares recursive parameter identification model with a forgetting factor is established, as shown in formula (6), where λ is the required identification parameter: in: Among them: y(k) is the observation matrix, is the input matrix, K1 is the gain matrix, P(k) is the covariance matrix, X is the parameter matrix to be identified, K(k) is the algebraic matrix, I is the identity matrix, [] T is the transpose of the matrix.
5. The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor according to claim 3, characterized in that: Step three is as follows: Let T l =λi qcom , where i qcom To compensate the current, Substituting into formula (1), the compensation current calculation model is obtained:
6. The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor according to claim 1, characterized in that: In step 5, when data fitting is performed on the multiple turns position data and compensation current data collected in step 4, the position is the horizontal coordinate and the compensation current is the vertical coordinate.
7. The method for measuring and compensating the cogging torque of a permanent magnet synchronous motor according to claim 6, characterized in that: In step five, the input of the fitting function is the abscissa, and the output of the fitting function is the fitted cogging torque compensation current.