PI controller optimization method based on improved Gracula spectabilis Gracula algorithm

By improving the position initialization, breeding and feeding, and predator avoidance stages of the magnificent fairy-wren algorithm, Latin hypercube sampling, cosine annealing strategy, and adaptive flight balance factor were used to optimize the PI controller parameters, solve the problem of premature convergence to the local optimum, and improve the control performance of the PI controller.

CN120779710APending Publication Date: 2025-10-14UNIV OF JINAN
View PDF 0 Cites 1 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The magnificent fairywren algorithm is prone to fall into local optimality, resulting in premature convergence, missing the global optimal solution, and affecting the parameter optimization effect of the PI controller.

Method used

The position initialization, breeding and feeding, and predator avoidance phases of the magnificent fairy-wren algorithm were improved. Latin hypercube sampling, cosine annealing strategy, and adaptive flight balance factor were used to optimize the PI controller parameters.

Benefits of technology

The convergence speed and optimization accuracy of the PI controller are improved, the dynamic response performance and steady-state performance of the system are enhanced, the overshoot is reduced, and a fast and stable control effect is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120779710A_ABST
    Figure CN120779710A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of PI control optimization, and particularly relates to a PI controller optimization method, which comprises the following steps: S1, designing a system model of a PI controller; s2, improving a Gracula religiosa algorithm, wherein the Gracula religiosa algorithm is subjected to position initialization, breeding feeding and improvement in a natural enemy avoiding stage; s3, parameters of the PI controller are optimized through the improved Gracula spectabilis Gracula algorithm; S4, the optimized parameters are substituted into the PI controller for system simulation; parameters of the PI controller are optimized through the improved Gracula spectabilis Gracula algorithm, and simulation inspection is carried out by simulating an actual complex scene after optimization.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of PI control optimization, and in particular to a PI controller optimization method. BACKGROUND

[0002] The PI controller is a linear controller composed of proportional and integral components. The proportional part generates control action immediately according to the size of the current deviation, can quickly reduce the dynamic deviation, and ensures the agility of the adjustment. The integral part continuously strengthens the control output as long as there is a steady-state error, until the deviation is completely eliminated, and the steady-state accuracy is achieved. The PI controller has simple structure, strong anti-noise ability, and is suitable for liquid level control, motor speed regulation and other scenes with high steady-state accuracy requirements and acceptable dynamic overshoot. It is a practical control scheme that considers both steady-state performance and implementation difficulty.

[0003] The Superb Fairy-wren Optimization Algorithm (SFOA) is a meta-heuristic optimization algorithm based on swarm intelligence, inspired by the life habits of the Superb Fairy-wren. The algorithm constructs a mathematical model by simulating the natural behaviors of the three stages of the Superb Fairy-wren's growth, breeding and feeding, and avoiding predators. It introduces a proportionality coefficient and a risk coefficient to adjust the exploration and exploitation capabilities of the algorithm. SFOA is widely used in numerical optimization, engineering design, and high-dimensional feature selection classification, and has high efficiency and robustness. It performs well in solving practical application problems. However, the Superb Fairy-wren Optimization Algorithm is prone to falling into local optima, leading to premature convergence and missing the global optimal solution. SUMMARY

[0004] To address the shortcomings of the Superb Fairy-wren Optimization Algorithm, the present application improves the position initialization, breeding and feeding, and predator avoidance stages of the Superb Fairy-wren Optimization Algorithm. This solves the problem of the Superb Fairy-wren Optimization Algorithm falling into local optima, leading to premature convergence and missing the global optimal solution. The improved Superb Fairy-wren Optimization Algorithm is used to optimize the parameters of the PI controller, and the optimized parameters are simulated in actual complex scenarios for simulation testing.

[0005] The present application adopts the following technical solutions: A PI controller optimization method based on an improved Superb Fairy-wren Optimization Algorithm, comprising the following specific steps.

[0006] S1, design a system model of the PI controller.

[0007] S2, improve the Superb Fairy-wren Optimization Algorithm, mainly by improving the position initialization, breeding and feeding, and predator avoidance stages of the Superb Fairy-wren Optimization Algorithm: S21, use Latin hypercube sampling to initialize the position of the Superb Fairy-wren Optimization Algorithm; S22. For the fixed parameter C in the breeding and feeding phase of the magnificent fairywren algorithm, a cosine annealing strategy is used to simulate the smooth decay characteristics of the cosine function to make the control parameter adaptively change with the iteration process; S23. Optimize the adaptive flight balance factor of the Magnificent Fairywren algorithm during the predator avoidance phase. By introducing an iterative progress response, the initial step size is automatically reduced for high-dimensional problems. Large step sizes are maintained in the early stages of exploration, and reduced in the later stages of development, addressing the limitations of the adaptive flight balance factor.

[0008] S3. Optimize the parameters of the PI controller using the improved magnificent fairywren algorithm.

[0009] S4. Substitute the optimized parameters into the PI controller for system simulation.

[0010] Furthermore, in S1, the system model of the PI controller includes a PI controller module, a control object module, an improved magnificent fairywren algorithm module, and a feedback module.

[0011] Furthermore, the PI controller module is a correction device in the system. It mainly completes the dynamic response performance of the system through the synergistic effect of the proportional link and the integral link. According to the deviation signal and its rate of change between the current set value and the actual value of the system, the control quantity is output to adjust the controlled object. The mathematical model of the output control quantity of the PI controller is: (1); In formula (1), the system setting value is , the actual output of the system is , the deviation signal is .

[0012] Furthermore, the control object module is the core component of the control system. It receives the control signal output by the PI controller and generates a corresponding output response. The transfer function can abstract the essential dynamic characteristics of the system through a mathematical model and then reflect complex application scenarios. The mathematical formula of the selected transfer function is: (2); In formula (2), r is the function variable.

[0013] Furthermore, the improved magnificent fairywren algorithm module improves the magnificent fairywren algorithm, and then optimizes the parameters of the PI controller, selects the optimal PI controller parameters to achieve the best control effect, and the feedback module feeds back the error between the set value and the actual value, which is then input into the PI controller for the PI controller to better control and adjust the system.

[0014] Further, in the S21, Latin hypercube sampling is used for position initialization of the Pigeon algorithm. The random initialization of the Pigeon algorithm is too simple, which only generates sample points randomly in the parameter range. This method is prone to sample point aggregation in high-dimensional space or limited sample size, resulting in partial key areas being missed and other areas being over-sampled. This uneven distribution can make the algorithm lose the ability to perceive the region of the global optimal solution in the initial stage, prolong the convergence time, and further fall into premature convergence due to the initial solution being concentrated near the local optimum. Latin hypercube sampling divides each parameter range into subintervals matching the population size by stratification and random arrangement, ensuring that each interval has a sample. After arrangement, the initial solution is uniformly dispersed in the parameter space. This improvement can fully cover the search space, avoid missing the global optimum, reduce sample variance, and improve the stability of the initial population. With fewer samples, better exploration results can be achieved. Ultimately, the convergence speed, optimization accuracy, and result stability are improved. There are d dimensions, and each dimension is divided into N equal probability subintervals. The mathematical model of Latin hypercube sampling is as follows: (3); In formula (3), represents the interval number of the i-th sample in the j-th dimension, is a random number sampled from a uniform distribution .

[0015] Further, in the S22, for the fixed parameter C in the breeding and feeding stage of the Pigeon algorithm, the cosine annealing strategy is used to simulate the smooth decay characteristics of the cosine function, so that the control parameter changes adaptively with the iteration process. The fixed parameter C=0.8 in the Pigeon algorithm cannot be dynamically adjusted according to the optimization process, which can easily lead to insufficient exploration ability in the early iteration or insufficient development precision in the later iteration, making it difficult to balance global search and local optimization. The cosine annealing strategy simulates the smooth decay characteristics of the cosine function, so that the control parameter changes adaptively with the iteration process. The parameter is larger in the early stage, which enhances the algorithm's extensive exploration of the solution space. The parameter gradually decreases in the later stage, focusing on the fine development of the local area, and realizes the dynamic balance of exploration and development. The mathematical model of the cosine annealing strategy is as follows: (4); In formula (4), t is the current iteration number, T is the maximum iteration number, and are the minimum and maximum values of the parameter, respectively.

[0016] Furthermore, in the S23, the adaptive flight balance factor of the Magnificent Fairywren algorithm in the stage of avoiding natural enemies is optimized. By introducing an iterative progress response, the initial step size is automatically reduced for high-dimensional problems, a large step size is maintained for exploration in the early stage, and the step size is reduced for development in the later stage, thereby solving the limitations of the adaptive flight balance factor. The adaptive flight balance factor of the Magnificent Fairywren algorithm cannot be dynamically adjusted according to the problem characteristics and the iterative process, resulting in the search step size being too large and prone to divergence in high-dimensional problems, and it is difficult to focus on the local optimum in the later stage of iteration. In contrast, the improved Magnificent Fairywren algorithm realizes adaptation to the problem dimension. On the premise of meeting the convergence conditions of the optimization algorithm, the dynamic adjustment strategy enables the algorithm to intelligently adapt to different optimization scenarios while maintaining simplicity, and is suitable for high-dimensional complex problems. The mathematical model of the adaptive flight balance factor is shown as follows: (5); In formula (5), d is the problem dimension, t is the current iteration number, and T is the maximum iteration number.

[0017] Furthermore, the improvement of the magnificent fairy-wren algorithm forms a progressive enhancement chain from basic optimization to process control, and finally to scene adaptation. Latin hypercube sampling solves the uneven distribution problem of random sampling through uniform initialization, providing a high-quality initial solution space for subsequent stages and avoiding the risk of premature solution due to initial sample aggregation. The cosine annealing strategy makes the parameter C in the breeding stage adaptively decay with iteration, dynamically balancing the initial exploration and late development, taking advantage of the initialization to improve the accuracy of local development. The adaptive flight balance factor adjusts the step size according to the dimension and iteration progress, solving the divergence problem in high-dimensional scenarios and the lack of focus in the late iteration, and supplementing the anti-premature solution capability. The three work together to comprehensively improve the algorithm performance from initial quality, process control to complex scene adaptation.

[0018] Furthermore, in S3, the parameters of the PI controller are optimized using the improved magnificent fairywren algorithm, specifically in the following steps: S31. Initialize the population size, search the previous term, search the next term, problem dimension and use Latin hypercube sampling to initialize the population position of the magnificent fairy-wren algorithm; S32. ITAE is selected as the performance index evaluation formula. The absolute value of the system error is integrated. At the same time, the time weight is used to give the later error a greater influence, thereby more strictly constraining the dynamic response and steady-state performance of the system. In the PI controller parameter optimization, the optimal parameter combination is found by minimizing this index, so that the system can respond quickly while minimizing the later error as much as possible and improving the overall control performance. The ITAE mathematical model is shown as follows: (6); In formula (6), t is the time variable, e(t) is the deviation signal; S33, the proportional parameter and integral parameter of the PI controller are input into the three stages of the magnificent fairy-wren algorithm, namely, the growth of chicks, breeding and feeding, and avoiding natural enemies, to update the individual position. The specific steps of the three stages of the magnificent fairy-wren algorithm, namely, the growth of chicks, breeding and feeding, and avoiding natural enemies, are as follows: D1. During the chick growth stage, the position update of population members is based on a dynamic simulation of the large amount of experience required for chick growth. Since a large number of chicks in a population is not conducive to population survival, the position of individuals in the problem-solving space is simulated by the process of constantly learning a large amount of experience and continuously updating their positions as the chicks grow rapidly. Experience learning is a modeled process movement that will cause extensive changes in individual positions, thereby improving the algorithm's global search and exploration capabilities to obtain a better objective function value. The mathematical model of this process is shown in the following formula: (7); In formula (7), represents the updated position of the population, represents the position of the ith magnificent fairywren in the jth dimension after t iterations, rand is a random number in the interval [0,1], Search for the previous term. It is to search for the next term; D2. During the breeding and feeding phase of the Magnificent Fairywren algorithm, the population position is updated by simulating the teaching mechanism of the breeding and rearing period of the Magnificent Fairywren. During this phase, the danger threshold is low and the birds enter the breeding phase. With the help of unique parent-offspring recognition to prevent invasion, and with cooperative breeding characteristics, multiple birds take turns incubating eggs to impart recognition capabilities. During the cycle, members take turns foraging and teaching, and slight changes in position improve local search and development capabilities. By defining factors that gradually mature as the teaching cycle decreases, the more mature the birds are, the larger their activity range will be. The mathematical model of this process is shown in the following formula: (8); (9); In formula (8), r1 and r2 are random numbers that obey the normal distribution. In formula (9), Indicates the current optimal position, FEs indicates the current number of evaluations, and MaxFEs indicates the maximum number of evaluations; D3. During the predator avoidance phase of the Magnificent Fairywren algorithm, the position updates of population members are based on the Magnificent Fairywren's defense mechanism against predator attacks. When a Magnificent Fairywren is spotted by a predator, it will run quickly, flapping its wings continuously to distract the predator's view, and simultaneously emit warning sounds to alert other members. In this case, the member targeted by the predator will quickly flee, resulting in a slight change in its position, while other members will circle in the air to avoid the predator, resulting in a larger change in their position. These two different behaviors of the Magnificent Fairywren members enhance the algorithm's search range in the problem-solving space and its ability to utilize local search. The mathematical model of this process is shown below: (10); In formula (10), is the Levy flight random step size, which is used to control the algorithm to jump out of the local optimum; S34, determining whether the current fitness value is better than the fitness value of the previous iteration, updating the optimal fitness value and thus updating the optimal solution; S35, repeat the process of S33 and S34 until the maximum number of iterations is reached; S36, input the optimal solution into the PI controller , parameters, and thus control the entire system.

[0019] Furthermore, in S4, the optimized parameters are substituted into the PI controller for system simulation, and the actual effect of the algorithm optimization is verified by the dynamic response of the closed-loop feedback system, mainly verifying the effect of the optimized parameters on the rapidity and stability of the system response. By comparing with the magnificent fairy-wren algorithm, it is verified whether the improved magnificent fairy-wren algorithm solves the problems of excessive overshoot and slow response caused by insufficient exploration and unbalanced development in the PI controller parameter optimization of the magnificent fairy-wren algorithm through initial solution homogenization, dynamic parameter adjustment, and step size adaptive optimization, so that the optimized system has both low overshoot and fast response characteristics, verifying the improvement of the optimization accuracy and control performance of the improved magnificent fairy-wren algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 This is a flow chart of a PI controller optimization method based on the improved magnificent fairywren algorithm.

[0021] Figure 2 Flowchart for optimizing the parameters of the PI controller using the improved Magnificent Fairywren algorithm.

[0022] Figure 3 This is a comparison curve of the effects of the improved magnificent fairywren algorithm and the magnificent fairywren algorithm on optimizing the PI controller.

[0023] Figure 4 This is a comparison curve of the target following effect of the improved magnificent fairywren algorithm and the magnificent fairywren algorithm-optimized PI controller. DETAILED DESCRIPTION

[0024] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0025] The present invention provides a technical solution: a PI controller optimization method based on an improved magnificent fairywren algorithm, the overall flow chart is as follows: Figure 1 shown.

[0026] S1. Design the system model of PI controller.

[0027] Furthermore, in S1, the system model of the PI controller includes a PI controller module, a control object module, an improved magnificent fairywren algorithm module, and a feedback module.

[0028] Furthermore, the PI controller module is a correction device in the system. It mainly completes the dynamic response performance of the system through the synergistic effect of the proportional link and the integral link. According to the deviation signal and its rate of change between the current set value and the actual value of the system, the control quantity is output to adjust the controlled object. The mathematical model of the output control quantity of the PI controller is: (1); In formula (1), the system setting value is , the actual output of the system is , the deviation signal is .

[0029] Furthermore, the control object module is the core component of the control system. It receives the control signal output by the PI controller and generates a corresponding output response. The transfer function can abstract the essential dynamic characteristics of the system through a mathematical model and then reflect complex application scenarios. The mathematical formula of the selected transfer function is: (2); In formula (2), r is the function variable.

[0030] Furthermore, the improved magnificent fairywren algorithm module improves the magnificent fairywren algorithm, and then optimizes the parameters of the PI controller, selects the optimal PI controller parameters to achieve the best control effect, and the feedback module feeds back the error between the set value and the actual value, which is then input into the PI controller for the PI controller to better control and adjust the system.

[0031] S2. Improve the algorithm for the magnificent fairy-wren, mainly by improving the position initialization, breeding and feeding, and avoiding natural enemies stages of the magnificent fairy-wren algorithm: S21, using Latin hypercube sampling to initialize the position of the magnificent fairy-wren algorithm; S22. For the fixed parameter C in the breeding and feeding phase of the magnificent fairywren algorithm, a cosine annealing strategy is used to simulate the smooth decay characteristics of the cosine function to make the control parameter adaptively change with the iteration process; S23. Optimize the adaptive flight balance factor of the Magnificent Fairywren algorithm during the predator avoidance phase. By introducing an iterative progress response, the initial step size is automatically reduced for high-dimensional problems. Large step sizes are maintained in the early stages of exploration, and reduced in the later stages of development, addressing the limitations of the adaptive flight balance factor.

[0032] Furthermore, in S21, Latin hypercube sampling is used to initialize the position of the magnificent fairy-wren algorithm. The random initialization used by the magnificent fairy-wren algorithm is too simple, and only randomly generates sample points within the parameter range. This method is prone to sample point aggregation in high-dimensional space or when the sample size is limited, resulting in some key areas being missed and other areas being over-sampling. This uneven distribution will cause the algorithm to lose the ability to perceive the area where the global optimal solution is located in the initial stage, prolong the convergence time, and then fall into premature convergence because the initial solution is concentrated near the local optimum. Convergence, and Latin hypercube sampling divides each parameter range into subintervals that match the population size through stratification and random arrangement, ensuring that each interval has a sample. After arrangement, the initial solution is evenly dispersed in the parameter space. This improvement can fully cover the search space, avoid missing the global optimum, reduce sample variance, improve the stability of the initial population, and achieve better exploration effects with fewer samples. Ultimately, the convergence speed, optimization accuracy and result stability are comprehensively improved. There are d dimensions, and the interval of each dimension is divided into N equally probable subintervals. The mathematical model of Latin hypercube sampling is shown as follows: (3); In formula (3), Indicates the interval number of the i-th sample in the j-th dimension, is from a uniform distribution Random numbers sampled from .

[0033] Furthermore, in S22, for the fixed parameter C in the breeding and feeding stage of the magnificent fairy-wren algorithm, a cosine annealing strategy is used to simulate the smooth decay characteristics of the cosine function so that the control parameter changes adaptively with the iteration process. The fixed parameter C=0.8 in the magnificent fairy-wren algorithm cannot be dynamically adjusted according to the optimization process, which may easily lead to insufficient exploration ability of the algorithm in the early stage of iteration or insufficient development accuracy in the later stage, making it difficult to balance global search and local optimization. The cosine annealing strategy simulates the smooth decay characteristics of the cosine function to make the control parameter change adaptively with the iteration process. The early parameters are large, which enhances the algorithm's extensive exploration of the solution space. The parameters gradually decrease in the later stage, focusing on the fine development of local areas, thereby achieving a dynamic balance between exploration and development. The mathematical model of the cosine annealing strategy is shown below: (4); In formula (4), t is the current number of iterations, T is the maximum number of iterations, and are the minimum and maximum values ​​of the parameter, respectively.

[0034] Furthermore, in the S23, the adaptive flight balance factor of the Magnificent Fairywren algorithm in the stage of avoiding natural enemies is optimized. By introducing an iterative progress response, the initial step size is automatically reduced for high-dimensional problems, a large step size is maintained for exploration in the early stage, and the step size is reduced for development in the later stage, thereby solving the limitations of the adaptive flight balance factor. The adaptive flight balance factor of the Magnificent Fairywren algorithm cannot be dynamically adjusted according to the problem characteristics and the iterative process, resulting in the search step size being too large and prone to divergence in high-dimensional problems, and it is difficult to focus on the local optimum in the later stage of iteration. In contrast, the improved Magnificent Fairywren algorithm realizes adaptation to the problem dimension. On the premise of meeting the convergence conditions of the optimization algorithm, the dynamic adjustment strategy enables the algorithm to intelligently adapt to different optimization scenarios while maintaining simplicity, and is suitable for high-dimensional complex problems. The mathematical model of the adaptive flight balance factor is shown as follows: (5); In formula (5), d is the problem dimension, t is the current iteration number, and T is the maximum iteration number.

[0035] Furthermore, the improvement of the magnificent fairy-wren algorithm forms a progressive enhancement chain from basic optimization to process control, and finally to scene adaptation. Latin hypercube sampling solves the uneven distribution problem of random sampling through uniform initialization, providing a high-quality initial solution space for subsequent stages and avoiding the risk of premature solution due to initial sample aggregation. The cosine annealing strategy makes the parameter C in the breeding stage adaptively decay with iteration, dynamically balancing the initial exploration and late development, taking advantage of the initialization to improve the accuracy of local development. The adaptive flight balance factor adjusts the step size according to the dimension and iteration progress, solving the divergence problem in high-dimensional scenarios and the lack of focus in the late iteration, and supplementing the anti-premature solution capability. The three work together to comprehensively improve the algorithm performance from initial quality, process control to complex scene adaptation.

[0036] S3. Optimize the parameters of the PI controller using the improved magnificent fairywren algorithm.

[0037] Furthermore, in S3, the parameters of the PI controller are optimized using the improved magnificent fairywren algorithm, specifically in the following steps: S31. Initialize the population size, search the previous term, search the next term, problem dimension and use Latin hypercube sampling to initialize the population position of the magnificent fairy-wren algorithm; S32. ITAE is selected as the performance index evaluation formula. The absolute value of the system error is integrated. At the same time, the time weight is used to give the later error a greater influence, thereby more strictly constraining the dynamic response and steady-state performance of the system. In the PI controller parameter optimization, the optimal parameter combination is found by minimizing this index, so that the system can respond quickly while minimizing the later error as much as possible and improving the overall control performance. The ITAE mathematical model is shown as follows: (6); In formula (6), t is the time variable, e(t) is the deviation signal; S33, the proportional parameter and integral parameter of the PI controller are input into the three stages of the magnificent fairy-wren algorithm, namely, the growth of chicks, breeding and feeding, and avoiding natural enemies, to update the individual position. The specific steps of the three stages of the magnificent fairy-wren algorithm, namely, the growth of chicks, breeding and feeding, and avoiding natural enemies, are as follows: D1. During the chick growth stage, the position update of population members is based on a dynamic simulation of the large amount of experience required for chick growth. Since a large number of chicks in a population is not conducive to population survival, the position of individuals in the problem-solving space is simulated by the process of constantly learning a large amount of experience and continuously updating their positions as the chicks grow rapidly. Experience learning is a modeled process movement that will cause extensive changes in individual positions, thereby improving the algorithm's global search and exploration capabilities to obtain a better objective function value. The mathematical model of this process is shown in the following formula: (7); In formula (7), represents the updated position of the population, represents the position of the ith magnificent fairywren in the jth dimension after t iterations, rand is a random number in the interval [0,1], Search for the previous term. It is to search for the next term; D2. During the breeding and feeding phase of the Magnificent Fairywren algorithm, the population position is updated by simulating the teaching mechanism of the breeding and rearing period of the Magnificent Fairywren. During this phase, the danger threshold is low and the birds enter the breeding phase. With the help of unique parent-offspring recognition to prevent invasion, and with cooperative breeding characteristics, multiple birds take turns incubating eggs to impart recognition capabilities. During the cycle, members take turns foraging and teaching, and slight changes in position improve local search and development capabilities. By defining factors that gradually mature as the teaching cycle decreases, the more mature the birds are, the larger their activity range will be. The mathematical model of this process is shown in the following formula: (8); (9); In formula (8), r1 and r2 are random numbers that obey the normal distribution. In formula (9), Indicates the current optimal position, FEs indicates the current number of evaluations, and MaxFEs indicates the maximum number of evaluations; D3. During the predator avoidance phase of the Magnificent Fairywren algorithm, the position updates of population members are based on the Magnificent Fairywren's defense mechanism against predator attacks. When a Magnificent Fairywren is spotted by a predator, it will run quickly, flapping its wings continuously to distract the predator's view, and simultaneously emit warning sounds to alert other members. In this case, the member targeted by the predator will quickly flee, resulting in a slight change in its position, while other members will circle in the air to avoid the predator, resulting in a larger change in their position. These two different behaviors of the Magnificent Fairywren members enhance the algorithm's search range in the problem-solving space and its ability to utilize local search. The mathematical model of this process is shown below: (10); In formula (10), is the Levy flight random step size, which is used to control the algorithm to jump out of the local optimum; S34, determining whether the current fitness value is better than the fitness value of the previous iteration, updating the optimal fitness value and thus updating the optimal solution; S35, repeat the process of S33 and S34 until the maximum number of iterations is reached; S36, input the optimal solution into the PI controller , parameters, and thus control the entire system.

[0038] S4. Substitute the optimized parameters into the PI controller for system simulation.

[0039] Furthermore, in S4, the optimized parameters are substituted into the PI controller for system simulation, and the actual effect of the algorithm optimization is verified by the dynamic response of the closed-loop feedback system, mainly verifying the effect of the optimized parameters on the rapidity and stability of the system response. By comparing with the magnificent fairy-wren algorithm, it is verified whether the improved magnificent fairy-wren algorithm solves the problems of excessive overshoot and slow response caused by insufficient exploration and unbalanced development in the PI controller parameter optimization of the magnificent fairy-wren algorithm through initial solution homogenization, dynamic parameter adjustment, and step size adaptive optimization, so that the optimized system has both low overshoot and fast response characteristics, verifying the improvement of the optimization accuracy and control performance of the improved magnificent fairy-wren algorithm.

[0040] Figure 3 This is a comparison curve diagram of the effects of the improved magnificent fairywren algorithm and the magnificent fairywren algorithm in optimizing the PI controller. According to the performance of the improved magnificent fairywren algorithm and the magnificent fairywren algorithm in the PI controller control quantity, the improved magnificent fairywren algorithm tends to the standard value 1 and reaches a stable state within 20 to 40 seconds, and the magnificent fairywren algorithm tends to the standard value 1 and reaches a stable state within 60 to 80 seconds. In the process of reaching the standard value and reaching stability, the overshoot of the improved magnificent fairywren algorithm is smaller and more stable. Therefore, the improved magnificent fairywren algorithm optimizes the PI controller parameters better than the magnificent fairywren algorithm optimizes the PI controller parameters.

[0041] Figure 4 This is a comparison curve diagram of the target change following effect of the improved magnificent fairywren algorithm and the magnificent fairywren algorithm optimized PI controller. When the initial target value is set at 5 and changes to the target value 10 in 200 seconds, the improved magnificent fairywren algorithm has a smaller overshoot and is smoother than the magnificent fairywren algorithm in the process of reaching the initial target value of 5. When the target value suddenly changes at 200 seconds, the improved magnificent fairywren algorithm can still follow the target change well. Therefore, in the target change following experiment, the improved magnificent fairywren algorithm reaches the initial target value faster, smoother, and has a smaller overshoot than the magnificent fairywren algorithm, further illustrating the advantage of the improved magnificent fairywren algorithm in optimizing PI controller parameters in the case of following target changes.

Claims

1. A PI controller optimization method based on an improved magnificent fairywren algorithm, characterized in that: The position initialization, breeding and feeding, and predator avoidance phases of the magnificent fairywren algorithm were improved. The PI controller parameters were optimized using the improved magnificent fairywren algorithm. Finally, a simulation test was conducted by simulating a complex actual scenario. The specific steps are as follows: S1. Design the system model of PI controller; S2. Improve the algorithm for the magnificent fairy-wren, mainly by improving the position initialization, breeding and feeding, and avoiding natural enemies stages of the magnificent fairy-wren algorithm: S21. Latin hypercube sampling is used to initialize the position of the magnificent fairy-wren algorithm. The random initialization used by the magnificent fairy-wren algorithm is too simple. It only randomly generates sample points within the parameter range. This method is prone to sample point aggregation in high-dimensional space or when the sample size is limited, resulting in some key areas being missed and other areas being over-sampled. This uneven distribution will cause the algorithm to lose the ability to perceive the area where the global optimal solution is located in the initial stage, prolonging the convergence time, and then fall into premature convergence because the initial solution is concentrated near the local optimum. Latin hypercube sampling divides each parameter range into subintervals that match the population size through stratification and random arrangement, ensuring that each interval has a sample. After arrangement, the initial solution is evenly dispersed in the parameter space. This improvement can fully cover the search space, avoid missing the global optimum, reduce sample variance, improve the stability of the initial population, and achieve better exploration results with fewer samples. Ultimately, it achieves a comprehensive improvement in convergence speed, optimization accuracy, and result stability. There are d dimensions, and the interval of each dimension is divided into N equally probable subintervals. The mathematical model of Latin hypercube sampling is shown as follows: (3); In formula (3), Indicates the interval number of the i-th sample in the j-th dimension, is from a uniform distribution Random numbers sampled from ; S22. For the fixed parameter C in the breeding and feeding phase of the magnificent fairy-wren algorithm, a cosine annealing strategy is used to simulate the smooth decay characteristics of the cosine function, so that the control parameter changes adaptively with the iteration process. The fixed parameter C = 0.8 in the magnificent fairy-wren algorithm cannot be dynamically adjusted according to the optimization process, which can easily lead to insufficient exploration ability in the early stages of the algorithm or insufficient development accuracy in the later stages, making it difficult to balance global search and local optimization. The cosine annealing strategy simulates the smooth decay characteristics of the cosine function to make the control parameter change adaptively with the iteration process. The parameter is large in the early stage, which enhances the algorithm's extensive exploration of the solution space. The parameter gradually decreases in the later stage, focusing on the detailed development of local areas, achieving a dynamic balance between exploration and development. The mathematical model of the cosine annealing strategy is shown in the following formula: (4); In formula (4), t is the current number of iterations, T is the maximum number of iterations, and are the minimum and maximum values ​​of the parameters respectively; S23. Optimize the adaptive flight balance factor of the Magnificent Fairywren algorithm during the predator avoidance phase. By introducing an iterative progress response, the initial step size is automatically reduced for high-dimensional problems, maintaining a large step size for exploration in the early stages and reducing the step size for development in the later stages. This addresses the limitations of the adaptive flight balance factor. The adaptive flight balance factor of the Magnificent Fairywren algorithm cannot be dynamically adjusted based on the problem characteristics and iterative progress, resulting in excessively large search step sizes and easy divergence in high-dimensional problems, and difficulty focusing on the local optimum in the later stages of the iteration. In contrast, the improved Magnificent Fairywren algorithm achieves adaptation to the problem dimension. Under the premise of meeting the convergence conditions of the optimization algorithm, the dynamic adjustment strategy enables the algorithm to intelligently adapt to different optimization scenarios while maintaining simplicity, making it suitable for high-dimensional and complex problems. The mathematical model of the adaptive flight balance factor is shown below: (5); In formula (5), d is the problem dimension, t is the current iteration number, and T is the maximum iteration number; S3. Optimize the parameters of the PI controller using the improved magnificent fairywren algorithm. The specific steps are as follows: S31. Initialize the population size, search the previous term, search the next term, problem dimension and use Latin hypercube sampling to initialize the population position of the magnificent fairy-wren algorithm; S32. ITAE is selected as the performance index evaluation formula. The absolute value of the system error is integrated. At the same time, the time weight is used to give the later error a greater influence, thereby more strictly constraining the dynamic response and steady-state performance of the system. In the PI controller parameter optimization, the optimal parameter combination is found by minimizing this index, so that the system can respond quickly while minimizing the later error as much as possible and improving the overall control performance. The ITAE mathematical model is shown as follows: (6); In formula (6), t is the time variable, e(t) is the deviation signal; S33, the proportional and integral parameters of the PI controller are input into the magnificent fairy-wren algorithm to update the individual position in the three stages of chick growth, breeding and feeding, and avoiding natural enemies; S34, determining whether the current fitness value is better than the fitness value of the previous iteration, updating the optimal fitness value and thus updating the optimal solution; S35, repeat the process of S33 and S34 until the maximum number of iterations is reached; S36, input the optimal solution into the PI controller , Parameters, and then control the entire system; S4. Substitute the optimized parameters into the PI controller for system simulation.

2. The PI controller optimization method based on the improved magnificent fairywren algorithm according to claim 1, characterized in that: In the S1, a system model of a PI controller is designed, including a PI controller module, a control object module, an improved Magnificent Fairywren algorithm module, and a feedback module. The PI controller module is a correction device in the system, which mainly completes the dynamic response performance of the system through the synergistic effect of the proportional link and the integral link. According to the deviation signal and the change rate of the current set value and the actual value of the system, the control quantity is output to adjust the controlled object. The control object module is the core component of the control system, which receives the control signal output by the PI controller and generates a corresponding output response. The transfer function can abstract the essential dynamic characteristics of the system through a mathematical model, and then reflect complex application scenarios. The improved Magnificent Fairywren algorithm module improves the Magnificent Fairywren algorithm, and then optimizes the parameters of the PI controller and selects the optimal PI controller parameters to achieve the best control effect. The feedback module is to feedback the error between the set value and the actual value, and then input it into the PI controller for the PI controller to better control and adjust the system.

3. The PI controller optimization method based on the improved magnificent fairywren algorithm according to claim 2, characterized in that: In S2, the magnificent fairy-wren algorithm is improved, mainly by improving the position initialization, breeding and feeding, and predator avoidance stages of the magnificent fairy-wren algorithm. The improvement of the magnificent fairy-wren algorithm forms a progressive enhancement chain from basic optimization to process control, and finally to scene adaptation. Latin hypercube sampling solves the uneven distribution problem of random sampling through uniform initialization, providing a high-quality initial solution space for subsequent stages and avoiding the risk of premature maturity caused by initial sample aggregation. The cosine annealing strategy makes the parameter C in the breeding stage adaptively decay with iteration, dynamically balancing between initial exploration and late development, inheriting the initialization advantage to improve local development accuracy. The adaptive flight balance factor adjusts the step size according to the dimension and iteration progress, solving the divergence problem in high-dimensional scenarios and the lack of focus in the late iteration, and supplementing the anti-premature maturity ability. The three work together to comprehensively improve the algorithm performance from initial quality, process control to complex scene adaptation.

4. The PI controller optimization method based on the improved magnificent fairywren algorithm according to claim 3, characterized in that: In S4, the optimized parameters are substituted into the PI controller for system simulation, and the actual effect of the algorithm optimization is verified by the dynamic response of the closed-loop feedback system, mainly verifying the effect of the optimized parameters on the rapidity and stability of the system response. By comparing with the magnificent fairy-wren algorithm, it is verified whether the improved magnificent fairy-wren algorithm solves the problems of excessive overshoot and slow response caused by insufficient exploration and unbalanced development in the PI controller parameter optimization of the magnificent fairy-wren algorithm through initial solution homogenization, dynamic parameter adjustment, and step size adaptive optimization, so that the optimized system has both low overshoot and fast response characteristics, verifying the improvement of the optimization accuracy and control performance of the improved magnificent fairy-wren algorithm.

Citation Information

Cited By

  • Method for controlling operation movement speed of automatic guide robot

    CN121070065A