Motor control method and device and readable storage medium

By using multiple Hall elements in a Hall-type BLDC motor to detect the magnetic field of the motor signal disk, the spatial position and rotation direction of the rotor are determined, and the rotation angle is adjusted, thus solving the problem of low motor running accuracy and achieving higher rotation and running accuracy.

CN121585030APending Publication Date: 2026-02-27DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511481549.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-16
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

Existing control methods for Hall effect BLDC motors suffer from low motor operating accuracy.

Method used

Multiple Hall effect sensors are used to detect the magnetic field of the inner and outer rings of the motor signal disk. The spatial position and rotation direction of the rotor are determined through signal processing, and the rotation angle of the rotor is adjusted to ensure accurate completion of the mechanical angle.

Benefits of technology

This improves the rotational accuracy of the rotor, thereby improving the operating accuracy of the motor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121585030A_ABST
    Figure CN121585030A_ABST
Patent Text Reader

Abstract

The invention discloses a motor control method and device and a readable storage medium, and relates to the technical field of new energy automobiles. The control method of the motor comprises the steps that when a rotor is controlled to rotate by a first mechanical angle, a first signal output by a first Hall element, a second signal output by a second Hall element and a third signal output by a third Hall element are acquired, and a fourth signal output by a fourth Hall element and a fifth signal output by a fifth Hall element are acquired; determining a first spatial position of the rotor according to the first signal, the second signal and the third signal; determining the rotation direction of the rotor according to the fourth signal and the fifth signal; updating the first mechanical angle based on the first spatial position and the rotation direction to obtain a second mechanical angle; and controlling the rotor to rotate by a second mechanical angle. The operation precision of the motor is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of new energy vehicles, and particularly relates to a motor control method and device and a readable storage medium. BACKGROUND

[0002] At present, the existing Hall BLDC motor (Brushless DC Motor) is a motor that adopts electronic commutation technology to replace traditional mechanical commutation, which is composed of a motor body and a driver, and has advantages of high efficiency, low noise and long service life. However, the existing motor control method has the technical problem of low motor operation precision. SUMMARY

[0003] The motor control method and device and readable storage medium provided by the embodiments of the present application are used to solve the technical problem of low motor operation precision in the prior art.

[0004] In a first aspect, the present application provides a motor control method, the motor comprising a rotor, a first Hall element, a second Hall element, a third Hall element, a fourth Hall element and a fifth Hall element, the first Hall element, the second Hall element and the third Hall element being used to detect an inner circle of a signal disc of the motor, the fourth Hall element and the fifth Hall element being used to detect an outer circle of the signal disc of the motor, the method comprising: acquiring a first signal output by the first Hall element, a second signal output by the second Hall element and a third signal output by the third Hall element when controlling the rotor to rotate a first mechanical angle, and acquiring a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element; determining a first spatial position of the rotor according to the first signal, the second signal and the third signal; determining a rotation direction of the rotor according to the fourth signal and the fifth signal; determining a rotated angle of the rotor based on the first spatial position and the rotation direction; adjusting the rotated angle of the rotor when a difference between the rotated angle and the first mechanical angle is greater than an angle threshold, so that the rotor completes the first mechanical angle.

[0005] The motor control method in the embodiments determines the first spatial position of the rotor according to the first signal, the second signal and the third signal, and determines the rotation direction of the rotor according to the fourth signal and the fifth signal, thereby ensuring the accuracy of the first spatial position and the rotation direction, and further ensuring the accuracy of the rotated angle. Based on the rotated angle, the rotor is controlled to accurately complete the first mechanical angle, thereby improving the rotation precision of the rotor and further improving the operation precision of the motor.

[0006] In a second aspect, the embodiment of the present application provides a control device of a motor, the motor comprising a rotor, a first Hall element, a second Hall element, a third Hall element, a fourth Hall element and a fifth Hall element, the first Hall element, the second Hall element and the third Hall element being configured to detect an inner ring of a signal disc of the motor, the fourth Hall element and the fifth Hall element being configured to detect an outer ring of the signal disc of the motor, and the device comprising: a obtaining unit configured to obtain a first signal output by the first Hall element, a second signal output by the second Hall element and a third signal output by the third Hall element, and obtain a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element when the rotor is controlled to rotate a first mechanical angle; a processing unit configured to determine a first spatial position of the rotor according to the first signal, the second signal and the third signal; the processing unit is further configured to determine a rotation direction of the rotor according to the fourth signal and the fifth signal; the processing unit is further configured to determine a rotated angle of the rotor based on the first spatial position and the rotation direction; a control unit configured to adjust the rotated angle of the rotor to make the rotor complete the first mechanical angle when a difference between the rotated angle and the first mechanical angle is greater than an angle threshold.

[0007] The control device of the motor in the embodiment determines the first spatial position of the rotor according to the first signal, the second signal and the third signal, and determines the rotation direction of the rotor according to the fourth signal and the fifth signal, thereby ensuring the accuracy of the first spatial position and the rotation direction, and further ensuring the accuracy of the rotated angle, and based on the rotated angle, the rotor is controlled to accurately complete the first mechanical angle, thereby improving the rotation accuracy of the rotor and further improving the operation accuracy of the motor.

[0008] In a third aspect, the embodiment of the present application provides another control device of a motor, comprising a processor and a memory, and the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the control method of the motor in any of the above embodiments. Therefore, the control device of the motor has all the beneficial effects of the control method of the motor in any of the above embodiments, which will not be repeated here.

[0009] In a fourth aspect, the embodiment of the present application provides a readable storage medium, and the readable storage medium stores a program or instructions, and the program or instructions are executed by a processor to implement the steps of the control method of the motor in any of the above embodiments. Therefore, the readable storage medium has all the beneficial effects of the control method of the motor in any of the above embodiments, which will not be repeated here. BRIEF DESCRIPTION OF DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0011] Figure 1 The flow chart of the control method of the motor provided by the embodiments of the present application is shown in the figure. Figure 2 The signal disk schematic diagram of the motor provided by the embodiments of the present application is shown in the figure. Figure 3 The function module block diagram of the control device of the motor provided by the embodiments of the present application is shown in the figure. Figure 4 The structure block diagram of the control device of the motor provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION

[0012] In order to better understand the technical solutions provided by the embodiments of the present application, the technical solutions of the embodiments of the present application will be described in detail below through the drawings and specific embodiments. It should be understood that the specific features in the embodiments of the present application and the embodiments are detailed descriptions of the technical solutions of the embodiments of the present application, and are not limitations of the technical solutions of the present application. In the case of no conflict, the technical features in the embodiments of the present application and the embodiments can be combined with each other.

[0013] In this paper, the relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between the entities or operations. Moreover, the term "include", "contain" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitation, the element defined by the sentence "including a…" does not exclude the existence of other same elements in the process, method, article or equipment including the element. The term "more than two" includes two or more than two.

[0014] In some embodiments, as shown in the figure, Figure 1 The control method of the motor provided by the embodiments of the present application includes: In step S101, when the rotor is controlled to rotate a first mechanical angle, a first signal output by the first Hall element, a second signal output by the second Hall element, and a third signal output by the third Hall element are acquired, and a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element are acquired. In step S102, the first spatial position of the rotor is determined according to the first signal, the second signal, and the third signal. In step S103, the rotation direction of the rotor is determined according to the fourth signal and the fifth signal. In step S104, the rotated angle of the rotor is determined based on the first spatial position and the rotation direction. In step S105, when the difference between the rotated angle and the first mechanical angle is greater than an angle threshold, the rotation angle of the rotor is adjusted so that the rotor completes the first mechanical angle.

[0015] In this embodiment, a control method of an electric machine is provided, wherein the electric machine includes a rotor, a first Hall element, a second Hall element, a third Hall element, a fourth Hall element, and a fifth Hall element, and the first Hall element, the second Hall element, and the third Hall element are used to detect the inner circle of the signal disc of the electric machine, and the fourth Hall element and the fifth Hall element are used to detect the outer circle of the signal disc of the electric machine.

[0016] As shown in the example, Figure 2 The signal disc of the electric machine includes an inner circle and an outer circle, the inner circle of the signal disc includes five pairs of N-S magnetic poles, and the outer circle of the signal disc includes fifteen pairs of N-S magnetic poles.

[0017] As an example, the electric machine can be a brushless direct current motor.

[0018] In step S101, when the rotor is controlled to rotate a first mechanical angle, a first signal output by the first Hall element, a second signal output by the second Hall element, and a third signal output by the third Hall element are acquired, and a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element are acquired.

[0019] In step S101, when the rotor is controlled to rotate a first mechanical angle, a first signal output by the first Hall element, a second signal output by the second Hall element, and a third signal output by the third Hall element are acquired, and a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element are acquired.

[0020] As an example, the first Hall element, the second Hall element, the third Hall element, the fourth Hall element, and the fifth Hall element are semiconductor magnetic sensitive devices based on the Hall effect, mainly used for detecting the magnetic field strength and direction of the inner and outer circles of the signal disc of the electric machine or realizing non-contact physical quantity measurement (such as current, position, rotation speed, etc.).

[0021] According to the first signal, the second signal and the third signal, a positioning process is performed on the rotor to determine a first spatial position of the rotor, wherein the first spatial position is a spatial position of the rotor.

[0022] Exemplarily, the first signal, the second signal and the third signal can be square wave signals with the same frequency.

[0023] Exemplarily, the first spatial position can include an angular position of the rotor, for example, the rotor is located at a 60-degree position of the motor.

[0024] Exemplarily, the first spatial position can include a position region of the motor, for example, the motor can be divided into a region 1, a region 2, a region 3 and the like, and the first spatial position can be specifically the region 3.

[0025] According to the fourth signal and the fifth signal, a rotation direction of the rotor is determined, wherein the rotation direction is a direction in which the rotor rotates.

[0026] Exemplarily, the fourth signal and the fifth signal can be square wave signals with the same frequency.

[0027] Exemplarily, the frequency of the fourth signal can be three times the frequency of the first signal.

[0028] Exemplarily, the rotation direction can be a clockwise direction or a counterclockwise direction.

[0029] Based on the first spatial position and the rotation direction, a rotated angle of the rotor is determined, wherein the rotated angle is a real-time mechanical angle that has been completed by the rotor.

[0030] Exemplarily, the rotated angle can be specifically 30 degrees in the clockwise direction.

[0031] Exemplarily, the rotated angle can be specifically 50 degrees in the counterclockwise direction.

[0032] In a case where a difference between the rotated angle and the first mechanical angle is greater than an angle threshold value, it is indicated that an error between the rotated angle and the first mechanical angle is large, and the rotation angle of the rotor needs to be adjusted to make the rotor complete the first mechanical angle, and the angle threshold value is a preset error threshold value.

[0033] Exemplarily, the angle threshold value can be 2 degrees.

[0034] It should be noted that, in the embodiment, the first spatial position of the rotor is determined based on the first signal output by the first Hall element, the second signal output by the second Hall element, and the third signal output by the third Hall element, and then the fourth signal output by the fourth Hall element and the fifth signal output by the fifth Hall element are acquired to determine the rotation direction of the rotor, so that the accuracy of the first spatial position and the rotation direction is ensured. On the basis of accurately determining the first spatial position and the rotation direction, the rotated angle of the rotor is determined, and in the case that the difference between the rotated angle and the first mechanical angle is greater than the angle threshold, the rotation angle of the rotor is adjusted to make the rotor complete the first mechanical angle, so that the rotation accuracy of the rotor is improved, and the operation accuracy of the motor is further improved.

[0035] In the control method of the motor in the embodiment, the first spatial position of the rotor is determined based on the first signal, the second signal, and the third signal, and the rotation direction of the rotor is determined based on the fourth signal and the fifth signal, so that the accuracy of the first spatial position and the rotation direction is ensured, and the accuracy of the rotated angle is further ensured. Based on the rotated angle, the rotor accurately completes the first mechanical angle, so that the rotation accuracy of the rotor is improved, and the operation accuracy of the motor is further improved.

[0036] In some embodiments, the control method of the motor provided in the embodiment of the application comprises the following steps. Determining an angle state of the rotor based on the first signal, the second signal, and the third signal; Determining the first spatial position of the rotor by comparing the angle state with a plurality of preset states; Determining a plurality of preset states and a plurality of preset positions, wherein the plurality of preset positions correspond to the plurality of preset states one by one; Determining a target preset state same as the angle state from the plurality of preset states by comparing the angle state with the plurality of preset states; Determining a target preset position corresponding to the target preset state from the plurality of preset positions; Determining the target preset position as the first spatial position.

[0037] In the embodiment, the angle state of the rotor is determined based on the first signal, the second signal, and the third signal, wherein the angle state represents the angle state of the rotor.

[0038] Exemplarily, the angle state can represent that the rotor is in state 1 or state 1.

[0039] Exemplarily, the plurality of preset states are determined, and the first spatial position of the rotor is determined by comparing the angle state with the plurality of preset states, wherein the preset state is a preset angle state.

[0040] Exemplarily, the plurality of preset states can specifically be 30 preset states, which are state 1, state 2, state 3, state 4, state 5, state 6, state 7, state 8, state 9, state 10, state 11, state 12, state 13, state 14, state 15, state 16, state 17, state 18, state 19, state 20, state 21, state 22, state 23, state 24, state 25, state 26, state 27, state 28, state 29, and state 30 respectively.

[0041] corresponds to a region 1 between 1 degree and 12 degrees, state 2 corresponds to a region 2 between 13 degrees and 24 degrees, state 3 corresponds to a region 3 between 25 degrees and 36 degrees, state 4 corresponds to a region 4 between 37 degrees and 48 degrees, state 5 corresponds to a region 5 between 49 degrees and 60 degrees, state 6 corresponds to a region 6 between 61 degrees and 72 degrees, state 7 corresponds to a region 7 between 73 degrees and 84 degrees, state 8 corresponds to a region 8 between 85 degrees and 96 degrees, state 9 corresponds to a region 9 between 97 degrees and 108 degrees, state 10 corresponds to a region 10 between 109 degrees and 120 degrees, state 11 corresponds to a region 11 between 121 degrees and 132 degrees, state 12 corresponds to a region 12 between 133 degrees and 144 degrees, state 13 corresponds to a region 13 between 145 degrees and 156 degrees, state 14 corresponds to a region 14 between 157 degrees and 168 degrees, state 15 corresponds to a region 15 between 169 degrees and 180 degrees, state 16 corresponds to a region 16 between 181 degrees and 192 degrees, state 17 corresponds to a region 17 between 193 degrees and 204 degrees, state 18 corresponds to a region 18 between 205 degrees and 216 degrees, state 19 corresponds to a region 19 between 217 degrees and 228 degrees, state 20 corresponds to a region 20 between 229 degrees and 240 degrees, state 21 corresponds to a region 21 between 241 degrees and 252 degrees, state 22 corresponds to a region 22 between 253 degrees and 264 degrees, state 23 corresponds to a region 23 between 265 degrees and 276 degrees, state 24 corresponds to a region 24 between 277 degrees and 288 degrees, state 25 corresponds to a region 25 between 289 degrees and 300 degrees, state 26 corresponds to a region 26 between 301 degrees and 312 degrees, state 27 corresponds to a region 27 between 313 degrees and 324 degrees, state 28 corresponds to a region 28 between 325 degrees and 336 degrees, state 29 corresponds to a region 29 between 337 degrees and 348 degrees, and state 30 corresponds to a region 30 between 349 degrees and 360 degrees.

[0042] determining a plurality of preset states and a plurality of preset positions, wherein the plurality of preset positions correspond to the plurality of preset states one by one.

[0043] Exemplarily, the plurality of preset positions can include the above-mentioned regions 1 to 30.

[0044] By comparing the angle state with multiple preset states, a target preset state that is the same as the angle state is determined among the multiple preset states. The target preset state is the preset state that is the same as the angle state.

[0045] For example, among 30 preset states, from state 1 to state 30, a target preset state that is the same as the angle state is determined.

[0046] Among multiple preset positions, a target preset position corresponding to the target preset state is determined, and the target preset position is determined as the first spatial position, wherein the target preset position is the preset position corresponding to the target preset state.

[0047] For example, when the target preset state is state 1, the target preset location can be determined as region 1.

[0048] For example, when the target preset state is state 14, the target preset position can be determined to be region 14.

[0049] For example, the first signal, the second signal, and the third signal each have one state for a 60-degree electrical angle, and there are 6 states for a 360-degree electrical angle. The rotor has 5 pole pairs. For each rotation of the rotor, the first Hall element, the second Hall element, and the third Hall element will generate 30 states.

[0050] In some embodiments, this application provides a method for controlling a motor, which determines the rotation direction of the rotor based on a fourth signal and a fifth signal, including: By comparing the fourth and fifth signals, the phase position relationship between the fourth and fifth signals is determined. Determine the direction of rotation based on the phase position relationship.

[0051] In this embodiment, the phase position relationship between the fourth signal and the fifth signal is determined by comparing the fourth signal and the fifth signal.

[0052] For example, by determining the phase sequence of the fourth and fifth signals, the phase position relationship between the fourth and fifth signals can be obtained.

[0053] Determine the direction of rotation based on the phase position relationship.

[0054] For example, when the phase position relationship is such that the phase of the fourth signal precedes the phase of the fifth signal, the rotation direction is determined to be clockwise.

[0055] For example, when the phase position relationship is such that the phase of the fifth signal precedes the phase of the fourth signal, the rotation direction is determined to be counterclockwise.

[0056] In some embodiments, the method for controlling the motor provided in the embodiments of the present application comprises the following steps: determining a second spatial position of the rotor according to the fourth signal and the fifth signal; updating the first spatial position based on the second spatial position to obtain an updated first spatial position.

[0057] In this embodiment, the second spatial position of the rotor is determined according to the fourth signal and the fifth signal, wherein the second spatial position is the spatial position of the rotor.

[0058] For example, the frequency of the fourth signal and the fifth signal is 3 times the frequency of the first, second and third inner ring Hall elements, and the first spatial position determined by the inner ring Hall signal can be more accurately determined.

[0059] updating the first spatial position based on the second spatial position to obtain an updated first spatial position.

[0060] For example, the angle state of the rotor can be updated according to the fourth signal and the fifth signal, and then the first spatial position of the rotor is updated.

[0061] In some embodiments, the method for controlling the motor provided in the embodiments of the present application comprises the following steps: determining a first proportion coefficient corresponding to the first spatial position and a second proportion coefficient corresponding to the second spatial position when the first spatial position is different from the second spatial position; weighting the first spatial position and the second spatial position according to the first proportion coefficient and the second proportion coefficient to obtain an updated first spatial position.

[0062] In this embodiment, when the first spatial position is different from the second spatial position, it indicates that the first spatial position needs to be calibrated.

[0063] determining a first proportion coefficient corresponding to the first spatial position and a second proportion coefficient corresponding to the second spatial position, respectively, wherein the first proportion coefficient is a weighting coefficient corresponding to the first spatial position, and the second proportion coefficient is a weighting coefficient corresponding to the second spatial position.

[0064] For example, the first proportion coefficient can be 50%, and the second proportion coefficient can be 50%.

[0065] For example, the first proportion coefficient can be 30%, and the second proportion coefficient can be 70%.

[0066] According to the first proportion coefficient and the second proportion coefficient, the first spatial position and the second spatial position are weighted to obtain an updated first spatial position.

[0067] Exemplarily, in the case that the first spatial position and the second spatial position are the same, it is explained that the data of the first spatial position is accurate and available.

[0068] In some embodiments, the embodiments of the present application provide a control method of a motor, the control method comprising: determining an initial position of the rotor based on the first mechanical angle; determining a rotated angle of the rotor based on the initial position, the first spatial position and the rotating direction.

[0069] In this embodiment, the initial position of the rotor is determined based on the first mechanical angle, wherein the initial position is an initial position before the rotor rotates.

[0070] Exemplarily, the initial position can be a 0-degree position.

[0071] determining a rotated angle of the rotor based on the initial position, the first spatial position and the rotating direction, wherein the rotated angle is an angle that the rotor has rotated.

[0072] Exemplarily, the rotated angle can be 55 degrees in the counterclockwise direction.

[0073] In some embodiments, the embodiments of the present application provide a control method of a motor, the control method comprising: determining a target rotating angle and a target rotating direction of the rotor based on a difference between the first mechanical angle and the rotated angle; determining a second mechanical angle based on the target rotating angle and the target rotating direction; controlling the rotor to rotate the second mechanical angle to make the rotor complete the rotation of the first mechanical angle.

[0074] In this embodiment, the difference between the first mechanical angle and the rotated angle is calculated to determine the target rotating angle and the target rotating direction of the rotor.

[0075] Exemplarily, when the first mechanical angle is 55 degrees in the counterclockwise direction and the first mechanical angle is 70 degrees, the target rotating angle can be determined to be 15 degrees and the target rotating direction can be determined to be the counterclockwise direction.

[0076] When the first mechanical angle is 55 degrees in the counterclockwise direction, and the first mechanical angle is 50 degrees, it can be determined that the target rotation angle is 5 degrees, and the target rotation direction is the clockwise direction.

[0077] controlling the rotor to rotate the second mechanical angle, so that the rotor completes the rotation of the first mechanical angle.

[0078] In some embodiments, as Figure 3 As shown in FIG. 1, an embodiment of the present application provides a control device 300 of a motor, which comprises: The acquisition unit 302 is configured to, when controlling the rotor to rotate a first mechanical angle, acquire a first signal output by the first Hall element, a second signal output by the second Hall element, and a third signal output by the third Hall element, and acquire a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element. The processing unit 304 is configured to determine a first spatial position of the rotor according to the first signal, the second signal, and the third signal. The processing unit 304 is further configured to determine a rotation direction of the rotor according to the fourth signal and the fifth signal. The processing unit 304 is further configured to determine a rotated angle of the rotor based on the first spatial position and the rotation direction. The control unit 306 is configured to, when a difference between the rotated angle and the first mechanical angle is greater than an angle threshold, adjust the rotation angle of the rotor, so that the rotor completes the first mechanical angle.

[0079] In this embodiment, a control device 300 of a motor is provided, wherein the motor comprises a rotor, a first Hall element, a second Hall element, a third Hall element, a fourth Hall element, and a fifth Hall element, etc., the first Hall element, the second Hall element, and the third Hall element are used to detect an inner circle of a signal disc of the motor, and the fourth Hall element and the fifth Hall element are used to detect an outer circle of the signal disc of the motor.

[0080] For example, the signal disc of the motor is divided into two circles, the inner circle of the signal disc comprises five pairs of N-S magnetic poles, and the outer circle of the signal disc comprises fifteen pairs of N-S magnetic poles.

[0081] For example, the motor can be a brushless direct current motor.

[0082] When controlling the rotor to rotate a first mechanical angle, a first signal output by the first Hall element, a second signal output by the second Hall element, and a third signal output by the third Hall element are acquired, and a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element are acquired.

[0083] The first signal is a signal output by the first Hall element, the second signal is a signal output by the second Hall element, the third signal is a signal output by the third Hall element, and the fourth signal is a signal output by the fourth Hall element.

[0084] The first Hall element, the second Hall element, the third Hall element, the fourth Hall element, and the fifth Hall element are semiconductor magnetic sensitive devices based on the Hall effect, which are mainly used for detecting the magnetic field strength, direction of the inner circle and the outer circle of the motor signal disc, or realizing non-contact physical quantity measurement (such as current, position, rotation speed, etc.).

[0085] The rotor is positioned based on the first signal, the second signal, and the third signal to determine a first spatial position of the rotor, wherein the first spatial position is a spatial position of the rotor.

[0086] The first signal, the second signal, and the third signal can be square wave signals with the same frequency.

[0087] The first spatial position can include an angular position of the rotor, for example, the rotor is located at a 60-degree position of the motor.

[0088] The first spatial position can include a position area of the motor, for example, the motor can be divided into multiple areas such as area 1, area 2, area 3, and the first spatial position can be area 3.

[0089] The rotation direction of the rotor is determined based on the fourth signal and the fifth signal, wherein the rotation direction is a direction in which the rotor rotates.

[0090] The fourth signal and the fifth signal can be square wave signals with the same frequency.

[0091] The frequency of the fourth signal can be three times the frequency of the first signal.

[0092] The rotation direction can be a clockwise direction or a counterclockwise direction.

[0093] Based on the first spatial position and the rotation direction, a rotated angle of the rotor is determined, wherein the rotated angle is a real-time mechanical angle that has been completed by the rotor.

[0094] The rotated angle can be specifically 30 degrees in the clockwise direction.

[0095] The rotated angle can be specifically 50 degrees in the counterclockwise direction.

[0096] In a case where the difference between the rotated angle and the first mechanical angle is greater than an angle threshold value, it is indicated that the error between the rotated angle and the first mechanical angle is relatively large, and the rotated angle of the rotor needs to be adjusted so that the rotor completes the first mechanical angle, and the angle threshold value is a preset error threshold value.

[0097] Exemplarily, the angle threshold value can be 2 degrees.

[0098] It should be noted that, in the embodiment, the first spatial position of the rotor is determined based on the first signal output by the first Hall element, the second signal output by the second Hall element, and the third signal output by the third Hall element, and the rotating direction of the rotor is determined based on the fourth signal output by the fourth Hall element and the fifth signal output by the fifth Hall element, so that the accuracy of the first spatial position and the rotating direction is ensured, the rotated angle of the rotor is determined based on the accurate determination of the first spatial position and the rotating direction, and in a case where the difference between the rotated angle and the first mechanical angle is greater than an angle threshold value, the rotated angle of the rotor is adjusted so that the rotor completes the first mechanical angle, the rotating precision of the rotor is improved, and the operating precision of the motor is improved.

[0099] In the embodiment, the control device 300 of the motor determines the first spatial position of the rotor according to the first signal, the second signal, and the third signal, and determines the rotating direction of the rotor according to the fourth signal and the fifth signal, so that the accuracy of the first spatial position and the rotating direction is ensured, and the accuracy of the rotated angle is ensured, the rotor accurately completes the first mechanical angle based on the rotated angle, the rotating precision of the rotor is improved, and the operating precision of the motor is improved.

[0100] In some embodiments, the control device 300 of the motor provided in the embodiments of the present application comprises: The processing unit 304 is further configured to determine the angle state of the rotor according to the first signal, the second signal, and the third signal. The processing unit 304 is further configured to determine a plurality of preset states and a plurality of preset positions, and the plurality of preset positions correspond to the plurality of preset states one by one. The processing unit 304 is further configured to determine a target preset state same as the angle state from the plurality of preset states by comparison. The processing unit 304 is further configured to determine a target preset position corresponding to the target preset state from the plurality of preset positions. The processing unit 304 is further configured to determine the target preset position as the first spatial position.

[0101] In some embodiments, the control device 300 of the motor provided in the embodiments of the present application comprises: The processing unit 304 is also used to determine the phase position relationship between the fourth signal and the fifth signal by comparing their phases; The processing unit 304 is also used to determine the rotation direction based on the phase position relationship.

[0102] In some embodiments of this application, a motor control device 300 is provided, comprising: The processing unit 304 is also used to determine the second spatial position of the rotor based on the fourth signal and the fifth signal; The processing unit 304 is further configured to perform calibration and update processing on the first spatial position based on the second spatial position to obtain the updated first spatial position.

[0103] In some embodiments of this application, a motor control device 300 is provided, comprising: The processing unit 304 is further configured to determine, when the first spatial position and the second spatial position are different, a first proportional coefficient corresponding to the first spatial position and a second proportional coefficient corresponding to the second spatial position; The processing unit 304 is further configured to perform weighted processing on the first spatial position and the second spatial position according to the first scaling factor and the second scaling factor to obtain the updated first spatial position.

[0104] In some embodiments of this application, a motor control device 300 is provided, comprising: The processing unit 304 is also used to determine the initial position of the rotor based on the first mechanical angle; The processing unit 304 is also used to determine the rotation angle of the rotor based on the initial position, the first spatial position and the rotation direction.

[0105] In some embodiments of this application, a motor control device 300 is provided, comprising: The processing unit 304 is also used to determine the target rotation angle and target rotation direction of the rotor based on the difference between the first mechanical angle and the already rotated angle; The processing unit 304 is also used to determine the second mechanical angle based on the target rotation angle and the target rotation direction; The processing unit 304 is also used to control the rotor to rotate a second mechanical angle so that the rotor can complete the first mechanical angle rotation.

[0106] In some embodiments, such as Figure 4As shown, a motor control device 400 is provided, which comprises a processor 402 and a memory 404, and the memory 404 stores a computer program, which, when executed by the processor 402, implements the steps of the motor control method in any of the above embodiments. Therefore, the motor control device 400 has all the beneficial effects of the motor control method in any of the above embodiments, which will not be repeated here.

[0107] In some embodiments, a readable storage medium is provided, which stores a program, and the program, when executed by a processor, implements the steps of the motor control method in any of the above embodiments, thus having all the beneficial technical effects of the motor control method in any of the above embodiments.

[0108] It should be noted that in the above embodiments, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.

[0109] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-readable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer readable program code.

[0110] The present application is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as combinations of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded computer, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce a device that implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks. Figure 1 The functions specified in one or more flows and / or blocks.

[0111] These computer program instructions can also be stored in a computer readable memory that can direct the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices that implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in one or more flows and / or blocks. Figure 1 The functions specified in one or more flows and / or blocks.

[0112] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable devices to generate a computer implemented process, so that the instructions executed on the computer or other programmable devices provide a process for implementing the functions specified in the flowchart Figure 1 one flowchart or multiple flowcharts and / or blocks Figure 1 one block or multiple blocks.

[0113] The embodiments of the present application also provide a computer program product, which comprises computer software instructions, when the computer software instructions are run on a processing device, so that the processing device executes the flowchart of the control method of the motor.

[0114] The computer program product comprises one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flowchart or function according to the embodiments of the present application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (for example, coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (for example, infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that the computer can store or the data storage device such as server, data center, etc. integrated with one or more available medium sets. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)) and the like.

[0115] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above described system, device and unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0116] In several embodiments provided in the present application, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other manners. For example, the embodiments of the apparatus described above are merely schematic. For example, the division of the units is only a logical function division. There can be another division manner for the actual implementation. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections between the units can be indirect couplings or communication connections through some interfaces, devices or units, and can be electrical, mechanical or in other forms.

[0117] The units described as separated components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments of the present application.

[0118] In addition, each functional unit in the embodiments of the present application can be integrated in a processing unit, or each unit can exist physically as a separate unit, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.

[0119] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present application essentially or substantially, or all or part of the technical solutions, can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions that cause a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the embodiments of the present application. The foregoing storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and various media that can store program codes.

[0120] The above embodiments are merely used to describe the technical solutions of the present application, rather than limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacements for some technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

[0121] While the preferred embodiments of the application have been described, additional variations and modifications can be made to the preferred embodiments by those skilled in the art once they learn of the basic inventive concepts. Therefore, the appended claims are intended to encompass within their scope all such variations and modifications as are included within the scope of the present description.

[0122] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the application can be practiced otherwise than as specifically described herein.

Claims

1. A method for controlling an electric motor, characterized in that, The motor includes a rotor, a first Hall element, a second Hall element, a third Hall element, a fourth Hall element, and a fifth Hall element. The first Hall element, the second Hall element, and the third Hall element are used to detect the inner ring of the motor's signal disk, and the fourth Hall element and the fifth Hall element are used to detect the outer ring of the motor's signal disk. The method includes: When controlling the rotor to rotate a first mechanical angle, the first signal output by the first Hall element, the second signal output by the second Hall element, and the third signal output by the third Hall element are acquired, and the fourth signal output by the fourth Hall element and the fifth signal output by the fifth Hall element are acquired. The first spatial position of the rotor is determined based on the first signal, the second signal, and the third signal; The rotation direction of the rotor is determined based on the fourth signal and the fifth signal; Based on the first spatial position and the rotation direction, the rotation angle of the rotor is determined; If the difference between the rotated angle and the first mechanical angle is greater than an angle threshold, the rotation angle of the rotor is adjusted so that the rotor completes the first mechanical angle.

2. The method according to claim 1, characterized in that, Determining the first spatial position of the rotor based on the first signal, the second signal, and the third signal includes: The angular state of the rotor is determined based on the first signal, the second signal, and the third signal; Multiple preset states and multiple preset positions are determined, and the multiple preset positions correspond one-to-one with the multiple preset states; By comparing the angle state with multiple preset states, a target preset state that is the same as the angle state is determined from among the multiple preset states; Among the plurality of preset positions, a target preset position corresponding to the target preset state is determined; The target preset position is determined as the first spatial position.

3. The method according to claim 1, characterized in that, Determining the rotation direction of the rotor based on the fourth signal and the fifth signal includes: The phase position relationship between the fourth signal and the fifth signal is determined by comparing their phases. The direction of rotation is determined based on the phase position relationship.

4. The method according to claim 1, characterized in that, After determining the rotation direction of the rotor based on the fourth signal and the fifth signal, the method further includes: The second spatial position of the rotor is determined based on the fourth signal and the fifth signal; Based on the second spatial location, the first spatial location is calibrated and updated to obtain the updated first spatial location.

5. The method according to claim 4, characterized in that, The step of calibrating and updating the first spatial position based on the second spatial position to obtain the updated first spatial position includes: When the first spatial position and the second spatial position are different, determine the first proportional coefficient corresponding to the first spatial position and the second proportional coefficient corresponding to the second spatial position; The first spatial position and the second spatial position are weighted according to the first proportional coefficient and the second proportional coefficient to obtain the updated first spatial position.

6. The method according to any one of claims 1 to 5, characterized in that, Determining the rotation angle of the rotor based on the first spatial position and the rotation direction includes: Based on the first mechanical angle, the initial position of the rotor is determined; The rotation angle of the rotor is determined based on the initial position, the first spatial position, and the rotation direction.

7. The method according to any one of claims 1 to 5, characterized in that, Adjusting the rotation angle of the rotor to make the rotor complete the first mechanical angle includes: The target rotation angle and target rotation direction of the rotor are determined based on the difference between the first mechanical angle and the already rotated angle. The second mechanical angle is determined based on the target rotation angle and the target rotation direction; The rotor is controlled to rotate by the second mechanical angle so that the rotor completes the rotation by the first mechanical angle.

8. A control device for an electric motor, characterized in that, The motor includes a rotor, a first Hall element, a second Hall element, a third Hall element, a fourth Hall element, and a fifth Hall element. The first Hall element, the second Hall element, and the third Hall element are used to detect the inner ring of the motor's signal disk, and the fourth Hall element and the fifth Hall element are used to detect the outer ring of the motor's signal disk. The device includes: The acquisition unit is used to acquire, when controlling the rotor to rotate a first mechanical angle, a first signal output by the first Hall element, a second signal output by the second Hall element, and a third signal output by the third Hall element, and to acquire a fourth signal output by the fourth Hall element and a fifth signal output by the fifth Hall element; The processing unit is configured to determine the first spatial position of the rotor based on the first signal, the second signal, and the third signal; The processing unit is further configured to determine the rotation direction of the rotor based on the fourth signal and the fifth signal; The processing unit is further configured to determine the rotation angle of the rotor based on the first spatial position and the rotation direction; The control unit is configured to adjust the rotation angle of the rotor so that the rotor completes the first mechanical angle when the difference between the already rotated angle and the first mechanical angle is greater than an angle threshold.

9. A control device for an electric motor, characterized in that, include: processor; A memory, which stores programs or instructions, wherein a processor, when executing the programs or instructions in the memory, implements the steps of the motor control method as described in any one of claims 1 to 7.

10. A readable storage medium, characterized in that, A program or instructions are stored on a readable storage medium, which, when executed by a processor, implement the steps of the motor control method as described in any one of claims 1 to 7.