Permanent magnet synchronous motor parameter identification method, electronic device and storage medium

By improving the combination of genetic algorithm and quasi-Newtonian method, the problem of global optimal convergence and insufficient local search capabilities in parameter identification of permanent magnet synchronous motors is solved, and efficient and fast parameter identification is achieved, which is suitable for industrial applications.

CN114938175BActive Publication Date: 2025-04-01XIANGTAN UNIV +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210610099.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-04-01
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

In the prior art, the permanent magnet synchronous motor parameter identification algorithm is difficult to achieve high-precision control with short convergence time and fast convergence speed on the basis of global optimization, and there are problems such as parameter initial value selection dependence and noise sensitivity in industrial applications.

Method used

The improved genetic algorithm combined with the quasi-Newtonian method is used to establish a mathematical model of a permanent magnet synchronous motor under the d-q axis coordinate system, determine the fitness function, and dynamically adjust the cross and mutation probability during the iteration process, and add elimination operators to strengthen global search capabilities and local search capabilities.

Benefits of technology

It realizes the improvement of local search capabilities based on the global optimal parameter identification results, short search time, fast convergence speed and high accuracy, and is suitable for various occasions and is not affected by parameters and models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114938175B_ABST
    Figure CN114938175B_ABST
Patent Text Reader

Abstract

The present invention provides a method for identifying parameters of a permanent magnet synchronous motor, comprising the following steps: determining a fitness function of an improved genetic algorithm based on a mathematical model of the permanent magnet synchronous motor in a d-q axis coordinate system; using the improved genetic algorithm to perform parameter identification on the permanent magnet synchronous motor; wherein the improved genetic algorithm means that a quasi-Newton method is used to optimize a result of the genetic algorithm once after each evolution of the genetic algorithm for X generations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of permanent magnet synchronous motor control and relates to a permanent magnet synchronous motor parameter identification method, electronic equipment and a computer-readable storage medium. Background Art

[0002] Permanent Magnet Synchronous Motor (PMSM) has the advantages of simple structure, small size, light weight, low loss, high efficiency and high power factor. It is mainly used in industrial manufacturing, intelligent robots, new energy vehicles and other fields that require fast response, wide speed regulation range and accurate positioning. With the development of industrial technology, the application scope of permanent magnet synchronous motor is becoming more and more extensive, making its drive control technology a research hotspot. Motor parameters are the basis for achieving high dynamic response and high-precision control goals. However, motor parameters are easily affected by factors such as temperature, stator current, and flux saturation. Therefore, accurate identification of motor parameters is an important step to improve the accuracy of the controller.

[0003] Scholars at home and abroad have proposed many parameter identification methods to realize the parameter identification of permanent magnet synchronous motors: least squares method, model reference adaptation, extended Kalman filter, artificial neural network method, etc. The least squares method has the advantages of simplicity and easy implementation, but it needs to process a huge amount of data and needs to simplify and approximate the model of linear parameters. The model reference adaptive method ensures the correct convergence of each parameter by adjusting the PI parameter in the adaptive rate, but the selection of the identifier parameters has a great influence on the identification effect, and the correct convergence of the parameters depends on the selection of the initial value of the parameters. The extended Kalman filter algorithm can solve the noise sensitivity problem and can simultaneously identify the motor state and parameters, but a large number of matrix operations are required during the algorithm iteration process, and the motor mathematical model needs to be accurately preprocessed. The artificial neural network method needs to set the initial parameters based on experience, and the results are closely related to the setting of the initial parameters.

[0004] Based on the above problems, it is necessary to provide a permanent magnet synchronous motor parameter identification algorithm that can achieve high-precision control of the motor and can be applied in the industrial process on the basis of global optimization with short convergence time and fast convergence speed. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention provides a permanent magnet synchronous motor parameter identification method, which can improve the local search capability on the basis of the global optimal parameter identification result, and has short search time, fast convergence speed and high accuracy.

[0006] The technical solution provided by the present invention is as follows:

[0007] In a first aspect, the present application provides a method for identifying parameters of a permanent magnet synchronous motor, comprising the following steps:

[0008] Based on the mathematical model of the permanent magnet synchronous motor in the dq axis coordinate system, the fitness function of the improved genetic algorithm is determined; the parameters of the permanent magnet synchronous motor are identified using the improved genetic algorithm; wherein the improved genetic algorithm means that the quasi-Newton method is used to optimize the results of the genetic algorithm every X generations of evolution of the genetic algorithm.

[0009] Furthermore, for the surface-mounted permanent magnet synchronous motor (SPMSM), a mathematical model in the dq axis coordinate system is established according to the following method:

[0010] (1) The dq axis voltage equation of the permanent magnet synchronous motor is:

[0011]

[0012] (2) For SPMSM, it can be roughly considered that L d =L q =L, so from the dq axis voltage equation of the permanent magnet synchronous motor, the current equation of the SPMSM can be derived as:

[0013]

[0014] Where: u d is the d-axis voltage, u q is the q-axis voltage, i d is the d-axis current, i q is the q-axis current, R s is the stator resistance, ω e is the electrical angular velocity, L d is the d-axis inductance, L q is the q-axis inductance, ψ f is the permanent magnet flux linkage;

[0015] (3) The current equation of the SPPMSM is approximated and discretized using Padé, and the dq axis current discrete state equation of the SPPMSM can be obtained:

[0016] i d (k) = θ1i d (k-1)+θ2[ω e (k)i q (k)+ω e (k-1)i q (k-1)]+θ3[u d (k)+u d (k-1)]

[0017] i q(k) = θ1i q (k-1)-θ2[ω e (k)i d (k)+ω e (k-1)i d (k-1)]+θ3[u q (k)+u q (k-1)]+θ4[ω e (k)+ω e (k-1)]

[0018] in:

[0019]

[0020] Where: i d (k) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k, i d (k-1) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k-1, i q (k) is the actual value of the q-axis current at time k, i q (k-1) is the actual value of the q-axis current at time k-1, u d (k) is the actual value of the d-axis voltage at time k, u d (k-1) is the actual value of the d-axis voltage at time k-1, u q (k) is the actual value of the q-axis voltage at time k, u q (k-1) is the actual value of the q-axis voltage at time k-1, ω e (k) is the actual value of the electrical angular velocity at time k, ω e (k-1) is the actual value of the electrical angular velocity at time k-1, T s is the sampling period, k is the sampling time sequence number;

[0021] R can be derived from θ1, θ2, θ3, θ4 s , parameter value of L,ψ;

[0022] in:

[0023]

[0024] (4) The dq axis current discrete state equation of the SPMSM is designed as the motor reference model, and the adjustable model of the SPMSM is:

[0025]

[0026]

[0027] in: is the estimated value of the d-axis current of the permanent magnet synchronous motor at time k, is the estimated value of the q-axis current of the permanent magnet synchronous motor at time k, are the estimated values ​​of θ1, θ2, θ3, and θ4 respectively.

[0028] Specifically, the parameter identification of the permanent magnet synchronous motor using the improved genetic algorithm includes the following steps:

[0029] a) Population initialization: Set the evolutionary generation counter m = 1, and set the maximum evolutionary generation m max , randomly generate M individuals as the initial population P(m);

[0030] b) Individual evaluation: Calculate the fitness of each individual in the population P(m);

[0031] c) Perform genetic operations on the population P(m), including selection, crossover and mutation, to obtain the next generation population P(m+1);

[0032] d) Determine whether the evolutionary generation is a multiple of X. If so, use the quasi-Newton method to perform local search on individuals in the current population; otherwise, go to step e);

[0033] e) Determine whether the termination condition is met. If so, the individual with the maximum fitness function value obtained during the evolution process is output as the optimal solution and the calculation is terminated; otherwise, set m=m+1 and return to step b).

[0034] Since genetic algorithms cannot directly process the parameters of the problem space, it is necessary to express the feasible solutions of the problem into individuals (or chromosomes) in the genetic space through coding. Commonly used coding methods include bit string coding, Grey coding, real number coding, etc. Real number coding does not need to perform numerical conversion, and genetic algorithm operations can be performed directly on the phenotype of the solution, which can not only save genetic algorithm operation time, but also has clear physical meaning. In this application, the improved genetic algorithm adopts real number coding.

[0035] In step a), the population is initialized, including giving some initial parameters of the improved genetic algorithm, such as the initial population generation interval (i.e., the problem solution space), population size, individual length, maximum evolutionary generation, etc. The initial population generation interval is uniformly sampled, and M individuals are generated in the interval as the initial population.

[0036] Furthermore, within the initial population generation interval, individuals in the initial population are randomly generated through the chaotic search system. Based on the ergodicity and randomness of chaotic search, the global search capability of the algorithm can be enhanced.

[0037] Furthermore, the fitness function of the improved genetic algorithm is determined by the following method:

[0038] The five parameters of the permanent magnet synchronous motor, namely, the d-axis voltage, d-axis current, q-axis voltage, q-axis current, and electrical angular velocity, are sampled, and the number of sampling points is N. Then, at each sampling point, the d-axis current and q-axis current of the permanent magnet synchronous motor are estimated by the SPMSM adjustable model. By calculating the sum of squares of the errors between the estimated current value and the true value, the objective function of the improved genetic algorithm is obtained as follows:

[0039]

[0040] Where: E(θ i ) is an individual The objective function value corresponding to i=1,2,3,4, i d (k) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k, i q (k) is the actual value of the q-axis current at time k, is the estimated value of the d-axis current of the permanent magnet synchronous motor at time k, is the estimated value of the q-axis current of the permanent magnet synchronous motor at time k;

[0041] The fitness function is a standard used to distinguish good and bad individuals in a group. It is the only basis for natural selection. This application uses the inverse of the objective function as the fitness function of the individual in the improved genetic algorithm. The smaller the objective function value, the larger the fitness function value, and the better the individual. In this application, the fitness function is set to:

[0042]

[0043] Where: Fitness(θ i ) is an individual The fitness function values ​​corresponding to i=1,2,3,4.

[0044] When the solution vectors [θ1, θ2, θ3, θ4] of different individuals in a generation are brought into the objective function, the objective function values ​​of different individuals are obtained, and then the fitness function values ​​of different individuals are obtained. The different individuals in this generation are screened by the fitness function value, and the individual with the largest fitness function value is the best individual in this generation, that is, the optimal solution in this generation.

[0045] After the population is initialized, the fitness function is used as a criterion for distinguishing the good and bad individuals in the group. Excellent individuals are selected from the old group with a certain probability to form a new population to reproduce the next generation of individuals. In this application, the improved genetic algorithm selects the roulette method for selection operation. The probability of an individual being selected is related to the fitness value. The higher the individual fitness value, the greater the probability of being selected. Individuals are randomly selected from the individuals, and through the exchange and combination of two individuals, the excellent characteristics of the parent generation are inherited to the offspring, thereby generating new excellent individuals. In order to maintain population diversity, individuals are randomly selected from the population for mutation operations to obtain better individuals.

[0046] Furthermore, in the step c), an elite protection strategy is adopted, that is, the individuals with the top M1 fitness function values ​​in the current population do not participate in the crossover and mutation stages, so as to protect the excellent individuals from being destroyed and accelerate the convergence speed of the algorithm.

[0047] Optionally, M1=5 is set.

[0048] Furthermore, in traditional genetic algorithms, the crossover probability p c and mutation probability p m is a constant. In the iterative process of improving the genetic algorithm in this application, a segmented optimization strategy is adopted to dynamically adjust the crossover probability and mutation probability in the genetic algorithm, so as to set different crossover probabilities p for different individuals in the iteration of the genetic algorithm population. g and mutation probability p m , in order to speed up the convergence of the genetic algorithm, so that it can reach the global optimal point faster and improve the performance of the algorithm. For individuals whose fitness function value is less than the average fitness function value of the population, a larger crossover probability value p is set. c , in order to enhance the global search capability of the algorithm, and set a larger mutation probability value p m , in order to produce excellent individuals. For individuals whose fitness function value is higher than the average fitness function value in the population, a smaller crossover probability value p is set c and a smaller mutation probability value p m , in order to retain excellent individuals in the iterative process of the genetic algorithm and accelerate the convergence of the algorithm. In addition, the crossover probability p is increased according to the increase in the number of iterations. c and mutation probability p m Dynamic adjustments are made to speed up the convergence of the algorithm and obtain the global optimal solution to the nonlinear equations.

[0049] In step c) of the present application, the formula for segmented optimization in the improved genetic algorithm is as follows:

[0050]

[0051]

[0052] Where: p c is the crossover probability, p m is the mutation probability, F is the fitness function value of each individual, F avg is the average fitness function value of all individuals in the current population, p cmax is the maximum crossover probability, p cmin is the minimum crossover probability, p mmax is the maximum mutation probability, p mminis the minimum mutation probability, m is the current evolutionary generation (iteration number) of the genetic algorithm, and m max is the maximum evolutionary number of the genetic algorithm.

[0053] Optionally, set p cmax =0.99, p mmax =0.1, p cmin =0.4, p mmin =0.001.

[0054] Furthermore, the present application improves the traditional genetic algorithm by adding an elimination operator, that is, in each generation of evolution, after completing the crossover and mutation operations, M′ new individuals are generated through the chaotic search system, and the fitness function values ​​of the newly generated individuals are calculated, and compared with the individuals with the fitness function values ​​ranked after M′ in this generation of population, and the individuals ranked after M′ in these 2M′ individuals are eliminated, and the individuals ranked before M′ in these 2M′ individuals are added to the population. By adding the elimination operator, the convergence speed of the traditional genetic algorithm can be accelerated and the global search capability of the traditional genetic algorithm can be enhanced.

[0055] The method of generating M′ new individuals through the chaotic search system is as follows: first, randomly generate x(1) in the interval (0, 1), and generate y(t), t=2, 3, ···, M′ according to the Logistic mapping formula of the chaotic system y(t+1)=μy(t)(1-y(t)):

[0056] Where: μ∈(0,4) is the system control coefficient. When μ=4, the system is in a completely chaotic state. At this time, y(t) can traverse uniformly in the interval (0, 1) without repeating.

[0057] Based on y(t),t=1,2,···,M′, use the following formula to generate Z(t),t=1,2,···,M′;

[0058] Z(t)=Z min +y(t)·(Z max -Z min )

[0059] Among them, [Z min ,Z max ] are the search bounds of Z (i.e., solution space);

[0060] Let Z be R s , L, ψ; obtain M′ group R through the above method s , L, ψ value, thus obtaining M′ groups of solution vectors [θ1,θ2,θ3,θ4] values, that is, M′ new individuals.

[0061] Optionally, M′=5 is set.

[0062] By improving the genetic algorithm, the iterative search changes R s , L, ψ value; when the termination condition is met, the current evolutionary generation is equal to the maximum evolutionary generation, that is, m = m max , or when the convergence condition is met, the search is terminated and the individual with the maximum fitness value obtained during the evolution process is output as the optimal solution.

[0063] The convergence condition is to set a precision threshold ε. When the difference between the maximum value of the individual fitness function in the mth generation population and the maximum value of the individual fitness function in the m-1th generation population is less than the precision threshold ε, it is considered that the three parameters (R s , L, ψ) are correctly estimated and meet the convergence conditions.

[0064] That is, the convergence condition is:

[0065] maxFitness m -maxFitness m-1 <ε

[0066] Where: ε is the given accuracy threshold;

[0067] This application will improve the maximum evolutionary number m of the genetic algorithm max Set to 300. Considering that if the improved genetic algorithm has not met the convergence condition during the iteration process, in order to reduce the amount of calculation of the algorithm, the maximum number of iterations of the algorithm is set to 300, so that the improved genetic algorithm will not continue to iterate, causing the algorithm to fall into an infinite loop. If the algorithm has not been able to meet the termination condition after the 300th iteration, the individual with the maximum fitness value obtained during the search process is output as the optimal solution. At the same time, considering that the improved genetic algorithm will generally reach convergence before 300 iterations, that is, meet the algorithm termination condition, the maximum number of iterations is set to 300 to ensure that the algorithm can continue to obtain the optimal solution.

[0068] In this application, the genetic algorithm performs a quasi-Newton method search for the optimal solution every X iterations. The larger the X, the smaller the algorithm's computational load, and the weaker the local search capability of the improved genetic algorithm. The smaller the X, the larger the algorithm's computational load, and the stronger the local search capability of the improved genetic algorithm.

[0069] Preferably, X is set to 5. When X = 5, the improved genetic algorithm can have a stronger local search capability while reducing the algorithm computational complexity.

[0070] The traditional genetic algorithm evolves every X generations, and the individuals in the population are g, the sampling quasi-Newton method is used to perform local search on it, and it is not necessary to perform quasi-Newton method local search on each individual, which reduces the amount of calculation of the improved genetic algorithm, speeds up the convergence speed of the genetic algorithm, and improves the solution accuracy of the genetic algorithm.

[0071] For individuals in the population with probability p g The quasi-Newton local search is to use the result obtained by the genetic algorithm as the initial value, perform the quasi-Newton local search, and generate better new individuals to join the population through local search. g Perform a quasi-Newton method local search on each individual in the population, use the individuals in the population as the initial value, perform a quasi-Newton method search for the local optimal point, and obtain better individuals to update the population. Because the quasi-Newton method requires an initial value that is close to the global optimal solution to achieve good local search capabilities, a small probability p for performing a quasi-Newton method local search on individuals should be set in the early stage of the genetic algorithm. g In the later stage, the local search ability of the algorithm should be strengthened, and the probability p of local search for individuals using the quasi-Newton method should be gradually increased. g , so that the algorithm converges to the global optimal solution as quickly as possible. This application uses a segmented optimization strategy to dynamically adjust p g For individuals whose fitness function value is less than the average fitness function value of the population, the probability of performing a quasi-Newton local search is set to p gmin ; For individuals whose fitness function value is greater than the average fitness function value of the population, g Dynamic adjustment is performed. As the number of iterations increases, p g Gradually increase, strengthen the local search ability of the improved genetic algorithm. g The formula for segment optimization is:

[0072]

[0073] Where: p g is the probability of performing a quasi-Newton local search on an individual; p gmax For p g The maximum value, the maximum search probability; p gmin For p g The minimum value of the search probability, that is, the minimum search probability, F is the fitness function value of the corresponding individual, F avg is the average fitness function value of all individuals in the current population, m is the current evolutionary generation of the genetic algorithm, and m max is the maximum evolutionary number of the genetic algorithm, p gmin Set to 0.4, p gmax Set to 1.0, m max Set to 300.

[0074] Optionally, set pgmin =0.4.

[0075] The quasi-Newton method is used to perform local search on the individual U in the current population, which specifically includes the following steps:

[0076] 1) Take this individual as the initial value x of the quasi-Newton method iteration (0) ; Set a precision threshold greater than 0 (the allowable error value for iteration termination); Set the current number of iterations of the quasi-Newton algorithm to h = 0, and the maximum number of iterations to H; Set the approximate matrix B of the Hessian matrix in the Newton method h Initialize to the identity matrix;

[0077] 2) Determine the search direction d during the hth iteration of the quasi-Newton method (h) :

[0078]

[0079] Among them: B h is the approximate matrix of the Hessian matrix in Newton’s method, For x (h) =[θ1 (h) ,θ2 (h) ,θ3 (h) ,θ4 (h) ] to find the gradient of f(x), and the search direction is the direction pointing to the optimal point of the function; where f(x) is a nonlinear equation set used for local search of the quasi-Newton method;

[0080] 3) Determine the optimal search step length λ in the hth iteration process (h) :

[0081]

[0082] x (h) +λd (h) Substitute into f(x) and set f(x) = 0 to obtain the optimal search step length λ (h) ;

[0083] 4) The quasi-Newton method is used to iterate and calculate the permanent magnet synchronous motor parameter identification value. The iterative formula is:

[0084] x (h+1) =x (h) +λ (h) d (h)

[0085] Right now

[0086] 5) Determine whether the iteration termination condition is met. If so, use the current solution x (h+1)As the optimization solution output of individual U, the algorithm terminates; otherwise, go to step 8);

[0087] 6) According to the following formula, the approximate matrix B of the Hessian matrix in Newton's method is h To iterate:

[0088]

[0089] Where: s h =λ (h) d (h) , is the difference between the h+1th solution and the hth solution;

[0090] 7) Let h=h+1, and return to step 2).

[0091] The quasi-Newton method approximates the inverse matrix of the Hessian matrix in the Newton method with a matrix that does not contain second-order derivatives, thereby eliminating the need to calculate the Hessian matrix and its inverse matrix, reducing computational complexity. In this application, the quasi-Newton method uses the BFGS method; accordingly, the formula in step 6) is used as the iterative formula for the approximate matrix of the Hessian matrix in the Newton method.

[0092] Furthermore, the iteration termination condition is that the current number of iterations is equal to the maximum number of iterations, that is, h=H, or a set accuracy condition is met.

[0093] The accuracy condition is that the solution x obtained by the h+1th iteration of the quasi-Newton method is (h+1) and the solution x obtained in the hth iteration process (h) The difference is less than the set accuracy threshold Right now

[0094] Furthermore, in step 2), the nonlinear equation system f(x) used for the local search of the quasi-Newton method is obtained according to the following method:

[0095] The solution of the quasi-Newton method requires a nonlinear equation group, and the state equation of the permanent magnet synchronous motor is under-ranked, lacking a nonlinear equation group that can be solved by the quasi-Newton method. In response to this problem, the present application obtains a nonlinear equation group of the permanent magnet synchronous motor that can be solved by the quasi-Newton method by sampling the current values ​​at different times from the dq-axis current discrete state equation. Specifically: the d-axis voltage, d-axis current, q-axis voltage, q-axis current and electrical angular velocity of the permanent magnet synchronous motor are collected at the corresponding time, and the dq-axis current discrete state equation is obtained:

[0096]

[0097] Where: let t2 be the current time, t1 = t2-1; t4 be the historical time, and t4≠t2, t3 = t4-1; let

[0098]

[0099] Let x = [θ1, θ2, θ3, θ4] be the solution vector of the nonlinear equation system. The nonlinear equation system used for the local search of the quasi-Newton method can be described as:

[0100]

[0101] The result of each evolution of the traditional genetic algorithm is used as the initial value of the solution vector of the nonlinear equation system. (0) =[θ1 (0) ,θ2 (0) ,θ3 (0) ,θ4 (0) ] and take its linear term to get:

[0102]

[0103] in:

[0104]

[0105] According to this nonlinear equation group, the individual optimal solution can be obtained by following the iterative steps of the quasi-Newton method.

[0106] When the iterative allowable error value (accuracy threshold) is closer to 0, the accuracy of the quasi-Newton method will be higher. However, the number of iterations of the quasi-Newton method will increase accordingly, and the amount of algorithm calculation will increase. Therefore, the appropriate accuracy threshold should be selected considering the balance between solution accuracy and algorithm calculation.

[0107] Furthermore, the present application sets the maximum number of iterations K of the quasi-Newton method to 200. Considering that if the quasi-Newton method has not met the algorithm termination condition during the iteration process, in order to reduce the amount of calculation of the algorithm, the maximum number of iterations of the algorithm is set to 200 times, so that the quasi-Newton method will not be allowed to iterate continuously and the algorithm will fall into an infinite loop. If the algorithm has not been able to meet the termination condition after the 200th iteration, the result sought for the 200th time will be updated to the group as the optimal solution. At the same time, considering that the quasi-Newton algorithm generally meets the algorithm termination condition before iterating 200 times, the maximum number of iterations is set to 200 times to ensure that the algorithm can continue to obtain an optimal solution.

[0108] From the solution of the nonlinear equation system x = [θ1, θ2, θ3, θ4], the required R is obtained by reverse deduction. s , L, ψ parameter identification values. Add the better individuals searched by the quasi-Newton method to the population to complete the population update.

[0109] In a second aspect, the present application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements the permanent magnet synchronous motor parameter identification method.

[0110] In a third aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the above-mentioned permanent magnet synchronous motor parameter identification method is implemented.

[0111] Beneficial effects:

[0112] 1. The present invention combines a genetic algorithm and a quasi-Newton method for parameter identification, wherein the genetic algorithm uses selection, crossover, and mutation operators for search, has strong robustness, strong global search capability, and can be applied to various occasions; wherein the quasi-Newton method has strong local search capability, can make up for the defect of poor local search capability of the traditional genetic algorithm, and has second-order convergence, and the algorithm converges quickly. The present application combines the advantages of both algorithms, can improve the local search capability on the basis of the global optimal parameter identification result, and has the advantages of short search time, fast convergence speed, high precision, and applicability to various occasions; and is not affected by parameters and models.

[0113] 2. This application improves the crossover and mutation links in the genetic algorithm. According to the change of the fitness function value of each individual during the iteration process, a segmented optimization strategy is adopted to dynamically adjust the crossover probability value and mutation probability value during the iteration of the genetic algorithm. If the individual fitness function value is less than the average fitness function value of the population, a larger crossover probability value p is set for the individual. c In order to enhance the global search capability of the algorithm, a larger mutation probability value p is set for the individual m , to produce excellent individuals. If the individual fitness function value is greater than the average fitness function value of the population, the crossover probability value p for the individual c And the mutation probability value p m Dynamic adjustment is performed. As the number of iterations of the genetic algorithm increases, the crossover probability value p c and the mutation probability value p m As , is reduced, the excellent individuals generated in the iterative process are retained. The strategy of segmented optimization can speed up the convergence of the genetic algorithm.

[0114] 3. Based on the crossover operator and mutation operator of the traditional genetic algorithm, a new elimination operator is added. M′ new individuals are generated through the chaotic search system, and the fitness function values ​​of the newly generated individuals are calculated. They are compared with the individuals with the fitness function values ​​ranked after M′ in this generation of population. The individuals with the fitness function values ​​ranked after M′ in these 2M′ individuals are eliminated, and the individuals with the fitness function values ​​ranked before M′ in these 2M′ individuals are added to the population. Because the chaos phenomenon has ergodicity and randomness, the chaotic search is introduced into the genetic algorithm. Its ergodicity can make the individuals in the population spread throughout the entire interval, and its randomness can make the algorithm break away from the local optimal value and tend to the global optimal value. This improvement can accelerate the convergence speed of the traditional genetic algorithm and enhance the global search ability of the traditional genetic algorithm.

[0115] 4. Based on the genetic algorithm, this application adds a quasi-Newton method to perform local search on individuals in the population as a means of population update to improve the local search performance.

[0116] 5. The solution of the quasi-Newton method requires a set of nonlinear equations, but the state equation of the permanent magnet synchronous motor is deficient in rank, lacking a set of nonlinear equations that can be solved by the quasi-Newton method. To address this problem, the present application obtains a set of nonlinear equations for the permanent magnet synchronous motor that can be solved by the quasi-Newton method by sampling the current values ​​at different times from the dq-axis current discrete state equation.

[0117] 6. Every X generations of evolution, the traditional genetic algorithm treats each individual in the population with different probabilities p g Perform quasi-Newton local search. According to the change of fitness function value of each individual during the evolution process, adopt the strategy of segmented optimization to dynamically adjust the probability p of performing quasi-Newton local search for each individual. g Because the quasi-Newton method requires an initial value that is close to the global optimal solution to achieve good local search capabilities, if the individual fitness function value is less than the population average fitness function value, a smaller p is set for the individual. g , so that the quasi-Newton method local search is not performed on a large number of individuals to reduce the amount of computation of the improved genetic algorithm. If the individual fitness function value is greater than the average fitness function value of the population, the probability p of performing the quasi-Newton method local search on each individual g Dynamic adjustment is performed. At this time, as the number of evolutionary generations increases, the probability p of performing quasi-Newton local search on individuals g It is increased to enhance the local search capability of the genetic algorithm in the later stage, speed up the convergence speed of the genetic algorithm, and improve the solution accuracy of the genetic algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0118] Figure 1 This is a diagram of the SPMSM vector control structure in an embodiment of the present application.

[0119] Figure 2 This is a structural diagram of the SPMSM in an embodiment of the present application.

[0120] Figure 3 This is a diagram of the identification principle based on the improved genetic algorithm in the embodiment of the present application.

[0121] Figure 4 This is a flow chart based on the improved genetic algorithm in the embodiment of the present application. DETAILED DESCRIPTION

[0122] The present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0123] Reference Figure 1 In this embodiment, a permanent magnet synchronous motor is taken as an SPMSM as an example, and a permanent magnet synchronous motor parameter identification method is provided, comprising the following steps:

[0124] Step 1: Reference Figure 2 , establish a mathematical model for SPMSM,

[0125] The dq axis voltage equation is:

[0126]

[0127] For SPMSM, it is approximately considered that L d =L q =L, the permanent magnet synchronous motor current equation is derived from the dq axis voltage equation:

[0128]

[0129] Where: u d is the d-axis voltage, u q is the q-axis voltage, i d is the d-axis current, i q is the q-axis current, R s is the stator resistance, ω e is the electrical angular velocity, L d is the d-axis inductance, L q is the q-axis inductance, ψ f is the permanent magnet flux linkage;

[0130] The current equation of the permanent magnet synchronous motor is approximated and discretized using Padé to obtain the discrete state equation of the dq axis current of the SPPMSM:

[0131] i d (k) = θ1i d (k-1)+θ2[ω e (k)i q (k)+ω e(k-1)i q (k-1)]+θ3[u d (k)+u d (k-1)]

[0132] i q (k) = θ1i q (k-1)-θ2[ω e (k)i d (k)+ω e (k-1)i d (k-1)]+θ3[u q (k)+u q (k-1)]+θ4[ω e (k)+ω e (k-1)]

[0133] in:

[0134]

[0135] i d (k) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k, i d (k-1) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k-1, i q (k) is the actual value of the q-axis current at time k, i q (k-1) is the actual value of the q-axis current at time k-1, u d (k) is the actual value of the d-axis voltage at time k, u d (k-1) is the actual value of the d-axis voltage at time k-1, u q (k) is the actual value of the q-axis voltage at time k, u q (k-1) is the actual value of the q-axis voltage at time k-1, ω e (k) is the actual value of the electrical angular velocity at time k, ω e (k-1) is the actual value of the electrical angular velocity at time k-1, T s is the sampling period, k is the sampling time sequence number;

[0136] R can be derived from θ1, θ2, θ3, θ4 s , parameter value of L,ψ;

[0137] in:

[0138]

[0139] Step 2: Set the objective function and fitness function;

[0140] Reference Figure 3 , the dq axis current discrete state equation is designed as the motor reference model, then the SPMSM adjustable model is:

[0141]

[0142]

[0143] in: is the estimated value of the permanent magnet synchronous motor d-axis current, is the estimated value of the q-axis current of the permanent magnet synchronous motor, are the estimated values ​​of θ1, θ2, θ3, and θ4 respectively;

[0144] The five parameters of the permanent magnet synchronous motor, namely, the d-axis voltage, d-axis current, q-axis voltage, q-axis current, and motor speed, are sampled, with the sampling number N. Then, at each sampling point, the d-axis current and q-axis current of the permanent magnet synchronous motor are estimated by the SPMSM adjustable model. By calculating the sum of squares of the error between the estimated current value and the true value, the objective function of the improved genetic algorithm is obtained as follows:

[0145]

[0146] Where: i d (k) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k, i q (k) is the actual value of the q-axis current of the permanent magnet synchronous motor at time k, is the estimated value of the d-axis current of the permanent magnet synchronous motor at time k, is the estimated value of the q-axis current of the permanent magnet synchronous motor at time k;

[0147] The fitness function is a standard used to distinguish good and bad individuals in a group. It is the only basis for natural selection. In this improved genetic algorithm, the reciprocal of the objective function value is used as the fitness value of the individual. The smaller the objective function value, the greater the fitness value and the better the individual. The fitness function is:

[0148]

[0149] Where: E(θ i ) is an individual The objective function values ​​corresponding to i=1,2,3,4.

[0150] By improving the genetic algorithm, we can continuously search and change R s , L, ψ, set an accuracy threshold ε, when the difference between the maximum value of the individual fitness function in the m-th generation population and the maximum value of the individual fitness function in the m-1-th generation population is less than the accuracy threshold ε, it is considered that the three parameters are correctly estimated;

[0151] That is, the convergence condition of the improved genetic algorithm is:

[0152] maxFitness m -maxFitness m-1 <ε

[0153] Where: ε is the given accuracy threshold;

[0154] Step 3: Population initialization;

[0155] Since genetic algorithms cannot directly process the parameters of the problem space, it is necessary to encode the feasible solutions to the problem into individuals or individuals in the genetic space. Common encoding methods include bit string encoding, Grey encoding, real number encoding, etc. Real number encoding does not require numerical conversion and can directly perform genetic algorithm operations on the phenotype of the solution, which not only saves genetic algorithm operation time, but also has clear physical meaning. This improved genetic algorithm uses real number encoding.

[0156] The initial population generation interval is uniformly sampled, and a certain number of individuals are generated within the initial population generation interval. Some initial parameters of the improved genetic algorithm are given, such as the initial population generation interval, population size, individual length, and evolutionary generation.

[0157] Step 4: Reference Figure 4 , using the quasi-Newton method and genetic algorithm to hybrid search for the global optimal point of parameter identification, R s ,L,ψ parameter values ​​are accurately estimated;

[0158] After the population is initialized, the fitness function is used as the standard to distinguish the good and bad individuals in the group. Excellent individuals are selected from the old group with a certain probability to form a new population to reproduce the next generation of individuals. This improved genetic algorithm selects the roulette method for selection. The probability of an individual being selected is related to the fitness value. The higher the individual fitness value, the greater the probability of being selected. Two individuals are randomly selected from the individuals, and through the exchange and combination of the two individuals, the excellent characteristics of the parent generation are inherited to the offspring, thereby generating new excellent individuals. In order to maintain the diversity of the population, an individual is randomly selected from the population for mutation operation to obtain a better individual. The traditional genetic algorithm evolves for 5 generations, and the obtained results are used as the initial value to perform a quasi-Newton method local search. Through the local search, better new individuals are generated and added to the population. The specific steps of updating the population by the quasi-Newton method are as follows:

[0159] ① Use the result obtained by the traditional genetic algorithm as the initial value of the quasi-Newton method iteration, set an accuracy threshold greater than 0, and the maximum number of iterations is 200.

[0160] ② According to the current discrete state equation, let t2 be the current moment, t1 = t2-1; t4 be the historical moment, and t4≠t2, t3 = t4-1. Collect the d-axis voltage, d-axis current, q-axis voltage, q-axis current and electrical angular velocity of the permanent magnet synchronous motor at the corresponding moment and bring them into the current discrete equation to obtain the nonlinear equation group used for the local search of the quasi-Newton method:

[0161]

[0162] The nonlinear system of equations can be described as:

[0163]

[0164] Let x = [θ1, θ2, θ3, θ4] be the solution vector of the nonlinear equations, and use the result of searching the nonlinear equations in the traditional genetic algorithm for every 5 generations as the initial value. (0) =[θ1 (0) ,θ2 (0) ,θ3 (0) ,θ4 (0) ] and take its linear term to get:

[0165]

[0166] in:

[0167]

[0168] ③ The approximate matrix B of the Hessian matrix h Initialized to the identity matrix, the search direction of the quasi-Newton method is:

[0169]

[0170] Among them: B h is the approximate matrix of the Hessian matrix in Newton’s method, For x (h) =[θ1 (h) ,θ2 (h) ,θ3 (h) ,θ4 (h) ] to find the gradient of f(x), and the search direction is the direction pointing to the optimal point of the function;

[0171] Determine the optimal search step size λ (h) :

[0172]

[0173] x (h) +λd (h) Substitute into f(x) and set f(x) = 0 to obtain the optimal search step length λ(h) ;

[0174] Approximation matrix B of the Hessian matrix h The iteration formula is:

[0175]

[0176] Where: s h =λ (h) d (h) , is the difference between the h+1th solution and the hth solution;

[0177] ④ The quasi-Newton method is used to iterate the formula to calculate the permanent magnet synchronous motor parameter identification value. The iterative formula is:

[0178]

[0179] From the solution of the nonlinear equation system x = [θ1, θ2, θ3, θ4], the required R is obtained by reverse deduction. s , L, ψ parameter identification values. Add the better individuals searched by the quasi-Newton method to the population to complete the population update.

[0180] Finally, the fitness of the new population is evaluated to determine whether it has converged. If it has not converged, the genetic algorithm operation is improved until it converges.

[0181] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor implements the permanent magnet synchronous motor parameter identification method.

[0182] This embodiment further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned permanent magnet synchronous motor parameter identification method is implemented.

[0183] In summary, the permanent magnet synchronous motor parameter identification method, electronic device and computer readable storage medium provided in this embodiment can achieve global optimal parameter identification when the motor is running, and has the advantages of short search time, fast convergence speed and applicability to various occasions. The method proposed in the present invention is simple, easy to understand, easy to implement, and highly accurate, and is a feasible solution for permanent magnet synchronous motor parameter identification.

[0184] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for identifying parameters of a permanent magnet synchronous motor, characterized in that: The following steps are involved: Based on the mathematical model of the permanent magnet synchronous motor in the dq axis coordinate system, the fitness function of the improved genetic algorithm is determined; the parameters of the permanent magnet synchronous motor are identified using the improved genetic algorithm; wherein the improved genetic algorithm means that the quasi-Newton method is used to optimize the results of the genetic algorithm every X generations of evolution; The method for performing parameter identification on a permanent magnet synchronous motor using an improved genetic algorithm comprises the following steps: a) population initialization: setting an evolutionary algebra counter m=1, setting a maximum evolutionary algebra to m max , randomly generate M individuals as the initial population P(m); b) individual evaluation: calculate the fitness of each individual in the population P(m); c) perform genetic operations on the population P(m), including selection, crossover and mutation, to obtain the next generation population P(m+1); d) determine whether the evolutionary generation is a multiple of X. If so, use the quasi-Newton method to perform local optimization search on the individuals in the current population; otherwise, go to step e); e) determine whether the termination condition is met. If so, use the individual with the maximum fitness function value obtained during the evolution process as the optimal solution output and terminate the calculation; otherwise, set m=m+1 and return to step b); The fitness function of the improved genetic algorithm is: In the formula, in: For individuals The corresponding fitness function value; For individuals The corresponding objective function value; individual is θ i , a set of estimated values ​​where i = 1, 2, 3, 4; i d (k) is the actual value of the d-axis current of the permanent magnet synchronous motor at time k, i q (k) is the actual value of the q-axis current of the permanent magnet synchronous motor at time k, is the estimated value of the d-axis current of the permanent magnet synchronous motor at time k, is the estimated value of the q-axis current of the permanent magnet synchronous motor at time k; N is the number of sampling points; u d (k) and u q (k) are the actual values ​​of the d-axis voltage and q-axis voltage of the permanent magnet synchronous motor at time k; ω e (k) is the actual value of the electrical angular velocity of the permanent magnet synchronous motor at time k; R s , L, ψ f They are the stator resistance, inductance and permanent magnet flux linkage of the permanent magnet synchronous motor; In step d), the quasi-Newton method is used to perform local optimization search on individuals in the current population, including: using the quasi-Newton method to search for individuals in the current population with probability p g The quasi-Newton method is used for optimization search; among them, the probability p corresponding to a certain individual g The calculation formula is as follows: Where: p gmax is the maximum search probability; p gmin is the minimum search probability, F is the fitness function value of the individual, and F avg is the average fitness function value of all individuals in the current population; The quasi-Newton method is used to perform local optimization search on the individual U in the current population, including: 1) using the individual as the initial value x of the quasi-Newton method iteration (0) ; Assume that the current number of iterations of the quasi-Newton algorithm is h = 0, and the maximum number of iterations is H; the approximate matrix B of the Hessian matrix in the Newton method h Initialize to the identity matrix; 2) Determine the search direction d during the h-th iteration of the quasi-Newton method (h) : in: For x (h) =[θ1 (h) ,θ2 (h) ,θ3 (h) ,θ4 (h) ] to find the gradient of f(x); f(x) is a nonlinear equation set used for local search of the quasi-Newton method; 3) determine the optimal search step length λ in the hth iteration process (h) : 4) Apply the quasi-Newton method iteration formula to calculate the permanent magnet synchronous motor parameter identification value; where the quasi-Newton method iteration formula is: (h+1) =x (h) +λ (h) d (h) ; 5) Determine whether the iteration termination condition is met. If so, use the current solution x (h+1) As the optimization solution output of individual U, the algorithm terminates; otherwise, enter step 8); 6) According to the following formula, the approximate matrix B of the Hessian matrix in the Newton method h To iterate: Where: s h =λ (h) d (h) ; 7) Let h=h+1, and return to step 2); The nonlinear equations for the local search of the quasi-Newton method are obtained based on the following method: the d-axis voltage, d-axis current, q-axis voltage, q-axis current and electrical angular velocity of the permanent magnet synchronous motor are collected at the corresponding time, and the dq-axis current discrete state equation is obtained: Where: t1, t2, t3, t4 are different sampling times, and t1 = t2-1, t3 = t4-1, t4 ≠ t2; u d (t), i d (t),u q (t), i q (t) and ω e (t) represent the d-axis voltage, d-axis current, q-axis voltage, q-axis current and electrical angular velocity of the permanent magnet synchronous motor at time t respectively; Let x = [θ1, θ2, θ3, θ4] be the solution vector of the nonlinear equation system, and the nonlinear equation system used for the local search of the quasi-Newton method is obtained as follows:

2. The method for identifying parameters of a permanent magnet synchronous motor according to claim 1, characterized in that: In step c), for each individual in the current population, the crossover probability p is determined according to its fitness function value using the following formula: c and mutation probability p m : Where: F is the fitness function value of the individual, F avg is the average fitness function value of all individuals in the current population, p cmax is the maximum crossover probability, p cmin is the minimum crossover probability, p mmax is the maximum mutation probability, p mmin is the minimum mutation probability.

3. The method for identifying parameters of a permanent magnet synchronous motor according to claim 1 or 2, characterized in that: The genetic operation in step c) also includes an elimination operation; the elimination operation means that in each generation of evolution, after completing the crossover and mutation operations, M′ new individuals are generated through the chaotic search system, and the fitness function values ​​of the newly generated individuals are calculated, and compared with the individuals ranked after M′ in the fitness function value in this generation of the population, and the individuals ranked after M′ in these 2M′ individuals are eliminated, and the individuals ranked before M′ in these 2M′ individuals are added to the current population.

4. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor implements the permanent magnet synchronous motor parameter identification method according to any one of claims 1 to 3.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying parameters of a permanent magnet synchronous motor according to any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Load model parameter identifiability determination method based on likelihood profile method

    CN106602551A

  • Doubly-fed fan converter parameter identification method based on improved quantum genetic algorithm

    CN111817347A