Multi-turn absolute position detection method and device, motor control equipment and medium
By analyzing data from the magnetic encoder sensor and the Hall switch sensor, the ambiguity region and confidence level of the motor shaft are determined, and the cumulative pulse count is corrected. This solves the position detection error problem caused by motor shaft drift and enables high-precision calculation of absolute position over multiple revolutions.
Patent Information
- Application Number
- CN202511068225.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-07
AI Technical Summary
Motor shaft drift causes inaccurate signal transitions in the Hall sensor, affecting the accuracy of multi-turn absolute position detection.
By collecting the current angle value of the magnetic encoder sensor and the current cumulative pulse count of the Hall switch sensor, it is determined whether the device belongs to a fuzzy region, the membership result and confidence level are determined, and the cumulative pulse count is corrected based on the membership result and confidence level to obtain an accurate cumulative pulse count correction value, and the absolute position of multiple turns is calculated.
This improves the accuracy and precision of multi-turn absolute position detection, avoids errors in the cumulative pulse count caused by the motor shaft stopping in an ambiguous area, and ensures the accuracy of position detection.
Smart Images

Figure CN120915178A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of motor control, and in particular to a multi-turn absolute position detection method and device, a motor control device and a medium. BACKGROUND
[0002] A multi-turn absolute position encoder provides globally unique and power-off non-loss absolute position information by measuring the mechanical rotation number of a rotating shaft and the accurate angle in the current turn, and is a key technology for realizing precise control of a motor.
[0003] In a motor, a plurality of Hall sensors are usually installed at specific angles along a circumference, and a motor rotating shaft provided with a magnet triggers the Hall sensors when rotating, so that the rotation number of the motor rotating shaft can be determined by the state of the plurality of Hall sensors, and the measurement of the multi-turn position can be realized by combining the single-turn angle measured by the magnetic encoder.
[0004] However, the rotation number is highly dependent on the number of signal jump edges (i.e. pulses) detected by the Hall sensor, and if the motor rotating shaft has drifted, i.e. its current position has advanced or lagged relative to the actual position of the signal jump, the Hall sensor will not have a signal jump, resulting in an error in the measurement of the rotation number and affecting the accuracy of the multi-turn absolute position detection. SUMMARY
[0005] Therefore, the present application provides a multi-turn absolute position detection method, device, motor control device and medium to solve the problem of motor rotating shaft drift, which easily affects the accuracy of multi-turn absolute position detection.
[0006] In a first aspect, the present application provides a multi-turn absolute position detection method applied to a motor, the motor comprising a controller, a magnetic encoding sensor and two Hall switch sensors arranged orthogonally along a circumference, the method being applied to the controller, and the method comprising:
[0007] acquiring a current angle value of the magnetic encoding sensor and a current cumulative pulse number of the Hall switch sensor;
[0008] determining whether the current angle value belongs to a fuzzy region to obtain a membership result and determine a confidence degree of the membership result, the fuzzy region being an error region centered on a position at which the cumulative pulse number is updated;
[0009] correcting the current cumulative pulse number based on the membership result and the confidence degree to obtain a cumulative pulse number correction value;
[0010] obtaining a multi-turn absolute position based on the current angle value, the cumulative pulse number correction value and the current cumulative pulse number.
[0011] The application determines whether the current angle value collected by the magnetic encoding sensor belongs to the fuzzy region to obtain the membership result. According to the membership result and the confidence of the membership result, the current cumulative pulse number is corrected to obtain a cumulative pulse number correction value with higher accuracy, so as to avoid the error and omission of the cumulative pulse number caused by the motor rotating shaft stopping in the fuzzy region, thereby improving the accuracy and precision of multi-turn absolute position detection.
[0012] In an optional embodiment, the fuzzy region includes a first fuzzy region and a second fuzzy region, the first fuzzy region is an error region centered on a position triggering the cumulative pulse number update and the rotation turn number update, and the second fuzzy region is a fuzzy region other than the first fuzzy region; determining whether the current angle value belongs to the fuzzy region to obtain the membership result includes:
[0013] determining whether the current angle value belongs to the first fuzzy region to obtain a first membership;
[0014] determining whether the current angle value belongs to the second fuzzy region to obtain a second membership;
[0015] obtaining the membership result according to the first membership and the second membership.
[0016] The application respectively determines whether the current angle value belongs to the first fuzzy region and the second fuzzy region, so as to determine whether the motor triggers the rotation turn number update or only triggers the cumulative pulse number update, and obtains the membership result, so as to correct the current cumulative pulse number according to the membership result to obtain a more accurate rotation turn number, thereby improving the accuracy and precision of multi-turn absolute position calculation.
[0017] In an optional embodiment, the current cumulative pulse number is corrected based on the membership result and the confidence to obtain a cumulative pulse number correction value, including:
[0018] if the first membership indicates that the current angle value belongs to the first fuzzy region, and the confidence is greater than a confidence threshold, the current cumulative pulse number is corrected by one to obtain the cumulative pulse number correction value;
[0019] obtaining the multi-turn absolute position based on the current angle value and the cumulative pulse number correction value, including:
[0020] obtaining an angle offset according to the minimum deviation between the current angle value and the position triggering the cumulative pulse number update, and determining the rotation turn number based on the cumulative pulse number correction value;
[0021] calculating the multi-turn absolute position according to the sum of the multi-turn rotation angle corresponding to the rotation turn number and the angle offset.
[0022] The application detects that the current angle value belongs to the first fuzzy region and the current angle value confidence of the magnetic encoding sensor is high, indicating that the current cumulative pulse number just completes a rotation period, triggering the number of turns update, and the current cumulative pulse number needs to be increased or decreased by one to obtain a cumulative pulse number correction value, thereby calculating the accurate rotation number of turns. The current angle value of the magnetic encoding sensor is used to correct the single-turn angle position, thereby improving the calculation accuracy and precision of the multi-turn absolute position.
[0023] In an optional embodiment, the current cumulative pulse number is corrected based on the membership results and the confidence to obtain a cumulative pulse number correction value, including:
[0024] If the first membership indicates that the current angle value does not belong to the first fuzzy region, and the second membership indicates that the current angle value belongs to the second fuzzy region, and the confidence is greater than the confidence threshold, the current cumulative pulse number is taken as the cumulative pulse number correction value;
[0025] Based on the current angle value, the cumulative pulse number correction value and the current cumulative pulse number, a multi-turn absolute position is obtained, including:
[0026] According to the minimum deviation between the current angle value and the position triggering the cumulative pulse number update, an angle offset is obtained, and based on the cumulative pulse number correction value, the rotation number of turns is determined;
[0027] Based on the current cumulative pulse number, a single-turn rotation angle is determined;
[0028] According to the sum of the multi-turn rotation angle corresponding to the rotation number of turns, the single-turn rotation angle and the angle offset, a multi-turn absolute position is calculated.
[0029] The application detects that the current angle value belongs to the second fuzzy region, indicating that a new turn is not triggered, and the cumulative pulse number correction value is still the current cumulative pulse number. Since the current angle value is in the error region adjacent to the left and right of the pole axis, the single-turn rotation angle is determined by calculating the pulse region crossed by the motor in the current turn. The single-turn rotation angle is corrected in combination with the current angle value of the magnetic encoding sensor, thereby improving the calculation accuracy and precision of the multi-turn absolute position.
[0030] In an optional embodiment, the current cumulative pulse number is corrected based on the membership results and the confidence to obtain a cumulative pulse number correction value, including:
[0031] If the first membership indicates that the current angle value does not belong to the first fuzzy region, and the second membership indicates that the current angle value does not belong to the second fuzzy region, the current cumulative pulse number is taken as the cumulative pulse number correction value;
[0032] Based on the current angle value and the cumulative pulse number correction value, a multi-turn absolute position is obtained, including:
[0033] determine the number of rotations based on the accumulated pulse number correction value;
[0034] calculate the multi-turn absolute position based on the sum of the multi-turn rotation angle corresponding to the number of rotations and the current angle value.
[0035] When the current angle value deviates from the ambiguous region, the application indicates that the accumulated pulse number update will not be triggered, nor will the number of rotations be updated. At this time, the single-turn position is calculated using the current angle value of the magnetic encoding sensor, and the number of rotations is still calculated using the current accumulated pulse number, thereby realizing accurate estimation of the multi-turn absolute position.
[0036] In an alternative embodiment, the method further comprises:
[0037] When the motor speed is detected to be greater than the motor speed threshold, the first angle value of the magnetic encoding sensor at the first time and the second angle value at the second time are obtained, and the first accumulated pulse number of the Hall switch sensor at the first time and the second accumulated pulse number at the second time are obtained; the second time is earlier than the first time;
[0038] If the angle difference between the first angle value and the second angle value is greater than the angle difference threshold, and the first accumulated pulse number and the second accumulated pulse number are the same, then the first accumulated pulse number is compensated based on the motor speed and the second accumulated pulse number;
[0039] Based on the compensated first accumulated pulse number, the current accumulated pulse number of the Hall switch sensor at the first time is obtained.
[0040] Based on the motor speed and the second accumulated pulse number, the application determines the pulse interval that the motor continuously crosses, compensates the first accumulated pulse number at the first time, and obtains the real current accumulated pulse number, thereby avoiding pulse missing when the motor rotates at high speed.
[0041] In an alternative embodiment, the motor further comprises a main power supply, and the method further comprises:
[0042] If it is detected that the main power supply is powered off, the application is controlled to enter a sleep state;
[0043] If it is detected that the pulse signal output by the Hall switch sensor changes, the application is controlled to enter a running state, and the current accumulated pulse number is determined based on the change in the pulse signal; or, if it is detected that the main power supply is powered on, the application is controlled to enter a running state.
[0044] After detecting that the main power supply is powered off, the application is controlled to enter a sleep state, thereby achieving the effect of reducing energy consumption. If it is detected that the pulse signal output by the Hall switch sensor changes, the application is controlled to enter a running state, and the pulse signal collected by the Hall switch sensor is converted into a pulse number and stored, thereby avoiding missing pulse numbers during sleep.
[0045] Secondly, the present invention provides a multi-turn absolute position detection device for use in a motor. The motor includes a controller, a magnetic encoder sensor, and two Hall effect switch sensors orthogonally arranged along the circumference. The device is used in the controller and includes:
[0046] The acquisition module is used to collect the current angle value of the magnetic encoder sensor and the current cumulative pulse count of the Hall switch sensor;
[0047] The first processing module is used to determine whether the current angle value belongs to the fuzzy region, obtain the membership result, and determine the confidence level of the membership result; the fuzzy region is the error region centered on the position that triggers the update of the cumulative pulse count;
[0048] The second processing module is used to correct the current cumulative pulse count based on the membership results and confidence level, and obtain the corrected cumulative pulse count value.
[0049] The third processing module is used to obtain the absolute position of multiple revolutions based on the current angle value, the cumulative pulse number correction value, and the current cumulative pulse number.
[0050] Thirdly, the present invention provides a motor control device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the multi-turn absolute position detection method described in the first aspect or any corresponding embodiment.
[0051] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the multi-turn absolute position detection method described in the first aspect or any corresponding embodiment thereof.
[0052] The beneficial effects of this application are as follows:
[0053] This application determines whether the current angle value acquired by the magnetically encoded sensor belongs to a fuzzy region, thus obtaining a membership result. Based on the membership result and its confidence level, the current cumulative pulse count is corrected to obtain a more accurate cumulative pulse count correction value. This avoids errors in the cumulative pulse count caused by the motor shaft stopping in a fuzzy region, thereby improving the accuracy and precision of multi-turn absolute position detection. Attached Figure Description
[0054] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the specific embodiments or prior art description. Obviously, the drawings described below are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0055] Figure 1 is a structural schematic diagram of a motor according to an embodiment of the present application;
[0056] Figure 2 is a flowchart of a multi-turn absolute position detection method according to an embodiment of the present application;
[0057] Figure 3 is a flowchart of another multi-turn absolute position detection method according to an embodiment of the present application;
[0058] Figure 4 is a schematic diagram of a fuzzy area according to an embodiment of the present application;
[0059] Figure 5 is a flowchart of still another multi-turn absolute position detection method according to an embodiment of the present application;
[0060] Figure 6 is a running flowchart of a full-power state according to an embodiment of the present application;
[0061] Figure 7 is a running flowchart of a low-power sleep state according to an embodiment of the present application;
[0062] Figure 8 is a flowchart of pulse number compensation according to an embodiment of the present application;
[0063] Figure 9 is a structural block diagram of a multi-turn absolute position detection device according to an embodiment of the present application;
[0064] Figure 10 is a hardware structural schematic diagram of a motor control device according to an embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the present application.
[0066] According to an embodiment of the present application, a motor is provided, as shown in the accompanying drawings, which comprises a controller 101, a magnetic encoding sensor 102 and two circumferentially orthogonally arranged Hall switch sensors 103, wherein the controller 101 is configured to collect pulse signals of the Hall switch sensors 103 and position information (single-turn position) of the magnetic encoding sensor 102, and to accurately output multi-turn absolute position information through a fuzzy recognition algorithm. Figure 1
[0067] Specifically, the orthogonally arranged Hall switch sensors 103 can realize rotation turn calculation, but the accuracy is low. Due to the effects of device aging and other factors, the motor shaft is prone to drift, i.e., the motor shaft sometimes does not accurately stop at the position triggering the cumulative pulse number update, but stops at a fuzzy area centered on the position triggering the cumulative pulse number update, i.e., the position of the motor shaft lags or leads relative to the actual position where the Hall switch sensor 103 can detect signal jump. In this way, the Hall switch sensor 103 does not jump, which is prone to cause cumulative pulse number calculation error, and the rotation turn measurement will also have error, thereby affecting the accuracy of multi-turn absolute position detection.
[0068] Therefore, the present application collects the current angle value of the magnetic encoding sensor 102 and the current cumulative pulse number of the Hall switch sensor 103 by the controller 101. Then, it is judged whether the current angle value belongs to a fuzzy area, to obtain a membership result, and to determine the confidence degree of the membership result, wherein the fuzzy area is an error area centered on the position triggering the cumulative pulse number update. The controller 101 corrects the current cumulative pulse number based on the membership result and the confidence degree, to obtain a cumulative pulse number correction value with high accuracy, and thus obtains the multi-turn absolute position based on the current angle value, the cumulative pulse number correction value and the current cumulative pulse number, to realize the accuracy and precision of motor multi-turn absolute position detection.
[0069] Referring again to Figure 1 , in addition to fuzzy position recognition, the controller 101 also comprises a power consumption management function, which achieves the effect of reducing energy consumption through switching between low-power mode and full-power mode.
[0070] The specific principles and detailed working processes of the controller 101 are described in the following method embodiment, and will not be described here.
[0071] According to an embodiment of the present application, a multi-turn absolute position detection method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0072] A multi-turn absolute position detection method is provided in the embodiment, which can be used for a motor control system as shown in Figure 1 The controller 101, such as a single-chip microcomputer, a microcontroller unit (MCU), etc. Figure 2 A flowchart of the multi-turn absolute position detection method according to the embodiment of the present application is shown in Figure 2 The flowchart includes the following steps:
[0073] In step S201, the current angle value of the magnetic encoding sensor and the current cumulative pulse number of the Hall switch sensor are collected.
[0074] Specifically, the two Hall switch sensors are arranged orthogonally along the circumference, and the pulse signals of the two Hall switch sensors will change when the motor shaft rotates one turn. The cumulative pulse number is obtained through the change of the pulse signals, and the number of turns of the motor is determined. Specifically, when the cumulative pulse number is increased by one, it indicates that the motor rotates 0.25 turns (i.e., 90°) in the forward direction; when the cumulative pulse number is decreased by one, it indicates that the motor rotates 0.25 turns (i.e., 90°) in the reverse direction. The detailed process of pulse number accumulation according to the pulse signals of the orthogonal Hall switch sensor can be referred to the description of related art, and will not be described here.
[0075] In step S201, the current angle value of the magnetic encoding sensor is collected, and the current cumulative pulse number is determined through the change of the pulse signals of the two Hall switch sensors arranged orthogonally, that is, the number of times the motor rotates 0.25 turns in the forward direction.
[0076] In step S202, it is determined whether the current angle value belongs to the fuzzy region, the membership degree result is obtained, and the confidence degree of the membership degree result is determined. The fuzzy region is an error region centered on the position triggering the cumulative pulse number update.
[0077] Specifically, referring again to Figure 1 Since the two Hall switch sensors are arranged orthogonally, the cumulative pulse number update will be triggered when the motor shaft rotates to the pole axis (orthogonal cross axis) position. Due to the influence of factors such as device aging, the motor shaft is prone to stop in the error region adjacent to the left and right of the pole axis. Even if the actual number of turns of the motor is an integer multiple of 0.25 turns, the Hall switch sensor will not be triggered, resulting in an error in the current cumulative pulse number.
[0078] In the embodiment of the present application, whether the current angle value in the current circle belongs to the fuzzy region is detected to obtain the membership result, so that the current cumulative pulse number is corrected according to the membership result. Moreover, the confidence of the membership result is determined to represent the reliability of the motor rotating shaft falling into the fuzzy region, so that the current cumulative pulse number is corrected using the membership result with high reliability, thereby improving the accuracy and precision of the multi-circle absolute position detection.
[0079] In step S203, the current cumulative pulse number is corrected based on the membership result and the confidence to obtain a corrected cumulative pulse number.
[0080] Specifically, the current cumulative pulse number is corrected based on the membership result of the current angle value with respect to the fuzzy region and the confidence of the membership result, so that a corrected cumulative pulse number closer to the actual value is obtained, and the accuracy of the motor rotating circle detection is improved.
[0081] In step S204, the multi-circle absolute position is obtained based on the current angle value, the corrected cumulative pulse number, and the current cumulative pulse number.
[0082] Specifically, after obtaining the corrected cumulative pulse number with high accuracy, the corrected cumulative pulse number is converted into the rotating circle number of the motor according to the corresponding relationship between the pulse number and the rotating circle number, i.e., 1 pulse number corresponds to 0.25 circle, or the corrected cumulative pulse number and the current cumulative pulse number are converted into the number of times of 0.25 circle rotation of the motor in the positive direction. Moreover, the multi-circle absolute position is calculated based on the current angle value in the current circle.
[0083] The multi-circle absolute position detection method provided in the embodiment determines whether the current angle value collected by the magnetic encoding sensor belongs to the fuzzy region to obtain the membership result. The current cumulative pulse number is corrected according to the membership result and the confidence of the membership result to obtain a corrected cumulative pulse number with high accuracy, so that the missed or incorrect cumulative pulse number caused by the motor rotating shaft stopping in the fuzzy region is avoided, thereby improving the accuracy and precision of the multi-circle absolute position detection.
[0084] In the embodiment, a multi-circle absolute position detection method is provided, which can be used in a controller 101 such as a single-chip microcomputer, a microcontroller unit (MCU), etc. Figure 1 as shown in FIG. 1, and the method includes the following steps. Figure 3 as shown in FIG. 2, and the method includes the following steps. Figure 3 as shown in FIG. 2, and the method includes the following steps.
[0085] In step S301, the current angle value of the magnetic encoding sensor and the current cumulative pulse number of the Hall switch sensor are collected. Details can be referred to Figure 2The detailed description of the embodiments and step S201 will not be repeated here.
[0086] In step S302, it is determined whether the current angle value belongs to the fuzzy region, to obtain the membership result and determine the confidence degree of the membership result; the fuzzy region is an error region centered on the position of the trigger cumulative pulse number update.
[0087] Specifically, the fuzzy region includes a first fuzzy region and a second fuzzy region, the first fuzzy region is an error region centered on the position of the trigger cumulative pulse number update and the trigger rotation number update, and the second fuzzy region is a fuzzy region other than the first fuzzy region.
[0088] For example, as shown in Figure 4 Taking 0° as the starting angle of motor rotation, the pole axis is the position of the trigger cumulative pulse number update, and the pole axis position includes 0°, 90°, 180° and 270° positions, wherein the 0° pole axis is both the position of the trigger cumulative pulse number update and the position of the trigger rotation number update, while the positions of the 90° pole axis, 180° pole axis and 270° pole axis only trigger the cumulative pulse number update, and do not trigger the rotation number update. The first fuzzy region is the error region adjacent to the left and right of the 0° pole axis, and the second fuzzy region includes the error regions adjacent to the left and right of the 90° pole axis, 180° pole axis and 270° pole axis, respectively.
[0089] Specifically, the above step S302 includes:
[0090] In step S3021, it is determined whether the current angle value belongs to the first fuzzy region, to obtain the first membership.
[0091] Specifically, referring again to Figure 4 Each fuzzy region is centered on 0°, 90°, 180° or 270°, covers an error range of ±δ°, and uses a trapezoidal membership function to determine the membership of the current angle value.
[0092] In some optional embodiments, the first membership can be determined by the following formula:
[0093]
[0094] Wherein, θ represents the current angle value, and μH1(θ) represents the first membership.
[0095] In step S3022, it is determined whether the current angle value belongs to the second fuzzy region, to obtain the second membership.
[0096] In some optional embodiments, the second membership can be determined by the following formula:
[0097]
[0098] wherein n represents the current cumulative pulse number, and μH2(θ) represents the second membership degree.
[0099] In step S3023, the membership degree result is obtained according to the first membership degree and the second membership degree, and the confidence of the membership degree result is determined.
[0100] Specifically, the single-turn magnetic encoding sensor has higher precision and smaller error range (±γ°) than the Hall switch sensor, and thus the confidence of the membership degree result can be determined according to the membership degree of the current angle value for the membership degree of the fuzzy area, to measure the reliability of the motor rotating shaft falling into the fuzzy area. The membership degree of the current angle value can be determined by a Gaussian type membership function, and the specific formula is as follows:
[0101]
[0102] wherein γ represents the error of the magnetic encoding sensor, and μS(θ) represents the membership degree of the current angle value.
[0103] In step S303, the current cumulative pulse number is corrected based on the membership degree result and the confidence, to obtain a cumulative pulse number correction value.
[0104] Specifically, the above step S303 includes:
[0105] In step S3031, if the first membership degree indicates that the current angle value belongs to the first fuzzy area, and the confidence is greater than a confidence threshold, the current cumulative pulse number is corrected by one to obtain the cumulative pulse number correction value.
[0106] Specifically, if μH1(θ) = 1 and μS(θ) is greater than the confidence threshold, the cumulative pulse number correction value = the current cumulative pulse number ± 1, if the motor rotates forward, the cumulative pulse number correction value = the current cumulative pulse number + 1; if the motor rotates reversely, the cumulative pulse number correction value = the current cumulative pulse number - 1. The confidence threshold can be 0.9, and can be set according to the actual application scenario, which is not limited in the present application.
[0107] In step S3032, if the first membership degree indicates that the current angle value does not belong to the first fuzzy area, and the second membership degree indicates that the current angle value belongs to the second fuzzy area, and the confidence is greater than the confidence threshold, the current cumulative pulse number is taken as the cumulative pulse number correction value.
[0108] Specifically, if μH1(θ) = 0 and μH2(θ) = 1 and μS(θ) is greater than the confidence threshold, the current cumulative pulse number is not adjusted, and the cumulative pulse number correction value = the current cumulative pulse number. The confidence threshold can be 0.9, and can be set according to the actual application scenario, which is not limited in the present application.
[0109] If the first membership degree indicates that the current angle value does not belong to the first fuzzy region and the second membership degree indicates that the current angle value does not belong to the second fuzzy region, the current accumulated pulse number is taken as the accumulated pulse number correction value.
[0110] Specifically, if μH1(θ) = 0 and μH2(θ) = 0, the current accumulated pulse number is not adjusted, and the accumulated pulse number correction value = the current accumulated pulse number.
[0111] At step S304, the multi-turn absolute position is obtained based on the current angle value, the accumulated pulse number correction value, and the current accumulated pulse number.
[0112] In some embodiments, if μH1(θ) = 1 and μS(θ) is greater than the confidence threshold, the angle offset Δθ is obtained according to the minimum deviation between the current angle value and the position at which the accumulated pulse number is updated, and the number of rotation turns is determined based on the accumulated pulse number correction value. The multi-turn absolute position is calculated according to the sum of the multi-turn rotation angle corresponding to the number of rotation turns and the angle offset Δθ.
[0113] Specifically, the angle deviation between the current angle value θ and each pole axis is determined, and the smallest angle deviation is selected as the minimum deviation between the current angle value and the position at which the accumulated pulse number is updated, to obtain the angle offset Δθ. Referring again to FIG. 3, the angle offset Δθ is the angle deviation between the motor rotation axis and the 90° pole axis. The multi-turn absolute position can be calculated according to the following formula: Figure 4
[0114]
[0115] Wherein, k represents the number of rotation turns, and P represents the multi-turn absolute position.
[0116] In the present embodiment, the relationship between the accumulated pulse number and the number of rotation turns is “4 pulse numbers / turn”. When it is detected that the current angle value belongs to the first fuzzy region and the data confidence of the magnetic encoding sensor is high, it indicates that the current accumulated pulse number has just completed a rotation period, triggering the number of turns update. The current accumulated pulse number is added or subtracted by one to obtain the accumulated pulse number correction value, so as to calculate the accurate number of rotation turns. The current angle value of the magnetic encoding sensor is used to correct the single-turn angle position, improving the calculation precision and accuracy of the multi-turn absolute position.
[0117] In some embodiments, if μH1(θ) = 0 and μH2(θ) = 1 and μS(θ) is greater than the confidence threshold, an angle offset Δθ is obtained according to the minimum deviation between the current angle value and the position updated by the trigger cumulative pulse number, and the number of rotations is determined based on the cumulative pulse number correction value. The single rotation angle is determined based on the current cumulative pulse number. The multi-rotation absolute position is calculated according to the sum of the multi-rotation angle corresponding to the number of rotations, the single rotation angle and the angle offset. The multi-rotation absolute position can be calculated according to the following formula:
[0118]
[0119] Wherein, n represents the current cumulative pulse number, and X represents the single rotation angle.
[0120] In the present embodiment, when it is detected that the current angle value belongs to the second fuzzy region, it is indicated that a new rotation is not triggered, and the cumulative pulse number correction value is still the current cumulative pulse number. Since the current angle value is in the error region adjacent to the left and right of the pole axis, the single rotation angle is determined by calculating the 90° pulse region crossed by the motor in the current rotation. And the single rotation angle is corrected in combination with the current angle value of the magnetic encoding sensor, so as to improve the calculation precision and accuracy of the multi-rotation absolute position.
[0121] In some embodiments, if μH1(θ) = 0 and μH2(θ) = 0, the number of rotations is determined based on the cumulative pulse number correction value. The multi-rotation absolute position is calculated according to the sum of the multi-rotation angle corresponding to the number of rotations and the current angle value. Specifically, the multi-rotation absolute position can be calculated according to the following formula:
[0122] P = k × 360° + θ
[0123] In the embodiments of the present application, if the current angle value deviates from the fuzzy region, it is indicated that the cumulative pulse number update and the rotation number update will not be triggered, at this time, the single rotation position is calculated by using the current angle value of the magnetic encoding sensor, and the rotation number is still calculated by using the current cumulative pulse number, so as to realize the accurate estimation of the multi-rotation absolute position.
[0124] The present application respectively judges whether the current angle value belongs to the first fuzzy region and the second fuzzy region, so as to judge whether the motor triggers the rotation number update or only triggers the cumulative pulse number update, obtains the membership degree result, and then corrects the current cumulative pulse number according to the membership degree result, so as to obtain a more accurate rotation number, and improve the accuracy and precision of the multi-rotation absolute position calculation.
[0125] In some optional embodiments, the motor speed can be obtained by calculating the change of the absolute position of the motor within a preset time period, and the specific calculation formula can be as follows:
[0126]
[0127] wherein ω represents the motor speed.
[0128] In some embodiments, the above method further comprises:
[0129] Step a1, when the motor speed is detected to be greater than the motor speed threshold, obtaining a first angle value of the magnetic encoder sensor at a first time and a second angle value at a second time, and obtaining a first cumulative pulse number of the Hall switch sensor at the first time and a second cumulative pulse number at the second time; the second time is earlier than the first time.
[0130] Specifically, under the condition that the absolute value of the motor speed ω is greater than the motor speed threshold ω var , the angle values at the two pulse times are recorded, including the first angle value θ1 at the first time t1 and the second angle value θ0 at the second time t0, wherein the first cumulative pulse number n1 collected by the Hall switch sensor at the first time t1 and the second cumulative pulse number n0 collected by the Hall switch sensor at the second time t0.
[0131] Step a2, if the angle difference between the first angle value and the second angle value is greater than the angle difference threshold, and the first cumulative pulse number and the second cumulative pulse number are the same, then the first cumulative pulse number is compensated based on the motor speed and the second cumulative pulse number.
[0132] Specifically, if the angle difference of the first angle value θ1 relative to the second angle value θ0 is greater than the angle difference threshold (for example, 180°), and the first cumulative pulse number n1 collected relative to the second cumulative pulse number n0 has not changed, it indicates that there may be pulse missing, and the first cumulative pulse number needs to be compensated.
[0133] In some embodiments, the pulse compensation amount can be calculated according to the following formula:
[0134]
[0135] wherein ω is positive when the motor is forward, ω is negative when the motor is reversed; η represents the compensation symbol, η = +1 when the motor is forward, η = -1 when the motor is reversed; m represents the signed pulse compensation amount.
[0136] Step a3, based on the compensated first cumulative pulse number, obtaining the current cumulative pulse number of the Hall switch sensor at the first time.
[0137] Specifically, the real current cumulative pulse number collected at the first time can be determined according to the following formula:
[0138]
[0139] wherein n t1The current accumulated pulse number at the first time point.
[0140] In the embodiment of the application, the pulse interval continuously crossed by the motor is determined based on the motor speed and the second accumulated pulse number, the first accumulated pulse number at the first time point is compensated to obtain the real current accumulated pulse number, and the pulse missing during high-speed rotation of the motor is avoided.
[0141] In some optional embodiments, if it is detected that the main power supply is powered off, the system is controlled to enter a sleep state. If it is detected that the pulse signal output by the Hall switch sensor changes, the system is controlled to enter a running state, and the current accumulated pulse number is determined based on the change of the pulse signal. Alternatively, if it is detected that the main power supply is powered on, the system is controlled to enter the running state.
[0142] Specifically, after detecting that the main power supply is powered off, the system is controlled to enter the sleep state to reduce energy consumption. If it is detected that the pulse signal output by the Hall switch sensor changes, the system is controlled to enter the running state, and the pulse signal collected by the Hall switch sensor is converted into a pulse number for storage to avoid missing the pulse number during the sleep period.
[0143] The following will take the motor shown in FIG. 1 as an example to describe the multi-turn absolute position detection scheme of the application in detail in combination with a specific application example. Figure 1 As shown in FIG. 2, the application example includes the following steps. Figure 5
[0144] In step S51, the pulse signal of the Hall switch sensor and the current angle value of the magnetic encoding sensor are collected, and the collected data and signals are filtered and normalized for subsequent use.
[0145] In step S52, membership degree calculation processing is performed according to a predetermined rule.
[0146] Specifically, it is determined whether the current angle value belongs to the first fuzzy area to obtain the first membership degree μH1(θ), and it is determined whether the current angle value belongs to the second fuzzy area to obtain the second membership degree μH2(θ). The confidence degree μS(θ) of the membership degree result is determined.
[0147] In step S53, a corresponding fuzzy rule base is generated according to the set membership degree, and the multi-turn absolute position is calculated according to the fuzzy rule base.
[0148] In step S54, the current angle value and the current accumulated pulse number collected at present and the corresponding historical data are used to check and process the abnormality in the system.
[0149] Specifically, the actual processing procedure of the algorithm can be divided into a full-power state and a low-power state. The switching between the two states is based on whether the Vcc power supply of the motor is powered off: if the Vcc power supply is normal, the system operates in the full-power state; if the Vcc power supply is powered off, the system operates in the low-power state.
[0150] Specifically, as shown in Figure 6 the running steps of the full-power state are as follows:
[0151] Step S61, the pulse signal of the Hall switch sensor is collected, and the collected pulse signal is converted into the current cumulative pulse number according to the arrangement of the Hall switch sensor.
[0152] Step S62, the current angle value of the magnetic encoding sensor is collected, and data storage is performed.
[0153] Step S63, the current multi-turn absolute position value is calculated by using the fuzzy recognition algorithm of the fuzzy rule base in combination with the current cumulative pulse number and the current angle value. The fuzzy rule base is shown in Table 1 as follows:
[0154] Table 1
[0155]
[0156] Specifically, as shown in Figure 7 the running steps of the low-power sleep state are as follows:
[0157] Step S71, the controller enters the low-power sleep state, closes other peripherals except the collection port of the Hall switch sensor, and enables the wake-up interrupt port of the collection port of the Hall switch sensor, which is used to wake up the controller.
[0158] Step S72, if it is detected that the output of the Hall switch sensor has a level change, the controller is triggered to wake up, and the controller enters the running state.
[0159] Step S73, if it is detected that the Vcc power supply state has a change, the controller is triggered to wake up, and the controller enters the running state.
[0160] Step S74, the current pulse signal of the Hall switch sensor is recorded and converted into a pulse number for storage.
[0161] Step S75, the current power supply state is judged: if the Vcc power supply is restored to normal, the low-power sleep state is exited; if the Vcc power supply is not restored to normal, the low-power sleep state is continued, and the Hall switch sensor or the Vcc power supply is waited to wake up.
[0162] Specifically, as shown in Figure 8As shown, the application example compensates the current cumulative pulse number collected by the Hall switch sensor in the case of high-speed rotation of the motor, and specifically includes the following steps:
[0163] In step S81, the first angle value θ1 of the magnetic encoding sensor at the first time t1 and the second angle value θ0 of the magnetic encoding sensor at the second time t0 are collected, and the second time is earlier than the first time.
[0164] In step S82, the first cumulative pulse number n1 of the Hall switch sensor at the first time t1 is collected, and the second cumulative pulse number n0 of the Hall switch sensor at the second time t0 is collected.
[0165] In step S83, the pulse interval continuously crossed by the motor is calculated according to the first angle value θ1, the second angle value θ0, the first cumulative pulse number n1, and the second cumulative pulse number n0, and the pulse compensation amount m is obtained.
[0166] In step S84, the first cumulative pulse number n1 is compensated according to the pulse compensation amount m.
[0167] In the embodiment, a multi-turn absolute position detection device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and has been described above. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware is also possible and contemplated.
[0168] The embodiment provides a multi-turn absolute position detection device, which is applied to a motor, and the motor includes a controller, a magnetic encoding sensor, and two Hall switch sensors arranged along a circumference and perpendicular to each other. The device is applied to the controller, as shown in the figure, and the device includes: Figure 9
[0169] The acquisition module 901 is configured to collect a current angle value of the magnetic encoding sensor and a current cumulative pulse number of the Hall switch sensor.
[0170] The first processing module 902 is configured to determine whether the current angle value belongs to a fuzzy area, obtain a membership result, and determine a confidence degree of the membership result. The fuzzy area is an error area centered on a position triggering cumulative pulse number updating.
[0171] The second processing module 903 is configured to correct the current cumulative pulse number based on the membership result and the confidence degree, and obtain a cumulative pulse number correction value.
[0172] The third processing module 904 is configured to obtain a multi-turn absolute position based on the current angle value, the cumulative pulse number correction value, and the current cumulative pulse number.
[0173] In some optional implementations, the fuzzy region includes a first fuzzy region and a second fuzzy region. The first fuzzy region is an error region centered on the position that triggers the update of the cumulative pulse count and the update of the rotation count. The second fuzzy region is a fuzzy region other than the first fuzzy region. The first processing module 902 is further configured to:
[0174] Determine whether the current angle value belongs to the first fuzzy region to obtain the first membership degree;
[0175] Determine whether the current angle value belongs to the second fuzzy region to obtain the second membership degree;
[0176] The membership degree results are obtained based on the first and second membership degrees.
[0177] In some optional implementations, the second processing module 903 is further configured to: if the first membership degree indicates that the current angle value belongs to the first fuzzy region, and the confidence degree is greater than the confidence degree threshold, then correct the current cumulative pulse count by one to obtain a cumulative pulse count correction value; the third processing module 904 is further configured to:
[0178] The angle offset is obtained based on the minimum deviation between the current angle value and the position that triggers the update of the cumulative pulse count, and the number of rotations is determined based on the cumulative pulse count correction value.
[0179] The absolute position of each rotation is calculated by summing the rotation angles and angular offsets corresponding to the number of rotations.
[0180] In some optional embodiments, the second processing module 903 is further configured to: if the first membership degree indicates that the current angle value does not belong to the first fuzzy region, and the second membership degree indicates that the current angle value belongs to the second fuzzy region, and the confidence degree is greater than the confidence degree threshold, then use the current cumulative pulse count as the cumulative pulse count correction value; the third processing module 904 is further configured to:
[0181] The angle offset is obtained based on the minimum deviation between the current angle value and the position that triggers the update of the cumulative pulse count, and the number of rotations is determined based on the cumulative pulse count correction value.
[0182] Determine the single-turn rotation angle based on the current cumulative pulse count;
[0183] The absolute position of the rotations is calculated by summing the multi-rotation angles, single-rotation angles, and angular offsets corresponding to the number of rotations.
[0184] In some optional embodiments, the second processing module 903 is further configured to: if the first membership degree indicates that the current angle value does not belong to the first fuzzy region, and the second membership degree indicates that the current angle value does not belong to the second fuzzy region, then use the current cumulative pulse count as the cumulative pulse count correction value; the third processing module 904 is further configured to:
[0185] determine the number of rotations based on the accumulated pulse number correction value;
[0186] The absolute position of multiple rotations is calculated based on the sum of the multiple-rotation angle corresponding to the number of rotations and the current angle value.
[0187] In some optional practical manners, the device is further used for:
[0188] When the motor speed is detected to be greater than the motor speed threshold, the first angle value of the magnetic encoding sensor at the first time and the second angle value of the magnetic encoding sensor at the second time are obtained, and the first accumulated pulse number of the Hall switch sensor at the first time and the second accumulated pulse number of the Hall switch sensor at the second time are obtained; the second time is earlier than the first time;
[0189] If the angle difference between the first angle value and the second angle value is greater than the angle difference threshold, and the first accumulated pulse number and the second accumulated pulse number are the same, the first accumulated pulse number is compensated based on the motor speed and the second accumulated pulse number;
[0190] The current accumulated pulse number of the Hall switch sensor at the first time is obtained based on the compensated first accumulated pulse number.
[0191] In some optional practical manners, the motor further includes a main power supply, and the device is further used for:
[0192] If the main power supply is detected to be powered off, the device is controlled to enter a sleep state;
[0193] If the pulse signal output by the Hall switch sensor is detected to change, the device is controlled to enter a running state, and the current accumulated pulse number is determined based on the change of the pulse signal; or, if the main power supply is detected to be powered on, the device is controlled to enter the running state.
[0194] Further function descriptions of the above-mentioned modules and units are the same as those of the above-mentioned corresponding embodiments, and will not be described here.
[0195] The multi-rotation absolute position detection device in the embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit, Application Specific Integrated Circuit) circuit, a processor and a memory executing one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.
[0196] The embodiment of the application further provides a motor control device having the above-mentioned Figure 9 multi-rotation absolute position detection device.
[0197] Please refer to Figure 10 , Figure 10This is a schematic diagram of the structure of a motor control device provided in an optional embodiment of the present invention, such as... Figure 10 As shown, the motor control device includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processor can process instructions executed within the motor control device, including instructions stored in or on memory to display graphical information of a GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple devices can be connected, each providing some of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). Figure 10 Take a processor 10 as an example.
[0198] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0199] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0200] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the motor control device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories can be connected to the motor control device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0201] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0202] The motor control device also comprises a communication interface 30 for communication of the motor control device with other devices or a communication network.
[0203] The embodiments of the present application also provide a computer readable storage medium, the method according to the embodiments of the present application can be implemented in hardware, firmware, or recorded in a storage medium, or stored in a remote storage medium or a non-transitory machine readable storage medium and downloaded from a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that the computer, processor, microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code, when the software or computer code is accessed and executed by the computer, processor or hardware, the method shown in the above embodiments is implemented.
[0204] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be called or provided. Those skilled in the art should understand that the form of computer program instructions in computer readable medium includes but is not limited to source file, executable file, installation package file, etc., accordingly, the way of computer program instructions executed by computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.
[0205] Although the embodiments of the present application are described in conjunction with the accompanying drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present application, and such modifications and changes fall within the scope defined by the appended claims.
Claims
1. A multi-turn absolute position detection method, characterized by, The method is applied to a controller of a motor, the motor comprising the controller, a magnetic encoding sensor and two Hall switch sensors arranged along a circumference and orthogonally, the method comprising: acquiring a current angle value of the magnetic encoding sensor and a current cumulative pulse number of the Hall switch sensor; determining whether the current angle value belongs to a fuzzy region to obtain a membership result and determining a confidence degree of the membership result; the fuzzy region is an error region centered on a position of triggering cumulative pulse number updating; based on the membership result and the confidence degree, correcting the current cumulative pulse number to obtain a cumulative pulse number correction value; based on the current angle value, the cumulative pulse number correction value and the current cumulative pulse number, obtaining a multi-turn absolute position.
2. The method of claim 1, wherein, The fuzzy region comprises a first fuzzy region and a second fuzzy region, the first fuzzy region is an error region centered on a position of triggering cumulative pulse number updating and triggering rotation turn number updating, and the second fuzzy region is a fuzzy region other than the first fuzzy region; The determination of whether the current angle value belongs to a fuzzy region to obtain a membership result comprises: determining whether the current angle value belongs to the first fuzzy region to obtain a first membership degree; determining whether the current angle value belongs to the second fuzzy region to obtain a second membership degree; obtaining the membership result according to the first membership degree and the second membership degree.
3. The method of claim 2, wherein, The correction of the current cumulative pulse number based on the membership result and the confidence degree to obtain a cumulative pulse number correction value comprises: if the first membership degree indicates that the current angle value belongs to the first fuzzy region and the confidence degree is greater than a confidence degree threshold, the current cumulative pulse number is corrected by one to obtain a cumulative pulse number correction value. The obtaining of a multi-turn absolute position based on the current angle value and the cumulative pulse number correction value comprises: obtaining an angle offset according to a minimum deviation between the current angle value and a position of triggering cumulative pulse number updating, and determining a rotation turn number based on the cumulative pulse number correction value; and calculating a sum of a multi-turn rotation angle corresponding to the rotation turn number and the angle offset to obtain a multi-turn absolute position.
4. The method of claim 2, wherein, The correction of the current cumulative pulse number based on the membership result and the confidence degree to obtain a cumulative pulse number correction value comprises: if the first membership degree indicates that the current angle value does not belong to the first fuzzy region, the second membership degree indicates that the current angle value belongs to the second fuzzy region, and the confidence degree is greater than a confidence degree threshold, the current cumulative pulse number is taken as a cumulative pulse number correction value. The obtaining of a multi-turn absolute position based on the current angle value, the cumulative pulse number correction value and the current cumulative pulse number comprises: obtaining an angle offset according to a minimum deviation between the current angle value and a position of triggering cumulative pulse number updating, and determining a rotation turn number based on the cumulative pulse number correction value; and determining a single-turn rotation angle based on the current cumulative pulse number. The absolute position of multiple turns is calculated according to the sum of the angle of rotation corresponding to the number of turns, the angle of single turn and the angle offset.
5. The method of claim 2, wherein, The current cumulative pulse number is corrected based on the membership result and the confidence to obtain a cumulative pulse number correction value, including: If the first membership indicates that the current angle value does not belong to the first fuzzy area, and the second membership indicates that the current angle value does not belong to the second fuzzy area, the current cumulative pulse number is taken as the cumulative pulse number correction value; The absolute position of multiple turns is obtained based on the current angle value and the cumulative pulse number correction value, including: The number of turns is determined based on the cumulative pulse number correction value; The absolute position of multiple turns is calculated according to the sum of the angle of rotation corresponding to the number of turns and the current angle value.
6. The method according to any one of claims 1-5, characterized in that, The method further includes: When the motor speed is detected to be greater than a motor speed threshold, a first angle value of the magnetic encoding sensor at a first time and a second angle value of the magnetic encoding sensor at a second time are obtained, and a first cumulative pulse number of the Hall switch sensor at the first time and a second cumulative pulse number of the Hall switch sensor at the second time are obtained; the second time is earlier than the first time; If the angle difference between the first angle value and the second angle value is greater than an angle difference threshold, and the first cumulative pulse number and the second cumulative pulse number are the same, the first cumulative pulse number is compensated based on the motor speed and the second cumulative pulse number; The current cumulative pulse number of the Hall switch sensor at the first time is obtained based on the compensated first cumulative pulse number.
7. The method according to any one of claims 1-5, characterized in that, The motor further includes a main power supply, and the method further includes: If the main power supply is detected to be powered off, the motor is controlled to enter a sleep state; If the pulse signal output by the Hall switch sensor is detected to change, the motor is controlled to enter a running state, and the current cumulative pulse number is determined based on the change of the pulse signal; or, if the main power supply is detected to be powered on, the motor is controlled to enter the running state.
8. A multi-turn absolute position sensing device, characterized by, The device is applied to a motor, and the motor includes a controller, a magnetic encoding sensor and two Hall switch sensors arranged along a circumference and orthogonally, the device is applied to the controller, and the device includes: An acquisition module is configured to collect a current angle value of the magnetic encoding sensor and a current cumulative pulse number of the Hall switch sensor; A first processing module is configured to determine whether the current angle value belongs to a fuzzy area to obtain a membership result, and determine a confidence of the membership result; the fuzzy area is an error area centered on a position triggering cumulative pulse number updating; A second processing module is configured to correct the current cumulative pulse number based on the membership result and the confidence to obtain a cumulative pulse number correction value; A third processing module is configured to obtain an absolute position of multiple turns based on the current angle value, the cumulative pulse number correction value and the current cumulative pulse number.
9. An electric motor control device characterized by comprising: The device includes: A memory and a processor, which are connected in communication with each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the multi-turn absolute position detection method of any one of claims 1 to 7.
10. A computer readable storage medium characterized by, The computer readable storage medium stores computer instructions for causing a computer to perform the multi-turn absolute position detection method of any one of claims 1 to 7.