PMSM fuzzy PI controller optimization method based on improved artificial bee colony algorithm

By improving the artificial bee colony algorithm, dividing the roles of worker bees and using the adaptive limit mechanism to optimize the fuzzy PI controller parameters, the problems of difficult parameter selection and easy falling into local optimality in traditional methods are solved, and the control performance and stability of the permanent magnet synchronous motor are improved.

CN120652779APending Publication Date: 2025-09-16GUANGXI NORMAL UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510953097.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

The parameter selection of traditional fuzzy PI controller lacks theoretical basis and relies on engineering experience, which makes it difficult to optimize under different working conditions. In addition, the existing optimization algorithm is complex and prone to falling into local optimality, and cannot adapt to different optimization scenarios.

Method used

The artificial bee colony algorithm is improved, and the bees are divided into three roles: worker bees, observer bees, and scout bees. An adaptive limit mechanism and global optimal information are introduced. The threshold is screened and dynamically adjusted through the roulette method, and the parameters are optimized in combination with the fitness function.

Benefits of technology

The automatic optimization of fuzzy PI controller parameters is realized, local optimum is avoided, the dynamic response performance and steady-state control accuracy of the system under variable working conditions are improved, and the parameter debugging process is simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120652779A_ABST
    Figure CN120652779A_ABST
Patent Text Reader

Abstract

The invention discloses a PMSM fuzzy PI controller optimization method based on an improved artificial bee colony algorithm. The method comprises the following steps: constructing a fuzzy PI controller to output a control quantity in real time; and an improved artificial bee colony algorithm is adopted to optimize six-dimensional parameters. In the algorithm, all individuals are initialized as worker bees, the first half iteration period is explored by using a traditional formula, and the second half iteration period is searched by using an improved formula integrated with global optimal information; screening 30% of worker bees by combining fitness sorting with a roulette method, and converting the worker bees into observation bees for local exploration; the forgetting threshold Limit is dynamically adjusted along with the number of iterations and is adjusted along with the change of the population fitness value, when the number of individual forgetting times exceeds the Limit, a reconnaissance bee is converted into a reconnaissance bee, and an improved formula integrated with global optimal information is adopted for searching again. And calculating an individual fitness value through an improved fitness function, transmitting the individual fitness value back to the algorithm to perform advantage and disadvantage comparison of a solution, and outputting a global optimal parameter after iterating to the maximum number of times. By improving the search strategy, the selection mechanism and the fitness function of the algorithm, efficient parameter optimization is realized, the control precision, the response speed and the robustness of the PMSM fuzzy PI controller are remarkably improved, and the application prospect is good.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of motor control, and in particular to a PMSM fuzzy PI controller optimization method based on an improved artificial bee colony algorithm. Background Art

[0002] Permanent magnet synchronous motor (PMSM) has been widely used in new energy vehicles, industrial automation and other fields due to its advantages such as high power density and high efficiency. In the vector control system of permanent magnet synchronous motor, PI controller parameters directly affect system performance, but the traditional fixed parameter PI controller is difficult to adapt to changes in load, speed and other working conditions. To this end, the fuzzy PI controller dynamically compensates the PI parameters (K in real time) p , K i ) has become a current research hotspot. However, the fuzzy PI controller still has significant defects: on the one hand, its quantization factor (K e , K ec ), scaling factor (K up , K ui ) and initial value (K p , K i ) selection lacks theoretical basis and relies excessively on engineering experience, making it difficult to optimize control performance under different operating conditions. Furthermore, existing optimization algorithms inherently suffer from complex parameter tuning, which not only fails to address parameter dependency but also increases the difficulty of application. While the traditional artificial bee colony (ABC) algorithm has been used for parameter optimization, it suffers from a single search strategy, a tendency to fall into local optimality (particularly when optimizing high-dimensional nonlinear parameters, where population diversity is rapidly lost), and a fixed threshold that cannot be dynamically adjusted to suit different optimization scenarios. These issues severely limit its effectiveness in optimizing the parameters of fuzzy PI controllers for permanent magnet synchronous motors.

[0003] Deficiencies of existing technology: 1. Key parameters of fuzzy PI controller (quantization factor K e , K ec , scaling factor K up , K ui , initial value K p , K i ) are difficult to select, over-rely on engineering experience, lack theoretical support, and make it difficult to achieve performance optimization under different working conditions.

[0004] 2. Existing optimization algorithms themselves have many parameters that need to be debugged, which essentially does not solve the problem of difficulty in parameter debugging and increases the complexity of application.

[0005] 3. Traditional artificial bee colony algorithms have obvious flaws: a single search strategy; a tendency to fall into local optimality (especially when optimizing high-dimensional parameters); and a fixed value that abandons the threshold. This lacks flexibility and cannot adapt to different optimization scenarios.

[0006] Therefore, the existing technology has deficiencies and needs further improvement. Summary of the Invention

[0007] In view of the problems existing in the prior art, the present invention provides a PMSM fuzzy PI controller optimization method based on an improved artificial bee colony algorithm.

[0008] To achieve the above object, the specific solutions of the present invention are as follows: The present invention provides a PMSM fuzzy PI controller optimization method based on an improved artificial bee colony algorithm, the method comprising the following steps: S1, the bees in the artificial bee colony algorithm are divided into three roles: worker bees, observer bees, and scout bees. The solution of each bee corresponds to the parameters of the fuzzy PI controller, which includes the quantization factor K e , K ec , scaling factor K up , K ui , the initial parameter K of the PI controller p0 , K i0 ; S2, randomly initialize all bee individuals in the solution space, where the solution space is the upper and lower limits of the optimized parameters; S3, after initialization, all bees are transformed into worker bees. The worker bees perform local search near the current position. In the first half of the maximum number of iterations, the worker bee solution formula of the traditional artificial bee colony algorithm is used. In the second half of the maximum number of iterations, the improved solution formula that incorporates the global optimal solution information is used. The fitness is used to determine whether to update the position and reset the "forgotten times" trial(i); S4, select the top 20% worker bees in terms of fitness, and select 10% from the remaining 70% through the roulette wheel method. A total of 30% of the worker bees are converted into observer bees for local development. A new solution is generated according to the new solution formula of the observer bees and the position and trial(i) are updated according to the fitness; S5, when the trial(i) of a worker bee is greater than a preset threshold Limit, the worker bee transforms into a scout bee. The threshold Limit is dynamically adjusted with the number of iterations and the change of the group fitness value. The scout bee reinitializes its position around the global optimal solution and resets its fitness and trial(i); S6, calculates the fitness value of each bee solution through the fitness function, and transmits the fitness value back to the improved artificial bee colony algorithm to compare the quality of the solutions. After iterating until the maximum number of iterations is reached, the global optimal solution is output, completing the optimization of the permanent magnet synchronous motor fuzzy PI controller parameters.

[0009] Furthermore, in step S1, the fuzzy PI controller adopts a two-stage fuzzy controller architecture, and the inputs are the speed error e and the speed error change rate e c , through the quantization factor K e , K ec Map the input variables to fuzzy variables E, E c , the fuzzy output variable is obtained by fuzzy reasoning and centroid method, and then compared with the proportional factor K up , K ui Multiply to obtain the parameter compensation value ΔK of the PI controller p and ΔK i .

[0010] Furthermore, in step S1, the fuzzy PI controller is a position PI controller, and its parameter K p , K i By the initial parameter K p0 , K i0 and compensation value ∆K p , ∆K i Add together and the output is the current loop i q The target value is set and the amplitude is limited according to the motor operating conditions.

[0011] Furthermore, the formula for random initialization in step S2 is: ; Among them, x i is the initialization position, is a random number matrix, 、 are the upper and lower bounds of the solution space, N is the total number of bee colonies, and D is the dimension.

[0012] Furthermore, the solution formula of the worker bee in step S3 is: when When using ; when When using ; in, is the current iteration number, is the maximum number of iterations; v i is the position of the new solution, x i is the initialization position, x k is the position of a randomly selected neighbor, xj is the global optimal solution, ϕ is a random perturbation factor in the range [0,1], and α is a random perturbation factor in the range [0.1,0.3].

[0013] Furthermore, the new solution formula for observing bees in step S4 is: ; Among them, x i is the current position of the observing bee, x k is the position of the randomly selected other bees, and ϕ is a random perturbation factor in [0,1].

[0014] Furthermore, the formula of the roulette method in step S4 is: ; in, f ij It is the worker bee solution i The fitness of the bee colony, N is the total number of bees, P ij is the probability of being selected, f ik It refers to the fitness of the kth solution of the i-th worker bee.

[0015] Furthermore, the threshold Limit in step S5 is adjusted as follows: in the early stage, the Limit is 0.4 times the maximum number of iterations, and gradually decreases with the number of iterations in the later stage; when the overall fitness of the group tends to be smaller, the Limit is reduced; when the overall fitness of the group tends to be larger, the Limit is increased.

[0016] Furthermore, the solution formula of the scout bee in step S5 is: ; Among them, x i is the position of the new solution after reinitialization, x j is the global optimal solution, and β is a random perturbation factor in the range of [-0.15, 0.15].

[0017] Furthermore, the calculation formula of the fitness function in step S6 is: When the speed is not overshooting, ; When the speed overshoots, ; Among them, f is the adaptation value, e(t) is the speed error, t is the time, α and β are the coefficients of the time absolute error integral and the absolute error integral, respectively. α+β=1. The values ​​of α and β affect the artificial bee colony algorithm's recognition of overshoot and judgment of the overall error. The specific values ​​depend on the specific operating conditions and operating time of the PMSM system.

[0018] The technical solution of the present invention has the following beneficial effects: 1. Automatic parameter optimization can make the fuzzy PI controller perform better; 2. Propose an adaptive limit mechanism to balance global search and local development, avoiding falling into local optimality; 3. Worker bees introduce global optimal information to improve local search capabilities and convergence speed; 4. Observer Bee adopts a mixed selection strategy of "20% elite + 10% roulette method" to improve solution diversity and stability; 5. The scout bee reinitializes around the global optimum, effectively escaping from the local optimum. 6. The fitness function adds overshoot judgment to make the speed performance judgment more accurate; 7. This improved algorithm requires fewer parameters to be debugged and has stronger engineering applicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is the structure diagram of the PMSM fuzzy PI controller optimized by the improved artificial bee colony algorithm; Figure 2 This is the calculation process of the adaptive threshold Limit; Figure 3 It is to improve the parameter optimization process of the artificial bee colony algorithm; Figure 4 is the optimization curve of each optimization algorithm; Figure 5 It is the overall flow chart of the present invention. DETAILED DESCRIPTION

[0020] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It will be understood that the specific embodiments described herein are merely intended to explain the present invention rather than to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only show portions related to the present invention rather than all of the present invention.

[0021] Combine Figure 1-Figure 5 As shown, the present invention provides a permanent magnet synchronous motor PI controller optimization method based on an improved artificial bee colony algorithm, the method comprising the following steps: S1, the bees in the artificial bee colony algorithm are divided into three roles: worker bees, observer bees, and scout bees. The solution of each bee corresponds to the parameters of the fuzzy PI controller, which includes the quantization factor K e , K ec , scaling factor K up , K ui , the initial parameter K of the PI controller p0 , K i0 ; S2, randomly initialize all bee individuals in the solution space, where the solution space is the upper and lower limits of the optimized parameters; S3, after initialization, all bees are transformed into worker bees. The worker bees perform local search near the current position. In the first half of the maximum number of iterations, the worker bee solution formula of the traditional artificial bee colony algorithm is used. In the second half of the maximum number of iterations, the improved solution formula that incorporates the global optimal solution information is used. The fitness is used to determine whether to update the position and reset the "forgotten times" trial(i); S4, select the top 20% worker bees in terms of fitness, and select 10% from the remaining 70% through the roulette wheel method. A total of 30% of the worker bees are converted into observer bees for local development. A new solution is generated according to the new solution formula of the observer bees and the position and trial(i) are updated according to the fitness; S5, when the trial(i) of a worker bee is greater than a preset threshold Limit, the worker bee transforms into a scout bee. The threshold Limit is dynamically adjusted with the number of iterations and the change of the group fitness value. The scout bee reinitializes its position around the global optimal solution and resets its fitness and trial(i); S6, calculates the fitness value of each bee solution through the fitness function, transmits the fitness value back to the improved artificial bee colony algorithm, iterates until the maximum number of iterations is reached, outputs the global optimal solution, and completes the optimization of the permanent magnet synchronous motor fuzzy PI controller parameters.

[0022] In step S1, the fuzzy PI controller adopts a two-stage fuzzy controller architecture, and the inputs are the speed error e and the speed error change rate e c , through the quantization factor K e , K ec Map the input variables to fuzzy variables E, E c , the fuzzy output value is obtained by fuzzy reasoning and centroid method y p 、 y i , and then with the scaling factor K up , K ui Multiply to obtain the parameter compensation value ΔK of the PI controller p and ΔK i .

[0023] In step S1, the fuzzy PI controller is a position PI controller, and its parameter K p , K i By the initial parameter K p0 , K i0 and compensation value ∆K p , ∆K i Add together and the output is the current loop i q The target value is set and the amplitude is limited according to the motor operating conditions.

[0024] The formula for random initialization in step S2 is: ; Among them, x i is the initialization position, is a random number matrix, 、 are the upper and lower bounds of the solution space, N is the total number of bee colonies, and D is the dimension.

[0025] The solution formula of the worker bee in step S3 is: when When using ; when When using ; in, is the current iteration number, is the maximum number of iterations; v i is the position of the new solution, x i is the initialization position, x k is the position of a randomly selected neighbor, x j is the global optimal solution, ϕ is a random perturbation factor in the range [0,1], and α is a random perturbation factor in the range [0.1,0.3].

[0026] The new solution formula for observing bees in step S4 is: ; Among them, x i is the current position of the observing bee, x k is the position of the randomly selected other bees, and ϕ is a random perturbation factor in [0,1].

[0027] The formula of the roulette method in step S4 is: ; in, f ij It is the worker bee solution i The fitness of the bee colony, N is the total number of bees, P ij is the probability of being selected, f ik It refers to the fitness of the kth solution of the i-th worker bee.

[0028] The threshold value Limit in step S5 is adjusted as follows: in the early stage, the Limit is 0.4 times the maximum number of iterations, and gradually decreases with the number of iterations in the later stage; when the overall fitness of the group tends to be smaller, the Limit is reduced; when the overall fitness of the group tends to be larger, the Limit is increased.

[0029] The solution formula of the scout bee in step S5 is: ; Among them, x i is the position of the new solution after reinitialization, x j is the global optimal solution, and β is a random perturbation factor in the range of [-0.15, 0.15].

[0030] The calculation formula of the fitness function in step S6 is: When the speed is not overshooting, ; When the speed overshoots, ; Among them, f is the adaptation value, e(t) is the speed error, t is the time, α and β are the coefficients of the time absolute error integral and the absolute error integral, respectively. α+β=1. The values ​​of α and β affect the artificial bee colony algorithm's recognition of overshoot and judgment of the overall error. The specific values ​​depend on the specific operating conditions and operating time of the PMSM system.

[0031] Example 1: A parameter optimization method for permanent magnet synchronous motor fuzzy PI controller based on improved artificial bee colony algorithm (IABC) is shown in the following figure. Figure 1 As shown in the figure, it includes PI controller, fuzzy controller and improved artificial bee colony algorithm. The core principle is to globally optimize the key parameters of the fuzzy PI controller through bionic intelligent algorithm, so as to solve the problems of single search strategy, easy premature convergence and rigid threshold adjustment in high-dimensional parameter optimization of traditional artificial bee colony algorithm, and at the same time improve the dynamic response performance and steady-state control accuracy of permanent magnet synchronous motor under variable working conditions.

[0032] 1. The present invention adopts a two-stage fuzzy controller architecture, whose input is the speed error e and the speed error change rate e c The above input quantities are respectively related to the quantization factor K e , K ec After multiplication, we get the fuzzy domain mapping values ​​E and E c , the calculation formula is as shown in formula (1).

[0033] ⑴ 2. The setting of fuzzy rules and fuzzy domain mainly refers to expert experience. For example, when |e| fluctuates greatly, K should be increased in order to make the system make rapid adjustments. p , reduce K i ; When |e| fluctuates slightly, K should be reduced for the stability and reliability of the system. p , increase K i .

[0034] K pis the proportional term coefficient, K i is the integral term coefficient.

[0035] 3. Fuzzy domain mapping values ​​E, E c Fuzzy reasoning is performed by combining fuzzy rules and triangle membership function. The fuzzy reasoning process follows the Mamdani method and the fuzzy output is calculated using the centroid method. y p 、 y i , and the scaling factor K up , K ui Multiply by to obtain the parameter compensation value ΔK of the PI controller p and ΔK i .

[0036] The calculation formula of the centroid method is shown in formula (2), where: y(i) is the fuzzy quantity of the inference output, y m is the weight of each group of elements.

[0037] ⑵ The compensation value calculation formula is as follows: ⑶ 4. Use position PI controller, the input is speed error, the output is current loop i q The target value is set, and the output is limited according to the motor operating conditions. The output value is calculated as shown in formula (4). ⑷ Among them, e(t) is the real-time speed error, K p is the proportional term coefficient, K i is the integral term coefficient, whose value is determined by the initial parameter K of the PI controller p0 , K i0 and the output ∆K of the fuzzy controller p , ∆K i Add them together and the calculation formula is as shown in formula (5). ⑸ 5. After completing the domain division, membership function construction and fuzzy rule set design, the dynamic performance of the fuzzy PI controller is still subject to the matching accuracy of key parameters. Among them, the quantization factor K e , K ec Determine the speed error e and error change rate e c Mapping gain to fuzzy domain: larger K e , K ecIt can improve the system's sensitivity to deviation signals, but it may cause oscillation of the control amount due to excessive amplification of the input; a smaller value can enhance stability by reducing the fuzzy input resolution, but it will slow down the system's response speed. up , K ui The conversion scale of fuzzy output to PI parameter compensation is regulated, where K up Directly affects the system's transient response rate to error, K ui Determines the convergence speed of the steady-state error; and the initial value K of the PI controller p0 , K i0 As the benchmark for parameter compensation, its value is directly related to the dynamic characteristics and anti-interference ability of the system during the startup phase.

[0038] The above parameters (K e ,K ec ,K up ,K ui ,K p0 ,K i0 ) constitutes a multi-dimensional coupled nonlinear optimization space, and traditional parameter adjustment based on trial and error is difficult to break through the local optimal trap. For example, high K e Need to match the K p To suppress overshoot peak, low K ec Need to pass K i Therefore, building a global optimization model covering the entire parameter set is a necessary condition for achieving a performance leap in the fuzzy PI controller.

[0039] 6. The present invention introduces an improved artificial bee colony algorithm and designs a hierarchical search strategy based on the strong coupling characteristics between parameters, thereby realizing full-link intelligent optimization from initial value to compensation gain, breaking through the limitations of traditional empirical parameter adjustment.

[0040] The artificial bee colony algorithm consists of three roles: worker bees, observer bees, and scout bees. The solution of each bee is the parameter we need (K e ,K ec ,K up ,K ui ,K p0 ,K i0 The division of labor within a bee colony is as follows: ① After initialization, all bees are transformed into worker bees, which are responsible for conducting a local search near their current location. They generate new candidate solutions near their current location and decide whether to accept them based on their fitness. If the new solution has better fitness, the worker bee updates its position. Each worker bee calculates the fitness of the new solution in each iteration. If the new solution is better, it updates its position and resets its "forget count" trial(i). Otherwise, it increments trial(i), indicating that the search at that location was not successful.

[0041] ② Using a roulette wheel or fitness ranking method, some worker bees are selected to become observer bees. The lower the fitness, the greater the probability of selection. Observer bees conduct further local searches based on the worker bees' results. After generating a new solution, they determine whether their fitness has improved and decide whether to update their position. If the new solution is better, the position is updated and trial(i) is reset. Otherwise, the trial(i) count is incremented, indicating that the search results at that location were poor.

[0042] ③ The scout bee's task is to randomly select a new location and restart the search if a better solution is not found after multiple searches (i.e., the number of trials at that location is greater than the Limit). This prevents falling into a local optimum. When a worker bee's trial(i) exceeds the preset threshold, the worker bee becomes a scout bee, randomly reinitializing its location and resetting its fitness and trial(i) counter.

[0043] 7. In order to enable the artificial bee colony algorithm to better optimize the multi-dimensional coupling, high-dimensional, and nonlinear parameters of the fuzzy PI controller, the present invention makes the following improvements to the artificial bee colony algorithm: ①In the initialization stage, each bee is randomly initialized in the solution space according to formula (6).

[0044] ⑹ ② In the worker bee stage, the improvement made here is that the solution formula for the first half of the maximum number of iterations is the worker bee solution formula of the traditional artificial bee colony algorithm, because the solution space needs to be extensively explored in the early stage to avoid falling into the local optimum. The solution formula for the second half of the maximum number of iterations is an improved solution formula that incorporates information about the global optimal solution, allowing the worker bees to quickly converge to the global optimum or its vicinity during the iteration. The solution formula is Equation (7).

[0045] ⑺ ③ In the observation bee stage, the improvement here is to select the top 20% of worker bees in terms of fitness, and select 10% of the remaining 70% through the roulette wheel method. A total of 30% of high-quality worker bees are converted into observation bees for further local development. The new solution formula is as follows (8), and the formula of the roulette wheel method is as follows (9). ⑻ ⑼ ④ In the scout bee stage, when the trial(i) (number of forgets) of a worker bee is greater than the preset threshold Limit, the worker bee is transformed into a scout bee. In order to improve the convergence efficiency and global optimization ability of the algorithm, the traditional fixed Limit is improved as follows: 1. Dynamically adjusted with the number of iterations, the early Limit is 0.4 times the maximum number of iterations to avoid premature forgetting and sufficient search; in the later stage, the Limit gradually decreases with the number of iterations to accelerate convergence. 2. Adjusted with the changes in the fitness value of the group, if the overall fitness changes little, it means that it may fall into the local optimum, then the Limit is reduced, jump out of the local optimum as soon as possible, and explore again; if the overall fitness changes greatly, it means that it is in the optimization stage, then the Limit is increased and exploration continues. The process of scout bee transformation and adaptive threshold Limit calculation is as follows Figure 2 shown.

[0046] At the same time, the formula of the scout bee solution is changed to formula (10). The solution of the traditional scout bee is consistent with the solution in the initialization stage, while the improved solution is reinitialized with the global optimal solution as the center, so that the new solution is close to the optimal solution. At the same time, the introduction of disturbance makes the new solution diverse, avoids falling into the local optimum, and is more efficient. It is especially suitable for the case where the problem space is not too large.

[0047] ⑽ In the above formula: x i is the initialization position, x k The location of the selected neighbor, x j is the global optimal solution, ϕ is the random perturbation factor in the range of [0,1], α is the random perturbation factor in the range of [0.1,0.3], β is the random perturbation factor in the range of [-0.15,0.15], and v i is the position of the new solution, f ij It is the worker bee solution i The fitness of the bee colony, N is the total number of bees, P ij is the probability of being selected, D is the dimension, pop max 、pop min are the upper and lower bounds of the solution space respectively.

[0048] 8. Each bee's solution is transmitted to the PMSM vector control system. During operation, the PMSM vector control system calculates its fitness value using the fitness function of Equation (11). The smaller the fitness value, the better the solution. This function is derived from the traditional time absolute error integral function. While this traditional function accurately calculates the error during the entire operation process, it lacks the ability to identify overshoot. Therefore, when speed overshoot occurs, the absolute error integral function is added and the overshoot is calculated separately to better identify speed overshoot. After the calculation is completed, the fitness value is transmitted back to the improved artificial bee colony algorithm for comparison.

[0049] ⑾ Where f is the adaptation value, e(t) is the speed error, t is time, α and β are the coefficients for the time absolute error integral and the absolute error integral, respectively, and α + β = 1. The values ​​of α and β affect the artificial bee colony algorithm's identification of overshoot and judgment of overall error. The specific values ​​depend on the specific operating conditions and operating time of the PMSM system.

[0050] 9. The parameter optimization process of the fuzzy PI controller of the speed loop of the PMSM vector control system using the improved artificial bee colony algorithm is as follows: Figure 3 As shown in the figure, the solution of each bee in each stage is fed into the PMSM vector control system. The system is run once according to the set operating conditions and operating duration, and its fitness value is calculated. After the run, the fitness value is returned to the algorithm for comparison. If the fitness value of the new solution is better, the position of the bee is updated. This iteration continues until the maximum number of iterations is reached, at which point the global optimal solution is output, completing the optimization of the parameters of the fuzzy PI controller in the speed loop of the PMSM vector control system.

[0051] 1. Process steps: A parameter optimization method for a fuzzy PI controller of a permanent magnet synchronous motor based on an improved artificial bee colony algorithm includes a PI controller, a fuzzy controller, and an improved artificial bee colony algorithm. The core principle is to globally optimize the key parameters of the fuzzy PI controller through a bionic intelligent algorithm, thereby solving the problems of a single search strategy, easy premature convergence, and rigid threshold adjustment in high-dimensional parameter optimization of traditional artificial bee colony algorithms. At the same time, it improves the dynamic response performance and steady-state control accuracy of the permanent magnet synchronous motor under variable working conditions.

[0052] A parameter optimization method for a permanent magnet synchronous motor fuzzy PI controller based on an improved artificial bee colony algorithm is described in the following steps: Step 1: Divide the bees in the artificial bee colony algorithm into three roles: worker bees, observer bees, and scout bees. The solution of each bee is the parameter we need (K e ,K ec ,K up ,K ui ,K p0 ,K i0 ).

[0053] Step 2: First, all bee individuals are randomly initialized in the solution space according to formula (6). The solution space is the upper and lower limits of the optimized parameters.

[0054] Step 3: After initialization, all bees are transformed into worker bees and perform a local search near their current position. The solution formula for the first half of the maximum number of iterations is the worker bee solution formula of the traditional artificial bee colony algorithm, because the solution space needs to be extensively explored in the early stage to avoid falling into the local optimum. The solution formula for the second half of the maximum number of iterations is an improved solution formula that incorporates information about the global optimal solution, allowing the worker bees to quickly converge to the global optimum or its vicinity during iteration. The solution formula is Equation (7).

[0055] They generate new candidate solutions near their current location and decide whether to accept them based on their fitness. If the new solution has a better fitness, the worker bee updates its position. Each worker bee updates its position in each iteration and calculates the fitness of the new solution. If the new solution is better, it updates its position and resets its "forget count" trial(i). Otherwise, it increments trial(i), indicating that the search results for that location were poor.

[0056] Step 4: Select the top 20% of worker bees in terms of fitness. From the remaining 70%, select 10% using the roulette wheel method. A total of 30% of the high-quality worker bees are converted to observer bees for further local development. The formula for the new solution is shown in Equation (8), and the formula for the roulette wheel method is shown in Equation (9). The observer bee performs a local search based on the worker bees. After generating a new solution, it determines whether the fitness has improved and decides whether to update its position. If the new solution is better, it updates the position and resets its trial(i). Otherwise, it increases the trial(i) count, indicating that the search effect at that position is poor.

[0057] Step 5: When a worker bee's trial(i) (number of forgets) exceeds the preset threshold, the worker bee becomes a scout bee. The scout bee's task is to restart the search and reset its fitness and trial(i) counter when it fails to find a better solution at a certain location after multiple searches.

[0058] In order to improve the convergence efficiency and global optimization ability of the algorithm, the traditional fixed Limit is improved as follows: 1. Dynamically adjusted with the number of iterations, the early Limit is 0.4 times the maximum number of iterations to avoid premature forgetting and fully search; the later Limit is gradually reduced with the number of iterations to accelerate convergence. 2. Adjusted with the change of group fitness value, if the overall fitness changes little, it means that it may fall into the local optimum, then the Limit is reduced, jump out of the local optimum as soon as possible, and explore again; if the overall fitness changes greatly, it means that it is in the optimization stage, then the Limit is increased and exploration continues. The process of scout bee transformation and adaptive threshold Limit calculation is as follows Figure 2 shown.

[0059] At the same time, the formula of the scout bee solution is changed to formula (10). The solution of the traditional scout bee is consistent with the solution in the initialization stage, while the improved solution is explored with the global optimum as the center. The advantage is that the new solution has better adaptability. At the same time, the introduction of disturbance makes the new solution diverse, avoids falling into the local optimum, and is more efficient. It is especially suitable for situations where the problem space is not too large.

[0060] Step 6: The quality of each bee's solution is judged by the fitness value calculated by the fitness function. The smaller the fitness value, the better the solution. This function is improved from the traditional time absolute error integral function. The traditional function can accurately calculate the error of the entire operation process, but its ability to identify overshoot is insufficient. To address this, when the speed overshoots, the absolute error integral function is added and the overshoot is calculated separately, which can better identify the overshoot. The calculation formula is shown in Equation (11). After the calculation is completed, the fitness value is transmitted back to the artificial bee colony algorithm.

[0061] Step 7: The solution of each bee in each stage must be passed into the PMSM vector control system, run once according to the set working conditions and running time, and calculate the fitness value. After the operation is settled, the fitness value is passed back to the algorithm for comparison. If the fitness value of the new solution is better, the position of the bee is updated. Iterate in this way until the set maximum number of iterations is reached, and then output the global optimal solution, thus completing the optimization of the parameters of the speed loop fuzzy PI controller of the PMSM vector control system. The parameter optimization process of the speed loop fuzzy PI controller of the PMSM vector control system using the improved artificial bee colony algorithm is as follows Figure 3 shown.

[0062] Step 8: Verify that the present invention has strong optimization capability, and conduct comparative experiments on parameter optimization of the fuzzy PI controller of the speed loop of the PMSM vector control system on the Matlab / Simulink platform with the standard ABC, improved particle swarm algorithm (PSO), genetic algorithm (GA), particle swarm genetic algorithm (PSOGA), and sine-cosine algorithm (SCA).

[0063] Initial conditions: total number of individuals is 50; number of iterations is 30; parameter dimension (K e ,K ec ,K up ,K ui , K p , K i ) is 6; the upper limit of the parameter is [0.015, 0.00015, 0.23, 7, 0.25, 2]; the lower limit of the parameter is [0.005, 0.00005, 0.13, 5, 0.15, 1].

[0064] The simulation conditions are: the PMSM starts with no load, the target speed is 1000 rpm, a load of 6 N·m is added at 0.25 s, and the simulation duration is 0.5 s. Based on the simulation conditions, the fitness function coefficients α and β are selected as 0.4 and 0.6, respectively.

[0065] The iterative results of each algorithm are as follows Figure 4 As shown in the figure, the final fitness value is GA>SCA>PSO>ABC>PSOGA>IABC. Under the same conditions, the smaller the fitness value is, the better it is, and the IABC has a stronger optimization ability.

[0066] 2. Compared with the existing technology, the advantages of this invention are: (1) Automatic parameter optimization can make the fuzzy PI controller perform better.

[0067] (2) An adaptive limit mechanism is proposed to balance global search and local development and avoid falling into local optimality.

[0068] (3) Worker bees introduce global optimal information to improve local search capabilities and convergence speed.

[0069] (4) Observer bees adopt a mixed selection strategy of "20% elite + 10% roulette method" to improve solution diversity and stability; (5) The scout bee reinitializes around the global optimum and escapes from the local optimum more effectively.

[0070] (6) The fitness function adds overshoot judgment, which makes the judgment of speed performance more accurate.

[0071] (7) This improved algorithm requires fewer parameters to be debugged and has stronger engineering applicability.

[0072] The above description is only a preferred embodiment of the present invention and does not limit the scope of the invention. All equivalent structural transformations made by using the contents of the present invention description and drawings under the inventive concept of the present invention, or direct / indirect application in other related technical fields are included in the protection scope of the present invention.

Claims

1. A PMSM fuzzy PI controller optimization method based on an improved artificial bee colony algorithm, characterized in that: The method comprises the following steps: S1, the bees in the artificial bee colony algorithm are divided into three roles: worker bees, observer bees, and scout bees. The solution of each bee corresponds to the parameters of the fuzzy PI controller, which includes the quantization factor K e , K ec , scaling factor K up , K ui , the initial parameter K of the PI controller p0 , K i0 ; S2, randomly initialize all bee individuals in the solution space, where the solution space is the upper and lower limits of the optimized parameters; S3, after initialization, all bees are transformed into worker bees. The worker bees perform local search near the current position. In the first half of the maximum number of iterations, the worker bee solution formula of the traditional artificial bee colony algorithm is used. In the second half of the maximum number of iterations, the improved solution formula that incorporates the global optimal solution information is used. Based on the fitness, it is determined whether to update the position and reset the "forget times" trial(i); S4, select the top 20% worker bees in terms of fitness, and select 10% from the remaining 70% through the roulette wheel method. A total of 30% of the worker bees are converted into observer bees for local development. A new solution is generated according to the new solution formula of the observer bees and the position and trial(i) are updated according to the fitness; S5, when the trial(i) of a worker bee is greater than a preset threshold Limit, the worker bee transforms into a scout bee. The threshold Limit is dynamically adjusted with the number of iterations and the change of the group fitness value. The scout bee reinitializes its position around the global optimal solution and resets its fitness and trial(i); S6, calculates the fitness value of each bee solution through the fitness function, and transmits the fitness value back to the improved artificial bee colony algorithm to compare the quality of the solutions. After iterating until the maximum number of iterations is reached, the global optimal solution is output, completing the optimization of the permanent magnet synchronous motor fuzzy PI controller parameters.

2. The method according to claim 1, characterized in that In step S1, the fuzzy PI controller adopts a two-stage fuzzy controller architecture, and the inputs are the speed error e and the speed error change rate e c , through the quantization factor K e , K ec Map the input variables to fuzzy variables E, E c , the fuzzy output value is obtained by fuzzy reasoning and centroid method y p 、 y i , and then with the scaling factor K up , K ui Multiply to obtain the parameter compensation value ΔK of the PI controller p and ΔK i .

3. The method according to claim 1, characterized in that In step S1, the fuzzy PI controller is a position PI controller, and its parameter K p , K i By the initial parameter K p0 , K i0 and compensation value ∆K p , ∆K i Add together and the output is the current loop i q The target value is set and the amplitude is limited according to the motor operating conditions.

4. The method according to claim 1, wherein The formula for random initialization in step S2 is: ; Among them, x i is the initialization position, is a random number matrix, 、 are the upper and lower bounds of the solution space, N is the total number of bee colonies, and D is the dimension.

5. The method according to claim 1, wherein The solution formula of the worker bee in step S3 is: when When using ; when When using ; in, is the current iteration number, is the maximum number of iterations; v i is the position of the new solution, x i is the initialization position, x k is the position of a randomly selected neighbor, x j is the global optimal solution, ϕ is a random perturbation factor in the range [0,1], and α is a random perturbation factor in the range [0.1,0.3].

6. The method according to claim 5, characterized in that The new solution formula for observing bees in step S4 is: ; Among them, x i is the current position of the observing bee, x k is the position of the randomly selected other bees, and ϕ is a random perturbation factor in [0,1].

7. The method according to claim 1, characterized in that The formula of the roulette method in step S4 is: ; in, f ij It is the worker bee solution i The fitness of the bee colony, N is the total number of bees, P ij is the probability of being selected, f ik It refers to the fitness of the kth solution of the i-th worker bee.

8. The method according to claim 1, characterized in that The threshold value Limit in step S5 is adjusted as follows: in the early stage, the Limit is 0.4 times the maximum number of iterations, and gradually decreases with the number of iterations in the later stage; when the overall fitness of the group tends to be smaller, the Limit is reduced; when the overall fitness of the group tends to be larger, the Limit is increased.

9. The method according to claim 1, characterized in that The solution formula of the scout bee in step S5 is: ; Among them, x i is the position of the new solution after reinitialization, x j is the global optimal solution, and β is a random perturbation factor in the range of [-0.15, 0.15].

10. The method according to claim 1, characterized in that The calculation formula of the fitness function in step S6 is: When the speed is not overshooting, ; When the speed overshoots, ; Among them, f is the adaptation value, e(t) is the speed error, t is the time, α and β are the coefficients of the time absolute error integral and the absolute error integral, respectively. α+β=1. The values ​​of α and β affect the artificial bee colony algorithm's recognition of overshoot and judgment of the overall error. The specific values ​​depend on the specific operating conditions and operating time of the PMSM system.

Citation Information

Cited By

  • Optimization method for video transmission network CDR

    CN121792500A