CN111817616B - Motor control method and device - Google Patents

Motor control method and device Download PDF

Info

Publication number
CN111817616B
CN111817616B CN202010661384.7A CN202010661384A CN111817616B CN 111817616 B CN111817616 B CN 111817616B CN 202010661384 A CN202010661384 A CN 202010661384A CN 111817616 B CN111817616 B CN 111817616B
Authority
CN
China
Prior art keywords
position angle
hall
time
state
motor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010661384.7A
Other languages
Chinese (zh)
Other versions
CN111817616A (en
Inventor
杨磊
杜新
李俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Junzheng Network Technology Co Ltd
Original Assignee
Shanghai Junzheng Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Junzheng Network Technology Co Ltd filed Critical Shanghai Junzheng Network Technology Co Ltd
Priority to CN202010661384.7A priority Critical patent/CN111817616B/en
Publication of CN111817616A publication Critical patent/CN111817616A/en
Application granted granted Critical
Publication of CN111817616B publication Critical patent/CN111817616B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/14Electronic commutators
    • H02P6/16Circuit arrangements for detecting position
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P6/00Arrangements for controlling synchronous motors or other dynamo-electric motors using electronic commutation dependent on the rotor position; Electronic commutators therefor
    • H02P6/20Arrangements for starting

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Motors That Do Not Use Commutators (AREA)

Abstract

The application relates to a motor control method and device. The method comprises the following steps: acquiring a unit position angle of a motor running in unit time; acquiring a historical Hall state corresponding to historical time; searching a historical position angle corresponding to a historical Hall state; calculating the difference between the current time and the historical time to obtain the motor running time; obtaining a current position angle according to the unit position angle, the motor running time and the historical position angle; and controlling the motor to operate according to the current position angle. By adopting the method, the precision of motor control can be improved.

Description

Motor control method and device
Technical Field
The present disclosure relates to motor control technologies, and in particular, to a motor control method and device.
Background
With the development of social economy, the electric vehicle has become the most economical and convenient vehicle for people to go out. The motor is a key component in the electric vehicle and is used for converting electric energy in the battery into mechanical energy so as to realize rotary motion.
The motor of the traditional electric vehicle is controlled by the Hall square waves, so that the noise is high when the motor is started, and the low current pulsation and the mute operation can be realized when the sine vector control is used.
However, when the motor is started under heavy load, the motor is controlled to operate by using a sine vector, and if the position angle of the motor deviates, the torque cannot reach the maximum value, so that the starting fails.
Disclosure of Invention
In view of the above, it is necessary to provide a motor control method and apparatus capable of improving the accuracy of motor control.
A method of controlling a motor, the method comprising:
acquiring a unit position angle of a motor running in unit time;
acquiring a historical Hall state corresponding to historical time;
searching a historical position angle corresponding to a historical Hall state;
calculating the difference between the current time and the historical time to obtain the motor running time;
obtaining a current position angle according to the unit position angle, the motor running time and the historical position angle;
and controlling the motor to operate according to the current position angle.
In one embodiment, obtaining the current position angle according to the unit position angle, the motor running time and the historical position angle includes:
calculating the product of the unit position angle and the motor running time to obtain a position angle change value;
and adding the historical position angle and the position angle change value to obtain the current position angle.
In one embodiment, after adding the historical position angle and the position-angle variation value to obtain the current position angle, the method further includes:
when the Hall state of the motor is detected to be changed, the changed actual Hall state is obtained;
acquiring an actual position angle corresponding to an actual Hall state;
comparing the actual position angle with the current position angle;
and when the actual position angle is inconsistent with the current position angle, extracting the actual position angle as the current position angle.
In one embodiment, when it is detected that the hall state of the motor changes, acquiring the changed actual hall state includes:
when the Hall state of the motor is detected to be changed and the changed Hall state at least corresponds to two different Hall states, acquiring at least three Hall states detected in continuous time and arranging the Hall states into a first Hall state, a second Hall state and a third Hall state according to a time sequence;
and when the first Hall state is consistent with the third Hall state, the first Hall state is extracted as an actual Hall state, and when the first Hall state is inconsistent with the third Hall state, the second Hall state is extracted as the actual Hall state.
In one embodiment, acquiring the unit position angle of the motor changing in unit time comprises:
acquiring an initial position angle and initial time corresponding to an initial Hall state;
acquiring a target position angle and target time corresponding to a target Hall state;
calculating the time difference between the initial time and the target time and the position angle difference between the initial position angle and the target position angle;
and calculating the ratio of the position angle difference to the time difference, and obtaining the unit position angle changed in unit time according to the ratio.
In one embodiment, acquiring the unit position angle of the motor changing in unit time comprises:
acquiring the electric cycle time corresponding to one electric cycle of the motor running at a preset speed;
acquiring the state quantity of Hall states and a Hall position angle corresponding to one Hall state;
calculating the ratio of the electric cycle time to the number of states to obtain the state running time corresponding to one Hall state;
and calculating the ratio of the Hall position angle to the state operation time to obtain the unit position angle of the motor running in unit time.
In one embodiment, the method for acquiring the historical position angle comprises the following steps:
acquiring a corresponding static Hall state of the motor in a static state;
searching a static position angle corresponding to a static Hall state;
acquiring a next Hall state of the static Hall state and a next position angle corresponding to the next Hall state;
and obtaining the starting angle of the motor according to the next position angle and the rest position angle, and taking the starting angle as a historical position angle.
A motor control apparatus, the apparatus comprising:
the position angle acquisition module is used for acquiring a unit position angle of the motor running in unit time;
the state acquisition module is used for acquiring historical Hall states corresponding to historical time;
the position angle searching module is used for searching historical position angles corresponding to historical Hall states;
the running time calculation module is used for calculating the difference value between the current time and the historical time to obtain the running time of the motor;
the current angle calculation module is used for obtaining a current position angle according to the unit position angle, the motor running time and the historical position angle;
and the control module is used for controlling the motor to operate according to the current position angle.
In one embodiment, the current angle calculation module includes:
the angle change value calculation unit is used for calculating the product of the unit position angle and the motor running time to obtain a position angle change value;
and the adding unit is used for adding the historical position angle and the position angle change value to obtain the current position angle.
In one embodiment, the motor control apparatus further includes:
the actual state acquisition module is used for acquiring the changed actual Hall state when the Hall state of the motor is detected to be changed;
the actual angle acquisition module is used for acquiring an actual position angle corresponding to an actual Hall state;
the comparison module is used for comparing the actual position angle with the current position angle;
and the extracting module is used for extracting the actual position angle as the current position angle when the actual position angle is inconsistent with the current position angle.
The motor control method calculates the unit position angle of the motor running in unit time in advance; then acquiring a historical Hall state corresponding to historical time, and searching a historical position angle corresponding to the historical Hall state; calculating the difference between the current time and the historical time to obtain the motor running time; the method and the device have the advantages that the position angle changed in the motor running time is obtained according to the unit position angle and the motor running time, the current position angle is obtained according to the historical position angle and the representative position angle, the accurate position angle value can be obtained through calculation in any time, the motor is controlled to run according to the current position angle, accurate control over the motor is achieved, the maximum control torque is obtained, and heavy load starting of the motor is achieved according to the maximum control torque.
Drawings
FIG. 1 is a diagram of an exemplary motor control method;
FIG. 2 is a schematic flow chart of a motor control method according to one embodiment;
FIG. 3 is a schematic diagram of a Hall state provided in one embodiment;
fig. 4 is a block diagram showing a structure of a motor control device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The motor control method provided by the application can be applied to the application environment shown in fig. 1. Wherein the motor 102 communicates with the control chip 104. The control chip 104 acquires the unit position angle of the motor running in unit time; acquiring a historical Hall state corresponding to historical time; searching a historical position angle corresponding to a historical Hall state; calculating the difference between the current time and the historical time to obtain the motor running time; obtaining a current position angle according to the unit position angle, the motor running time and the historical position angle; the control chip 104 controls the motor 102 to operate according to the current position angle. The motor 102 may be a dc brushless motor, the control chip 104 may be various single-chip microcomputers, and the motor 102 and the control chip may be connected by a wire.
The present application relates to a method of controlling an electric motor, wherein the electric motor may be a dc brushless motor. Specifically, the position of the rotor is recorded by a hall sensor during the operation of the dc brushless motor, so as to switch the working state according to the different positions of the rotor, specifically, a signal is transmitted to a control chip to control the working state of the dc brushless motor. The Hall sensors can be used for recording the position of a rotor of the brushless direct current motor, so that the phase-changing power is controlled, if the three Hall sensors are used for recording the positions of six phases in the three-phase brushless direct current motor, 6 different Hall signals can be output and correspond to 6 different fan-shaped areas respectively, when the rotor of the brushless direct current motor rotates to one fan-shaped area, corresponding windings are electrified, and the motor can work normally.
Further, the hall state may divide the electrical cycle of the motor into 6 sectors, and each sector corresponds to a position angle range of 60 °. In the application, in order to distinguish different hall states of the motor, a hall state corresponding to current time may be recorded as a current hall state, a hall state that has been experienced is a historical hall state and a hall state that has not yet arrived is a next hall state, and the current hall state, the historical hall state and the next hall state are relative concepts.
In one embodiment, as shown in fig. 2, a motor control method is provided, which is described by taking the method as an example applied to the control chip 104 in fig. 1, and includes the following steps:
step 210, obtaining a unit position angle of the motor running in unit time.
Specifically, the control chip obtains the operation time corresponding to a certain angle range of the motor operation, and then calculates the ratio of the operation time to the angle range to obtain the unit position angle of the motor operation in unit time. If the electric cycle of the motor is divided into 6 sectors by the Hall state when the electric cycle of the motor is 360 degrees, namely, each sector is 60 degrees, the time required by the motor from the current Hall state to the next Hall state is T, and the angle theta of the unit position operated by the motor in unit time can be calculated to be 60 degrees/T because the angle from the current Hall state to the next Hall state corresponds to one sector, namely, 60 degrees.
It should be noted that, when calculating the unit position angle, the calculation may be performed by changing an angle range corresponding to one hall state, for example, 60 °, or may be performed by changing an angle range corresponding to two hall states, for example, 120 °, or may be performed by operating the motor for one electrical cycle, for example, 360 °, which is not limited herein. Specifically, the angle range for calculating the angle per unit position may be determined according to the operating speed of the motor, for example, a larger angle range may be set when the speed of the motor is relatively uniform.
When the unit position angle is calculated, the motor can be assumed to be in a constant-speed running state all the time, so that the unit position angle calculated by utilizing the angle range and the running time can reflect the real change condition of the position angle, for example, the running time corresponding to the motor position running for 60 degrees can be obtained, then the running position angle in the unit time is calculated, then the actual position angle value corresponding to any time can be estimated according to the running position angle in the unit time, and further the linear processing of the position angle in the discrete Hall state is realized.
Step 220, obtaining a historical hall state corresponding to historical time.
The historical time refers to the time corresponding to the time when the motor reaches the historical hall state, and the historical time and the historical hall state are relative to the current time and the current hall state. Specifically, as shown in fig. 3, fig. 3 is a schematic diagram of a hall state provided in an embodiment, and it can be seen in fig. 3 that corresponding hall states in one electrical cycle are respectively a hall state 1, a hall state 3, a hall state 2, a hall state 6, a hall state 4, and a hall state 5 in sequence. If the current hall state of the motor is hall state 2, it can be obtained from fig. 3 that the historical hall state can be hall state 1 or hall state 3, and the historical time can be the corresponding time when the motor reaches hall state 1 or hall state 3.
Generally, a motor has three hall sensors, each of which has two state values 0 or 1, the state values of the three hall sensors form a hall code, so as to obtain hall states according to the hall code, and one hall state corresponds to one position angle. As shown in fig. 3, hall a, hall b, and hall c are three different hall sensors, and the three hall sensors form a hall code, specifically, it can be obtained from fig. 3 that hall code 101 corresponds to hall state 1, hall code 100 corresponds to hall state 3, hall code 110 corresponds to hall state 2, hall code 010 corresponds to hall state 6, hall code 011 corresponds to hall state 4, and hall code 001 corresponds to hall state 5. Therefore, the current Hall state can be obtained according to the output Hall code.
And step 230, searching historical position angles corresponding to historical Hall states.
Specifically, the hall state and the position angle may be associated and bound in advance and stored in a database, for example, the hall state 1 and the position angle 0 ° are associated and stored, the hall state 3 and the position angle 60 ° are associated and stored, the hall state 2 and the position angle 120 ° are associated and stored, the hall state 6 and the position angle 180 ° are associated and stored, the hall state 4 and the position angle 240 ° are associated and stored, and the hall state 5 and the position angle 300 ° are associated and stored. The position angle corresponding to each hall state can then be obtained from a pre-stored database. However, it should be noted that only discrete position angle interval values such as 0 °, 60 °, 120 °, 180 °, 240 °, and 300 ° can be found according to the hall state, and an actual linear angle value cannot be obtained, so that the angle needs to be linearized at this time.
The historical position angle is only an angle value corresponding to the motor at a certain historical time, and is a reference angle value used for calculating the current position angle. Specifically, the historical position angle may be an angle corresponding to when the motor reaches any one hall state, and if the current hall state is the hall state 2, the historical position angle may be an angle corresponding to the hall state 3 and the hall state 1.
And 240, calculating the difference between the current time and the historical time to obtain the motor running time.
Specifically, the historical time is the time corresponding to the time when the motor reaches the historical hall state, the current time is the time corresponding to the current time, and the time that the motor passes from the historical hall state to the current time, that is, the running time of the motor, can be obtained by calculating the difference between the historical time and the current time.
And 250, obtaining the current position angle according to the unit position angle, the motor running time and the historical position angle.
It should be noted that, the conventional dc brushless motor adopts a square wave control mode, which is simple to control and easy to implement, but has the problems of torque ripple, phase-change noise, and the like, and has limitations in some application fields requiring noise. For these applications where noise is a requirement, this problem can be solved very well by using sine wave control. Unlike square wave control, the angle in sine wave control needs to be a continuously changing angle value, but the common 3 hall sensors can only provide 6 angle information, i.e. 0 °, 60 °, 120 °, 180 °, 240 °, 300 °, and other angle information cannot be directly obtained. Therefore, in order to obtain the position angle of the motor at any moment, the method calculates the unit position angle of the motor in unit time through historical data, obtains the motor running time, further obtains the corresponding position angle change value in the motor running time, then adds the position angle change value on the basis of the historical position angle corresponding to the historical Hall state as a reference to estimate the actual position angle of the motor at the current moment, and compared with the method that the Hall sensor only can provide 6 angle information, the method carries out linearization processing on the discrete 6 angle information to obtain the current position angle corresponding to each moment, and further enables the control of the motor to be more accurate.
In a specific embodiment, when the motor is operated at a low speed, the time required from the current hall state to the next hall state is T, and since each sector interval is an electrical cycle of 60 °, a unit position angle θ can be calculated as 60 °/T, and the current angle is the last hall angle + T1 (60 °/T), and the current position angle calculation method is as follows:
Figure GDA0003281510860000071
wherein, thetacurrent-hallIs the current position angle, θ, corresponding to the current Hall statelast-hallThe last position angle corresponding to the last Hall state, t is the difference value between the current time and the historical time, and 60 degrees is the sector angle corresponding to the Hall state. The division of 60 ° by T yields the unit position angle for the unit time, so that the multiplication of T by the unit position angle equals the hall angle at the current time.
Through the calculation mode in the formula (1), discrete Hall signals can be processed into linear angle values, so that the motor can be smoothly and silently started under heavy load. It should be noted that, since the actual angle interval range corresponding to one hall state is fixed, when the current position angle calculated by the formula (1) exceeds the actual angle interval range, the calculated current position angle should be limited to the actual angle interval range, such as processing for equaling 60 ° when exceeding 60 °, processing for limiting 120 ° when exceeding 120 °, and the like.
And step 260, controlling the motor to operate according to the current position angle.
Specifically, the operation of the motor is controlled according to the linear current position angle obtained through calculation, and accurate control over the motor is achieved.
In the present embodiment, the unit position angle at which the motor operates in unit time is calculated in advance; then acquiring a historical Hall state corresponding to historical time, and searching a historical position angle corresponding to the historical Hall state; calculating the difference between the current time and the historical time to obtain the motor running time; the method and the device have the advantages that the position angle changed in the motor operation time is obtained according to the unit position angle and the motor operation time, the current position angle is obtained according to the historical position angle and the changed position angle, the accurate position angle value can be obtained through calculation in any time, the motor operation is controlled according to the current position angle, the motor is accurately controlled, the maximum control torque is obtained, and the heavy load starting of the motor is achieved according to the maximum control torque.
In one embodiment, the method for acquiring the historical position angle comprises the following steps: acquiring a corresponding static Hall state of the motor in a static state; searching a static position angle corresponding to a static Hall state; acquiring a next Hall state of the static Hall state and a next position angle corresponding to the next Hall state; and obtaining the starting angle of the motor according to the next position angle and the rest position angle, and taking the starting angle as a historical position angle.
Specifically, before the dc brushless motor is started, that is, when the rotor is in a stationary state, only the hall sensor can be used to obtain the absolute position information of the motor, and since there is no commutation, the rotational speed information of the motor cannot be obtained, and therefore the position angle information required for sinusoidal control cannot be calculated. Therefore, the static Hall state corresponding to the static state of the motor is obtained in the application, the static position angle corresponding to the static Hall state is searched, the static Hall state is taken as the current Hall state, and the static position angle corresponding to the static Hall state is taken as the current position angle thetacurrent-hallAnd the next position angle θ corresponding to the next Hall statenext-hallObtaining the starting angle theta of the motor according to the next position angle and the rest position anglestartAnd the starting angle is taken as the historical position angle.
θstart=θcurrent-hall+(θnext-hallcurrent-hall)/2 (2)
In this embodiment, the starting angle is calculated by using the angle of the rest position and the angle of the next position, so that the starting angle can be ensured within the range of 30 degrees, the motor can be ensured to be normally started, and the optimal torque can be ensured, thereby realizing heavy-load starting.
In one embodiment, acquiring the unit position angle of the motor changing in unit time comprises: acquiring an initial position angle and initial time corresponding to an initial Hall state; acquiring a target position angle and target time corresponding to a target Hall state; calculating the time difference between the initial time and the target time and the position angle difference between the initial position angle and the target position angle; and calculating the ratio of the position angle difference to the time difference, and obtaining the unit position angle changed in unit time according to the ratio.
The initial hall state and the target hall state are not the same state, so that a time difference and a position angle difference exist between the initial hall state and the target hall state, specifically, the position angle difference between the initial hall state and the target hall state may be 60 °, 120 °, 180 °, 240 °, and the like, which is not limited herein. Therefore, the ratio of the position angle difference to the time difference can be calculated, and the unit position angle changed in unit time can be obtained according to the ratio.
In one embodiment, acquiring the unit position angle of the motor changing in unit time comprises: acquiring the electric cycle time corresponding to one electric cycle of the motor running at a preset speed; acquiring the state quantity of Hall states and a Hall position angle corresponding to one Hall state; calculating the ratio of the electric cycle time to the number of states to obtain the state running time corresponding to one Hall state; and calculating the ratio of the Hall position angle to the state operation time to obtain the unit position angle of the motor running in unit time.
When the method needs to be described, the rotation speed calculation depends on the hall sensors, the interval between two adjacent hall states is 60 degrees in an ideal state, and the actual interval is not 60 degrees due to installation errors in practical application, so that calculation errors can be introduced. Therefore, in this embodiment, the unit position angle may also be calculated according to the operation state of the motor in one electrical cycle, specifically, one electrical cycle corresponds to 360 °, one hall state corresponds to one sector area, and one sector area corresponds to 60 °, so that there are 6 hall states in one electrical cycle, and the unit position angle of the motor operating in the unit time is obtained by obtaining the electrical cycle time used by the motor to operate one electrical cycle, and then calculating the ratio of the electrical cycle time to the number of states to obtain the state operation time corresponding to operating one hall state, so as to calculate the ratio of one hall position angle to the state operation time.
And in this embodiment, the electrical cycle time of the motor operation can also be defined by the lowest operation speed of the motor. Specifically, when the time corresponding to one electrical cycle is T2, the state operating time corresponding to one hall state is T1 — T2/6.
In this embodiment, in order to cope with the deviation of hall mounting, calculating the unit position angle using one electrical cycle, that is, a time of operation of 360 degrees, can reduce the position angle calculation error due to mounting error.
In one embodiment, obtaining the current position angle according to the unit position angle, the motor running time and the historical position angle includes: calculating the product of the unit position angle and the motor running time to obtain a position angle change value; and adding the historical position angle and the position angle change value to obtain the current position angle.
Specifically, the unit position angle is the corresponding angle in the unit time, so calculating the product of the motor operating time and the unit position angle can obtain the position angle change value in the motor operating time. If the unit position angle is 1 ° per second, and the difference between the current time and the historical time, that is, the motor operating time is 30 seconds, then calculating the product of the two results in that the change value of the position angle of the motor is 30 ° within 30 seconds. And when the historical hall state corresponding to the historical time is the hall state 3, then the historical position angle is known to be 60 °, then the current position angle can be calculated to be 90 °.
In this embodiment, the current position angle corresponding to the current time can be obtained through a simple calculation algorithm, so that not only is computer resources not consumed in the process of calculating the position angle, but also accurate control can be performed on the motor at the current moment by using historical data to guide the acquisition of the current data, and the control accuracy of the motor is improved.
In one embodiment, after adding the historical position angle and the position-angle variation value to obtain the current position angle, the method further includes: when the Hall state of the motor is detected to be changed, the changed actual Hall state is obtained; acquiring an actual position angle corresponding to an actual Hall state; comparing the actual position angle with the current position angle; and when the actual position angle is inconsistent with the current position angle, extracting the actual position angle as the current position angle.
Specifically, because the current position angle corresponding to any moment can be obtained by linearizing the position angle of the motor in an electrical cycle, but the obtained current position angle is obtained by averaging historical data, so that a certain error exists in the obtained current position angle, the hall state of the motor can be obtained in real time, when the change of the hall state of the motor is detected, the actual hall state and the actual position angle corresponding to the actual hall state are obtained, the actual position angle is compared with the estimated current position angle, when the actual position angle and the estimated current position angle are consistent, the current position angle obtained by utilizing the linearization formula can reflect the current real angle value of the motor, when the actual position angle and the estimated current position angle are inconsistent, the current position angle obtained by utilizing the linearization formula cannot reflect the current real angle value of the motor, and the actual position angle is taken as the current position angle, to control the operation of the motor.
Specifically, since the hall mount has an angular deviation, if the position angle is calculated according to the linearized equation, when the position angle is less than 60 degrees, it is calculated at 60 °, and when it is greater than 60 degrees, it is calculated at 60 degrees, there is a deviation of the estimated current position angle from the true position angle. With continued reference to fig. 3, in fig. 3, the bent line 301 is a line segment obtained from the current position angle, and since there is a step at the hall state switching position due to the deviation of the hall installation angle, the formed bent segment is not a smooth line segment. The straight line 302 is a line segment corresponding to the current position angle corrected by the actual position angle, and is relatively smooth. For example, in a specific embodiment, the estimated current position angle according to the formula (2) is 58 °, but the actual position angle corresponding to the actually detected hall state is 60 °, which indicates that the value of the current position angle estimated by using the formula (2) is small, and therefore, the current position angle should be corrected by using the actual position angle.
In this embodiment, the actual position angle of the motor obtained in real time is compared with the estimated position angle, and when there is a difference, the estimated current position angle is corrected by using the actual position angle, so as to obtain a position angle more conforming to the actual situation, thereby improving the control accuracy of the motor.
In one embodiment, when it is detected that the hall state of the motor changes, acquiring the changed actual hall state includes: when the Hall state of the motor is detected to be changed and the changed Hall state at least corresponds to two different Hall states, acquiring at least three Hall states detected in continuous time and arranging the Hall states into a first Hall state, a second Hall state and a third Hall state according to a time sequence; and when the first Hall state is consistent with the third Hall state, the first Hall state is extracted as an actual Hall state, and when the first Hall state is inconsistent with the third Hall state, the second Hall state is extracted as the actual Hall state.
When the device is started at a low speed, because the hall signal has an edge jump phenomenon, the sector and the hall state do not correspond, and a corresponding angle can be judged incorrectly, data storage is continuously performed for several times in the application, for example, a plurality of hall states detected in continuous time, namely a first hall state, a second hall state and a third hall state are obtained, and the first hall state is a, the second hall state is B, and the third hall state is C, if a is equal to C, then the hall state can be considered as a or C, and if a is not equal to C, the last hall state is still used, namely the hall state is considered as B.
The traditional electric vehicle is controlled by a square wave with a Hall, a motor is started to operate, noise is large, customer experience is poor, sinusoidal vector control is used, current pulsation is small, mute operation is achieved, and customer experience is good. However, when the motor is started in a heavy load, if the angle has deviation, the torque cannot reach the maximum, and starting failure exists.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in the figures may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution of the steps or stages is not necessarily sequential, but may be performed alternately or in alternation with other steps or at least some of the other steps or stages.
In one embodiment, as shown in fig. 4, there is provided a motor control apparatus including:
a position angle obtaining module 410, configured to obtain a unit position angle at which the motor operates in unit time;
the state acquisition module 420 is configured to acquire a historical hall state corresponding to historical time;
the position angle searching module 430 is used for searching historical position angles corresponding to historical hall states;
the running time calculation module 440 is used for calculating the difference between the current time and the historical time to obtain the running time of the motor;
the current angle calculation module 450 is configured to obtain a current position angle according to the unit position angle, the motor running time, and the historical position angle;
and a control module 460 for controlling the operation of the motor according to the current position angle.
In one embodiment, the current angle calculation module 450 includes:
the angle change value calculation unit is used for calculating the product of the unit position angle and the motor running time to obtain a position angle change value;
and the adding unit is used for adding the historical position angle and the position angle change value to obtain the current position angle.
In one embodiment, the motor control apparatus further includes:
the actual state acquisition module is used for acquiring the changed actual Hall state when the Hall state of the motor is detected to be changed;
the actual angle acquisition module is used for acquiring an actual position angle corresponding to an actual Hall state;
the comparison module is used for comparing the actual position angle with the current position angle;
and the extracting module is used for extracting the actual position angle as the current position angle when the actual position angle is inconsistent with the current position angle.
In one embodiment, the actual state obtaining module includes:
the Hall state acquisition units are used for acquiring at least three Hall states detected in continuous time when the Hall state of the motor is detected to change and the changed Hall states at least correspond to two different Hall states, and arranging the Hall states in a first Hall state, a second Hall state and a third Hall state according to a time sequence;
and the Hall state comparison and extraction unit is used for extracting the first Hall state as an actual Hall state when the first Hall state is consistent with the third Hall state, and extracting the second Hall state as the actual Hall state when the first Hall state is inconsistent with the third Hall state.
In one embodiment, the position angle obtaining module 410 includes:
the initial time acquisition unit is used for acquiring an initial position angle and initial time corresponding to an initial Hall state;
the target time acquisition unit is used for acquiring a target position angle and target time corresponding to a target Hall state;
an angle difference calculation unit for calculating a time difference between the initial time and the target time and a position angle difference between the initial position angle and the target position angle;
and the first unit position angle acquisition unit is used for calculating the ratio of the position angle difference to the time difference and obtaining the unit position angle changed in unit time according to the ratio.
In one embodiment, the position angle obtaining module 410 includes: the electric cycle time acquisition module is used for acquiring the electric cycle time corresponding to one electric cycle of the motor running at a preset speed; the quantity acquisition module is used for acquiring the state quantity of the Hall states and a Hall position angle corresponding to one Hall state; the running time calculation module is used for calculating the ratio of the electric cycle time to the number of states to obtain the state running time corresponding to one Hall state; and the second unit position angle acquisition unit is used for calculating the ratio of one Hall position angle to the state operation time to obtain the unit position angle of the motor running in unit time.
In one embodiment, the motor control apparatus further includes: the static state acquisition module is used for acquiring a static Hall state corresponding to the motor in the static state; the static angle searching module is used for searching a static position angle corresponding to a static Hall state; the angle acquisition module is used for acquiring the next Hall state of the static Hall state and the next position angle corresponding to the next Hall state; and the historical position angle extraction module is used for obtaining the starting angle of the motor according to the next position angle and the rest position angle and taking the starting angle as the historical position angle.
For specific limitations of the motor control device, reference may be made to the above limitations of the motor control method, which are not described herein again. The respective modules in the above-described motor control apparatus may be entirely or partially implemented by software, hardware, and a combination thereof.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method of controlling a motor, the method comprising:
acquiring a unit position angle of a motor running in unit time;
acquiring a historical Hall state corresponding to historical time;
searching a historical position angle corresponding to the historical Hall state;
calculating the difference between the current time and the historical time to obtain the motor running time;
obtaining a current position angle according to the unit position angle, the motor running time and the historical position angle;
when detecting that the hall state of motor changes, acquire the actual hall state after the change, include: when the Hall state of the motor is detected to be changed and the changed Hall state at least corresponds to two different Hall states, acquiring at least three Hall states detected in continuous time and arranging the Hall states into a first Hall state, a second Hall state and a third Hall state according to a time sequence; when the first Hall state is consistent with the third Hall state, extracting the first Hall state as an actual Hall state, and when the first Hall state is inconsistent with the third Hall state, extracting the second Hall state as the actual Hall state; acquiring an actual position angle corresponding to the actual Hall state;
comparing the actual position angle with the current position angle;
when the actual position angle is inconsistent with the current position angle, extracting the actual position angle as the current position angle;
and controlling the motor to operate according to the current position angle.
2. The method of claim 1, wherein said deriving a current position angle from said unit position angle, said motor run time, and said historical position angle comprises:
calculating the product of the unit position angle and the motor running time to obtain a position angle change value;
and adding the historical position angle and the position angle change value to obtain the current position angle.
3. The method of claim 1, wherein the obtaining of the unit position angle of the motor changing per unit time comprises:
acquiring an initial position angle and initial time corresponding to an initial Hall state;
acquiring a target position angle and target time corresponding to a target Hall state;
calculating a time difference between the initial time and the target time and a position angle difference between the initial position angle and the target position angle;
and calculating the ratio of the position angle difference to the time difference, and obtaining the unit position angle changed in unit time according to the ratio.
4. The method of claim 1, wherein the obtaining of the unit position angle of the motor changing per unit time comprises:
acquiring the electric cycle time corresponding to one electric cycle of the motor running at a preset speed;
acquiring the state quantity of Hall states and a Hall position angle corresponding to one Hall state;
calculating the ratio of the electric cycle time to the state quantity to obtain state running time corresponding to one Hall state;
and calculating the ratio of a Hall position angle to the state operation time to obtain a unit position angle of the motor running in unit time.
5. The method according to claim 1, wherein the method for obtaining the historical position angle comprises:
acquiring a corresponding static Hall state of the motor in a static state;
searching a static position angle corresponding to the static Hall state;
acquiring a next Hall state of the static Hall state and a next position angle corresponding to the next Hall state;
and obtaining a starting angle of the motor according to the next position angle and the static position angle, and taking the starting angle as a historical position angle.
6. A motor control apparatus, characterized in that the apparatus comprises:
the position angle acquisition module is used for acquiring a unit position angle of the motor running in unit time;
the state acquisition module is used for acquiring historical Hall states corresponding to historical time;
the position angle searching module is used for searching a historical position angle corresponding to the historical Hall state;
the running time calculation module is used for calculating the difference value between the current time and the historical time to obtain the running time of the motor;
the current angle calculation module is used for obtaining a current position angle according to the unit position angle, the motor running time and the historical position angle;
the actual state acquisition module is used for acquiring the actual Hall state after change when the Hall state of the motor is detected to change, and comprises: when the Hall state of the motor is detected to be changed and the changed Hall state at least corresponds to two different Hall states, acquiring at least three Hall states detected in continuous time and arranging the Hall states into a first Hall state, a second Hall state and a third Hall state according to a time sequence; when the first Hall state is consistent with the third Hall state, extracting the first Hall state as an actual Hall state, and when the first Hall state is inconsistent with the third Hall state, extracting the second Hall state as the actual Hall state;
the actual angle acquisition module is used for acquiring an actual position angle corresponding to an actual Hall state;
the comparison module is used for comparing the actual position angle with the current position angle;
the extraction module is used for extracting the actual position angle as the current position angle when the actual position angle is inconsistent with the current position angle;
and the control module is used for controlling the motor to operate according to the current position angle.
7. The apparatus of claim 6, wherein the current angle calculation module comprises:
the angle change value calculation unit is used for calculating the product of the unit position angle and the motor running time to obtain a position angle change value;
and the adding unit is used for adding the historical position angle and the position angle change value to obtain the current position angle.
8. The apparatus of claim 6, wherein the position angle obtaining module comprises:
the initial time acquisition unit is used for acquiring an initial position angle and initial time corresponding to an initial Hall state;
the target time acquisition unit is used for acquiring a target position angle and target time corresponding to a target Hall state;
an angle difference calculation unit for calculating a time difference between the initial time and the target time, and a position angle difference between the initial position angle and the target position angle;
and the first unit position angle acquisition unit is used for calculating the ratio of the position angle difference to the time difference and obtaining the unit position angle changed in unit time according to the ratio.
9. The device of claim 6, wherein the position and angle acquiring module is configured to acquire an electrical cycle time corresponding to one electrical cycle of the motor running at a preset speed; acquiring the state quantity of Hall states and a Hall position angle corresponding to one Hall state; calculating the ratio of the electric cycle time to the state quantity to obtain state running time corresponding to one Hall state; and calculating the ratio of a Hall position angle to the state operation time to obtain a unit position angle of the motor running in unit time.
10. The apparatus of claim 6, further comprising:
the static state acquisition module is used for acquiring a static Hall state corresponding to the motor in the static state;
the static angle searching module is used for searching a static position angle corresponding to the static Hall state;
the angle acquisition module is used for acquiring the next Hall state of the static Hall state and the next position angle corresponding to the next Hall state;
and the historical position angle extraction module is used for obtaining a starting angle of the motor according to the next position angle and the static position angle and taking the starting angle as a historical position angle.
CN202010661384.7A 2020-07-10 2020-07-10 Motor control method and device Active CN111817616B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010661384.7A CN111817616B (en) 2020-07-10 2020-07-10 Motor control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010661384.7A CN111817616B (en) 2020-07-10 2020-07-10 Motor control method and device

Publications (2)

Publication Number Publication Date
CN111817616A CN111817616A (en) 2020-10-23
CN111817616B true CN111817616B (en) 2022-01-11

Family

ID=72841735

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010661384.7A Active CN111817616B (en) 2020-07-10 2020-07-10 Motor control method and device

Country Status (1)

Country Link
CN (1) CN111817616B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112564043B (en) * 2020-11-30 2023-06-16 深圳市鑫汇科股份有限公司 Pruning machine control method, control device, control equipment and pruning machine
CN114696669A (en) * 2020-12-30 2022-07-01 华润微集成电路(无锡)有限公司 Method for realizing fault processing of Hall position sensor of brushless direct current motor
CN113794414A (en) * 2021-09-01 2021-12-14 深圳市圳远电气有限公司 Permanent magnet synchronous motor Hall signal online correction method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202395717U (en) * 2011-11-07 2012-08-22 无锡迈为电子技术有限公司 Motor controller for vehicle
CN108512478A (en) * 2018-05-29 2018-09-07 北京航空航天大学 Permanent magnet machine rotor Position And Velocity estimating system and method based on three-phase switch type hall position sensor
CN110311609A (en) * 2019-07-18 2019-10-08 广州思智科技有限公司 A kind of DC brushless motor Hall phase sequence discrimination method
CN110380653A (en) * 2019-06-17 2019-10-25 江苏大学 Vector controlled location estimation compensation method based on hall position sensor

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7295907B2 (en) * 2005-06-14 2007-11-13 Trw Automotive U.S. Llc Recovery of calibrated center steering position after loss of battery power
CN102315744B (en) * 2010-07-01 2015-04-29 中山大洋电机制造有限公司 Motor rotor system
CN104079218B (en) * 2014-06-17 2016-07-20 南京航空航天大学 A kind of motor rotor position angle preparation method
CN110474577A (en) * 2019-07-04 2019-11-19 武汉工程大学 A kind of driving device for step-by-step and control method for nucleic acid extraction work station

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN202395717U (en) * 2011-11-07 2012-08-22 无锡迈为电子技术有限公司 Motor controller for vehicle
CN108512478A (en) * 2018-05-29 2018-09-07 北京航空航天大学 Permanent magnet machine rotor Position And Velocity estimating system and method based on three-phase switch type hall position sensor
CN110380653A (en) * 2019-06-17 2019-10-25 江苏大学 Vector controlled location estimation compensation method based on hall position sensor
CN110311609A (en) * 2019-07-18 2019-10-08 广州思智科技有限公司 A kind of DC brushless motor Hall phase sequence discrimination method

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于霍尔传感器的BLDCM控制技术研究与实现;胡守易;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20180715(第7期);正文第23-35页 *
胡守易.基于霍尔传感器的BLDCM控制技术研究与实现.《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》.2018,(第7期), *
霍尔位置传感器无刷直流电机起动控制策略;荀倩 等;《中国测试》;20160831;第42卷(第8期);第118页-122页 *

Also Published As

Publication number Publication date
CN111817616A (en) 2020-10-23

Similar Documents

Publication Publication Date Title
CN111817616B (en) Motor control method and device
US6462491B1 (en) Position sensorless motor control apparatus
US8339076B2 (en) Electric motor drive control apparatus
CN105680742B (en) A kind of brushless direct current motor sensorless rotor-position identifying system and method
JP5324646B2 (en) Control device and control method for rotating electrical machine
US8810169B2 (en) Method and system for estimating rotor angle of an electric machine
US9800192B1 (en) Flux estimator for switched reluctance machines
US6639371B2 (en) Method and system for controlling start of a permanent magnet machine
CN100424980C (en) Apparatus for compensating for speed error of motor
US6373219B1 (en) Motor control system and motor control method
US8339078B2 (en) Apparatus and method for providing information relating to a motor
US10177695B2 (en) Motor control apparatus and control method for motor control apparatus
CN108712127A (en) A kind of method for controlling position-less sensor of switched reluctance motor and device
JP6953763B2 (en) Motor control device
CN104052360A (en) Motor control device
CN112595971B (en) Locked rotor detection method and controller of direct current brush motor based on FFT technology
CN109818537A (en) A kind of position-less sensor of switched reluctance motor starting initial turn-on phase identification method
JP5605312B2 (en) Rotating machine control device
KR100981936B1 (en) Motor driving apparatus
CN113708673B (en) High-speed switch motor driving control method
US7339333B2 (en) Motor drive control apparatus, motor drive control method and program of the same
CN113300655B (en) Error compensation-based switched reluctance motor position sensorless control method
Kim et al. Advanced sensorless drive technique for multiphase BLDC motors
Dimri et al. Design and Simulation of Sensorless Control Algorithms of Brushless DC Motor: A Review
CN1387310A (en) Electric machine driving device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant