A magnetic encoder error detection method, device and computer readable storage medium
By controlling the synchronous sampling and recording of the rotor physical angle between the current loop and the magnetic encoder in a permanent magnet synchronous motor, the problem of nonlinear error measurement of the magnetic encoder is solved, the accurate calculation of the magnetic encoder error is realized, and the accuracy of angle measurement is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- EHANG INTELLIGENT EQUIP GUANGZHOU CO LTD
- Filing Date
- 2022-12-30
- Publication Date
- 2026-04-28
AI Technical Summary
In the existing technology, the magnetic encoder of permanent magnet synchronous motor has nonlinear error in angle measurement due to interference magnetic field and installation deviation, making it difficult to measure effectively.
By controlling the motor controller to synchronize the calculation of the current loop with the sampling of the magnetic encoder, the physical angle of the rotor is recorded when the angle of the sensorless control angle synchronization is zero, the nonlinear error array of the magnetic encoder is calculated, the rotor position is locked by the motor controller and rotated at a constant speed, the angular velocity and angle data are recorded, and the nonlinear error of the magnetic encoder is calculated.
This method enables effective measurement of the nonlinear error of the magnetic encoder in a permanent magnet synchronous motor, thereby improving the accuracy of angle measurement.
Smart Images

Figure CN115962798B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication electronics technology, and in particular to a magnetic encoder error detection method, device, and computer-readable storage medium. Background Technology
[0002] Currently, the magnetic encoder installed on the shaft end of a permanent magnet synchronous motor theoretically has zero angle detection error when the rotating shaft, permanent magnet, and Hall element of the permanent magnet synchronous motor are coaxial.
[0003] However, in practical applications, nonlinear errors in angle measurement are often caused by interfering magnetic fields and installation deviations (such as eccentricity of the Hall sensor shaft or installation tilt).
[0004] like Figure 7 As shown, when the rotor of the permanent magnet synchronous motor rotates one revolution, there is a significant deviation between the actual measured angle and the ideal measured angle.
[0005] Therefore, how to effectively measure the nonlinear error of the magnetic encoder installed on the permanent magnet synchronous motor has become a technical problem that urgently needs to be solved. Summary of the Invention
[0006] To address the aforementioned technical deficiencies in the prior art, this invention proposes a magnetic encoder error detection method, which includes:
[0007] The motor controller's calculation of the current loop and the magnetic encoder's sampling are synchronized within one pulse width modulation period t.
[0008] When the angle theta_con of the sensorless control angle synchronization is zero, the physical angle theta_foc of the rotor of the sensorless vector control algorithm is recorded simultaneously in each cycle.
[0009] When the number of recorded data N*t=2Π / Ω, it is determined that the recording of one cycle is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity;
[0010] Repeat the recording of multiple cycles, and denote the samples of the Mth cycle as theta_con[N]_M and theta_foc[N]_M;
[0011] Calculate the nonlinear error array theta_err[N] = [(theta_con[N]_1+…+theta_con[N]_M)-(theta_foc[N]_1+…+theta_foc[N]_M)] / M.
[0012] Optionally, the method further includes:
[0013] The three-phase cables of the motor are labeled as A, B, and C. The A-line is used as the 0-degree angle for motor control. The motor controller controls the current of the A-line to be IA, and the current of the B-line and C-line to be -0.5IA.
[0014] Lock the rotor of the motor, record the current measurement angle theta_offset of the magnetic encoder, and mark the relative position of the rotor and the stator of the motor.
[0015] Optionally, the method further includes:
[0016] The motor is controlled by the motor controller to start rotating at a locked position;
[0017] When the rotation reaches the preset stable speed, the motor is controlled by the motor controller to rotate at a constant speed, and the current angular velocity Ω is recorded.
[0018] Optionally, the method further includes:
[0019] The current angle theta of the magnetic encoder is obtained through the motor controller;
[0020] Calculate the angle at which the sensor-controlled angle and the sensorless control angle are synchronized: theta_con = theta - theta_offset.
[0021] Optionally, the method further includes:
[0022] Obtain the rotor physical angle theta_foc of the sensorless vector control algorithm;
[0023] Calculate the nonlinear error of the magnetic encoder: theta_err = theta_con - theta_foc.
[0024] The present invention also proposes a magnetic encoder error detection device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The method implemented by the computer program when executed by the processor includes:
[0025] The motor controller's calculation of the current loop and the magnetic encoder's sampling are synchronized within one pulse width modulation period t.
[0026] When the angle theta_con of the sensorless control angle synchronization is zero, the physical angle theta_foc of the rotor of the sensorless vector control algorithm is recorded simultaneously in each cycle.
[0027] When the number of recorded data N*t=2Π / Ω, it is determined that the recording of one cycle is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity;
[0028] Repeat the recording of multiple cycles, and denote the samples of the Mth cycle as theta_con[N]_M and theta_foc[N]_M;
[0029] Calculate the nonlinear error array theta_err[N] = [(theta_con[N]_1+…+theta_con[N]_M)-(theta_foc[N]_1+…+theta_foc[N]_M)] / M.
[0030] Optionally, the method implemented when the computer program is executed by the processor further includes:
[0031] The three-phase cables of the motor are labeled as A, B, and C. The A-line is used as the 0-degree angle for motor control. The motor controller controls the current of the A-line to be IA, and the current of the B-line and C-line to be -0.5IA.
[0032] Lock the rotor of the motor, record the current measurement angle theta_offset of the magnetic encoder, and mark the relative position of the rotor and the stator of the motor;
[0033] The motor is controlled by the motor controller to start rotating at a locked position;
[0034] When the rotation reaches the preset stable speed, the motor is controlled by the motor controller to rotate at a constant speed, and the current angular velocity Ω is recorded.
[0035] Optionally, the method implemented when the computer program is executed by the processor further includes:
[0036] The current angle theta of the magnetic encoder is obtained through the motor controller;
[0037] Calculate the angle at which the sensor-controlled angle and the sensorless control angle are synchronized: theta_con = theta - theta_offset.
[0038] Optionally, the method implemented when the computer program is executed by the processor further includes:
[0039] Obtain the rotor physical angle theta_foc of the sensorless vector control algorithm;
[0040] Calculate the nonlinear error of the magnetic encoder: theta_err = theta_con - theta_foc.
[0041] The present invention also proposes a computer-readable storage medium storing a magnetic encoder error detection program, which, when executed by a processor, implements the steps of the magnetic encoder error detection method as described in any of the preceding claims.
[0042] The magnetic encoder error detection method, device, and computer-readable storage medium of the present invention synchronize the calculation of the current loop by the motor controller with the sampling of the magnetic encoder within one pulse width modulation period t; when the angle theta_con of the sensorless control angle synchronization is zero, the theta_con and the rotor physical angle theta_foc of the sensorless vector control algorithm are recorded simultaneously in each period; when the number of recorded data N*t = 2π / Ω, the recording of one period is considered complete, and the array theta_co is obtained. n[N]_1 and theta_foc[N]_1, where π is pi and Ω is a preset angular velocity; the recording of multiple cycles is repeated, and the sample of the Mth cycle is denoted as theta_con[N]_M and theta_foc[N]_M; the nonlinear error array of the magnetic encoder, theta_err[N] = [(theta_con[N]_1 + ... + theta_con[N]_M) - (theta_foc[N]_1 + ... + theta_foc[N]_M)] / M, is calculated. This invention achieves effective measurement of the nonlinear error of a magnetic encoder installed on a permanent magnet synchronous motor. Attached Figure Description
[0043] The present invention will be further described below with reference to the accompanying drawings and embodiments. In the accompanying drawings:
[0044] Figure 1 This is the first flowchart of the magnetic encoder error detection method of the present invention;
[0045] Figure 2 This is the second flowchart of the magnetic encoder error detection method of the present invention;
[0046] Figure 3 This is the third flowchart of the magnetic encoder error detection method of the present invention;
[0047] Figure 4 This is the fourth flowchart of the magnetic encoder error detection method of the present invention;
[0048] Figure 5 This is the fifth flowchart of the magnetic encoder error detection method of the present invention;
[0049] Figure 6 This is a schematic diagram of a motor for the magnetic encoder error detection method of the present invention;
[0050] Figure 7 This is a schematic diagram showing the deviation between the actual measured angle and the ideal measured angle of the magnetic encoder. Detailed Implementation
[0051] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.
[0052] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0053] Figure 1 This is a first flowchart of the magnetic encoder error detection method of the present invention. This embodiment proposes a magnetic encoder error detection method, which includes:
[0054] S1. The motor controller's calculation of the current loop and the magnetic encoder's sampling are synchronized within one pulse width modulation period t.
[0055] S2. When the angle theta_con of the sensorless control angle synchronization is zero, in each cycle, the theta_con and the rotor physical angle theta_foc of the sensorless vector control algorithm are recorded simultaneously.
[0056] S3. When the number of recorded data N*t=2Π / Ω, it is determined that the recording of one cycle is completed, and arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity;
[0057] S4. Repeat the recording of multiple cycles, and denote the sample of the Mth cycle as theta_con[N]_M and theta_foc[N]_M;
[0058] S5. Calculate the nonlinear error array theta_err[N]=[(theta_con[N]_1+…+theta_con[N]_M)-(theta_foc[N]_1+…+theta_foc[N]_M)] / M.
[0059] In this embodiment, please refer to Figure 6The schematic diagram of the motor is shown. In this embodiment, the permanent magnet synchronous motor is simply referred to as the motor. After the magnetic encoder of the motor is installed and fixed, the nonlinear error of the magnetic encoder caused by the interfering magnetic field or installation deviation is certain. Therefore, the nonlinear error can be stably reproduced every rotation of the motor. Based on this, this embodiment proposes a scheme to measure the nonlinear error of the magnetic encoder installed on the permanent magnet synchronous motor caused by the above reasons. Specifically, firstly, the calculation of the current loop by the motor controller and the sampling of the magnetic encoder are synchronized within one pulse width modulation period t; then, when the angle theta_con of the sensorless control angle synchronization is zero, the theta_con and the rotor physical angle theta_foc of the sensorless vector control algorithm are recorded simultaneously in each period; further, when the number of recorded data N*t=2Π / Ω, it is determined that the recording of one period is completed, and the arrays theta_con[N]_1 and theta_con[N]_1 are obtained. _foc[N]_1, where π is pi and Ω is a preset angular velocity; similarly, the recording of multiple cycles is repeated, and the sample of the Mth cycle is denoted as theta_con[N]_M and theta_foc[N]_M; finally, the nonlinear error array of the magnetic encoder, theta_err[N] = [(theta_con[N]_1 + ... + theta_con[N]_M) - (theta_foc[N]_1 + ... + theta_foc[N]_M)] / M, is calculated. This achieves effective measurement of the nonlinear error of the magnetic encoder installed on the permanent magnet synchronous motor. Optionally, in this embodiment, a motor controller with sensorless directional control function is provided. Simultaneously, in this embodiment, an angle data detection interface that is constantly connected between the motor controller and the magnetic encoder is provided; furthermore, in this embodiment, a zero-position detection function of the magnetic encoder is provided.
[0060] Figure 2 This is a second flowchart of the magnetic encoder error detection method of the present invention. In this embodiment, the method further includes:
[0061] S01. Mark the three-phase cables of the motor as A line, B line and C line, take A line as the 0-degree angle for motor control, and control the current of the motor's A line to IA and the current of the B line and C line to -0.5IA through the motor controller;
[0062] S02. Lock the rotor of the motor, record the current measurement angle theta_offset of the magnetic encoder, and mark the relative position of the rotor and the stator of the motor.
[0063] Figure 3 This is the third flowchart of the magnetic encoder error detection method of the present invention. In this embodiment, the method further includes:
[0064] S03. Control the motor to start rotating at a locked position using the motor controller;
[0065] S04. When the rotation reaches the preset stable speed, the motor is controlled to rotate at a constant speed by the motor controller, and the current angular velocity Ω is recorded.
[0066] Optionally, in this embodiment, the sampling motor controller controls the motor to start rotating from the above-mentioned position and rotate to a stable speed, so that the motor rotates at a uniform speed. At this time, the speed command is recorded as Ω (rad / s), and the speed data obtained by sampling and calculating the encoder angle is Ω_r. In this embodiment, considering that the nonlinear error of one revolution of the magnetic encoder will be reflected in the speed noise, this embodiment filters Ω_r through a filter of less than 1Hz. If the error between the detected Ω_f and Ω is lower than the angle error of one revolution of the magnetic encoder, then the current calibration of this embodiment is determined to be effective, and the following steps are continued.
[0067] Figure 4 This is the fourth flowchart of the magnetic encoder error detection method of the present invention. In this embodiment, the method further includes:
[0068] S05. Obtain the current angle theta of the magnetic encoder through the motor controller;
[0069] S06. Calculate the angle at which the sensor-controlled angle and the sensorless control angle are synchronized: theta_con = theta - theta_offset.
[0070] Figure 5 This is the fifth flowchart of the magnetic encoder error detection method of the present invention. In this embodiment, the method further includes:
[0071] S07. Obtain the rotor physical angle theta_foc of the sensorless vector control algorithm;
[0072] S08. Calculate the nonlinear error of the magnetic encoder: theta_err = theta_con - theta_foc.
[0073] The beneficial effect of this embodiment is that the calculation of the current loop by the motor controller and the sampling of the magnetic encoder are synchronized within one pulse width modulation period t; when the angle theta_con of the sensorless control angle synchronization is zero, the physical angle of the rotor theta_foc of the sensorless vector control algorithm is recorded simultaneously in each period; when the number of recorded data N*t=2Π / Ω, it is determined that the recording of one period is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity; the recording of multiple periods is repeated, and the sample of the Mth time is recorded as theta_con[N]_M and theta_foc[N]_M; the nonlinear error array theta_err[N]=[(theta_con[N]_1+…+theta_con[N]_M)-(theta_foc[N]_1+…+theta_foc[N]_M)] / M is calculated. Effective measurement of the nonlinear error of the magnetic encoder installed on a permanent magnet synchronous motor has been achieved.
[0074] The present invention also proposes a magnetic encoder error detection device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The method implemented by the computer program when executed by the processor includes:
[0075] The motor controller's calculation of the current loop and the magnetic encoder's sampling are synchronized within one pulse width modulation period t.
[0076] When the angle theta_con of the sensorless control angle synchronization is zero, the physical angle theta_foc of the rotor of the sensorless vector control algorithm is recorded simultaneously in each cycle.
[0077] When the number of recorded data N*t=2Π / Ω, it is determined that the recording of one cycle is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity;
[0078] Repeat the recording of multiple cycles, and denote the samples of the Mth cycle as theta_con[N]_M and theta_foc[N]_M;
[0079] Calculate the nonlinear error array theta_err[N] = [(theta_con[N]_1+…+theta_con[N]_M)-(theta_foc[N]_1+…+theta_foc[N]_M)] / M.
[0080] In this embodiment, please refer to Figure 6 The schematic diagram of the motor is shown. In this embodiment, the permanent magnet synchronous motor is simply referred to as the motor. After the magnetic encoder of the motor is installed and fixed, the nonlinear error of the magnetic encoder caused by the interfering magnetic field or installation deviation is certain. Therefore, the nonlinear error can be stably reproduced every rotation of the motor. Based on this, this embodiment proposes a scheme to measure the nonlinear error of the magnetic encoder installed on the permanent magnet synchronous motor caused by the above reasons. Specifically, firstly, the calculation of the current loop by the motor controller and the sampling of the magnetic encoder are synchronized within one pulse width modulation period t; then, when the angle theta_con of the sensorless control angle synchronization is zero, the theta_con and the rotor physical angle theta_foc of the sensorless vector control algorithm are recorded simultaneously in each period; further, when the number of recorded data N*t=2Π / Ω, it is determined that the recording of one period is completed, and the arrays theta_con[N]_1 and theta_con[N]_1 are obtained. _foc[N]_1, where π is pi and Ω is a preset angular velocity; similarly, the recording of multiple cycles is repeated, and the sample of the Mth cycle is denoted as theta_con[N]_M and theta_foc[N]_M; finally, the nonlinear error array of the magnetic encoder, theta_err[N] = [(theta_con[N]_1 + ... + theta_con[N]_M) - (theta_foc[N]_1 + ... + theta_foc[N]_M)] / M, is calculated. This achieves effective measurement of the nonlinear error of the magnetic encoder installed on the permanent magnet synchronous motor. Optionally, in this embodiment, a motor controller with sensorless directional control function is provided. Simultaneously, in this embodiment, an angle data detection interface that is constantly connected between the motor controller and the magnetic encoder is provided; furthermore, in this embodiment, a zero-position detection function of the magnetic encoder is provided.
[0081] Optionally, the method implemented when the computer program is executed by the processor further includes:
[0082] The three-phase cables of the motor are labeled as A, B, and C. The A-line is used as the 0-degree angle for motor control. The motor controller controls the current of the A-line to be IA, and the current of the B-line and C-line to be -0.5IA.
[0083] Lock the rotor of the motor, record the current measurement angle theta_offset of the magnetic encoder, and mark the relative position of the rotor and the stator of the motor;
[0084] The motor is controlled by the motor controller to start rotating at a locked position;
[0085] When the rotation reaches the preset stable speed, the motor is controlled by the motor controller to rotate at a constant speed, and the current angular velocity Ω is recorded.
[0086] Optionally, in this embodiment, the sampling motor controller controls the motor to start rotating from the above-mentioned position and rotate to a stable speed, so that the motor rotates at a uniform speed. At this time, the speed command is recorded as Ω (rad / s), and the speed data obtained by sampling and calculating the encoder angle is Ω_r. In this embodiment, considering that the nonlinear error of one revolution of the magnetic encoder will be reflected in the speed noise, this embodiment filters Ω_r through a filter of less than 1Hz. If the error between the detected Ω_f and Ω is lower than the angle error of one revolution of the magnetic encoder, then the current calibration of this embodiment is determined to be effective, and the following steps are continued.
[0087] Optionally, the method implemented when the computer program is executed by the processor further includes:
[0088] The current angle theta of the magnetic encoder is obtained through the motor controller;
[0089] Calculate the angle at which the sensor-controlled angle and the sensorless control angle are synchronized: theta_con = theta - theta_offset.
[0090] Optionally, the method implemented when the computer program is executed by the processor further includes:
[0091] Obtain the rotor physical angle theta_foc of the sensorless vector control algorithm;
[0092] Calculate the nonlinear error of the magnetic encoder: theta_err = theta_con - theta_foc.
[0093] The beneficial effect of this embodiment is that the calculation of the current loop by the motor controller and the sampling of the magnetic encoder are synchronized within one pulse width modulation period t; when the angle theta_con of the sensorless control angle synchronization is zero, the physical angle of the rotor theta_foc of the sensorless vector control algorithm is recorded simultaneously in each period; when the number of recorded data N*t=2Π / Ω, it is determined that the recording of one period is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity; the recording of multiple periods is repeated, and the sample of the Mth time is recorded as theta_con[N]_M and theta_foc[N]_M; the nonlinear error array theta_err[N]=[(theta_con[N]_1+…+theta_con[N]_M)-(theta_foc[N]_1+…+theta_foc[N]_M)] / M is calculated. Effective measurement of the nonlinear error of the magnetic encoder installed on a permanent magnet synchronous motor has been achieved.
[0094] Based on the above embodiments, the present invention also proposes a computer-readable storage medium storing a magnetic encoder error detection program, which, when executed by a processor, implements the steps of the magnetic encoder error detection method as described in any of the above embodiments.
[0095] It should be noted that the above-described medium embodiments and method embodiments belong to the same concept. The specific implementation process can be found in the method embodiments, and the technical features in the method embodiments are also applicable to the medium embodiments, which will not be repeated here.
[0096] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0097] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0099] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for detecting errors in a magnetic encoder, characterized in that, The method includes: The motor controller's calculation of the current loop and the sampling of the magnetic encoder are synchronized within one pulse width modulation period t. The motor controller is connected to the permanent magnet synchronous motor, and the magnetic encoder is installed on the permanent magnet synchronous motor. The motor controller has a sensorless directional control function. When the angle theta_con, which is synchronized with the sensorless control angle, is zero, the physical angle theta_con and the rotor physical angle theta_foc of the sensorless vector control algorithm are recorded simultaneously in each cycle. When the number of recorded data N*t = 2Π / Ω, it is determined that the recording of one cycle is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity; Repeat the recording of multiple cycles, and denote the samples of the Mth cycle as theta_con[N]_M and theta_foc[N]_M; Calculate the nonlinear error array theta_err[N]=[( theta_con[N]_1+…+ theta_con[N]_M )-( theta_foc[N]_1 +…+theta_foc[N]_M)] / M; The method further includes: The three-phase cables of the motor are labeled as A, B, and C. The A-line is used as the 0-degree angle for motor control. The motor controller controls the current of the A-line to be IA, and the current of the B-line and C-line to be -0.5IA. Lock the rotor of the motor, record the current measurement angle theta_offset of the magnetic encoder, and mark the relative position of the rotor and the stator of the motor; The motor is controlled by the motor controller to start rotating at a locked position; When the rotation reaches the preset stable speed, the motor is controlled to rotate at a constant speed by the motor controller, and the current angular velocity Ω is recorded. The current angle theta of the magnetic encoder is obtained through the motor controller; Calculate the angle at which the sensor-controlled angle and the sensorless control angle are synchronized: theta_con = theta - theta_offset; Obtain the rotor physical angle theta_foc of the sensorless vector control algorithm; Calculate the nonlinear error of the magnetic encoder: theta_err = theta_con - theta_foc.
2. A magnetic encoder error detection device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the method implemented by the computer program when executed by the processor includes: The motor controller's calculation of the current loop and the sampling of the magnetic encoder are synchronized within one pulse width modulation period t. The motor controller is connected to the permanent magnet synchronous motor, and the magnetic encoder is installed on the permanent magnet synchronous motor. The motor controller has a sensorless directional control function. When the angle theta_con, which is synchronized with the sensorless control angle, is zero, the physical angle theta_con and the rotor physical angle theta_foc of the sensorless vector control algorithm are recorded simultaneously in each cycle. When the number of recorded data N*t = 2Π / Ω, it is determined that the recording of one cycle is completed, and the arrays theta_con[N]_1 and theta_foc[N]_1 are obtained, where Π is pi and Ω is the preset angular velocity; Repeat the recording of multiple cycles, and denote the samples of the Mth cycle as theta_con[N]_M and theta_foc[N]_M; Calculate the nonlinear error array theta_err[N]=[( theta_con[N]_1+…+ theta_con[N]_M )-( theta_foc[N]_1 +…+theta_foc[N]_M)] / M; The three-phase cables of the motor are labeled as A, B, and C. The A-line is used as the 0-degree angle for motor control. The motor controller controls the current of the A-line to be IA, and the current of the B-line and C-line to be -0.5IA. Lock the rotor of the motor, record the current measurement angle theta_offset of the magnetic encoder, and mark the relative position of the rotor and the stator of the motor; The motor is controlled by the motor controller to start rotating at a locked position; When the rotation reaches the preset stable speed, the motor is controlled to rotate at a constant speed by the motor controller, and the current angular velocity Ω is recorded. The current angle theta of the magnetic encoder is obtained through the motor controller; Calculate the angle at which the sensor-controlled angle and the sensorless control angle are synchronized: theta_con = theta - theta_offset; Obtain the rotor physical angle theta_foc of the sensorless vector control algorithm; Calculate the nonlinear error of the magnetic encoder: theta_err = theta_con - theta_foc.
3. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a magnetic encoder error detection program, which, when executed by a processor, implements the steps of the magnetic encoder error detection method as described in claim 1.
Citation Information
Patent Citations
Magnetic encoder, calibration method and device for magnetic encoder, motor and unmanned aerial vehicle
CN109655083A