A two-stage precision temperature control method, system and device

By employing a two-stage precision temperature control method, and combining PSO and WOA-PSO algorithms to optimize the BP neural network and PID controller, the problem of insufficient temperature control speed and accuracy in existing technologies is solved, achieving rapid and high-precision temperature regulation.

CN117707254BActive Publication Date: 2026-07-24WUHAN MICRO ENVIRONMENT CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN MICRO ENVIRONMENT CONTROL TECH CO LTD
Filing Date
2023-12-22
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing temperature control technologies have shortcomings in terms of high precision and high stability. PID control has low precision, and BP-PID and PSO algorithms have problems such as slow convergence speed, long computation time, and easy getting trapped in local optima, making it difficult to achieve fast and high-precision temperature control.

Method used

A two-stage precision temperature control method is adopted. In the initial stage, the PSO algorithm is used to optimize the weights and thresholds of the BP neural network. In the fine-tuning stage, the WOA-PSO hybrid algorithm is used to optimize the PID controller parameters. The heating and cooling control quantities are updated through the two-stage adaptive PID controller, and the temperature regulation is achieved by combining the cooling and heating filtering modules.

Benefits of technology

It improves the speed and accuracy of temperature control, avoids large overshoot in the integral stage and high-frequency oscillation in the derivative stage, and achieves fast and high-precision temperature control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117707254B_ABST
    Figure CN117707254B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of temperature control, and discloses a two-stage precise temperature control method, system and device, the method comprising: using a PSO algorithm to solve a BP neural network to optimize the weight and threshold of the BP neural network; using the optimized BP neural network to optimize and solve the parameters of a PID controller to obtain the first target parameters of the PID controller; using the first target parameters to construct a first adaptive PID controller, if the error between the measured temperature and the target temperature is greater than a preset value, using the first adaptive PID controller to update the control amount of heating and refrigeration until the error between the measured temperature and the target temperature is within the preset range, then executing the following; using the optimal value of the WOA algorithm as the displacement parameter of the PSO algorithm to obtain a PSO-WOA algorithm, to obtain the second target parameters and the second adaptive PID controller; using the second adaptive PID controller to update the control amount of heating and refrigeration to realize temperature regulation. The application can improve the temperature control speed and control precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of temperature control, and more specifically, relates to a two-stage precision temperature control method, system, and device. Background Technology

[0002] Microenvironment purification devices are widely used to provide constant temperature, humidity, and clean environments for semiconductor manufacturing equipment and precision measuring equipment. High-precision and high-stability temperature control is a major technical challenge. Existing high-precision temperature control technologies mostly use conventional PID and BP-PID control algorithms. However, a greenhouse is a complex object with nonlinearity, large time delay, and susceptibility to disturbances. Simply using PID control leads to low control accuracy, and environmental disturbances change over time. If the PID controller uses the same set of parameters indefinitely, temperature stability will be poor.

[0003] Chinese patent CN2021113431782 proposes a BP neural network algorithm based on PID control, which designs an incremental neural network PID controller that continuously adjusts the proportional, integral, and derivative parameters to achieve parameter self-adaptation. BP-PID combines the advantages of adaptive learning in BP neural networks, allowing for online tuning of PID parameters. However, BP neural networks themselves suffer from drawbacks such as slow convergence speed, long computation time, and susceptibility to local optima. Chinese patent application CN202111331871.8 uses the Particle Swarm Optimization (PSO) algorithm to optimize the BP-PID controller, improving the response speed of temperature control, shortening the rise time of the PID temperature control curve, and reducing overshoot and maximum absolute error to some extent. However, the PSO algorithm is prone to premature convergence due to the rapid disappearance of particle diversity, and because it lacks an effective search method, it often cannot guarantee convergence to the global optimum, resulting in low accuracy. Summary of the Invention

[0004] In view of the above-mentioned defects or improvement needs of the prior art, the present invention provides a two-stage precision temperature control method, system and device, which can improve the temperature control speed and control accuracy.

[0005] To achieve the above objectives, according to one aspect of the present invention, a two-stage precision temperature control method is provided, comprising: S1: using the error between the measured temperature and the target temperature and the parameters of a PID controller as inputs to a BP neural network, and employing a PSO algorithm to solve the BP neural network to optimize the weights and thresholds of the BP neural network; S2: using the optimized BP neural network to optimize the PID controller parameters to obtain the first target parameters of the PID controller; S3: constructing a first adaptive PID controller using the first target parameters, the first adaptive PID controller including an integral term with a first coefficient β1 and a derivative term with a second coefficient β2, wherein if the error between the measured temperature and the target temperature is less than or equal to a preset value, the first coefficient β1 is set to 1. The second coefficient β2 is set to 0; if the error between the measured temperature and the target temperature is greater than the preset value, the first coefficient β1 is set to 0, the second coefficient β2 is set to 1, and the first adaptive PID controller is used to update the control quantities for heating and cooling until the error between the measured temperature and the target temperature is within the preset range, then step S4 is executed; S4: the optimal value of the WOA algorithm is used as the displacement parameter of the PSO algorithm to obtain the PSO-WOA algorithm, steps S1 and S2 are repeated to obtain the second target parameter, and the first target parameter in the first adaptive PID controller is replaced with the second target parameter and the second coefficient β2 is set to 0 and the first coefficient β1 is set to 1 to obtain the second adaptive PID controller; S5: the second adaptive PID controller is used to update the control quantities for heating and cooling to achieve temperature regulation.

[0006] Preferably, the fitness function f(X) of the WOA algorithm and the PSO algorithm is... p )for:

[0007]

[0008] Where N is the number of samples, t0 is the target temperature, and t1 is the measured temperature.

[0009] Preferably, in step S1, the PSO algorithm is used to solve the BP neural network to optimize the weights and thresholds of the BP neural network, specifically as follows:

[0010] The PSO algorithm, based on the fitness function, uses the following formula: each particle continuously updates its velocity and displacement parameters, and updates both the individual fitness extreme value and the swarm fitness extreme value, where XpBest and XgBest are the optimal positions of the particle and the particle swarm, respectively, and the components of XgBest are the globally optimal values ​​of the parameters and threshold of the BP neural network.

[0011] v p (r+1)=k*v p (r)+c1q1(XpBest i-x p )+c2q2(XgBest-x p )

[0012] X p (r+1)=x p (r)+v p (r+1)

[0013] Among them, v p (r+1) represents the velocity parameter of the p-th particle in the (r+1)-th iteration, k is the particle weight, c1 and c2 are learning coefficients, q1 and q2 are random numbers between [0,1], r is the iteration number, and X... p (r+1) is the displacement parameter of the p-th particle in the (r+1)-th iteration.

[0014] Preferably, the activation function of the output layer neurons of the BP neural network is a non-negative Sigmoid function, while the hidden layer uses a symmetric Sigmoid function tanh(x).

[0015] Preferably, step S2 uses an optimized BP neural network to optimize and solve the PID controller parameters to obtain the first target parameters of the PID controller. The specific steps are as follows:

[0016] (1) Build a BP neural network using the optimized neural network parameters in step S2. The neural network parameters include the weight parameter u between the input layer and the hidden layer, the weight parameter v between the hidden layer and the output layer, the hidden layer threshold ω, and the output layer threshold θ.

[0017] (2) The measured temperature value, target temperature value, temperature deviation and initial value of the first target parameter of PID control are preprocessed, that is, normalized to the value in the interval (0, 1). After preprocessing, the training data of the BP neural network model is obtained.

[0018] (3) Train the BP neural network model using the training data. The output of the BP neural network model is the updated first objective parameter k of the PID controller. p k i and k d .

[0019] Preferably, the first fitness PID controller is:

[0020] Δu(u)=k p [e(k)-e(k-1)]+β1k i e(k)+β2k d [e(k)-2e(k-1)+e(k-2)]

[0021] Where Δu(k) is the control change of the refrigeration or heating module, and kp k i and k d α is the first target parameter; e(k), e(k-1), and α(k-2) are the errors between the measured temperature and the target temperature at times k, k-1, and k-2, respectively.

[0022] A second aspect of this application provides a two-stage precision temperature control system, the system comprising:

[0023] Solving module: Used to take the error between the measured temperature and the target temperature and the PID controller parameters as input to the BP neural network, and use the PSO algorithm to solve the BP neural network to optimize the weights and thresholds of the BP neural network;

[0024] The first acquisition module is used to optimize and solve the PID controller parameters using an optimized BP neural network to obtain the first target parameters of the PID controller.

[0025] Construction module: used to construct a first adaptive PID controller using the first target parameters. The first adaptive PID controller includes an integral term with a first coefficient β1 and a derivative term with a second coefficient β2. If the error between the measured temperature and the target temperature is less than or equal to a preset value, the first coefficient β1 is set to 1 and the second coefficient β2 is set to 0. If the error between the measured temperature and the target temperature is greater than the preset value, the first coefficient β1 is set to 0 and the second coefficient β2 is set to 1. The first adaptive PID controller is used to update the control quantities for heating and cooling until the error between the measured temperature and the target temperature is within a preset range. Then, step S4 is executed.

[0026] The second acquisition module is used to obtain the PSO-WOA algorithm by using the optimal value of the WOA algorithm as the displacement parameter of the PSO algorithm, repeating steps S1 and S2 to obtain the second target parameter, replacing the first target parameter in the first adaptive PID controller with the second target parameter, setting the second coefficient β2 to 0 and the first coefficient β1 to 1, and obtaining the second adaptive PID controller.

[0027] Temperature regulation module: used to update the control quantities for heating and cooling using the second adaptive PID controller to achieve temperature regulation.

[0028] Preferably, the fitness function f(X) of the WOA algorithm and the PSO algorithm is... p )for:

[0029]

[0030] Where N is the number of samples, t0 is the target temperature, and t1 is the measured temperature.

[0031] Preferably, the PSO algorithm is used in the solution module to solve the BP neural network to optimize the weights and thresholds of the BP neural network, specifically as follows:

[0032] The PSO algorithm, based on the fitness function, uses the following formula: each particle continuously updates its velocity and displacement parameters, and updates both the individual fitness extreme value and the swarm fitness extreme value, where XpBest and XgBest are the optimal positions of the particle and the particle swarm, respectively, and the components of XgBest are the globally optimal values ​​of the parameters and threshold of the BP neural network.

[0033] v p (r+1)=k*v p (r)+c1q1(XpBest i -x p )+c2q2(XgBest-x p )

[0034] X p (r+1)=x p (r)+v p (r+1)

[0035] Among them, v p (r+1) represents the velocity parameter of the p-th particle in the (r+1)-th iteration, k is the particle weight, c1 and c2 are learning coefficients, q1 and q2 are random numbers between [0,1], r is the iteration number, and X... p (r+1) is the displacement parameter of the p-th particle in the (r+1)-th iteration.

[0036] A third aspect of this application provides an apparatus for implementing the above-described two-stage precision temperature control method, comprising a refrigeration module and a heating and filtering module, wherein: the refrigeration module includes a compressor, a condenser, and a temperature sensor, and the PID controller is used to control the compressor; the heating and filtering module includes a pipe heater, a filter water tank, and a temperature sensor, and the PID controller controls the pipe heater.

[0037] In summary, compared with the prior art, the two-stage precision temperature control method, system, and device provided by the present invention have the following advantages:

[0038] 1. This application adopts a two-stage temperature control method, with different adaptive temperature control algorithms used in each stage. In the initial stage, under large temperature deviation conditions, the PSO particle swarm algorithm with fast convergence speed and simple calculation is used to update the weights and thresholds of the BP neural network. In the small temperature deviation conditions, the WOA-PSO hybrid algorithm with high steady-state accuracy is used to update the weights and thresholds of the BP neural network, thereby improving both the control speed and the temperature control accuracy.

[0039] 2. Introduce two adjustment coefficients to the PID controller, so that the integral component is shielded during the coarse adjustment stage to avoid large overshoot caused by integral accumulation; and the derivative component is shielded during the fine adjustment stage to avoid high-frequency oscillation and improve temperature control accuracy.

[0040] 3. The high steady-state accuracy WOA-PSO hybrid algorithm used in the fine-tuning stage is as follows: when PSO updates the global optimum from the local optimum of the particle, the optimal value wBest obtained by WOA iteration is added to update the global optimum, thereby improving the steady-state accuracy.

[0041] 4. The two-stage temperature control device of this application includes two modules: refrigeration and heating filtering. The refrigeration module adopts an evaporative compression refrigeration circuit, and the heating filtering module adopts a combination of pipe heater and heat capacity filter. The two modules in the two stages are controlled by different adaptive algorithms, which can achieve the two purposes of fast adjustment speed and high temperature control accuracy, respectively. Attached Figure Description

[0042] Figure 1 This is a flowchart of the two-stage precision temperature control method of this application;

[0043] Figure 2 This is a schematic diagram of the precision temperature control device at this stage of the application.

[0044] Figure 3 This is a schematic diagram of the refrigeration module control principle of the precision temperature control device at this stage of the application.

[0045] Figure 4 This is a schematic diagram of the heating module control principle of the precision temperature control device in this application stage. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0047] This invention provides a two-stage precision temperature control method, in which different adaptive temperature control algorithms are used in each stage, such as... Figure 1 As shown, the method takes into account both the adjustment speed in the early stage of temperature control and the temperature stability and accuracy in the later stage of temperature control. The method mainly includes the following steps S1 to S5.

[0048] S1: The error between the measured temperature and the target temperature and the PID controller parameters are used as inputs to the BP neural network. The PSO algorithm is used to solve the BP neural network to optimize the weights and thresholds of the BP neural network.

[0049] Given a BP neural network with n, l, and m neurons in the input, hidden, and output layers respectively, and input sample X, output value Y, and hidden layer neurons Z respectively:

[0050] X = [x0, x1, ... x i ,...x n ] T

[0051] Y = [y0, y1, ... y j ,...y m ] T

[0052] Z = [z0, z1, ... z] k ,...z l ] T

[0053] The input to the BP neural network is the error e(k) between the measured temperature and the target temperature, and the parameters of the PID controller before the update. The output layer outputs the parameters of the updated PID controller. In this embodiment, n=4 and m=3. Let the indices of a neuron in the input layer, hidden layer, and output layer be i, j, and k, respectively. Then, the parameter that the PSO algorithm needs to optimize is the weight parameter u between the input layer and the hidden layer of the BP neural network. ik The weight parameter v between the hidden layer and the output layer kj Hidden layer threshold ω k Output layer threshold θ j The number of particles to be solved is N = (n+1)×l + (l+1)×m. Using these as the displacement components of the particles in the PSO algorithm to determine the size of the particle swarm, the displacement of the p-th particle can be expressed as:

[0054] X p =(x p0 ,x p1 ,x p2 ,...,x pn )

[0055] =(u 11 ,u 12 ,...,v 11 ,v 12 ,...,ω1,ω2,...ω l ,θ1,θ2,...,θ m )

[0056] The fitness function f(X) in the optimization process of the PSO algorithm p )for:

[0057]

[0058] Where N is the number of samples, t0 is the target temperature, and t1 is the measured temperature.

[0059] The PSO algorithm, based on the fitness function, uses the following formulas (2) and (3) to continuously update the particle velocity and displacement parameters of each particle, and to update the individual fitness extreme value and the group fitness extreme value. Here, XpBest and XgBest are the optimal positions of the particle and the particle swarm, respectively, and each component of XgBest is the global optimal value of the parameters and threshold of the BP neural network.

[0060] v p (r+1)=k*v p (r)+c1q1(XpBest i -x p )+c2q2(XgBest-x p (2)

[0061] X p (r+1)=x p (r)+v p (r+1) (3)

[0062] Among them, v p (r+1) represents the velocity parameter of the p-th particle in the (r+1)-th iteration, k is the particle weight, c1 and c2 are learning coefficients, q1 and q2 are random numbers between [0,1], r is the iteration number, and X... p (r+1) is the displacement parameter of the p-th particle in the (r+1)-th iteration. The iteration stops when the maximum number of iterations is reached or the error is less than the set error.

[0063] S2: The optimized BP neural network is used to optimize and solve the PID controller parameters to obtain the first target parameters of the PID controller.

[0064] Step S2 uses an optimized BP neural network to optimize and solve the PID controller parameters, obtaining the first target parameters of the PID controller. The specific steps are as follows:

[0065] (1) A BP neural network is constructed using the neural network parameters optimized in step S2. The neural network parameters include the weight parameter u between the input layer and the hidden layer, the weight parameter v between the hidden layer and the output layer, the hidden layer threshold ω, and the output layer threshold θ.

[0066] (2) The measured temperature value, target temperature value, temperature deviation and initial value of the first target parameter of PID control are preprocessed, that is, normalized to the value in the interval (0, 1). After preprocessing, the training data of the BP neural network model is obtained.

[0067] (3) Train the BP neural network model using the training data. The output of the BP neural network model is the updated first objective parameter k of the PID controller. p k i and k d .

[0068] Solving the PID control parameter k using a BP neural network p k i k d The optimal value is determined by the fact that the output cannot be negative. Therefore, the activation function of the output layer neurons is a non-negative Sigmoid function, while the hidden layer uses a symmetric Sigmoid function tanh(x).

[0069] S3: Construct a first adaptive PID controller using the first target parameters. The first adaptive PID controller includes an integral term with a first coefficient β1 and a derivative term with a second coefficient β2. If the error between the measured temperature and the target temperature is less than or equal to a preset value, then the first coefficient β1 is set to 1 and the second coefficient β2 is set to 0. If the error between the measured temperature and the target temperature is greater than the preset value, then the first coefficient β1 is set to 0 and the second coefficient β2 is set to 1. Update the control quantities for heating and cooling using the first adaptive PID controller until the error between the measured temperature and the target temperature is within the preset range, then execute step S4.

[0070] The first fitness PID controller is:

[0071] Δu(k)=k p [e(k)-e(k-1)]+β1k i e(k)+β2k d [e(k)-2e(k-1)+e(k-2)]

[0072] Where Δu(k) is the control change of the refrigeration or heating module, and k p k i and k d Let be the first target parameter; e(k), e(k-1), and e(k-2) are the errors between the measured temperature and the target temperature at times k, k-1, and k-2, respectively. The values ​​of coefficients β1 and β2 are as follows:

[0073]

[0074] Based on the actual situation, a threshold ε>0 is manually set. In stage S1, the deviation e(k) is relatively large, and β1 is 0, thus shielding the integral stage to prevent integral accumulation in PID calculations and avoid large overshoot in the system. When the controlled liquid continuously enters the target temperature range of ±300 mK for 10 minutes, the system enters the S4 fine-tuning stage.

[0075] S4: Using the optimal value of the WOA algorithm as the displacement parameter of the PSO algorithm, the PSO-WOA algorithm is obtained. Steps S1 and S2 are repeated to obtain the second objective parameter. The first objective parameter in the first adaptive PID controller is replaced with the second objective parameter, and the second coefficient β2 is set to 0 and the first coefficient β1 is set to 1 to obtain the second adaptive PID controller.

[0076] In this step, the PSO algorithm is enhanced by adding the WOA algorithm as an enhancement to the S1 stage, thereby improving the global optimization ability of the optimization algorithm and thus improving the temperature control accuracy. Specifically, the optimal value wBest obtained by WOA is added to equation (2) to obtain the PSO-WOA algorithm: v i (r+1)=k*v i (r)+c1t1(wBest i -x i )+c2t2(gBest-x i (6)

[0077] X p (r+1)=x p (r)+v p (r+1) (7)

[0078] The global optimal solution displacement vector X obtained by combining the PSO-WOA algorithm of wBest is the global optimal value of the parameters u, v, ω, θ of the S4 stage BP neural network.

[0079] In the process of solving the displacement variable wBest using the WOA algorithm, its optimization metric, i.e., the fitness function, is also expressed as equation (1), obtained from the target temperature t0 and the sensor-measured temperature t1. The specific solution process of the WOA algorithm can be divided into two stages: random prey search and spiral predation, involving the following formulas:

[0080] D = |C × Q * (f)-Q(f)| (8)

[0081] Q(f+1)= Q * (f)-A×D (9)

[0082]

[0083] C = 2 × w (11)

[0084] Where f is the current iteration number, which is the same as the PSO algorithm iteration number, Q is the current whale position, Q* is the current optimal whale position, A and C are coefficients calculated by equations (10) and (11), f_Max is the maximum iteration number, a decreases from 2 to 0 as the iteration number decreases, and w is a random number between [0,1]. In order to increase the global search capability of the algorithm, when the value of A is outside [-1,1], the algorithm is in the exploration phase and will randomly select individual whales in the whale population for position updates. Equations (8) and (9) will become:

[0085] D = |C × Q rand -Q(f)| (12)

[0086] Q(f+1) = Q rand -A×D (13)

[0087] The specific steps for solving WOA are as follows: calculate A according to formula (10) and generate a random number d. Update the position according to the values ​​of d and |A|. If d < 0.5 and |A| < 1, then update the position according to formula (9); if d < 0.5 and |A| ≥ 1, then randomly select a whale individual Q from the population. rand The position is updated according to formula (13); if d≥0.5, the position is updated according to formula (15). When the iteration stops, the displacement variable Q(t) is the desired wBest.

[0088]

[0089] Where, D′=|Q * (f)-Q(f)| represents the distance between the current whale position and the optimal position, b is the logarithmic spiral shape constant, and l is a random number in [-1, 1].

[0090] The PSO-WOA algorithm repeats steps S1 and S2 to obtain the second target parameter. The first target parameter in the first adaptive PID controller is then replaced with the second target parameter, and the second coefficient β2 is set to 0, while the first coefficient β1 is set to 1. This effectively masks the derivative element, thus avoiding high-frequency oscillations and improving temperature stability, resulting in the second adaptive PID controller. S5: The second adaptive PID controller is used to update the control quantities for heating and cooling to achieve temperature regulation.

[0091] When the controlled liquid continuously enters the target temperature range of ±10mK for 10 minutes, the system reaches the target control accuracy. After that, the temperature control algorithm continues to use the method of the S2 stage. When there is interference input from the external environment, the PID parameters are tuned online and the control quantities of the refrigeration and heating modules are updated to stabilize the temperature of the controlled liquid within the range of ±10mK.

[0092] A second aspect of this application provides a two-stage precision temperature control system, the system comprising:

[0093] Solving module: Used to take the error between the measured temperature and the target temperature and the PID controller parameters as input to the BP neural network, and use the PSO algorithm to solve the BP neural network to optimize the weights and thresholds of the BP neural network;

[0094] The first acquisition module is used to optimize and solve the PID controller parameters using an optimized BP neural network to obtain the first target parameters of the PID controller.

[0095] Construction module: used to construct a first adaptive PID controller using the first target parameters. The first adaptive PID controller includes an integral term with a first coefficient β1 and a derivative term with a second coefficient β2. If the error between the measured temperature and the target temperature is less than or equal to a preset value, the first coefficient β1 is set to 1 and the second coefficient β2 is set to 0. If the error between the measured temperature and the target temperature is greater than the preset value, the first coefficient β1 is set to 0 and the second coefficient β2 is set to 1. The first adaptive PID controller is used to update the control quantities for heating and cooling until the error between the measured temperature and the target temperature is within a preset range. Then, step S4 is executed.

[0096] The second acquisition module is used to obtain the PSO-WOA algorithm by using the optimal value of the WOA algorithm as the displacement parameter of the PSO algorithm, repeating steps S1 and S2 to obtain the second target parameter, replacing the first target parameter in the first adaptive PID controller with the second target parameter, setting the second coefficient β2 to 0 and the first coefficient β1 to 1, and obtaining the second adaptive PID controller.

[0097] Temperature regulation module: used to update the control quantities for heating and cooling using the second adaptive PID controller to achieve temperature regulation.

[0098] In a further preferred embodiment, the fitness function f(X) of the WOA algorithm and the PSO algorithm p )for:

[0099]

[0100] Where N is the number of samples, t0 is the target temperature, and t1 is the measured temperature.

[0101] In a further preferred embodiment, the PSO algorithm is used in the solution module to solve the BP neural network to optimize the weights and thresholds of the BP neural network, specifically as follows:

[0102] The PSO algorithm, based on the fitness function, uses the following formula: each particle continuously updates its velocity and displacement parameters, and updates both the individual fitness extreme value and the swarm fitness extreme value, where XpBest and XgBest are the optimal positions of the particle and the particle swarm, respectively, and the components of XgBest are the globally optimal values ​​of the parameters and threshold of the BP neural network.

[0103] v p (r+1)=k*v p (r)+c1q1(XpBest i -x p )+C2q2(XgBest-x p )

[0104] X p (r+1)=x p (r)+v p (r+1)

[0105] Among them, v p (r+1) represents the velocity parameter of the p-th particle in the (r+1)-th iteration, k is the particle weight, c1 and c2 are learning coefficients, q1 and q2 are random numbers between [0,1], r is the iteration number, and X... p (r+1) is the displacement parameter of the p-th particle in the (r+1)-th iteration.

[0106] A third aspect of this application provides a temperature control device for implementing the above-described two-stage precision temperature control method, such as... Figures 2-4 As shown, it includes two modules: cooling and heating / filtering.

[0107] The refrigeration module is a vapor compression refrigeration circuit, including a compressor, condenser, axial fan, dryer filter, thermostatic expansion valve, solenoid valve, evaporator, and temperature sensor. The circulating water circuit connects to the heating module after passing through the refrigeration module. The temperature sensor is located at the heater inlet, and the measured value is T2. The compressor frequency is corrected based on the deviation between T2 and the heater inlet setpoint, combined with the aforementioned adaptive algorithm.

[0108] The heating and filtering module includes a pipe-type heater, a filter water tank, and temperature sensors. Temperature sensors are installed at the heater outlet and the filter water tank outlet, with measured values ​​of T3 and T4 respectively. The heater setpoint is corrected by the deviation between the filter water tank outlet temperature T4 and the target temperature T4S, combined with the aforementioned adaptive algorithm. Because the introduction of a large-capacity filter water tank lengthens the circulating water path and increases inertia, an inner loop is introduced. The deviation between the heater outlet temperature T3 and the heater setpoint temperature T3S is used to adjust the heater current setpoint, suppressing input disturbances in advance and improving control accuracy.

[0109] At the beginning of stage S1, if the measured value T2 at the heater inlet is less than the target temperature, the cooling module is disabled, and only the heating module, in conjunction with the adaptive algorithm, heats the circulating water circuit. If the measured value T3 at the heater outlet is greater than the target temperature, the heating module is disabled, and only the cooling module, in conjunction with the adaptive algorithm, cools the circulating water circuit.

[0110] In stages S4 and S5, to achieve higher temperature control accuracy, the cooling and heating modules work simultaneously on the circulating water circuit.

[0111] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A two-stage precision temperature control method, characterized in that, The methods include: S1: The error between the measured temperature and the target temperature and the PID controller parameters are used as inputs to the BP neural network. The PSO algorithm is used to solve the BP neural network to optimize the weights and thresholds of the BP neural network. S2: The optimized BP neural network is used to optimize and solve the PID controller parameters to obtain the first target parameters of the PID controller; S3: Construct a first adaptive PID controller using the first target parameters. The first adaptive PID controller includes a first coefficient... The integral terms with coefficients and the second coefficient For the differential term of the coefficient, if the error between the measured temperature and the target temperature is less than or equal to the preset value, then the first coefficient... Set to 1, second coefficient Set to 0; if the error between the measured temperature and the target temperature is greater than the preset value, then the first coefficient... Set to 0, second coefficient Set the value to 1, and use the first adaptive PID controller to update the control quantities for heating and cooling until the error between the measured temperature and the target temperature is within the preset range, then execute step S4; S4: Using the optimal value of the WOA algorithm as the displacement parameter of the PSO algorithm, obtain the PSO-WOA algorithm. Repeat steps S1 and S2 to obtain the second objective parameter, and replace the first objective parameter in the first adaptive PID controller with the second objective parameter and adjust the second coefficient. Set to 0, first coefficient Set to 1 to obtain the second adaptive PID controller; S5: The second adaptive PID controller is used to update the control quantities for heating and cooling to achieve temperature regulation; The first adaptive PID controller is: in, For controlling the change in the amount of cooling or heating module, , and The first target parameter; , , These represent the deviations between the measured temperature and the target temperature at times k, k-1, and k-2, respectively.

2. The method according to claim 1, characterized in that, The fitness functions of the WOA algorithm and the PSO algorithm for: Where N is the number of samples, For the target temperature, This is the measured temperature.

3. The method according to claim 2, characterized in that, In step S1, the PSO algorithm is used to solve the BP neural network to optimize the weights and thresholds of the BP neural network. Specifically, the steps are as follows: The PSO algorithm, based on the fitness function, uses the following formula to continuously update the particle velocity and displacement parameters for each particle, and also updates the individual fitness extreme value and the group fitness extreme value, wherein... XpBest and XgBest These represent the optimal positions for the particle and the particle swarm, respectively. The components of XgBest are the global optimal values ​​of the parameters and threshold of the BP neural network. in, Let be the velocity parameter of the p-th particle in the (r+1)-th iteration. For particle weights, and The learning coefficient, and Let r be a random number between [0,1], and r be the number of iterations. Let be the displacement parameter of the p-th particle in the (r+1)-th iteration.

4. The method according to claim 1 or 3, characterized in that, The activation function of the output layer neurons of the BP neural network is a non-negative Sigmoid function, while the hidden layer uses a symmetric Sigmoid function tanh(x).

5. The method according to claim 1, characterized in that, Step S2 uses an optimized BP neural network to optimize and solve the PID controller parameters, obtaining the first target parameters of the PID controller. The specific steps are as follows: (1) Construct a BP neural network using the optimized neural network parameters from step S2. The neural network parameters include the weight parameters u between the input layer and the hidden layer, and the weight parameters u between the hidden layer and the output layer. Hidden layer threshold Output layer threshold ; (2) The measured temperature value, target temperature value, temperature deviation and initial value of the first target parameter of PID control are preprocessed, that is, normalized to the value in the interval (0,1). After preprocessing, the training data of the BP neural network model is obtained. (3) Train the BP neural network model with the training data. The output of the BP neural network model is the first target parameter of the updated PID controller. , and .

6. A two-stage precision temperature control system, characterized in that, The system includes: Solving module: Used to take the error between the measured temperature and the target temperature and the PID controller parameters as input to the BP neural network, and use the PSO algorithm to solve the BP neural network to optimize the weights and thresholds of the BP neural network; The first acquisition module is used to optimize and solve the PID controller parameters using an optimized BP neural network to obtain the first target parameters of the PID controller. Construction module: used to construct a first adaptive PID controller using the first target parameters, the first adaptive PID controller comprising a first coefficient The integral terms with coefficients and the second coefficient For the differential term of the coefficient, if the error between the measured temperature and the target temperature is less than or equal to the preset value, then the first coefficient... Set to 1, second coefficient Set to 0; if the error between the measured temperature and the target temperature is greater than the preset value, then the first coefficient... Set to 0, second coefficient Set the value to 1, and use the first adaptive PID controller to update the control quantities for heating and cooling until the error between the measured temperature and the target temperature is within the preset range, then execute step S4; The second acquisition module is used to obtain the PSO-WOA algorithm by using the optimal value of the WOA algorithm as the displacement parameter of the PSO algorithm. Steps S1 and S2 are repeated to obtain the second target parameter. The first target parameter in the first adaptive PID controller is then replaced with the second target parameter, and the second coefficient is adjusted. Set to 0, first coefficient Set to 1 to obtain the second adaptive PID controller; Temperature regulation module: used to update the control quantities for heating and cooling using the second adaptive PID controller to achieve temperature regulation; The first adaptive PID controller is: in, For controlling the change in the amount of cooling or heating module, , and The first target parameter; , , These represent the deviations between the measured temperature and the target temperature at times k, k-1, and k-2, respectively.

7. The system according to claim 6, characterized in that, The fitness functions of the WOA algorithm and the PSO algorithm for: Where N is the number of samples, For the target temperature, This is the measured temperature.

8. The system according to claim 7, characterized in that, The solution module uses the PSO algorithm to solve the BP neural network to optimize the weights and thresholds of the BP neural network. Specifically: The PSO algorithm, based on the fitness function, uses the following formula to continuously update the particle velocity and displacement parameters for each particle, and also updates the individual fitness extreme value and the group fitness extreme value, wherein... XpBest and XgBest These represent the optimal positions for the particle and the particle swarm, respectively. The components of XgBest are the global optimal values ​​of the parameters and threshold of the BP neural network. in, Let be the velocity parameter of the p-th particle in the (r+1)-th iteration. For particle weights, and The learning coefficient, and Let r be a random number between [0,1], and r be the number of iterations. Let be the displacement parameter of the p-th particle in the (r+1)-th iteration.

9. An apparatus for implementing the two-stage precision temperature control method according to any one of claims 1 to 5, characterized in that, It includes a cooling module and a heating filter module, wherein: The refrigeration module includes a compressor, a condenser, and a temperature sensor, and the PID controller is used to control the compressor; the heating and filtering module includes a pipe heater, a filter water tank, and a temperature sensor, and the PID controller controls the pipe heater.