A permanent magnet synchronous motor electrical angle calibration method, evaluation method and system

By performing electrical angle calibration on the permanent magnet synchronous motor and using the remainder operation and standard deviation evaluation of the encoder data, the instability problem of the traditional calibration method is solved, and the accuracy of the electrical angle calibration and the performance of the closed-loop control are improved.

CN114157186BActive Publication Date: 2024-09-20CHANGCHUN INST OF OPTICS FINE MECHANICS & PHYSICS CHINESE ACAD OF SCI
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202111374990.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-19
Publication Date
2024-09-20
Estimated Expiration
2041-11-19

AI Technical Summary

Technical Problem

The electrical angle calibration method of traditional permanent magnet synchronous motors is unstable, resulting in inaccurate electrical angle calibration results and affecting the closed-loop control characteristics of the motor.

Method used

By determining the relationship between the motor rotation direction and the encoder installation direction, recording the encoder data when the motor rotates forward and reverse, performing a remainder operation to calculate the real-time electrical angle value of the motor, and evaluating the accuracy of the calibration results through the arithmetic mean and standard deviation. properties, and eliminate error data to improve calibration accuracy.

Benefits of technology

It achieves accurate calibration of the electrical angle of the permanent magnet synchronous motor, improves the calibration accuracy and the control characteristics of the closed-loop control, and avoids the problem of inaccurate zero calibration caused by installation errors and other factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114157186B
    Figure CN114157186B
Patent Text Reader

Abstract

The present invention relates to the technical field of electrical angle calibration of AC motors, and in particular to an electrical angle calibration method, an evaluation method and a system thereof for a permanent magnet synchronous motor. The present invention accurately calculates the real-time electrical angle of the motor by calibrating the forward and reverse directions of the multi-pole electrical angle of the motor, and can judge the test data to eliminate the problem of inaccurate zero calibration caused by other factors. After obtaining accurate test results, the calibration accuracy of the motor electrical angle can be effectively improved, and the control characteristics of the motor during closed-loop control can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electrical angle calibration of AC motors, and in particular to an electrical angle calibration method, an evaluation method and a system thereof for a permanent magnet synchronous motor. Background Art

[0002] Traditionally, brushed DC motors are widely used. However, due to problems such as brush wear and sparks generated during motor commutation, brushed motors are not suitable for technical fields with high reliability requirements such as aerospace.

[0003] The stator of the AC permanent magnet synchronous motor (hereinafter referred to as permanent magnet synchronous motor) is a coil and the rotor is a permanent magnet. It no longer contains mechanical brushes and adopts electronic commutation technology. It has the characteristics of high power density, low moment of inertia and high reliability. With the development of microelectronics technology, sensor technology and control theory, permanent magnet synchronous motors have been increasingly widely used.

[0004] Permanent magnet synchronous motors are generally made into multi-pole structures, and each pole corresponds to an electrical angle change of 0° to 360°. Assuming that the number of pole pairs of the motor is N, when the motor rotates one circle, the mechanical angle changes once within 0° to 360°, and the electrical angle changes N times within 0° to 360°. When the permanent magnet motor is in use, an encoder (which can be an absolute or incremental encoder) is generally installed coaxially with the motor. Its control methods are divided into PMSM control method and pulse width excitation control method. Usually, after the encoder is coaxially connected to the rotor, due to the arbitrariness of its installation, the initial relationship between the absolute position signal and the motor shaft is random and unknown. Therefore, after the encoder is installed, the electrical angle must be calibrated first to establish a one-to-one correspondence between the motor electrical angle and the encoder code value, and then the control algorithm is used to achieve the purpose of controlling the motor. However, conventional calibration methods are unstable, and the calibration results of the electrical angle are often inaccurate. Summary of the invention

[0005] The main technical problem solved by the present invention is to provide a method for calibrating the electrical angle of a permanent magnet synchronous motor.

[0006] A method and system for calibrating and evaluating an electrical angle of a permanent magnet synchronous motor.

[0007] In order to solve the above technical problems, a technical solution adopted by the present invention is: to provide an electrical angle calibration method for a permanent magnet synchronous motor, which includes the following steps:

[0008] Step S1, determining the relationship between the motor rotation direction and the encoder installation direction;

[0009] Step S2, the motor rotates forward, and each time the given motor electrical angle reaches zero, the encoder data is recorded while the motor position is stable, and the encoder forward data value is obtained; the motor rotates reversely, and each time the given motor electrical angle reaches zero, the encoder data is recorded while the motor position is stable, and the encoder reverse data value is obtained;

[0010] Step S3, performing remainder operations on the encoder forward data value and the encoder reverse data value respectively according to the number of bits and the code value variation range of the encoder, so as to calculate the electrical angle calculation value to be compensated when the rotor of the motor points to the electrical angle zero position;

[0011] Step S4, performing a remainder operation on the real-time sampling value of the encoder with respect to the number of pole pairs of the motor to obtain its remainder value, and then obtaining the real-time electrical angle value of the motor based on the remainder value of the motor electrical angle calculation value and the real-time sampling value of the encoder.

[0012] As an improvement of the present invention, in step S1, if the encoder output value B is BMQ To change from small to large, record the encoder data value as B=B BMQ , if the encoder output value changes from large to small, then the encoder data value B = 2 M -B BMQ , where the number of bits of the encoder is M.

[0013] As a further improvement of the present invention, in step S2, the motor is rotated in a forward open-loop control, and the given motor electrical angle θ increases by 1° each time, the motor rotates forward, and the given motor electrical angle θ changes cyclically within the range of 0° to 360°. Each time the given motor electrical angle θ reaches zero, the encoder data is recorded while the motor position is stable, and a total of N encoder forward data values ​​are obtained, which are recorded as x 1 ~x N , where N is the number of pole pairs of the motor.

[0014] As a further improvement of the present invention, in step S2, the motor is rotated in the reverse open loop control, the given motor electrical angle θ is reduced by 1° each time, the motor rotates in the reverse direction, and the given motor electrical angle θ changes cyclically within the range of 0° to 360°. Each time the given motor electrical angle θ reaches the zero position, the encoder data is recorded while the motor position is stable, and a total of N encoder reverse data values ​​are obtained, which are recorded as y 1 ~y N .

[0015] As a further improvement of the present invention, in step S3, the range of the encoder code value change in each pole of the motor is m=2 M / N; encoder positive data value x 1 ~x N and encoder reverse data value y1 ~y N Perform remainder operations on m respectively to obtain x' 1 ~x' N ,y' 1 ~y' N ; Thus, it is calculated that the electrical angle value to be compensated when the motor's rotor points to the electrical angle zero position is:

[0016]

[0017] As a further improvement of the present invention, in step S4, the real-time sampling value B of the encoder is subjected to a remainder operation on N to obtain its remainder value B', and then the real-time electrical angle of the motor is obtained according to the remainder value of the motor electrical angle calculation value and the real-time sampling value of the encoder:

[0018]

[0019] A method for evaluating the electrical angle calibration of a permanent magnet synchronous motor, which evaluates the calibration result of the method for evaluating the electrical angle calibration of a permanent magnet synchronous motor according to any one of claims 1 to 6, comprising the following steps:

[0020] Step N1, respectively averaging the remainder values ​​of the encoder forward data value and the encoder reverse data value in step S3, thereby obtaining the arithmetic mean values ​​of the encoder forward data value and the encoder reverse data value;

[0021] Step N2, according to the arithmetic mean of the encoder forward data value and the encoder reverse data value, respectively calculate the standard deviation of the remainder of the encoder forward data value and the encoder reverse data value, and respectively obtain the standard deviation of the encoder forward data value and the encoder reverse data value;

[0022] Step N3, if the absolute value of the encoder forward data value and the arithmetic mean of the encoder forward data value is greater than 3 times the standard deviation of the encoder forward data value, the encoder forward data value is removed and then calculated or recalculated; if the absolute value of the encoder reverse data value and the arithmetic mean of the encoder reverse data value is greater than 3 times the standard deviation of the encoder reverse data value, the encoder reverse data value is removed and then calculated or recalculated;

[0023] Step N4: compare the standard deviation values ​​of the encoder forward data value and the encoder reverse data value. If the two are close, it means that the electrical angle calibration result is accurate and reliable, otherwise recalibrate.

[0024] As a further improvement of the present invention, in step N1, the remainder value x' of the encoder forward data value is calculated respectively. 1 ~x' NThe remainder value y' of the encoder reverse data value 1 ~y' N The arithmetic mean of is as follows:

[0025]

[0026]

[0027] As a further improvement of the present invention, in step N2, the remainder x' of the encoder forward data value is calculated respectively. 1 ~x' N The remainder value y' of the encoder reverse data value 1 ~y' N The standard deviation of is as follows:

[0028]

[0029]

[0030] An electrical angle calibration and evaluation system for a permanent magnet synchronous motor, comprising:

[0031] A recording module, used for recording encoder data and obtaining encoder data value;

[0032] The remainder module is used to perform remainder operation on the encoder data value, so as to calculate the electrical angle calculation value that needs to be compensated when the rotor of the motor points to the electrical angle zero position;

[0033] A calculation module is used to obtain the real-time electrical angle value of the motor according to the remainder value of the calculated value of the motor electrical angle and the real-time sampling value of the encoder;

[0034] An averaging module is used to perform averaging calculation on the residual values ​​of the encoder data values ​​to obtain the arithmetic mean value of the encoder data values;

[0035] A difference calculation module is used to calculate the standard deviation of the remainder of the encoder data value to obtain the standard deviation value of the encoder data value;

[0036] The judgment module is used to compare the standard deviation of the encoder data values ​​of the motor forward and reverse rotation to accurately judge the electrical angle calibration result.

[0037] The beneficial effects of the present invention are as follows: compared with the prior art, the present invention can accurately calculate the real-time electrical angle of the motor by calibrating the forward and reverse directions of the motor's multi-pole electrical angle, and can evaluate the test data to eliminate the problem of inaccurate zeroing caused by other factors. After obtaining accurate test results, the calibration accuracy of the motor's electrical angle can be effectively improved, and the control characteristics of the motor during closed-loop control can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A flowchart of the method for calibrating the electrical angle of a permanent magnet synchronous motor of the present invention;

[0039] Figure 2 A flowchart of the method for calibrating and evaluating the electrical angle of a permanent magnet synchronous motor of the present invention;

[0040] Figure 3 It is a conventional calibration process of the electrical angle of a permanent magnet synchronous motor in the prior art;

[0041] Figure 4 This is a block diagram of the permanent magnet synchronous motor test environment in the present invention;

[0042] Figure 5 This is a block diagram of the motor current loop closed-loop control in the present invention;

[0043] Reference numerals: 100 - controller, 200 - motor driver, 300 - permanent magnet synchronous motor, 400 - absolute encoder, 500 - current sensor, 600 - AD converter, 700 - analog signal processing circuit. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0045] Please refer to Figures 1 to 5 , a method for calibrating the electrical angle of a permanent magnet synchronous motor of the present invention comprises the following steps:

[0046] Step S1, determining the relationship between the motor rotation direction and the encoder installation direction;

[0047] Step S2, the motor rotates forward, and each time the given motor electrical angle reaches zero, the encoder data is recorded while the motor position is stable, and the encoder forward data value is obtained; the motor rotates reversely, and each time the given motor electrical angle reaches zero, the encoder data is recorded while the motor position is stable, and the encoder reverse data value is obtained;

[0048] Step S3, performing remainder operations on the encoder forward data value and the encoder reverse data value respectively according to the number of bits and the code value variation range of the encoder, so as to calculate the electrical angle calculation value to be compensated when the rotor of the motor points to the electrical angle zero position;

[0049] Step S4, performing a remainder operation on the real-time sampling value of the encoder with respect to the number of pole pairs of the motor to obtain its remainder value, and then obtaining the real-time electrical angle value of the motor based on the remainder value of the motor electrical angle calculation value and the real-time sampling value of the encoder.

[0050] Among them, in step S1, if the motor rotates forward, the encoder output value B BMQ To change from small to large, record the encoder data value as B=B BMQ , if the encoder output value changes from large to small, then the encoder data value B = 2 M -B BMQ , where the number of bits of the encoder is M.

[0051] In step S2, the motor is controlled to rotate in a forward open loop. The given motor electrical angle θ increases by 1° each time. The motor rotates forward. The given motor electrical angle θ changes cyclically within the range of 0° to 360°. Each time the given motor electrical angle θ reaches zero, the encoder data is recorded while the motor position is stable. A total of N encoder forward data values ​​are obtained, which are recorded as x. 1 ~x N , where N is the number of pole pairs of the motor; the motor is controlled to rotate in the reverse open loop, and the given motor electrical angle θ is reduced by 1° each time, and the motor rotates in the reverse direction. The given motor electrical angle θ changes cyclically in the range of 0° to 360°. Each time the given motor electrical angle θ reaches zero, the encoder data is recorded while the motor position is stable, and a total of N encoder reverse data values ​​are obtained, which are recorded as y 1 ~y N .

[0052] In the present invention, in step S3, the range of the encoder code value change in each pole of the motor is m=2 M / N; encoder positive data value x 1 ~x N and encoder reverse data value y 1 ~y N Perform remainder operations on m respectively to obtain x' 1 ~x' N ,y' 1 ~y' N ; Thus, it is calculated that the electrical angle value to be compensated when the motor's rotor points to the electrical angle zero position is:

[0053]

[0054] In step S4, the encoder real-time sampling value B is modulo N to obtain its modulo value B', and then the real-time electrical angle of the motor is obtained according to the modulo value of the motor electrical angle calculation value and the real-time sampling value of the encoder:

[0055]

[0056] Specifically, in the present invention, a motor testing environment is built (this testing environment is a general mature technology), which mainly includes the following parts: a controller, a motor driver, a permanent magnet synchronous motor, an absolute encoder coaxially installed with the permanent magnet synchronous motor, a current sensor, an AD conversion circuit, an analog signal processing circuit, etc.

[0057] 1. The relationship between the various parts in the motor test environment is as follows:

[0058] The controller collects data from the AD conversion circuit to calculate the three-phase current data of the motor; the controller obtains the mechanical absolute angle information of the motor by collecting data from the absolute encoder; after executing the PMSM algorithm, the controller outputs the motor control signal to the motor driver to drive the motor to rotate; the signal from the current sensor is sent to the AD converter for conversion via the signal processing circuit.

[0059] 2. Write the open-loop control program of the permanent magnet motor, such as Figure 5 As shown in the figure, the dotted box part is implemented by software in the controller, including Clarke transformation, Park transformation, I Park transformation, two current loop PI controllers, and SVPWM control part. In the figure, Iqref is the quadrature-axis current, Idref is the direct-axis current, and θ is the given motor electrical angle; the two PI controllers have the same parameters and are adjusted by conventional methods; when the motor works normally, θ is calculated from the encoder data, Iqref is the expected motor torque, and Idref=0.

[0060] When calibrating the motor electrical angle, Iqref = 0, Idref is set to a value smaller than the rated current of the motor. At this time, the software sets θ to change slowly from 0° to 360°, and the motor rotates following the change of θ. Under this condition, the motor electrical angle can be calibrated to obtain the conversion relationship between the encoder electrical angle and the encoder (using this method to control the motor cannot achieve motor speed control, and the control bandwidth is very low, so it is only used for motor zeroing, not for actual motor control);

[0061] 3. Determine the parameters

[0062] According to the permanent magnet synchronous motor parameter manual, determine the pole pair number N of the motor to be used; according to the permanent magnet synchronous motor parameter manual, determine the motor rated current I, and select Idref as a value less than I as the Idref input value for calibrating the electrical angle; according to the absolute encoder parameter manual, determine the encoder bit number as M.

[0063] In the present invention, the relationship between the motor rotation direction and the encoder installation direction is determined. If the encoder output value B is BMQ To change from small to large, record the encoder data value as B=B BMQ, if the encoder output value changes from large to small, then the encoder data value B = 2 M -B BMQ ;

[0064] 4. Motor electrical angle calibration and calculation

[0065] The motor rotates in the forward open loop control mode. The angle θ is set to increase by 1° each time. The motor rotates forward and the angle θ changes in a cycle within the range of 0° to 360°. Each time the angle θ reaches zero, the encoder data is recorded while the motor position is stable. A total of N encoder data values ​​are obtained, which are recorded as x 1 ~x N ;

[0066] The motor rotates in the reverse open loop. The θ angle is reduced by 1° each time. The motor rotates in the reverse direction. The θ angle changes cyclically in the range of 0° to 360°. Each time θ reaches zero, the encoder data is recorded while the motor position is stable. A total of N encoder data values ​​are obtained, which are recorded as y 1 ~y N ;

[0067] The number of bits of the absolute encoder is M, and the formula for converting the encoder code value into mechanical angle is:

[0068]

[0069] The range of the encoder code value change in each pole of the motor is m=2 M / N;

[0070] x 1 ~x N ,y 1 ~y N Perform remainder operations on m respectively to obtain x' 1 ~x' N ,y' 1 ~y' N ;

[0071] The calculated electrical angle value to be compensated when the motor's rotor points to the electrical angle zero position is:

[0072]

[0073] Perform a remainder operation on the encoder real-time sampling value B with respect to N to obtain a remainder value B';

[0074] The real-time electrical angle of the motor is obtained by taking the remainder of the calculated value of the motor electrical angle and the real-time sampling value of the encoder:

[0075]

[0076] At this point, the motor's electrical angle calibration is complete, and the calculated real-time electrical angle value is used as Figure 5 The input angle value θ in , Iqref is set to the target torque value, and Idref is set to 0, and the current closed-loop control algorithm of the motor can be implemented normally;

[0077] The current electrical angle calibration method is simple. First, an initial electrical angle value of the motor is obtained, and then all electrical angles are calculated according to the calculation formula. This method fails to evaluate the electrical angle calibration results. During use, if the parameters are improperly selected or affected by external factors, incorrect calibration results may be obtained, which may cause serious consequences such as system runaway and stall during motor operation. In high-precision use, inaccurate electrical angle calibration results will affect the accuracy and performance of the control system.

[0078] The present invention provides a method for evaluating the electrical angle calibration of a permanent magnet synchronous motor, and evaluating the calibration result of the above-mentioned method for evaluating the electrical angle calibration of a permanent magnet synchronous motor, comprising the following steps:

[0079] Step N1, respectively averaging the remainder values ​​of the encoder forward data value and the encoder reverse data value in step S3, thereby obtaining the arithmetic mean values ​​of the encoder forward data value and the encoder reverse data value;

[0080] Step N2, according to the arithmetic mean of the encoder forward data value and the encoder reverse data value, respectively calculate the standard deviation of the remainder of the encoder forward data value and the encoder reverse data value, and respectively obtain the standard deviation of the encoder forward data value and the encoder reverse data value;

[0081] Step N3, if the absolute value of the encoder forward data value and the arithmetic mean of the encoder forward data value is greater than 3 times the standard deviation of the encoder forward data value, the encoder forward data value is removed and then calculated or recalculated; if the absolute value of the encoder reverse data value and the arithmetic mean of the encoder reverse data value is greater than 3 times the standard deviation of the encoder reverse data value, the encoder reverse data value is removed and then calculated or recalculated;

[0082] Step N4: compare the standard deviation values ​​of the encoder forward data value and the encoder reverse data value. If the two are close, it means that the electrical angle calibration result is accurate and reliable, otherwise recalibrate.

[0083] In step N1, the remainder x' of the encoder forward data value is calculated respectively. 1 ~x' N The remainder value y' of the encoder reverse data value 1 ~y' N The arithmetic mean of is as follows:

[0084]

[0085]

[0086] In step N2, the remainder x' of the encoder forward data value is calculated respectively. 1 ~x' N The remainder value y' of the encoder reverse data value 1 ~y' N The standard deviation of is as follows:

[0087]

[0088]

[0089] Specifically, due to the influence of factors such as the test environment, test method or test equipment personnel, the calibration results may be affected by gross errors and random errors. The calibration results of the electrical angle can be evaluated as follows:

[0090] Calculate x' separately 1 ~x' N and y' 1 ~y' N The arithmetic mean of is as follows:

[0091]

[0092]

[0093] Calculate x' separately 1 ~x' N and y' 1 ~y' N The standard deviation of is as follows:

[0094]

[0095]

[0096] According to the Léida criterion, the factors affecting the gross error are judged as follows:

[0097] If exists or Then determine x i or i If the data is unreliable, it is necessary to remove the data and then recalculate, or re-test to obtain the data;

[0098] The random errors of the measured data are processed as follows:

[0099] According to σ x Size can be matched To judge, x The smaller the value, the The closer to the true value of the measured value, the make judgments;

[0100] like and If the test conditions are met, and When the two values ​​are close, it means that the electrical angle calibration result is accurate and reliable. Otherwise, the calibration result is affected by installation accuracy or mechanical fastening factors during the zeroing process, and it needs to be processed and retested.

[0101] In the present invention, the electrical angle positioning of the permanent magnet synchronous motor is performed, and the accuracy of the electrical angle calibration result can be effectively improved while effectively improving the credibility of the electrical angle calibration result. At the same time, the gross error and random error of the calibration process can be evaluated.

[0102] The present invention also provides an electrical angle calibration and evaluation system for a permanent magnet synchronous motor, comprising:

[0103] A recording module, used for recording encoder data and obtaining encoder data value;

[0104] The remainder module is used to perform remainder operation on the encoder data value, so as to calculate the electrical angle calculation value that needs to be compensated when the rotor of the motor points to the electrical angle zero position;

[0105] A calculation module is used to obtain the real-time electrical angle value of the motor according to the remainder value of the calculated value of the motor electrical angle and the real-time sampling value of the encoder;

[0106] An averaging module is used to perform averaging calculation on the residual values ​​of the encoder data values ​​to obtain the arithmetic mean value of the encoder data values;

[0107] A difference calculation module is used to calculate the standard deviation of the remainder value of the encoder data value to obtain the standard deviation value of the encoder data value;

[0108] The judgment module is used to compare the standard deviation of the encoder data values ​​of the motor forward and reverse rotation to accurately judge the electrical angle calibration result.

[0109] In the present invention, by calibrating the forward and reverse directions of the motor's multi-pole electrical angle, the test data can be evaluated first to eliminate the problem of inaccurate zeroing caused by other factors. After obtaining accurate test results, the calibration accuracy of the motor's electrical angle can be effectively improved, and the control characteristics of the motor during closed-loop control can be improved.

[0110] The present invention has been verified and tested in laboratory experiments. The present invention effectively improves the electrical angle calibration accuracy of the permanent magnet synchronous motor and avoids the influence of errors caused by installation and other reasons. The conclusions are as follows:

[0111] 1. When the given parameter Idref is too small, the difference in the electrical angle zero position of the motor each time it stops is large. After appropriately increasing the given value of Idref, the position difference becomes smaller.

[0112] 2. When the encoder and the motor shaft are loosely fixed, the result is judged to be unreliable based on the criteria for the factors affecting the gross error. After tightening and reinforcing, a qualified test result is obtained.

[0113] 3. After using the electrical angle calibration method of the present invention, the motor closed-loop control is smooth, and no related problems such as calibration electrical angle error occur, which proves that the method is reasonably designed and feasible.

[0114] The present invention uses an absolute encoder to establish an electrical angle calibration method for a permanent magnet synchronous motor. When implementing, an incremental encoder can also be used to implement electrical angle calibration. Since it is an incremental encoder, the calibration process is replaced on the basis of the absolute encoder as follows:

[0115] The motor rotates in the forward open loop. The angle θ is set to increase by 1° each time. The motor rotates forward and the angle θ changes in a cycle within the range of 0 to 360°. Each time when θ reaches zero, the number of pulses of the incremental encoder is recorded while the motor position is stable. i Then, the pulse number is cleared and recounted to obtain N encoder data values, recorded as x 1 ~x N ;

[0116] Reverse open-loop control of motor rotation, the θ angle setting is reduced by 1° each time, the motor rotates in the opposite direction, and the θ angle changes cyclically within the range of 0 to 360°. Each time when θ reaches zero, the number of pulses y of the incremental encoder is recorded while waiting for the motor position to stabilize. i , then clear the pulse number and recount it to get N encoder data values, recorded as y 1 ~y N ; The other steps remain unchanged.

[0117] The above description is only an implementation mode of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A method for calibrating the electrical angle of a permanent magnet synchronous motor, characterized in that: The steps include: Step S1, determining the relationship between the motor rotation direction and the encoder installation direction; Step S2, the motor rotates forward, and each time the given motor electrical angle reaches zero, the encoder data is recorded while the motor position is stable, and the encoder forward data value is obtained; the motor rotates reversely, and each time the given motor electrical angle reaches zero, the encoder data is recorded while the motor position is stable, and the encoder reverse data value is obtained; Step S3, performing remainder operations on the encoder forward data value and the encoder reverse data value respectively according to the number of bits and the code value variation range of the encoder, so as to calculate the electrical angle calculation value to be compensated when the rotor of the motor points to the electrical angle zero position; Step S4, performing a remainder operation on the real-time sampling value of the encoder with respect to the number of pole pairs of the motor to obtain its remainder value, and then obtaining the real-time electrical angle value of the motor based on the remainder value of the motor electrical angle calculation value and the real-time sampling value of the encoder.

2. The method for calibrating the electrical angle of a permanent magnet synchronous motor according to claim 1, characterized in that: In step S1, if the motor rotates forward, the encoder output value B BMQ To change from small to large, record the encoder data value as B=B BMQ , if the encoder output value changes from large to small, then the encoder data value B = 2 M -B BMQ , where the number of bits of the encoder is M.

3. The method for calibrating the electrical angle of a permanent magnet synchronous motor according to claim 2, characterized in that: In step S2, the motor is controlled to rotate in a forward open loop. The given motor electrical angle θ increases by 1° each time. The motor rotates forward. The given motor electrical angle θ changes cyclically in the range of 0° to 360°. Each time the given motor electrical angle θ reaches zero, the encoder data is recorded while the motor position is stable. A total of N encoder forward data values ​​are obtained, which are recorded as x1 to x N , where N is the number of pole pairs of the motor.

4. The method for calibrating the electrical angle of a permanent magnet synchronous motor according to claim 3, characterized in that: In step S2, the motor is controlled to rotate in the reverse open loop. The given motor electrical angle θ is reduced by 1° each time, and the motor rotates in the reverse direction. The given motor electrical angle θ changes cyclically in the range of 0° to 360°. Each time the given motor electrical angle θ reaches zero, the encoder data is recorded while the motor position is stable. A total of N encoder reverse data values ​​are obtained, which are recorded as y1 to y N .

5. The method for calibrating the electrical angle of a permanent magnet synchronous motor according to claim 4, characterized in that: In step S3, the range of the encoder code value change in each pole of the motor is m=2 M / N; encoder positive data value x1~x N And the encoder reverse data value y1~y N Perform remainder operations on m respectively to obtain x'1~x' N ,y'1~y' N ; Thus, it is calculated that the electrical angle value to be compensated when the motor's rotor points to the electrical angle zero position is:

6. The method for calibrating the electrical angle of a permanent magnet synchronous motor according to claim 5, characterized in that: In step S4, the encoder real-time sampling value B is modulo N to obtain its modulo value B', and then the real-time electrical angle of the motor is obtained according to the modulo value of the motor electrical angle calculation value and the real-time sampling value of the encoder:

7. A method for evaluating the electrical angle calibration of a permanent magnet synchronous motor, which evaluates the calibration result of the method for evaluating the electrical angle calibration of a permanent magnet synchronous motor according to any one of claims 1 to 6, characterized in that: The steps include: Step N1, respectively averaging the remainder values ​​of the encoder forward data value and the encoder reverse data value in step S3, thereby obtaining the arithmetic mean values ​​of the encoder forward data value and the encoder reverse data value; Step N2, according to the arithmetic mean of the encoder forward data value and the encoder reverse data value, respectively calculate the standard deviation of the remainder of the encoder forward data value and the encoder reverse data value, and respectively obtain the standard deviation of the encoder forward data value and the encoder reverse data value; Step N3, if the absolute value of the encoder forward data value and the arithmetic mean of the encoder forward data value is greater than 3 times the standard deviation of the encoder forward data value, the encoder forward data value is removed and then calculated or recalculated; if the absolute value of the encoder reverse data value and the arithmetic mean of the encoder reverse data value is greater than 3 times the standard deviation of the encoder reverse data value, the encoder reverse data value is removed and then calculated or recalculated; Step N4: compare the standard deviation values ​​of the encoder forward data value and the encoder reverse data value. If the two are close, it means that the electrical angle calibration result is accurate and reliable, otherwise recalibrate.

8. The method for calibrating and evaluating the electrical angle of a permanent magnet synchronous motor according to claim 7, characterized in that: In step N1, the remainder values ​​x'1 to x' of the encoder forward data value are calculated respectively. N The remainder y'1~y' of the encoder reverse data value N The arithmetic mean of is as follows:

9. The method for calibrating and evaluating the electrical angle of a permanent magnet synchronous motor according to claim 8, characterized in that: In step N2, the remainder values ​​x'1 to x' of the encoder forward data values ​​are calculated respectively. N The remainder y'1~y' of the encoder reverse data value N The standard deviation of is as follows:

10. An electrical angle calibration and evaluation system for a permanent magnet synchronous motor, characterized in that: include: A recording module, used for recording encoder data and obtaining encoder data value; The remainder module is used to perform remainder operation on the encoder data value, so as to calculate the electrical angle calculation value that needs to be compensated when the rotor of the motor points to the electrical angle zero position; A calculation module is used to obtain the real-time electrical angle value of the motor according to the remainder value of the calculated value of the motor electrical angle and the real-time sampling value of the encoder; An averaging module is used to perform averaging calculation on the residual values ​​of the encoder data values ​​to obtain the arithmetic mean value of the encoder data values; A difference calculation module is used to calculate the standard deviation of the remainder value of the encoder data value to obtain the standard deviation value of the encoder data value; The judgment module is used to compare the standard deviation of the encoder data values ​​of the motor forward and reverse rotation to accurately judge the electrical angle calibration result.

Citation Information

Patent Citations

  • Permanent magnet synchronous motor phase sequence correction method and device thereof

    CN108322103A

  • A method for detecting the rotational speed of a motor

    CN109245652A

  • Brushless motor driving system and method

    CN111106765A

  • Rotor initial angle detection method of incremental encoder permanent magnet synchronous motor

    CN111262495A

  • Drive apparatus, press machine slide drive apparatus and method thereof

    US20020096060A1