Method for controlling rotating speed of direct-current brushless motor
By introducing neural network algorithms into brushless DC motors, the neural network PID controller is designed, which solves the problem that traditional PID controllers are constantly adjusted and cannot adaptively adjust the parameters, achieving efficient speed control performance and good adaptability.
Patent Information
- Application Number
- CN202411956994.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-29
- Publication Date
- 2025-05-16
AI Technical Summary
Traditional PID controllers cannot adaptively in DC brushless motors due to constant parameters, which affects the actual controller response speed and speed control accuracy.
By evenly dividing the full speed range of DC brushless motors into multiple speed intervals, conducting open-loop tests within each speed interval, establishing a second-order transfer function model, and introducing a neural network algorithm to design a neural network PID controller to realize online adaptive adjustment.
It realizes excellent speed control performance of the DC brushless motor speed control system, has good adaptability and robustness, and can operate quickly and stably under different speed conditions.
Smart Images

Figure CN120016880A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of motor control, and in particular to a method for controlling the rotation speed of a brushless DC motor. Background Art
[0002] Brushless DC motor control involves multiple fields such as aviation engineering, automation control, and advanced materials. With the rapid development of the low-altitude economy, brushless DC motors are the core control components of electric vertical take-off and landing aircraft, and their control technology research and development and application are particularly important. However, due to the complexity of their internal structure and the harshness of the actual application environment, the control technology of brushless DC motors faces many challenges.
[0003] Because the proportional relationship between speed and thrust directly determines the performance of DC motors, stable and accurate control of rotor speed is essential to ensure efficient operation. Traditional PID controllers are often used for motor speed control because of their simple principles and few parameters. However, when the dynamic characteristics of the system change (such as load changes, motor parameter changes, etc.), the performance of the PID controller may be affected. This requires the PID controller to have a certain degree of adaptability or be able to adjust parameters online to cope with changes in the dynamic characteristics of the system. However, brushless DC motors have significant time-varying characteristics and strong nonlinear characteristics, and it is difficult for PID controllers to maintain their superior performance within their operating envelope.
[0004] Neural networks have been recognized as an effective nonlinear time-varying controller design method due to their significant advantages in dealing with nonlinear and uncertain complex systems. However, since neural networks usually require large-scale hardware resources to train and optimize when dealing with highly complex and sophisticated control systems, and DC motor speed control systems require fast and accurate responses, the hardware computing resources of actual controllers have become an important factor limiting the application of neural networks in motor speed control. Therefore, for DC brushless motor speed control, it is urgent to find a lightweight and adaptable neural network control method to ensure that the DC brushless motor can operate quickly and stably under various operating conditions. Summary of the invention
[0005] In order to cope with the nonlinear and time-varying characteristics of a brushless DC motor, an embodiment of the present application provides a brushless DC motor speed control method to solve the problem that parameters in traditional PID control are constant and cannot be adaptively adjusted, affecting the actual controller response speed and speed control accuracy.
[0006] The embodiment of the present application provides the following technical solution: a method for controlling the speed of a brushless DC motor, comprising the following steps:
[0007] Step S1: evenly divide the full speed range of the brushless DC motor into a plurality of speed intervals, carry out an open-loop test in each speed interval, and obtain open-loop step test data of the brushless DC motor in all states;
[0008] Step S2: According to the open-loop step test data, a second-order transfer function model of the DC brushless motor input voltage duty cycle-output motor speed signal in each speed range is established based on a system identification method;
[0009] Step S3: Based on the established second-order transfer function model, determining parameter values including PID proportion, integration and differentiation; according to the parameter values, introducing a neural network algorithm into the PID algorithm to design a neural network PID controller, and calculating the theoretical output result of the voltage duty cycle applied to the brushless DC motor in each control cycle through the neural network PID controller;
[0010] Step S4: adding anti-saturation limitation to the theoretical output result of the neural network PID controller to obtain the actual output result of the voltage duty cycle of the neural network PID controller, taking the final actual output result as the increment of the voltage duty cycle, applying the actual output result to the brushless DC motor, adjusting the motor speed according to the input voltage duty cycle, and realizing effective speed control.
[0011] According to an embodiment of the present application, in step S1, an open-loop test is carried out in each speed range, with the speed of the DC brushless motor as the actual measurement output and the motor voltage duty cycle as the input, to obtain open-loop step test data of the DC brushless motor in all states.
[0012] According to an embodiment of the present application, step S2 also includes preprocessing the open-loop step test data, and establishing a second-order transfer function model of the input-output signal of the brushless DC motor in each speed range based on the preprocessed open-loop step test data; the established model uses the motor voltage duty cycle data as input and the actual motor speed as output; wherein the preprocessing includes normalization processing and abnormal data elimination.
[0013] The normalization method is one of scaling normalization and mean variance normalization. The abnormal data specifically includes data exceeding the motor speed envelope range and speed data values with large drift during speed feedback.
[0014] According to an embodiment of the present application, in step S3, the second-order transfer function model in any speed range is designed using an incremental PID controller to obtain a mathematical model of the neural network PID controller, as shown in the following formula:
[0015]
[0016] Wherein, Δu(k) is the theoretical output result of the voltage duty cycle of the brushless DC motor output by the neural network PID controller, e(k) is the error between the target speed and the actual measured speed, K p , K i and K d They are the proportional coefficient, integral coefficient and differential coefficient respectively, T is the control period, and k is the control time.
[0017] According to an embodiment of the present application, the step S3 further includes: introducing a neural network scale parameter M, and branch parameters p1, p2 and p3, and optimizing the mathematical model of the neural network PID controller. The optimized mathematical model of the neural network PID controller is as follows:
[0018] Δu(k)=M(p1(k)x1(k)+p2(k)x2(k)+p3(k)x3(k))
[0019] x1=Δx2=e(k)-e(k-1)
[0020] x2=e(k)
[0021] Among them, x3=Δx1=e(k)-2e(k-1)+e(k-2).
[0022] According to an embodiment of the present application, step S3 further includes: using the root mean square error as the error evaluation index, that is, for the k+1th sampling time, the root mean square error value is The optimal estimation method is used to optimize the root mean square error value of the neural network PID controller.
[0023] According to an embodiment of the present application, the optimal estimation method is any one of a gradient descent method, a conjugate gradient method, a Newton method and a quasi-Newton method.
[0024] According to an embodiment of the present application, the step S3 further includes: according to the motor control and second-order transfer function model, using the chain method to determine the rate of change of the branch parameter, that is, p i (k+1)=p i (k)+υ′ i e(k)x i (k)u(k), where υ′ i =υ i M,υ i is the optimization rate of branch parameters.
[0025] According to an embodiment of the present application, the step S3 further includes: processing the branch parameters of the neural network PID controller using a mean normalization method, that is,
[0026] p1(k+1)=p1(k)+υ′1e(k)u(k)x1(k)
[0027] p2(k+1)=p2(k)+υ′2e(k)u(k)x2(k)
[0028] Among them, p3(k+1)=p3(k)+υ′3e(k)u(k)x3(k),
[0029] Among them, υ′1, υ′2, υ′3 are the optimized rates of proportion, integration, and differentiation, respectively, so as to obtain the theoretical increment of the motor duty cycle of the brushless DC motor at the next control moment (that is, the output of the neural network controller).
[0030] The step S4 includes: controlling the actual duty cycle of the motor input voltage signal to achieve speed regulation according to the change of Δu(k). To ensure the stable and safe operation of the brushless DC motor and not affect the mechanical life of the mechanical structures of the motor, the theoretical increment of the input voltage signal output by the controller is subjected to anti-saturation limitation. The output limitation of the controller is performed by the following method: This is used as the actual increment of the duty cycle of the input voltage applied to the brushless DC motor to complete the motor speed regulation, where Δu pos and -Δu neg It is the limit range of the controller output Δu(k), which actually corresponds to the maximum acceleration and deceleration limit of the brushless DC motor within a single control cycle.
[0031] Compared with the prior art, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least the following: As a DC brushless motor speed control method, compared with the existing DC brushless motor speed control method, the embodiment of the present invention utilizes the online learning ability of neural networks to enable controller parameters to be adjusted online adaptively under different speed conditions. Considering that the implementation cost of actual industrial electronic controllers and actual hardware resources are limited, large-scale neural networks are difficult to implement. The DC brushless motor speed controller is designed by combining the neural network algorithm with the traditional incremental PID, so that the DC brushless motor speed control system has excellent speed control performance. Due to the use of the neural network method, it has good adaptability and robustness to different control objects. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 is a flow chart of a method according to an embodiment of the present invention;
[0034] Figure 2 A schematic diagram of a closed-loop control circuit according to an embodiment of the present invention;
[0035] Figure 3 A specific flow chart of step S2 of an embodiment of the present invention;
[0036] Figure 4 A specific flow chart of step S3 of an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0038] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0039] The embodiment of the present invention provides a method for controlling the speed of a brushless DC motor, the method comprising: evenly dividing the full speed range of the brushless motor into a plurality of speed intervals, carrying out an open-loop test in each speed interval, and obtaining open-loop step test data of the brushless DC motor in the full speed range; using a system identification method to establish a transfer function model of the voltage duty cycle-motor speed of the brushless DC motor in each speed interval; determining the proportional, integral, and differential parameter values of the PID algorithm based on the established model; and introducing an adaptive algorithm into the PID algorithm to design an adaptive neural network controller to obtain a theoretical value of a brushless motor control signal; adding an anti-saturation limit on the basis of the theoretical value as the actual increment of the duty cycle of the brushless DC motor, and applying it to the actual brushless DC motor to realize speed control. The present invention uses a neural network algorithm to correct the proportional, integral, and differential parameters in the PID algorithm in real time, so that the brushless DC motor speed control system has excellent speed control performance. Due to the use of the neural network method, it has good adaptability and robustness for different control objects.
[0040] According to an embodiment of the present invention, a method for controlling the speed of a brushless DC motor is provided. Figure 1 As shown, including:
[0041] Step S1: evenly divide the speed envelope of the brushless DC motor into multiple speed intervals, carry out an open-loop test in each speed interval, use the speed of the DC motor as the actual measurement output, use the input voltage duty cycle as the input, and obtain the open-loop step test data of the brushless DC motor in the speed envelope;
[0042] Step S2: establishing a second-order transfer function model of the motor input-output signal (input voltage signal duty cycle-motor speed) in each speed range based on a system identification method;
[0043] Step S3: Determine the PID proportional, integral, and differential parameter values based on the established model; and introduce a neural network algorithm into the PID algorithm to design a neural network PID controller to calculate the theoretical value (controller output value) of the voltage duty cycle applied to the brushless DC motor in each control cycle;
[0044] Step S4: adding anti-saturation limitation to the theoretical output result of the neural network PID controller, taking the final result as the increment of the duty cycle of the motor input voltage signal, and applying it to the motor to achieve effective speed control.
[0045] The embodiment of the present invention is applied to the actual brushless DC motor control system schematic diagram as shown in Figure 2 As shown, the brushless DC motor is used as an actuator, the actual drive unit or circuit is used as a regulator, the PID control algorithm based on a neural network is used as a controller, r(k) is the reference input speed, y(k) is the actual speed of the DC motor, and the output of the controller in the present invention is the increment Δu(k) of the motor input voltage duty cycle, thereby forming a closed-loop control circuit of the brushless DC motor.
[0046] In some embodiments of the present invention, in the above step S1, the motor speed envelope is segmented using any speed value as the speed division interval, and the motor open-loop test data uses the voltage duty cycle as input and the motor speed as output.
[0047] The specific implementation steps in step S2 are as follows: Figure 3 As shown, including:
[0048] S21: Use the scaling normalization method to normalize the open-loop test result data.
[0049] S22: Eliminate abnormal values in the input and output data, where the abnormal values include data that exceeds the motor speed range and data with large drift during speed feedback;
[0050] S23: Based on the result data of S22, the system identification tool in Matlab is used to model the speed control of the brushless DC motor based on the second-order transfer function. Specifically, the model uses the input voltage duty cycle data as the model input and the speed data as the model output. The transfer function of the brushless DC motor control model is: Where a0, a1, a2, b0 are model coefficients. The model parameters under a certain speed condition are: a0 = 2.5462, a1 = 5.20, a2 = 1, b0 = 20.93;
[0051] The specific implementation steps in step S3 are as follows: Figure 4 As shown, including:
[0052] S31: Design the motor speed model within a certain speed range using an incremental PID controller: Where e(k) is the error between the target speed and the actual measured speed, and e(k) = r(k) - y(k), where K p , K i and K d They are the proportional coefficient, integral coefficient and differential coefficient respectively.
[0053] Furthermore, for an actual brushless DC motor speed control system, in any control cycle k, u(k)=u(k-1)+Δu(k).
[0054] S32: Introduce the neural network scale parameter M and branch parameters p1, p2, p3, and rewrite the controller control method in S31 as follows: Δu(k)=M(p1(k)x1(k)+p2(k)x2(k)+p3(k)x3(k)), where x1=Δx2=e(k)-e(k-1)x2=e(k)x3=Δx1=e(k)-2e(k-1)+e(k-2); The root mean square error is used as the error evaluation index. At the k+1th control moment, the root mean square error value is
[0055] S33: Use the gradient descent method to optimize the root mean square error value of the controller, that is, in is the gradient vector of the error J(k), which indicates that the direction of branch parameter optimization update is along the negative gradient direction, υ j is the learning rate of the hidden layer of the neural network;
[0056] S34: The chain method is used to obtain the rate of change of the branch parameter, that is, For a brushless DC motor, the steady-state output (motor speed) is a monotonically increasing function of the steady-state input signal (input voltage duty cycle).
[0057] S35: According to the second-order transfer function model, when the motor speed is low, is at a small value, and as the speed increases, This change trend is consistent with the change of input voltage. Therefore, u(k) is used instead of To simplify the model, we can get the branch parameter change rate: p j (k+1)=p j (k)+υ′ j e(k)x j (k)u(k), where υ′ j =υ j M.
[0058] S36: The mean normalization method is used for the branch parameters, that is, Where p1(k+1)=p1(k)+υ′1e(k)u(k)x1(k)p2(k+1)=p2(k)+υ′2e(k)u(k)x2(k)p3(k+1)=p3(k)+υ′3e(k)u(k)x3(k), where υ′1,υ′2,υ′3 are the learning update rates of the proportional, integral, and differential parameters respectively. Combined with the change in the duty cycle of the motor input voltage in S32, the theoretical increment of the duty cycle of the motor input voltage at the next moment (controller output value) can be obtained;
[0059] Finally, the motor input voltage duty cycle is actually adjusted according to the change of Δu(k). In order to ensure the stable and safe operation of the brushless DC motor and not affect the mechanical life of the motor's mechanical structures, the theoretical increment of the input voltage signal output by the controller is anti-saturated and limited. The output limit of the controller is implemented in the following way: This is used as the actual increment of the duty cycle of the input voltage applied to the brushless DC motor to complete the motor speed regulation, where Δu pos and -Δu neg It is the limit range of the controller output Δu(k), which actually corresponds to the maximum acceleration and deceleration limit of the brushless DC motor within a single control cycle.
[0060] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0061] The embodiment of the present invention is a DC brushless motor speed control method. Compared with the existing speed control method, the present invention uses the online learning ability of a neural network to enable controller parameters to be adjusted online adaptively under different speed conditions. Considering that the implementation cost of an actual industrial electronic controller and actual hardware resources are limited, large-scale neural networks are difficult to implement. A DC brushless motor speed controller is designed by combining a neural network algorithm with a traditional incremental PID, so that the DC brushless motor speed control system has excellent speed control performance. Due to the use of a neural network method, it has good adaptability and robustness to different control objects.
[0062] The present invention is described in detail based on the flowchart and / or block diagram of the method and computer program product of the embodiment. It should be clearly understood that each process and / or box in the flowchart and / or block diagram, and their combination, can be implemented by computer program instructions. This means that the implementation of these steps and modules has great flexibility.
[0063] In practical applications, the embodiments of the present invention are not limited to the specific execution order shown in the flow chart and / or block diagram. According to actual needs, the execution order of the steps can be adjusted, or they can be dispersed into different integrated circuit modules. Furthermore, multiple steps or modules can also be integrated into a single integrated circuit module to achieve more efficient resource utilization and performance optimization. Therefore, the embodiments of the present invention are not limited to any specific combination of hardware and software.
[0064] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A method for controlling the speed of a brushless DC motor, characterized in that: The steps include: Step S1: evenly divide the full speed range of the brushless DC motor into a plurality of speed intervals, carry out an open-loop test in each speed interval, and obtain open-loop step test data of the brushless DC motor in all states; Step S2: establishing a second-order transfer function model of the input-output signal of the brushless DC motor in each speed range based on the open-loop step test data and a system identification method; Step S3: Based on the established second-order transfer function model, determining parameter values including PID proportion, integration and differentiation; according to the parameter values, introducing a neural network algorithm into the PID algorithm to design a neural network PID controller, and calculating the theoretical output result of the voltage duty cycle applied to the brushless DC motor in each control cycle through the neural network PID controller; Step S4: adding anti-saturation limitation to the theoretical output result of the neural network PID controller to obtain the actual output result of the voltage duty cycle of the neural network PID controller, and applying the actual output result to the brushless DC motor to achieve effective speed control.
2. The DC brushless motor speed control method according to claim 1, characterized in that: In step S1, an open-loop test is carried out in each speed range, with the speed of the brushless DC motor as the actual measurement output and the motor voltage duty cycle as the input, to obtain open-loop step test data of the brushless DC motor in all states.
3. The DC brushless motor speed control method according to claim 1, characterized in that: The step S2 also includes preprocessing the open-loop step test data, and establishing a second-order transfer function model of the input-output signal of the brushless DC motor in each speed range based on the preprocessed open-loop step test data; wherein the preprocessing includes normalization processing and abnormal data elimination.
4. The method for controlling the speed of a brushless DC motor according to claim 1, characterized in that: In step S3, the second-order transfer function model in any speed range is designed using an incremental PID controller to obtain a mathematical model of the neural network PID controller, which is as follows: Wherein, Δu(k) is the theoretical output result of the voltage duty cycle of the brushless DC motor output by the neural network PID controller, e(k) is the error between the target speed and the actual measured speed, K p , K i and K d They are the proportional coefficient, integral coefficient and differential coefficient respectively, T is the control period, and k is the control time.
5. The DC brushless motor speed control method according to claim 4, characterized in that: The step S3 also includes: introducing a neural network scale parameter M, and branch parameters p1, p2 and p3, and optimizing the mathematical model of the neural network PID controller. The optimized mathematical model of the neural network PID controller is as follows: Δu(k)=M(p1(k)x1(k)+p2(k)x2(k)+p3(k)x3(k)) in, 6. The method for controlling the speed of a brushless DC motor according to claim 5, characterized in that: The step S3 also includes: using the root mean square error as an error evaluation index, and optimizing the root mean square error value of the neural network PID controller using an optimal estimation method.
7. The method for controlling the speed of a brushless DC motor according to claim 6, characterized in that: The optimal estimation method is any one of the gradient descent method, the conjugate gradient method, the Newton method and the quasi-Newton method.
8. The method for controlling the speed of a brushless DC motor according to claim 6, characterized in that: The step S3 also includes: determining the rate of change of the branch parameter by using a chain method according to the motor control and second-order transfer function model.
9. The method for controlling the speed of a brushless DC motor according to claim 6, characterized in that: The step S3 also includes: using a mean normalization method to process the branch parameters of the neural network PID controller.