CN117955378B - DC motor speed regulation control system and control method - Google Patents

DC motor speed regulation control system and control method Download PDF

Info

Publication number
CN117955378B
CN117955378B CN202410132770.5A CN202410132770A CN117955378B CN 117955378 B CN117955378 B CN 117955378B CN 202410132770 A CN202410132770 A CN 202410132770A CN 117955378 B CN117955378 B CN 117955378B
Authority
CN
China
Prior art keywords
direct current
current motor
control signal
control
controller
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410132770.5A
Other languages
Chinese (zh)
Other versions
CN117955378A (en
Inventor
肖正华
陶小波
郑成军
谭子克
罗浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huizhou Woosung Electronics Co ltd
Original Assignee
Huizhou Woosung Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huizhou Woosung Electronics Co ltd filed Critical Huizhou Woosung Electronics Co ltd
Priority to CN202410132770.5A priority Critical patent/CN117955378B/en
Publication of CN117955378A publication Critical patent/CN117955378A/en
Application granted granted Critical
Publication of CN117955378B publication Critical patent/CN117955378B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Control Of Electric Motors In General (AREA)

Abstract

The invention discloses a direct current motor speed regulation control system and a control method, wherein the system comprises a PID control unit, a speed regulation control unit and a speed regulation control unit, wherein the PID control unit is used for performing PID control according to the real-time running speed and the real-time running angle of a direct current motor and outputting a first control signal; the current controller is used for generating a second control signal according to the first control signal and a current signal output by the direct current motor; the driving unit is used for generating a driving signal according to the input signal and the second control signal; the driving unit comprises a resistance measuring module, a prediction module and a gain controller, wherein the resistance measuring module is used for measuring a resistance value to calculate real-time temperature, the prediction module is used for calculating motor amplitude, the gain controller is used for generating a gain control signal according to the real-time temperature and the amplitude, and the gain control signal is amplified by an amplifier and then is used for generating a driving signal for the driving controller. The invention can improve the response speed of the control system by PID setting and current control, reduce steady-state errors, correct control signals in time by monitoring the temperature and the amplitude, prevent overheat damage and improve the performance of the motor.

Description

DC motor speed regulation control system and control method
Technical Field
The invention relates to the technical field of motor control, in particular to a speed regulation control system and a speed regulation control method for a direct current motor.
Background
The direct current motor is widely applied to various mechanical manufacturing fields by virtue of the advantages of quick start and quick response. The PID controller is a controller that outputs a control signal according to a deviation signal, and is composed of three control elements of proportional, integral, and differential. In the control of a direct current motor, a PID controller is often used to control parameters such as current, rotational speed and position of the motor. However, the PID control process is easily interfered by the performance and state parameters of the actual running process of the motor, such as electromagnetic interference, so that the running of the motor is more and more separated from the preset target parameters, the running error is increased, and the running performance of the motor is seriously reduced. Therefore, it is necessary to provide a speed regulation control system for a dc motor, which can improve the accuracy of control signals and reduce the operation error of the motor.
Disclosure of Invention
In order to solve at least one technical problem, the invention provides a speed regulation control system and a speed regulation control method for a direct current motor.
In a first aspect, the present invention provides a speed regulation control system for a dc motor, the system comprising:
PID control unit, current controller and driving unit;
the PID control unit is used for performing PID control according to the real-time running speed and the running angle of the direct current motor and outputting a first control signal;
The current controller is used for generating a second control signal according to the first control signal and a current signal output by the direct current motor;
The driving unit is used for generating a driving signal according to the input signal and the second control signal, and driving the direct current motor to operate by using the driving signal; the driving unit comprises a gain controller, an amplifier, a resistance measurement module, a prediction module and a driving controller;
the resistance measurement module is used for measuring the resistance value of the direct current motor in real time and calculating the real-time temperature of the direct current motor according to the resistance value;
The prediction module is used for acquiring voltage and current feedback signals and inputting the voltage and current feedback signals into the prediction model to obtain the amplitude of the direct current motor;
the gain controller is used for determining a gain control signal according to the input signal and the real-time temperature and amplitude of the direct current motor;
The amplifier is used for amplifying the gain control signal and the second control signal;
the driving controller is used for generating a driving signal according to the amplified gain control signal and the second control signal.
Preferably, the PID control unit includes:
the system comprises a speed and angle detection module, a compensation module and a fuzzy self-adaptive PID controller;
the speed and angle detection module is used for acquiring the running speed and the running angle of the direct current motor in real time through the sensor;
the compensation module is used for inputting the running speed and the running angle of the direct current motor to the friction compensation controller to generate a compensation control signal;
the fuzzy self-adaptive PID controller is used for performing PID parameter setting according to the running speed and the running angle of the direct current motor and the compensation control signal to generate the first control signal.
Preferably, the compensation module is further configured to construct a friction compensation controller, including:
E=Ne+E1+E2
Ne=Wf(v,θ)+e
Wherein N e represents an observation error obtained by adopting a neural network observer, f represents an activation function, W represents an ideal weight matrix of the neural network, e represents an approximation error, v and theta represent the input speed and angle; e 1 denotes a linear stable feedback term, E 2 denotes a nonlinear robust feedback term, and E denotes a compensation control signal.
Preferably, the fuzzy adaptive PID controller is further configured to:
Determining an input error and an error change rate of the fuzzy self-adaptive PID controller according to the running speed and the running angle output by the direct current motor in real time and a preset target speed and a preset target angle;
blurring processing is carried out on the input error and the error change rate by using a membership function;
and determining a fuzzy control rule, and performing deblurring treatment on the membership function by adopting a maximum membership average method to obtain the first control signal.
Preferably, the fuzzy adaptive PID controller is constructed using a genetic algorithm.
Preferably, the prediction module comprises a prediction model trained based on a deep neural network algorithm; wherein training the deep neural network algorithm comprises:
determining an optimization function and a network structure of an initial deep neural network; the network structure comprises at least one input layer, at least one output layer and a plurality of hidden layers;
And acquiring a gradient corresponding to the optimization function by adopting a back propagation algorithm according to the optimization function, and optimizing network parameters of the initial deep neural network by adopting a gradient descent method.
Preferably, the gain controller includes:
The amplitude gain processor is used for calculating the amplitude gain according to the amplitude of the direct current motor and the maximum amplitude of the direct current motor output by the prediction module;
The temperature gain processor is used for calculating the temperature gain according to the real-time temperature and the maximum temperature of the direct current motor;
And the comparison output end is used for outputting the gain control signal according to the amplitude gain and the temperature gain.
In a second aspect, the present invention further provides a speed regulation control method for a dc motor, which is applied to the speed regulation control system for a dc motor according to any one of the embodiments of the first aspect, and the method includes:
collecting the running angle and the running speed of the direct current motor in real time, and performing PID control according to the running angle and the running speed of the direct current motor in real time to obtain a first control signal;
collecting current signals output by the direct current motor in real time, and performing current parameter setting according to the current signals and the first control signals to obtain second control signals;
generating a driving signal according to an input signal and a second control signal of the direct current motor so as to drive the direct current motor to operate; wherein generating the drive signal from the input signal and the second control signal comprises:
measuring the resistance value of the direct current motor in real time, and calculating the real-time temperature of the direct current motor according to the resistance value;
acquiring voltage and current feedback signals input into a direct current motor and inputting the voltage and current feedback signals into a prediction model to obtain the amplitude of the direct current motor;
and determining a gain control signal according to the real-time temperature and the amplitude of the direct current motor, and performing signal amplification on the gain control signal, the input signal and the second control signal to generate a driving signal.
In a third aspect, the present invention also provides an electronic device, including: a processor and a memory for storing computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform a method as described in the first aspect and any one of its possible implementation manners.
In a fourth aspect, the present invention also provides a computer readable storage medium having stored therein a computer program comprising program instructions which, when executed by a processor of an electronic device, cause the processor to perform a method as in the first aspect and any one of the possible implementations thereof.
Compared with the prior art, the invention has the beneficial effects that:
1) The driving unit provided by the invention comprises a gain controller, an amplifier, a resistance measurement module, a prediction module and a driving controller; the resistance measurement module is used for measuring the resistance value of the direct current motor in real time and calculating the real-time temperature of the direct current motor according to the resistance value; the prediction module is used for acquiring voltage and current feedback signals and inputting the voltage and current feedback signals into the prediction model to obtain the amplitude of the direct current motor; the gain controller is used for determining a gain control signal according to the input signal and the real-time temperature and amplitude of the direct current motor; the amplifier is used for amplifying the gain control signal and the second control signal; the driving controller is used for generating a driving signal according to the amplified gain control signal and the second control signal. The prediction model is obtained based on neural network algorithm training, and can rapidly predict the amplitude of the motor after the voltage and current feedback signals are input. Therefore, the invention can quickly obtain the motor amplitude and real-time temperature information, so as to adjust the driving signal according to the amplitude gain, correspondingly correct the amplification factor of the amplifier when the temperature is too high, effectively prevent the motor from being damaged due to the too large amplitude or the too high running temperature, greatly improve the motor performance and prolong the service life of the motor.
2) The invention provides a fuzzy self-adaptive PID tuning method, wherein a fuzzy self-adaptive PID controller is generated based on a genetic algorithm, and a fuzzy logic controller is automatically optimized and designed through the genetic algorithm to carry out fine tuning on PID control parameters so as to realize fuzzy self-adaptive PID control. Compared with a manually designed fuzzy logic device, the method has the advantages of high speed, high precision and good control effect, and the DC motor runs faster to be in a steady state.
3) The PID control unit is further combined with the friction compensation controller, and compensation control signals are obtained through calculation, so that the output precision of the fuzzy self-adaptive PID controller is further improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly describe the embodiments of the present invention or the technical solutions in the background art, the following description will describe the drawings that are required to be used in the embodiments of the present invention or the background art.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the technical aspects of the disclosure.
Fig. 1 is a schematic structural diagram of a dc motor speed regulation control system according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a fuzzy adaptive PID controller according to an embodiment of the invention;
fig. 3 is a schematic flow chart of a speed regulation control method for a dc motor according to an embodiment of the present invention;
fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, may mean including any one or more elements selected from the group consisting of A, B and C.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the invention. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better illustration of the invention. It will be understood by those skilled in the art that the present invention may be practiced without some of these specific details. In some instances, well known methods, procedures, components, and circuits have not been described in detail so as not to obscure the present invention.
The PID control process is easy to be interfered by the performance and state parameters of the actual running process of the motor, such as electromagnetic interference, so that the running of the motor is more and more different from the preset target parameters, the error is increased, and the running performance of the motor is reduced. In order to solve the problem, the invention provides a speed regulation control system of a direct current motor, which can feed back the running amplitude and temperature of the motor, and can greatly reduce the running error of the motor by combining PID (proportion integration differentiation) setting and current control, thereby ensuring the performance of the motor.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a dc motor speed regulation control system according to an embodiment of the present invention. As shown in fig. 1, the speed regulation control system of the direct current motor comprises the following structures:
PID control unit, current controller and driving unit;
the PID control unit is used for performing PID control according to the real-time running speed and the running angle of the direct current motor and outputting a first control signal.
It should be noted that the PID controller is called a proportional-integral-derivative controller, and is composed of a proportional unit P, an integral unit I, and a derivative unit D.
Proportion unit P: proportional control is one of the simplest control modes. The output of the controller is proportional to the input error signal. The larger the scaling factor, the faster the system adjusts, but oscillations may occur. The smaller the scaling factor, the slower the system adjustment speed, but the smaller the range of oscillation.
Integration unit I: the integral control is adjusted based on the accumulated value of the error. The smaller the integral coefficient, the faster the system adjustment speed, but may result in system adjustment hysteresis. The larger the integral coefficient is, the slower the system adjustment speed is, but the adjustment effect is obvious.
Differentiation unit D: the differential control is adjusted according to the rate of change of the error. The larger the differential coefficient, the faster the system adjusts, but oscillations may occur. The smaller the differential coefficient, the slower the system adjustment speed, but the smaller the range of oscillation.
The PID controller works in such a way that the error of the system is gradually reduced by continuously adjusting the control input, and finally, the stable state is achieved. The proportional part adjusts the control input by multiplying by a proportional coefficient such that the control input is proportional to the error. The integrating part adjusts the control input by multiplying an integration time constant such that the control input is proportional to the accumulated value of the error. The differentiating section adjusts the control input by multiplying by a differentiating time constant such that the control input is proportional to the rate of change of the error.
In this embodiment, the running speed and the running angle of the dc motor are first collected in real time, then compared with the corresponding preset target speed and target angle, the speed error and the angle error are calculated to be used as the input of the PID controller, and after the PID setting, the first control signal is generated and sent to the current controller. By adjusting parameters of the PID controller, the motor rotating speed can be accurately controlled, and therefore the performance and efficiency of the motor driving circuit are improved.
The current controller is used for generating a second control signal according to the first control signal and a current signal output by the direct current motor.
A current controller is an electronic device capable of controlling a current, the operating principle of which mainly depends on a feedback control system. When the input power voltage or load changes, the current controller detects the changes and transmits information back to the power supply, and the output current is adjusted by controlling the switching tube or the direct current level of the current controller so as to achieve the target current, voltage and power.
In the current common motor control system, the PID control signal is usually independently applied to the driving circuit of the motor. The current control is mainly adjusted by the feedback current signal, so that the accuracy of the current control is difficult to ensure. Therefore, in this embodiment, after the PID control unit generates the first control signal, the first control signal is sent to the current controller, and the current controller can accurately adjust the current according to the first control signal obtained after PID setting and the current signal fed back by the motor output.
The driving unit is used for generating a driving signal according to the input signal and the second control signal, and driving the direct current motor to operate by using the driving signal.
The main function of the driving unit is to convert the input control signal into a proper current or voltage signal to drive the motor to operate. The control of the electronic device is realized by controlling static or dynamic load current or voltage, so that the device is always in a safe and controllable electrical state. In the motor driving process, the driving unit mainly controls the rotation angle and the running speed of the motor, so that the duty ratio is controlled, and the normal operation of the motor is ensured.
In this embodiment, the driving unit receives the input signal and the current control signal. Assuming that the input signal is a current signal, the driving unit adjusts an initial current signal for controlling the motor to work by using the current control signal, so that the motor can reach a steady-state effect faster. Therefore, the embodiment realizes accurate control on the running process of the direct current motor through PID control, superposition current control and superposition driving conversion.
Specifically, the driving unit comprises a gain controller, an amplifier, a resistance measurement module, a prediction module and a driving controller; wherein,
The resistance measurement module is used for measuring the resistance value of the direct current motor in real time and calculating the real-time temperature of the direct current motor according to the resistance value;
the prediction module is used for acquiring voltage and current feedback signals and inputting the voltage and current feedback signals into the prediction model to obtain the amplitude of the direct current motor;
the gain controller is used for determining a gain control signal according to the input signal and the real-time temperature and amplitude of the direct current motor;
the amplifier is used for amplifying the gain control signal and the second control signal;
the driving controller is used for generating a driving signal according to the amplified gain control signal and the second control signal.
In one embodiment, a gain controller includes:
The amplitude gain processor is used for calculating the amplitude gain according to the amplitude of the direct current motor and the maximum amplitude of the direct current motor output by the prediction module;
The temperature gain processor is used for calculating the temperature gain according to the real-time temperature and the maximum temperature of the direct current motor;
And the comparison output end is used for outputting the gain control signal according to the amplitude gain and the temperature gain.
The gain control signal is outputted by comparing the two gains, the final amplifier adjusts the amplification factor according to the gain control signal, amplifies the driving signal inputted to the motor according to the amplification factor, and outputs the feedback driving signal to drive the direct current motor, so that the feedback driving signal outputted by the amplifier can be ensured to effectively drive the motor, and the motor is ensured not to be mechanically damaged due to overlarge amplitude and also to be prevented from being overheated and damaged by parts caused by temperature influence. Preferably, based on the temperature gain and the amplitude gain, an amplification factor of the adjusting amplifier may be arbitrarily selected, and the specific selection may be adjusted according to actual conditions.
In this embodiment, the prediction model is trained based on a neural network algorithm, and can rapidly predict the amplitude of the motor after the feedback signals of the voltage and the current are input. Therefore, the motor amplitude and real-time temperature information can be obtained rapidly, the driving signal size is adjusted according to the amplitude gain, and the amplification factor of the amplifier is correspondingly corrected when the temperature is too high, so that the motor damage caused by too large amplitude or too high running temperature can be effectively prevented, the motor performance is greatly improved, and the service life of the motor is prolonged.
In a preferred embodiment, the prediction module comprises a prediction model trained based on a deep neural network algorithm; wherein training the deep neural network algorithm comprises:
determining an optimization function and a network structure of an initial deep neural network; the network structure comprises at least one input layer, at least one output layer and a plurality of hidden layers;
And acquiring a gradient corresponding to the optimization function by adopting a back propagation algorithm according to the optimization function, and optimizing network parameters of the initial deep neural network by adopting a gradient descent method.
In this embodiment, the deep neural network is a DNN network, and adopts a fully connected neural network form, including at least one input layer, at least one output layer, and a plurality of hidden layers. Each neuron of the current layer will have access to the input signal of each neuron of the previous layer. In each connection, the signal from the previous layer is multiplied by a weight, added with a bias, and then through a nonlinear activation function, complex mapping of the input space to the output space is achieved through multiple combinations of simple nonlinear functions.
When training a DNN prediction model, the embodiment obtains a large number of data samples, takes current and voltage signals as input and motor amplitude as output, and trains the DNN prediction model until the prediction precision of the model reaches the preset precision. Wherein the loss function adopts any one of mean square error, cross entropy and average absolute percentage error.
In one embodiment, the expression of the optimization function of the initial deep neural network is:
ζ=αζ1+(1-α)ζ2
Where ζ 1 represents an unsupervised self-coding model optimization function, ζ 2 represents a linear class analysis function, and α represents the coefficients of the optimization function of the initial deep neural network.
The unsupervised self-coding model UCA is a deep learning model whose main objective is to learn useful features of the input data, and compress the input data into a low-dimensional coded representation by both the encoder and decoder, and then restore the coded representation to the original data. The main objective of optimizing an unsupervised self-encoding model is to minimize the differences between the input data and the output data so that the inherent structure and regularity of the data can be learned.
The choice of optimization algorithm depends mainly on the type of task being processed and the nature of the data. Typically, optimization algorithms include gradient descent, adam, RMSProp, and the like. To speed up training, the over-fitting phenomenon is reduced. The present embodiment preferably uses a gradient descent method for training.
The linear class analysis function is mainly obtained by adding data class information into the stored initial linear class analysis function according to the input training sample vector set, and specifically comprises the following steps:
Performing relaxation treatment on the initial linear class analysis function by adopting a relaxation algorithm, and performing normalization treatment on an input training sample vector set;
substituting the normalized training sample vector set into the initial linear class analysis function after relaxation treatment to generate a linear class analysis function. Preferably, a relaxation algorithm such as Gaussian-Saudel iteration, jacobi iteration, etc. can be used.
The embodiment adopts a DNN neural network algorithm, and accelerates the model training efficiency and reduces the fitting problem through an optimization function and gradient descent method. By combining an unsupervised self-encoding model, the accuracy of the model's predicted amplitude can be improved. In addition, the prediction model is obtained through training, so that the model can accurately and rapidly predict the amplitude of the motor according to current and voltage feedback signals, and further calculate the amplitude gain, thereby adjusting the coefficient of the amplifier, preventing mechanical damage caused by overlarge amplitude of the motor, ensuring the operation safety of the motor, and prolonging the service life of the motor.
With continued reference to FIG. 1, in a preferred embodiment, the PID control unit comprises the structure:
the system comprises a speed and angle detection module, a compensation module and a fuzzy self-adaptive PID controller;
the speed and angle detection module is used for acquiring the running speed and the running angle of the direct current motor in real time through the sensor;
The compensation module is used for inputting the running speed and the running angle of the direct current motor to the friction compensation controller to generate a compensation control signal;
And the fuzzy self-adaptive PID controller is used for performing PID parameter setting according to the running speed and the running angle of the direct current motor and the compensation control signal to generate the first control signal.
In one embodiment, the compensation module is further configured to construct a friction compensation controller, comprising:
E=Ne+E1+E2
Ne=Wf(v,θ)+e
Wherein N e represents an observation error obtained by adopting a neural network observer, f represents an activation function, W represents an ideal weight matrix of the neural network, e represents an approximation error, v and theta represent the input speed and angle; e 1 denotes a linear stable feedback term, E 2 denotes a nonlinear robust feedback term, and E denotes a compensation control signal.
The PID control unit of the embodiment obtains the compensation control signal through operation by combining the friction compensation controller, and further improves the output precision of the fuzzy self-adaptive PID controller.
Preferably, the fuzzy adaptive PID controller is further configured to:
Determining an input error and an error change rate of the fuzzy self-adaptive PID controller according to the running speed and the running angle output by the direct current motor in real time and a preset target speed and a preset target angle;
blurring processing is carried out on the input error and the error change rate by using a membership function;
and determining a fuzzy control rule, and performing deblurring treatment on the membership function by adopting a maximum membership average method to obtain the first control signal.
Illustratively, the tuning process of the fuzzy adaptive PID controller mainly comprises the following steps:
Quantification of input: the input is projected to a certain number level by a quantization function, typically a number interval symmetrical with respect to 0.
Blurring of input values: the fuzzy subset of the error and the error change rate is determined, and the precision of the fuzzy subset is expressed by selecting 7 linguistic variables such as negative big [ NB ], negative medium [ NM ], negative small [ NS ], zero [ ZO ], positive small [ PS ], medium [ PM ], positive big [ PB ] and the like.
Determining a fuzzy rule base: the fuzzy rule base is the core part of fuzzy control, and contains a series of fuzzy rules for describing the relation between input and output. Determining the fuzzy rule base needs to rely on expert experience and actual data, and the rule of the system operation is observed and analyzed to be converted into the fuzzy rule.
Designing a fuzzy reasoning mechanism: in fuzzy control, an input value is converted into a fuzzy set by blurring it. And then, reasoning is carried out by using the fuzzy rule base, and an output value is determined. The inference process may employ fuzzy logic operations such as fuzzy and, fuzzy or fuzzy non-equal, as well as fuzzy inference methods such as maximum minimum or weighted average, etc.
And (3) performing fuzzy self-tuning: and automatically adjusting parameters of the fuzzy controller according to the real-time response data of the system. Through continuous iteration, the parameters of the fuzzy controller are gradually adjusted to be closest to the response of an actual system.
Implementing a control algorithm: after the fuzzy self-tuning is completed, the obtained fuzzy controller parameters are applied to an actual system. By constantly monitoring and adjusting the control parameters, the system is enabled to achieve a predetermined goal.
The basic idea of fuzzy adaptive PID control is to use the motor error and the error change rate as the input of the controller. In the running process, the change of errors and the error change rate is detected in real time, and the PID parameters are adjusted in real time according to the fuzzy control principle.
Membership functions are important links in the blurring process that map precise quantities to the domains of the respective fuzzy sets. The membership functions are of various kinds, wherein the expression of the triangular membership functions is the simplest, and the required optimization variables are few, so that the triangular membership functions are widely applied to automatic generation fuzzy controllers. However, in the past, the number of membership functions is fixed to 7, and 25 optimization bits of all membership functions in the FC with three outputs of two persons are needed.
After the number of membership functions is fixed, the number of fuzzy rules is also fixed, so that the superiority of the fuzzy controller is not better reflected. And each membership function needs more optimized digits, which causes a certain difficulty to optimization.
Therefore, the membership function optimization method adopted by the embodiment can greatly reduce the number of variables to be optimized. Taking one input as an example, only the number of 2 variables is required to be optimized, and the number of the membership functions and the distribution condition of each membership function are respectively determined. For fuzzy rules, only the distribution of fuzzy rules needs to be optimized. The optimal number of bits for the fuzzy rule in the two-input three-output fuzzy controller is only 5 bits.
Specifically, in a preferred embodiment, the fuzzy adaptive PID controller is constructed using a genetic algorithm.
When the fuzzy controller is automatically generated by utilizing a genetic algorithm, the input scale factors and the output quantization factors are required to be optimized so as to ensure that accurate numerical values can accurately fall in the working range of the membership function of the fuzzy controller through the scale factors. The quantization factor is the opposite, and the output membership function needs to be converted into an accurate value to realize the self-adaptive adjustment of the PID.
Further, determining the coding rule of the genetic algorithm, and optimizing the number of membership functions of the input and the output, the distribution condition of the membership functions and the constitution condition of the fuzzy rule, 2 scale factors and 3 quantization factors of the fuzzy self-adaptive PID controller, namely a 2-input and 3-output structure.
And determining an fitness function, and generating the fitness function selected by the fuzzy controller parameters by adopting the error absolute value time integral performance index as a genetic algorithm. The selection of the objective function in the genetic algorithm is very important, and determines whether the algorithm can reach the expected control objective. Wherein, the expression of the objective function is as follows:
Where e (t) represents an error in the controlled variable of the dc motor, u (t) represents an input variable of the dc motor, t U represents a rise time, and w 1、w2、w3 represents a weight. Here, by adding the term u 2 (t), the control amount can be effectively prevented from being excessively large.
The overshoot is not expected to occur in the direct current motor speed control, the overshoot is introduced into an objective function, the motor speed overshoot can be effectively controlled, and the objective function is converted into a new objective function, as shown in the following formula:
Where ey (t) =y (t) -y (t-1), y (t) is the controlled object output, w 4 is the weight, and w 1 is larger than w.
Further, in order to avoid premature maturation caused by too many identical chromosomes in the genetic algorithm evolution, a selection mechanism combining random selection without playback remainder and an optimal preservation strategy is adopted. It is ensured that chromosomes of each generation having a higher fitness than the average fitness can be inherited into the next generation population, while chromosomes of each generation having the highest fitness can be inherited into the next generation population.
The crossover and mutation operation is an important link of the genetic algorithm, but the crossover factor and the mutation factor are fixed values in the past, so that the crossover and mutation factor cannot be adjusted in a self-adaptive way. Therefore, the self-adaptive crossover factor and the variation factor are adopted, so that the evolution efficiency of the genetic algorithm is improved. The adaptive crossover factor and the mutation factor are expressed as follows:
Wherein: f m、fa is the maximum fitness and average fitness value of the current population; f 1 is the fitness value in the two crossing chromosomes; f 2 is the fitness value of the variant chromosome; p c1 and p c2 are preset crossover factors, and the preferential values are 0.85 and 0.6; p m1 and p m2 are mutation factors set in advance, and the preferential values are 0.1 and 0.001.
Therefore, by formulating a genetic coding rule, determining an fitness function, selecting a fuzzy mechanism and performing crossover and mutation operation, the fuzzy self-adaptive PID controller after optimizing based on a genetic algorithm can be finally obtained.
The embodiment adopts fuzzy self-adaptive PID tuning, the fuzzy self-adaptive PID controller is generated based on a genetic algorithm, and the fuzzy logic controller is automatically optimized and designed through the genetic algorithm to carry out fine tuning on PID control parameters so as to realize fuzzy self-adaptive PID control. Compared with a manual design fuzzy logic device, the method has the advantages of high speed, high precision and good control effect.
Referring to fig. 3, based on the dc motor speed regulation control system provided in the foregoing embodiment, in one embodiment, there is further provided a dc motor speed regulation control method, where the method includes:
s10, acquiring the running angle and the running speed of the direct current motor in real time, and performing PID control according to the running angle and the running speed of the direct current motor in real time to obtain a first control signal;
s20, collecting current signals output by the direct current motor in real time, and performing current parameter setting according to the current signals and the first control signals to obtain second control signals;
S30, generating a driving signal according to an input signal of the direct current motor and a second control signal to drive the direct current motor to operate; wherein generating the drive signal from the input signal and the second control signal comprises:
S40, measuring the resistance value of the direct current motor in real time, and calculating the real-time temperature of the direct current motor according to the resistance value;
S50, acquiring voltage and current feedback signals input into the direct current motor, and inputting the voltage and current feedback signals into a prediction model to obtain the amplitude of the direct current motor;
And S60, determining a gain control signal according to the real-time temperature and the amplitude of the direct current motor, and performing signal amplification on the gain control signal, the input signal and the second control signal to generate a driving signal.
It can be understood that the method provided by the embodiment can achieve the effects achieved by the speed regulation control system of the direct current motor, and specifically includes:
1) The prediction model is obtained based on neural network algorithm training, and can rapidly predict the amplitude of the motor after the voltage and current feedback signals are input. Therefore, the motor amplitude and real-time temperature information can be obtained rapidly, the driving signal is adjusted according to the amplitude gain, the amplification factor of the amplifier is correspondingly corrected when the temperature is too high, the motor damage caused by too large amplitude or too high running temperature can be effectively prevented, the motor performance is greatly improved, and the service life of the motor is prolonged.
2) The fuzzy self-adaptive PID controller is generated based on a genetic algorithm, and the fuzzy self-adaptive PID controller is automatically optimized and designed through the genetic algorithm to finely adjust PID control parameters so as to realize fuzzy self-adaptive PID control. Compared with a manual design fuzzy logic device, the method has the advantages of high speed, high precision and good control effect. In addition, due to the combination of the friction compensation control signal, the output precision of the fuzzy self-adaptive PID controller can be further improved, so that the DC motor runs faster and tends to be steady.
An embodiment of the present invention further provides an electronic device, including: a processor, a transmitting means, an input means, an output means and a memory for storing computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform a method as any one of the possible implementations described above.
An embodiment of the invention also provides a computer-readable storage medium in which a computer program is stored, the computer program comprising program instructions which, when executed by a processor of an electronic device, cause the processor to perform a method as any one of the possible implementations described above.
Referring to fig. 4, fig. 4 is a schematic hardware structure of an electronic device according to an embodiment of the invention.
The electronic device 2 comprises a processor 21, a memory 22, input means 23, output means 24. The processor 21, memory 22, input device 23, and output device 24 are coupled by connectors including various interfaces, transmission lines or buses, etc., as are not limited by the present embodiments. It should be appreciated that in various embodiments of the invention, coupled is intended to mean interconnected by a particular means, including directly or indirectly through other devices, e.g., through various interfaces, transmission lines, buses, etc.
The processor 21 may be one or more graphics processors (graphics processing unit, GPUs), which in the case of a GPU as the processor 21 may be a single core GPU or a multi-core GPU. Alternatively, the processor 21 may be a processor group formed by a plurality of GPUs, and the plurality of processors are coupled to each other through one or more buses. In the alternative, the processor may be another type of processor, and the embodiment of the invention is not limited.
Memory 22 may be used to store computer program instructions as well as various types of computer program code for performing aspects of the present invention. Optionally, the memory includes, but is not limited to, random access memory (random access memory, RAM), read-only memory (ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable read-only memory (compact disc read-only memory, CD-ROM) for associated instructions and data.
The input means 23 are for inputting data and/or signals and the output means 24 are for outputting data and/or signals. The input device 23 and the output device 24 may be separate devices or may be an integral device.
It will be appreciated that in embodiments of the present invention, the memory 22 may not only be used to store relevant instructions, but embodiments of the present invention are not limited to the specific data stored in the memory.
It will be appreciated that fig. 4 shows only a simplified design of an electronic device. In practical applications, the electronic device may further include other necessary elements, including but not limited to any number of input/output devices, processors, memories, etc., and all video parsing devices capable of implementing the embodiments of the present invention are within the scope of the present invention.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein. It will be further apparent to those skilled in the art that the descriptions of the various embodiments of the present invention are provided with emphasis, and that the same or similar parts may not be described in detail in different embodiments for convenience and brevity of description, and thus, parts not described in one embodiment or in detail may be referred to in description of other embodiments.
In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted across a computer-readable storage medium. The computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disk (DIGITAL VERSATILEDISC, DVD)), or a semiconductor medium (e.g., a Solid State Disk (SSD)), or the like.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: a read-only memory (ROM) or a random-access memory (random access memory, RAM), a magnetic disk or an optical disk, or the like.

Claims (10)

1. A direct current motor speed regulation control system, the system comprising:
PID control unit, current controller and driving unit;
the PID control unit is used for performing PID control according to the real-time running speed and the running angle of the direct current motor and outputting a first control signal;
The current controller is used for generating a second control signal according to the first control signal and a current signal output by the direct current motor;
The driving unit is used for generating a driving signal according to the input signal and the second control signal, and driving the direct current motor to operate by using the driving signal; the driving unit comprises a gain controller, an amplifier, a resistance measurement module, a prediction module and a driving controller;
the resistance measurement module is used for measuring the resistance value of the direct current motor in real time and calculating the real-time temperature of the direct current motor according to the resistance value;
The prediction module is used for acquiring voltage and current feedback signals and inputting the voltage and current feedback signals into the prediction model to obtain the amplitude of the direct current motor;
the gain controller is used for determining a gain control signal according to the input signal and the real-time temperature and amplitude of the direct current motor;
The amplifier is used for amplifying the gain control signal and the second control signal;
the driving controller is used for generating a driving signal according to the amplified gain control signal and the second control signal.
2. The direct current motor speed regulation control system according to claim 1, wherein the PID control unit includes:
the system comprises a speed and angle detection module, a compensation module and a fuzzy self-adaptive PID controller;
the speed and angle detection module is used for acquiring the running speed and the running angle of the direct current motor in real time through the sensor;
the compensation module is used for inputting the running speed and the running angle of the direct current motor to the friction compensation controller to generate a compensation control signal;
the fuzzy self-adaptive PID controller is used for performing PID parameter setting according to the running speed and the running angle of the direct current motor and the compensation control signal to generate the first control signal.
3. The direct current motor speed control system of claim 2, wherein the compensation module is further configured to construct a friction compensation controller comprising:
E=Ne+E1+E2
Ne=Wf(v,θ)+e
Wherein N e represents an observation error obtained by adopting a neural network observer, f represents an activation function, W represents an ideal weight matrix of the neural network, e represents an approximation error, v and theta represent the input speed and angle; e 1 denotes a linear stable feedback term, E 2 denotes a nonlinear robust feedback term, and E denotes a compensation control signal.
4. The direct current motor speed regulation control system of claim 2, wherein the fuzzy adaptive PID controller is further configured to:
Determining an input error and an error change rate of the fuzzy self-adaptive PID controller according to the running speed and the running angle output by the direct current motor in real time and a preset target speed and a preset target angle;
blurring processing is carried out on the input error and the error change rate by using a membership function;
and determining a fuzzy control rule, and performing deblurring treatment on the membership function by adopting a maximum membership average method to obtain the first control signal.
5. The direct current motor speed regulation control system of claim 2, wherein the fuzzy adaptive PID controller is constructed using a genetic algorithm.
6. The direct current motor speed regulation control system according to claim 1, wherein the prediction module comprises a prediction model trained based on a deep neural network algorithm; wherein training the deep neural network algorithm comprises:
determining an optimization function and a network structure of an initial deep neural network; the network structure comprises at least one input layer, at least one output layer and a plurality of hidden layers;
And acquiring a gradient corresponding to the optimization function by adopting a back propagation algorithm according to the optimization function, and optimizing network parameters of the initial deep neural network by adopting a gradient descent method.
7. The direct current motor speed regulation control system of claim 1, wherein the gain controller comprises:
The amplitude gain processor is used for calculating the amplitude gain according to the amplitude of the direct current motor and the maximum amplitude of the direct current motor output by the prediction module;
The temperature gain processor is used for calculating the temperature gain according to the real-time temperature and the maximum temperature of the direct current motor;
And the comparison output end is used for outputting the gain control signal according to the amplitude gain and the temperature gain.
8. A method for controlling speed regulation of a direct current motor, applied to a speed regulation control system of a direct current motor according to any one of claims 1 to 7, comprising:
collecting the running angle and the running speed of the direct current motor in real time, and performing PID control according to the running angle and the running speed of the direct current motor in real time to obtain a first control signal;
collecting current signals output by the direct current motor in real time, and performing current parameter setting according to the current signals and the first control signals to obtain second control signals;
generating a driving signal according to an input signal and a second control signal of the direct current motor so as to drive the direct current motor to operate; wherein generating the drive signal from the input signal and the second control signal comprises:
measuring the resistance value of the direct current motor in real time, and calculating the real-time temperature of the direct current motor according to the resistance value;
acquiring voltage and current feedback signals input into a direct current motor and inputting the voltage and current feedback signals into a prediction model to obtain the amplitude of the direct current motor;
and determining a gain control signal according to the real-time temperature and the amplitude of the direct current motor, and performing signal amplification on the gain control signal, the input signal and the second control signal to generate a driving signal.
9. An electronic device, comprising: a processor and a memory for storing computer program code comprising computer instructions which, when executed by the processor, cause the electronic device to perform the dc motor governor control method of claim 8.
10. A computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, the computer program comprising program instructions which, when executed by a processor of an electronic device, cause the processor to perform the dc motor speed regulation control method of claim 8.
CN202410132770.5A 2024-01-31 2024-01-31 DC motor speed regulation control system and control method Active CN117955378B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410132770.5A CN117955378B (en) 2024-01-31 2024-01-31 DC motor speed regulation control system and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410132770.5A CN117955378B (en) 2024-01-31 2024-01-31 DC motor speed regulation control system and control method

Publications (2)

Publication Number Publication Date
CN117955378A CN117955378A (en) 2024-04-30
CN117955378B true CN117955378B (en) 2024-06-14

Family

ID=90803465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410132770.5A Active CN117955378B (en) 2024-01-31 2024-01-31 DC motor speed regulation control system and control method

Country Status (1)

Country Link
CN (1) CN117955378B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107359836A (en) * 2017-08-31 2017-11-17 南京越博电驱动系统有限公司 A kind of frequency-variable closed governing system and method based on PLC pid algorithms
CN112072961A (en) * 2020-08-27 2020-12-11 吉林大学 Brushless DC motor speed control system based on ANFIS

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103618486A (en) * 2013-11-30 2014-03-05 国网河南省电力公司平顶山供电公司 Fuzzy-control direct-current motor speed control method
KR101646346B1 (en) * 2014-09-23 2016-08-05 현대자동차주식회사 Apparatus and method for controlling motor
CN115051601A (en) * 2022-07-18 2022-09-13 湖南科技大学 Disturbance compensation and tracking control method for variable-speed rotating direct-current motor servo system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107359836A (en) * 2017-08-31 2017-11-17 南京越博电驱动系统有限公司 A kind of frequency-variable closed governing system and method based on PLC pid algorithms
CN112072961A (en) * 2020-08-27 2020-12-11 吉林大学 Brushless DC motor speed control system based on ANFIS

Also Published As

Publication number Publication date
CN117955378A (en) 2024-04-30

Similar Documents

Publication Publication Date Title
Li et al. Genetic algorithm automated approach to the design of sliding mode control systems
KR100194377B1 (en) Apparatus and Method for Gain Determination of Feed Controller Using Genetic Theory
EP1040392B1 (en) Method of predicting overshoot in a control system response
CN103123460A (en) Temperature control system and temperature control method
WO1992007311A1 (en) Universal process control using artificial neural networks
Li et al. Artificial evolution of neural networks and its application to feedback control
Milovanović et al. Adaptive PID control based on orthogonal endocrine neural networks
CN104155877A (en) Brushless DC motor fuzzy control system based on genetic algorithm and control method thereof
KR20130126125A (en) Method for controlling constant pressure using fuzzy pid controller
CN117955378B (en) DC motor speed regulation control system and control method
Dias et al. A self-organizing fuzzy controller with a fixed maximum number of rules and an adaptive similarity factor
Durnyak et al. Simulation of a combined robust system with a P-fuzzy controller
Siddique et al. GA-based neural fuzzy control of flexible-link manipulators
CN112947054A (en) Ship PID control parameter setting method and system based on Q-learning and storage medium
KR100310609B1 (en) Coefficient adjusting apparatus of proportional integral derivative(pid) controller
Bahgaat et al. Application of some modern techniques in load frequency control in power systems
Rashidi et al. Speed regulation of DC motors using intelligent controllers
Achiammal et al. Optimal tuning of PI controller using genetic algorithm for power electronic converter
Singh et al. Neuro-evolutionary based controller design for linear and non-linear systems
Gross et al. A comparison of tuning methods for PID-controllers with fuzzy and neural network controllers
Xu et al. Intelligent PID Controller on Soft Computing.
Alam Dynamic modelling of flexible manipulator system using genetic algorithm
CN116845913A (en) Power system safety control method and device based on multi-time space scale frequency
Jeong A study for learning method of modified PID controller with on-line hybrid genetic algorithm
Durnyak et al. Synthesis and Modeling of Systems with Combined Fuzzy P+ I-Regulators

Legal Events

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