A brushless DC motor speed control method, system, device and storage medium
Through the combination of real-time data processing and multiple algorithms, the problem of unstable speed control of brushless DC motors in complex environments is solved, high-precision and high-stability speed control is achieved, and the motor response speed and stability is improved .
Patent Information
- Application Number
- CN202410648850.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-05-23
AI Technical Summary
The existing brushless DC motor speed control method is difficult to achieve high-precision and high-stability control in complex environments. Especially when the load changes greatly, it is impossible to accurately predict and stabilize the motor speed, which affects the operating effect and stability of the motor. .
By acquiring the driving current and speed data in real time, calculating the error signal, using evolutionary algorithms to optimize the parameters of the fuzzy logic control unit, combining the deep reinforcement learning model to adjust the parameters of the PID control unit, and superimposing the current control signal and current correction through a deep sparse automatic encoder signal, generate a drive control signal to adjust the motor speed.
It improves the accuracy and stability of motor speed control, can better cope with nonlinear and complex operating conditions, enhances the response speed and stability of the motor control system, and makes the system more intelligent and adaptable.
Smart Images

Figure CN118282256B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent motor control, and in particular to a brushless DC motor speed control method, system, device and storage medium. Background Art
[0002] Brushless DC motors are widely used in various fields due to their excellent performance, such as electric vehicles and home appliances. Among them, speed control is a key technology that affects the performance of brushless DC motors. However, due to the complexity of the working environment and equipment load, the accuracy and stability of real-time control of the speed of brushless DC motors face certain challenges. The existing speed control method is generally based on motor parameters and operating status data, and the motor speed is adjusted through a preset control algorithm. However, this method lacks a dynamic adjustment mechanism and cannot effectively cope with the changes of the motor under different loads and working conditions. The speed control effect of the motor in a complex environment is not satisfactory. Especially for motors with large speed fluctuations or large load changes, this method cannot accurately predict and stably control the motor speed, which may affect the operating effect and stability of the motor. Therefore, a more intelligent, high-precision and high-stability speed control method is urgently needed. Summary of the invention
[0003] The present invention provides a brushless DC motor speed control method, system, device and storage medium, which are used to achieve the technical problem of maintaining high-precision and high-stability speed control of the brushless DC motor in real time under complex environments.
[0004] A first aspect of the present invention provides a brushless DC motor speed control method, the brushless DC motor speed control method comprising:
[0005] Obtain the driving current data and speed data of the brushless DC motor in real time;
[0006] Calculating an error signal according to the speed data and a preset target speed;
[0007] Generate a first parameter according to the driving current data, the rotation speed data and the error signal through a preset evolutionary algorithm;
[0008] Setting parameters of a fuzzy logic control unit according to the first parameter, and generating a current control signal through the fuzzy logic control unit;
[0009] Generate a second parameter according to the driving current data, the rotation speed data and the error signal through a deep reinforcement learning model;
[0010] Setting a parameter of a PID control unit according to the second parameter, and generating a current correction signal through the PID control unit;
[0011] Superimposing the current control signal and the current correction signal by a deep sparse autoencoder to generate a drive control signal;
[0012] A driving current for the brushless DC motor is generated according to the driving control signal.
[0013] Optionally, in a first implementation of the first aspect of the present invention, calculating an error signal according to the speed data and a preset target speed includes:
[0014] Calculating a root mean square error (RMSE) and an overshoot between the speed data of the brushless DC motor and the target speed;
[0015] The root mean square error RMSE and the overshoot are weighted to obtain an error signal. The weighted calculation formula is:
[0016] Error signal = A * RMSE + B * overshoot;
[0017] Among them, RMSE stands for root mean square error, overshoot is the ratio of the instantaneous maximum deviation of the speed to the target speed, and A and B are weight coefficients;
[0018] The formula for calculating the root mean square error is as follows:
[0019] ;
[0020] Where n is the number of samples; Σ represents the summation symbol;
[0021] The target speed is replaced by the predicted value and the speed data is replaced by the actual value.
[0022] Optionally, in a second implementation of the first aspect of the present invention, generating a first parameter according to the drive current data, the speed data and the error signal by using a preset evolutionary algorithm includes:
[0023] Generating an initial fuzzy rule base and an initial membership function according to the speed data of the brushless DC motor and the target speed, wherein the initial fuzzy rule base and the initial membership function are used to describe the fuzzy relationship between the speed data of the brushless DC motor and the target speed;
[0024] According to the error signal, the initial fuzzy rule base and the initial membership function are iterated and cross-mutated to generate an optimized fuzzy rule base and an optimized membership function;
[0025] A first parameter is generated according to the optimized fuzzy rule base and the optimized membership function.
[0026] Optionally, the iterating and cross-mutating the initial fuzzy rule base and the initial membership function according to the error signal to generate an optimized fuzzy rule base and an optimized membership function comprises:
[0027] Based on a genetic algorithm, a crossover operation is performed on the initial fuzzy rule base and the initial membership function to generate a new combination of the fuzzy rule base and the membership function as a first combination;
[0028] Based on the genetic algorithm, the initial fuzzy rule base and the initial membership function are mutated to generate a new fuzzy rule base and the membership function, and the new fuzzy rule base and the new membership function are combined to generate a second combination method; based on the genetic algorithm, the first combination method and the second combination method are iterated to obtain the optimal combination method, and an optimized fuzzy rule base and an optimized membership function are generated.
[0029] Optionally, generating a first parameter according to the optimized fuzzy rule base and the optimized membership function includes:
[0030] According to the optimized fuzzy rule base and the optimized membership function, a combination method of optimizing the fuzzy rule base and the membership function is obtained;
[0031] According to the initial fuzzy rule base and the initial membership function optimization combination, the optimized speed data of the brushless DC motor corresponding to the target speed is obtained;
[0032] The first parameter is set according to the optimized speed data of the brushless DC motor.
[0033] Optionally, in a third implementation manner of the first aspect of the present invention, training a second parameter through a deep reinforcement learning model according to the error signal includes:
[0034] Building a simulation environment based on the driving current data and the rotation speed data of the brushless DC motor;
[0035] Generate a state space according to the driving current data of the brushless DC motor, the speed data and the target speed;
[0036] According to the state space, a preset action space is corresponded;
[0037] Setting parameters of a PID control unit according to the action space;
[0038] setting a reward function based on the error signal;
[0039] Filtering a pairing relationship between the state space and the preset action space according to the reward function;
[0040] Constructing a deep Q network model based on the state space, the action space and the reward function;
[0041] The second parameter is obtained by interactively training the deep Q network model with the simulation environment.
[0042] Optionally, in a fourth implementation of the first aspect of the present invention, superimposing the current control signal and the current correction signal by a deep sparse autoencoder to generate a drive control signal includes:
[0043] Setting the number of input layer nodes, the number of hidden layers, and the number of nodes in each hidden layer of the deep sparse autoencoder according to the current control signal and the current correction signal;
[0044] Add ReLU as the activation function of the deep sparse autoencoder;
[0045] Calculating mean square error data according to the error signal;
[0046] Generating a loss function of the deep sparse autoencoder based on the mean square error data;
[0047] Optimizing the loss function by back propagation algorithm and gradient descent to obtain a reconstruction error loss function;
[0048] Adding a sparsity penalty term of the deep sparse autoencoder according to L1 regularization;
[0049] Analyzing and generating an optimized characteristic relationship between the current control signal and the current correction signal based on the reconstruction error loss function and the sparsity penalty term;
[0050] The driving control signal is generated at the output layer of the deep sparse autoencoder according to the optimized feature relationship.
[0051] A second aspect of the present invention provides a brushless DC motor speed control system, which includes: a monitoring module, an analysis and processing module, and a control module.
[0052] Optionally, in a first implementation of the second aspect of the present invention, the monitoring module is used to perform operation testing and rotor monitoring on the brushless DC motor through a Hall sensor and a current sensor, obtain the driving current and speed of the brushless DC motor and generate driving current data and speed data;
[0053] Optionally, in a second implementation of the second aspect of the present invention, the analysis and processing module is used to calculate the error signal, generate a first parameter based on an evolutionary algorithm, and generate a second parameter based on a deep reinforcement learning model; including: a fuzzy logic control unit and a PID control unit; the fuzzy logic control unit is used to generate a current control signal according to the first parameter; the PID control unit is used to generate a current correction signal according to the second parameter;
[0054] Optionally, in a third implementation of the second aspect of the present invention, the control module is used to generate a drive control signal through a deep sparse autoencoder, and perform control according to the above-mentioned brushless DC motor speed control method.
[0055] The third aspect of the present invention provides a brushless DC motor speed control device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the brushless DC motor speed control device executes the above-mentioned brushless DC motor speed control device method.
[0056] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned brushless DC motor speed control device method.
[0057] In the technical solution provided by the present invention, the beneficial effects are as follows: the present invention provides a brushless DC motor speed control method, which uses an evolutionary algorithm based on a fuzzy logic control unit to optimize a fuzzy rule base and a membership function to better meet the needs of motor speed control. Through the optimized fuzzy logic controller, a control current signal can be generated more accurately, thereby improving the speed control effect; a deep reinforcement learning algorithm is used based on a PID control unit to adjust PID parameters, thereby realizing intelligent parameter adjustment, further improving the ability to accurately control the motor speed, and making the motor respond more quickly and stably; a deep sparse autoencoder is used to superimpose a current control signal and a current correction signal to generate a drive control signal, and the deep sparse autoencoder has advantages in capturing data features, and can effectively learn the complex nonlinear relationship between control signals. By applying the deep sparse autoencoder to the fusion of the output signals of the two control units, the complex relationship between the control signals can be better processed. The present invention provides a brushless DC motor speed control method, which can improve the accuracy and stability of the control current signal, can more efficiently and reasonably cope with various nonlinear and complex operating conditions, improve the response speed and stability of the motor control system, and make the system more intelligent and adaptive. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1A schematic diagram of an embodiment of a method for controlling the speed of a brushless DC motor according to an embodiment of the present invention;
[0059] Figure 2 The figure is a schematic diagram of an embodiment of a brushless DC motor speed control system in an embodiment of the present invention. DETAILED DESCRIPTION
[0060] Embodiments of the present invention provide a method, device, equipment and storage medium for controlling the speed of a brushless DC motor. The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0061] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the brushless DC motor speed control method in the embodiment of the present invention includes:
[0062] Step 101: Acquire driving current data and speed data of the brushless DC motor in real time;
[0063] It is understandable that the execution subject of the present invention may be a brushless DC motor, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject.
[0064] Specifically, the drive current and speed of the brushless DC motor are obtained from the brushless DC motor. The target brushless DC motor is tested and key parameters are measured by using sensors such as Hall sensors, current sensors, etc., using test instruments and measurement methods. For example, the speed, torque and current values are measured using a speed meter and a load meter to obtain load characteristic parameters and drive current speed relationship parameters.
[0065] Specifically, drive current data and speed data are generated, and the drive current data and speed data include load characteristic features (such as torque-speed curve, vector) and voltage-current relationship features (such as current-speed curve, vector). The load characteristic features feedback different loads or various complex working conditions.
[0066] Step 102: Calculating an error signal according to the rotation speed data and a preset target rotation speed;
[0067] Specifically, calculating the root mean square error RMSE and the overshoot between the speed data of the brushless DC motor and the target speed;
[0068] More specifically, the root mean square error (RMSE) is an indicator used to measure the prediction accuracy of a prediction model on continuous data. It measures the root mean square difference between the predicted value and the true value, indicating the average deviation between the predicted value and the true value, and is one of the commonly used performance evaluation indicators in regression tasks. Therefore, in this embodiment, it can express the average deviation between the target speed and the speed.
[0069] The formula for calculating the root mean square error is as follows:
[0070] ;
[0071] Where n is the number of samples; Σ represents the summation symbol;
[0072] The root mean square error (RMSE) between the speed of the brushless DC motor and the target speed can be calculated by replacing the target speed with the predicted value and the speed data with the actual value, which is used as an accuracy indicator to measure the speed control of the brushless motor.
[0073] The root mean square error RMSE and the overshoot are weighted to obtain an error signal. The weighted calculation formula is:
[0074] Error signal = A * RMSE + B * overshoot;
[0075] Among them, RMSE stands for root mean square error, overshoot is the ratio of the instantaneous maximum deviation value of the speed to the target speed, A and B are weight coefficients, for example, A is 0.6 and B is 0.4, then the error signal = 0.6* RMSE + 0.4 * overshoot;
[0076] Overshoot is used as a stability indicator to measure the speed control of brushless motors.
[0077] Step 103: Generate a first parameter according to the drive current data, the speed data and the error signal through a preset evolutionary algorithm; generate the first parameter according to the optimized fuzzy rule base and the optimized membership function, including: obtaining a combination of the fuzzy rule base and the optimized membership function according to the optimized fuzzy rule base and the optimized membership function; obtaining the speed data of the optimized brushless DC motor corresponding to the target speed according to the initial fuzzy rule base and the initial membership function optimization combination; set the first parameter according to the optimized speed data of the brushless DC motor.
[0078] Specifically, the setting of the first parameter is to find the optimized speed data that best matches the preset target speed according to the evolutionary algorithm. The first parameter is set to generate the optimized speed data, thereby generating a control current signal more accurately and reducing the error between the speed and the target speed.
[0079] Specifically, the evolutionary algorithm is an optimization algorithm that imitates the biological evolution process, and is used in this embodiment to generate the first parameter to further design a high-performance fuzzy control unit. In an optional embodiment, an evolutionary algorithm such as a genetic algorithm or a particle swarm algorithm can be used to optimize the fuzzy rule base and the membership function to better meet the needs of the brushless DC motor speed control, thereby more accurately generating a control current signal and improving the speed control effect.
[0080] Step 104: setting parameters of a fuzzy logic control unit according to the first parameter, and generating a current control signal through the fuzzy logic control unit;
[0081] Specifically, based on accurate and stable speed control, the speed control target (target speed) and the required input (drive current data, speed data) and output parameters (current control signal) are first determined; according to the target relationship, the initial fuzzy rule base and membership function are designed. These rule bases and functions describe the fuzzy relationship between the motor speed and the target speed.
[0082] Assuming that the initial fuzzy rule base and membership function cannot meet the requirements of brushless DC motor speed control, the evolutionary algorithm is continuously iterated and cross-mutated to gradually adjust the rule base and membership function, and generate the first parameter to set the parameters of the fuzzy logic control unit, so that the fuzzy logic control unit can better adapt to the needs of motor speed control, thereby being able to more accurately generate control current signals and improve the speed control effect.
[0083] Specifically, the current control signal includes voltage and current characteristics (such as current-voltage curve, vector).
[0084] Step 105: Generate a second parameter according to the driving current data, the speed data and the error signal through a deep reinforcement learning model;
[0085] Specifically, deep reinforcement learning is an artificial intelligence method that obtains the optimal behavior strategy through the agent's exploration and learning in the environment. In this embodiment, deep reinforcement learning is applied to the design of the PID control unit to achieve intelligent parameter adjustment, further improve the ability to accurately control the motor speed, and make the motor's response faster and more stable.
[0086] Step 106: setting parameters of a PID control unit according to the second parameter, and generating a current correction signal through the PID control unit;
[0087] Specifically, when the deep reinforcement learning algorithm begins training, the parameters of the PID control unit may be randomly initialized. As the model is trained in a simulated environment, it will learn how to adjust the parameters of the PID controller in different states to maximize the performance of the control system. Through continuous feedback and optimization, the second parameter can eventually be screened and generated to obtain an intelligent PID control unit, which can meet the needs of high adaptability under complex working conditions and make the motor's response faster, more accurate and more stable.
[0088] Specifically, the current correction signal includes voltage and current characteristics (such as current-voltage curve, vector).
[0089] Step 107: superimposing the current control signal and the current correction signal through a deep sparse autoencoder to generate a drive control signal;
[0090] Specifically, the Deep Sparse Autoencoder has advantages in capturing data features and can effectively learn complex nonlinear relationships between control signals.
[0091] Through the deep sparse autoencoder, we can learn the complex relationship between the current control signal and the current correction signal. For example, in some cases, the increase of the current correction signal may offset the effect of the current control signal. Under certain working conditions, the weight of the current control signal should be greater than the current correction signal, etc. Through training and learning, the deep sparse autoencoder will be able to better understand and fuse these signals and output a more accurate and stable drive control signal. Through verification experiments, we can verify the improvement effect of this structural design on the motor control system and provide a reference for further optimization and improvement.
[0092] Step 108: Generate a driving current for the brushless DC motor according to the driving control signal. Specifically, the driving current drives the brushless DC motor to operate, continuously generates driving current data and speed data, and provides feedback for system adjustment.
[0093] In the embodiments of the present invention, the beneficial effects are as follows: the embodiment uses an evolutionary algorithm to optimize the fuzzy rule base and the membership function based on the fuzzy logic control unit to better meet the needs of motor speed control. Through the optimized fuzzy logic controller, the control current signal can be generated more accurately, thereby improving the speed control effect; the deep reinforcement learning algorithm is also used based on the PID control unit to adjust the PID parameters, thereby realizing intelligent parameter adjustment, further improving the ability to accurately control the motor speed, and making the motor respond more quickly and stably; the deep sparse autoencoder is also used to superimpose the current control signal and the current correction signal to generate a drive control signal. The deep sparse autoencoder has advantages in capturing data features, and can effectively learn the complex nonlinear relationship between the control signals. By applying the deep sparse autoencoder to the fusion of the output signals of the two control units, the complex relationship between the control signals can be better processed. The present invention provides a brushless DC motor speed control method that can improve the accuracy and stability of the control current signal, can more efficiently and reasonably cope with various nonlinear and complex operating conditions, improve the response speed and stability of the motor control system, and make the system more intelligent and adaptive.
[0094] Another embodiment of the brushless DC motor speed control method in the embodiment of the present invention includes:
[0095] The generating of the first parameter according to the driving current data, the speed data and the error signal by using a preset evolutionary algorithm includes:
[0096] Generating an initial fuzzy rule base and an initial membership function according to the speed data of the brushless DC motor and the target speed, wherein the initial fuzzy rule base and the initial membership function are used to describe the fuzzy relationship between the speed data of the brushless DC motor and the target speed;
[0097] According to the error signal, the initial fuzzy rule base and the initial membership function are iterated and cross-mutated to generate an optimized fuzzy rule base and an optimized membership function;
[0098] A first parameter is generated according to the optimized fuzzy rule base and the optimized membership function.
[0099] Specifically, the iterative and cross-mutation operations are performed on the initial fuzzy rule base and the initial membership function according to the error signal to generate an optimized fuzzy rule base and an optimized membership function, including:
[0100] Based on a genetic algorithm, a crossover operation is performed on the initial fuzzy rule base and the initial membership function to generate a new combination of the fuzzy rule base and the membership function as a first combination;
[0101] The initial population, i.e., a set of fuzzy rule bases and membership function combinations containing multiple individuals, is generated using a random method.
[0102] Through the selection, crossover and mutation operations of the genetic algorithm, the individuals in the population are iteratively optimized to find the optimal combination of fuzzy rule base and membership function. The selection operation selects excellent individuals according to the fitness function, the crossover operation generates new individuals, and the mutation operation introduces new diversity.
[0103] Specifically, in the genetic algorithm, a fitness function needs to be designed to evaluate the performance of each individual (i.e., the combination of the fuzzy rule base and the membership function). The design of the fitness function needs to take into account the accuracy and stability of the speed control. In this embodiment, we set the fitness function based on the error signal.
[0104] Based on the genetic algorithm, the initial fuzzy rule base and the initial membership function are mutated to generate a new fuzzy rule base and the membership function, and the new fuzzy rule base and the membership function are combined to generate a second combination method; based on the genetic algorithm, the first combination method and the second combination method are iterated to obtain the optimal combination method, and an optimized fuzzy rule base and an optimized membership function are generated.
[0105] Specifically, the fitness of the new generation of individuals is evaluated, and individuals with higher fitness are selected as the next generation of population.
[0106] The optimization process is iterated until the population converges or a preset iteration termination condition is reached to obtain the first parameter, and finally an optimized fuzzy logic control unit is obtained.
[0107] Another embodiment of the brushless DC motor speed control method in the embodiment of the present invention includes: training the second parameter through a deep reinforcement learning model according to the error signal includes:
[0108] A simulation environment is constructed based on the driving current data of the brushless DC motor and the rotational speed data; this simulation environment will include the physical characteristics of the motor, feedback from the rotational speed sensor, etc.
[0109] A state space is generated according to the driving current data of the brushless DC motor, the speed data and the target speed; in this embodiment, the state space includes the speed of the motor, the target speed and the error signal, etc.; the action space is used to define the parameters of the PID control unit;
[0110] According to the state space, a preset action space is corresponded;
[0111] Setting parameters of a PID control unit according to the action space;
[0112] A reward function is set based on the error signal; the reward function evaluates the quality of the PID control unit according to the control effect and system performance. In this embodiment, the smaller the error signal, the better the control effect and system performance.
[0113] Filtering a pairing relationship between the state space and the preset action space according to the reward function;
[0114] A deep Q network model is constructed based on the state space, the action space and the reward function. This deep reinforcement learning model will continuously learn the optimal PID parameter settings by interacting with the environment to achieve the optimal motor speed control effect.
[0115] Specifically, the second parameter is obtained by interactive training between the deep Q network model and the simulation environment; in the simulation environment, the model continuously adjusts the parameters of the PID control unit according to the reward signal obtained by interaction with the environment to optimize the control performance of the motor speed. Through a large amount of training, the deep reinforcement learning model can learn the best parameter settings.
[0116] The parameters of the PID control unit are updated according to the second parameters.
[0117] Specifically, once training is completed, the deep reinforcement learning model will generate the best PID parameter settings, i.e., the second parameters. These parameters can be directly applied to the real motor speed control system to achieve more accurate, fast and stable speed control effect.
[0118] Another embodiment of the brushless DC motor speed control method in the embodiment of the present invention includes: the superposition of the current control signal and the current correction signal through the deep sparse autoencoder to generate the drive control signal includes:
[0119] The number of input layer nodes, the number of hidden layers, and the number of nodes in each hidden layer of the deep sparse autoencoder are set according to the current control signal and the current correction signal; for example, if the current control signal is a 4-dimensional vector and the current correction signal is a 3-dimensional vector, the number of input layer nodes is 4 + 3 = 7. The number of hidden layers and the number of nodes in each hidden layer are determined according to the actual task complexity and data characteristics. For example, 2 hidden layers are selected, the first hidden layer has 10 nodes, and the second hidden layer has 8 nodes.
[0120] Add ReLU as the activation function of the deep sparse autoencoder;
[0121] The mean square error data is calculated based on the error signal; in this embodiment, the mean square error data is used to measure the error generated when the model reconstructs the input signal, helping the network learn how to accurately reconstruct the input signal.
[0122] Generating a loss function of the deep sparse autoencoder based on the mean square error data;
[0123] The loss function is optimized by back propagation algorithm and gradient descent to obtain the reconstruction error loss function; the back propagation algorithm is used to calculate the gradient of the loss function with respect to the network parameters. According to the idea of gradient descent, the network parameters are adjusted to reduce the value of the loss function. By optimizing the loss function with back propagation algorithm and gradient descent, the network can learn how to effectively fuse the output signals of the two controllers to generate the drive control signal. This training process enables the network to gradually optimize the parameters, learn the data features and continuously improve the performance of the model.
[0124] According to L1 regularization, the sparsity penalty term of the deep sparse autoencoder is added; in the deep sparse autoencoder of this embodiment, L1 regularization is usually used for sparsity penalty, and the sparsity penalty term helps the network to keep fewer activated neurons so as to better learn the data features. That is, it prompts the neurons of the network to produce fewer non-zero values. This helps the model learn more meaningful features and avoid overfitting the training data.
[0125] Based on the reconstruction error loss function and the sparsity penalty term, the optimized characteristic relationship between the current control signal and the current correction signal is analyzed and generated; the deep sparse autoencoder is trained using the training data, and the network parameters are continuously adjusted through the back propagation algorithm to gradually reduce the loss function value. During the training process, the network will learn how to effectively fuse the two controller output signals to generate a drive control signal.
[0126] The driving control signal is generated at the output layer of the deep sparse autoencoder according to the optimized feature relationship.
[0127] The above describes the brushless DC motor speed control method in the embodiment of the present invention. The following describes the brushless DC motor speed control system in the embodiment of the present invention. Figure 2 , an embodiment of the brushless DC motor speed control system in the embodiment of the present invention includes:
[0128] A monitoring module is used to perform operation test and rotor monitoring on the brushless DC motor through a Hall sensor and a current sensor, obtain the driving current and speed of the brushless DC motor and generate driving current data and speed data;
[0129] An analysis and processing module, used for calculating an error signal, generating a first parameter based on an evolutionary algorithm, and a second parameter based on a deep reinforcement learning model; comprising: a fuzzy logic control unit and a PID control unit; the fuzzy logic control unit is used for generating a current control signal according to the first parameter; the PID control unit is used for generating a current correction signal according to the second parameter;
[0130] A control module is used to generate a drive control signal through a deep sparse autoencoder and perform control according to the brushless DC motor speed control method as described above.
[0131] The present invention also provides a brushless DC motor speed control device, comprising: a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the brushless DC motor speed control device executes the above-mentioned brushless DC motor speed control device method.
[0132] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the computer-readable storage medium is run on a computer, the computer executes the above-mentioned brushless DC motor speed control device method.
[0133] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0134] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0135] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A brushless DC motor speed control method, characterized in that: The brushless DC motor speed control method comprises: Obtain the driving current data and speed data of the brushless DC motor in real time; Calculating an error signal according to the speed data and a preset target speed; Generate a first parameter according to the driving current data, the speed data and the error signal through a preset evolutionary algorithm; Setting parameters of a fuzzy logic control unit according to the first parameter, and generating a current control signal through the fuzzy logic control unit; Generate a second parameter according to the driving current data, the rotation speed data and the error signal through a deep reinforcement learning model; Setting a parameter of a PID control unit according to the second parameter, and generating a current correction signal through the PID control unit; Superimposing the current control signal and the current correction signal by a deep sparse autoencoder to generate a drive control signal; A driving current for the brushless DC motor is generated according to the driving control signal.
2. The brushless DC motor speed control method according to claim 1, characterized in that: The calculating the error signal according to the rotation speed data and a preset target rotation speed comprises: Calculating a root mean square error (RMSE) and an overshoot between the speed data of the brushless DC motor and the target speed; The root mean square error RMSE and the overshoot are weighted to obtain an error signal. The weighted calculation formula is: Error signal = A * RMSE + B * overshoot; Among them, RMSE stands for root mean square error, overshoot is the ratio of the instantaneous maximum deviation of the speed to the target speed, and A and B are weight coefficients; In the formula, the calculation formula of the root mean square error is as follows: ; And, n is the number of samples; Σ represents the summation symbol; the predicted value represents the target speed, and the true value represents the speed data.
3. The brushless DC motor speed control method according to claim 1, characterized in that: The generating of the first parameter according to the driving current data, the speed data and the error signal by using a preset evolutionary algorithm includes: Generating an initial fuzzy rule base and an initial membership function according to the speed data of the brushless DC motor and the target speed, wherein the initial fuzzy rule base and the initial membership function are used to describe the fuzzy relationship between the speed data of the brushless DC motor and the target speed; According to the error signal, the initial fuzzy rule base and the initial membership function are iterated and cross-mutated to generate an optimized fuzzy rule base and an optimized membership function; A first parameter is generated according to the optimized fuzzy rule base and the optimized membership function.
4. The brushless DC motor speed control method according to claim 3, characterized in that: The iterative and cross-mutation operations are performed on the initial fuzzy rule base and the initial membership function according to the error signal to generate an optimized fuzzy rule base and an optimized membership function, including: Based on a genetic algorithm, a crossover operation is performed on the initial fuzzy rule base and the initial membership function to generate a new combination of the fuzzy rule base and the membership function as a first combination; Based on a genetic algorithm, a mutation operation is performed on the initial fuzzy rule base and the initial membership function to generate a new fuzzy rule base and the membership function and combine them to generate a second combination mode; Based on a genetic algorithm, the first combination method and the second combination method are iterated to obtain an optimized combination method and generate an optimized fuzzy rule base and an optimized membership function.
5. The brushless DC motor speed control method according to claim 4, characterized in that: The step of generating a first parameter according to the optimized fuzzy rule base and the optimized membership function comprises: According to the optimized fuzzy rule base and the optimized membership function, a combination method of optimizing the fuzzy rule base and the membership function is obtained; According to the initial fuzzy rule base and the initial membership function optimization combination, the optimized speed data of the brushless DC motor corresponding to the target speed is obtained; The first parameter is set according to the optimized speed data of the brushless DC motor.
6. The brushless DC motor speed control method according to claim 1, characterized in that: The generating a second parameter according to the driving current data, the rotation speed data and the error signal through the deep reinforcement learning model includes: Building a simulation environment based on the driving current data and the rotation speed data of the brushless DC motor; Generate a state space according to the driving current data of the brushless DC motor, the speed data and the target speed; According to the state space, a preset action space is corresponded; Setting parameters of a PID control unit according to the action space; setting a reward function based on the error signal; Filtering a pairing relationship between the state space and the preset action space according to the reward function; Constructing a deep Q network model based on the state space, the action space and the reward function; The second parameter is obtained by interactively training the deep Q network model with the simulation environment.
7. The method for controlling the speed of a brushless DC motor according to claim 1, characterized in that: The method of superimposing the current control signal and the current correction signal by a deep sparse autoencoder to generate a drive control signal includes: Setting the number of input layer nodes, the number of hidden layers, and the number of nodes in each hidden layer of the deep sparse autoencoder according to the current control signal and the current correction signal; Add ReLU as the activation function of the deep sparse autoencoder; Calculating mean square error data according to the error signal; Generating a loss function of the deep sparse autoencoder based on the mean square error data; Optimizing the loss function by back propagation algorithm and gradient descent to obtain a reconstruction error loss function; Adding a sparsity penalty term of the deep sparse autoencoder according to L1 regularization; Analyzing and generating an optimized characteristic relationship between the current control signal and the current correction signal based on the reconstruction error loss function and the sparsity penalty term; The driving control signal is generated at the output layer of the deep sparse autoencoder according to the optimized feature relationship.
8. A brushless DC motor speed control system, characterized in that: The brushless DC motor speed control system comprises: A monitoring module is used to perform operation test and rotor monitoring on the brushless DC motor through a Hall sensor and a current sensor, obtain the driving current and speed of the brushless DC motor and generate driving current data and speed data; An analysis and processing module, used for calculating an error signal, generating a first parameter based on an evolutionary algorithm, and a second parameter based on a deep reinforcement learning model; comprising: a fuzzy logic control unit and a PID control unit; the fuzzy logic control unit is used for generating a current control signal according to the first parameter; the PID control unit is used for generating a current correction signal according to the second parameter; A control module is used to generate a drive control signal through a deep sparse autoencoder and perform control according to the brushless DC motor speed control method according to any one of claims 1 to 7.
9. A brushless DC motor speed control device, characterized in that: The brushless DC motor speed control device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instruction in the memory so that the brushless DC motor speed control device executes the brushless DC motor speed control method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the brushless DC motor speed control method according to any one of claims 1 to 7 is implemented.