A motor rotating speed loop ADRC controller parameter optimization method
By optimizing the motor speed loop parameters using an adaptive genetic algorithm and combining it with PI and ADRC control, the problems of low efficiency and local optima in traditional genetic algorithms are solved, achieving more efficient motor speed control.
Patent Information
- Application Number
- CN202411369983.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2044-09-29
AI Technical Summary
Traditional genetic algorithms suffer from low optimization efficiency, premature convergence, and getting trapped in local optima when optimizing the parameters of the motor speed loop ADRC controller, which affects the algorithm's performance and efficiency.
An adaptive genetic algorithm was used to optimize the motor speed loop parameters. By adjusting the crossover and mutation probabilities and combining PI control and ADRC control, the global search capability of the genetic algorithm was improved. Simulation experiments were conducted in Matlab/Simulink.
It improves optimization efficiency, can find the global optimal solution faster, improves the stability and dynamic performance of motor speed control, and solves the shortcomings of traditional genetic algorithms.
Smart Images

Figure CN119356416B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of swarm intelligence optimization algorithm, and particularly relates to a motor speed loop ADRC controller parameter optimization method. BACKGROUND
[0002] The motion turntable is a kind of high-precision position servo system, which is widely used in military and civilian fields, and plays an important role in aircraft design experiment, radar servo control system, quantum communication field and the like. The motor control system as an important part of the turntable system, the motor speed control is very important. With the development of society and the progress of science and technology, the performance requirements of the turntable servo system are also getting higher and higher, not only requiring high stability precision and good dynamic quality, but also having certain anti-interference ability.
[0003] The research direction of domestic and foreign scholars is mostly focused on the innovation and improvement of control algorithm, and many control strategies are proposed to improve the performance of the motion turntable, such as sliding film control, backstepping control, neural network control and the like. The active disturbance rejection control technology (ADRC) has certain anti-interference ability, but the controller has too many parameters, and it is difficult to obtain an optimal solution during setting, so it is necessary to select a certain method for parameter optimization. The swarm intelligence optimization algorithm refers to a method of searching for the optimal fitness in a certain solution space to obtain the optimal solution by simulating some laws in nature, which simulates the behavior law of biological groups and embodies the participation, aggregation and cooperative behavior of biological groups. The swarm intelligence optimization algorithm has also been very mature, such as simulated annealing algorithm, genetic algorithm, ant colony algorithm, particle swarm optimization algorithm, sparrow search algorithm and the like.
[0004] The genetic algorithm is a relatively classical heuristic algorithm, which is evolved according to the genetic evolution process of organisms in nature, has strong global optimization ability, does not depend on the specific field of the problem, and has strong robustness to the type of problem, and is widely used in many scientific fields. However, the genetic algorithm also has the defect of falling into a local optimal solution, and the traditional genetic algorithm has problems of low optimization efficiency and premature convergence, so it is necessary to improve the traditional genetic algorithm and improve the optimization efficiency. SUMMARY
[0005] In view of the above technical problems, the present application provides a motor speed loop ADRC controller parameter optimization method, which applies an adaptive genetic algorithm to the speed loop of the motor for simulation experiment, wherein the current loop of the motor adopts PI control, the bandwidth of the current loop is adjusted by adjusting the parameters to meet the control requirements of the speed, and the ADRC control is adopted for the control of the motor speed loop, and the S-function is built and written in Matlab / Simulink to realize the ADRC control simulation.
[0006] Wherein, the permanent magnet DC torque motor in constant magnetic field excitation voltage balance equation is:
[0007]
[0008] E g =K e ω M
[0009] In the formula, t is time, E g is motor back electromotive force, K e is motor back electromotive force coefficient, ω M is motor speed, U a is the voltage on the armature winding, I a is armature current, R a is the armature winding resistance, L a is the armature winding inductance;
[0010] Motor torque satisfies:
[0011]
[0012] In the formula, motor torque T M =K t I a , K t is torque coefficient, T L is converted to the load torque on the motor shaft, J Ges is the total moment of inertia converted to the motor shaft;
[0013] PWM power amplifier as a lagging amplification link, its transfer function mathematical model is
[0014]
[0015] In the formula, K PWM is the power amplifier amplification, T PWM is the time constant of power amplifier;
[0016] PWM power amplifier in series to the armature circuit, the current feedback from the armature, the current PI control is added to the driver to form a current loop;
[0017] The input of the current loop is through the armature current, the output of the current loop is the speed of the motor.
[0018] Further, the speed of the motor is controlled by the active disturbance rejection control technology of the second order active disturbance rejection controller; the active disturbance rejection control technology is a nonlinear control method, and the second order active disturbance rejection controller comprises a tracking differentiator (TD), an extended state observer (ESO) and a nonlinear state error feedback control law (NLSEF).
[0019] Further, the differential form of the tracking differentiator is as follows:
[0020]
[0021] In the formula, k is the kth sampling, T is the sampling period, v1 is the tracking signal of the input signal v, v2 is the differential signal of the input signal v, r0 is a speed factor, h0 is a filter factor, and the fastest control synthesis function fst(x1, x2, r0, h0) is defined as:
[0022]
[0023] In formula (5), all the parameters in front of fst are intermediate variables, and fst is the output value of the function.
[0024] Further, the differential form of the extended state observer is as follows:
[0025]
[0026] In the formula, u is the system input, y is the system output, z i (i=1, 2, 3) are output variables of the extended state observer, and α i (i=1, 2) and β 0i (i=1, 2, 3) are step parameters, and fal is a nonlinear function, the expression of which is as follows:
[0027]
[0028] Further, the nonlinear state error feedback control law is as follows:
[0029]
[0030] In the formula, u0 is the error feedback control amount, β1 and β2 are both adjustable gains, and b0 is a system control gain.
[0031] Further, the adaptive genetic algorithm includes crossover and mutation operations, and the fitness of individuals in the population is used as a reference index for the crossover probability and the mutation probability, so as to screen out excellent individuals.
[0032] Further, the crossover probability of the adaptive genetic algorithm is as follows:
[0033]
[0034] In the formula, P c is the crossover probability, f c is the fitness of the first parent before crossover, f max , f minMax and Min are the maximum and minimum of fitness in the population respectively, and k1, k2, k3 are constants between 0 and 1.
[0035] Further, the mutation operation is usually used in conjunction with the crossover operation to improve the global search performance of the algorithm, and the mutation operation effectively accelerates the convergence speed of the algorithm when the algorithm is close to the optimal solution. The mutation probability of the adaptive genetic algorithm is:
[0036]
[0037] where P is the mutation probability, and k4, k5, k6 are constants between 0 and 1. m
[0038] Further, the adaptive genetic algorithm steps are:
[0039] S1, encode the parameters to be optimized, set the population size and the maximum number of iterations, and generate an initial population;
[0040] S2, select a fitness function to evaluate the fitness of each individual in the population;
[0041] S3, select two by two, eliminate individuals with low fitness, and at the same time, copy individuals with high fitness;
[0042] S4, according to the adaptive crossover probability, the selected individuals are subjected to crossover operation;
[0043] S5, according to the adaptive mutation probability, the selected individuals are subjected to mutation operation to generate new individuals;
[0044] S6, repeat steps S2-S5, and judge whether the maximum number of iterations is reached or the fitness converges to a set value;
[0045] S7, output the final result.
[0046] Compared with the prior art, the present application has the following beneficial effects: (1) the present application solves the defects of the traditional genetic algorithm that falls into a local optimal solution, improves the traditional genetic algorithm, and improves the optimization efficiency; (2) the present application improves the adaptive genetic algorithm, applies the algorithm to the speed loop of the motor, uses PI control for the current loop of the motor, adjusts the parameters to a larger bandwidth to meet the control requirements of the speed, and carries out simulation experiments; (3) the present application solves the problem that the parameters of the traditional genetic algorithm are fixed and unchangeable in the optimization process, which affects the performance and efficiency of the algorithm to some extent; (4) the present application can adaptively adjust the parameters in the genetic algorithm, and the selection of the crossover probability and the mutation probability has a great effect on the accurate search of the global optimum of the genetic algorithm; the present application optimizes and adjusts the traditional genetic algorithm, takes the fitness of the individual in the population as an important reference index of the crossover probability and the mutation probability, and thus better selects excellent individuals. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 It is a schematic diagram of the current loop of the present application.
[0048] Figure 2 It is a second-order ADRC control block diagram of the present application.
[0049] Figure 3 It is a flowchart of the improved genetic algorithm of the present application.
[0050] Figure 4 It is a current loop closed-loop bode diagram of the present application.
[0051] Figure 5 It is a Simulink simulation block diagram of the present application.
[0052] Figure 6 It is a schematic diagram of the improved genetic algorithm in parameter optimization of the present application.
[0053] Figure 7 It is a time domain response diagram of the motor speed loop of the present application.
[0054] Figure 8 It is a convergence curve of the present application. DETAILED DESCRIPTION
[0055] The present application will be further described below in combination with specific embodiments, and the illustrative embodiments of the present application and the description are used to explain the present application, but are not as a limitation on the present application.
[0056] Genetic algorithm is a relatively classic heuristic algorithm, which is evolved according to the genetic evolution process of creatures in nature, has strong global optimization ability, does not depend on the specific field of the problem, has strong robustness to the type of problem, and is widely used in many scientific fields. However, genetic algorithm also has the defect of falling into local optimal solution, and improving the traditional genetic algorithm and improving the optimization efficiency are also problems to be solved at present.
[0057] The application aims at the low optimization efficiency and premature convergence of the traditional genetic algorithm, and proposes a motor speed loop ADRC controller parameter optimization method.
[0058] Embodiment: as shown in a motor speed loop ADRC controller parameter optimization method, the adaptive genetic algorithm is applied to the simulation experiment of the speed loop of the motor, wherein the current loop of the motor adopts PI control, the bandwidth of the current loop is adjusted by adjusting the parameters to meet the control requirements of the speed, and the ADRC control is adopted for the control of the motor speed loop, and the S-function is built and written in Matlab / Simulink to realize the ADRC control simulation. Figures 1-8
[0059] Among them, the voltage balance equation of the permanent magnet DC torque motor under the condition of constant magnetic field excitation is:
[0060]
[0061] E g =K e ω M
[0062] In the formula, t is time, E g is motor back electromotive force, K e is motor back electromotive force coefficient, ω M is motor speed, U a is the voltage on the armature winding, I a is armature current, R a is armature winding resistance, L a is armature winding inductance.
[0063] The motor torque satisfies:
[0064]
[0065] In the formula, the motor torque T M =K t I a , K t is torque coefficient, T L is the load torque converted to the motor shaft, J Ges is the total moment of inertia converted to the motor shaft.
[0066] The transfer function mathematical model of the PWM power amplifier as a lagging amplification link is
[0067]
[0068] In the formula, K PWM is the amplification of the power amplifier, T PWM is the time constant of the power amplifier;
[0069] The PWM power amplifier is connected in series to the armature circuit, the current is fed back from the armature, and the current PI control is added in the driver to constitute a current loop; in order to make the speed loop as an outer loop have a certain bandwidth, the bandwidth of the current loop as an inner loop should be sufficient, that is, it can quickly respond to the expected current. It can be seen that the input of the current loop is the armature current, and the output is the speed of the motor, and the control block diagram is as shown in Figure 1 , and then the speed of the motor is controlled, and the active disturbance rejection control technology is adopted here.
[0070] The active disturbance rejection control technology is a nonlinear control method, and the advantages of the control method are that the controlled object does not require an accurate mathematical model, and the uncertainty factors in system modeling and external disturbances in the system are tracked and compensated as the same disturbance in the system, and the control method has strong robustness. A typical second-order active disturbance rejection controller is as shown in Figure 2 .
[0071] The second-order active disturbance rejection controller includes a tracking differentiator (TD), an extended state observer (ESO), and a nonlinear state error feedback control law (NLSEF).
[0072] The differential form of the tracking differentiator is as follows:
[0073]
[0074] In the formula, k is the kth sampling, T is the sampling period, v1 is the tracking signal of the input signal v, v2 is the differential signal of the input signal v, r0 is a speed factor, h0 is a filter factor, and the fastest control synthesis function fst(x1, x2, r0, h0) is defined as:
[0075]
[0076] In formula (5), all the parameters in front of fst are intermediate variables, and fst is the output value of the function.
[0077] Further, the differential form of the extended state observer is as follows:
[0078]
[0079] where u is the system input, y is the system output, z i (i = 1, 2, 3) are output variables of the extended state observer, and a i (i = 1, 2) and β 0i (i = 1, 2, 3) are step parameters, and fal is a nonlinear function, and its expression is:
[0080]
[0081] The nonlinear state error feedback control law is
[0082]
[0083] where u0 is the error feedback control amount, β1 and β2 are adjustable gains, and b0 is a system control gain.
[0084] From the discrete implementation forms of the three parts of the above active disturbance rejection controller, TD, ESO and NLSEF, there are many parameters that need to be adjusted, such as (T, r0, h0, β 01 , β 02 , β 03 , β1, β2, b, δ1, δ2, a1, a2, a3, a4) and the like, and the control parameters of the ADRC are numerous, but some can be estimated according to experience in advance, and generally are not changed, and there are also six or seven parameters that need to be debugged, and the remaining parameters need to be optimized.
[0085] The genetic algorithm is a kind of random optimization algorithm, and has no too many mathematical requirements for the optimization problem to be solved, and the application scene and range are relatively wide. The genetic algorithm simulates the evolution of organisms in the natural environment, and has selection, crossover, mutation and the like, and although the global optimum can be obtained to a certain extent, there are still limitations when facing some complex problems. In the optimization process of the traditional genetic algorithm, the parameters are fixed and unchangeable, which will affect the algorithm performance and efficiency to a certain extent. Therefore, we can adaptively adjust the parameters in the genetic algorithm, and the selection of the crossover probability and the mutation probability has a great effect on the accurate search of the global optimum of the genetic algorithm. The present application makes some optimization adjustment to the traditional genetic algorithm, and takes the fitness of the individuals in the population as an important reference index of the crossover probability and the mutation probability, so as to better screen out excellent individuals.
[0086] Adaptive crossover probability: the crossover probability is the only index of the crossover operation strength, and the selection of its value is very important. If the crossover probability is too large, although the search strength of the algorithm will be further increased, the overall efficiency of the algorithm will be affected. If the crossover probability is too small, the algorithm is likely to become slow and inefficient.
[0087] For this, here according to the fitness value of the individual is constantly adjusting the crossover probability, adaptive genetic algorithm crossover probability is:
[0088]
[0089] In the formula P c Is the crossover probability, f c Is the crossover of the two parents higher fitness fitness, f max ,f min The maximum and minimum value of fitness in the population respectively, k1, k2, k3 are 0-1 constant.
[0090] Adaptive mutation probability: mutation operation is usually used in conjunction with crossover operation, improve the global search performance of the algorithm, in the algorithm is about to approach the optimal solution, can effectively accelerate the convergence speed of the algorithm through appropriate mutation operation. Similarly, similar to adaptive crossover probability, the mutation probability of adaptive genetic algorithm is:
[0091]
[0092] In the formula, P m Is the mutation probability, k4, k5, k6 is 0-1 constant.
[0093] After the above improvement, the improved adaptive genetic algorithm steps in the application are:
[0094] S1, the parameters to be optimized are coded, the population size and the maximum iteration number are set, and the initial population is generated;
[0095] S2, select the fitness function to evaluate the fitness of each individual in the population;
[0096] S3, two two selection operation, eliminate the low fitness individuals, and at the same time copy the high fitness individuals;
[0097] S4, according to the adaptive crossover probability, the selected individuals are crossed;
[0098] S5, according to the adaptive mutation probability, the selected individuals are mutated to produce new individuals;
[0099] S6, repeat steps S2-S5, determine whether the maximum iteration number is reached or the fitness converges to the set value;
[0100] S7, output the final result.
[0101] The following example is given to illustrate that in the system simulation model, consider the DC motor torque and current loop model as shown in Figure 1 The specific parameters of the model are as follows:
[0102]
[0103] Adjust the proportion and integral gain of the current loop, and then use the Control Design module of Simulink to measure the bandwidth of the adjusted current loop, which is 130Hz, as shown in Figure 4 The input of the control system composed of the current loop and the motor model is the current, and the output is the motor speed.
[0104] Next, the ADRC controller is built. Each S-function needs to define the number of input and output variables, the number of state variables, and write the initialization sub-function, state update sub-function and output sub-function of each S-function according to formulas (4)-(8). It should be noted that the step size in the discrete state update sub-function should be consistent with the step size in Simulink, otherwise the simulation result will be wrong. After writing each S-function module, the input and output of each module are connected, and finally the ADRC controller is connected with the motor control system containing the current loop, and the speed is taken as the feedback, so the Simulink model of the motor speed loop control based on the ADRC controller is built. Figure 2
[0105] Because there are too many parameters of active disturbance rejection control, it is difficult to set them, so it is necessary to find a set of optimal control parameters. Some of the parameters can be estimated according to experience, so there is no need to optimize them in the algorithm, which reduces the computational complexity.
[0106] Here, T=0.0001, a1=0.5, a2=0.25, a3=0.75, a4=1.5, δ1=0.02, δ2=0.0025, and the remaining parameters are optimized according to the improved adaptive genetic algorithm described above. The cost function and the fitness function have similar effects, but the numerical values are opposite. The higher the cost, the lower the fitness, and vice versa. The cost function is used instead of the fitness function here;
[0107] The expression of the cost function is:
[0108] J=∫t|e(t)|dt (11)
[0109] In the formula, e(t) represents the error between the expected value of the system at time t and the actual value of the system output, and the cost function represents the cumulative error in this period of time.
[0110] In Matlab, a population Chrom[num, size] is initialized, num represents population quantity, size represents gene number, a row of matrix Chrom[num, size] is taken as a set of parameters (an individual) to be optimized, each column of an individual represents a gene bit, and the improved genetic algorithm proposed in the application is used for iteration for 150 generations, and the final optimization result of the parameters is as follows:
[0111]
[0112] The optimized parameters are brought into the simulation model of the built motor speed loop for simulation, and the step response is as shown in Figure 7 It can be seen that the step response time and overshoot are smaller than those of the traditional genetic algorithm, so the optimized parameters of the improved algorithm are superior to those of the traditional algorithm. In addition, the curve of the cost function J with the change of iteration number is as shown in Figure 8 It can also be seen that the parameters optimized by the improved genetic algorithm can make the cost function smaller and more easily search for the global optimal solution, and find a better solution than the traditional algorithm.
Claims
1. A motor speed loop ADRC controller parameter optimization method, characterized in that, The adaptive genetic algorithm is applied to the simulation experiment of the speed loop of the motor, a PI control is used for the current loop of the motor, the bandwidth of the current loop is adjusted by adjusting parameters to meet the control requirement of the speed, and the ADRC control is used for the control of the motor speed loop, and an S-function is built and written in Matlab / Simulink to realize the ADRC control simulation. The voltage balance equation of the permanent magnet DC torque motor under the condition of constant magnetic field excitation is: where t is time, E g is the motor back electromotive force, K e is the motor back electromotive force coefficient, ω M is the motor speed, U a is the voltage on the armature winding, I a is the armature current, R a is the armature winding resistance, L a is the armature winding inductance; The motor torque satisfies: wherein the motor torque T M = K t I a , K t is the torque coefficient, T L is the load torque reduced to the motor axis, and J Ges is the total moment of inertia reduced to the motor axis. The transfer function mathematical model of the PWM power amplifier as a lagging amplification link is wherein K PWM is the amplification of the power amplifier, T PWM is the time constant of the power amplifier; The PWM power amplifier is connected in series to the armature circuit, the current is fed back from the armature, and the current PI control is added to the driver to form a current loop. The input of the current loop is the armature current, and the output of the current loop is the speed of the motor.
2. The motor speed loop ADRC controller parameter optimization method of claim 1, wherein, The speed of the motor is controlled by the self-disturbance control technology of the second-order self-disturbance controller, the self-disturbance control technology is a nonlinear control method, and the second-order self-disturbance controller comprises a tracking differentiator (TD), an extended state observer (ESO) and a nonlinear state error feedback control law (NLSEF).
3. The motor speed loop ADRC controller parameter optimization method of claim 2, wherein, The differential form of the tracking differentiator is as follows: In the formula, k is the kth sampling, T is a sampling period, v1 is a tracking signal of an input signal v, v2 is a differential signal of the input signal v, r0 is a speed factor, h0 is a filter factor, and the fastest control synthesis function fst (x1, x2, r0, h0) is defined as: In the formula (5), all parameters in front of fst are intermediate variables, and fst is an output value of the function.
4. The motor speed loop ADRC controller parameter optimization method of claim 3, wherein, The differential form of the extended state observer is as follows: where u is the system input, y is the system output, z i (i = 1, 2, 3) are output variables of the extended state observer, a i (i = 1, 2) and β 0i (i = 1, 2, 3) are step parameters, and fal is a nonlinear function, whose expression is:
5. The motor speed loop ADRC controller parameter optimization method of claim 4, wherein, The nonlinear state error feedback control law is In the formula, u0 is an error feedback control amount, β1 and β2 are adjustable gains, and b0 is a system control gain.
6. The motor speed loop ADRC controller parameter optimization method of claim 5, wherein, The adaptive genetic algorithm comprises a crossover operation and a mutation operation, and the fitness of individuals in a population is used as a reference index of the crossover probability and the mutation probability, so as to select excellent individuals.
7. The motor speed loop ADRC controller parameter optimization method of claim 6, wherein, The crossover probability of the adaptive genetic algorithm is: where P c is the crossover probability, f c is the fitness of the two parents before crossover, f max ,f min are the maximum and minimum fitness values in the population, respectively, and k1, k2, k3 are constants between 0 and 1.
8. The motor speed loop ADRC controller parameter optimization method of claim 7, wherein, The mutation operation is usually used in conjunction with the crossover operation to improve the global search performance of the algorithm, and when the algorithm approaches an optimal solution, the mutation operation can effectively accelerate the convergence speed of the algorithm; the mutation probability of the adaptive genetic algorithm is: where P m is the probability of variation, and k4, k5, k6 are constants between 0 and 1.
9. The motor speed loop ADRC controller parameter optimization method of claim 8, wherein, The adaptive genetic algorithm steps are: S1, encoding the parameters to be optimized, setting the population size and the maximum number of iterations, and generating an initial population; S2, selecting a fitness function to evaluate the fitness of each individual in the population; S3, selecting two individuals at a time, eliminating individuals with low fitness, and copying individuals with high fitness at the same time; S4, performing a crossover operation on the selected individuals according to the adaptive crossover probability; S5, performing a mutation operation on the selected individuals according to the adaptive mutation probability to generate new individuals; S6, repeating steps S2-S5, and judging whether the maximum number of iterations is reached or the fitness converges to a set value; S7, outputting the final result.
Citation Information
Patent Citations
Starting control method based on improved fractional order active disturbance rejection
CN112290846A
Ball screw permanent magnet synchronous motor rotating speed current control system and method based on active disturbance rejection control
CN114726281A