Motor rotor position positioning method and system, and electric control device

CN114553074BActive Publication Date: 2026-09-25ZHEJIANG SANHUA INTELLIGENT CONTROLS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011299040.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-18
Publication Date
2026-09-25
Estimated Expiration
2040-11-18

AI Technical Summary

Technical Problem

[0005]本发明提供一种电机转子位置定位方法,解决了电机转子位置定位精度低、可靠性差的问题,提高转子定位精度,有利于改善电机控制性能

Benefits of technology

[0016]本发明实施例提供的电机转子位置定位方法、系统及电控设备,通过基于预设时间间隔获取霍尔传感器输出的多个霍尔信号值,对所述霍尔信号值进行模数转换及数据滤波处理,确定霍尔信号值对应的霍尔采样值,根据当前时刻的电机的运行方向及采样得到的霍尔采样值确定当前时刻转子的实时象限值,根据采样初始时刻的转子初始位置、当前时刻的电机的运行方向、实时象限值及霍尔采样值确定当前时刻转子的实际位置,解决了电机转子位置定位精度低、可靠性差的问题,提高转子定位精度和可靠性,有利于改善电机控制性能。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114553074B_ABST
    Figure CN114553074B_ABST
Patent Text Reader

Abstract

The application discloses a motor rotor position positioning method and system and an electric control device, and the method comprises the following steps: acquiring the running direction of the motor; acquiring a plurality of Hall signal values output by a Hall sensor based on a preset time interval, performing data processing on the Hall signal values, and determining Hall sample values corresponding to the Hall signal values; determining the real-time quadrant value of the rotor according to the running direction of the motor and the Hall sample values; acquiring the initial position of the rotor at the initial sampling moment; and determining the actual position of the current rotor according to the running direction of the motor, the initial position of the rotor, the real-time quadrant value and the Hall sample values. According to the application, the Hall signal values output by the Hall sensor are subjected to analog-digital conversion and data filtering processing, and the actual position of the rotor at the current sampling moment is calculated according to the processed Hall sample values, the actual running direction of the motor and the initial position of the motor rotor, so that the rotor positioning precision and reliability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of motor control technology, and in particular to a method, system and electrical control equipment for positioning a motor rotor. Background Technology

[0002] A stepper motor is a type of electric motor that converts electrical pulse signals into corresponding angular or linear displacement. The amount of angular displacement can be controlled by controlling the number of pulses, thereby achieving accurate positioning.

[0003] Traditional stepper motors typically employ open-loop control schemes, driving the motor to a preset position by sending pulses to the controller. If the motor loses steps, the input / output ports will fail to reach the designated switching state, affecting the device's functionality. If the motor stalls, the current in the motor coils will far exceed the motor's rated current, burning out the motor coils. Therefore, implementing closed-loop control of the motor by detecting its operating status is crucial for improving control functionality.

[0004] Existing closed-loop control technologies for stepper motors mainly employ two technical solutions to detect motor operating status: First, using zero-crossing detection technology to collect specific threshold values ​​to determine the motor's operating status; second, using Hall effect sensors to detect transitions in the Hall signal to determine the motor's operating status. The principle is that during normal motor operation, the N and S poles on the rotor alternately pass through the Hall sensor, which outputs a periodic square wave signal. The period of this square wave signal is related to the motor's speed and operating state. Every two full steps, the Hall signal transitions, and the motor's operating status is determined by detecting the square wave signal output by the Hall sensor. However, these control methods have the following problems: the zero-crossing detection technology cannot locate the motor rotor's position in real time, has weak adaptive capability, and its detection accuracy and reliability are greatly affected by load, operating conditions, and motor construction. The Hall effect switch technology has low detection accuracy, only able to detect changes in the signal after two full steps. If the rotor change is less than two full steps, the transition signal cannot be detected. If there is a rebound phenomenon during operation, the square wave signal output by the Hall sensor will be abnormal, making it impossible to determine the actual motor operating status, resulting in low reliability. Summary of the Invention

[0005] This invention provides a method for locating the position of a motor rotor, which solves the problems of low positioning accuracy and poor reliability of the motor rotor, improves the rotor positioning accuracy, and is beneficial to improving the motor control performance.

[0006] In a first aspect, embodiments of the present invention provide a method for locating the position of a motor rotor, characterized by comprising the following steps: obtaining the running direction of the motor; obtaining multiple Hall signal values ​​output by a Hall sensor based on a preset time interval, performing data processing on the Hall signal values ​​to determine the Hall sampling value corresponding to the Hall signal value; determining the real-time quadrant value of the rotor based on the running direction of the motor and the Hall sampling value; obtaining the initial position of the rotor at the initial sampling moment; and determining the current actual position of the rotor based on the running direction of the motor, the initial position of the rotor, the real-time quadrant value, and the Hall sampling value.

[0007] Optionally, determining the actual position of the current rotor based on the motor's running direction, the rotor's initial position, the real-time quadrant value, and the Hall sampling value includes the following steps: determining a preset microstep number sine table based on multiple Hall reference values ​​and motor microstep control parameters; obtaining the absolute value of the Hall sampling value at the sampling termination time; obtaining the real-time microstep value corresponding to the absolute value of the Hall sampling value in the preset microstep number sine table by looking up a table; obtaining the initial quadrant value and initial microstep value corresponding to the rotor's initial position; and determining the actual position of the current rotor based on the motor's running direction, the initial quadrant value, the initial microstep value, the real-time microstep value, and the real-time quadrant value.

[0008] Optionally, determining the current actual position of the rotor based on the motor's running direction, the initial quadrant value, the initial microstep value, the real-time microstep value, and the real-time quadrant value includes the following steps: determining whether the microstep count value has overflowed based on the motor's running direction, the initial microstep value, and the real-time microstep value; if the microstep count value overflows, updating the current real-time quadrant value; determining the motor's running pole pair value and the number of motor revolutions based on the motor's running direction and the updated real-time quadrant value; and determining the real-time rotor position at the current sampling time based on the real-time microstep value, the real-time quadrant value, the motor's running pole pair value, and the number of motor revolutions.

[0009] Optionally, determining the real-time rotor position at the current sampling moment based on the real-time microstep value, the real-time quadrant value, the motor operating pole pair value, and the number of motor revolutions includes the following steps: obtaining a first microstep value corresponding to one full step of motor operation; obtaining a preset quadrant value corresponding to each pole pair of the motor; determining a second microstep value corresponding to each pole pair based on the first microstep value and the preset quadrant value; obtaining a preset pole pair value of the motor; determining a third microstep value corresponding to one revolution of the motor based on the preset pole pair value and the second microstep value; and calculating the real-time rotor position at the current sampling moment based on the number of motor revolutions, the third microstep value, the motor operating pole pair value, the second microstep value, the real-time quadrant value, the first microstep value, and the real-time microstep value.

[0010] Optionally, determining the motor operating pole pair value and the number of motor revolutions based on the motor's operating direction and the real-time quadrant value includes the following steps: obtaining the upper limit and lower limit pole pair values ​​of the operating pole pair value; if the motor's operating direction is forward and the real-time quadrant value is the first quadrant value, then incrementing the current motor operating pole pair value by one; if the motor's operating direction is forward and the current operating pole pair value reaches the upper limit pole pair value, then incrementing the current number of motor revolutions by one and resetting the operating pole pair value to the lower limit pole pair value; if the motor's operating direction is reverse and the real-time quadrant value is the fourth quadrant value, then decrementing the current motor operating pole pair value by one; if the motor's operating direction is reverse and the current operating pole pair value reaches the lower limit pole pair value, then decrementing the current number of motor revolutions by one and resetting the operating pole pair value to the upper limit pole pair value.

[0011] Optionally, determining the real-time quadrant value of the rotor based on the running direction of the motor and the Hall sampling value includes the following steps: obtaining the difference between two adjacent Hall sampling values; determining whether the difference is a non-zero value; if the difference is a non-zero value, summing multiple differences within the sampling time period to determine the sum of differences; and determining the real-time quadrant value of the rotor based on the sum of differences, the Hall sampling value, and the running direction of the motor.

[0012] Optionally, the step of processing the Hall signal value to determine the Hall sampling value corresponding to the Hall signal value includes the following steps: performing analog-to-digital conversion on multiple Hall signal values ​​to obtain the digital signal corresponding to the Hall signal value; obtaining the maximum Hall signal value and a preset reference value corresponding to the maximum Hall signal value; performing amplitude modulation on the Hall signal value according to the preset reference value and the maximum Hall signal value; and using a filtering algorithm to perform data filtering on the modulated Hall signal value to determine the Hall sampling value corresponding to the Hall signal value.

[0013] Optionally, the motor rotor position positioning method further includes the following steps: obtaining the motor running time; determining the theoretical position of the current rotor based on the motor running time; determining the motor's operating state based on the actual position of the rotor and the theoretical position of the rotor; and if motor step loss occurs, performing step loss compensation control based on the actual position of the rotor.

[0014] Secondly, embodiments of the present invention also provide a motor rotor position positioning system, including: a control unit, a Hall sensor, a sampling unit, a running command acquisition unit, and a data processing unit; the running command acquisition unit is used to acquire the running direction of the motor; the sampling unit is used to acquire multiple Hall signal values ​​output by the Hall sensor based on a preset time interval; the data processing unit is used to perform data processing on the Hall signal values ​​to determine the Hall sampling value corresponding to the Hall signal value; the control unit is used to determine the real-time quadrant value of the rotor according to the running direction of the motor and the Hall sampling value, and to acquire the initial position of the rotor at the initial sampling time, and to determine the current actual position of the rotor according to the running direction of the motor, the initial position of the rotor, the real-time quadrant value, and the Hall sampling value.

[0015] Thirdly, embodiments of the present invention also provide an electrical control device, including the above-described motor rotor position positioning system.

[0016] The motor rotor position positioning method, system, and electrical control equipment provided in this invention acquire multiple Hall signal values ​​output by Hall sensors based on a preset time interval, perform analog-to-digital conversion and data filtering on the Hall signal values, determine the Hall sampling value corresponding to the Hall signal value, determine the real-time quadrant value of the rotor at the current moment based on the motor's running direction and the sampled Hall sampling value, and determine the actual position of the rotor at the current moment based on the rotor's initial position at the initial sampling moment, the motor's running direction at the current moment, the real-time quadrant value, and the Hall sampling value. This solves the problems of low motor rotor position positioning accuracy and poor reliability, improves rotor positioning accuracy and reliability, and is beneficial to improving motor control performance. Attached Figure Description

[0017] Figure 1 This is a flowchart of a motor rotor position positioning method provided in Embodiment 1 of the present invention;

[0018] Figure 2 This is a schematic diagram of the data waveform of a Hall sampling value provided in an embodiment of the present invention;

[0019] Figure 3 Based on Figure 2 A schematic diagram of the data waveform of the sum of Hall sample values;

[0020] Figure 4 This is a waveform diagram illustrating the direction of motor operation provided in an embodiment of the present invention;

[0021] Figure 5 Based on Figure 2 and Figure 4 A waveform diagram of the real-time quadrant value of a rotor;

[0022] Figure 6 This is a flowchart of another motor rotor position positioning method provided in Embodiment 1 of the present invention;

[0023] Figure 7 This is a schematic diagram of a motor rotor position positioning system provided in Embodiment 2 of the present invention. Detailed Implementation

[0024] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.

[0025] Example 1

[0026] Figure 1 This is a flowchart of a motor rotor position positioning method provided in Embodiment 1 of the present invention. This embodiment is applicable to application scenarios where a linear Hall sensor is used for rotor position positioning on a claw-pole stepper motor. This claw-pole stepper motor can be used to drive an electronically controlled valve, such as an electronic expansion valve or a multi-channel refrigerant valve. This method can be executed by software and hardware structures configured with a motor rotor position positioning method.

[0027] like Figure 1 As shown, the motor rotor position positioning method includes the following steps:

[0028] Step S1: Obtain the running direction of the motor.

[0029] The direction of motor operation is controlled by motor operation direction commands. Typically, the direction of motor operation includes forward operation, reverse operation, and stop.

[0030] In this embodiment, the motor running direction command can be obtained through the controller.

[0031] Step S2: Acquire multiple Hall signal values ​​output by the rotor position sensor based on a preset time interval, process the Hall signal values, and determine the Hall sampling value corresponding to the Hall signal value.

[0032] A single linear Hall sensor can be installed in the air gap magnetic field of the motor body. When the motor is powered on, the Hall sensor outputs a Hall signal value, which is an analog voltage signal value. The sampling time and preset time interval can be set according to the motor speed. During the sampling time period, the Hall signal value output by the Hall sensor is acquired at preset intervals to complete the sampling of Hall signal values. Then, all the collected Hall signal values ​​are processed.

[0033] In this embodiment, an analog-to-digital converter (ADC) can be used to convert the analog Hall signal value into a digital signal, and the Hall sample value corresponding to the Hall signal value can be determined. This Hall sample value is a digital signal.

[0034] Optionally, data processing is performed on the Hall signal values ​​to determine the Hall sampling values ​​corresponding to the Hall signal values, including the following steps: performing analog-to-digital conversion on multiple Hall signal values ​​to obtain the digital signals corresponding to the Hall signal values; obtaining the maximum Hall signal value and the preset reference value corresponding to the maximum Hall signal value; performing amplitude modulation on the Hall signal values ​​according to the preset reference value and the maximum Hall signal value; and using a filtering algorithm to perform data filtering on the modulated digital Hall signal values ​​to determine the Hall sampling values ​​corresponding to the Hall signal values.

[0035] Specifically, the sampled Hall signal value can be defined as sv, the maximum Hall signal value as sv-max, and the preset reference value A corresponding to the maximum Hall signal value sv-max. The maximum Hall signal value sv-max can be set using software configured with a preset data processing program. The maximum Hall signal value sv-max can be set based on the amplitude data of multiple sampled Hall signal cycles. Substituting the preset reference value A, the maximum Hall signal value sv-max, and the Hall signal value sv at the current sampling time into Formula 1 as shown below, amplitude modulation is applied to the Hall signal value sv.

[0036]

[0037] Where sv-mf' represents the amplitude-modulated Hall signal value.

[0038] Furthermore, by sampling multiple times, multiple amplitude-modulated Hall signal values ​​are obtained. An arithmetic average filtering algorithm can be used to calculate the average value of a preset number of Hall signal values, and data filtering can be performed on the modulated Hall signal values ​​to determine the final Hall sample value sv-mf.

[0039] In this embodiment, the preset reference value A corresponding to the maximum Hall signal value sv-max can be obtained by looking up a table. For example, a sine table as shown in Table 1 can be established based on the microstep control parameters of the motor:

[0040]

[0041] According to Table 1, the preset reference value A corresponding to the maximum Hall signal value can be equal to 1024 for a motor using the 16-step control mode.

[0042] Step S3: Determine the real-time quadrant value Q of the rotor based on the motor's running direction and the Hall sampling value sv-mf.

[0043] In this embodiment, when the rotor of the motor is in different quadrants, the magnitude and trend of the Hall signal value sv output by the Hall sensor are different. The magnitude and trend of the Hall sampling value sv-mf are consistent with the magnitude and trend of the Hall signal value sv. The real-time quadrant value Q of the rotor can be determined based on the magnitude and trend of the Hall sampling value sv-mf.

[0044] Optionally, the real-time quadrant value of the rotor is determined based on the motor's running direction and the Hall sampling value, including the following steps: obtaining the difference between two adjacent Hall sampling values; determining whether the difference is a non-zero value; if the difference is a non-zero value, summing multiple differences within the sampling time period to determine the difference sum desvAcc; and determining the real-time quadrant value of the rotor based on the difference sum desvAcc, the Hall sampling value sv-mf, and the motor's running direction Dir.

[0045] In this embodiment, the difference between two adjacent Hall sampling values ​​is equal to the Hall sampling value sv-mf obtained at the current sampling time minus the Hall sampling value sv-mfPre obtained at the previous sampling time. If the difference is zero, the current Hall sampling value is determined to be invalid, and the current running program ends. If the difference is not a non-zero value, all difference data between the initial sampling time and the current sampling time are obtained, and the difference data within a preset data range (such as the N nearest difference data to the current sampling time, the specific value of N can be preset and configured by software) are summed to obtain the difference sum desvAcc of the N nearest difference data at the current sampling time.

[0046] If the motor is in different running directions, the correspondence between the real-time quadrant value Q of the rotor and the Hall sampled values ​​sv-mf, the difference and desvAcc will be different. Therefore, a preset relationship list between the real-time quadrant value Q of the rotor and the Hall sampled values ​​sv-mf, the difference and desvAcc can be established based on the running direction of the motor. The real-time quadrant value Q corresponding to the Hall sampled values ​​sv-mf, the difference and desvAcc obtained at the current sampling time can be matched by the table lookup method.

[0047] Specifically, if the motor is running in the forward direction, a first preset relationship list is established between the real-time quadrant value Q of the rotor and the Hall sampled value sv-mf, the difference, and desvAcc. This first preset relationship list is shown in Table 2.

[0048]

[0049] Referring to Table 2, when the motor is running in the forward direction, if the Hall sample value sv-mf is greater than zero and the difference and desvAcc are greater than zero, then the real-time quadrant value Q of the rotor is in the first quadrant; if the Hall sample value sv-mf is greater than zero and the difference and desvAcc are less than zero, then the real-time quadrant value Q of the rotor is in the second quadrant; if the Hall sample value sv-mf is less than zero and the difference and desvAcc are less than zero, then the real-time quadrant value Q of the rotor is in the third quadrant; if the Hall sample value sv-mf is less than zero and the difference and desvAcc are greater than zero, then the real-time quadrant value Q of the rotor is in the fourth quadrant.

[0050] If the motor runs in the opposite direction, a second preset relationship list is established between the real-time quadrant value Q of the rotor and the Hall sampled value sv-mf, the difference, and desvAcc. This second preset relationship list is shown in Table 3.

[0051]

[0052] Referring to Table 3, when the motor is running in the reverse direction, if the Hall sample value sv-mf is greater than zero and the difference and desvAcc are greater than zero, then the real-time quadrant value Q of the rotor is in the second quadrant; if the Hall sample value sv-mf is greater than zero and the difference and desvAcc are less than zero, then the real-time quadrant value Q of the rotor is in the first quadrant; if the Hall sample value sv-mf is less than zero and the difference and desvAcc are less than zero, then the real-time quadrant value Q of the rotor is in the fourth quadrant; if the Hall sample value sv-mf is less than zero and the difference and desvAcc are greater than zero, then the real-time quadrant value Q of the rotor is in the third quadrant.

[0053] Step S4: Obtain the initial position of the rotor at the initial sampling moment.

[0054] Step S5: Determine the actual position of the rotor based on the motor's running direction, the rotor's initial position, the real-time quadrant value Q, and the Hall sampling value sv-mf.

[0055] In this embodiment, it can be first determined whether the real-time quadrant value Q is valid data. If the real-time quadrant value Q is valid data, the Hall sampling value sv-mf is compared with the benchmark value in Table 1 above, and the microstep position corresponding to the current Hall sampling value sv-mf is matched by the table lookup method.

[0056] Furthermore, the initial position of the rotor is updated based on the real-time quadrant value Q and the microstep position corresponding to the current Hall sampling value sv-mf, so as to obtain the current actual position of the rotor.

[0057] It should be understood that if the real-time quadrant value Q is in the first or second quadrant and the current Hall sample value sv-mf is negative, or if the real-time quadrant value Q is in the third or fourth quadrant and the current Hall sample value sv-mf is positive, then the real-time quadrant value Q is determined to be invalid and the current sampling procedure ends.

[0058] Therefore, the motor rotor position positioning method provided in this embodiment of the invention obtains multiple Hall signal values ​​output by Hall sensors based on a preset time interval, performs analog-to-digital conversion and data filtering on the Hall signal values, determines the Hall sampling value corresponding to the Hall signal value, determines the real-time quadrant value of the rotor at the current moment based on the motor's running direction and the sampled Hall sampling value, and determines the actual position of the rotor at the current moment based on the rotor's initial position at the initial sampling moment, the motor's running direction at the current moment, the real-time quadrant value, and the Hall sampling value. This solves the problems of low motor rotor position positioning accuracy and poor reliability, improves rotor positioning accuracy and reliability, and is beneficial to improving motor control performance.

[0059] During the testing phase, the correspondence between the difference and desvAcc, the Hall sampling value sv-mf, and the motor's running direction Dir and the rotor's real-time quadrant value Q can be detected and verified by combining specific data waveforms, as follows:

[0060] Figure 2 This is a schematic diagram of a Hall sampling value sv-mf provided in an embodiment of the present invention. The Hall sampling value sv-mf is obtained by amplitude modulation and data filtering of the sampled Hall signal value. (Refer to reference...) Figure 2 As shown, the Hall sample value sv-mf is zero at sampling times t2 and t5. Figure 3 Based on Figure 2 A schematic diagram of the data waveform of the Hall sample value difference and desvAcc, combined with reference. Figure 2 As shown, the difference and desvAcc at sampling times t1, t2, t3 and t4 are zero.

[0061] Figure 4 This is a waveform diagram of the motor running direction provided in an embodiment of the present invention, wherein parameter 1 indicates that the motor is in the forward running direction; parameter 2 indicates that the motor is in the reverse running direction; and parameter 3 indicates that the motor is in a stopped state.

[0062] Figure 5 Based on Figure 2 and Figure 4A waveform diagram of the real-time quadrant value of a rotor is provided, wherein parameter 1 indicates that the rotor's quadrant value is in the first quadrant; parameter 2 indicates that the rotor's quadrant value is in the second quadrant; parameter 3 indicates that the rotor's quadrant value is in the third quadrant; and parameter 4 indicates that the rotor's quadrant value is in the fourth quadrant.

[0063] Reference Figures 2 to 5 As shown, t0, t1, t2, t3, t4, t5, and t6 are the sampling times set sequentially. During the sampling time period from t0 to t1, the motor is in the forward running direction, the Hall sampling value sv-mf is greater than zero, and the difference and desvAcc are greater than zero. At this time, referring to Table 2, the real-time quadrant value Q of the rotor is in the first quadrant, and... Figure 5 The quadrant positions shown are consistent; during the sampling time period from t1 to t2, the motor is in the forward running direction, the Hall sampling value sv-mf is greater than zero, and the difference and desvAcc are less than zero. At this time, referring to Table 2, the real-time quadrant value Q of the rotor is in the second quadrant, which is consistent with... Figure 5 The quadrant positions shown are consistent; during the sampling period from t2 to t3, the motor is in the forward running direction, the Hall sampled value sv-mf is less than zero, and the difference and desvAcc are less than zero. At this time, according to Table 2, the rotor's real-time quadrant Q is the third quadrant. During the sampling period from t3 to t4, the motor stops, the Hall sampled value sv-mf is less than zero, and the difference and desvAcc are equal to zero. No update calculation is performed; at this time, it remains in the third quadrant of the previous calculation result, consistent with... Figure 5 The quadrant positions shown are consistent; during the sampling time period from t4 to t5, the motor runs in reverse, the Hall sampling value sv-mf is less than zero, and the difference and desvAcc are greater than zero. At this time, referring to Table 3, the real-time quadrant value Q of the rotor is in the third quadrant, which is consistent with... Figure 5 The quadrant positions shown are consistent; during the sampling period from t5 to t6, the motor runs in reverse, the Hall sampling value sv-mf is greater than zero, and the difference and desvAcc are greater than zero. At this time, referring to Table 3, the real-time quadrant value Q of the rotor is in the second quadrant, consistent with... Figure 5 The quadrant positions shown are consistent; in other sampling time periods, the correspondence between the difference and desvAcc, the Hall sampling value sv-mf, and the motor running direction Dir and the real-time quadrant value Q of the rotor are detected and verified by referring to Table 2 or Table 3 respectively, which will not be elaborated here.

[0064] Figure 6 This is a flowchart of another motor rotor position positioning method provided in Embodiment 1 of the present invention.

[0065] Optionally, refer to Figure 6 As shown, the actual position of the rotor is determined based on the motor's running direction, the rotor's initial position, real-time quadrant values, and Hall effect sampling values. This process includes the following steps:

[0066] Step S501: Determine the preset microstep number sine table based on multiple Hall reference values ​​and motor microstep control parameters.

[0067] Among them, the motor microstep control parameters include the number of microsteps of the motor. Typically, the number of microsteps of the motor can be 16 microsteps. The preset microstep number sine table is shown in Table 1. The Hall reference value is the limit value of the Hall signal corresponding to each microstep interval.

[0068] Step S502: Obtain the absolute value of the Hall sampled value sv-mf at the sampling termination time.

[0069] Step S503: Obtain the real-time microstep value corresponding to the absolute value of the Hall sample value |sv-mf| in the preset microstep number sine table by looking up the table.

[0070] In this embodiment, at the sampling termination time, if the real-time quadrant value Q is valid and is in the third or fourth quadrant, the absolute value of the current Hall sampling value sv-mf is calculated, and the absolute value of the current Hall sampling value |sv-mf| is substituted into the preset microstep number sine table for comparison to match the current real-time microstep value.

[0071] For example, referring to Table 1, if the absolute value of the Hall sample value |sv-mf| satisfies: 392≤|sv-mf|<483, then the matched real-time microstep value is equal to 5; if the absolute value of the Hall sample value |sv-mf| satisfies: 1019≤|sv-mf|<1024, then the matched real-time microstep value is equal to 16.

[0072] Step S504: Obtain the initial quadrant value and initial microstep value corresponding to the initial position of the rotor.

[0073] Step S505: Determine the actual position of the current rotor based on the motor's running direction, initial quadrant value, initial microstep value, real-time microstep value, and real-time quadrant value.

[0074] In this embodiment, it can be first determined whether the real-time microstep value is valid data. If the real-time microstep value is valid data, the initial quadrant value and the initial microstep value are updated by combining the current running direction of the motor, the real-time microstep value and the real-time quadrant value to determine the actual position of the current rotor.

[0075] It should be noted that the motor is equipped with multiple pole pairs, each pole pair corresponds to multiple quadrants, and the motor sets a corresponding number of microsteps for each full step. Therefore, those skilled in the art can directly and without doubt determine that the actual position of the rotor is determined by the rotor's quadrant position, microstep position, number of running pole pairs, and number of running revolutions.

[0076] For example, taking a motor with 6 pole pairs and 16 microsteps as an example, the specific calculation process for the actual rotor position is explained as follows:

[0077] Optionally, the current actual position of the rotor is determined based on the motor's running direction Dir, the initial quadrant value Q0, the initial microstep value mstep0, the real-time microstep value mstep, and the real-time quadrant value Q. This includes the following steps: determining whether the microstep count value has overflowed based on the motor's running direction Dir, the initial microstep value mstep0, and the real-time microstep value mstep; if the microstep count value has overflowed, updating the current real-time quadrant value Q; determining the motor's running pole pair value and the number of motor revolutions based on the motor's running direction and the updated real-time quadrant value; and determining the real-time rotor position at the current sampling time based on the real-time microstep value, the real-time quadrant value, the motor's running pole pair value, and the number of motor revolutions.

[0078] Specifically, the relationship between the initial microstep value mstep0 and the real-time microstep value mstep is determined by combining the motor's running direction. If the motor's running direction Dir is forward and the initial microstep value mstep0 is greater than the real-time microstep value mstep, then the microstep count value is determined to have overflowed, the rotor enters the next quadrant, the real-time quadrant value Q is incremented by one, and the real-time quadrant value is updated. If the motor's running direction Dir is reverse and the initial microstep value mstep0 is less than the real-time microstep value mstep, then the microstep count value is determined to have overflowed, the rotor enters the next quadrant, the real-time quadrant value Q is decremented by one, and the real-time quadrant value is updated.

[0079] Furthermore, if it is necessary to update the real-time quadrant value, the motor running pole pair value Pole and the number of motor revolutions R are determined based on the motor's running direction and the updated real-time quadrant value.

[0080] Optionally, the motor operating pole pair value Pole and the number of motor revolutions R are determined based on the motor's running direction and the updated real-time quadrant value, including the following steps: obtaining the upper limit and lower limit pole pair values ​​of the operating pole pair value Pole; for example, in a 6-pole motor, the upper limit pole pair value can be defined as 5, and the lower limit pole pair value as 0; if the motor's running direction Dir is positive and the real-time quadrant value Q is the first quadrant value, then it is determined that the quadrant update has exceeded one cycle, and the current motor operating pole pair value Pole is incremented by one; if the motor's running direction Dir is positive... If the motor is running and the current operating pole pair value Pole reaches the upper limit pole pair value, then the current number of motor revolutions R is increased by one, and the operating pole pair value Pole is reset to the lower limit pole pair value; if the motor's running direction Dir is reverse and the real-time quadrant value Q is the fourth quadrant value, then the current motor operating pole pair value Pole is decreased by one; if the motor's running direction Dir is reverse and the current operating pole pair value Pole reaches the lower limit pole pair value, then the current number of motor revolutions R is decreased by one, and the operating pole pair value Pole is reset to the upper limit pole pair value.

[0081] Specifically, in a 6-pole motor, when the motor's running direction Dir is forward, if the real-time quadrant value Q is in the first quadrant, it is determined that the quadrant update has exceeded one cycle, and the current motor running pole pair value Pole is incremented by one. If the current running pole pair value Pole reaches the upper limit pole pair value 5, it is determined that the counting needs to restart from the lower limit pole pair value 0, and the running revolution update flag is set to 1. When the running revolution update flag is set to 1, the current motor running revolution count R is incremented by one, indicating that the rotor has rotated 360 degrees forward. When the motor's running direction Dir is reverse, if the real-time quadrant value Q is in the fourth quadrant, it is determined that the quadrant update has exceeded one cycle, and the current motor running pole pair value Pole is decremented by one. If the current running pole pair value Pole reaches the lower limit pole pair value 0, it is determined that the counting needs to restart from the upper limit pole pair value 5, and the running revolution update flag is set to 1. When the running revolution update flag is set to 1, the current motor running revolution count R is decremented by one, indicating that the rotor has rotated 360 degrees reverse.

[0082] Therefore, in this embodiment of the invention, valid real-time microstep value mstep, real-time quadrant value Q, motor operating pole pair value Pole, and motor operating revolutions R are obtained through data updates, and then the real-time rotor position at the current sampling time is determined based on the real-time microstep value mstep, real-time quadrant value Q, motor operating pole pair value Pole, and motor operating revolutions R.

[0083] Optionally, the real-time rotor position at the current sampling moment is determined based on the real-time microstep value, real-time quadrant value, motor operating pole pair value, and motor rotation number, including the following steps: obtaining the first microstep value corresponding to one full step of motor operation; obtaining the preset quadrant value corresponding to each pole pair of the motor; determining the second microstep value corresponding to each pole pair based on the first microstep value and the preset quadrant value; obtaining the preset pole pair value of the motor; determining the third microstep value corresponding to one rotation of the motor based on the preset pole pair value and the second microstep value; and calculating the real-time rotor position at the current sampling moment based on the motor rotation number, the third microstep value, the motor operating pole pair value, the second microstep value, the real-time quadrant value, the first microstep value, and the real-time microstep value.

[0084] The first microstep value represents the microstep value corresponding to one full step of the motor, the second microstep value represents the microstep value corresponding to one pole pair of the motor, and the third microstep value represents the microstep value corresponding to one revolution of the motor.

[0085] In this embodiment, the first microstep value is defined as mstep1, the second microstep value is defined as mstep2, and the third microstep value is defined as mstep3. The first microstep value mstep1 and the second microstep value mstep2 satisfy the following formula:

[0086] mstep2=QY*mstep1 (Formula 2)

[0087] Where QY represents the preset quadrant value corresponding to each pole pair.

[0088] The second microstep value mstep2 and the third microstep value mstep3 satisfy the following formula:

[0089] mstep3=PoleY*mstep2 (Formula 3)

[0090] Wherein, PoleY represents the preset pole pair value for each lap.

[0091] For example, the first microstep value, the preset quadrant value QY, and the preset pole pair value PoleY can be set through preset software and hardware structures. The first microstep value mstep1 can be set according to the microstepping control mode of the motor. For example, if the motor adopts a 16-microstep control mode, then the first microstep value mstep1 equals 16. The preset quadrant value QY corresponding to each pole pair and the preset pole pair value PoleY of the motor can be set according to the inherent parameters of the motor. For example, if the motor is a two-phase motor and the motor is set with 6 pole pairs, then the preset quadrant value QY equals 4 and the preset pole pair value PoleY equals 6.

[0092] Furthermore, the actual rotor position can be calculated by substituting the motor rotation number R, the third microstep value mstep3, the motor pole pair value Pole, the second microstep value mstep2, the real-time quadrant value Q, the first microstep value mstep1, and the real-time microstep value mstep into Formula 4 as shown below:

[0093] Position=R*mstep3+Pole*mstep2+Q*mstep1+mstep (Formula 4)

[0094] Position represents the actual position of the rotor.

[0095] Optionally, the motor rotor position positioning method further includes the following steps: obtaining the motor running time; determining the theoretical position of the current rotor based on the motor running time; determining the motor's operating state based on the actual position of the rotor and the theoretical position of the rotor; and if motor step loss occurs, performing step loss compensation control based on the actual position of the rotor.

[0096] In this embodiment, the motor running time and motor speed can be recorded by the control unit. The theoretical position of the current rotor can be calculated by the motor speed and motor running time. The actual position of the current rotor obtained by the above positioning method is compared with the theoretical position. If the difference between the actual position and the theoretical position is greater than a preset threshold, it is determined whether the motor has lost step or stalled. If it is determined that the motor has lost step, the output pulse width and frequency can be adjusted according to the actual position of the rotor, and the drive current of the motor can be adjusted to achieve step loss compensation.

[0097] Therefore, this embodiment of the invention uses a single linear Hall sensor to collect Hall signals, and determines the actual position of the rotor based on the Hall signals, the motor running direction and the initial position. The actual position of the rotor is then applied to motor operation detection and step loss compensation control, which helps to improve motor control performance and expand the application scenarios of the motor.

[0098] Example 2

[0099] Embodiment 2 of the present invention provides a motor rotor position positioning system, which can be used to implement the motor rotor position positioning method provided in the above embodiments. Figure 7 This is a schematic diagram of a motor rotor positioning system provided in Embodiment 2 of the present invention. Figure 7 As shown, the motor rotor position positioning system 100 includes: a control unit 10, a Hall sensor 20, a sampling unit 30, a running command acquisition unit 40, and a data processing unit 50.

[0100] The system includes a single Hall sensor 20 installed in the air gap magnetic field of the motor body 200; a running command acquisition unit 40 for acquiring the running direction of the motor; a sampling unit 30 for acquiring multiple Hall signal values ​​output by the Hall sensor 20 based on a preset time interval; a data processing unit 50 for performing analog-to-digital conversion and data filtering on the Hall signal values ​​to determine the Hall sampling value corresponding to the Hall signal value; and a control unit 10 for determining the real-time quadrant value of the rotor based on the running direction of the motor and the Hall sampling value, acquiring the initial position of the rotor at the initial sampling moment, and determining the current actual position of the rotor based on the running direction of the motor, the initial position of the rotor, the real-time quadrant value, and the Hall sampling value.

[0101] Optionally, the control unit 10 includes a storage unit, a first calculation unit, a first comparison unit, and a second calculation unit. The storage unit is used to store a preset microstep number sine table established based on multiple Hall reference values ​​and motor microstep control parameters. The first calculation unit is used to obtain the absolute value of the Hall sampled value at the sampling termination time. The first comparison unit is used to obtain the real-time microstep value corresponding to the absolute value of the Hall sampled value in the preset microstep number sine table by looking up the table. The second calculation unit is used to obtain the initial quadrant value and initial microstep value corresponding to the initial position of the rotor, and determine the actual position of the current rotor according to the running direction of the motor, the initial quadrant value, the initial microstep value, the real-time microstep value, and the real-time quadrant value.

[0102] Optionally, the second calculation unit is used to determine whether the microstep count value has overflowed based on the motor's running direction, the initial microstep value, and the real-time microstep value; if the microstep count value overflows, the second calculation unit updates the current real-time quadrant value, determines the motor running pole pair value and the number of motor rotations based on the motor's running direction and the updated real-time quadrant value, and determines the real-time rotor position at the current sampling time based on the real-time microstep value, the real-time quadrant value, the motor running pole pair value, and the number of motor rotations.

[0103] Optionally, the second calculation unit is further configured to acquire the first microstep value corresponding to one full step of motor operation and the preset quadrant value corresponding to each pole pair, and determine the second microstep value corresponding to each pole pair based on the first microstep value and the preset quadrant value; the second calculation unit is further configured to acquire the preset pole pair value of the motor, and determine the third microstep value corresponding to one revolution of the motor based on the preset pole pair value and the second microstep value; and calculate the real-time rotor position at the current sampling time based on the number of motor revolutions, the third microstep value, the motor running pole pair value, the second microstep value, the real-time quadrant value, the first microstep value and the real-time microstep value.

[0104] Optionally, the second calculation unit is further configured to obtain the upper limit and lower limit of the operating pole pair value. If the motor is running in the forward direction and the real-time quadrant value is the first quadrant value, the second calculation unit increments the current operating pole pair value by one. If the motor is running in the forward direction and the current operating pole pair value reaches the upper limit, the second calculation unit increments the current number of motor revolutions by one and resets the operating pole pair value to the lower limit. If the motor is running in the reverse direction and the real-time quadrant value is the fourth quadrant value, the second calculation unit decrements the current operating pole pair value by one. If the motor is running in the reverse direction and the current operating pole pair value reaches the lower limit, the second calculation unit decrements the current number of motor revolutions by one and resets the operating pole pair value to the upper limit.

[0105] Optionally, the control unit 10 further includes a third calculation unit and a second comparison unit. The third calculation unit is used to obtain the difference between two adjacent Hall sampling values ​​and determine whether the difference is a non-zero value. If the difference is a non-zero value, the third calculation unit accumulates and sums the multiple differences within the sampling time period to determine the sum of the differences. The second comparison unit is used to determine the real-time quadrant value of the rotor based on the sum of the differences, the Hall sampling value, and the running direction of the motor.

[0106] Optionally, the data processing unit 50 includes an analog-to-digital conversion unit, an amplitude modulation unit, and a data filtering unit. The analog-to-digital conversion unit is used to perform analog-to-digital conversion on multiple Hall signal values ​​to obtain the digital signal corresponding to the Hall signal value. The amplitude modulation unit is used to obtain the maximum Hall signal value and the preset reference value corresponding to the maximum Hall signal value, and to perform amplitude modulation on the Hall signal value according to the preset reference value and the maximum Hall signal value. The data filtering unit is used to perform data filtering on the modulated Hall signal value according to a filtering algorithm to determine the Hall sampling value corresponding to the Hall signal value.

[0107] Optionally, the motor rotor position positioning system 100 further includes a timing unit and a step loss compensation unit. The timing unit is used to acquire the motor running time, and the control unit 10 is also used to determine the theoretical position of the current rotor based on the motor running time, and to determine the motor's operating state based on the actual position of the rotor and the theoretical position of the rotor. If the motor loses step, the control unit 10 controls the step loss compensation unit to perform step loss compensation based on the actual position of the rotor.

[0108] The motor rotor position positioning system provided in this embodiment of the invention includes a control unit 10, a Hall sensor 20, a sampling unit 30, a running command acquisition unit 40, and a data processing unit 50. The sampling unit 30 acquires multiple Hall signal values ​​output by the Hall sensor 20 based on a preset time interval. The data processing unit 50 performs analog-to-digital conversion and data filtering on the Hall signal values ​​to determine the Hall sampling values ​​corresponding to the Hall signal values. The control unit 10 determines the real-time quadrant value of the rotor at the current moment based on the motor's running direction and the Hall sampling value. Furthermore, it determines the actual position of the rotor at the current moment based on the initial rotor position at the initial sampling moment, the motor's running direction at the current moment, the real-time quadrant value, and the Hall sampling value. This system solves the problems of low accuracy and poor reliability in motor rotor position positioning, improves rotor positioning accuracy and reliability, and is beneficial for improving motor control performance.

[0109] Example 3

[0110] Embodiment 3 of the present invention provides an electrical control device, which includes the above-mentioned motor rotor position positioning system.

[0111] In this embodiment, the device includes a claw-pole stepper motor equipped with the motor rotor position positioning system and an electronic control device driven by the claw-pole stepper motor. Typically, the electronic control device includes an electronically controlled valve, such as an electronic expansion valve or a multi-channel refrigerant valve.

[0112] The motor provided in this embodiment of the invention includes a motor rotor position positioning system. This system acquires multiple Hall signal values ​​output by Hall sensors based on a preset time interval, performs analog-to-digital conversion and data filtering on the Hall signal values, determines the Hall sampling value corresponding to each Hall signal value, determines the real-time quadrant value of the rotor at the current moment based on the motor's running direction and the Hall sampling value, and determines the actual position of the rotor at the current moment based on the initial position of the rotor at the initial sampling moment, the motor's running direction at the current moment, the real-time quadrant value, and the Hall sampling value. This solves the problems of low rotor position positioning accuracy and poor reliability, improves rotor positioning accuracy and reliability, and is beneficial to improving motor control performance.

[0113] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for locating the position of a motor rotor, characterized in that, Includes the following steps: The motor's running direction is obtained, and the motor's running direction is controlled by the motor running direction command; Multiple Hall signal values ​​output by the Hall sensor are acquired based on a preset time interval, and the Hall signal values ​​are processed to determine the Hall sampling value corresponding to the Hall signal value. The real-time quadrant value of the rotor is determined based on the running direction of the motor and the Hall sampling value; Obtain the initial position of the rotor at the initial sampling moment; A preset microstep number sine table is determined based on multiple Hall reference values ​​and motor microstep control parameters, wherein the Hall reference values ​​are the limit values ​​of the Hall signals corresponding to each microstep interval, and the motor microstep control parameters include the number of subdivided microsteps of the motor. Obtain the absolute value of the Hall sampled value at the time of sampling termination; The real-time microstep value corresponding to the absolute value of the Hall sampling value in the preset microstep number sine table is obtained by looking up a table. Obtain the initial quadrant value and initial microstep value corresponding to the initial position of the rotor; Determine whether the microstep count value has overflowed based on the motor's running direction, the initial microstep value, and the real-time microstep value; If the microstep count overflows, the current real-time quadrant value is updated. The motor's operating pole pair value and the number of motor revolutions are determined based on the motor's operating direction and the updated real-time quadrant value. Obtain the value of the first microstep corresponding to one full step of motor operation; Obtain the preset quadrant value corresponding to each pole pair of the motor; The second microstep value corresponding to each pole pair is determined based on the first microstep value and the preset quadrant value. Obtain the preset pole pair values ​​of the motor; The third microstep value corresponding to one revolution of the motor is determined based on the preset pole pair value and the second microstep value. The real-time rotor position at the current sampling moment is calculated based on the number of motor revolutions, the third microstep value, the motor pole pair value, the second microstep value, the real-time quadrant value, the first microstep value, and the real-time microstep value.

2. The motor rotor position positioning method according to claim 1, characterized in that, The process of determining the motor's operating pole pair value and motor revolutions based on the motor's operating direction and the updated real-time quadrant value includes the following steps: Obtain the upper limit and lower limit of the operating pole pair values; If the motor is running in the forward direction and the real-time quadrant value is the first quadrant value, then the current motor running pole pair value is increased by one. If the motor is running in the forward direction and the current running pole pair value has reached the upper limit pole pair value, then the current number of motor revolutions is increased by one, and the running pole pair value is reset to the lower limit pole pair value. If the motor is running in the opposite direction and the real-time quadrant value is the fourth quadrant value, then the current motor running pole pair value is subtracted by one. If the motor is running in the opposite direction and the current operating pole pair value has reached the lower limit pole pair value, then the current number of motor revolutions is reduced by one, and the operating pole pair value is reset to the upper limit pole pair value.

3. The motor rotor position positioning method according to claim 1, characterized in that, The step of determining the real-time quadrant value of the rotor based on the motor's running direction and the Hall sampling value includes the following steps: Obtain the difference between two adjacent Hall sample values; Determine whether the difference is a non-zero value; If the difference is a non-zero value, then the sum of multiple differences within the sampling time period is accumulated to determine the sum of differences; The real-time quadrant value of the rotor is determined based on the difference, the Hall sample value, and the running direction of the motor.

4. The motor rotor position positioning method according to claim 1, characterized in that, The step of processing the Hall signal value to determine the Hall sampling value corresponding to the Hall signal value includes the following steps: Perform analog-to-digital conversion on multiple Hall signal values ​​to obtain the digital signals corresponding to the Hall signal values; Obtain the maximum Hall signal value and the preset reference value corresponding to the maximum Hall signal value; The Hall signal value is amplitude modulated according to the preset reference value and the maximum Hall signal value; A filtering algorithm is used to filter the modulated Hall signal value to determine the Hall sample value corresponding to the Hall signal value.

5. The method for positioning the motor rotor according to any one of claims 1-4, characterized in that, It also includes the following steps: Obtain the motor running time; The theoretical position of the current rotor is determined based on the motor's running time; The operating state of the motor is determined based on the actual position and the theoretical position of the rotor; If motor step loss occurs, step loss compensation control is performed based on the actual position of the rotor.

6. A motor rotor positioning system, characterized in that, include: Control unit, Hall sensor, sampling unit, operation command acquisition unit and data processing unit; The running instruction acquisition unit is used to acquire the running direction of the motor, and the running direction of the motor is controlled by the motor running direction instruction; The sampling unit is used to acquire multiple Hall signal values ​​output by the Hall sensor based on a preset time interval; The data processing unit is used to process the Hall signal value and determine the Hall sampling value corresponding to the Hall signal value. The control unit is used to determine the real-time quadrant value of the rotor based on the running direction of the motor and the Hall sampling value, and to obtain the initial position of the rotor at the initial sampling time, and to determine the current actual position of the rotor based on the running direction of the motor, the initial position of the rotor, the real-time quadrant value and the Hall sampling value. The control unit includes a storage unit, a first calculation unit, a first comparison unit, and a second calculation unit. The storage unit is used to store a preset microstep number sine table based on multiple Hall reference values ​​and motor microstep control parameters. The first calculation unit is used to obtain the absolute value of the Hall sample value at the sampling termination time; the first comparison unit is used to obtain the real-time microstep value corresponding to the absolute value of the Hall sample value in the preset microstep number sine table by looking up the table. The second calculation unit is used to obtain the initial quadrant value and initial microstep value corresponding to the initial position of the rotor, and to determine the actual position of the current rotor according to the running direction of the motor, the initial quadrant value, the initial microstep value, the real-time microstep value and the real-time quadrant value. The Hall reference value is the limit value of the Hall signal corresponding to each microstep interval, and the motor microstep control parameters include the number of subdivision microsteps of the motor. The second calculation unit is used to determine whether the microstep count value has overflowed based on the motor's running direction, initial microstep value, and real-time microstep value. If the microstep count value overflows, the second calculation unit updates the current real-time quadrant value, determines the motor running pole pair value and motor running revolution number based on the motor's running direction and the updated real-time quadrant value, and determines the real-time rotor position at the current sampling time based on the real-time microstep value, real-time quadrant value, motor running pole pair value, and motor running revolution number. The second calculation unit is also used to obtain the first microstep value corresponding to one full step of motor operation and the preset quadrant value corresponding to each pole pair, and to determine the second microstep value corresponding to each pole pair based on the first microstep value and the preset quadrant value; the second calculation unit is also used to obtain the preset pole pair value of the motor, and to determine the third microstep value corresponding to one revolution of the motor based on the preset pole pair value and the second microstep value; and to calculate the real-time rotor position at the current sampling time based on the number of motor revolutions, the third microstep value, the motor running pole pair value, the second microstep value, the real-time quadrant value, the first microstep value and the real-time microstep value.

7. An electrical control device, characterized in that, Includes the motor rotor position positioning system as described in claim 6.

Citation Information

Patent Citations

  • Resolution method and resolver for signals of rotating transformer

    CN101521480A

  • Method and device for determining rotor angle position of permanent magnet synchronous motor and motor

    CN110932616A