PLC environmental parameter self-adaptive adjusting system based on swarm intelligence optimization algorithm

By using a PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm, and improving the genetic algorithm and neural network, online adaptive adjustment of PID parameters is achieved, solving the adaptability and stability problems of PLC environmental parameter adjustment system in multiple scenarios, and improving control efficiency and accuracy.

CN122018295APending Publication Date: 2026-05-12NANDA AUTOMATION TECH JIANGSU CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANDA AUTOMATION TECH JIANGSU CO LTD
Filing Date
2026-02-03
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing PLC environmental parameter adjustment systems rely on manual experience, making them difficult to adapt to multiple scenarios, with long debugging cycles, low efficiency, and unstable control performance under complex working conditions, making it difficult to adapt to the time-varying and nonlinear characteristics of the environment.

Method used

A PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm is adopted. The genetic algorithm is improved by combining chaotic mapping strategy, gray wolf optimization algorithm and Lévy flight strategy, and the weights and thresholds of backpropagation neural network are optimized. A three-level collaborative optimization structure of genetic algorithm-neural network-PID is constructed to realize online adaptive adjustment of PID parameters.

Benefits of technology

It significantly shortens the commissioning cycle, improves control accuracy and stability, meets the needs of rapid deployment, and enhances the precision of temperature and humidity control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122018295A_ABST
    Figure CN122018295A_ABST
Patent Text Reader

Abstract

The invention, which relates to the technical field of industrial automation control, discloses a PLC environmental parameter adaptive adjustment system based on a swarm intelligence optimization algorithm, comprising a PLC control module, a genetic algorithm improvement module, a neural network PID setting module, a performance determination and control execution module and a local database. The weight and the threshold value of the back-propagation neural network are globally optimized through the improved genetic algorithm, the optimized back-propagation neural network maps the environmental parameter deviation, the deviation integral and the deviation differential into PID control parameters, a PLC is driven to execute closed-loop adjustment after performance judgment, the environmental parameter control precision and robustness are improved, and the control accuracy and the control robustness are improved. The method can dynamically adapt to the industrial temperature and humidity working conditions with strong time varying and multiple disturbances, overcomes the defects that a traditional fixed parameter PID is tedious in debugging and poor in adaptability, and meets the actual requirements of rapid deployment and fine control of an industrial site.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation control technology, and specifically to a PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm. Background Technology

[0002] In automated control systems, programmable logic controllers (PLCs) are widely used in environmental parameter regulation and process control systems in various industrial settings due to their stable structure, high reliability, and strong adaptability to complex industrial environments. They are particularly suitable for real-time monitoring and control of environmental parameters such as temperature and humidity. In these applications, the PLC typically serves as the core control unit, realizing the acquisition and processing of various environmental parameters and the coordinated control of actuators.

[0003] Existing technologies, such as the invention patent applications related to adaptive adjustment of environmental parameters disclosed in announcement numbers CN120176263A and CN121246514A, have significant shortcomings upon comparison with existing solutions: Existing PLC environmental parameter adjustment mostly employs fixed-parameter PID control, whose parameter settings rely on manual experience or repeated debugging. While suitable for fixed operating conditions, it is difficult to adapt to general-purpose equipment in multiple scenarios, resulting in long debugging cycles and low efficiency. Although improved methods such as fuzzy PID allow for online parameter adjustment, they rely on manually designed fuzzy rules, have poor versatility, lack theoretical guidance for parameter selection, and exhibit unstable control performance under complex operating conditions. Due to significant differences in the controlled objects, operating conditions, and disturbances in industrial settings, fixed PID control is prone to problems such as response lag, increased overshoot, and decreased accuracy when the environment changes. In general-purpose equipment scenarios, repeated debugging is required, hindering its general-purpose and large-scale application. Furthermore, long-term operation requires multiple parameter readjustments, increasing maintenance costs and affecting control consistency. While existing PLC control systems are mature, they struggle to adapt to the time-varying and nonlinear characteristics of environmental objects, necessitating the introduction of adaptive control methods to improve adjustment performance. Summary of the Invention

[0004] To address the aforementioned technical shortcomings, the present invention aims to provide a PLC environmental parameter adaptive adjustment system based on a swarm intelligence optimization algorithm.

[0005] To solve the above technical problems, the present invention adopts the following technical solution: The present invention provides a PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm, including a PLC control module: used to calculate the deviation, integral and derivative of the environmental parameters according to the actual output value of the collected environmental parameters.

[0006] Genetic Algorithm Improvement Module: This module receives system bias data and performs global optimization of the weights and thresholds of the backpropagation neural network using an improved genetic algorithm.

[0007] The neural network PID tuning module is used to map the deviation, integral, and derivative of the calculated environmental parameters into three PID control parameters: proportional constant, integral time constant, and derivative time constant, based on the weights and thresholds of the backpropagation neural network obtained by the improved genetic algorithm.

[0008] Performance determination and control execution module: used to determine PID control parameters and input control values ​​into the PLC temperature and humidity control device to perform adjustment operations.

[0009] The beneficial effects of the present invention are as follows: (1) The first part of the present invention combines the chaotic mapping strategy, the gray wolf optimization algorithm and the Levy flight strategy to improve the traditional genetic algorithm, enhance its population diversity and global search ability, avoid premature convergence and local optimum problems, and adopt the improved genetic algorithm to carry out global optimization of the input layer and hidden layer weights, hidden layer and output layer weights, hidden layer thresholds and output layer thresholds of the backpropagation neural network, thereby improving the learning ability and convergence speed of the neural network.

[0010] (2) The second part of the present invention: The backpropagation neural network with optimized parameters is used for online adaptive tuning of PID controller parameters, and a three-level collaborative optimization structure of genetic algorithm-neural network-PID is constructed. Compared with the traditional PID parameter tuning method that relies on human experience, this method relies on the online learning dynamic characteristics of backpropagation neural network to realize the adaptive adjustment of PID parameters, greatly reducing manual intervention and repeated trial and adjustment process, significantly shortening the debugging cycle, and meeting the needs of rapid deployment in engineering sites.

[0011] (3) The third part of the present invention: The improved genetic algorithm enhances the globality and stability of the backpropagation neural network parameter optimization, enabling the backpropagation neural network to more accurately approach nonlinear characteristics. Under the condition of strong time-varying and disturbance-prone temperature and humidity, the PID parameters can be dynamically adjusted with the change of environmental parameter state, overcoming the problem of insufficient adaptability of traditional fixed parameter PID. The real-time optimization of PID parameters by the backpropagation neural network makes it superior to the traditional PID control strategy in key indicators such as steady-state error, overshoot and settling time, effectively improving the temperature and humidity control accuracy and meeting the needs of refined control. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1This is a schematic diagram of the system modules of the present invention.

[0014] Figure 2 A framework diagram of a PLC environmental parameter adaptive adjustment system.

[0015] Figure 3 This is a flowchart of the genetic algorithm.

[0016] Figure 4 This is a diagram illustrating the update process of the Grey Wolf algorithm.

[0017] Figure 5 The closed-loop diagram of the PID controller for the overall optimization algorithm. Detailed Implementation

[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] Reference Figure 1 As shown, the present invention provides a PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm, including a PLC control module, a genetic algorithm improvement module, a neural network PID tuning module, a performance judgment and control execution module, and a local database.

[0020] It should be noted that the PLC control module is connected to the genetic algorithm improvement module, the genetic algorithm improvement module is connected to the neural network PID tuning module, the neural network PID tuning module is connected to the performance judgment and control execution module, and the local database is connected to the PLC control module, the genetic algorithm improvement module, the neural network PID tuning module, and the performance judgment and control execution module.

[0021] The PLC control module is used to calculate the deviation, integral, and derivative of the environmental parameters based on the actual output values ​​of the collected environmental parameters.

[0022] In a specific embodiment of the present invention, the calculation method for the deviation, integral, and derivative of the environmental parameters is as follows: In each sampling period, based on the current sampling time... Actual output values ​​of environmental parameters and their corresponding settings Calculate the current sampling time The deviation value is The deviation integral term is obtained by summing the deviation value at the current sampling time and the deviation values ​​at all previous sampling times, and the deviation derivative term is obtained by dividing the difference between the deviation value at the current sampling time and the deviation value at the previous sampling time by the sampling period.

[0023] The deviation value, the integral term of the deviation, and the differential term of the deviation together constitute the dynamic feature vector of the environmental parameters, which is used as the input to the subsequent neural network model.

[0024] It should be noted that the calculation of environmental parameter deviation, deviation integral, and deviation derivative are all well-known techniques and standard mathematical definitions in the classic PID proportional-integral-derivative control theory, and will not be elaborated here.

[0025] The genetic algorithm improvement module is used to receive system bias data and perform global optimization of the weights and thresholds of the backpropagation neural network using an improved genetic algorithm.

[0026] Reference Figure 3 As shown, in a specific embodiment of the present invention, the global optimization of the weights and thresholds of the backpropagation neural network by the improved genetic algorithm includes: generating an initial population, calculating the fitness value of each individual in the initial population, screening individuals in the initial population for reproduction, performing crossover operations on the screened individuals for reproduction, and performing mutation operations based on the set mutation probability.

[0027] In a specific embodiment of the present invention, the method for generating the initial population is as follows: based on the number of neurons in the input layer of the backpropagation neural network. Number of neurons in the hidden neural layer and the number of neurons in the output neural layer The total number of optimizations required to obtain the weights and thresholds in the backpropagation neural network is: .

[0028] Furthermore, a real-number encoding method is adopted, and the diversity of the initial solution population is enhanced through the Tent mapping strategy in chaotic mapping. Its expression is: ,in For the first Individual values, These are the mapping coefficients.

[0029] It should be noted that real-number encoding refers to directly incorporating all the connection weights and neuron thresholds—which are originally actual numerical values—into the genetic algorithm when improving it. This results in a sequence composed purely of actual numbers. This encoding method completely avoids the cumbersome process of converting real numbers into binary strings in traditional methods, allowing the algorithm to search and optimize within the real parameter value space from beginning to end. This not only eliminates the accuracy loss caused by encoding conversion but also allows all subsequent steps, including chaotic initialization, crossover operations fused with the Grey Wolf algorithm, and mutation operations introduced by Lévy flight, to directly and efficiently act on the parameters themselves. As a result, the algorithm significantly improves the convergence speed and solution accuracy when searching for the optimal control parameters for the system of this invention.

[0030] It should be noted that for individuals that exceed the upper and lower bounds of the search range, the mapping coefficient is set to the average of the upper and lower bounds, such as 0.4 in the experiment.

[0031] In a specific embodiment of the present invention, the method for calculating the fitness value of each individual in the initialization population is as follows: The fitness value of each individual in the initialization population is calculated according to a fitness calculation function, wherein the fitness calculation function is... ,in, For the sample size, In a genetic algorithm, the first... The location of each individual, which encodes all trainable parameters of the backpropagation neural network, and the number of neurons in the input layer of the backpropagation neural network. Number of neurons in the hidden neural layer and the number of neurons in the output neural layer The trainable parameters include the connection weights between the input layer and the hidden layer. ,in Connection weights between hidden layers and output layers ,in Threshold of hidden layer neurons ,in and the threshold of the output layer neurons ,in , Indicates the first The individual in the first The final training output value in each training sample. Indicates the first The final expected output value of each individual in the same sample.

[0032] It should be noted that the smaller the fitness function value of an individual in the initial population, the smaller the error of the neural network structure represented by that individual when approaching the target function, that is, the better its performance.

[0033] In a specific embodiment of the present invention, the method for selecting individuals for reproduction in the initial population is as follows: The sum of the fitness values ​​of all individuals in the population is obtained based on the fitness value of each individual in the initial population. The probability of each individual in the initial population being selected for reproduction is calculated as follows: Based on this, individuals for reproduction are selected from the initial population using a roulette wheel selection method.

[0034] The principle of the roulette wheel selection method is that the probability of each individual being selected in the initial population is inversely proportional to its fitness value. The smaller the fitness value, the better the performance. That is, the smaller the fitness value, the greater the probability of the individual being selected and the larger the sector it occupies on the simulated roulette wheel. Thus, the probability of being sampled in a random selection is higher. Through this mechanism, the genetic information carried by individuals with excellent performance can be preserved and transmitted with a high probability, while maintaining population diversity for global exploration.

[0035] Reference Figure 4 As shown, in a specific embodiment of the present invention, the method for selecting individuals for breeding and performing crossover is as follows: Using the gray wolf algorithm, three individuals with the best fitness values ​​are selected from the initial population for breeding, and these three individuals are sequentially defined as… , and The remaining individuals are defined as The specific evolutionary process involves updating the positions of three individuals. as well as ,in , and They represent , and and distance, , , , , and For control coefficients, Indicates the first After the second iteration Location, , and They represent the first After the second iteration , and Location, , and These respectively represent being influenced by the alpha wolf. The direction and distance that need to be adjusted Indicates the first After the second iteration The location.

[0036] It should be noted that the Grey Wolf algorithm can quickly find a near-optimal solution through efficient global search and local exploitation. It has a simple and easy-to-implement structure, is not sensitive to the initial solution, and has strong robustness.

[0037] In a specific embodiment of the present invention, the method for performing the mutation operation based on the set mutation probability is as follows: for the new individuals generated after the crossover operation, a portion of these individuals are selected according to the set mutation probability and mutated using the Levy flight strategy, with the position update expression being: ,in Indicates the current iteration number. Indicates the first The individual in the first The position of the next iteration. Scaling factor , and For control parameters, where , , This is the preset maximum number of iterations in the genetic algorithm. In order to be in A random number that is uniformly distributed within an interval.

[0038] It should be noted that the scaling factor controls the jump range of Levi's flight, and the value is set to 0.01.

[0039] It should be noted that the mutation operation can effectively improve the algorithm's global search performance in complex solution spaces by utilizing the guidance information of the alpha wolf and the long-step jump characteristic unique to Levi's flight, while maintaining population diversity.

[0040] The neural network PID tuning module is used to map the deviation, integral, and derivative of the calculated environmental parameters into three PID control parameters: proportional constant, integral time constant, and derivative time constant, based on the weights and thresholds of the backpropagation neural network obtained by the improved genetic algorithm.

[0041] Reference Figure 5 As shown in the specific embodiment of the present invention, the mapping method for calculating the deviation, integral, and derivative of environmental parameters to three PID control parameters—proportional constant, integral time constant, and derivative time constant—is as follows: A backpropagation neural network, optimized by a modified genetic algorithm to adjust weights and thresholds, is used as the mapping model. The deviation, integral, and derivative of environmental parameters are fed as input feature vectors to the input layer of the neural network. These input feature vectors are then processed by the activation functions of the hidden and output layers of the backpropagation neural network to output a set of corresponding PID control parameters, each corresponding to a proportional constant. Integral time constant and differential time constant These are the three PID control parameters.

[0042] It should be noted that when the calculation in the genetic algorithm reaches the maximum number of iterations or is less than the set error, the iterative calculation of the genetic algorithm is stopped, and the weights and thresholds of the backpropagation neural network are obtained.

[0043] It should be noted that the proportional constant determines the strength of the controller's response to the deviation of environmental parameters at the current moment, which directly affects the system's response speed and steady-state control accuracy. The integral time constant determines the strength of the controller's adjustment effect on the integral of the environmental parameter deviation, which is used to eliminate the system's steady-state error. The derivative time constant reflects the controller's ability to predict and dampen the trend of deviation changes, which is used to suppress system overshoot and improve dynamic stability.

[0044] In a specific embodiment of the present invention, the activation functions of both the hidden layer and the output layer of the backpropagation neural network are sigmoid functions, wherein the activation function of the hidden layer is: The output layer activation function is This function can map the input of a neuron to the (0,1) interval, providing the network with nonlinear modeling capabilities.

[0045] The performance determination and control execution module is used to determine the PID control parameters and input the control values ​​into the PLC temperature and humidity control device to perform the adjustment operation.

[0046] Reference Figure 2 As shown, in a specific embodiment of the present invention, the method for determining the PID control parameters and inputting the control values ​​into the PLC temperature and humidity control device to perform the adjustment operation is as follows: based on each sampling time... Actual output values ​​of environmental parameters and their corresponding settings Calculate its performance index as follows When the performance index of the environmental parameters is less than the preset performance threshold, it is determined that the current PID control parameters meet the requirements, the backpropagation neural network learning is stopped, and the proportional constant of the PID control parameters that meet the requirements is changed. Integral time constant and differential time constant The required control value of the PID controller can be obtained through the PID control formula. and the control value Adjust the corresponding actuator in the PLC temperature and humidity control device.

[0047] When the performance index of the environmental parameters is greater than or equal to the preset performance threshold, it is determined that the current PID control parameters do not meet the requirements. Based on the current weights and thresholds of the backpropagation neural network, the parameter optimization and tuning of the genetic algorithm improvement module and the neural network PID tuning module are triggered again.

[0048] It should be noted that in the PLC-based digital control system, the above continuous PID control formula is implemented by discretization, that is, its integral term and derivative term are calculated by the accumulation and difference methods as described above.

[0049] In one specific embodiment, the control value is input into the corresponding actuator in the PLC temperature and humidity control device for adjustment. The specific adjustment method is as follows: the calculated control value is transmitted to the analog output module of the PLC and converted into a standard current or voltage signal. For temperature adjustment, the signal controls the duty cycle of the solid-state relay connected to the heater to adjust the heating power or controls the opening of the electric regulating valve to adjust the cooling medium flow. For humidity adjustment, the signal is transmitted to the power controller of the humidifier to adjust the steam output or to the control unit of the dehumidifier to adjust its operating status.

[0050] It should be noted that the actuator performs physical actions based on the received signals, changing the energy or material flow rate input to the controlled environment, driving the actual values ​​of environmental parameters to approach the set values, and the changes in environmental parameters are detected and fed back in real time by the signal acquisition unit, forming a closed-loop control.

[0051] It should be noted that converting the calculated digital control values ​​into standard current or voltage signals is a crucial physical interface step. This is fundamentally necessary to achieve reliable, accurate, and compatible signal interaction between the PLC digital system and the field analog actuators. The digital control values ​​generated by the PLC's internal processor must undergo digital-to-analog conversion via its analog output module to generate continuous physical signals that can directly drive the actuators. Standard analog signals possess excellent anti-interference capabilities and long-distance transmission stability, effectively resisting complex electromagnetic noise in industrial environments. Most actuators, such as regulating valves, solid-state relays, and frequency converter-driven humidifiers / dehumidifiers, can achieve this. Their control interfaces are all designed to receive such standard analog commands. For example, the converted 4-20mA signal can be directly sent to the solid-state relay controlling the heater to precisely adjust its duty cycle to achieve linear power control, or sent to the positioner of the electric regulating valve to set its opening degree, thereby precisely controlling the flow of cold and hot media. For humidity regulation, the same signal can be received by the power controller of the humidifier or the control unit of the dehumidifier unit to modulate its steam output or compressor operating status respectively. Through this standardized interface, the control strategy output by the PLC can be accurately converted into the physical action of the actuator, ultimately achieving precise, closed-loop regulation of ambient temperature and humidity.

[0052] The examples described in this invention are not limited to the specific embodiments listed above. The examples are merely illustrative to facilitate understanding of the invention and do not constitute a limitation on the scope of protection of this invention. Any modifications, equivalent substitutions, etc., made within the spirit and principles of this invention should be included within the scope of protection.

[0053] The above description is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined in this specification, they should all fall within the protection scope of the present invention.

Claims

1. A PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm, characterized in that, Includes the following modules: PLC control module: used to calculate the deviation, integral and derivative of environmental parameters based on the actual output values ​​of the collected environmental parameters; Genetic Algorithm Improvement Module: This module receives system bias data and performs global optimization of the weights and thresholds of the backpropagation neural network using an improved genetic algorithm. The neural network PID tuning module is used to map the deviation, integral and derivative of the calculated environmental parameters into three PID control parameters: proportional constant, integral time constant and derivative time constant, based on the weights and thresholds of the backpropagation neural network obtained by the improved genetic algorithm. Performance determination and control execution module: used to determine PID control parameters and input control values ​​into the PLC temperature and humidity control device to perform adjustment operations.

2. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 1, characterized in that, The specific calculation methods for the deviation, integral, and derivative of the computational environment parameters are as follows: In each sampling period, based on the current sampling time Actual output values ​​of environmental parameters and their corresponding settings Calculate the current sampling time The deviation value is The deviation integral term is obtained by summing the deviation value at the current sampling time and the deviation values ​​at all previous sampling times, and the deviation derivative term is obtained by dividing the difference between the deviation value at the current sampling time and the deviation value at the previous sampling time by the sampling period.

3. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 2, characterized in that, The improved genetic algorithm is used to globally optimize the weights and thresholds of the backpropagation neural network. Specifically, this includes: generating an initial population, calculating the fitness value of each individual in the initial population, selecting individuals from the initial population for reproduction, performing crossover operations on the selected individuals for reproduction, and performing mutation operations based on the set mutation probability.

4. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 3, characterized in that, The specific method for generating the initial population is as follows: Based on the number of neurons in the input layer of the backpropagation neural network Number of neurons in the hidden neural layer and the number of neurons in the output neural layer The total number of optimizations required to obtain the weights and thresholds in the backpropagation neural network is: ; Furthermore, a real-number encoding method is adopted, and the diversity of the initial solution population is enhanced through the Tent mapping strategy in chaotic mapping. Its expression is: ,in For the first Individual values, These are the mapping coefficients.

5. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 3, characterized in that, The fitness value of each individual in the initial population is calculated as follows: The fitness value of each individual in the initialized population is calculated according to the fitness calculation function, where the fitness calculation function is: ,in, For the sample size, In a genetic algorithm, the first... The location of each individual, which encodes all trainable parameters of the backpropagation neural network, and the number of neurons in the input layer of the backpropagation neural network. Number of neurons in the hidden neural layer and the number of neurons in the output neural layer The trainable parameters include the connection weights between the input layer and the hidden layer. ,in Connection weights between hidden layers and output layers ,in Threshold of hidden layer neurons ,in and the threshold of the output layer neurons ,in , Indicates the first The individual in the first The final training output value in each training sample. Indicates the first The final expected output value of each individual in the same sample.

6. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 3, characterized in that, The specific method for selecting and initializing individuals for reproduction in the population is as follows: The sum of the fitness values ​​of all individuals in the population is obtained by initializing the fitness value of each individual in the population. The probability of each individual in the initial population being selected for reproduction is calculated as follows: Based on this, individuals for reproduction are selected from the initial population using a roulette wheel selection method.

7. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 3, characterized in that, The specific method for selecting individuals for breeding and performing crossover is as follows: The gray wolf algorithm is used to select the three individuals with the best fitness values ​​from the initial population for breeding, and these three individuals are defined as follows: , and The remaining individuals are defined as The specific evolutionary process involves updating the positions of three individuals. as well as ,in , and They represent , and and distance, , , , , and For control coefficients, Indicates the first After the second iteration Location, , and They represent the first After the second iteration , and Location, , and These respectively represent being influenced by the alpha wolf. The direction and distance that need to be adjusted Indicates the first After the second iteration The location.

8. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 3, characterized in that, The specific method for performing mutation operations based on a set mutation probability is as follows: For the new individuals generated through crossover, a subset of these individuals are selected based on a set mutation probability and mutated using the Lévy flight strategy. The position update expression is as follows: ,in Indicates the current iteration number. Indicates the first The individual in the first The position of the next iteration. Scaling factor , and For control parameters, where , , This is the preset maximum number of iterations in the genetic algorithm. In order to be in A random number that is uniformly distributed within an interval.

9. The PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 3, characterized in that, The method for mapping the calculated environmental parameters—deviation, integral, and derivative—to three PID control parameters—proportional constant, integral time constant, and derivative time constant—is as follows: A backpropagation neural network, optimized by a modified genetic algorithm to adjust weights and thresholds, is used as the mapping model. The deviation, integral, and derivative of environmental parameters are fed as input feature vectors to the input layer of the neural network. These input feature vectors are then processed by the activation functions of the hidden and output layers of the backpropagation neural network to output a set of corresponding PID control parameters, each corresponding to a proportional constant. Integral time constant and differential time constant These are the three PID control parameters.

10. A PLC environmental parameter adaptive adjustment system based on swarm intelligence optimization algorithm according to claim 9, characterized in that, The specific method for determining the PID control parameters and inputting the control values ​​into the PLC temperature and humidity control device to perform the adjustment operation is as follows: Based on each sampling time Actual output values ​​of environmental parameters and their corresponding settings Calculate its performance index as follows When the performance index of the environmental parameters is less than the preset performance threshold, it is determined that the current PID control parameters meet the requirements, the backpropagation neural network learning is stopped, and the proportional constant of the PID control parameters that meet the requirements is changed. Integral time constant and differential time constant The required control value of the PID controller can be obtained through the PID control formula. and the control value Adjust the corresponding actuator in the PLC temperature and humidity control device; When the performance index of the environmental parameters is greater than or equal to the preset performance threshold, it is determined that the current PID control parameters do not meet the requirements. Based on the current weights and thresholds of the backpropagation neural network, the parameter optimization and tuning of the genetic algorithm improvement module and the neural network PID tuning module are triggered again.