A PID response time calibration method and system based on the Grey Wolf Optimization algorithm
Through the PID response time calibration method based on the Gray Wolf optimization algorithm, combined with the memory bank and the random local search algorithm, the PID parameters are automatically optimized, and the problem of time-consuming and labor-consuming adjustment of PID parameters in the existing technology is solved, and efficient PID control is achieved.
Patent Information
- Application Number
- CN202510213185.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-08
- Estimated Expiration
- 2045-02-26
AI Technical Summary
The existence of existing PID parameter adjustments in the gas mass flow controller has an excessive proportional coefficient that will lead to a reduction in the dynamic control capability of the system, an excessive integral coefficient will lead to overshoot, and the differential coefficient is too sensitive to affect the anti-interference ability, which requires a lot of manual experience and time to adjust.
The PID response time calibration method based on the Gray Wolf optimization algorithm is adopted, combining memory database and random local search algorithm to optimize PID parameters, and automatically calibrate the optimal PID parameters by constructing the fitness function and iterative optimization.
Automatic calibration of PID control is realized, reducing labor costs, improving work efficiency, and obtaining the optimal solution to PID parameters with system stability and shortest response time.
Smart Images

Figure CN119717494B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of gas mass flow controllers, and particularly to a PID response time calibration method and system based on a grey wolf optimization algorithm. Background Art
[0002] A gas mass flow controller (MFC) is a device used to accurately measure and control the mass flow of gas. The working principle of this device is based on fluid mechanics and heat transfer principles. By measuring the pressure difference and temperature change when the gas flows through the pipeline with a mass flow sensor, the mass flow of the gas is calculated, and the gas flow is adjusted by controlling the valve to keep it within the set range. The MFC plays an important role in multiple fields, including semiconductor manufacturing, chemical engineering, biomedicine, aerospace, and environmental detection. This field usually has certain requirements for the response time of the gas to meet production needs.
[0003] Proportional-integral-derivative control, abbreviated as PID control, is widely used in industrial process control due to its simple algorithm, good robustness, and high reliability, including the response time calibration of MFC. When using the PID algorithm to calibrate the response time of the MFC, it is necessary to manually adjust the PID parameters (including the proportional coefficient, integral coefficient, and derivative coefficient) according to the response curve phenomenon.
[0004] In the actual adjustment of PID parameters, the following problems often exist: (1) If the proportional coefficient is too large, the dynamic control ability of the system will be reduced, and even instability may lead to system downtime. (2) If the integral coefficient is too large, the control system will produce overshoot and delay the response time. (3) The derivative coefficient can increase the stability of the system, but it is too sensitive to external interference and will reduce the anti-interference ability of the control system. Therefore, when using the PID algorithm for response time calibration, it is necessary to reasonably tune the three PID parameters, and at the same time have the empirical ability to observe the response curve and analyze and judge the parameters, and invest a certain amount of time and labor costs to obtain the PID response time control performance that meets high production requirements. Summary of the Invention
[0005] In view of the above challenges existing in the current technology, the present invention provides a PID response time calibration method based on a grey wolf optimization algorithm. By using an improved grey wolf optimization algorithm to optimize the PID parameters, a memory bank and a random local search algorithm are introduced to improve the optimization ability of the grey wolf optimization algorithm, and the optimal solution of the PID parameters when the system is stable and the response time is the shortest is obtained.
[0006] To achieve the above object, the embodiments of the present invention adopt the following technical solutions:
[0007] A method for calibrating the response time of PID based on the Grey Wolf Optimization algorithm, comprising the following steps:
[0008] Construct a Grey Wolf Optimization model for optimizing PID parameters;
[0009] Initialize the Grey Wolf Optimization model;
[0010] Based on the memory bank and the random local search method, iteratively optimize the Grey Wolf Optimization model to obtain optimized PID parameters;
[0011] Input the optimized PID parameters into the PID control system of MFC.
[0012] According to one aspect of the present invention, the PID parameters include: proportional coefficient, integral coefficient, and differential coefficient.
[0013] According to one aspect of the present invention, the initialization of the Grey Wolf Optimization model includes:
[0014] Set the value range of the PID parameters;
[0015] Set the number of search agents and the maximum number of iterations for Grey Wolf Optimization;
[0016] Set the fitness function for Grey Wolf Optimization;
[0017] According to the value range of the PID parameters, randomly generate the PID parameters of the initial search agents;
[0018] Calculate the fitness value of the initial search agents according to the fitness function, and determine the optimal solution wolf.
[0019] According to one aspect of the present invention, the setting of the fitness function for Grey Wolf Optimization includes:
[0020] Construct a fitness function based on the integral of the weighted absolute value of the error of the MFC system time.
[0021] According to one aspect of the present invention, the iterative optimization of the Grey Wolf Optimization model based on the memory bank and the random local search method to obtain optimized PID parameters includes:
[0022] Construct a memory bank for saving the data of better individual wolves in each iteration process, including PID parameter values and fitness values;
[0023] When performing iteration, randomly locally search for the PID parameter values, calculate the fitness values of the PID parameter values at each search point and iteration times according to the fitness function, record and save the minimum fitness value, update the memory bank and the optimal solution wolf;
[0024] Iteratively search for the optimal PID parameters until the maximum number of iterations is reached, and save the optimized PID parameters and the best fitness value.
[0025] According to one aspect of the present invention, the gray wolf optimization model is iteratively optimized based on the memory bank and the random local search method, and the obtained optimized PID parameters include:
[0026] At the beginning of the iteration, a certain number of individual wolf data with lower fitness values of the initial search agents are selected and saved in the memory bank.
[0027] According to one aspect of the present invention, the random local search PID parameter values include:
[0028] Randomly select a sample wolf from the wolf group with lower fitness values in the memory bank;
[0029] Find the wolf closest to the sample wolf among other wolves through the Euclidean distance, and randomly generate a local wolf for iterative calculation.
[0030] According to one aspect of the present invention, the random local search PID parameter values further include:
[0031] Randomly select 2 sample wolves from the wolf group with lower fitness values in the memory bank;
[0032] Using the genetic algorithm, generate a local wolf based on the 2 sample wolves for iterative calculation.
[0033] According to one aspect of the present invention, the PID response time calibration method based on the gray wolf optimization algorithm further includes:
[0034] Test whether the response time and control curve of the MFC meet the production requirements. If not, re-optimize the PID parameters until the production requirements are met.
[0035] A PID response time calibration system based on the gray wolf optimization algorithm, based on the PID response time calibration method based on the gray wolf optimization algorithm as described above, includes:
[0036] A model construction module for constructing a gray wolf optimization model for optimizing PID parameters;
[0037] An initialization module for initializing the gray wolf optimization model;
[0038] An iteration module for iteratively optimizing the gray wolf optimization model based on the memory bank and the random local search method to obtain optimized PID parameters;
[0039] A control module for inputting the optimized PID parameters into the PID control system of the MFC.
[0040] Advantages of the implementation of the present invention:
[0041] The present invention provides a PID response time calibration method based on the grey wolf optimization algorithm, which uses an improved grey wolf optimization algorithm to optimize the PID parameters, introduces a memory bank and a random local search algorithm to improve the optimization ability of the grey wolf optimization algorithm, and obtains the optimal solution of the PID parameters when the system is stable and the response time is the shortest; it can be calculated iteratively by a computer, realizing the automatic calibration of PID control. The calculation speed does not depend on the experience of the staff, and the calibration speed is much faster than manual calibration, reducing the labor cost and improving the work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0043] Figure 1 It is a flowchart of a PID response time calibration method based on the grey wolf optimization algorithm according to Embodiment 1 of the present invention;
[0044] Figure 2 It is a flowchart of a PID response time calibration method based on the grey wolf optimization algorithm according to Embodiment 2 of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all of them. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts belong to the scope of protection of the present invention.
[0046] Embodiment 1
[0047] As Figure 1 shown, a PID response time calibration method based on the grey wolf optimization algorithm includes the following steps:
[0048] S1: Construct a grey wolf optimization model for optimizing the PID parameters.
[0049] When using the PID algorithm to calibrate the response time of the MFC, it is necessary for the staff to manually adjust the PID parameters according to the response curve phenomenon.
[0050] Specifically, the PID parameters include: proportional coefficient, integral coefficient, and differential coefficient.
[0051] Grey Wolf Optimizer (GWO) is a new swarm intelligence algorithm that simulates the social hierarchy and hunting behavior of grey wolves. It achieves the goal of finding the optimal solution through the process of tracking, surrounding prey and hunting. The principle of the Grey Wolf Optimizer is simple, with few adjustable parameters and strong global search capability. The key steps to find the optimal PID parameters through the Grey Wolf Optimizer are as follows:
[0052] (1) Social system
[0053] In the gray wolf optimization algorithm, the social hierarchy is mainly divided into α, β, δ and ω wolves. Among them, the best candidate value solution is set to α wolf, the second best candidate value is β wolf, the third best candidate value is δ wolf, and the remaining best candidate value is ω wolf. During the hunting process, the position of the wolf is updated according to the rules. At the same time, during the iteration process, the leading α, β, and δ gray wolves will be replaced by gray wolves with better adaptability.
[0054] (2) Surrounding the prey
[0055] When the wolf pack is surrounding the prey, it is necessary to determine the distance between the individual and the prey. Based on the distance, the position of the gray wolf is updated. The update formula is:
[0056]
[0057]
[0058] Among them, X p (t) is the position vector of the prey, X(t) is the position vector of the gray wolf; D is the distance between the gray wolf and the prey, which can be calculated using Euclidean distance, Manhattan distance, etc.; t is the current iteration number; coefficients A and C can be expressed as:
[0059]
[0060]
[0061] Where b is the control parameter, b=2-2(t / t max ), t max is the maximum number of iterations that linearly decreases from 2 to 0 during the iteration process, and r1 and r2 are random vectors in [0,1].
[0062] (3) Hunting
[0063] When the wolves have completed the encirclement of the prey, α wolf guides β wolf and δ wolf to reduce the encirclement of the prey to achieve the purpose of hunting. The mathematical expression of this process is as follows:
[0064]
[0065]
[0066] In the iterative loop, the final position expression of the gray wolf is:
[0067]
[0068] where X α 、X β 、X δ represent the current positions of the alpha wolf, beta wolf, and delta wolf respectively; X1, X2, and X3 represent the step sizes of the alpha wolf, beta wolf, and delta wolf in their respective directions.
[0069] Finally, the gray wolf optimization algorithm outputs the position of the alpha wolf as the optimal solution of the PID parameters and the corresponding fitness value.
[0070] S2: Initialize the gray wolf optimization model.
[0071] Step S2 includes:
[0072] S21: Set the value range of the PID parameters.
[0073] According to the characteristics of the response time curve of MFC, set the value range of the proportional coefficient K p 、the integral coefficient K i 、the derivative coefficient K d .
[0074] S22: Set the number of search agents and the maximum number of iterations for gray wolf optimization.
[0075] Specifically, the number of search agents can be set to 30, and the maximum number of iterations can be set to 20.
[0076] S23: Set the fitness function for gray wolf optimization.
[0077] Step S23 includes:
[0078] Construct a fitness function based on the integral of the time-weighted absolute value of the error of the MFC system time.
[0079] The integral of the time-weighted absolute error (ITAE) is a performance index commonly used in the performance evaluation of control systems, especially in the parameter tuning process of PID controllers. The ITAE index comprehensively reflects the stability and dynamic response of the system by combining the absolute value of the error and the integral of time, and it can be used as the fitness function. The specific calculation formula is:
[0080]
[0081] Among them, e(t) represents the error between the system output and the desired output; t is time.
[0082] The smaller the ITAE index, the better the stability of the system and the faster the dynamic response. The ITAE index is not sensitive to the initial deviation but very sensitive to the later deviation. When using the ITAE index to adjust the controller parameters, the initial deviation in the transient process is relatively large, but as time goes by, the deviation will quickly decrease, which indicates that using the ITAE index can reduce the adjustment time. Therefore, in practical applications, ITAE is an important performance evaluation index.
[0083] S24: According to the value range of the PID parameters, randomly generate the PID parameters of the initial search agents.
[0084] According to the number of search agents set in step S22, randomly generate the initial search agents. For example, in this method, the number of search agents is set to 30, then 30 groups of PID parameters are randomly generated as the initial search agents.
[0085] S25: Calculate the fitness values of the initial search agents according to the fitness function, and determine the optimal solution wolves.
[0086] According to the fitness function set in step S23, calculate the fitness values of each group of PID parameters generated initially. Take the group with the smallest fitness value as the optimal solution wolf, that is, set the three groups of PID parameters with the smallest, the second smallest, and the third smallest fitness values as the α wolf, the β wolf, and the δ wolf respectively, and set the other wolves as ω wolves.
[0087] S3: Based on the memory bank and the random local search method, iteratively optimize the grey wolf optimization model to obtain the optimized PID parameters.
[0088] Step S3 includes:
[0089] S31: Construct a memory bank for saving the data of the better individual wolves in each iteration process, including the PID parameter values and the fitness values.
[0090] The memory bank is set with a memory function on the basis of the original grey wolf optimization algorithm to save the data of the better individual wolves in each iteration process, including their positions, fitness values, etc. After each iteration, update the wolves with more excellent indicators to the wolf group information in the memory bank to provide data for the random local search.
[0091] Preferably, step S3 includes:
[0092] At the beginning of the iteration, select a certain number of individual wolf data with lower fitness values of the initial search agents and save them into the memory bank.
[0093] S32: When performing iteration, randomly search the PID parameter values locally, calculate the fitness values of the PID parameter values at each search point and iteration number according to the fitness function, record and save the minimum fitness value, and update the memory bank and the optimal solution wolves.
[0094] Specifically, the random local search of the PID parameter values includes:
[0095] Randomly select a sample wolf from the wolf group with lower fitness values in the memory bank;
[0096] Find the wolf closest to the sample wolf among other wolves through the Euclidean distance, and randomly generate a local wolf for iterative calculation.
[0097] In practical applications, the random local search can perform local search on the top 50% of the individual wolf population with lower fitness values in the memory bank, select a sample wolf, then find the wolf closest to the sample wolf among other wolves through the Euclidean distance, and randomly generate a local wolf. The position calculation formula of the local wolf is:
[0098]
[0099] where, X t,j is the position of the generated local wolf; X n,j is the position of the individual wolf closest to the sample wolf; X i,j is the position of the selected sample wolf; c1 is the acceleration coefficient.
[0100] S33: Iteratively search for the optimal PID parameter until the maximum number of iterations is reached, and save the optimized PID parameter and the best fitness value.
[0101] Using the improved grey wolf optimization algorithm, obtain the final optimized PID parameter, that is, the optimized proportional coefficient K p 、integral coefficient K i 、differential coefficient K d .
[0102] S4: Input the optimized PID parameter into the PID control system of MFC.
[0103] In practical applications, this method can be linked with the PID control system of MFC to realize the automatic calibration of the response time of PID control.
[0104] The beneficial effects of this embodiment are as follows: The improved Grey Wolf Optimization algorithm is adopted in this method for PID parameter optimization, and a memory bank and a stochastic local search algorithm are introduced to improve the optimization ability of the Grey Wolf Optimization algorithm, so as to obtain the optimal solution of PID parameters when the system is stable and the response time is the shortest; the computer can be used for calculation iteration, realizing the automatic calibration of PID control. The calculation speed does not depend on the experience of the staff, and the calibration speed is much faster than manual calibration, reducing the labor cost and improving the work efficiency.
[0105] Embodiment 2
[0106] As Figure 2 shown, a method for calibrating the PID response time based on the Grey Wolf Optimization algorithm includes the following steps:
[0107] S1: Construct a Grey Wolf Optimization model for optimizing PID parameters.
[0108] When using the PID algorithm to calibrate the response time of the MFC, it is necessary for the staff to manually adjust the PID parameters according to the response curve phenomenon.
[0109] Specifically, the PID parameters include: proportional coefficient, integral coefficient, and differential coefficient.
[0110] The Grey Wolf Optimizer (GWO) is a new swarm intelligence algorithm, which simulates the social hierarchy and hunting behavior of grey wolves. Through the tracking, surrounding of prey and hunting process of wolves, the purpose of finding the optimum is achieved. The principle of the Grey Wolf Optimization algorithm is simple, with few adjustable parameters and strong global search ability. The key steps to find the optimal PID parameters through the Grey Wolf Optimization algorithm are as follows:
[0111] (1) Social system
[0112] In the Grey Wolf Optimization algorithm, the social hierarchy is mainly divided into α, β, δ, and ω wolves. Among them, the best candidate solution is set as the α wolf, the second best candidate is the β wolf, the third best candidate is the δ wolf, and the remaining best candidates are ω wolves. During the hunting process, the positions of the wolves are updated according to the rules. At the same time, during the iteration process, the leading α, β, and δ grey wolves will be replaced by grey wolves with better adaptability.
[0113] (2) Surrounding the prey
[0114] During the process of the wolf pack surrounding the prey, it is necessary to determine the distance between the individual and the prey. According to the distance, the position update of the grey wolf is completed. The update formula is:
[0115]
[0116]
[0117] where, Xp (t) is the position vector of the prey, and X(t) is the position vector of the grey wolf; D is the distance between the grey wolf and the prey, and calculation methods such as Euclidean distance and Manhattan distance can be used; t is the current iteration number; the coefficients A and C can be expressed as:
[0118]
[0119]
[0120] Among them, b is a regulation parameter, b = 2 - 2(t / t max ), t max is the maximum number of iterations that linearly decreases from 2 to 0 during the iteration process, and r1, r2 are random vectors in [0, 1].
[0121] (3)Hunting
[0122] When the wolves complete the encirclement of the prey, the alpha wolf guides the beta wolf and the delta wolf to narrow the encirclement of the prey to achieve the purpose of hunting. The mathematical expression of this process is as follows:
[0123]
[0124]
[0125] In the iteration loop, the final position expression of the grey wolf is:
[0126]
[0127] Among them, X α , X β , X δ respectively represent the current positions of the alpha wolf, the beta wolf and the delta wolf; X1, X2, X3 respectively represent the step sizes of the alpha wolf, the beta wolf and the delta wolf in their respective directions.
[0128] Finally, the grey wolf optimization algorithm outputs the position of the alpha wolf as the optimal solution of the PID parameters, and the corresponding fitness value.
[0129] S2: Initialize the grey wolf optimization model.
[0130] Step S2 includes:
[0131] S21: Set the value range of the PID parameters.
[0132] According to the response time curve characteristics of MFC, set the value range of the proportional coefficient K p , integral coefficient K i , differential coefficient K d .
[0133] S22: Set the number of search agents and the maximum number of iterations for Grey Wolf Optimization.
[0134] Specifically, the number of search agents can be set to 30, and the maximum number of iterations can be set to 20.
[0135] S23: Set the fitness function for Grey Wolf Optimization.
[0136] Step S23 includes:
[0137] Construct a fitness function based on the integral of the time-weighted absolute value of the error in the MFC system.
[0138] The integral of the time-weighted absolute error (ITAE) is a performance metric commonly used in the evaluation of control system performance, especially in the process of tuning the parameters of a PID controller. The ITAE metric comprehensively reflects the stability and dynamic response of the system by combining the absolute value of the error and the integral of time, and it can be used as the fitness function. The specific calculation formula is:
[0139]
[0140] where \(e(t)\) represents the error between the system output and the desired output; \(t\) is time.
[0141] The smaller the ITAE metric, the better the stability of the system and the faster the dynamic response. The ITAE metric is not sensitive to the initial deviation but is very sensitive to the later deviation. When using the ITAE metric to adjust the controller parameters, the initial deviation in the transient process is relatively large, but as time goes by, the deviation will quickly decrease, which indicates that using the ITAE metric can reduce the adjustment time. Therefore, in practical applications, ITAE is an important performance evaluation metric.
[0142] S24: Randomly generate the PID parameters of the initial search agents according to the value range of the PID parameters.
[0143] According to the number of search agents set in step S22, randomly generate the initial search agents. For example, if the number of search agents is set to 30 in this method, then 30 groups of PID parameters are randomly generated as the initial search agents.
[0144] S25: Calculate the fitness values of the initial search agents according to the fitness function and determine the optimal solution wolf.
[0145] According to the fitness function set in step S23, calculate the fitness values of each group of PID parameters generated initially. Take the group with the smallest fitness value as the optimal solution wolf, that is, set the three groups of PID parameters with the smallest, the second smallest, and the third smallest fitness values as the \(\alpha\) wolf, the \(\beta\) wolf, and the \(\delta\) wolf respectively, and set the other wolves as the \(\omega\) wolf.
[0146] S3: Based on the memory bank and the random local search method, iteratively optimize the grey wolf optimization model to obtain the optimized PID parameters.
[0147] Step S3 includes:
[0148] S31: Construct a memory bank for saving the data of better individual wolves in each iteration process, including the PID parameter values and fitness values.
[0149] The memory bank sets a memory function on the basis of the original grey wolf optimization algorithm, saves the data of better individual wolves in each iteration process, including their positions, fitness values, etc. After each iteration, the wolves with better indicators are updated to the wolf group information in the memory bank to provide data for the random local search.
[0150] Preferably, step S3 includes:
[0151] At the beginning of the iteration, select a certain number of individual wolf data with lower fitness values of the initial search agents and save them into the memory bank.
[0152] S32: When performing the iteration, randomly search for the PID parameter values locally, calculate the fitness values of the PID parameter values at each search point and iteration number according to the fitness function, record and save the minimum fitness value, and update the memory bank and the optimal solution wolf.
[0153] Specifically, the random local search for the PID parameter values includes:
[0154] Randomly select 2 sample wolves from the wolf group with lower fitness values in the memory bank;
[0155] Use the genetic algorithm to generate a local wolf for iterative calculation according to the 2 sample wolves.
[0156] In practical applications, the ways of crossover and mutation can be adopted to generate new local wolves. Crossover is to exchange part of the data of the 2 sample wolves to generate new local wolves, and the crossover operation is the main way to generate new solutions in the genetic algorithm. Mutation is to make a small-probability random change to the new local wolves to increase the diversity of the population, and the mutation operation helps the algorithm to jump out of the local optimal solution and explore a wider solution space.
[0157] S33: Iteratively search for the optimal PID parameters until the maximum number of iterations is reached, and save the optimized PID parameters and the best fitness value.
[0158] Use the improved grey wolf optimization algorithm to obtain the final optimized PID parameters, that is, the optimized proportionality coefficient K p , integral coefficient K i , derivative coefficient K d .
[0159] S4: Input the optimized PID parameters into the PID control system of the MFC.
[0160] In practical applications, this method can be linked with the PID control system of the MFC to automatically calibrate the response time of the PID control.
[0161] Preferably, this method further includes:
[0162] S5: Test whether the response time and control curve of the MFC meet the production requirements. If not, optimize the PID parameters again until the production requirements are met.
[0163] The beneficial effect of this embodiment is that this method also uses the genetic algorithm for random local search, which helps the algorithm jump out of the local optimal solution; it can also optimize the PID parameters multiple times according to the actual production requirements until the requirements are met.
[0164] Embodiment Three
[0165] A PID response time calibration system based on the grey wolf optimization algorithm, based on the PID response time calibration method based on the grey wolf optimization algorithm as described in Embodiment One or Two, includes:
[0166] A model construction module, used to construct a grey wolf optimization model for optimizing PID parameters;
[0167] An initialization module, used to initialize the grey wolf optimization model;
[0168] An iteration module, used to iteratively optimize the grey wolf optimization model based on the memory bank and the random local search method to obtain the optimized PID parameters;
[0169] A control module, used to input the optimized PID parameters into the PID control system of the MFC.
[0170] Preferably, this system further includes:
[0171] An optimization module, used to test whether the response time and control curve of the MFC meet the production requirements. If not, optimize the PID parameters again until the production requirements are met.
[0172] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A PID response time calibration method based on the Grey Wolf Optimization algorithm, characterized in that, It includes the following steps: Construct a grey wolf optimization model for optimizing PID parameters; Initialize the grey wolf optimization model; Based on the memory bank and the random local search method, iteratively optimize the grey wolf optimization model to obtain the optimized PID parameters; Input the optimized PID parameters into the PID control system of MFC; Among them, the initialization of the grey wolf optimization model includes: Set the value range of PID parameters; Set the number of search agents and the maximum number of iterations for grey wolf optimization; Set the fitness function of grey wolf optimization; According to the value range of PID parameters, randomly generate the PID parameters of the initial search agents; Calculate the fitness value of the initial search agents according to the fitness function, and determine the optimal solution wolf; Among them, the setting of the fitness function of grey wolf optimization includes: Construct a fitness function based on the integral of the weighted absolute value of the error of the MFC system time; Among them, the iterative optimization of the grey wolf optimization model based on the memory bank and the random local search method to obtain the optimized PID parameters includes: Construct a memory bank for saving the data of better individual wolves in each iteration process, including PID parameter values and fitness values; During iteration, randomly locally search the PID parameter values, calculate the fitness values of the PID parameter values at each search point and iteration times according to the fitness function, record and save the minimum fitness value, and update the memory bank and the optimal solution wolf; Iteratively search for the optimal PID parameters until the maximum number of iterations is reached, and save the optimized PID parameters and the best fitness value; The PID response time calibration method based on the grey wolf optimization algorithm further includes: Test whether the response time and control curve of MFC meet the production requirements. If not, re-optimize the PID parameters until the production requirements are met.
2. The PID response time calibration method based on the grey wolf optimization algorithm according to claim 1, wherein The PID parameters include: proportionality coefficient, integral coefficient, and derivative coefficient.
3. The PID response time calibration method based on the grey wolf optimization algorithm according to claim 1, wherein The iterative optimization of the grey wolf optimization model based on the memory bank and the random local search method to obtain the optimized PID parameters includes: At the beginning of iteration, select a certain number of individual wolf data with lower fitness values of the initial search agents and save them into the memory bank.
4. The PID response time calibration method based on the grey wolf optimization algorithm according to claim 1, characterized in that The random local search of PID parameter values includes: Randomly select a sample wolf from the wolves with lower fitness values in the memory bank; Find the wolf closest to the sample wolf among other wolves through the Euclidean distance, and randomly generate a local wolf for iterative calculation.
5. The PID response time calibration method based on the grey wolf optimization algorithm according to claim 1, characterized in that, The random local search of PID parameter values also includes: Randomly select 2 sample wolves from the wolves with lower fitness values in the memory bank; Use the genetic algorithm to generate a local wolf for iterative calculation according to the 2 sample wolves.
6. A PID response time calibration system based on the Grey Wolf Optimization algorithm, characterized in that, The PID response time calibration method based on the grey wolf optimization algorithm according to any one of claims 1 to 5 includes: A model construction module for constructing a grey wolf optimization model for optimizing PID parameters; An initialization module for initializing the grey wolf optimization model; An iteration module for iteratively optimizing the grey wolf optimization model based on the memory bank and the random local search method to obtain the optimized PID parameters; A control module for inputting the optimized PID parameters into the PID control system of MFC.
Citation Information
Patent Citations
Classroom temperature and humidity control method for optimizing PID parameters based on grey wolf algorithm
CN114779864A
CO2 enhanced petroleum recovery and underground synchronous storage system for old oil field reutilization
CN119434915A