Motor speed regulation control method and device, vehicle, electronic equipment and storage medium

By using a fuzzy speed regulation control algorithm in DC motors, the problems of large overshoot and poor load adaptability in the speed regulation control of PID controllers are solved, and a faster and more stable speed regulation effect is achieved.

CN119727475APending Publication Date: 2025-03-28BYD CO LTD

Patent Information

Application Number
CN202311282182.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-28
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

In the speed control of existing DC motors, the PID controller has problems such as large overshoot, poor load adaptability, poor anti-interference ability and poor robustness.

Method used

The fuzzy speed regulation control algorithm is used to obtain the speed deviation and the speed deviation change rate, and determine the duty cycle of the pulse width modulation signal of the DC motor, and control the speed of the DC motor according to the duty cycle.

Benefits of technology

It achieves the target speed quickly and smoothly and stabilizes at the target speed, with faster response speed, smaller overshoot, stronger load adaptability, and strong stability and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119727475A_ABST
    Figure CN119727475A_ABST
Patent Text Reader

Abstract

The invention discloses a motor speed regulation control method, a motor speed regulation control device, a vehicle, electronic equipment and a computer readable storage medium. The motor speed regulation control method comprises the following steps: acquiring a rotating speed deviation and a rotating speed deviation change rate, wherein the rotating speed deviation and the rotating speed deviation change rate are determined according to an actual rotating speed and a target rotating speed of a direct current motor; determining the duty ratio of a pulse width modulation signal of the direct current motor according to the rotating speed deviation, the rotating speed deviation change rate and a fuzzy speed regulation control algorithm; and controlling the rotating speed of the DC motor according to the duty ratio. According to the motor speed regulation control method, based on the fuzzy speed regulation control algorithm, the target rotating speed can be quickly and smoothly reached and stabilized at the target rotating speed, the response speed is higher, the overshoot is small, the load adaptive capacity is higher, and the stability and the accuracy are higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor speed control, and more specifically, to a motor speed control method, a motor speed control device, a vehicle, an electronic device and a computer-readable storage medium. Background Art

[0002] In the related art, a DC motor uses a PID controller for speed regulation. The PID controller has the disadvantages of large overshoot, poor load adaptability, weak anti-interference ability and poor robustness. Summary of the invention

[0003] Embodiments of the present invention provide a motor speed control method, a motor speed control device, a vehicle, an electronic device, and a computer-readable storage medium.

[0004] An embodiment of the present invention provides a motor speed control method for a DC motor, the motor speed control method comprising: obtaining a speed deviation and a speed deviation change rate, wherein the speed deviation and the speed deviation change rate are determined according to an actual speed of the DC motor and a target speed of the DC motor; determining a duty cycle of a pulse width modulation signal of the DC motor according to the speed deviation, the speed deviation change rate and a fuzzy speed control algorithm; and controlling the speed of the DC motor according to the duty cycle.

[0005] In this way, the fuzzy speed control algorithm can achieve the target speed quickly and smoothly and stabilize at the target speed, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0006] In some embodiments, the DC motor includes a Hall sensor, and the actual rotation speed is determined based on the time difference between two adjacent rising edges of the Hall sensor signal.

[0007] In this way, the period of the Hall signal can be determined based on the time difference between the rising edges of two adjacent signals of the Hall sensor, thereby determining the actual speed.

[0008] In certain embodiments, the speed deviation includes a current speed deviation and a previous speed deviation, wherein the current speed deviation is the difference between the current target speed and the current actual speed, and the previous speed deviation is the difference between the previous target speed and the previous actual speed. The speed deviation change rate includes a current speed deviation change rate, and the current speed deviation change rate is based on the difference between the current speed deviation and the previous speed deviation.

[0009] In this way, determining the previous speed deviation and the current speed deviation can determine the current speed deviation change rate, based on the speed deviation can determine the relationship between the actual speed and the target speed, based on the speed deviation change rate can determine the speed deviation change over time.

[0010] In some embodiments, the duty cycle is obtained by defuzzifying a fuzzy output value, the fuzzy output value is determined based on a fuzzy speed deviation and a fuzzy speed deviation change rate, the fuzzy speed deviation is obtained by fuzzifying the speed deviation, and the fuzzy speed deviation change rate is obtained by fuzzifying the speed deviation change rate.

[0011] In this way, the speed deviation and the speed deviation change rate are fuzzified to obtain the fuzzy speed deviation and the fuzzy speed deviation change rate, and then the fuzzy output value is determined, and the fuzzy output value is defuzzified to obtain the duty cycle, and the speed of the DC motor is controlled according to the duty cycle, thereby realizing the speed control of the DC motor through the fuzzy control speed regulation algorithm.

[0012] In some embodiments, when the fuzzy rotational speed deviation is positive, the fuzzy output value is positive; and when the fuzzy rotational speed deviation is negative, the fuzzy output value is negative.

[0013] In this way, by setting the fuzzy control rules, the fuzzy output value can be determined according to the fuzzy speed deviation and the fuzzy speed deviation change rate, so as to realize the speed control of the DC motor through the fuzzy control speed regulation algorithm.

[0014] In some embodiments, the rotation speed of the DC motor is determined according to the voltage of the DC motor, the DC motor is connected to a power switch tube, the voltage of the DC motor is determined according to the conduction or disconnection of the power switch tube, and the conduction or disconnection of the power switch tube is determined according to the duty cycle.

[0015] In this way, the duty cycle is used to control the conduction or disconnection of the power switch tube to control the voltage across the DC motor, thereby controlling the speed of the DC motor to achieve speed control of the DC motor.

[0016] An embodiment of the present invention provides a motor speed control device for a DC motor, the motor speed control device comprising: an acquisition module, a determination module and a control module, the acquisition module being used to acquire a speed deviation and a speed deviation change rate, the speed deviation and the speed deviation change rate being determined based on an actual speed of the DC motor and a target speed of the DC motor; the determination module being used to determine a duty cycle of a pulse width modulation signal of the DC motor based on the speed deviation, the speed deviation change rate and a fuzzy speed control algorithm; and the control module being used to control the speed of the DC motor based on the duty cycle.

[0017] In this way, the motor speed control device can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0018] An embodiment of the present invention provides an electronic device, which includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the motor speed control method of any of the above embodiments are implemented.

[0019] In this way, the electronic device can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0020] An embodiment of the present invention provides a vehicle, wherein the vehicle includes the motor speed control device of the above embodiment or the electronic device of the above embodiment.

[0021] In this way, the vehicle can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0022] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the steps of the motor speed control method of any of the above embodiments are implemented.

[0023] In this way, the computer-readable storage medium can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0024] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0026] Figure 1 1 is a flow chart of a motor speed control method according to an embodiment of the present invention;

[0027] Figure 2 is a schematic diagram of a motor speed control device according to an embodiment of the present invention;

[0028] Figure 3 is a schematic diagram of a membership function corresponding to a rotation speed deviation according to an embodiment of the present invention;

[0029] Figure 4 is a schematic diagram of a membership function corresponding to a rotation speed deviation change rate according to an embodiment of the present invention;

[0030] Figure 5 is a schematic diagram of a membership function corresponding to a duty cycle according to an embodiment of the present invention;

[0031] Figure 6 is a schematic diagram of a fuzzy controller according to an embodiment of the present invention;

[0032] Figure 7 is a schematic diagram of fuzzy control rules according to an embodiment of the present invention;

[0033] Figure 8 is a waveform diagram of a PWM signal according to an embodiment of the present invention;

[0034] Fig. 9 is a schematic diagram of the implementation process of the motor speed control method according to the embodiment of the present invention;

[0035] Fig.10 is a curve schematic diagram of the actual speed of the motor in the first scenario according to an embodiment of the present invention;

[0036] Fig.11 is a curve diagram of a motor duty cycle in a first scenario according to an embodiment of the present invention;

[0037] Fig.12 is a curve schematic diagram of the actual speed of the motor in the second scenario according to an embodiment of the present invention;

[0038] Fig.13 is a curve diagram of the duty cycle of the motor in the second scenario according to an embodiment of the present invention;

[0039] Fig.14 is a curve schematic diagram of the actual speed of the motor in the third scenario according to an embodiment of the present invention;

[0040] Fig.15 is a curve schematic diagram of the motor duty cycle in the third scenario according to an embodiment of the present invention;

[0041] Fig.16 is a curve schematic diagram of the actual speed of the motor in the fourth scenario according to an embodiment of the present invention;

[0042] Fig.17 is a curve diagram of a motor duty cycle in a fourth scenario according to an embodiment of the present invention;

[0043] Fig.18is a curve schematic diagram of the actual speed of the motor in the fifth scenario according to an embodiment of the present invention;

[0044] Fig.19 is a curve diagram of the duty cycle of the motor in the fifth scenario according to an embodiment of the present invention;

[0045] Fig. 20 is a curve schematic diagram of the actual speed of the motor in the sixth scenario according to an embodiment of the present invention;

[0046] Fig.21 It is a curve diagram of the motor duty cycle in the sixth scenario according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The embodiments of the present invention are described in detail below, and the embodiments of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0048] In the related art, a DC motor uses a PID controller for speed regulation. The PID controller has the disadvantages of large overshoot, poor load adaptability, weak anti-interference ability and poor robustness.

[0049] See also Figure 1 The embodiment of the present invention provides a motor speed control method for a DC motor, the motor speed control method comprising:

[0050] 01: Get the speed deviation and speed deviation change rate. The speed deviation and speed deviation change rate are determined according to the actual speed of the DC motor and the target speed of the DC motor.

[0051] 02: Determine the duty cycle of the pulse width modulation signal of the DC motor according to the speed deviation, speed deviation change rate and fuzzy speed control algorithm;

[0052] 03: Control the speed of the DC motor according to the duty cycle;

[0053] Specifically, see Figure 2The motor speed control method of the embodiment of the present invention can be implemented by the motor speed control device 100 of the embodiment of the present invention. The motor speed control device 100 includes an acquisition module 10, a determination module 20 and a control module 30, wherein step 01 can be implemented by the acquisition module 10 of the motor speed control device 100, step 02 can be implemented by the determination module 20 of the motor speed control device 100, and step 03 can be implemented by the control module 30 of the motor speed control device 100, that is, the acquisition module 10 can be used to obtain the speed deviation and the speed deviation change rate, and the speed deviation and the speed deviation change rate are determined according to the actual speed of the DC motor and the target speed of the DC motor; the determination module 20 can be used to determine the duty cycle of the pulse width modulation signal of the DC motor according to the speed deviation, the speed deviation change rate and the fuzzy speed control algorithm; the control module 30 can be used to control the speed of the DC motor according to the duty cycle.

[0054] Among them, the determination module 20 can be a fuzzy controller, which fuzzifies the speed deviation and the speed deviation change rate according to the fuzzy speed control algorithm and then processes them to obtain a fuzzy quantity, and then calculates an output fuzzy control quantity according to the fuzzy control rule, and then defuzzifies the control quantity to obtain the duty cycle. Since the fuzzy speed control algorithm does not rely on a fixed mathematical model, it has high adaptability. By controlling the speed of the DC motor through the fuzzy speed control algorithm, the load adaptability of the DC motor can be made stronger, and it has higher stability and accuracy.

[0055] In this way, the fuzzy speed control algorithm can achieve the target speed quickly and smoothly and stabilize at the target speed, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0056] In some embodiments, the DC motor includes a Hall sensor, and the actual rotation speed is determined based on the time difference between two adjacent rising edges of the Hall sensor signal.

[0057] Specifically, the acquisition module can be a microcontroller unit (MCU), and the time difference can represent the period of the Hall signal (Hall Signal) of the Hall sensor. When the MCU captures the rising edge of the first signal of two consecutive Hall signals of the Hall sensor, the counter inside the MCU starts counting, and the count of the counter at the beginning of counting is n1; when the MCU captures the rising edge of the second signal of the Hall sensor, the count of the counter is n2. If the crystal oscillator of the MCU is △T, the period of a Hall signal is:

[0058] T=(n 2 -n 1 )*ΔT

[0059] The time difference can represent the actual speed, that is, the actual speed can be represented according to the period of the Hall signal. The larger the period of the Hall signal, the greater the actual speed of the DC motor; the smaller the period of the Hall signal, the smaller the actual speed of the DC motor.

[0060] In this way, the period of the Hall signal can be determined based on the time difference between the rising edges of two adjacent signals of the Hall sensor, and thus the actual speed can be determined, so that the target speed can be reached quickly and smoothly and stabilized at the target speed through the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0061] In some embodiments, the speed deviation includes a current speed deviation and a previous speed deviation, the current speed deviation is the difference between the current target speed and the current actual speed, the previous speed deviation is the difference between the previous target speed and the previous actual speed, and the speed deviation change rate includes the current speed deviation change rate, the current speed deviation change rate is the difference between the current speed deviation and the previous speed deviation.

[0062] Specifically, according to the designed target speed and the detected actual speed of the DC motor, the difference Δv between the target speed and the actual speed can be calculated:

[0063] Δv=V target -V actual

[0064] Among them, V target Used to indicate the target speed, V actual Used to indicate the actual speed. Calculate the difference between the last target speed and the last actual speed to get the last speed deviation Δv(n-1)=V target (n-1)-V actual (n-1); Calculate the difference between the current target speed and the current actual speed, and you can get the current speed deviation Δv(n) = V target (n)-V actual (n), and then calculate the difference between the current speed deviation and the previous speed deviation to get the current speed deviation change rate Δe:

[0065] Δe=Δv(n)-Δv(n-1)

[0066] The speed deviation can be used to determine the difference between the actual speed and the target speed. When the speed deviation is positive, it can be determined that the actual speed is less than the target speed; when the speed deviation is negative, it can be determined that the actual speed is greater than the target speed; when the speed deviation is positive and the larger it is, the smaller the actual speed is than the target speed; when the speed deviation is negative and the smaller it is, the larger the actual speed is than the target speed. The speed deviation change rate can be used to determine the change in the speed deviation. When the speed deviation change rate is positive, the speed deviation at the current moment is greater than the speed deviation at the previous moment, and the speed deviation increases with time; when the speed deviation change rate is negative, the speed deviation at the current moment is less than the speed deviation at the previous moment, and the speed deviation decreases with time.

[0067] In this way, determining the previous speed deviation and the current speed deviation can determine the current speed deviation change rate, based on the speed deviation can determine the relationship between the actual speed and the target speed, based on the speed deviation change rate can determine the speed deviation change over time.

[0068] In some embodiments, step 02 (determining the duty cycle of the pulse width modulation signal of the DC motor based on the speed deviation, the speed deviation change rate and the fuzzy speed control algorithm) includes: determining the duty cycle of the pulse width modulation signal of the DC motor based on the current speed deviation, the current speed deviation change rate and the fuzzy speed control algorithm.

[0069] In some embodiments, the duty cycle is obtained by defuzzifying a fuzzy output value, the fuzzy output value is determined based on a fuzzy speed deviation and a fuzzy speed deviation change rate, the fuzzy speed deviation is obtained by fuzzifying the speed deviation, and the fuzzy speed deviation change rate is obtained by fuzzifying the speed deviation change rate.

[0070] Specifically, the speed deviation and the speed deviation change rate are accurate values, which need to be fuzzified so that the fuzzy controller can be aligned for further processing. The membership function has triangle, trapezoid, Z shape, etc., please refer to Figures 3 to 5, this embodiment is explained with the membership function as a triangle and a trapezoid. Fuzzy sets are set to fuzzify the two input parameters and defuzzify the output parameters. The number of fuzzy sets set for the speed deviation is, for example, 5, and the fuzzy sets are {NB, NS, Normal, PS, PB}, respectively, and the fuzzy sets of the language variables represented are {negative large, negative small, zero, positive small, positive large}, and the corresponding domain is, for example, [-300, 300], where zero can represent the set speed deviation, negative represents less than the set speed deviation, positive represents greater than the set speed deviation, large represents a large difference from the set speed deviation, and small represents a small difference from the set speed deviation; the speed deviation change rate is set The number of fuzzy sets is, for example, 5, and the fuzzy sets are {NB, NS, No_change, PS, PB}, and the fuzzy sets of the language variables they represent are {negative large, negative small, zero, positive small, positive large}, and the corresponding domain is, for example, [-80,80]; the number of fuzzy sets for setting the fuzzy output value of the output of the fuzzy controller is, for example, 7, and the fuzzy sets are {NB, NS, NS1, No_change, PS1, PS, PB}, and the fuzzy sets of the language variables they represent are {negative large, negative small, negative slight, zero, positive slight, positive small, positive large}, and the corresponding domain is, for example, [-4,3].

[0071] In this way, the speed deviation and the speed deviation change rate are fuzzified to obtain the fuzzy speed deviation and the fuzzy speed deviation change rate, and then the fuzzy output value is determined, and the fuzzy output value is defuzzified to obtain the duty cycle, and the speed of the DC motor is controlled according to the duty cycle, thereby realizing the speed control of the DC motor through the fuzzy control speed regulation algorithm.

[0072] In some implementations, when the fuzzy rotation speed deviation is positive, the fuzzy output value is positive; and when the fuzzy rotation speed deviation is negative, the fuzzy output value is negative.

[0073] Specifically, see Figure 6 The fuzzy control method includes fuzzy control rules, which are stored in the rule base of the fuzzy controller. The basic format of the fuzzy control rules is if (v is X) and (dv / dt is Y) then (duty is Z), where v can represent the speed deviation △v, dv / dt can represent the speed deviation change rate △e, and duty can represent the duty cycle. The meaning of this rule is: when the speed deviation belongs to X and the speed deviation change rate belongs to Y, the duty cycle belongs to Z. In one embodiment, 25 fuzzy control rules are designed for the DC motor speed regulation process:

[0074] 1.if(v is Normal)and(dv / dt is NB)then(duty is NS), this rule means that when the speed deviation is Normal after fuzzification and the speed deviation change rate is NB after fuzzification, the fuzzy output value is NS.

[0075] 2.if(v is Normal)and(dv / dt is PB)then(duty is PS), this rule means that when the speed deviation is Normal after fuzzification and the speed deviation change rate is PB after fuzzification, the fuzzy output value is PS.

[0076] 3.if(v is Normal)and(dv / dt is No_change)then(duty is No_change), this rule means that when the speed deviation is Normal after fuzzification and the speed deviation change rate is No_change after fuzzification, the fuzzy output value is No_change).

[0077] 4.if(v is Normal)and(dv / dt is PS)then(duty is PS1), this rule means that when the speed deviation is Normal after fuzzification and the speed deviation change rate is PS after fuzzification, the fuzzy output value is PS1.

[0078] 5.if(v is Normal)and(dv / dt is NS)then(duty is NS1), this rule means that when the speed deviation is Normal after fuzzification and the speed deviation change rate is NS after fuzzification, the fuzzy output value is NS1.

[0079] 6.if(v is PB)and(dv / dt is PB)then(duty is PB), this rule means that when the speed deviation is PB after fuzzification and the speed deviation change rate is PB after fuzzification, the fuzzy output value is PB.

[0080] 7.if(v is PB)and(dv / dt is PS)then(duty is PB), this rule means that when the speed deviation is PB after fuzzification and the speed deviation change rate is PS after fuzzification, the fuzzy output value is PB.

[0081] 8.if(v is PB)and(dv / dt is NS)then(duty is PS), this rule means that when the speed deviation is PB after fuzzification and the speed deviation change rate is NS after fuzzification, the fuzzy output value is PB.

[0082] 9.if(v is PB)and(dv / dt is NB)then(duty is PS1), this rule means that when the speed deviation is PB after fuzzification and the speed deviation change rate is NB after fuzzification, the fuzzy output value is PS1.

[0083] 10.if(v is PB)and(dv / dt is No_change)then(duty is PB), this rule means that when the speed deviation is PB after fuzzification and the speed deviation change rate is No_change after fuzzification, the fuzzy output value is PB.

[0084] 11.if(v is PS)and(dv / dt is PS)then(duty is PS), this rule means that when the speed deviation is PS after fuzzification and the speed deviation change rate is PS after fuzzification, the fuzzy output value is PS.

[0085] 12.if(v is PS)and(dv / dt is No_change)then(duty is PS), this rule means that when the speed deviation is PS after fuzzification and the speed deviation change rate is No_change after fuzzification, the fuzzy output value is PS.

[0086] 13.if(v is PS)and(dv / dt is NB)then(duty is PS1), this rule means that when the speed deviation is PS after fuzzification and the speed deviation change rate is NB after fuzzification, the fuzzy output value is PS1.

[0087] 14.if(v is PS)and(dv / dt is NS)then(duty is PS1), this rule means that when the speed deviation is PS after fuzzification and the speed deviation change rate is NS after fuzzification, the fuzzy output value is PS1.

[0088] 15.if(v is PS)and(dv / dt is PB)then(duty is PS), this rule means that when the speed deviation is PS after fuzzification and the speed deviation change rate is PB after fuzzification, the fuzzy output value is PS.

[0089] 16.if(v is NB)and(dv / dt is PB)then(duty is NS1), this rule means that when the speed deviation is NB after fuzzification and the speed deviation change rate is PB after fuzzification, the fuzzy output value is NS1.

[0090] 17.if(v is NB)and(dv / dt is PS)then(duty is NS), this rule means that when the speed deviation is NB after fuzzification and the speed deviation change rate is PS after fuzzification, the fuzzy output value is NS.

[0091] 18.if(v is NB)and(dv / dt is NS)then(duty is NB), this rule means that when the speed deviation is NB after fuzzification and the speed deviation change rate is NS after fuzzification, the fuzzy output value is NB.

[0092] 19.if(v is NB)and(dv / dt is NB)then(duty is NB), this rule means that when the speed deviation is NB after fuzzification and the speed deviation change rate is NB after fuzzification, the fuzzy output value is NB.

[0093] 20.if(v is NB)and(dv / dt is No_change)then(duty is NB), this rule means that when the speed deviation is NB after fuzzification and the speed deviation change rate is No_change after fuzzification, the fuzzy output value is NB.

[0094] 21.if(v is NS)and(dv / dt is NS)then(duty is NS), this rule means that when the speed deviation is NS after fuzzification and the speed deviation change rate is NS after fuzzification, the fuzzy output value is NS.

[0095] 22.if(v is NS)and(dv / dt is No_change)then(duty is NS), this rule means that when the speed deviation is NS after fuzzification and the speed deviation change rate is No_change after fuzzification, the fuzzy output value is NS.

[0096] 23.if(v is NS)and(dv / dt is PB)then(duty is NS1), this rule means that when the speed deviation is NS after fuzzification and the speed deviation change rate is PB after fuzzification, the fuzzy output value is NS.

[0097] 24.if(v is NS)and(dv / dt is PS)then(duty is NS1), this rule means that when the speed deviation is NS after fuzzification and the speed deviation change rate is PS after fuzzification, the fuzzy output value is NS1.

[0098] 25.if(v is NS)and(dv / dt is NB)then(duty is NS), this rule means that when the speed deviation is NS after fuzzification and the speed deviation change rate is NB after fuzzification, the fuzzy output value is NS1.

[0099] The positive or negative of the fuzzy output value can be determined by the fuzzy speed deviation. When the fuzzy speed deviation is negative, that is, when the speed deviation is negative after fuzzification, the fuzzy output value is negative. For example, see Figure 7 , when the fuzzy speed deviation is NB, the fuzzy output value is NB, NS or NS1; when the fuzzy speed deviation is NS, the fuzzy output value is NS or NS1; when the fuzzy speed deviation is positive, that is, when the speed deviation is positive after fuzzification, the fuzzy output value is positive, for example, when the fuzzy speed deviation is PB, the fuzzy output value is PB, PS or PS1; when the fuzzy speed deviation is PS, the fuzzy output value is PS or PS1. When the fuzzy output value is Normal, the positive or negative of the fuzzy output value is determined by the fuzzy speed deviation change rate. When the fuzzy speed deviation change rate is positive, the fuzzy output value is positive; when the fuzzy speed deviation change rate is negative, the fuzzy output value is negative; when the fuzzy speed deviation change rate is No_change, the fuzzy output value is No_change. When the speed deviation is negative, it means that the actual speed is greater than the target speed, that is, the actual speed has exceeded the target speed. At this time, the speed of the DC motor needs to be reduced. Therefore, the corresponding fuzzy output value is negative to reduce the duty cycle, thereby reducing the speed of the DC motor; when the speed deviation is positive, it means that the actual speed is less than the target speed, that is, the actual speed has not reached the target speed. At this time, the speed of the DC motor needs to be increased. Therefore, the corresponding fuzzy output value is positive to increase the duty cycle, thereby increasing the speed of the DC motor.

[0100] In addition, the domain value corresponding to the fuzzy output value is positively correlated with the fuzzy speed deviation. When the speed deviation change rate increases from negative to positive, the domain value corresponding to the fuzzy output value increases. For example, when the speed deviation is NB, as the speed deviation increases from negative to positive, the fuzzy output value changes in the order of NB, NS, and NS1, gradually approaches 0, and the domain value corresponding to the fuzzy output value gradually increases; when the speed deviation is PB, the fuzzy output value changes in the order of PS1 and PB, gradually moves away from 0 in the positive direction, and the domain value corresponding to the fuzzy output value gradually increases.

[0101] When the fuzzy speed deviation is negative, it means that the actual speed is greater than the target speed and the speed needs to be reduced. If the fuzzy speed deviation change rate is negative, the speed deviation at the current moment is greater than the speed deviation at the previous moment, and the current speed change trend is increasing. In order to offset the increasing change trend, a very small duty cycle is required to significantly reduce the speed. Therefore, the fuzzy output value is NB or NS; if the fuzzy speed deviation change rate is positive, the speed deviation at the current moment is less than the speed deviation at the previous moment, and the current speed change trend is originally decreasing. In this case, only a slightly smaller duty cycle is needed, so the fuzzy output value is NS or NS1, so as to prevent overshoot while further reducing the speed.

[0102] When the fuzzy speed deviation is positive, it means that the actual speed is less than the target speed and the speed needs to be increased. If the fuzzy speed deviation change rate is negative, the speed deviation at the current moment is greater than the speed deviation at the previous moment. The current speed change trend is increasing, so only a slightly larger duty cycle is needed to continue to increase the speed. Therefore, the fuzzy output value is PS1 to prevent overshoot while further increasing the speed. If the fuzzy speed deviation change rate is positive, the speed deviation at the current moment is less than the speed deviation at the previous moment. The current speed change trend is decreasing. In order to offset the current decreasing trend, a larger duty cycle is required at this time, so the fuzzy output value is PS or PB.

[0103] In this way, by setting the fuzzy control rules, the fuzzy output value can be determined according to the fuzzy speed deviation and the fuzzy speed deviation change rate, so as to realize the speed control of the DC motor through the fuzzy control speed regulation algorithm, so as to achieve the target speed quickly and smoothly and stabilize at the target speed, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0104] In some embodiments, the speed of the DC motor is determined according to the voltage of the DC motor. The DC motor is connected to a power switch tube. The voltage of the DC motor is determined according to the on or off state of the power switch tube. The on or off state of the power switch tube is determined according to the duty cycle.

[0105] Specifically, the duty cycle output by the fuzzy controller for each time unit is a unit duty cycle, and the duty cycle that affects the motor speed at the DC motor is obtained by accumulating multiple unit duty cycles. According to the duty cycle, the power switch tube is controlled to be disconnected or disconnected to control the voltage of the DC motor, that is, speed regulation is performed through pulse width modulation (PWM) technology. By controlling the duty cycle of the voltage on the DC motor, the size of the average voltage on the DC motor can be adjusted, thereby controlling the speed of the DC motor. The waveform of PWM is Figure 8As shown, T can represent a cycle, t1 represents the duration of a high level in a cycle, and t2 represents the duration of a low level in a cycle. The calculation method of the duty cycle and the relationship between the duty cycle and the average voltage of the motor are:

[0106] duty = t 1 / T

[0107] U d =U max *duty

[0108] Among them, duty is the duty cycle, U max is the voltage across the DC motor, U d is the average voltage across the DC motor, then the duty cycle is proportional to the average voltage of the DC motor, and the average voltage of the DC motor is positively correlated with the speed. Therefore, the duty cycle and the speed of the DC motor are positively correlated, that is, the larger the duty cycle, the higher the speed of the DC motor; the smaller the duty cycle, the lower the speed of the DC motor.

[0109] In this way, the duty cycle is used to control the conduction or disconnection of the power switch tube to control the voltage across the DC motor, thereby controlling the speed of the DC motor to achieve speed control of the DC motor.

[0110] An embodiment of the present invention provides an electronic device, which includes one or more processors and a memory. The memory stores a computer program. When the computer program is executed by the processor, the steps of the motor speed control method of any of the above embodiments are implemented.

[0111] In this way, the electronic device can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0112] An embodiment of the present invention provides a vehicle, and the vehicle includes the motor speed control device 100 of the above embodiment or the electronic device of the above embodiment.

[0113] Specifically, the motor speed control device 100 can form a closed-loop structure. Fig. 9 It can represent the process of the motor speed control device 100 implementing the motor speed control method, wherein V_target is used to represent the target speed, V_actual is used to represent the actual speed, and the actual speed is detected and the duty cycle is determined according to the target speed, the actual speed and the fuzzy speed control algorithm, and then the speed of the DC motor is controlled by the duty cycle, thereby realizing the speed control of the DC motor. Figures 10 to 21When the motor speed control algorithm of the embodiment of the present invention is applied to a DC motor, curve diagrams of the duty cycle and actual speed of the motor are collected at voltages of 9V, 12V, 14V and 16V, at different temperatures and with or without load. The first scene is used to represent the scene at normal temperature and without load, the second scene is used to represent the scene at normal temperature and with load, the third scene is used to represent the scene at low temperature and without load, the fourth scene is used to represent the scene at low temperature and with load, the fifth scene is used to represent the scene at high temperature and without load, and the sixth scene is used to represent the scene at high temperature and with load. It can be seen from the figure that the fuzzy speed control algorithm can achieve rapid and smooth reaching of the target speed and stabilization at the target speed, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0114] In this way, the vehicle can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0115] An embodiment of the present invention provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the motor speed control method of any of the above embodiments are implemented.

[0116] In this way, the electronic device can quickly and smoothly reach the target speed and stabilize at the target speed based on the fuzzy speed control algorithm, with faster response speed, smaller overshoot, stronger load adaptability, and greater stability and accuracy.

[0117] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.

[0118] In addition, the term "connection" should be understood in a broad sense, for example, it can include fixed connection, detachable connection, or integral connection; it can include direct connection, indirect connection through an intermediate medium, and internal communication between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0119] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0120] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0121] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A motor speed control method, characterized in that: For a DC motor, the motor speed control method includes: Obtaining a speed deviation and a speed deviation change rate, wherein the speed deviation and the speed deviation change rate are determined according to an actual speed of the DC motor and a target speed of the DC motor; Determining the duty cycle of the pulse width modulation signal of the DC motor according to the speed deviation, the speed deviation change rate and the fuzzy speed control algorithm; The rotation speed of the DC motor is controlled according to the duty cycle.

2. The motor speed control method according to claim 1, characterized in that: The DC motor includes a Hall sensor, and the actual rotation speed is determined according to the time difference between two adjacent rising edges of the Hall sensor signal.

3. The motor speed control method according to claim 1, characterized in that: The speed deviation includes a current speed deviation and a previous speed deviation, the current speed deviation is the difference between the current target speed and the current actual speed, the previous speed deviation is the difference between the previous target speed and the previous actual speed, and the speed deviation change rate includes a current speed deviation change rate, and the current speed deviation change rate is the difference between the current speed deviation and the previous speed deviation.

4. The motor speed control method according to claim 1, characterized in that: The duty cycle is obtained by defuzzifying a fuzzy output value, the fuzzy output value is determined based on a fuzzy speed deviation and a fuzzy speed deviation change rate, the fuzzy speed deviation is obtained by fuzzifying the speed deviation, and the fuzzy speed deviation change rate is obtained by fuzzifying the speed deviation change rate.

5. The motor speed control method according to claim 4, characterized in that: When the fuzzy rotation speed deviation is positive, the fuzzy output value is positive; when the fuzzy rotation speed deviation is negative, the fuzzy output value is negative.

6. The motor speed control method according to claim 1, characterized in that: The rotation speed of the DC motor is determined according to the voltage of the DC motor. The DC motor is connected to a power switch tube. The voltage of the DC motor is determined according to the on or off state of the power switch tube. The on or off state of the power switch tube is determined according to the duty cycle.

7. A motor speed control device, characterized in that: For a DC motor, the motor speed control device comprises: An acquisition module, the acquisition module is used to acquire a speed deviation and a speed deviation change rate, wherein the speed deviation and the speed deviation change rate are determined according to an actual speed of the DC motor and a target speed of the DC motor; A determination module, the determination module is used to determine the duty cycle of the pulse width modulation signal of the DC motor according to the speed deviation, the speed deviation change rate and the fuzzy speed control algorithm; A control module, wherein the control module is used to control the rotation speed of the DC motor according to the duty cycle.

8. An electronic device, characterized in that: The electronic device includes one or more processors and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the motor speed control method according to any one of claims 1 to 6 are implemented.

9. A vehicle, characterized in that: The vehicle includes the motor speed control device according to claim 7 or the electronic device according to claim 8.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the motor speed control method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • DC (direct current) motor speed control method based on hybrid self-adjusting fuzzy PID control

    CN108809160A

  • DC brushless motor speed regulation method based on fuzzy PI-PD control

    CN108832853A

  • Aviation wide-frequency-conversion three-stage motor voltage regulation method based on double-fuzzy PI control

    CN111245316A

  • Motor control method and device

    CN111800059A

Cited By

  • Method and device for detecting rotating speed of fan and electronic equipment

    CN121299155A