Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. 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 embodiment provides a permanent magnet synchronous motor active disturbance rejection control method based on an improved differential evolution algorithm, which comprises the following steps:
S1: establishing a mathematical model of the permanent magnet synchronous motor, wherein the mathematical model comprises a stator voltage equation, a flux linkage equation and a mechanical motion equation; specifically, the method for establishing the mathematical model of the permanent magnet synchronous motor comprises the following steps:
d. the stator voltage equation and flux linkage equation of the PMSM in q coordinate system are:
Wherein ud、id represents the stator voltage and the armature current in the d-axis, respectively; uq、iq represents the stator voltage and armature current under q-axis, respectively, and Rs is the stator resistance; ld、Lq represents the stator inductances of d and q axes respectively; omegae is the electrical angular velocity of the motor; phid、ψq represents the stator flux linkage of d and q axes respectively; phif is the flux linkage generated by the permanent magnet;
for a surface-mounted permanent magnet synchronous motor, with Ld=Lq, the electromagnetic torque generated is as follows:
Te=1.5pnψfiq(2)
Where Te is electromagnetic torque, pn is pole pair number of the three-phase PMSM, ψf is flux linkage by the permanent magnet, and iq is armature current in q axis.
The mechanical equation of motion of the PMSM is:
Where J is moment of inertia, ωm is the mechanical angular velocity of the motor, B is the damping coefficient, TL is the load torque, Te is the electromagnetic torque, and T is the time.
When the vector control strategy of id =0 is adopted, the structure of the permanent magnet synchronous motor control system is shown in fig. 2, a PI controller is adopted in a current loop, and an improved linear active disturbance rejection controller is adopted in a rotating speed loop.
S2: establishing a linear active disturbance rejection controller model, and determining parameters to be set;
The linear active disturbance rejection controller model comprises a tracking differentiator TD, an extended state observer ESO and a linear state error feedback law LSEF, and the three parts are respectively described as follows:
S21 first part: the tracking differentiator TD is capable of rapidly and accurately tracking an input signal and performing a smooth transition process on the input signal. For tracking of step signals, it can enter steady state without overshoot for a limited time. The speed of the transition process is flexibly controlled by adjusting the speed factor, so that a good balance is achieved between overshoot and rapidity. The tracking differentiator TD is in discrete form:
Wherein k represents a discrete time value, and h represents an integral step length; r is a speed factor, lambdaF is a filter factor, v1 is a tracking signal of the input signal v0, and v2 is a differential signal of v1; fhan () is a nonlinear fastest control complex function, expressed as:
Wherein h is an integral step length; r is the velocity factor, v1 is the tracking signal of the input signal v0, v2 is the differential signal of v1, sgn (·) is the sign function, satisfying:
S22 second part: the extended state observer ESO integrates all known and unknown disturbance into one state variable, and performs real-time observation and estimation, so that the disturbance is compensated from the source, and effective inhibition of internal and external disturbance of a control system is realized. The discrete expression form of the linear ESO is:
wherein z1、z2、z3 represents an input variable, a difference of the input variable and a total disturbance observed value, y is an actual output value, e is an observed error, b is a compensation factor, u is a control signal, and h0 is a sampling step length; beta10、β20、β30 are respectively 3 adjustable gain parameters of ESO, and k is a discrete time value.
S23 third section: in order to simplify the design of the active disturbance rejection controller, the linear state error feedback control law LSEF is further simplified into a PD combined design, and the form is as follows:
where z1、z2 is the observed state from ESO, e1、e2 is the error term, b is the compensation factor, and kp、kd represents the proportional and differential amplification factors, respectively.
S24: to simplify the model, the parameters may be designed based on the notion of observer bandwidth, i.e.beta01=3ωo,Where ωo is the observer bandwidth. The linear active disturbance rejection controller parameters to be set are omegao、kp、kd and b, the parameters are obtained through optimization in the step S3, and the rest parameters can take checked values.
S3: providing a differential evolution algorithm improved by combining the Lewy flight and orthogonal learning strategies for optimizing four controller parameters omegao、kp、kd and b in the step S2;
S31: the standard differential evolution algorithm is based on a group intelligent theory and is an intelligent optimization search algorithm generated by cooperation and competition among individuals in a group. The standard differential evolution algorithm can be specifically described in mathematical language as:
Initializing: standard differential evolution algorithms use Np real-valued parameter vectors of dimension D as populations for each generation. The ith individual in the G generation population is expressed as
xi,G(i=1,2,…,NP) (9)
Where i represents an individual, G represents algebra, and Np represents the total number of individuals in the population.
Assuming that all randomly initialized populations conform to a uniform probability distribution, the boundaries of all values in the population are set toThen there are:
Wherein xij,0 represents the j-th parameter value of the i-th individual in the initial population, rand [0,1] represents a random number between 0 and 1,Respectively representing the upper and lower bounds of xji,0, Np being the number of individuals in the population, and D representing the dimension of each individual.
Variation: for each individual xi,G(i=1,2,…,NP), the variance vector of the standard differential evolution algorithm is generated by:
Wherein, the randomly selected sequence numbers r1、r2 and r3 are different from each other, and r1、r2 and r3 are also different from the target vector sequence number i, namely, r1、r2、r3 and i are different from each other; mutation operator F.epsilon.0, 2 is a real constant factor; Three individuals which are randomly selected from the G generation population and are different from each other; vi,G+1 denotes the resulting variance vector.
Crossing: to increase the diversity of the interference parameter vector, a crossover operation is introduced, and then the trial vector becomes:
Where randb (j) represents the generation of the j-th estimate of the random number between [0,1 ]; rnbr (i) e (1, 2,., D) represents a randomly selected sequence with which ui,G+1 is assured to obtain at least one parameter from vi,G+1; CR.epsilon.0, 1 is the crossover operator; ui,G+1 is the generated test vector; uji,G+1 represents the j-th parameter value of the i-th individual in the g+1th generation population, vji,G+1 is the j-th parameter value of the variation vector vi,G+1, Np is the number of individuals in the population, and D represents the dimension of each individual.
Selecting: the differential evolution algorithm determines whether the test vector ui,G+1 will be a member of the next generation according to the greedy criterion. It compares the test vector with the objective vector xi,G+1 in the current population, if the objective function is to be minimized, then the vector with the smaller objective function value will appear in the next generation population, otherwise it is discarded;
S32: in order to overcome the defects of low post convergence accuracy, easy sinking into local optimum and the like of the standard differential evolution algorithm in the step S31, the global searching capability of the standard differential evolution algorithm is enhanced by utilizing the jumping capability of the Lewy flight and the orthogonal learning capability of the field design, so that the local convergence is avoided, and the rapid convergence of the algorithm is ensured. Specifically, the orthogonal learning process is as follows:
Assume thatFor three individual vectors which are randomly selected and mutually different when the standard differential evolution algorithm is mutated, the 3 vectors with the size of 1 xD are used as the level, and the dimension D is used as the factor number. For the orthogonal table Lm(3D with D factors and 3 horizontal combinations), 3 parents sample the D values to obtain m combinations, and then select the optimal one as the child. The method comprises the following steps:
1) Inputting 3 parent vectors with dimension of 1×DCombining them into x by columns;
2) For 1.ltoreq.k.ltoreq.m, generating a sub-vector according to the kth combination (c1(k),c2(k),...,cD (k)) of factor levels in the orthogonal table Lm(3D
3) Evaluating the fitness of the sub-vector p1,p2,...,pm, selecting the optimal vector as a child and outputting the optimal vector;
In order to avoid partial individuals from becoming 'early' and falling into local optimum, the individuals are randomly walked according to the Lewy flight, and the updated formula is as follows:
Lxi,G=Levywalk(xi,G)=xi,G+α·s (13)
Wherein xi,G represents the ith individual of the G generation, lxi,G represents the newly generated individual according to random walk, levywalk(xi,G) represents the random walk operation of the individual xi,G, alpha is a step control vector, and the elements of the step control vector are random numbers between 0 and 1; s is the step size, obeys the Lewye distribution, which is usually modeled by Mantegna algorithm:
wherein, beta is a stability index, and is usually 1.5; mu, v obeys normal distribution:
Wherein: wherein Γ is a standard gamma function, beta is a stability index, and sigmaμ、σν is the standard deviation of mu and v respectively.
S33: in the Lewy orthogonal learning differential evolution algorithm, a variation probability factor f0 is introduced, f epsilon (0, 1) is randomly generated, when f epsilon (0, f0), a variation vector is generated by adopting an orthogonal learning strategy, and when f epsilon [ f0, 1], a variation vector is generated by adopting Lewy flight.
Specifically, a flow chart of an improved differential evolution algorithm based on the Lewy flight and orthogonal learning strategy is shown in fig. 3, and the specific steps are as follows:
1) Initializing: setting a population scale NP, a dimension D, a maximum iteration number Nmax and a variation probability factor f0, and calculating initial fitness;
2) Variation: randomly generating a variation factor f, and generating a variation vector by adopting a Lewy flight strategy if f is smaller than f0; if f is more than or equal to f0, generating a variation vector by adopting an orthogonal learning strategy;
3) Crossing: performing cross treatment on the variation vector by adopting a formula (12) to obtain a new individual;
4) Selecting: firstly, carrying out boundary processing, and setting individual parameters exceeding upper and lower boundary constraints as adjacent boundary values; calculating fitness values of all individuals, and selecting an optimal individual;
5) Judging whether the maximum iteration times Nmax are converged or reached, if the conditions are met, outputting a global optimal solution of the final step, namely an optimal result, and terminating the program; otherwise, returning to the step 2).
S4: and optimizing the parameters to be set by adopting an improved differential evolution algorithm to establish a permanent magnet synchronous motor speed regulation control system based on the improved linear active disturbance rejection controller. The parameters needed to be set are omegao、kp、kd and b.
S41: the time absolute error integration criterion (Integral of Time and Absolute Error, ITAE) is selected as a fitness function, and is a criterion describing deviation between expected and actual output of the system, and the controller designed according to the criterion has strong error suppression capability and small oscillation, can not only show the magnitude of the error, but also show the convergence speed of the error, and is a common criterion for measuring the control performance of the controller. The fitness function is
Where e (t) is the error and fitness function JITAE is a function of ωo、kp、kd, b. The closer JITAE is to the minimum value, the better the parameter setting of the linear active disturbance rejection controller is, namely, an improved differential evolution algorithm is adopted to convert the parameter setting problem of the linear active disturbance rejection controller into the problem of solving the optimal value of the high-dimensional function.
The structure of the linear active disturbance rejection controller (LODE-LADRC) based on the improved differential evolution algorithm is shown in FIG. 4.
S42: and establishing a Matlab/Simulink simulation model for controlling speed regulation of the permanent magnet synchronous motor based on the improved linear active disturbance rejection controller so as to verify the effectiveness of the algorithm.
Specifically, a surface-mounted PMSM driving system is taken as a research object, three control strategies of conventional PI, DE-LADRC and LODE-LADRC are respectively adopted as speed loop controllers, and the current loops all adopt PI controllers and the parameters are kept the same; and selecting the unit step signal as a signal source to perform a comparison experiment. The operation mode of the simulation experiment is set to be 2 stages of no-load starting and load operation, the given rotating speed in the initial stage is set to be Nref =1000r/min, and after the simulation experiment is stabilized, the load disturbance of TL =6N.m is applied at t=0.2 s. The experimental platform is MATLAB2018a (13 th Gen Intel (R) Core (TM) i5-13500HX 2.50 GHz);
The Matlab/Simulink simulation model is shown in FIG. 5.
The parameters to be optimized are omegao、kp、kd and b, other controller parameters are set as shown in the following table, wherein the PI controller parameters take empirical values:
L9(34) in LODE-LADRC algorithm is shown below;
The four factors in the table refer to the parameters ωo、kp、kd, b to be optimized, respectively.
The rotating speed change curves of the permanent magnet synchronous motor under the action of the 3 different controllers are shown in fig. 6 (a), and two partial enlarged diagrams of A, B are shown in fig. 6 (b) and fig. 6 (c). It can be seen that the overshoot of the starting process of the PMSM under PI control is large, and there is a certain steady-state fluctuation, and it takes a long time to recover to the steady state after adding the load disturbance; the overshoot of the LADRC controller improved by adopting the standard differential evolution algorithm is obviously reduced, steady-state fluctuation is avoided, but the response speed is slower; compared with the DE_LADRC strategy, the LADRC controller optimized by adopting LODE algorithm has the advantages that the adjustment time and overshoot are respectively reduced by 17.4% and 18.2%, no steady-state error exists, the fluctuation is small and the stable state can be quickly recovered after the LADRC controller is disturbed by load, and the disturbance rejection capability is obvious. In a combined view, compared with the traditional control method, the method for setting the parameters of the active disturbance rejection controller based on the improved differential evolution algorithm has a better effect.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.