Control method of motor, control device of motor, readable storage medium and motor
By using four-quadrant control and dual closed-loop PI/PID control, and utilizing Hall sensors to detect rotor position and operating speed, the input values are automatically switched to control the three-phase inverter bridge. This solves the problem of slow speed update of the brushless DC motor, achieves rapid motoring or braking effect, and improves deceleration and commutation performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING SENCHUANG OPERATION CONTROL TECHNOLOGY CO LTD
- Filing Date
- 2022-12-26
- Publication Date
- 2026-05-05
AI Technical Summary
Existing brushless DC motors use three Hall effect sensors, resulting in slow speed data updates and making it difficult to effectively control the braking process, especially in terms of deceleration and commutation performance.
The four-quadrant control method is adopted. The rotor position and operating speed are detected by Hall sensors. Combined with dual closed-loop PI/PID cascade control of speed and current, the input values are automatically switched to control the chopping direction and duty cycle of the three-phase inverter bridge, so as to realize the rapid motoring or braking of the motor.
It improves the speed response performance of the brushless DC motor, enhances its deceleration, braking and commutation capabilities, and improves the motor's speed regulation performance and control accuracy.
Smart Images

Figure CN115967310B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor technology, and more specifically to a motor control method, a motor control device, a readable storage medium, and a motor. Background Technology
[0002] Currently, in related technologies, commonly used brushless DC motors employ three Hall effect sensors to simultaneously monitor motor speed and rotor position. However, due to the limited number of states in the three Hall effect sensors, the update speed of brushless DC motor speed data is slow, making it difficult to control the motor's braking process. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art or related art.
[0004] Therefore, the first aspect of the present invention proposes a method for controlling an electric motor.
[0005] A second aspect of the present invention provides a control device for an electric motor.
[0006] A third aspect of the present invention provides a control device for an electric motor.
[0007] A fourth aspect of the present invention provides a readable storage medium.
[0008] The fifth aspect of the present invention provides an electric motor.
[0009] In view of the above, a first aspect of the present invention provides a method for controlling a motor, wherein the motor control device includes at least a three-phase inverter bridge, and the method for controlling the motor includes: setting a set speed and a set direction of rotation for the motor; acquiring the rotor position, operating speed, and operating direction of the motor while the motor is running; acquiring a first input value of the set speed and a second input value of the operating speed based on the operating direction, operating speed, set speed, and set direction of rotation of the motor; acquiring a target current based on the first input value and the second input value; acquiring the actual current of the motor; acquiring a first control value based on the target current and the actual current; acquiring the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value; acquiring the energizing phase sequence of the three-phase inverter bridge based on the operating direction; and controlling the motor operation based on the chopping direction, duty cycle, rotor position, and energizing phase sequence of the three-phase inverter bridge.
[0010] In this technical solution, the motor includes at least a Hall sensor, and its control device includes at least a three-phase inverter bridge. The motor control method includes: setting a set speed and a set direction of rotation for the motor; acquiring the rotor position, operating speed, and operating direction of the motor while it is running; acquiring a first input value and a second input value of the set speed based on the operating direction, operating speed, set speed, and set direction of rotation; acquiring a target current based on the first and second input values, thereby adjusting the target current; acquiring the actual current of the motor to collect data on the actual current during motor operation; acquiring a first control value based on the target current and the actual current; acquiring the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value; and controlling the motor operation based on the chopping direction and duty cycle of the three-phase inverter bridge to control the motor's motoring and braking processes; acquiring the energizing phase sequence of the three-phase inverter bridge based on the operating direction, thereby controlling the motor's direction of rotation; and controlling the motor operation based on the chopping direction, duty cycle, rotor position, and energizing phase sequence of the three-phase inverter bridge to achieve motor operation control. This application generates a first control value by automatically switching between the first input value and the second input value based on the direction of operation and the set direction of operation. Then, it controls the chopping direction and duty cycle of the three-phase inverter bridge according to the first control value, thereby quickly realizing the motor's electric or braking effect.
[0011] Specifically, brushless DC (BLDC) motors possess numerous advantages such as good speed regulation performance, small size, high efficiency, long lifespan, and low noise, and are increasingly widely used in various industries. Currently, commonly used brushless DC motors employ three Hall effect sensors simultaneously as a means of monitoring motor speed and rotor position, which effectively reduces motor manufacturing costs. However, due to the limited number of states in the three Hall effect sensors (only 6 state transitions per electrical cycle), the speed data update speed of brushless DC motors is slow, resulting in insufficient speed tracking response capability. This is particularly problematic for controlling the motor's braking process, leading to poor deceleration and commutation performance. This application addresses this issue by implementing four-quadrant control of the brushless DC motor, where the first and third quadrants represent the motor's motoring process, and the second and fourth quadrants represent its braking process. This improved speed response performance and enhanced deceleration, braking, and commutation capabilities of the brushless DC motor through a new control method.
[0012] In addition, the control method in the above-mentioned technical solution provided by the present invention may also have the following additional technical features:
[0013] In one technical solution of the present invention, the motor includes at least a Hall sensor to obtain the rotor position, operating speed and operating direction of the motor, including: obtaining the rotor position, operating speed and operating direction based on the Hall signal detected by the Hall sensor; wherein, when the operating speed is greater than zero, the operating direction is forward rotation, when the operating speed is less than zero, the operating direction is reverse rotation, and when the operating speed is close to zero, the operating direction needs to be determined according to the set direction, that is, the operating direction is forcibly switched to be consistent with the set direction.
[0014] In this technical solution, the motor includes at least a Hall sensor to acquire the motor's rotor position, operating speed, and direction of rotation. This includes acquiring the rotor position, operating speed, and direction of rotation based on the Hall signals detected by the Hall sensor. Since the Hall sensor generates Hall signals during motor operation, the detection of operating speed and direction of rotation based on the Hall sensor signal makes the detection of operating speed and direction of rotation more convenient. Furthermore, an operating speed greater than zero indicates that the motor is rotating in the forward direction, an operating speed less than zero indicates that the motor is rotating in the reverse direction, and when the operating speed is close to zero, the operating direction needs to be determined according to the set direction, i.e., the operating direction is forcibly switched to match the set direction.
[0015] In one technical solution of the present invention, obtaining a first input value of the set speed and a second input value of the running speed based on the running direction, running speed, set speed of the motor and set direction of the motor includes: if the running direction and the set direction are the same, the first input value is the absolute value of the set speed and the second input value is the absolute value of the running speed; if the running direction and the set direction are different, the first input value is the negative value of the absolute value of the set speed and the second input value is the absolute value of the running speed.
[0016] In this technical solution, a first input value for the set speed and a second input value for the running speed are obtained based on the running direction, running speed, and the set speed and direction of the motor. This includes: if the running direction and the set direction are the same, the first input value is the absolute value of the set speed, and the second input value is the absolute value of the running speed. That is, when the directions are the same, the absolute values of the set speed and the running speed are used as input values to obtain the target current of the motor. If the running direction and the set direction are different, the first input value is the negative value of the absolute value of the set speed, and the second input value is the absolute value of the running speed. That is, when the directions are different, the set speed is forced to be negative, meaning the negative value of the absolute value of the set speed is used as the input value, and the absolute value of the running speed is used as the input value, thereby obtaining the target current of the motor.
[0017] In one technical solution of the present invention, obtaining the chopping direction and duty cycle of the three-phase inverter bridge according to the first control value includes: if the first control value is greater than zero, the chopping direction of the three-phase inverter bridge is positive; if the first control value is less than zero, the chopping direction of the three-phase inverter bridge is negative; the absolute value of the first control value represents the output duty cycle of the three-phase inverter bridge.
[0018] In this technical solution, the specific method for obtaining the chopping direction of the three-phase inverter bridge based on the first control value is as follows: when the first control value is greater than zero, the chopping direction of the three-phase inverter bridge is positive, thereby achieving control of the motor's motoring process. When the first control value is less than zero, the chopping direction of the three-phase inverter bridge is negative, thereby achieving control of the braking process.
[0019] In one technical solution of the present invention, obtaining the energizing phase sequence of the three-phase inverter bridge according to the direction of operation includes: if the direction of operation is forward, controlling the three-phase inverter bridge to be energized according to the forward phase sequence; if the direction of operation is reverse, controlling the three-phase inverter bridge to be energized according to the reverse phase sequence.
[0020] In this technical solution, obtaining the energizing phase sequence of the three-phase inverter bridge based on the direction of operation is specifically as follows: When the direction of operation is forward, the three-phase inverter bridge is energized according to the forward rotation phase sequence, thereby enabling the motor to rotate in the forward direction. When the direction of operation is reverse, the three-phase inverter bridge is energized according to the reverse rotation phase sequence, thereby enabling the motor to rotate in the reverse direction. In other words, the motor's direction of operation is controlled by obtaining the energizing phase sequence of the three-phase inverter bridge based on the direction of operation. If the operating speed is close to zero, the operating direction is forcibly switched to match the set direction, thereby achieving motor commutation.
[0021] In one technical solution of the present invention, the first control value simultaneously represents the chopping direction and output duty cycle of the three-phase inverter bridge, the absolute value of the target current is less than or equal to the maximum allowable input current of the motor, and the actual current is the bus current of the motor or the conducting phase current of the three-phase inverter bridge.
[0022] In this technical solution, the first control value simultaneously represents the chopping direction and output duty cycle of the three-phase inverter bridge. Specifically, the absolute value of the first control value represents the output duty cycle of the three-phase inverter bridge, and the sign of the first control value represents the chopping direction, thus outputting a duty cycle signal that can control the output voltage of the three-phase inverter bridge. The absolute value of the target current is less than or equal to the maximum allowable input current of the motor to prevent overcurrent within this range. The actual current is either the motor's bus current or the conducting phase current of the three-phase inverter bridge, thereby improving the accuracy of motor current detection and enhancing the accuracy of motor operating status control.
[0023] Specifically, the control method of this application adopts a dual closed-loop PI (or PID) cascade control structure for the speed and current of the motor. That is, the speed of the brushless DC motor is tracked by the outer loop speed PI (or PID) and a set current value is generated, and the current of the brushless DC motor is tracked by the inner loop current PI (or PID) and a PWM control signal is generated. Then, the motion control of the DC motor is realized through a three-phase inverter bridge.
[0024] Meanwhile, in order to better realize four-quadrant control of brushless DC motors and improve the acceleration, deceleration and forward / reverse reversal characteristics of brushless DC motors, the control method of this application automatically switches the input configuration of the speed PI / PID controller according to the sign relationship between the set speed and the running speed. Then, through the dual closed-loop cascade PI / PID control of the speed loop and the current loop, a PWM duty cycle output that can be positive or negative is generated to control the chopping direction and duty cycle of the three-phase inverter bridge, thereby quickly realizing the motoring or braking effect of the brushless DC motor.
[0025] In the control method of this application, the set rotational speed *r* is used as the reference input value of the speed PI / PID controller, i.e., the first input value. *r* can be a per-unit value or a nominal value, and *r* > 0 indicates forward rotation, while *r* < 0 indicates reverse rotation; that is, the sign of *r* indicates the set direction of rotation. The operating rotational speed *f* is used as the feedback input value of the speed PI / PID controller, i.e., the second input value. *f* can be a per-unit value or a nominal value, and *f* > 0 indicates forward rotation, while *f* < 0 indicates reverse rotation; that is, the sign of *f* indicates the direction of operation. Furthermore, if the operating speed is close to zero, the direction of operation is forcibly switched to match the set direction, i.e., the sign of *f* is made the same as the sign of *r*. Therefore, the control method of this application specifically involves: acquiring the 3 Hall signals inherent in the brushless DC motor; calculating the motor's operating speed *f* based on the update frequency of the 3 Hall signals; determining the motor's direction of rotation based on the switching order of the 6 states of the 3 Hall signals; and configuring speed PI / PID inputs based on the magnitude and sign of *r* and *f*, where the magnitude of *r* is the first input value and the magnitude of *f* is the second input value. If the signs of *r* and *f* are the same, i.e., the operating direction and the set direction are the same, then the absolute values of *r* and *f* are used as the speed PI / PID inputs, i.e., the first input value is the absolute value of the set speed, and the second input value is the absolute value of the operating speed. If the signs of *r* and *f* are opposite, the sign of *r* is forced to be negative and the sign of *f* to be positive, i.e., if the operating direction and the set direction are different, the first input value is the negative value of the absolute value of the set speed, and the second input value is the absolute value of the operating speed, which is also used as the speed PI / PID input. Based on the configured r and f, the speed PI / PID output is calculated and used as the reference input for the current PI / PID, i.e., the target current is obtained based on the first and second input values. The speed PI / PID output can be positive or negative, but its absolute value should be lower than the maximum allowable input current of the motor. The motor current is collected and used as the feedback input for the current PI / PID, i.e., the actual current of the motor is obtained. The current PI / PID output p is calculated based on the reference and feedback inputs, i.e., the first control value is obtained based on the target current and the actual current. The first control value p also represents the three-phase inverter. The chopping direction and output duty cycle of the bridge, p, can be positive or negative, but its absolute value should be lower than the corresponding maximum output duty cycle (100%). The energizing phase sequence of the three-phase inverter bridge is determined according to the sign of f: if f>0, the three-phase inverter bridge is energized in the forward phase sequence; if f<0, the three-phase inverter bridge is energized in the reverse phase sequence. The output duty cycle of the three-phase inverter bridge is determined according to the absolute value of p. The chopping direction of the three-phase inverter bridge is determined according to the sign of p: if p>0, the three-phase inverter bridge performs forward chopping, i.e., controls the motor's motoring process; if p<0, the three-phase inverter bridge performs reverse chopping, i.e., controls the motor's braking process.
[0026] Specifically, a PI / PID controller is a linear controller that uses the control deviation between the given value and the actual output value to form a control quantity by linearly combining the proportional (P), integral (I), and derivative (D) of the deviation, thereby controlling the controlled object. In other words, dual closed-loop PI / PID control of a motor is achieved by using a speed PI / PID controller and a current PI / PID controller.
[0027] Specifically, a PI / PID controller is a common feedback loop component in industrial control applications. This controller compares the collected data with a reference value and then uses the difference to calculate a new input value. The purpose of this new input value is to allow the system data to reach or remain at the reference value. This is achieved by using a speed PI / PID controller and a current PI / PID controller to realize dual closed-loop PI / PID control of the motor.
[0028] A second aspect of the present invention provides a motor control device, comprising a three-phase inverter bridge, a first acquisition unit, a first control unit, a second acquisition unit, a second control unit, and a third acquisition unit. The first acquisition unit acquires the motor's operating speed and direction of rotation while the motor is running; and acquires a first input value for the set speed and a second input value for the operating speed based on the direction of rotation, operating speed, set speed of the motor, and set direction of rotation. The first control unit controls a speed regulator to acquire a target current based on the first and second input values. The second acquisition unit acquires the actual current of the motor; the second control unit controls a current regulator to acquire a first control value based on the target current and the actual current. The third acquisition unit acquires the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value; acquires the energizing phase sequence of the three-phase inverter bridge based on the direction of rotation; and the three-phase inverter bridge controls the motor operation based on the chopping direction, duty cycle, rotor position, and energizing phase sequence.
[0029] In this technical solution, the motor control device includes at least a three-phase inverter bridge. The control device comprises a first acquisition unit, a first control unit, a second acquisition unit, a second control unit, and a third acquisition unit. The first acquisition unit acquires the motor's operating speed and direction of rotation while the motor is running, thereby detecting the current operating speed and direction of rotation. Based on the direction of rotation, operating speed, and the set speed and direction of rotation of the motor, it acquires a first input value for the set speed and a second input value for the operating speed, thereby adjusting the target current of the motor. The first control unit is a speed PI controller or PID controller, used to control the speed regulator to acquire the target current based on the first and second input values, thereby adjusting the target current. The second control unit controls the current regulator to acquire a first control value based on the target current and the actual current; the second control unit is a current PI controller or PID controller. The third acquisition unit acquires the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value, thereby controlling the operation of the motor according to the chopping direction and duty cycle of the three-phase inverter bridge, to control the motor's motoring and braking processes. The energizing phase sequence of the three-phase inverter bridge is obtained based on the direction of operation, thereby achieving motor operation control. This application automatically switches between the first and second input values based on the direction of operation and the set direction of operation to generate a first control value. Then, the chopping direction and duty cycle of the three-phase inverter bridge are controlled according to the first control value, thereby quickly achieving the motor's motoring or braking effect.
[0030] Specifically, based on the sign relationship between the set speed and the operating speed, the input configuration of the speed PI / PID controller is automatically switched. Then, through the dual closed-loop cascade PI / PID control of the speed loop and the current loop, a PWM duty cycle output that can be positive or negative is generated to control the chopping direction and duty cycle of the three-phase inverter bridge, thereby quickly realizing the motoring or braking effect of the brushless DC motor.
[0031] A third aspect of the present invention provides a motor control device, including a memory and a processor. The memory stores a program or instructions that can be executed on the processor. When the program or instructions are executed by the processor, they implement the steps of the motor control method in any of the above-described technical solutions. Therefore, the motor control device has all the beneficial effects of the motor control method, which will not be elaborated here.
[0032] A fourth aspect of the present invention provides a readable storage medium having a program or instructions stored thereon. When the program or instructions are executed by a processor, they implement the steps of the motor control method in any of the above-described technical solutions. Therefore, the readable storage medium possesses all the beneficial effects of the motor control method, which will not be elaborated further here.
[0033] The fifth aspect of the present invention provides an electric motor, including the motor control device of any of the above-described technical solutions or the readable storage medium of the above-described technical solutions. Therefore, the electric motor has all the beneficial effects of the motor control device or the readable storage medium, which will not be repeated here.
[0034] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0035] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0036] Figure 1 One of the flowcharts of a motor control method according to an embodiment of the present invention is shown;
[0037] Figure 2 A second flowchart of a motor control method according to an embodiment of the present invention is shown;
[0038] Figure 3 A control block diagram of a motor according to an embodiment of the present invention is shown;
[0039] Figure 4 A flowchart of a motor control method according to an embodiment of the present invention is shown as Flowchart 3. Detailed Implementation
[0040] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0041] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0042] The following reference Figures 1 to 4 This invention describes a method for controlling an electric motor, a control device for an electric motor, a readable storage medium, and an electric motor according to some embodiments of the present invention.
[0043] The first aspect of the present invention provides a method for controlling a motor, wherein the motor control device includes at least a three-phase inverter bridge, such as... Figure 1 As shown, the motor control method includes:
[0044] S100, sets the motor's set speed and direction of rotation;
[0045] S102, while the motor is running, acquire the rotor position, operating speed and direction of operation of the motor;
[0046] S104, obtain the first input value of the set speed and the second input value of the running speed based on the running direction, running speed, set speed of the motor and set direction of the motor;
[0047] S106, Obtain the target current based on the first input value and the second input value;
[0048] S108, obtain the actual current of the motor;
[0049] S110, obtain the first control value based on the target current and the actual current;
[0050] S112, Obtain the chopping direction and duty cycle of the three-phase inverter bridge according to the first control value;
[0051] S114, obtain the energizing phase sequence of the three-phase inverter bridge according to the direction of operation;
[0052] S116, the three-phase inverter bridge controls the motor operation according to the chopping direction, duty cycle, rotor position and energizing phase sequence.
[0053] In this embodiment, the motor control device includes at least a three-phase inverter bridge. The motor control method includes: setting a set speed and a set direction of rotation for the motor; acquiring the rotor position, operating speed, and direction of rotation of the motor while it is running, thereby detecting the current operating speed and direction of rotation of the motor; acquiring a first input value and a second input value of the set speed based on the direction of rotation, operating speed, set speed, and set direction of rotation of the motor; acquiring a target current based on the first and second input values, thereby adjusting the target current; acquiring the actual current of the motor to collect the actual current during motor operation; acquiring a first control value based on the target current and the actual current; acquiring the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value; thereby controlling the operation of the motor based on the chopping direction and duty cycle of the three-phase inverter bridge to control the motor's motoring and braking processes; acquiring the energizing phase sequence of the three-phase inverter bridge based on the direction of rotation, thereby controlling the direction of rotation of the motor; and controlling the motor operation based on the chopping direction, duty cycle, rotor position, and energizing phase sequence of the three-phase inverter bridge to achieve motor operation control. This application generates a first control value by automatically switching between the first input value and the second input value based on the direction of operation and the set direction of operation. Then, it controls the chopping direction and duty cycle of the three-phase inverter bridge according to the first control value, thereby quickly realizing the motor's electric or braking effect.
[0054] Specifically, the motor is a DC brushless motor.
[0055] Specifically, brushless DC (BLDC) motors possess numerous advantages such as good speed regulation performance, small size, high efficiency, long lifespan, and low noise, and are increasingly widely used in various industries. Currently, commonly used brushless DC motors employ three Hall effect sensors simultaneously as a means of monitoring motor speed and rotor position, which effectively reduces motor manufacturing costs. However, due to the limited number of states in the three Hall effect sensors (only 6 state transitions per electrical cycle), the speed data update speed of brushless DC motors is slow, resulting in insufficient speed tracking response capability. This is particularly problematic for controlling the motor's braking process, leading to poor deceleration and commutation performance. This application addresses this issue by implementing four-quadrant control of the brushless DC motor, where the first and third quadrants represent the motor's motoring process, and the second and fourth quadrants represent its braking process. This improved speed response performance and enhanced deceleration, braking, and commutation capabilities of the brushless DC motor through a new control method.
[0056] This embodiment provides a method for controlling a motor, wherein the motor includes at least a Hall sensor, such as... Figure 2 As shown, the motor control method also includes:
[0057] S200, sets the motor's set speed and direction of rotation;
[0058] S202, when the motor is running, obtains the rotor position, running speed and running direction based on the Hall signal detected by the Hall sensor;
[0059] S204, obtain the first input value of the set speed and the second input value of the running speed based on the running direction, running speed, set speed of the motor and set direction of the motor;
[0060] S206, Obtain the target current based on the first input value and the second input value;
[0061] S208, obtain the actual current of the motor;
[0062] S210, obtain the first control value based on the target current and the actual current;
[0063] S212, obtain the chopping direction and duty cycle of the three-phase inverter bridge according to the first control value;
[0064] S214, Obtain the energizing phase sequence of the three-phase inverter bridge according to the direction of operation;
[0065] S216, the three-phase inverter bridge controls the motor operation based on the chopping direction, duty cycle, rotor position and energizing phase sequence.
[0066] In this embodiment, the motor includes at least a Hall sensor to acquire the motor's rotor position, operating speed, and direction of rotation. This includes acquiring the rotor position, operating speed, and direction of rotation based on the Hall signals detected by the Hall sensor. Since the Hall sensor generates Hall signals during motor operation, the detection of operating speed and direction of rotation based on the Hall sensor signal makes the detection of these parameters more convenient. Furthermore, an operating speed greater than zero indicates that the motor is rotating in the forward direction, an operating speed less than zero indicates that the motor is rotating in the reverse direction, and when the operating speed is close to zero, the operating direction needs to be determined according to a set direction, i.e., the operating direction is forcibly switched to match the set direction.
[0067] Specifically, there are three Hall sensors.
[0068] Specifically, the three Hall signals of the brushless DC motor are collected, the motor speed is calculated based on the update frequency of the three Hall signals, and the direction of motor operation is determined based on the switching order of the six states of the three Hall signals.
[0069] This embodiment provides a motor control method, which obtains a first input value of the set speed and a second input value of the running speed based on the running direction, running speed, set speed of the motor and set direction of the motor, including: if the running direction and the set direction are the same, the first input value is the absolute value of the set speed and the second input value is the absolute value of the running speed; if the running direction and the set direction are different, the first input value is the negative value of the absolute value of the set speed and the second input value is the absolute value of the running speed.
[0070] In this embodiment, obtaining a first input value for the set speed and a second input value for the running speed based on the running direction, running speed, and the set speed and direction of the motor includes: if the running direction and the set direction are the same, the first input value is the absolute value of the set speed, and the second input value is the absolute value of the running speed. That is, when the directions are the same, the absolute values of the set speed and the running speed are used as input values to obtain the target current of the motor. If the running direction and the set direction are different, the first input value is the negative value of the absolute value of the set speed, and the second input value is the absolute value of the running speed. That is, when the directions are different, the set speed is forced to be negative, that is, the negative value of the absolute value of the set speed is used as the input value, and the absolute value of the running speed is used as the input value, thereby obtaining the target current of the motor.
[0071] This embodiment provides a motor control method, which obtains the chopping direction and duty cycle of a three-phase inverter bridge according to a first control value, including: if the first control value is greater than zero, the chopping direction of the three-phase inverter bridge is positive; if the first control value is less than zero, the chopping direction of the three-phase inverter bridge is negative; the absolute value of the first control value represents the output duty cycle of the three-phase inverter bridge.
[0072] In this embodiment, the chopping direction of the three-phase inverter bridge is obtained based on the first control value as follows: when the first control value is greater than zero, the chopping direction of the three-phase inverter bridge is positive, thereby controlling the motor's motoring process. When the first control value is less than zero, the chopping direction of the three-phase inverter bridge is negative, thereby controlling the braking process.
[0073] This embodiment provides a motor control method that obtains the energizing phase sequence of the three-phase inverter bridge according to the direction of operation, including: if the direction of operation is set to forward, controlling the three-phase inverter bridge to be energized according to the forward phase sequence; if the direction of operation is set to reverse, controlling the three-phase inverter bridge to be energized according to the reverse phase sequence.
[0074] In this embodiment, obtaining the energizing phase sequence of the three-phase inverter bridge based on the direction of operation specifically involves controlling the three-phase inverter bridge to be energized according to the forward rotation phase sequence when the direction of operation is set to forward, thereby enabling the motor to rotate in the forward direction. When the direction of operation is set to reverse, the three-phase inverter bridge to be energized according to the reverse rotation phase sequence, thereby enabling the motor to rotate in the reverse direction. In other words, obtaining the energizing phase sequence of the three-phase inverter bridge based on the direction of operation enables control of the motor's direction of operation.
[0075] This embodiment provides a motor control method. The first control value simultaneously represents the chopping direction and output duty cycle of the three-phase inverter bridge. The absolute value of the target current is less than or equal to the maximum allowable input current of the motor. The actual current is the bus current of the motor or the conducting phase current of the three-phase inverter bridge.
[0076] In this embodiment, the first control value simultaneously represents the chopping direction and output duty cycle of the three-phase inverter bridge. Specifically, the absolute value of the first control value represents the output duty cycle of the three-phase inverter bridge, and the sign of the first control value represents the chopping direction, thus outputting a duty cycle signal that can control the output voltage of the three-phase inverter bridge. The absolute value of the target current is less than or equal to the maximum allowable input current of the motor to prevent overcurrent within this range. The actual current is either the motor's bus current or the conducting phase current of the three-phase inverter bridge, thereby improving the accuracy of motor current detection and enhancing the accuracy of motor operating state control.
[0077] Specifically, the actual current is collected from the bus current of the motor, and the positive direction of the current is specified.
[0078] Specifically, the actual current is collected from the conducting phase current of the three-phase inverter bridge, and the positive direction of the current is specified.
[0079] Specifically, the control method of this application adopts a dual closed-loop PI (or PID) cascade control structure for the speed and current of the motor. That is, the speed of the brushless DC motor is tracked by the outer loop speed PI (or PID) and a set current value is generated, and the current of the brushless DC motor is tracked by the inner loop current PI (or PID) and a PWM control signal is generated. Then, the motion control of the DC motor is realized through a three-phase inverter bridge.
[0080] Meanwhile, in order to better realize four-quadrant control of brushless DC motors and improve the acceleration, deceleration and forward / reverse reversal characteristics of brushless DC motors, the control method of this application automatically switches the input configuration of the speed PI / PID controller according to the sign relationship between the set speed and the running speed. Then, through the dual closed-loop cascade PI / PID control of the speed loop and the current loop, a PWM duty cycle output that can be positive or negative is generated to control the chopping direction and duty cycle of the three-phase inverter bridge, thereby quickly realizing the motoring or braking effect of the brushless DC motor.
[0081] In the control method of this application, such as Figure 3 and Figure 4As shown, the set rotational speed *r* is used as the reference input value (first input value) of the speed PI / PID controller. *r* can be either a per-unit value or a nominal value. *r* > 0 indicates forward rotation, and *r* < 0 indicates reverse rotation; the sign of *r* indicates the set direction of rotation. The operating rotational speed *f* is used as the feedback input value (second input value) of the speed PI / PID controller. *f* can be either a per-unit value or a nominal value. *f* > 0 indicates forward rotation, and *f* < 0 indicates reverse rotation; the sign of *f* indicates the direction of operation. Furthermore, if the operating speed is close to zero, the operating direction is forcibly switched to match the set direction, meaning the sign of *f* is the same as the sign of *r*. Therefore, the control method of this application is specifically as shown in the table below: The 3 Hall signals from the brushless DC motor are acquired; the motor operating speed *f* is calculated based on the update frequency of the 3 Hall signals; the motor direction is determined based on the switching order of the 6 states of the 3 Hall signals; and the speed PI / PID input is configured based on the magnitude and sign of *r* and *f*, where the magnitude of *r* is the first input value and the magnitude of *f* is the second input value. If the signs of *r* and *f* are the same, i.e., the operating direction is the same as the set direction, the absolute values of *r* and *f* are used as the speed PI / PID input, i.e., the first input value is the absolute value of the set speed, and the second input value is the absolute value of the operating speed. If the signs of *r* and *f* are opposite, the sign of *r* is forced to be negative and the sign of *f* to be positive, i.e., if the operating direction is different from the set direction, the first input value is the negative value of the absolute value of the set speed as the speed PI / PID input, and the second input value is the absolute value of the operating speed as the speed PI / PID input. Based on the configured r and f, the speed PI / PID output is calculated and used as the reference input for the current PI / PID, i.e., the target current is obtained based on the first and second input values. The speed PI / PID output can be positive or negative, but its absolute value should be lower than the maximum allowable input current of the motor. The motor current is collected and used as the feedback input for the current PI / PID, i.e., the actual current of the motor is obtained. The current PI / PID output p is calculated based on the reference and feedback inputs, i.e., the first control value is obtained based on the target current and the actual current. The first control value p also represents the three-phase inverter. The chopping direction and output duty cycle of the bridge, p, can be positive or negative, but its absolute value should be lower than the corresponding maximum output duty cycle (100%). The energizing phase sequence of the three-phase inverter bridge is determined according to the sign of f: if f>0, the three-phase inverter bridge is energized in the forward phase sequence; if f<0, the three-phase inverter bridge is energized in the reverse phase sequence. The output duty cycle of the three-phase inverter bridge is determined according to the absolute value of p. The chopping direction of the three-phase inverter bridge is determined according to the sign of p: if p>0, the three-phase inverter bridge performs forward chopping, i.e., controls the motor's motoring process; if p<0, the three-phase inverter bridge performs reverse chopping, i.e., controls the motor's braking process.
[0082]
[0083] In the table above, "||" indicates taking the absolute value.
[0084] Specifically, a PI / PID controller is a linear controller that uses the control deviation between the given value and the actual output value to form a control quantity by linearly combining the proportional (P), integral (I), and derivative (D) of the deviation, thereby controlling the controlled object. In other words, dual closed-loop PI / PID control of a motor is achieved by using a speed PI / PID controller and a current PI / PID controller.
[0085] Specifically, a PI / PID controller is a common feedback loop component in industrial control applications. This controller compares the collected data with a reference value and then uses the difference to calculate a new input value. The purpose of this new input value is to allow the system data to reach or remain at the reference value. This is achieved by using a speed PI / PID controller and a current PI / PID controller to realize dual closed-loop PI / PID control of the motor.
[0086] A second aspect of the present invention provides a motor control device, comprising a three-phase inverter bridge, a first acquisition unit, a first control unit, a second acquisition unit, a second control unit, and a third acquisition unit. The first acquisition unit acquires the rotor position, operating speed, and direction of rotation of the motor while it is running; and acquires a first input value for the set speed and a second input value for the operating speed based on the direction of rotation, operating speed, set speed of the motor, and set direction of rotation. The first control unit controls a speed regulator to acquire a target current based on the first and second input values. The second acquisition unit acquires the actual current of the motor; the second control unit controls a current regulator to acquire a first control value based on the target current and the actual current. The third acquisition unit acquires the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value; acquires the energizing phase sequence of the three-phase inverter bridge based on the direction of rotation; and the three-phase inverter bridge controls the motor operation based on the chopping direction, duty cycle, rotor position, and energizing phase sequence.
[0087] In this embodiment, the motor control device includes at least a three-phase inverter bridge. The control device comprises a first acquisition unit, a first control unit, a second acquisition unit, a second control unit, and a third acquisition unit. The first acquisition unit acquires the motor's rotor position, operating speed, and direction of rotation while the motor is running, thereby detecting the motor's current operating speed and direction of rotation. Based on the direction of rotation, operating speed, and the motor's set speed and direction of rotation, it acquires a first input value for the set speed and a second input value for the operating speed, thereby adjusting the motor's target current. The first control unit is a speed PI controller or a PID controller, used to control the speed regulator to acquire the target current based on the first and second input values, thereby adjusting the target current. The second control unit controls the current regulator to acquire a first control value based on the target current and the actual current; the second control unit is a current PI controller or a PID controller. The third acquisition unit acquires the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value, thereby controlling the motor's operation based on the chopping direction and duty cycle of the three-phase inverter bridge, to control the motor's motoring and braking processes. The energizing phase sequence of the three-phase inverter bridge is obtained based on the direction of operation, thereby achieving motor operation control. This application automatically switches between the first and second input values based on the direction of operation and the set direction of operation to generate a first control value. Then, the chopping direction and duty cycle of the three-phase inverter bridge are controlled according to the first control value, thereby quickly achieving the motor's motoring or braking effect.
[0088] Specifically, based on the sign relationship between the set speed and the operating speed, the input configuration of the speed PI / PID controller is automatically switched. Then, through the dual closed-loop cascade PI / PID control of the speed loop and the current loop, a PWM duty cycle output that can be positive or negative is generated to control the chopping direction and duty cycle of the three-phase inverter bridge, thereby quickly realizing the motoring or braking effect of the brushless DC motor.
[0089] In one embodiment of this application, a motor control device is provided, including a memory and a processor. The memory stores programs or instructions that can run on the processor. When the program or instructions are executed by the processor, they implement the steps of the motor control method in the above embodiment. Therefore, the motor control device has all the beneficial effects of the motor control method, which will not be repeated here.
[0090] In one embodiment of this application, a readable storage medium is provided, on which a program or instructions are stored. When the program or instructions are executed by a processor, they implement the steps of the motor control method in the above embodiment. Therefore, the readable storage medium has all the beneficial effects of the motor control method, which will not be repeated here.
[0091] In one embodiment of this application, an electric motor is provided, which includes the motor control device of the above embodiments or the readable storage medium of the above embodiments. Therefore, the motor has all the beneficial effects of the motor control device or the readable storage medium, which will not be repeated here.
[0092] In the claims, description, and accompanying drawings of this invention, the term "plural" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing the invention and simplifying the descriptive process, and are not intended to indicate or imply that the device or element referred to must have the described specific orientation, or be constructed and operated in a specific orientation. Therefore, these descriptions should not be construed as limiting the invention. The terms "connected," "installed," "fixed," etc., should be interpreted broadly. For example, "connected" can be a fixed connection between multiple objects, a detachable connection between multiple objects, or an integral connection; it can be a direct connection between multiple objects or an indirect connection between multiple objects through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood based on the specific circumstances of the above data.
[0093] In the claims, description, and accompanying drawings of this invention, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the invention. In the claims, description, and accompanying drawings of this invention, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0094] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for controlling an electric motor, used for an electric motor, wherein the control device for the electric motor includes at least a three-phase inverter bridge, characterized in that, The control method for the motor includes: Given the set speed and set direction of the motor; While the motor is running, obtain the rotor position, operating speed, and direction of rotation of the motor; The first input value of the set speed and the second input value of the running speed are obtained based on the running direction, the running speed, the set speed of the motor and the set direction of the motor; The target current is obtained based on the first input value and the second input value; Obtain the actual current of the motor; A first control value is obtained based on the target current and the actual current; The chopping direction and duty cycle of the three-phase inverter bridge are obtained based on the first control value; The energizing phase sequence of the three-phase inverter bridge is obtained based on the stated operating direction; The three-phase inverter bridge controls the motor operation according to the chopping direction, duty cycle, rotor position, and energizing phase sequence. The motor includes at least a Hall sensor to acquire the rotor position, operating speed, and direction of rotation of the motor, including: The rotor position, the operating speed, and the operating direction are obtained based on the Hall signal detected by the Hall sensor; Wherein, when the operating speed is greater than zero, the operating direction is forward rotation; when the operating speed is less than zero, the operating direction is reverse rotation; when the operating speed is close to zero, the operating direction needs to be determined according to the set direction, that is, the operating direction is forcibly switched to be consistent with the set direction. The process of obtaining a first input value for the set speed and a second input value for the running speed based on the running direction, the running speed, the set speed of the motor, and the set direction of the motor includes: If the running direction is the same as the set direction, the first input value is the absolute value of the set speed, and the second input value is the absolute value of the running speed. If the running direction is different from the set direction, the first input value is the negative of the absolute value of the set speed, and the second input value is the absolute value of the running speed. The motor includes a DC brushless motor.
2. The motor control method according to claim 1, characterized in that, The chopping direction and duty cycle of the three-phase inverter bridge are obtained based on the first control value, including: If the first control value is greater than zero, the chopping direction of the three-phase inverter bridge is positive; If the first control value is less than zero, the chopping direction of the three-phase inverter bridge is reversed.
3. The motor control method according to claim 2, characterized in that, Obtaining the energizing phase sequence of the three-phase inverter bridge based on the stated operating direction includes: If the operating direction is forward, control the three-phase inverter bridge to be energized in the forward phase sequence; If the operation direction is reversed, control the three-phase inverter bridge to be energized in reverse phase sequence.
4. The motor control method according to any one of claims 1 to 3, characterized in that, The first control value simultaneously represents the chopping direction and output duty cycle of the three-phase inverter bridge, the absolute value of the target current is less than or equal to the maximum allowable input current of the motor, and the actual current is the bus current of the motor or the conducting phase current of the three-phase inverter bridge.
5. A control device for an electric motor, characterized in that, The control device includes: Three-phase inverter bridge; The first acquisition unit is configured to acquire the rotor position, operating speed, and operating direction of the motor when the motor is running; and to acquire a first input value of the set speed and a second input value of the operating speed based on the operating direction, the operating speed, the set speed of the motor, and the set direction of the motor. The first control unit is used to control the speed regulator to obtain the target current based on the first input value and the second input value; The second acquisition unit is used to acquire the actual current of the motor; The second control unit is used to control the current regulator to obtain a first control value based on the target current and the actual current. The third acquisition unit acquires the chopping direction and duty cycle of the three-phase inverter bridge based on the first control value; and acquires the energizing phase sequence of the three-phase inverter bridge based on the operating direction. The three-phase inverter bridge controls the motor operation according to the chopping direction, duty cycle, rotor position, and energizing phase sequence. The motor includes at least a Hall sensor, and the first acquisition unit is specifically used for: The rotor position, the operating speed, and the operating direction are obtained based on the Hall signal detected by the Hall sensor; Wherein, when the operating speed is greater than zero, the operating direction is forward rotation; when the operating speed is less than zero, the operating direction is reverse rotation; when the operating speed is close to zero, the operating direction needs to be determined according to the set direction, that is, the operating direction is forcibly switched to be consistent with the set direction. The first acquisition unit is further configured to: If the running direction is the same as the set direction, the first input value is the absolute value of the set speed, and the second input value is the absolute value of the running speed. If the running direction is different from the set direction, the first input value is the negative of the absolute value of the set speed, and the second input value is the absolute value of the running speed. The motor includes a DC brushless motor.
6. A control device for an electric motor, characterized in that, It includes a memory and a processor, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the motor control method as described in any one of claims 1 to 4.
7. A readable storage medium having a program or instructions stored thereon, characterized in that, When the program or the instructions are executed by the processor, they implement the steps of the motor control method as described in any one of claims 1 to 4.
8. An electric motor, characterized in that, include: The motor control device as described in claim 5; or The motor control device as described in claim 6; or The readable storage medium as described in claim 7.
Citation Information
Patent Citations
PWM control method for four-quadrant operation of brushless direct current motor
CN106452229A
Motor drive device
CN111512541A