Rotor absolute position correction method and system based on linear Hall element
By obtaining the rotor position and relative position of the permanent magnet synchronous motor, using a sensing-free observer to generate a standard reference position, combined with the closed-loop angle and angle difference calculation, output the absolute position required for the closed-loop control of FOC, solving the problem that linear Hall originals can only detect the relative position of the rotor, achieving high accuracy of rotor absolute position calibration and FOC control accuracy improvement.
Patent Information
- Application Number
- CN202510291932.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-03
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In low-end servo motor control, the lack of encoder and gearbox results in the linear Hall originals that can only detect the relative position of the rotor, but cannot accurately obtain the absolute position of the rotor, affecting the accuracy of FOC control.
By obtaining the rotor position and relative position of the permanent magnet synchronous motor, a standard reference position is generated using a sensing-free observer, and combining the closed-loop angle and angle difference calculation, the absolute position required for the FOC closed-loop control is output.
It realizes high accuracy calibration of the absolute position of the rotor, improves the accuracy of FOC control, the universality and scope of application of the system.
Smart Images

Figure CN120090518A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of rotor absolute position correction, and specifically to a rotor absolute position correction method and system based on linear Hall elements. Background Art
[0002] In order to achieve efficient real-time FOC control of a permanent magnet synchronous motor, it is necessary to accurately obtain the position of the motor rotor. In the field of low-end servo motor control, in order to reduce costs, reduce volume, and improve system reliability, the speed reducer and encoder are removed, and low-cost linear Hall elements are used to achieve direct drive control of a permanent magnet synchronous motor with a higher resolution. In order to achieve rotor position detection, two linear Hall elements with a 90-degree phase difference are installed on the motor to detect the magnetic induction intensity of the rotor magnetic field and output orthogonal signals that change with the rotor position.
[0003] Since the two orthogonal linear Halls may be aligned with the rotor starting position during mechanical installation, or may be located at other positions of the rotor, the linear Hall obtains the relative position of the rotor.
[0004] In order to obtain the absolute position required for FOC control, there is an urgent need for a rotor absolute position correction method and system based on linear Hall elements. Summary of the Invention
[0005] The purpose of the present invention is to provide a rotor absolute position correction method and system based on linear Hall elements. The calibration method adopted is easy to operate, has high batch production efficiency, generates a standard reference position with a non-sensing observer, has a high calibration position accuracy rate, strong versatility, and a wide application range.
[0006] To achieve the above object, the present invention is realized through the following technical solutions: In the first aspect, a rotor absolute position correction method based on linear Hall elements is provided, including the following steps: S1: Obtain the rotor position and the relative position of the rotor of the permanent magnet synchronous motor, and mark the rotor position as , and mark the rotor relative position as ; S2: Take as the closed-loop angle and generate a signal to drive the permanent magnet synchronous motor to rotate; S3: Calculate the angle difference between and ; S4: Calculate and output the angle required for FOC closed-loop control.
[0007] Preferably, in step S1, obtaining the rotor position of the permanent magnet synchronous motor and the relative position of the rotor specifically includes: generating signals for driving the permanent magnet synchronous motor in three phases by applying an inverter voltage vector and an open-loop or closed-loop angle, causing the permanent magnet synchronous motor to rotate, calculating the rotor position of the permanent magnet synchronous motor through a sensorless algorithm, and calculating the relative position of the rotor through a linear Hall sensor.
[0008] Preferably, the generating signals for driving the permanent magnet synchronous motor in three phases to cause the permanent magnet synchronous motor to rotate specifically includes the following steps: Determine the control strategy; According to the selected control strategy, generate an electric vector reference command, where the electric vector reference command includes the magnitude and direction of the space electric vector; Input the voltage vector reference command into the SVPWM module to calculate the on and off times of the power switch elements; Send the switching signals output by the SVPWM module to the power switch elements and control the on and off of the power switch elements.
[0009] Preferably, the calculating the rotor position of the permanent magnet synchronous motor through a sensorless algorithm is specifically as follows: ; ; .
[0010] Preferably, the calculating the relative position of the rotor through a linear Hall sensor is specifically as follows: When the permanent magnet synchronous motor is in a stationary state, obtain the initial rotor position signal by reading the output signal of the Hall sensor; Generally, the phase-locked loop method is used to lock out the rotor position through the sum formula of two angles of trigonometric functions by a PI controller; Angle compensation is performed in the phase-locked loop method to improve the calculation accuracy; Real-time collect the current, voltage and speed information of the permanent magnet synchronous motor, and adjust the control method in a timely manner according to the collected information to ensure the stable operation of the permanent magnet synchronous motor; The calculation formula is as follows: .
[0011] Preferably, in step S4, calculating the angle required for FOC closed-loop control is specifically as follows: Mark the angle required for FOC closed-loop control as , then , store the compensation angle in the EEPROM, and read the value of each time power is applied.
[0012] Second aspect, a calibration system based on the above-mentioned rotor absolute position calibration method based on linear Hall elements is provided, including: A data acquisition module, configured to: obtain the rotor position and the relative position of the rotor of a permanent magnet synchronous motor, and mark the rotor position as , and mark the relative position of the rotor as ; A data processing module, configured to: use as a closed-loop angle, and generate a signal for driving the permanent magnet synchronous motor to rotate the motor, and calculate and the angle difference; A data output module, configured to: calculate and output the angle required for FOC closed-loop control.
[0013] Third aspect provides an electronic device, including a memory and a processor, and a computer program capable of being loaded and executed by the processor is stored on the memory, which is the rotor absolute position calibration method based on linear Hall elements described in the first aspect above.
[0014] Fourth aspect, the present application provides a computer storage medium, storing a computer program capable of being loaded and executed by the processor, which is the rotor absolute position calibration method based on linear Hall elements described in the first aspect above.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: the calibration method is unique and easy to operate, the batch production efficiency is high, a standard reference position is generated by an observerless observer, the calibrated position is also accurate, the versatility is strong, and the applicable range is wide. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is the method flow chart of the present invention.
[0017] Figure 2 is the schematic diagram of the linear Hall relationship of the present invention.
[0018] Figure 3 is the schematic diagram of the installation position of the linear Hall of the present invention.
[0019] Figure 4 is the schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0020] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by the terms "center", "longitudinal", "transverse", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as a limitation to the present invention.
[0021] In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present invention, the meaning of "a plurality of" is two or more, unless otherwise specifically defined. In addition, the terms "mounted", "connected" and "connected" should be understood in a broad sense. For example, it may be a fixed connection, a detachable connection or an integral connection; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.
[0022] The present invention will be further described below in conjunction with specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by this application.
[0023] Embodiment: As Figure 1 shown, a rotor absolute position correction method based on a linear Hall element is provided, including the following steps: S1: Obtain the rotor position and the relative position of the rotor of the permanent magnet synchronous motor, and mark the rotor position as , and mark the relative position of the rotor as ; S2: Take as the closed-loop angle and generate a signal to drive the permanent magnet synchronous motor to make the motor rotate; S3: Calculate the angle difference between and ; S4: Calculate and output the angle required for FOC closed-loop control.
[0024] In this embodiment, in order to achieve rotor position detection, two linear Hall elements with a 90-degree phase difference are installed on the motor to detect the magnetic induction intensity of the rotor magnetic field, and orthogonal signals that vary with the rotor position are output, as Figure 2 shown. Since the two orthogonal linear Halls may be aligned with the starting position of the rotor in mechanical installation, or may be located at other positions of the rotor, as Figure 3 shown, the relative position of the rotor is obtained by the linear Hall.
[0025] By applying appropriate voltage vectors, appropriate open-loop or closed-loop angles to the inverter, signals for driving a three-phase permanent magnet synchronous motor are generated to make the motor rotate. The specific steps are as follows: (1) Determine the control strategy: Common ones include constant voltage frequency ratio (V / F) control, field-oriented control (FOC), etc. If V / F control is adopted, the corresponding frequency needs to be determined according to the set target speed, and then the corresponding voltage amplitude is calculated. For FOC control, more complex algorithms are required to estimate the rotor position and speed, and the voltage vector is adjusted based on this information; (2) Generate a voltage vector reference instruction: According to the selected control strategy, the magnitude and direction of the space voltage vector are calculated. For example, in SVPWM (Space Vector Pulse Width Modulation), the three-phase sine wave voltage is converted into the form of a space vector, and the output voltage vector is controlled by controlling the action time and sequence of the basic voltage vectors (such as U0, U60, U120, etc.); (3) SVPWM modulation: The voltage vector reference instruction is input into the SVPWM module. The SVPWM module will calculate the on and off times of each power switch element according to the input vector signal to generate a PWM waveform close to the ideal circular magnetic flux trajectory. The specific process includes judging the sector N, calculating the action time of the basic vector, synthesizing the three-phase PWM waveform, etc.; (4) Control the inverter switch: The switch signals output by the SVPWM module are sent to the six power switch elements (such as IGBTs) of the inverter to control their on and off. Usually, the switch states of the upper bridge arm and the lower bridge arm are complementary, that is, when the upper bridge arm is on, the lower bridge arm is off, and vice versa; (5) Monitoring and adjustment: During the actual operation process, it is necessary to monitor the operating state of the motor in real time, such as current, voltage, speed, etc., and adjust the control strategy according to the feedback information to ensure that the motor can operate stably and efficiently.
[0026] At this time, the rotor position of the permanent magnet synchronous motor is estimated by a sensorless algorithm, while the relative rotor position is estimated by a linear Hall sensor, and the rotor position is marked as ; the relative rotor position is marked as ; Among them, the specific method for estimating the rotor position of the permanent magnet synchronous motor by the sensorless algorithm is as follows: ; ; ; The specific method for estimating the relative rotor position by the linear Hall sensor is as follows: Select a linear Hall sensor: Select a suitable linear Hall sensor. In this embodiment, the DRV505X series of TI Company is adopted. Ensure that the performance parameters (such as sensitivity, bandwidth, etc.) of the selected sensor meet the requirements of motor control. The specific steps are as follows: (1) Install the sensor: Install two linear Hall sensors with the axis of the A-phase winding as the starting position of the rotor. One Hall element (Hall ) coincides with the A-phase axis, and the other Hall element (Hall ) is perpendicular to it. In this way, the two orthogonal signals , output are respectively the sine and cosine function values of the rotor position.
[0027] (2) Obtain the initial position signal: When the motor is in a stationary state, obtain the initial rotor position signal by reading the output signal of the Hall sensor. This initial position signal can be used for subsequent position estimation.
[0028] (3) Calculate the position by arctangent operation or phase-locked loop: Direct arctangent operation: In an ideal situation, the rotor position angle can be obtained by performing an arctangent operation on . However, this method is sensitive to the accuracy and noise of the sensor, and there are singularity problems.
[0029] (4) Phase-locked loop (PLL) method: To improve the accuracy and stability of position estimation, a phase-locked loop is usually used instead of the arctangent operation. The phase-locked loop uses the sum formula of trigonometric functions and locks out the rotor position through a PI controller. This method can effectively suppress noise and interference and improve the accuracy of position estimation.
[0030] (5) Error compensation: Since there are problems such as insufficient consistency and installation position deviation in linear Hall sensors, it will lead to angular errors. To improve the accuracy, angle compensation can be carried out in the algorithm. For example, rotate the motor one full turn through open-loop or closed-loop control, record the commanded angle and the measured angle at intervals of the step size and calculate the difference, and then perform compensation step by step through linear interpolation.
[0031] (6) Real-time monitoring and adjustment: During the actual operation process, it is necessary to monitor the operating state of the motor in real time, such as current, voltage, speed, etc., and adjust the control strategy according to the feedback information to ensure that the motor can operate stably and efficiently. At the same time, the position estimation algorithm can also be optimized and improved according to actual needs to improve the performance and reliability of the system.
[0032] The following are the calculation formulas: ; Ensure the sensorless angle has been correctly estimated, switch to applying a suitable voltage vector, and use the sensorless estimated angle as the closed-loop angle to generate a signal to drive the permanent magnet synchronous motor, causing the motor to rotate; The above-mentioned ensuring the sensorless angle has been correctly estimated means ensuring that the angle measured by the sensorless method is correct. The following specific method is adopted: (1) Judgment based on phase current: When the estimated angle is accurate, the motor phase current should reach the minimum and be close to the theoretical value. If there is a deviation in the angle, the motor phase current will be greater than this minimum value. It is possible to manually add a deviation angle value to the estimated angle and observe the change of the phase current to judge whether the estimated angle is correct. If the phase current becomes larger than the original no matter how the deviation value is adjusted, then the estimated angle value is basically correct; if when adjusting to a certain deviation value, the phase current becomes smaller than the original, then the adjusted angle is the correct one; (2) Judgment based on back electromotive force: The back electromotive force of the motor is the voltage generated by the rotor magnetic flux in the stator coil. The greater the electrical angular velocity, the greater the generated voltage. Ideally, the zero point of the estimated angle should coincide with the zero crossing of the back electromotive force. However, due to errors in motor parameters and controller coefficients, the estimated angle will have a lead or lag. It is possible to collect the zero crossing points of the three-phase back electromotive force through hardware and compare them with the zero point of the estimated angle, so as to correct the estimated angle in real time and ensure that the motor operates at the optimal efficiency point. However, this method requires adding UVW voltage sampling in hardware to obtain the zero crossing points of the back electromotive force, and the specific implementation still needs further research; (3) Judgment based on the magnitude of voltage output: On the premise of accurate angle information, assuming accurate motor parameters and the motor operating in a steady-state condition, there is a certain relationship between voltage output and current. If there is an estimated angle error, the voltage obtained through current sampling and coordinate transformation is also obtained from a coordinate system with errors, and the voltage calculated according to the voltage equation is also an estimated value on the coordinate system. However, the value obtained through PI operation is the true value, which is the true value of the voltage required by the motor during actual operation. By comparing the estimated value with the true value, the difference between the estimated angle and the true angle can be obtained; (4) Calibration based on the zero-position offset angle of the resolver: For some motor control systems using resolver sensors, it is necessary to calibrate the zero-position offset angle of the resolver. Because in the actual production process, due to processing deviations and installation deviations, etc., there may be a fixed included angle δ (i.e., the zero-position offset angle of the resolver) between the measured angle θ of the resolver sensor of each motor and the true rotor position angle θr. The value of δ can be determined through a specific calibration method, and then the estimated angle can be corrected in the control algorithm; (5) Based on the fusion of multiple algorithms: Multiple sensorless angle estimation algorithms can be used simultaneously, such as sliding mode observers, model reference adaptive, Kalman filtering, etc., and then the estimation results of different algorithms are fused to improve the estimation accuracy.
[0033] Calculate and the deviation of the angle, using the sensorless angle as the standard angle to calibrate the linear Hall to generate a deviation angle, marked as and this angle reflects the deviation of the relative angle obtained by the linear Hall with respect to the absolute position of the permanent magnet synchronous motor rotor, that is, the angle obtained by the linear Hall is used as the compensation angle for the FOC control of the permanent magnet synchronous motor, so as to obtain the absolute position required for FOC control based on the linear Hall.
[0034] Calculate the angle required for FOC closed-loop control, which is marked as , in the closed-loop control of the permanent magnet synchronous motor, the voltage vector is adjusted through the current loop or the speed loop, and the angle is used for closed-loop control.
[0035] Among them, the method for obtaining the voltage vector through the current loop adjustment is specifically as follows: The main function of the current loop is to control the current of the motor so that it can respond quickly and track the given current reference value. When the motor starts or is disturbed externally, the current loop can quickly adjust the current, thereby improving the dynamic response speed and stability of the system; The current loop usually adopts a PI (Proportional-Integral) regulator. The parameters of the PI regulator need to be tuned according to the specific parameters of the motor and the system requirements. During the tuning process, factors such as the open-loop transfer function of the current loop, the delay link, and the transfer function of the inverter need to be considered; Due to the coupling between the dq axes, decoupling control methods such as feedforward decoupling are often used in the design of the current loop to eliminate this coupling and achieve independent control of the dq-axis currents; The specific method for obtaining the voltage vector through the speed loop regulation is as follows: The main function of the speed loop is to regulate the speed of the motor so that it can track the given speed reference value. The speed loop controls the speed by regulating the torque; The speed loop also usually adopts a PI regulator. The output of the PI regulator serves as the input of the current loop, that is, the given value of the q-axis current. The parameter tuning of the speed loop needs to consider factors such as the moment of inertia of the motor and the load torque; To protect the safety of the motor and the system, the PI regulators of both the speed loop and the current loop need to set limit values. The limit value of the current loop is usually set according to the modulation method, while the limit value of the speed loop is calculated based on the maximum output torque.
[0036] Store the compensation angle in the EEPROM. Each time power is applied and the device works, read this value. The specific steps are as follows: (1) Initialization and configuration: Before using the EEPROM, initialization configuration is required. For example, when using Arduino, the I²C interface can be initialized through the Wire.begin() function.
[0037] (2) Send the device address: After starting the I²C communication, send the I²C address (write mode) of the EEPROM. This address is usually fixed, but the specific value depends on the EEPROM chip used and the connection method.
[0038] (3) Send the storage address: Specify the location where the data is to be read, that is, the address where the compensation angle value is stored in the EEPROM. This usually requires sending the address in high byte and low byte.
[0039] (4) Restart the transmission: Restart the I²C communication (read mode) to read data from the EEPROM.
[0040] (5) Request data: Send a request to read data to the EEPROM.
[0041] (6) Receive data: Receive the data returned from the EEPROM and store it in a variable. This data is the previously stored compensation angle value.
[0042] (7)End transmission: Terminate I²C communication.
[0043] Sensorless angle estimation methods, including sliding mode observers, flux link observers, back electromotive force methods, etc.
[0044] As Figure 4 shown, this embodiment also provides a correction system based on the above rotor absolute position correction method based on linear Hall elements, including: A data acquisition module, configured to: obtain the rotor position and the relative position of the rotor of the permanent magnet synchronous motor, and mark the rotor position as and mark the relative rotor position as ; A data processing module, configured to: use as the closed-loop angle, and generate a signal to drive the permanent magnet synchronous motor, so that the motor rotates, and calculate the angle difference between ; A data output module, configured to: calculate and output the angle required for FOC closed-loop control.
[0045] The above is a specific description of the preferred embodiment of the present invention, but the present invention is not limited to the described embodiment. Those skilled in the art can make various equivalent deformations or substitutions without departing from the spirit of the present invention, and these equivalent deformations or substitutions are all included within the scope defined by the claims of this application.
Claims
1. A rotor absolute position correction method based on a linear Hall element, characterized in that: The following steps are involved: S1: Get the rotor position of the permanent magnet synchronous motor and the relative position of the rotor, and mark the rotor position as , mark the relative position of the rotor as ; S2: As a closed-loop angle, it generates a signal to drive the permanent magnet synchronous motor, causing the motor to rotate; S3: Compute and The angle difference S4: Calculate and output the angle required for FOC closed-loop control based on the angle difference calculated in step S3.
2. According to claim 1, a rotor absolute position correction method based on a linear Hall element is characterized in that: In the step S1, the rotor position of the permanent magnet synchronous motor and the relative position of the rotor are obtained, specifically: by giving the inverter voltage vector and the open-loop or closed-loop angle, a three-phase drive signal for the permanent magnet synchronous motor is generated to rotate the permanent magnet synchronous motor, the rotor position of the permanent magnet synchronous motor is calculated by a sensorless algorithm, and the relative position of the rotor is calculated by a linear Hall.
3. According to claim 2, a rotor absolute position correction method based on a linear Hall element is characterized in that: The method generates a three-phase driving signal for the permanent magnet synchronous motor by providing an inverter voltage vector and an open-loop or closed-loop angle, so that the permanent magnet synchronous motor rotates, specifically comprising the following steps: Determine control strategies; Generate an electric vector reference instruction according to the selected control strategy, wherein the electric vector reference instruction includes the magnitude and direction of the space electric vector; Input the voltage vector reference command into the SVPWM module to calculate the on and off time of the power switch element; The switching signal output by the SVPWM module is sent to the power switch element to control the on and off of the power switch element.
4. According to claim 3, a rotor absolute position correction method based on a linear Hall element is characterized in that: The method for calculating the rotor position of the permanent magnet synchronous motor by using a sensorless algorithm is as follows: ; ; 。 5. The rotor absolute position correction method based on the linear Hall element according to claim 4 is characterized in that: The relative position of the rotor is calculated by linear Hall, specifically: When the permanent magnet synchronous motor is in a stationary state, the initial rotor position signal is obtained by reading the output signal of the Hall sensor; Usually, the phase-locked loop method uses the two-angle sum formula of trigonometric functions to lock the rotor position through a PI controller; Angle compensation is performed in a phase-locked loop method; Collect the current, voltage and speed information of the permanent magnet synchronous motor in real time, and adjust the control method in time according to the collected information; The calculation formula is as follows: 。 6. According to claim 2, a rotor absolute position correction method based on a linear Hall element is characterized in that: In step S4, the angle required for FOC closed-loop control is calculated, specifically: the angle required for FOC closed-loop control is marked as ,but , the compensation angle Stored in EEPROM, read each time power is turned on The value of .
7. A correction system based on the rotor absolute position correction method based on the linear Hall element according to claim 1, characterized in that: include: The data acquisition module is used to obtain the rotor position and relative position of the permanent magnet synchronous motor and mark the rotor position as , mark the relative position of the rotor as ; The data processing module is used to: As a closed-loop angle, it generates a signal to drive the permanent magnet synchronous motor, causing the motor to rotate, and calculates and The angle difference The data output module is used to calculate and output the angle required for FOC closed-loop control.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and executes any one of the methods of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the method according to any one of claims 1 to 6.