Fuzzy PID control parameter online optimization method based on multi-population collaborative PSO
By improving the parameters of the fuzzy PID controller through a multi-group collaborative PSO mechanism and a gradient-guided local optimization mechanism, the robustness and reliability problems of traditional PID and fuzzy PID in nonlinear systems are solved, and a fast and stable control effect is achieved.
Patent Information
- Application Number
- CN202511845486.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-04-28
AI Technical Summary
Traditional PID controllers struggle to maintain ideal dynamic performance under nonlinear, time-varying, or complex operating conditions. Fuzzy PID controllers lack systematic optimization methods for membership function design and rule parameter setting. Particle swarm optimization algorithms are sensitive to parameter settings and prone to premature convergence, resulting in insufficient robustness and reliability of the control system.
By introducing a multi-swarm collaborative PSO mechanism and differentiated parameter settings, combined with a gradient-guided local optimization mechanism, the PSO algorithm is improved to dynamically adjust the parameters of the fuzzy controller. By balancing global and local search, the convergence stability and control performance of the particle swarm algorithm are enhanced.
It improves the dynamic performance and steady-state accuracy of fuzzy PID controllers, reduces overshoot, shortens settling time, and achieves fast and smooth system response, making it suitable for high-performance control scenarios.
Smart Images

Figure CN121934358A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of automation control, and in particular relates to an online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO. Background Technology
[0002] With the rise of industrial intelligence, the demands on control performance in various industrial processes are increasing. As a core component of automated equipment and intelligent manufacturing processes, the dynamic response quality and stability of the control system directly determine the overall system's operational efficiency and reliability. Faced with rapidly changing environments and diverse task requirements, advanced control algorithms have become a key tool for improving system performance.
[0003] When dealing with systems characterized by multivariables, strong coupling, time-varying parameters, and nonlinearity, the performance of traditional controllers is prone to decline due to disturbances, load changes, or large uncertainties in the system model. This may even lead to increased system overshoot, slower response, or poorer stability, which places higher demands on the design of control algorithms and drive strategies.
[0004] In existing technologies, traditional PID (Proportional Integral Derivative) controllers are widely used in control systems due to their simple structure and ease of implementation. However, their parameters rely on manual tuning, making it difficult to maintain ideal dynamic performance under nonlinear, time-varying, or complex operating conditions. Fuzzy PID control introduces a fuzzy logic inference mechanism on the basis of traditional PID, enabling dynamic adjustment of PID parameters based on errors and their rates of change, thus improving the adaptability of the control system in nonlinear and uncertain environments. However, the design of membership functions and the setting of rule parameters for fuzzy PID controllers often rely on experience and lack systematic optimization methods, which can easily lead to insufficient control accuracy or slow convergence speed. Therefore, designing automated methods for fuzzy systems is more preferable.
[0005] In recent years, intelligent optimization algorithms have developed rapidly, among which Particle Swarm Optimization (PSO) has been widely studied due to its simple algorithm structure and strong global optimization ability. Although the PSO algorithm has a certain optimization capability for system regulation, existing methods have the following shortcomings:
[0006] (1) Particle swarm optimization is sensitive to parameter settings such as inertia weight and learning factor. How to determine the appropriate value of the parameters is a problem worth considering. The selection of parameters may affect the algorithm and make it lack adaptability.
[0007] (2) Particle swarm optimization is prone to premature convergence and getting stuck in local optima, resulting in poor global search capability and unstable final optimization results.
[0008] (3) When dealing with nonlinear systems, the robustness and reliability of the control system need to be further improved.
[0009] Therefore, how to effectively adjust the structure and parameters of the fuzzy PID controller using the improved particle swarm optimization method to improve the dynamic performance, steady-state accuracy and robustness of the control system has become an urgent technical problem to be solved. Summary of the Invention
[0010] Purpose of the Invention: The purpose of this invention is to provide an online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO. This invention introduces a gradient-guided local optimization mechanism by adopting a multi-group cooperative mechanism and differentiated parameter settings, thereby improving the global search capability and convergence stability of the PSO algorithm. Furthermore, by dynamically adjusting the parameters of the fuzzy controller through the improved PSO algorithm, the control performance of the system is enhanced.
[0011] Technical solution: The present invention provides an online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO, comprising the following steps:
[0012] Step 1: Establish a mathematical model of the controlled object, and obtain the transfer function of the controlled object based on the structural characteristics and working principle of the system;
[0013] Step 2: Establish a fuzzy PID controller, set fuzzy rules, and configure relevant parameter values;
[0014] Running the improved PSO (Particle Swarm Optimization) algorithm, the optimization space is the proportional coefficient corresponding to the fuzzy rule. Integral coefficient Differential coefficients The range of values; update the velocity and position of each particle, obtain the fitness value of each particle during the learning process, and update the extreme values of individual particles and population particles in each iteration;
[0015] Step 4: Optimize the output parameters of the fuzzy controller based on the results of the PSO (Particle Swarm Optimization) algorithm.
[0016] Furthermore, step 1 specifically involves: establishing a mathematical model and obtaining the transfer function of the controlled object; the transfer function of the control system is:
[0017]
[0018] In the formula, For system transfer function, This is the Laplace transform of the output. For the Laplace transform of the input quantity, For the numerator coefficients of the system transfer function, The coefficients in the denominator of the system transfer function are... This represents the power term of the complex frequency domain variable in the Laplace transform.
[0019] Furthermore, step 2 specifically involves: the fuzzy PID controller structure is divided into a PID module and a fuzzification module. By analyzing the fuzzy relationship between the system deviation e and the rate of change of deviation ec, the proportional, integral, and derivative parameters are dynamically adjusted. The PID parameters are tuned based on the relationship between these three parameters and the deviation and the rate of change of deviation. The proportional coefficient output by the controller after tuning is... Integral coefficient and differential coefficients for:
[0020]
[0021] , , These are the initial values for the proportional, integral, and derivative parameters of a standard PID controller. , , The proportional, integral, and derivative outputs are for fuzzy control; the control system uses the deviation between the actual value and the setpoint, and the rate of change of the deviation, as the input to the controller; the incremental PID algorithm is used as follows:
[0022]
[0023] in, This represents the deviation between the actual value and the set value.
[0024] The Mamdani inference method, based on fuzzy logic, is used for reasoning and decision-making through fuzzification, fuzzy rules, and defuzzification. Fuzzy rules are established to divide the input and output spaces into fuzzy intervals with a range of [-3,3]. The values of input and output variables are divided into 7 subsets, defined as negative large NB, negative medium NM, negative small NS, zero ZD, positive small PS, positive medium PM, and positive large PB. Based on the characteristics of the controlled object, tabular fuzzy control rules are established.
[0025] After fuzzification of the deviation e and the rate of change of deviation ec, the fuzzy control rule is searched to obtain the corresponding... , , The corresponding output subsets are NB, NM, NS, ZD, PS, PM, and PB. Different subsets correspond to different output intervals. The particle swarm optimization range is the output interval, meaning the fuzzy control rules provide the optimization direction for the particle swarm algorithm. The PSO algorithm is used for optimization, iteratively finding the optimal... , , Values.
[0026] Furthermore, step 3 specifically involves: initializing the particle swarm. In a D-dimensional target search space, there are 2N particles forming a swarm, N particles forming an exploration swarm, and N particles forming an exploration swarm. Particle movement has two attributes: the particle's position and velocity. For these two swarms, the i-th particle is a D-dimensional vector, and the "flight" position of the i-th particle... Set to:
[0027]
[0028] Choose a particle dimension N of 3. The three parameters corresponding to the fuzzy PID controller ( );
[0029] The "flight" speed of the i-th particle Set to:
[0030]
[0031] Choose a particle dimension N of 3. The corresponding particle speeds in three directions;
[0032] The range of values is After updating the particle velocity, a velocity boundary check will be performed. If < ,but Values ;if > ,but Values ;
[0033] During the particle swarm optimization phase, when the i-th particle in generation t evolves to generation t+1, its velocity and position are updated as follows:
[0034]
[0035]
[0036] Where N is the number of particles in the community; It is the inertial weight of the particle; and These are the self-learning coefficient and the group learning coefficient of the particles, respectively. and The value of is used to balance the global and local search capabilities of the particle; during the particle's iteration process, there exists and These two indicators, This is represented as the extremum of a single particle. This represents the optimal solution for the entire particle population; and It is a random function, namely the random() function, which generates random numbers in the range [0,1].
[0037] After a fixed number of iterations, the exploring community provides the developing community with its current best position; that is, the developing community updates its best position to the exploring community's best position. ;
[0038] For exploratory groups, parameter settings encourage global search, using nonlinear schemes, and letting...
[0039] k
[0040] Perform parameter tuning analysis on all parameters; and These represent the maximum and minimum inertia weights, respectively. The maximum number of iterations is given; k is the nonlinear adjustment exponent.
[0041] For development groups, parameter settings encourage local search, use nonlinear schemes, and perform parameter tuning analysis on all parameters;
[0042] After each round of particle position and velocity updates, a gradient-guided local optimization mechanism is introduced, allowing particles to fine-tune their orientation based on fitness changes. Perturbations are applied according to parameter dimensions, and simulations are performed to calculate partial derivatives. The formula is set as follows:
[0043]
[0044]
[0045] in, The objective function is represented by the variable. Gradient in direction; Indicates the learning rate; J represents the small perturbation; J() represents the fitness value.
[0046] Calculate the fitness value of each particle, substitute the particle state into the fitness calculation model, and calculate the individual fitness value and the population fitness value of the particles. , Comparative updates are performed; the ITAE integral criterion is used to evaluate the overall performance of the control system.
[0047]
[0048] In the formula, t represents time. This is the angular deviation value;
[0049] After each iteration, update the fitness values of all particles and set the current extreme value of each individual particle. The optimal solution for the entire particle population Compare with the corresponding value from the previous round; if the current fitness value is better, then update. and The process is iterated continuously until the preset fitness requirement or the maximum number of iterations is reached, and the optimal solution is output as the final result of the algorithm.
[0050] Furthermore, step 4 specifically involves: using the improved PSO algorithm to iteratively update particle positions and velocities to search in real time for the optimal combination of control parameters that optimizes system performance; and then applying the particle swarm optimization results. The three parameters used to set the fuzzy controller are: , and This enables adaptive adjustment of the controller parameters.
[0051] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the method of the present invention.
[0052] The present invention also discloses a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the method of the present invention.
[0053] The present invention also discloses a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the method of the present invention.
[0054] Beneficial effects: Compared with the prior art, the present invention has the following significant advantages:
[0055] 1. This invention dynamically optimizes the three parameters of the fuzzy controller by improving the PSO algorithm. , and This approach enables the system to optimize control parameters based on system state and error signals, achieving optimization of the fuzzy PID controller. The population is divided into two subgroups: a global exploration subgroup and a local exploration subgroup. Differentiated learning factors and dynamic inertia weights are set to achieve a balance between global search and local optimization in the particle swarm, preventing the algorithm from getting trapped in local optima or premature convergence. A gradient-guided local optimization mechanism is introduced in each iteration, allowing particles to perform directional fine-tuning based on fitness changes, improving convergence capability.
[0056] 2. This invention optimizes the output parameters of fuzzy PID based on the PSO algorithm. By introducing dynamic coefficient adjustment and multiple group collaboration mechanisms, it improves the global search capability and convergence stability, avoids the problem of traditional PSO easily getting trapped in local optima, and enables the control parameters to maintain a better configuration under different operating conditions.
[0057] 3. Simulation results of the control system show that when conventional PID is applied to the control system, the overshoot is relatively large (14.76%), the settling time is 2.79s, and the dynamic characteristics are slow. Fuzzy PID can effectively suppress the overshoot, reducing it to 4.86%, and the system response speed is also faster, with a settling time of 1.84s. PSO-optimized fuzzy PID control reduces the overshoot to 0.72% and the settling time to 0.85s, both of which are significantly improved compared to conventional PID and fuzzy PID. This invention enables adaptive adjustment of control parameters in system control, thereby improving the overall control performance of the system. Specifically, this method can achieve a fast and stable response while maintaining a fast response speed and a small overshoot. It can be applied to control scenarios with high performance requirements and is suitable for practical engineering applications. Attached Figure Description
[0058] Figure 1 Fuzzy controller membership function setting diagram;
[0059] Figure 2 Detailed process diagram of improved PSO optimization fuzzy PID;
[0060] Figure 3 Improved PSO algorithm flowchart;
[0061] Figure 4 Fuzzy rule graph;
[0062] Figure 5 Fuzzy rule graph;
[0063] Figure 6 Fuzzy rule graph;
[0064] Figure 7 System modeling diagram;
[0065] Figure 8 Simulation results of three control methods. Detailed Implementation
[0066] The technical solution of the present invention will be further described below with reference to the accompanying drawings. The online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO of the present invention includes the following steps:
[0067] Step 1: Establish a mathematical model and obtain the transfer function of the controlled object. Common transfer functions for control systems:
[0068]
[0069] In the formula, For system transfer function, This is the Laplace transform of the output. This is the Laplace transform of the input.
[0070] This invention takes WHEELTEC's MS42DC two-phase hybrid stepper motor as an example. The transfer function of this motor is:
[0071]
[0072] Step 2: Establish a fuzzy PID controller, configure the Fuzzy Logic Controller module, add input and output variables, define their ranges and fuzzy sets, and set the fuzzy control rules shown in Table 1.
[0073] Table 1
[0074]
[0075] Step 3: Run the improved PSO (Particle Swarm Optimization) algorithm. The optimization space of the algorithm is the one obtained through fuzzy rule correspondence. , , The range of values is determined. The velocity and position of each particle are updated, and the fitness value of each particle is obtained during the learning process. The extreme values of individual particles and the population particles are updated in each iteration. The improved PSO algorithm flow is as follows: Figure 3 As shown.
[0076] Step 4: Optimize the output parameters of the fuzzy controller based on the results of the PSO (Particle Swarm Optimization) algorithm. The PSO online optimization model for fuzzy PID constructed in this invention is as follows: Figure 7 As shown.
[0077] The PSO-optimized fuzzy PID control method of this invention is compared with conventional PID control and fuzzy PID control, and the results are as follows: Figure 8 The simulation results of the three control methods are shown in the figure, and the performance comparison of the three control methods is shown in Table 2.
[0078] Table 2
[0079]
[0080] Experimental results show that when conventional PID is applied to a control system, the overshoot is relatively large (14.76%), the settling time is 2.79 s, and the dynamic characteristics are slow. Fuzzy PID can effectively suppress overshoot, with an overshoot of 4.86%, and the system response speed is also faster, with a settling time of 1.84 s. PSO-optimized fuzzy PID control has an overshoot of 0.72% and a settling time of 0.85 s, both of which are significantly improved compared to conventional PID and fuzzy PID. This invention can achieve adaptive adjustment of control parameters in system control, thereby improving the overall control performance of the system. Specifically, this method can achieve a fast and stable response while maintaining a fast response speed and a small overshoot. It can be applied to control scenarios with high performance requirements and is suitable for practical engineering applications.
Claims
1. A method for online optimization of fuzzy PID control parameters based on multi-group cooperative PSO, characterized in that, Includes the following steps: Step 1: Establish a mathematical model of the controlled object, and obtain the transfer function of the controlled object based on the structural characteristics and working principle of the system; Step 2: Establish a fuzzy PID controller, set fuzzy rules, and configure relevant parameter values; Step 3: Run the improved PSO (Particle Swarm Optimization) algorithm. The optimization space of the algorithm is the proportional coefficient corresponding to the fuzzy rule. Integral coefficient Differential coefficients The range of values; update the velocity and position of each particle, obtain the fitness value of each particle during the learning process, and update the extreme values of individual particles and population particles in each iteration; Step 4: Optimize the output parameters of the fuzzy controller based on the results of the PSO (Particle Swarm Optimization) algorithm.
2. The online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO according to claim 1, characterized in that, Step 1 specifically involves: establishing a mathematical model and obtaining the transfer function of the controlled object; the transfer function of the control system is: ; In the formula, For system transfer function, This is the Laplace transform of the output. For the Laplace transform of the input quantity, For the numerator coefficients of the system transfer function, The coefficients in the denominator of the system transfer function are... This represents the power term of the complex frequency domain variable in the Laplace transform.
3. The online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO according to claim 1, characterized in that, Step 2 specifically involves the following: The fuzzy PID controller structure consists of a PID module and a fuzzification module. By analyzing the fuzzy relationship between the system deviation e and the rate of change of deviation ec, the proportional, integral, and derivative parameters are dynamically adjusted. The PID parameters are tuned based on the relationship between these three parameters and the deviation and the rate of change of deviation. The proportional coefficient output by the controller after tuning is... Integral coefficient and differential coefficients for: ; , , These are the initial values for the proportional, integral, and derivative parameters of a conventional PID controller; , , The proportional, integral, and derivative outputs are for fuzzy control; the control system uses the deviation between the actual value and the setpoint, and the rate of change of the deviation, as the input to the controller; the incremental PID algorithm is used as follows: ; in, This represents the deviation between the actual value and the set value. The Mamdani inference method, based on fuzzy logic, is used for reasoning and decision-making through fuzzification, fuzzy rules, and defuzzification. Fuzzy rules are established to divide the input and output spaces into fuzzy intervals with a range of [-3,3]. The values of input and output variables are divided into 7 subsets, defined as negative large NB, negative medium NM, negative small NS, zero ZD, positive small PS, positive medium PM, and positive large PB. Based on the characteristics of the controlled object, tabular fuzzy control rules are established. After fuzzification of the deviation e and the rate of change of deviation ec, the fuzzy control rule is searched to obtain the corresponding... , , The corresponding output subsets are NB, NM, NS, ZD, PS, PM, and PB. Different subsets correspond to different output intervals. The particle swarm optimization range is the output interval, meaning the fuzzy control rules provide the optimization direction for the particle swarm algorithm. The PSO algorithm is used for optimization, iteratively finding the optimal... , , Values.
4. The online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO according to claim 1, characterized in that, Step 3 specifically involves: initializing the particle swarm. In a D-dimensional target search space, there are 2N particles forming a swarm, N particles forming an exploration swarm, and N particles forming an exploration swarm. Particle movement has two attributes: the particle's position and velocity. For these two swarms, the i-th particle is a D-dimensional vector, and the "flight" position of the i-th particle... Set to: ; Choose a particle dimension N of 3. The three parameters corresponding to the fuzzy PID controller ( ); The "flight" speed of the i-th particle Set to: ; Choose a particle dimension N of 3. The corresponding particle speeds in three directions; The range of values is After updating the particle velocity, a velocity boundary check will be performed. If < ,but Values ;if > ,but Values ; During the particle swarm optimization phase, when the i-th particle in generation t evolves to generation t+1, its velocity and position are updated as follows: ; ; Where N is the number of particles in the community; It is the inertial weight of the particle; and These are the self-learning coefficient and the group learning coefficient of the particles, respectively. and The value of is used to balance the global and local search capabilities of the particle; during the particle's iteration process, there exists and These two indicators, This is represented as the extremum of a single particle. This represents the optimal solution for the entire particle population; and It is a random function, namely the random() function, which generates random numbers in the range [0,1]. After a fixed number of iterations, the exploring community provides the developing community with its current best position; that is, the developing community updates its best position to the exploring community's best position. ; For exploratory groups, parameter settings encourage global search, using nonlinear schemes, and letting... k ; Perform parameter tuning analysis on all parameters; and These represent the maximum and minimum inertia weights, respectively. The maximum number of iterations is given; k is the nonlinear adjustment exponent. For development groups, parameter settings encourage local search, use nonlinear schemes, and perform parameter tuning analysis on all parameters; After each round of particle position and velocity updates, a gradient-guided local optimization mechanism is introduced, allowing particles to fine-tune their orientation based on fitness changes. Perturbations are applied according to parameter dimensions, and simulations are performed to calculate partial derivatives. The formula is set as follows: ; ; in, The objective function is represented by the variable. Gradient in direction; Indicates the learning rate; J represents the amount of small perturbation; J() represents the fitness value. Calculate the fitness value of each particle, substitute the particle state into the fitness calculation model, and calculate the individual fitness value and the population fitness value of the particles. , Comparative updates are performed; the ITAE integral criterion is used to evaluate the overall performance of the control system. ; In the formula, t represents time. This is the angular deviation value; After each iteration, update the fitness values of all particles and set the current extreme value of each individual particle. The optimal solution for the entire particle population Compare with the corresponding value from the previous round; if the current fitness value is better, then update. and The process is iterated continuously until the preset fitness requirement or the maximum number of iterations is reached, and the optimal solution is output as the final result of the algorithm.
5. The online optimization method for fuzzy PID control parameters based on multi-group cooperative PSO according to claim 1, characterized in that, Step 4 specifically involves: using the improved PSO algorithm to iteratively update particle positions and velocities, and searching in real time for the optimal combination of control parameters that optimizes system performance; then, processing the particle swarm optimization results. The three parameters used to set the fuzzy controller are: , and This enables adaptive adjustment of the controller parameters.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method of claim 1.
7. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.
8. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method of claim 1.
