원시데이터 수집 시스템
선정목록으로

Adaptive control for circulating cooling water system using deep reinforcement learning

관련 수소연료전지 · (5) 연료전지용 수분제어장치(가습기)

기본 정보

저자
  1. Jin Xu — School of Artificial Intelligence, Shenyang Aerospace University, Liaoning, China
  2. Han Li — School of Artificial Intelligence, Shenyang Aerospace University, Liaoning, China
  3. Qingxin Zhang — School of Artificial Intelligence, Shenyang Aerospace University, Liaoning, China
DOI
10.1371/journal.pone.0307767
저널
PLoS ONE
발행년도
2024
발행기관
Public Library of Science
피인용수
2
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1371/journal.pone.0307767
토픽
Fuel Cells and Related Materials
OpenAlex ID
W4400934912

평가 내용

관련도
관련
사업분야
수소연료전지 · (5) 연료전지용 수분제어장치(가습기)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > 연료전지용 수분제어장치(가습기)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Due to the complex internal working process of circulating cooling water systems, most traditional control methods struggle to achieve stable and precise control. Therefore, this paper presents a novel adaptive control structure for the Twin Delayed Deep Deterministic Policy Gradient algorithm, which is based on a reference trajectory model (TD3-RTM). The structure is based on the Markov decision process of the recirculating cooling water system. Initially, the TD3 algorithm is employed to construct a deep reinforcement learning agent. Subsequently, a state space is selected, and a dense reward function is designed, considering the multivariable characteristics of the recirculating cooling water system. The agent updates its network based on different reward values obtained through interactions with the system, thereby gradually aligning the action values with the optimal policy. The TD3-RTM method introduces a reference trajectory model to accelerate the convergence speed of the agent and reduce oscillations and instability in the control system. Subsequently, simulation experiments were conducted in MATLAB/Simulink. The results show that compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively. In addition, the overshooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3.

본문 56,008자

본문 펼치기
# PLOS ONE ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0307767&domain=pdf&date_stamp=2024-07-24)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0307767&domain=pdf&date_stamp=2024-07-24)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0307767&domain=pdf&date_stamp=2024-07-24)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0307767&domain=pdf&date_stamp=2024-07-24)</u>~~ ~~<u>[a1111111111](http://crossmark.crossref.org/dialog/?doi=10.1371/journal.pone.0307767&domain=pdf&date_stamp=2024-07-24)</u>~~ OPEN ACCESS Citation: Xu J, Li H, Zhang Q (2024) Adaptive control for circulating cooling water system using deep reinforcement learning. PLoS ONE 19(7): [e0307767. https://doi.org/10.1371/journal.](https://doi.org/10.1371/journal.pone.0307767) [pone.0307767](https://doi.org/10.1371/journal.pone.0307767) Editor: Lalit Chandra Saikia, National Institute of Technology Silchar, India, INDIA Received: August 4, 2023 Accepted: July 10, 2024 Published: July 24, 2024 Peer Review History: PLOS recognizes the benefits of transparency in the peer review process; therefore, we enable the publication of all of the content of peer review and author responses alongside final, published articles. The editorial history of this article is available here: [https://doi.org/10.1371/journal.pone.0307767](https://doi.org/10.1371/journal.pone.0307767) Copyright: © 2024 Xu et al. This is an open access [article distributed under the terms of the Creative](http://creativecommons.org/licenses/by/4.0/) [Commons Attribution License, which permits](http://creativecommons.org/licenses/by/4.0/) unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Data Availability Statement: All relevant data are within the manuscript and its Supporting Information files. Funding: The author(s) received no specific funding for this work. RESEARCH ARTICLE ## Adaptive control for circulating cooling water system using deep reinforcement learning Jin Xu <sup>☯</sup> , Han Li <sup>☯</sup> [, Qingxin ZhangID*](https://orcid.org/0009-0003-9178-4612) <sup>☯</sup> School of Artificial Intelligence, Shenyang Aerospace University, Liaoning, China ☯ These authors contributed equally to this work. - zhy9712_sau@163.com ### Abstract Due to the complex internal working process of circulating cooling water systems, most tra ditional control methods struggle to achieve stable and precise control. Therefore, this paper presents a novel adaptive control structure for the Twin Delayed Deep Deterministic Policy Gradient algorithm, which is based on a reference trajectory model (TD3-RTM). The structure is based on the Markov decision process of the recirculating cooling water system. Initially, the TD3 algorithm is employed to construct a deep reinforcement learning agent. Subsequently, a state space is selected, and a dense reward function is designed, consider ing the multivariable characteristics of the recirculating cooling water system. The agent updates its network based on different reward values obtained through interactions with the system, thereby gradually aligning the action values with the optimal policy. The TD3-RTM method introduces a reference trajectory model to accelerate the convergence speed of the agent and reduce oscillations and instability in the control system. Subsequently, simulation experiments were conducted in MATLAB/Simulink. The results show that compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively. In addition, the over shooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3. 1 Introduction In the production process of many industrial sectors, a large amount of waste heat will be generated. Currently, it is necessary to use cold water or other liquids to absorb the heat in time to ensure the regular operation of the production process. The cold water used in this process is called cooling water in industrial production. To save water resources and reduce energy costs, consider recycling industrial cooling water to form a circulating cooling water system. With the continuous development of modern industry, as an essential cooling method in industrial production, circulating cooling water system is widely used in various production processes, [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 1 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning Competing interests: The authors have declared that no competing interests exist. such as pharmaceutical, electric power, chemical, metallurgy, Marine engine, etc. Optimizing circulating cooling water system control can improve industrial production efficiency and reduce energy consumption and maintenance costs. Therefore, in controlling circulating cooling water systems, the study of achieving efficient control has become an important topic. At present, the control methods employed in circulating cooling water systems are predominantly based on traditional PID control [1,2], fuzzy control [3–5] model predictive control (MPC) [6,7], intelligent optimization algorithms [8–10] and other traditional methods. For example, Xia et al. [11] proposed the use of a PID controller and a fuzzy PID controller as the control strategy for the temperature controller of the circulating cooling water system in a fuel cell engine. This approach resulted in a notable reduction in temperature fluctuations during the water temperature mixing process. Terzi et al. [12] proposed the use of a model predictive control algorithm as the control strategy for an industrial plant’s circulating cooling water system, which resulted in an improvement in control performance. Zhang et al. [13] developed an algorithmic coupling of an artificial neural network optimized by a genetic algorithm and a heat transfer model of the condenser and air-cooling heat exchanger. This was employed to optimize and control the mass flow of circulating cooling water in an indirect cooling system of thermal power units. The objective was to enhance the efficiency of the circulating cooling water system and to reduce costs. However, these methods all have certain limitations, which are difficult to adapt to the nonlinear dynamic characteristics of the system and the uncertainty in the operation process. To a significant extent, these methods depend on prior knowledge and necessitate the development of sophisticated system models and the adjustment of parameters. For instance, the PID control method necessitates manual system adjustment and is unable to accommodate the intricate dynamic alterations of the system. Although the fuzzy control method can effectively handle uncertainty, it often requires considerable expertise to design fuzzy rules and may struggle to achieve optimal control. Conversely, MPC can optimize control strategies based on predictive control, thereby enhancing control performance. However, MPC is characterized by high computational complexity and demands significant computing resources, which presents a challenge in the application of real-time, high-frequency control systems. Furthermore, MPC is susceptible to model accuracy and measurement precision, which may result in suboptimal performance in cases of unknown systems or model errors. The intelligent optimization algorithm exhibits strong adaptability but may be prone to becoming stuck in a suboptimal local solution, thus failing to ensure optimal control of the system. In recent years, with the continuous development of artificial intelligence technology, artificial intelligence theories and technologies such as deep learning and reinforcement learning have been widely applied in many fields, such as games field [14,15], robot control field [16– 18], building energy efficiency field [19], natural language processing field [20], and automatic driving field [21–23], and fault diagnosis field [24,25]. RL is a machine learning method to learn the optimal decision through trial and error. It is powerful nonlinear modeling and adaptive learning ability have brought new opportunities for controlling the circulating cooling water system. For example, Qiu et al. [26] proposed a model-free optimal control method based on reinforcement learning to control circulating cooling water systems in the architectural field, which makes it have broad application prospects in the architectural area where accurate system performance models are generally lacking. Wu et al. [27] proposed a PI controller based on reinforcement learning to control a steam compression refrigeration system with nonlinearity and coupling two inputs and two outputs, realizing adaptive control and improving control performance. Compared with traditional control methods, the reinforcement learning method can automatically learn the system’s dynamic characteristics and operation rules without manually adjusting the control parameters and has better adaptability and [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 2 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning intelligence. In addition, the reinforcement learning method can also use multi-agent reinforcement learning to realize collaborative control among multiple circulating cooling water systems and further improve control efficiency and stability. For example, Fu et al. [28] proposed a multi-agent deep reinforcement learning method for building cooling water system control to optimize the load distribution, cooling tower fan frequency, and cooling pump frequency of different cooling water systems. Furthermore, industrial processes’ safety usually requires solving constrained optimal control (COC) problems. Zhang et al. [29] proposed a new safety-enhanced learning algorithm for COC problems of continuous-time nonlinear systems with unknown dynamics and perturbations. For the uncertainties in the bridge crane system, such as payload mass and unmodeled dynamics, without knowing the system model, a new model-free online reinforcement learning control method for the real-time position adjustment and anti-sway control problem of bridge cranes is proposed [30], which combines the advantages of adaptive and optimal control and exhibits satisfactory performance. These research results show that reinforcement learning methods have a broad application prospect in industrial process control. In order to ascertain whether deep reinforcement learning methods offer certain advantages over traditional control methods in the recirculating cooling water system, and to address issues such as the inability of traditional control methods to achieve stable and precise control of the controlled system, this paper proposes the design of an adaptive control structure for the recirculating cooling water system with the objective of improving the system’s control performance. This paper makes the following contributions: 1) The design of an adaptive control structure based on the Twin Delayed Deep Deterministic Policy Gradient algorithm under a reference trajectory model (TD3-RTM) enables endto-end control of the recirculating cooling water system at the simulation level. 2) The state space and reward function were designed to consider the multivariable characteristics of the recirculating cooling water system. A reference trajectory model was introduced to accelerate the convergence speed of the agent and reduce oscillations and instability in the control system. 3) The exploration of the potential application of deep reinforcement learning in the recirculating cooling water system, with the objective of providing references and insights for control problems in the industrial field. The rest of this paper is organized as follows: Section 2 is the background, introducing the basics of deep reinforcement learning, the working principle of the circulating cooling water system, and the system model. Section 3 is the methods, which Outlines the design of adaptive control structure based on TD3-RTM. Section 4 is the experiment and analysis of results. Section 5 is the conclusion, which summarizes this study and puts forward the future research direction. 2 Background The prerequisite for combining the control of a circulating cooling water system with reinforcement learning is establishing a Markov model of the circulating cooling water system. The working principle and model of the circulating cooling water system and Markov decision process (MDP) based on the circulating cooling water system are described below. 2.1 Circulating cooling water system The circulating cooling water system comprises a temperature sensor, flowmeter, pressure sensor, heat exchanger, electric control valve, manual butterfly valve, check valve, frequency conversion pump, and other equipment. The schematic system diagram is shown in Fig 1. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 3 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 1.</u> <u>Schematic diagram of circulating cooling water system.</u> [https://doi.org/10.1371/journal.pone.0307767.g001](https://doi.org/10.1371/journal.pone.0307767.g001) The cold-water flow into the line through the electric regulating valve _M_ 1. When the pressure sensor _P_ 1 detects that the pressure in the main line of the system exceeds the safety value required by the system, the opening of the electric regulating valve _M_ 2 increases and discharges part of the cold water for pressure relief. At the same time, _M_ 2 is connected to the check valve to prevent backflow. Another amount of cold water enters the main line through _M_ 1, is detected by the flow meter and temperature sensor _T_ 2, and then enters the heat exchanger. As the heat exchange proceeds, some hot water is discharged through an electrically regulated valve _M_ 4 connected to a check valve. Another part of the hot water is mixed with the cold water through an electrically controlled valve _M_ 3. This cycle ensures that the cold water flowing into the heat exchanger has a constant temperature, thus ensuring the stability and safety of the system. Flow and temperature are crucial control objectives in a circulating cooling water system. To simplify modeling and control complexity, this paper focuses on these two critical variables as the primary targets for controlling the circulating cooling water system. On the other hand, over the past decades, the successful application of single-variable control theory has demonstrated the convenience and effectiveness of using transfer functions to express and analyze control systems. Therefore, transfer function matrices are employed in this paper to describe and analyze circulating cooling water systems. This paper represents the circulating cooling water system as a multivariate model with two inputs and outputs, as shown in Fig 2. The input variables are the opening of electric control valve _M_ 1 and _M_ 3. The output variables are the water flow and temperature into the heat exchanger. The linear transfer functions _G_ 11, _G_ 12, _G_ 21, and _G_ 22 represent the relationship between the input and output variables of the system, where the first number represents the output, and the second number represents the input. For example, _G_ 21 represents the effect of valve opening _M_ 1 on temperature. The transfer functions _G_ 11, _G_ 12, _G_ 21, and _G_ 22, which represent the dynamic behavior of the system, need to be identified, and the best pairing variables need to be found for the controller design. Therefore, the best-paired variables are found by selecting different variable pairs to observe the regulation state of the system during the experiment and then collecting data on the input and output quantities of the system at a steady state. For the collected system data, the data is firstly pre-processed to remove the outliers and noise. Then the transfer function model _G_ ( _S_ ) of the circulating cooling water system [31] is obtained using the MATLAB system [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 4 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 2.</u> <u>Model of circulating cooling water system.</u> [https://doi.org/10.1371/journal.pone.0307767.g002](https://doi.org/10.1371/journal.pone.0307767.g002) identification toolbox, as shown in Eq 1. 0 _:_ 7541 _<u>S</u>_ þ 0 _:_ 002914 24 _:_ 65 _<u>S</u>_ þ 0 _:_ 02572 _S_ <sup>2</sup> þ 0 _:_ 08358 _S_ þ 0 _:_ 0002578 _S_ <sup>2</sup> þ 2 _:_ 529 _S_ þ 0 _:_ 003538 <u>4</u> _<u>:</u>_ <u>721</u> _<u>e</u>_ <u>�</u> <u>05</u> _<u>S</u>_ <u>�</u> <u>3</u> _<u>:</u>_ <u>809</u> _<u>e</u>_ <u>�</u> <u>06</u> <u>0</u> _<u>:</u>_ <u>354</u> _<u>S</u>_ <u>þ 0</u> _<u>:</u>_ <u>0006877</u> _S_ <sup>2</sup> þ 0 _:_ 2304 _S_ þ 4 _:_ 309 _e_ - 14 _S_ <sup>2</sup> þ 1 _:_ 189 _S_ þ 0 _:_ 002565 <u>0</u> _<u>:</u>_ <u>354</u> _<u>S</u>_ <u>þ 0</u> _<u>:</u>_ <u>0006877</u> _S_ <sup>2</sup> þ 1 _:_ 189 _S_ þ 0 _:_ 002565 _G_ ð _S_ Þ ¼ 2 664 0 _:_ 7541 _<u>S</u>_ þ 0 _:_ 002914 _S_ <sup>2</sup> þ 0 _:_ 08358 _S_ þ 0 _:_ 0002578 3 ð1Þ 775 2.2 Markov decision model of circulating cooling water system The mathematical foundation and modeling tool of reinforcement learning is the MDP. An MDP usually comprises state space _s_, action space _a_, state transition function _P_, reward function _r_, and discount factor _γ_ . At any time step _t_, the agent first observes the current state _st_ of the environment and the current corresponding reward value _rt_ . Based on this state and reward information, the agent acts _at_ and obtains the state _st_ +1 and the reward _rt_ +1 from the environment for the next step. The interaction between the reinforcement learning agent and the environment under the control system is shown in Fig 3. In control system terminology, the term "agent" refers to the designed controller; the "environment" includes the system outside the controller, which, in this paper, refers explicitly to the circulating cooling water system. The policy represents the optimal control behavior sought by the designer. As shown in Fig 3, the interaction process between the agent and the environment indicates that state _s_ represents various features and parameters measured by sensors in the circulating cooling water system, such as flow and temperature. Action _a_ illustrates the opening value of the electric regulating valve determined by the agent based on the current state of the circulating cooling water system. Reward _r_ indicates the feedback obtained by the agent after taking specific actions in specific conditions. Rewards are used to evaluate the quality of the agent’s behavior and guide decision-making in different states. In the context of the circulating cooling water system, rewards can be used to measure the control effectiveness and performance of the system. In deep reinforcement learning, state transition function _P_ is often unknown, so the agent needs to estimate the state transition probability through interaction with the environment and learn and optimize control strategies. The design of the [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 5 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 3.</u> <u>Agent and environment interaction process.</u> [https://doi.org/10.1371/journal.pone.0307767.g003](https://doi.org/10.1371/journal.pone.0307767.g003) control strategy based on deep reinforcement learning relies on the design of the state, action, reward function, and reinforcement learning algorithms. Section 3 will provide a detailed introduction to the design of the control strategy. 3 Methods In this study, a deep reinforcement learning approach is used to design an adaptive controller for the circulating cooling water system. In deep reinforcement learning, the neural network is used as the value function or parameterized policy, while the gradient optimization method is used to optimize the loss. Here, the twin delayed deep deterministic policy gradient [32] (TD3) algorithm, which is an actor-critic framework to deal with continuous action space problems, is employed to optimize the control parameters in the circulating cooling water system. The TD3 algorithm is a deep reinforcement learning algorithm based on the Actor-Critic framework based on the Deep Deterministic Policy Gradient [33] (DDPG) algorithm. Since the value network of DDPG tends to overestimate the action value function, the TD3 algorithm has made improvements in the following three aspects to address the shortcomings of the DDPG algorithm: with truncated double Q learning, the problem of overestimation of the critic network is alleviated; the robustness and smoothness of the algorithm are improved by adding noise that obeys a truncated normal distribution to the output action of the target policy network; make the policy network and the three target networks update less frequently than the value network, this method can reduce the variance of the approximate action-value function, and a better policy can be obtained. The TD3 algorithm was selected for controlling the circulating cooling water system in this study due to its capability to handle continuous action spaces, utilization of twin Q networks to mitigate overestimation bias, and implementation of delayed policy updates and soft updates to reduce function approximation errors, thereby delivering more stable and precise control. Furthermore, TD3’s deep neural networks are proficient in effectively modeling the complex nonlinear and multivariate characteristics of the system, facilitating real-time adaptation and optimized control, thereby enhancing system performance. Choosing an appropriate deep reinforcement learning algorithm is only part of designing a controller. In contrast, the design of states, actions, and rewards in reinforcement learning are crucial in determining the agent’s learning capabilities, control performance, and adaptability to dynamic environments. Thoughtful and well-tailored designs of these elements are essential for successful and efficient learning in various applications. The following will explain the selection and design of states, actions, and reward functions. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 6 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning 3.1 Control strategy design 3.1.1 State. The state reflects essential information during the interaction between the agent and the environment, and the selection of the state space directly affects the agent’s decision-making, thereby influencing the overall control performance of the system. Therefore, the state should contain sufficient information to describe the current stage. In the circulating cooling water system, where the actuator exhibits nonlinear characteristics, and the process gain varies with different manipulated variables, the chosen state space in this study is as follows: Z Z _s_ ¼ ½ _eF; eT;_ _eFdt;_ _eTdt; F; T; Fsp; Tsp; a_ 1 _; a_ 2� T ð2Þ Where, _eF_ = _Fsp_ - _F_ and _eT_ = _Tsp_ - _T_ represent the control error values of the flow and temperature loops, respectively. <sup>R</sup> _eFdt_ and <sup>R</sup> _eTdt_ are the error integrals. _F_ and _T_ represent the historical output measurement values of flow and temperature, respectively. _Fsp_ and _Tsp_ are the setpoints for flow and temperature. _a_ 1 and _a_ 2 are the manipulated variable values for the flow and temperature loops, respectively, which are the action values output by the agent. 3.1.2 Action. Actions represent the actions taken by the agent in specific states, and the agent’s task is to choose appropriate actions in different states to maximize its long-term rewards. In reinforcement learning, actions are typically determined by the agent’s policy, and in control systems, they correspond to the manipulated variables applied to the system. In this study, the action values correspond to the opening values of the electric regulating valves in the circulating cooling water system, where _a_ 1 represents the opening value of the electric regulating valve _M_ 1, and _a_ 2 represents the opening value of the electric regulating valve _M_ 3. The range of action values is [0, 100], making the action space: _a_ ¼ ½ _a_ 1 _; a_ 2�T ð3Þ 3.1.3 Reward. The reward function is a crucial concept in reinforcement learning, which is used to evaluate the performance of an agent in an environment. The reward function is typically a mapping from the state and action space to a real number, representing the desirability of an action taken by the agent in each state. In reinforcement learning, the objective of the agent is to maximize the accumulated reward by interacting with the environment. Therefore, the reward function can be viewed as the objective function of the reinforcement learning task. By adjusting its policy, the agent can attempt to maximize the reward function and learn how to take optimal actions in different states of the environment. In some reinforcement learning tasks, the reward function is typically designed such that the agent receives a reward only when the output values satisfy the system requirements. This type of reward function is known as a sparse reward function. In simple environments like single-variable systems, using a sparse reward function can still yield good control results. However, in a multivariate system, transferring the state of the system environment to the target state becomes more complex and uncertain than that of a univariate system. Therefore, based on the characteristics of circulating cooling water systems, this paper designs a dense reward function. For the flow loop, the dense reward function is set as follows: 100 _;_ j _eFt_ j � _φ_ 1 1 _=eFt;_ _φ_ 1 _<_ j _eFt_ j � _φ_ 2 - _eFt;_ j _eFt_ j _> φ_ 2 _r_ 1 ¼ 8 >< >: ð4Þ [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 7 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning Where _eFt_ represents the error value of the current moment of flow. _φ_ 1 and _φ_ 2 represent the thresholds of error values in different intervals of flow. When the error value satisfies the system goal requirements, give the agent a large reward value to encourage the current behavior. In this paper, _φ_ 1 equals 0.1, and _φ_ 2 equals 5. Furthermore, the temperature loop reward function is designed in the same way as the flow loop. Therefore, the reward function of the temperature loop is defined as: 100 _;_ j _eTt_ j � Z1 1 _=eTt;_ Z1 _<_ j _eTt_ j � Z2 - _eTt;_ j _eTt_ j _>_ Z2 _r_ 2 ¼ 8 >< >: ð5Þ Where _eTt_ represents the error value of the current moment of temperature. _η_ 1 and _η_ 2 represent the thresholds of error values in different intervals of temperature. In this paper, _η_ 1 equals 0.1, and _η_ 2 equals 2. Finally, the reward function _rt_ based on the circulating cooling water system is defined as _rt_ ¼ _r_ 1 þ _r_ 2 ð6Þ 3.2 Network structure and algorithm design The network structure of the TD3 algorithm comprises four principal components: the Actor network, the Critic network, the Target Actor network, and the Target Critic network. The Actor network generates a policy for continuous actions based on the current state. The Critic network is responsible for estimating the Q-value for the current state and action pair. The Target Actor and Target Critic networks serve as target networks for the Actor and Critic networks, respectively. The Target Actor and Target Critic networks have the same structure as the Actor and Critic networks, respectively, and their parameters are updated through soft updates from the Actor and Critic networks. In this study, the Actor and Critic networks are implemented with three-layer neural networks, comprising 128 and 64 neurons in their respective hidden layers. The rectified linear unit (ReLU) function is employed as the activation function. Furthermore, as the control actuator in the circulating cooling water system is an electric regulating valve with a range of 0 to 100, the output of the Actor network is normalized to the range of [–1, 1] using the tanh function and then scaled using the scaling operation. To enhance the exploration and learning capabilities of the agent, this paper introduces a reference trajectory model. This model guides the agent to converge more rapidly to the desired control policy during the learning process, thereby improving the control effectiveness and learning speed of reinforcement learning. The reference trajectory model utilized in this study is: 1 _Fr_ ð _s_ Þ ¼ ð7Þ t _rs_ þ 1 In addition, in practical applications, setpoints may experience sudden changes or instability, which can lead to unstable performance or oscillations in the control system. By introducing the reference trajectory model, the setpoint signal can be smoothed to make its changes more gradual and smoother, thereby helping to reduce oscillations and instability in the control system. In this paper, _τr_ equals 0.2. The design of the control system is illustrated in Fig 4. In this study, a controller for the circulating cooling water system is designed based on the TD3 algorithm. Its control strategy is shown in Algorithm 1. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 8 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 4.</u> <u>Control structure of circulating cooling water based on TD3-RTM.</u> [https://doi.org/10.1371/journal.pone.0307767.g004](https://doi.org/10.1371/journal.pone.0307767.g004) Algorithm 1. TD3 algorithm in circulating cooling water control system . Initialize replay buffer _M_, initialize critic network _Q_ y1, _Q_ y2, parameters _θ_ 1, _θ_ 2, initialize actor network _π�_ parameter _�_, initialize target network parameters y1� y1 _;_ y2� y2 _; �_ - _�_ . Repeat Randomly initialize the flow and temperature setpoints within the range allowed by system. select action _at_ - p _�_ ð _st_ Þ þ _ε; ε_ - _N_ ð0 _;_ sÞ, accept reward _rt_ and next state _st_ +1 <sup>.</sup> store state transfer data ( _st_, _at_, _rt_, _st_ +1) to _M_ . Sample mini batches of size _B_ from _M_ . _a_ 0 _t_ þ1 <sup>p</sup> _�_ <sup>�</sup> <sup>ð</sup> <sup>_s_</sup> _t_ þ1 <sup>Þ þ</sup> <sup>_ε; ε_</sup> <sup>�</sup> <sup>clipð</sup> <sup>_N_</sup> <sup>ð0</sup> <sup>_;_</sup> <sup>s�</sup> <sup>_;_</sup> <sup>�</sup> <sup>_c; c_</sup> <sup>Þ</sup> <sup>_; c >_</sup> <sup>0Þ</sup> <sup>_y_</sup> <sup>¼</sup> <sup>_r_</sup> _t_ <sup>þ gmin</sup> _i_ _a_ 0 _t_ þ1 <sup>p</sup> _�_ <sup>�</sup> <sup>ð</sup> <sup>_s_</sup> _t_ þ1 <sup>Þ þ</sup> <sup>_ε; ε_</sup> <sup>�</sup> <sup>clipð</sup> <sup>_N_</sup> <sup>ð0</sup> <sup>_;_</sup> <sup>s�</sup> <sup>_;_</sup> <sup>�</sup> <sup>_c; c_</sup> <sup>Þ</sup> <sup>_; c >_</sup> <sup>0Þ</sup> <sup>_y_</sup> <sup>¼</sup> <sup>_r_</sup> _t_ <sup>þ gmin</sup> _i_ ¼1 _;_ 2 <sup>_Q_</sup> y _i_ <sup>�</sup> <sup>ð</sup> <sup>_s_</sup> _t_ þ1 <sup>_; a_</sup> 0 _t_ þ1 <sup>Þ</sup> <sup>Update</sup> value network. 0 _t_ þ1 <sup>p</sup> _�_ <sup>�</sup> <sup>ð</sup> <sup>_s_</sup> _t_ þ1 <sup>Þ þ</sup> <sup>_ε; ε_</sup> <sup>�</sup> <sup>clipð</sup> <sup>_N_</sup> <sup>ð0</sup> <sup>_;_</sup> <sup>s�</sup> <sup>_;_</sup> <sup>�</sup> <sup>_c; c_</sup> <sup>Þ</sup> <sup>_; c >_</sup> <sup>0Þ</sup> <sup>_y_</sup> <sup>¼</sup> <sup>_r_</sup> _t_ <sup>þ gmin</sup> _i_ ¼1 _;_ 2 <sup>_Q_</sup> y _i_ <sup>�</sup> <sup>ð</sup> <sup>_s_</sup> _t_ þ1 <sup>_; a_</sup> network. y _i_ argminy _i_ _B_ <sup>�</sup> <sup>1X</sup> 2 if _t_ mod _d_ then argminy _i_ _B_ <sup>�</sup> <sup>1X</sup> ð _y_ - _Q_ y _i_ ð _st; at_ ÞÞ Update _�_ r _�J_ ð _�_ Þ ¼ _B_ <sup>�</sup> <sup>1X</sup> r _aQ_ y1 ð _st; at_ Þj _at_ ¼p _�_ ð _st_ Þr _�_ p _�_ ð _st_ Þ Update ð _y_ - _Q_ y _i_ ð _st; at_ ÞÞ r _�J_ ð _�_ Þ ¼ _B_ <sup>�</sup> <sup>1X</sup> r _aQ_ y1 ð _st; at_ Þj _at_ ¼p _�_ ð _st_ Þr _�_ p _�_ ð _st_ Þ Update the target network, where _ρ_ is the soft update factor. y _i_ - ry _i_ þ ð1 � rÞy _i_ _�_ <sup>�</sup> r _�_ þ ð1 � rÞ _�_ <sup>�</sup> end if end for 4 Experiments and analysis of results In the training process of TD3-RTM in this study, the total number of episodes is set to 2000, with a sampling time of 0.1 seconds and a maximum simulation duration of 20 seconds. To enhance the disturbance rejection control performance of the system, random step signals with amplitudes ranging from -5 to 5 are applied at the control ports of the flow and temperature loops at the 15th second. The reference step input signals for the flow (m^3/h) and temperature (˚C) are set to [550, 650] and [20, 30], respectively, to achieve robustness to significant setpoint changes in the system. Since TD3-RTM is based on the TD3 algorithm, the primary hyperparameters used in the training process of the TD3 algorithm are shown in Table 1. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 9 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning Table 1. Hyperparameter settings of the algorithm 1. <u>Hyperparameters</u> <u>Values</u> <u>Discount factor,</u> _<u>γ</u>_ <u>0.995</u> <u>Mini-batch size</u> <u>128</u> <u>Replay buffer size</u> <u>1e6</u> <u>Critic learning rate</u> <u>1e-3</u> <u>Actor learning rate</u> <u>5e-4</u> <u>Target update frequency</u> <u>10</u> <u>Exploration model</u> <u>Gaussian noise</u> <u>Variance,</u> _<u>σ</u>_ <u>0.2</u> <u>Variance decay rate</u> <u>1e-5</u> <u>Policy update frequency</u> <u>2</u> <u>Soft update factor,</u> _<u>ρ</u>_ <u>5e-3</u> [https://doi.org/10.1371/journal.pone.0307767.t001](https://doi.org/10.1371/journal.pone.0307767.t001) All computations were carried out on a standard PC (Win11, AMD 4600H CPU@3.00GHz, 16GB) in MATLAB/Simulink R2022b. To validate the effectiveness of TD3-RTM, comparisons were made with the classical PID controller, fuzzy PID controller, DDPG algorithm, and TD3 algorithm. To be fair, the PID parameters for classical PID control and fuzzy PID control were obtained using the Ziegler-Nichols method. The neural network architecture, number of neurons, and learning rate used in different deep reinforcement learning algorithms were the same. Each task was run for 2000 episodes, and the experiments were repeated five times with different random seeds. The recorded results represent the average reward value for every 20 episodes. The learning curves are shown in Fig 5. <u>Fig 5.</u> <u>Learning curve of the control task.</u> [https://doi.org/10.1371/journal.pone.0307767.g005](https://doi.org/10.1371/journal.pone.0307767.g005) [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 10 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 6.</u> <u>Output results of different controllers at the flow setpoint of 600 m^3/h.</u> [https://doi.org/10.1371/journal.pone.0307767.g006](https://doi.org/10.1371/journal.pone.0307767.g006) The results in Fig 6 indicate that TD3-RTM can converge to the desired control policy faster and with more stable convergence performance under different random initial states. Additionally, TD3-RTM achieves higher total rewards after 2000 episodes of learning. 4.1 Step response and disturbance rejection performance simulation experiment To validate the control effectiveness of TD3-RTM in the circulating cooling water system, a 100-second simulation experiment was conducted with a flow of 600 m^3/h and a temperature of 25˚C. At the 60-second and 80-second marks, disturbance signals with amplitudes of 5 and -5 were applied to the control ports of the flow and temperature loops. The control performance of different control methods is shown in Figs 6 and 7. As shown in Fig 6, it can be observed that in the flow control loop, the deep reinforcement learning controller exhibits faster response speed and minor overshoot compared to the classical PID controller and fuzzy PID controller in the step response. TD3-RTM is less affected when faced with external disturbance signals, while the DDPG algorithm shows steady-state error and the TD3 algorithm exhibits oscillations. The oscillations in the TD3 algorithm cause continuous changes in the control signal, which can damage the actuators in the circulating cooling water system and lead to system instability. As shown in Fig 7, in the temperature control loop, the PID controller, fuzzy PID controller and DDPG algorithm have relatively slow response speeds, while the TD3 algorithm and TD3-RTM achieve good control performance. The deep reinforcement learning controller performs better when subjected to external disturbance signals. The performance parameters for different control methods are shown in Table 2. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 11 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 7.</u> <u>Output results of different controllers at the temperature setpoint of 25˚C.</u> [https://doi.org/10.1371/journal.pone.0307767.g007](https://doi.org/10.1371/journal.pone.0307767.g007) From Table 2, compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively. In addition, the overshooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3. Generally, for industrial energy-consuming scenarios such as the circulating cooling water system, a controller with lower IAE and shorter settling time can save more energy. Although the DDPG algorithm shows a shorter rise time and no overshoot in the flow control Table 2. Comparison of Controllers Performance Parameters. <u>Variables</u> <u>Controllers</u> <u>Rise Time (s)</u> <u>Transient Time (s)</u> <u>Overshoot (%)</u> <u>IAE</u> Flow <u>PID</u> <u>1.03</u> <u>7.10</u> <u>18.60</u> <u>753.80</u> <u>Fuzzy-PID</u> <u>0.57</u> <u>6.30</u> <u>8.75</u> <u>378.36</u> <u>DDPG</u> <u>0.30</u> <u>1.58</u> <u>0</u> <u>179.23</u> <u>TD3</u> <u>0.28</u> <u>1.78</u> <u>2.25</u> <u>133.22</u> <u>TD3-RTM</u> <u>0.47</u> <u>1.01</u> <u>0.96</u> <u>43.26</u> Temperature <u>PID</u> <u>16.54</u> <u>29.81</u> <u>0</u> <u>170.35</u> <u>Fuzzy-PID</u> <u>9.32</u> <u>17.44</u> <u>0</u> <u>85.28</u> <u>DDPG</u> <u>5.99</u> <u>18.84</u> <u>0</u> <u>58.24</u> <u>TD3</u> <u>2.97</u> <u>4.60</u> <u>0.21</u> <u>28.22</u> <u>TD3-RTM</u> <u>2.78</u> <u>3.79</u> <u>0</u> <u>26.45</u> [https://doi.org/10.1371/journal.pone.0307767.t002](https://doi.org/10.1371/journal.pone.0307767.t002) [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 12 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 8.</u> <u>Output results for different controllers in the flow loop at different setpoints.</u> [https://doi.org/10.1371/journal.pone.0307767.g008](https://doi.org/10.1371/journal.pone.0307767.g008) loop, it exhibits a longer rise time and settling time in the temperature control loop. Its IAE is the largest compared to TD3 and TD3-RTM. Overall, TD3-RTM demonstrates significant advantages in both control loops. 4.2 Tracking performance simulation experiment To validate the tracking performance of TD3-RTM, this study designed different setpoints for both the flow control loop and the temperature control loop and conducted 300 seconds of simulation experiments. The control effects of different control methods are shown in Figs 8 and 9. As shown in Fig 8, in the flow control loop, when the setpoint is changed, the DDPG algorithm becomes unstable, and both the PID controller and fuzzy PID controller exhibit significant overshoot and long settling times at different setpoints. On the other hand, the TD3 algorithm and TD3-RTM outperform other methods significantly. In Fig 9, although all controllers can track the given setpoints, their transient responses vary widely. The DDPG algorithm can reach the setpoint at the end of each simulation time, but its settling time is longer, and its performance is inferior to the PID and fuzzy PID controllers. However, TD3-RTM’s performance during setpoint changes is comparable to the TD3 algorithm, with the fastest response speed and good settling time. Overall, TD3-RTM performs well in both control loops and shows excellent potential. 5 Conclusion This paper presents a novel adaptive control structure based on the Twin Delayed Deep Deterministic Policy Gradient algorithm under a reference trajectory model (TD3-RTM) for [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 13 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning <u>Fig 9.</u> <u>Output results for different controllers in the temperature loop at different setpoints.</u> [https://doi.org/10.1371/journal.pone.0307767.g009](https://doi.org/10.1371/journal.pone.0307767.g009) addressing complex control problems in recirculating cooling water systems. Initially, the TD3 algorithm is employed to construct a deep reinforcement learning agent, enabling it to select appropriate actions for each loop based on system state features. Additionally, the multivariable characteristics of the recirculating cooling water system necessitate the design of a dense reward function, which enables the agent to receive various rewards through interactions with the environment and update its network, thereby gradually approaching the optimal policy. Furthermore, the introduction of the reference trajectory model accelerates the convergence speed of the agent and reduces system oscillations and instability. Simulation results show that compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively. In addition, the overshooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3. To further enhance safety and system stability, regular monitoring of system performance and adjusting as necessary are encouraged in practical applications. Furthermore, the utilization of backup control strategies to address exceptional circumstances that may be beyond the scope of deep reinforcement learning algorithms ensures the system’s stability in extreme conditions. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 14 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning This research validates the potential of deep reinforcement learning in the circulating cooling water system and offers novel solutions and insights for practical engineering control problems. Although the method proposed in this paper achieves good control performance in simulation experiments and shows advantages over both traditional control methods and other deep reinforcement learning methods, there are some potential limitations, such as applicability limitations, computational resource requirements, hyper-parameter sensitivity, adaptability to environmental variations, and the challenge of practical system validation. Further optimization and extension of the proposed control method can be explored for broader industrial applications, along with investigating other deep reinforcement learning algorithms for complex system control. This will contribute to advancing intelligent control technology in industrial automation, enhancing production efficiency and resource utilization. Supporting information [S1 Appendix. Datas and codes from the experiments.](http://www.plosone.org/article/fetchSingleRepresentation.action?uri=info:doi/10.1371/journal.pone.0307767.s001) (ZIP) Author Contributions Conceptualization: Jin Xu. Data curation: Han Li. Formal analysis: Jin Xu. Methodology: Jin Xu. Resources: Qingxin Zhang. Software: Han Li. Supervision: Qingxin Zhang. Visualization: Han Li. Writing – original draft: Han Li. Writing – review & editing: Qingxin Zhang. References 1. Kim K-H. Temperature Stabilization of the Klystron Cooling Water at the KOMAC. Journal of the Korean [Physical Society. 2018; 73(8):1157–62. https://doi.org/10.3938/jkps.73.1157](https://doi.org/10.3938/jkps.73.1157) 2. Garciadealva Y, Best R, Gomez VH, Vargas A, Rivera W, Jimenez-Garcia JC. A Cascade Proportional Integral Derivative Control for a Plate-Heat-Exchanger-Based Solar Absorption Cooling System. Ener[gies. 2021; 14(13):20. https://doi.org/10.3390/en14134058 WOS:000671123300001.](https://doi.org/10.3390/en14134058) 3. Liu W-h, Xie Z. Design and Simulation Test of Advanced Secondary Cooling Control System of Continuous Casting Based on Fuzzy Self-Adaptive PID. Journal of Iron and Steel Research International. 2011; [18(1):26–30. https://doi.org/10.1016/S1006-706X(11)60006-X](https://doi.org/10.1016/S1006-706X%2811%2960006-X) 4. Liang YY, Wang DD, Chen JP, Shen YG, Du J. Temperature control for a vehicle climate chamber [using chilled water system. Appl Therm Eng. 2016; 106:117–24. https://doi.org/10.1016/j.](https://doi.org/10.1016/j.applthermaleng.2016.05.168) [applthermaleng.2016.05.168 WOS:000381530600013.](https://doi.org/10.1016/j.applthermaleng.2016.05.168) 5. Jia Y, Zhang R, Lv X, Zhang T, Fan Z. Research on Temperature Control of Fuel-Cell Cooling System [Based on Variable Domain Fuzzy PID. 2022; 10(3):534. https://doi.org/10.3390/pr10030534](https://doi.org/10.3390/pr10030534) 6. Zhao Y, Pistikopoulos E. Dynamic modelling and parametric control for the polymer electrolyte mem[brane fuel cell system. Journal of Power Sources. 2013; 232:270–8. https://doi.org/10.1016/j.jpowsour.](https://doi.org/10.1016/j.jpowsour.2012.12.116) [2012.12.116.](https://doi.org/10.1016/j.jpowsour.2012.12.116) [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 15 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning 7. Muller CJ, Craig IK. Economic hybrid non-linear model predictive control of a dual circuit induced draft [cooling water system. J Process Control. 2017; 53:37–45. https://doi.org/10.1016/j.jprocont.2017.02.](https://doi.org/10.1016/j.jprocont.2017.02.009) [009.](https://doi.org/10.1016/j.jprocont.2017.02.009) 8. Dulce-Chamorro E, Martinez-de-Pison FJ. An advanced methodology to enhance energy efficiency in a [hospital cooling-water system. Journal of Building Engineering. 2021; 43:102839. https://doi.org/10.](https://doi.org/10.1016/j.jobe.2021.102839) [1016/j.jobe.2021.102839.](https://doi.org/10.1016/j.jobe.2021.102839) 9. Liang J, Li L, Li Y, Wang Y, Feng X. Operation optimization of existing industrial circulating water system considering variable frequency drive. Chemical Engineering Research and Design. 2022; 186:387–97. [https://doi.org/10.1016/j.cherd.2022.08.010.](https://doi.org/10.1016/j.cherd.2022.08.010) 10. Niu D, Liu X, Tong YJIJoCIS. Operation Optimization of Circulating Cooling Water System Based on Adaptive Differential Evolution Algorithm. 2023; 16(1):22. 11. Xia QA, Zhang T, Sun ZF, Gao Y. Design and optimization of thermal strategy to improve the thermal [management of proton exchange membrane fuel cells. Appl Therm Eng. 2023; 222:11. https://doi.org/](https://doi.org/10.1016/j.applthermaleng.2022.119880) [10.1016/j.applthermaleng.2022.119880 WOS:000914111300001.](https://doi.org/10.1016/j.applthermaleng.2022.119880) 12. Terzi E, Cataldo A, Lorusso P, Scattolini R. Modelling and predictive control of a recirculating cooling [water system for an industrial plant. J Process Control. 2018; 68:205–17. https://doi.org/10.1016/j.](https://doi.org/10.1016/j.jprocont.2018.04.009) [jprocont.2018.04.009 WOS:000442706100018.](https://doi.org/10.1016/j.jprocont.2018.04.009) 13. Zhang W, Ma L, Jia B, Zhang Z, Liu Y, Duan L. Optimization of the circulating cooling water mass flow in indirect dry cooling system of thermal power unit using artificial neural network based on genetic algo[rithm. Appl Therm Eng. 2023; 223:120040. https://doi.org/10.1016/j.applthermaleng.2023.120040.](https://doi.org/10.1016/j.applthermaleng.2023.120040) 14. Silver D, Schrittwieser J, Simonyan K, Antonoglou I, Huang A, Guez A, et al. Mastering the game of Go [without human knowledge. Nature. 2017; 550(7676):354–9. https://doi.org/10.1038/nature24270](https://doi.org/10.1038/nature24270) [PMID: 29052630](http://www.ncbi.nlm.nih.gov/pubmed/29052630) 15. McNamara JM, Houston AI, Leimar O. Learning, exploitation and bias in games. PLOS ONE. 2021; 16 [(2):e0246588. https://doi.org/10.1371/journal.pone.0246588 PMID: 33544782](https://doi.org/10.1371/journal.pone.0246588) 16. Hwangbo J, Lee J, Dosovitskiy A, Bellicoso D, Tsounis V, Koltun V, et al. Learning agile and dynamic [motor skills for legged robots. 2019; 4(26):eaau5872. https://doi.org/10.1126/scirobotics.aau5872](https://doi.org/10.1126/scirobotics.aau5872) [PMID: 33137755](http://www.ncbi.nlm.nih.gov/pubmed/33137755) 17. Ejaz MM, Tang TB, Lu CK. Vision-Based Autonomous Navigation Approach for a Tracked Robot Using [Deep Reinforcement Learning. IEEE Sensors Journal. 2021; 21(2):2230–40. https://doi.org/10.1109/](https://doi.org/10.1109/JSEN.2020.3016299) [JSEN.2020.3016299](https://doi.org/10.1109/JSEN.2020.3016299) 18. Fernandez-Gauna B, Etxeberria-Agiriano I, Graña M. Learning Multirobot Hose Transportation and [Deployment by Distributed Round-Robin Q-Learning. PLOS ONE. 2015; 10(7):e0127129. https://doi.](https://doi.org/10.1371/journal.pone.0127129) [org/10.1371/journal.pone.0127129 PMID: 26158587](https://doi.org/10.1371/journal.pone.0127129) 19. Fu Q, Han Z, Chen J, Lu Y, Wu H, Wang YJJoBE. Applications of reinforcement learning for building energy efficiency control: A review. 2022; 50:104165. 20. Le-Khac PH, Healy G, Smeaton AF. Contrastive Representation Learning: A Framework and Review. [IEEE Access. 2020; 8:193907–34. https://doi.org/10.1109/ACCESS.2020.3031549](https://doi.org/10.1109/ACCESS.2020.3031549) 21. Al-Qizwini M, Bulan O, Qi X, Mengistu Y, Mahesh S, Hwang J, et al. A Lightweight Simulation Framework for Learning Control Policies for Autonomous Vehicles in Real-World Traffic Condition. IEEE Sen[sors Journal. 2021; 21(14):15762–74. https://doi.org/10.1109/JSEN.2020.3036532](https://doi.org/10.1109/JSEN.2020.3036532) 22. Gangopadhyay B, Soora H, Dasgupta P. Hierarchical Program-Triggered Reinforcement Learning Agents for Automated Driving. IEEE Transactions on Intelligent Transportation Systems. 2022; 23 [(8):10902–11. https://doi.org/10.1109/TITS.2021.3096998](https://doi.org/10.1109/TITS.2021.3096998) 23. Ashraf NM, Mostafa RR, Sakr RH, Rashad MZ. Optimizing hyperparameters of deep reinforcement learning for autonomous driving based on whale optimization algorithm. PLOS ONE. 2021; 16(6): [e0252754. https://doi.org/10.1371/journal.pone.0252754 PMID: 34111168](https://doi.org/10.1371/journal.pone.0252754) 24. Cao J, Ma J, Huang D, Yu P. Finding the optimal multilayer network structure through reinforcement [learning in fault diagnosis. Measurement. 2022; 188:110377. https://doi.org/10.1016/j.measurement.](https://doi.org/10.1016/j.measurement.2021.110377) [2021.110377.](https://doi.org/10.1016/j.measurement.2021.110377) 25. Wang R, Jiang H, Li X, Liu S. A reinforcement neural architecture search method for rolling bearing fault [diagnosis. Measurement. 2020; 154:107417. https://doi.org/10.1016/j.measurement.2019.107417.](https://doi.org/10.1016/j.measurement.2019.107417) 26. Qiu S, Li Z, Li Z, Li J, Long S, Li X. Model-free control method based on reinforcement learning for building cooling water systems: Validation by measured data-based simulation. Energy and Buildings. 2020; [218:110055. https://doi.org/10.1016/j.enbuild.2020.110055.](https://doi.org/10.1016/j.enbuild.2020.110055) 27. Wu Y, Xing L, Liu XK, Guo F, editors. A New Solution to the PID18 Challenge: Reinforcement-Learningbased PI Control. 2022 34th Chinese Control and Decision Conference (CCDC); 2022 15–17 Aug. 2022. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 16 / 17 PLOS ONE Adaptive controller based on deep reinforcement learning 28. Fu Q, Chen X, Ma S, Fang N, Xing B, Chen J. Optimal control method of HVAC based on multi-agent [deep reinforcement learning. Energy and Buildings. 2022; 270:112284. https://doi.org/10.1016/j.](https://doi.org/10.1016/j.enbuild.2022.112284) [enbuild.2022.112284.](https://doi.org/10.1016/j.enbuild.2022.112284) 29. Zhang H, Zhao C, Ding J. Robust safe reinforcement learning control of unknown continuous-time non[linear systems with state constraints and disturbances. J Process Control. 2023; 128:103028. https://](https://doi.org/10.1016/j.jprocont.2023.103028) [doi.org/10.1016/j.jprocont.2023.103028.](https://doi.org/10.1016/j.jprocont.2023.103028) 30. Zhang H, Zhao C, Ding J. Online reinforcement learning with passivity-based stabilizing term for real time overhead crane control without knowledge of the system model. Control Engineering Practice. [2022; 127:105302. https://doi.org/10.1016/j.conengprac.2022.105302.](https://doi.org/10.1016/j.conengprac.2022.105302) 31. Li T, Liu Y, Chen Z. Design of Gas Turbine Cooling System Based on Improved Jumping Spider Optimi[zation Algorithm. 2022; 10(10):909. https://doi.org/10.3390/machines10100909](https://doi.org/10.3390/machines10100909) 32. Fujimoto S, Hoof H, Meger D, editors. Addressing function approximation error in actor-critic methods. International conference on machine learning; 2018: PMLR. 33. Lillicrap TP, Hunt JJ, Pritzel A, Heess N, Erez T, Tassa Y, et al. Continuous control with deep reinforcement learning. 2015. [PLOS ONE | https://doi org/10 1371/journal pone 0307767](https://doi.org/10.1371/journal.pone.0307767) July 24 2024 17 / 17

섹션 본문 52문단 · 33,604자

(제목 없음)

1Due to the complex internal working process of circulating cooling water systems, most traditional control methods struggle to achieve stable and precise control.Therefore, this paper presents a novel adaptive control structure for the Twin Delayed Deep Deterministic Policy Gradient algorithm, which is based on a reference trajectory model (TD3-RTM).The structure is based on the Markov decision process of the recirculating cooling water system.Initially, the TD3 algorithm is employed to construct a deep reinforcement learning agent.Subsequently, a state space is selected, and a dense reward function is designed, considering the multivariable characteristics of the recirculating cooling water system.The agent updates its network based on different reward values obtained through interactions with the system, thereby gradually aligning the action values with the optimal policy.The TD3-RTM method introduces a reference trajectory model to accelerate the convergence speed of the agent and reduce oscillations and instability in the control system.Subsequently, simulation experiments were conducted in MATLAB/Simulink.The results show that compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively.In addition, the overshooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3.

Introduction

2In the production process of many industrial sectors, a large amount of waste heat will be generated.Currently, it is necessary to use cold water or other liquids to absorb the heat in time to ensure the regular operation of the production process.The cold water used in this process is called cooling water in industrial production.To save water resources and reduce energy costs, consider recycling industrial cooling water to form a circulating cooling water system.With the continuous development of modern industry, as an essential cooling method in industrial production, circulating cooling water system is widely used in various production processes, such as pharmaceutical, electric power, chemical, metallurgy, Marine engine, etc. Optimizing circulating cooling water system control can improve industrial production efficiency and reduce energy consumption and maintenance costs.Therefore, in controlling circulating cooling water systems, the study of achieving efficient control has become an important topic.

3At present, the control methods employed in circulating cooling water systems are predominantly based on traditional PID control [1,2], fuzzy control [3][4][5] model predictive control (MPC) [6,7], intelligent optimization algorithms [8][9][10] and other traditional methods.For example, Xia et al. [11] proposed the use of a PID controller and a fuzzy PID controller as the control strategy for the temperature controller of the circulating cooling water system in a fuel cell engine.This approach resulted in a notable reduction in temperature fluctuations during the water temperature mixing process.Terzi et al. [12] proposed the use of a model predictive control algorithm as the control strategy for an industrial plant's circulating cooling water system, which resulted in an improvement in control performance.Zhang et al. [13] developed an algorithmic coupling of an artificial neural network optimized by a genetic algorithm and a heat transfer model of the condenser and air-cooling heat exchanger.This was employed to optimize and control the mass flow of circulating cooling water in an indirect cooling system of thermal power units.The objective was to enhance the efficiency of the circulating cooling water system and to reduce costs.However, these methods all have certain limitations, which are difficult to adapt to the nonlinear dynamic characteristics of the system and the uncertainty in the operation process.To a significant extent, these methods depend on prior knowledge and necessitate the development of sophisticated system models and the adjustment of parameters.For instance, the PID control method necessitates manual system adjustment and is unable to accommodate the intricate dynamic alterations of the system.Although the fuzzy control method can effectively handle uncertainty, it often requires considerable expertise to design fuzzy rules and may struggle to achieve optimal control.Conversely, MPC can optimize control strategies based on predictive control, thereby enhancing control performance.However, MPC is characterized by high computational complexity and demands significant computing resources, which presents a challenge in the application of real-time, high-frequency control systems.Furthermore, MPC is susceptible to model accuracy and measurement precision, which may result in suboptimal performance in cases of unknown systems or model errors.The intelligent optimization algorithm exhibits strong adaptability but may be prone to becoming stuck in a suboptimal local solution, thus failing to ensure optimal control of the system.

4In recent years, with the continuous development of artificial intelligence technology, artificial intelligence theories and technologies such as deep learning and reinforcement learning have been widely applied in many fields, such as games field [14,15], robot control field [16][17][18], building energy efficiency field [19], natural language processing field [20], and automatic driving field [21][22][23], and fault diagnosis field [24,25].RL is a machine learning method to learn the optimal decision through trial and error.It is powerful nonlinear modeling and adaptive learning ability have brought new opportunities for controlling the circulating cooling water system.For example, Qiu et al. [26] proposed a model-free optimal control method based on reinforcement learning to control circulating cooling water systems in the architectural field, which makes it have broad application prospects in the architectural area where accurate system performance models are generally lacking.Wu et al. [27] proposed a PI controller based on reinforcement learning to control a steam compression refrigeration system with nonlinearity and coupling two inputs and two outputs, realizing adaptive control and improving control performance.Compared with traditional control methods, the reinforcement learning method can automatically learn the system's dynamic characteristics and operation rules without manually adjusting the control parameters and has better adaptability and intelligence.In addition, the reinforcement learning method can also use multi-agent reinforcement learning to realize collaborative control among multiple circulating cooling water systems and further improve control efficiency and stability.For example, Fu et al. [28] proposed a multi-agent deep reinforcement learning method for building cooling water system control to optimize the load distribution, cooling tower fan frequency, and cooling pump frequency of different cooling water systems.Furthermore, industrial processes' safety usually requires solving constrained optimal control (COC) problems.Zhang et al. [29] proposed a new safety-enhanced learning algorithm for COC problems of continuous-time nonlinear systems with unknown dynamics and perturbations.For the uncertainties in the bridge crane system, such as payload mass and unmodeled dynamics, without knowing the system model, a new model-free online reinforcement learning control method for the real-time position adjustment and anti-sway control problem of bridge cranes is proposed [30], which combines the advantages of adaptive and optimal control and exhibits satisfactory performance.These research results show that reinforcement learning methods have a broad application prospect in industrial process control.

5In order to ascertain whether deep reinforcement learning methods offer certain advantages over traditional control methods in the recirculating cooling water system, and to address issues such as the inability of traditional control methods to achieve stable and precise control of the controlled system, this paper proposes the design of an adaptive control structure for the recirculating cooling water system with the objective of improving the system's control performance.This paper makes the following contributions:

61) The design of an adaptive control structure based on the Twin Delayed Deep Deterministic Policy Gradient algorithm under a reference trajectory model (TD3-RTM) enables endto-end control of the recirculating cooling water system at the simulation level.

72) The state space and reward function were designed to consider the multivariable characteristics of the recirculating cooling water system.A reference trajectory model was introduced to accelerate the convergence speed of the agent and reduce oscillations and instability in the control system.

83) The exploration of the potential application of deep reinforcement learning in the recirculating cooling water system, with the objective of providing references and insights for control problems in the industrial field.

9The rest of this paper is organized as follows: Section 2 is the background, introducing the basics of deep reinforcement learning, the working principle of the circulating cooling water system, and the system model.Section 3 is the methods, which Outlines the design of adaptive control structure based on TD3-RTM.Section 4 is the experiment and analysis of results.Section 5 is the conclusion, which summarizes this study and puts forward the future research direction.

Background

10The prerequisite for combining the control of a circulating cooling water system with reinforcement learning is establishing a Markov model of the circulating cooling water system.The working principle and model of the circulating cooling water system and Markov decision process (MDP) based on the circulating cooling water system are described below.

Circulating cooling water system

11The circulating cooling water system comprises a temperature sensor, flowmeter, pressure sensor, heat exchanger, electric control valve, manual butterfly valve, check valve, frequency conversion pump, and other equipment.The schematic system diagram is shown in Fig 1.

12The cold-water flow into the line through the electric regulating valve M 1 .When the pressure sensor P 1 detects that the pressure in the main line of the system exceeds the safety value required by the system, the opening of the electric regulating valve M 2 increases and discharges part of the cold water for pressure relief.At the same time, M 2 is connected to the check valve to prevent backflow.Another amount of cold water enters the main line through M 1 , is detected by the flow meter and temperature sensor T 2 , and then enters the heat exchanger.As the heat exchange proceeds, some hot water is discharged through an electrically regulated valve M 4 connected to a check valve.Another part of the hot water is mixed with the cold water through an electrically controlled valve M 3 .This cycle ensures that the cold water flowing into the heat exchanger has a constant temperature, thus ensuring the stability and safety of the system.

13Flow and temperature are crucial control objectives in a circulating cooling water system.To simplify modeling and control complexity, this paper focuses on these two critical variables as the primary targets for controlling the circulating cooling water system.On the other hand, over the past decades, the successful application of single-variable control theory has demonstrated the convenience and effectiveness of using transfer functions to express and analyze control systems.Therefore, transfer function matrices are employed in this paper to describe and analyze circulating cooling water systems.

14This paper represents the circulating cooling water system as a multivariate model with two inputs and outputs, as shown in The transfer functions G 11 , G 12 , G 21 , and G 22 , which represent the dynamic behavior of the system, need to be identified, and the best pairing variables need to be found for the controller design.Therefore, the best-paired variables are found by selecting different variable pairs to observe the regulation state of the system during the experiment and then collecting data on the input and output quantities of the system at a steady state.For the collected system data, the data is firstly pre-processed to remove the outliers and noise.Then the transfer function model G(S) of the circulating cooling water system [31] is obtained using the MATLAB system identification toolbox, as shown in Eq 1.

Markov decision model of circulating cooling water system

15The mathematical foundation and modeling tool of reinforcement learning is the MDP.An MDP usually comprises state space s, action space a, state transition function P, reward function r, and discount factor γ. At any time step t, the agent first observes the current state s t of the environment and the current corresponding reward value r t .Based on this state and reward information, the agent acts a t and obtains the state s t+1 and the reward r t+1 from the environment for the next step.The interaction between the reinforcement learning agent and the environment under the control system is shown in Fig 3.

16In control system terminology, the term "agent" refers to the designed controller; the "environment" includes the system outside the controller, which, in this paper, refers explicitly to the circulating cooling water system.The policy represents the optimal control behavior sought by the designer.As shown in Fig 3, the interaction process between the agent and the environment indicates that state s represents various features and parameters measured by sensors in the circulating cooling water system, such as flow and temperature.Action a illustrates the opening value of the electric regulating valve determined by the agent based on the current state of the circulating cooling water system.Reward r indicates the feedback obtained by the agent after taking specific actions in specific conditions.Rewards are used to evaluate the quality of the agent's behavior and guide decision-making in different states.In the context of the circulating cooling water system, rewards can be used to measure the control effectiveness and performance of the system.In deep reinforcement learning, state transition function P is often unknown, so the agent needs to estimate the state transition probability through interaction with the environment and learn and optimize control strategies.The design of the

Methods

17In this study, a deep reinforcement learning approach is used to design an adaptive controller for the circulating cooling water system.In deep reinforcement learning, the neural network is used as the value function or parameterized policy, while the gradient optimization method is used to optimize the loss.Here, the twin delayed deep deterministic policy gradient [32] (TD3) algorithm, which is an actor-critic framework to deal with continuous action space problems, is employed to optimize the control parameters in the circulating cooling water system.

18The TD3 algorithm is a deep reinforcement learning algorithm based on the Actor-Critic framework based on the Deep Deterministic Policy Gradient [33] (DDPG) algorithm.Since the value network of DDPG tends to overestimate the action value function, the TD3 algorithm has made improvements in the following three aspects to address the shortcomings of the DDPG algorithm: with truncated double Q learning, the problem of overestimation of the critic network is alleviated; the robustness and smoothness of the algorithm are improved by adding noise that obeys a truncated normal distribution to the output action of the target policy network; make the policy network and the three target networks update less frequently than the value network, this method can reduce the variance of the approximate action-value function, and a better policy can be obtained.The TD3 algorithm was selected for controlling the circulating cooling water system in this study due to its capability to handle continuous action spaces, utilization of twin Q networks to mitigate overestimation bias, and implementation of delayed policy updates and soft updates to reduce function approximation errors, thereby delivering more stable and precise control.Furthermore, TD3's deep neural networks are proficient in effectively modeling the complex nonlinear and multivariate characteristics of the system, facilitating real-time adaptation and optimized control, thereby enhancing system performance.

19Choosing an appropriate deep reinforcement learning algorithm is only part of designing a controller.In contrast, the design of states, actions, and rewards in reinforcement learning are crucial in determining the agent's learning capabilities, control performance, and adaptability to dynamic environments.Thoughtful and well-tailored designs of these elements are essential for successful and efficient learning in various applications.The following will explain the selection and design of states, actions, and reward functions.The state reflects essential information during the interaction between the agent and the environment, and the selection of the state space directly affects the agent's decision-making, thereby influencing the overall control performance of the system.Therefore, the state should contain sufficient information to describe the current stage.In the circulating cooling water system, where the actuator exhibits nonlinear characteristics, and the process gain varies with different manipulated variables, the chosen state space in this study is as follows:

20Where, eF = F sp −F and eT = T sp −T represent the control error values of the flow and temperature loops, respectively.R eFdt and R eTdt are the error integrals.F and T represent the historical output measurement values of flow and temperature, respectively.Fsp and Tsp are the setpoints for flow and temperature.a 1 and a 2 are the manipulated variable values for the flow and temperature loops, respectively, which are the action values output by the agent.

Action.

21Actions represent the actions taken by the agent in specific states, and the agent's task is to choose appropriate actions in different states to maximize its long-term rewards.In reinforcement learning, actions are typically determined by the agent's policy, and in control systems, they correspond to the manipulated variables applied to the system.In this study, the action values correspond to the opening values of the electric regulating valves in the circulating cooling water system, where a 1 represents the opening value of the electric regulating valve M 1 , and a 2 represents the opening value of the electric regulating valve M 3 .The range of action values is [0, 100], making the action space:

223.1.3Reward.The reward function is a crucial concept in reinforcement learning, which is used to evaluate the performance of an agent in an environment.The reward function is typically a mapping from the state and action space to a real number, representing the desirability of an action taken by the agent in each state.In reinforcement learning, the objective of the agent is to maximize the accumulated reward by interacting with the environment.Therefore, the reward function can be viewed as the objective function of the reinforcement learning task.By adjusting its policy, the agent can attempt to maximize the reward function and learn how to take optimal actions in different states of the environment.

23In some reinforcement learning tasks, the reward function is typically designed such that the agent receives a reward only when the output values satisfy the system requirements.This type of reward function is known as a sparse reward function.In simple environments like single-variable systems, using a sparse reward function can still yield good control results.However, in a multivariate system, transferring the state of the system environment to the target state becomes more complex and uncertain than that of a univariate system.Therefore, based on the characteristics of circulating cooling water systems, this paper designs a dense reward function.For the flow loop, the dense reward function is set as follows:

24Where eF t represents the error value of the current moment of flow.φ 1 and φ 2 represent the thresholds of error values in different intervals of flow.When the error value satisfies the system goal requirements, give the agent a large reward value to encourage the current behavior.In this paper, φ 1 equals 0.1, and φ 2 equals 5. Furthermore, the temperature loop reward function is designed in the same way as the flow loop.Therefore, the reward function of the temperature loop is defined as:

25Where eT t represents the error value of the current moment of temperature.η 1 and η 2 represent the thresholds of error values in different intervals of temperature.In this paper, η 1 equals 0.1, and η 2 equals 2.

26Finally, the reward function r t based on the circulating cooling water system is defined as

Network structure and algorithm design

27The network structure of the TD3 algorithm comprises four principal components: the Actor network, the Critic network, the Target Actor network, and the Target Critic network.

28The Actor network generates a policy for continuous actions based on the current state.The Critic network is responsible for estimating the Q-value for the current state and action pair.

29The Target Actor and Target Critic networks serve as target networks for the Actor and Critic networks, respectively.The Target Actor and Target Critic networks have the same structure as the Actor and Critic networks, respectively, and their parameters are updated through soft updates from the Actor and Critic networks.In this study, the Actor and Critic networks are implemented with three-layer neural networks, comprising 128 and 64 neurons in their respective hidden layers.The rectified linear unit (ReLU) function is employed as the activation function.Furthermore, as the control actuator in the circulating cooling water system is an electric regulating valve with a range of 0 to 100, the output of the Actor network is normalized to the range of [-1, 1] using the tanh function and then scaled using the scaling operation.

30To enhance the exploration and learning capabilities of the agent, this paper introduces a reference trajectory model.This model guides the agent to converge more rapidly to the desired control policy during the learning process, thereby improving the control effectiveness and learning speed of reinforcement learning.The reference trajectory model utilized in this study is:

31In addition, in practical applications, setpoints may experience sudden changes or instability, which can lead to unstable performance or oscillations in the control system.By introducing the reference trajectory model, the setpoint signal can be smoothed to make its changes more gradual and smoother, thereby helping to reduce oscillations and instability in the control system.In this paper, τ r equals 0.2.The design of the control system is illustrated in Fig 4.

32In this study, a controller for the circulating cooling water system is designed based on the TD3 algorithm.Its control strategy is shown in Algorithm 1.

Algorithm 1. TD3 algorithm in circulating cooling water control system.

33Initialize replay buffer M, initialize critic network

34Randomly initialize the flow and temperature setpoints within the range allowed by system.select action

35is the soft update factor.

Experiments and analysis of results

36In the training process of TD3-RTM in this study, the total number of episodes is set to 2000, with a sampling time of 0.1 seconds and a maximum simulation duration of 20 seconds.To enhance the disturbance rejection control performance of the system, random step signals with amplitudes ranging from -5 to 5 are applied at the control ports of the flow and temperature loops at the 15th second.The reference step input signals for the flow (m^3/h) and temperature (˚C) are set to [550, 650] and [20,30], respectively, to achieve robustness to significant setpoint changes in the system.Since TD3-RTM is based on the TD3 algorithm, the primary hyperparameters used in the training process of the TD3 algorithm are shown in Table 1.All computations were carried out on a standard PC (Win11, AMD 4600H CPU@3.00GHz,16GB) in MATLAB/Simulink R2022b.To validate the effectiveness of TD3-RTM, comparisons were made with the classical PID controller, fuzzy PID controller, DDPG algorithm, and TD3 algorithm.To be fair, the PID parameters for classical PID control and fuzzy PID control were obtained using the Ziegler-Nichols method.The neural network architecture, number of neurons, and learning rate used in different deep reinforcement learning algorithms were the same.Each task was run for 2000 episodes, and the experiments were repeated five times with different random seeds.The recorded results represent the average reward value for every 20 episodes.The learning curves are shown in Fig 5.The results in Fig 6 indicate that TD3-RTM can converge to the desired control policy faster and with more stable convergence performance under different random initial states.Additionally, TD3-RTM achieves higher total rewards after 2000 episodes of learning.

Step response and disturbance rejection performance simulation experiment

37To validate the control effectiveness of TD3-RTM in the circulating cooling water system, a 100-second simulation experiment was conducted with a flow of 600 m^3/h and a temperature of 25˚C.At the 60-second and 80-second marks, disturbance signals with amplitudes of 5 and -5 were applied to the control ports of the flow and temperature loops.The control performance of different control methods is shown in Figs 6 and 7.

38As shown in Fig 6, it can be observed that in the flow control loop, the deep reinforcement learning controller exhibits faster response speed and minor overshoot compared to the classical PID controller and fuzzy PID controller in the step response.TD3-RTM is less affected when faced with external disturbance signals, while the DDPG algorithm shows steady-state error and the TD3 algorithm exhibits oscillations.The oscillations in the TD3 algorithm cause continuous changes in the control signal, which can damage the actuators in the circulating cooling water system and lead to system instability.As shown in Fig 7, in the temperature control loop, the PID controller, fuzzy PID controller and DDPG algorithm have relatively slow response speeds, while the TD3 algorithm and TD3-RTM achieve good control performance.The deep reinforcement learning controller performs better when subjected to external disturbance signals.The performance parameters for different control methods are shown in Table 2. From Table 2, compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively.In addition, the overshooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3.Generally, for industrial energy-consuming scenarios such as the circulating cooling water system, a controller with lower IAE and shorter settling time can save more energy.Although the DDPG algorithm shows a shorter rise time and no overshoot in the flow control loop, it exhibits a longer rise time and settling time in the temperature control loop.Its IAE is the largest compared to TD3 and TD3-RTM.Overall, TD3-RTM demonstrates significant advantages in both control loops.

Tracking performance simulation experiment

39To validate the tracking performance of TD3-RTM, this study designed different setpoints for both the flow control loop and the temperature control loop and conducted 300 seconds of simulation experiments.The control effects of different control methods are shown in Figs 8 and 9.

40As shown in Fig 8, in the flow control loop, when the setpoint is changed, the DDPG algorithm becomes unstable, and both the PID controller and fuzzy PID controller exhibit significant overshoot and long settling times at different setpoints.On the other hand, the TD3 algorithm and TD3-RTM outperform other methods significantly.In Fig 9, although all controllers can track the given setpoints, their transient responses vary widely.The DDPG algorithm can reach the setpoint at the end of each simulation time, but its settling time is longer, and its performance is inferior to the PID and fuzzy PID controllers.However, TD3-RTM's performance during setpoint changes is comparable to the TD3 algorithm, with the fastest response speed and good settling time.Overall, TD3-RTM performs well in both control loops and shows excellent potential.

Conclusion

41This paper presents a novel adaptive control structure based on the Twin Delayed Deep Deterministic Policy Gradient algorithm under a reference trajectory model (TD3-RTM) for addressing complex control problems in recirculating cooling water systems.Initially, the TD3 algorithm is employed to construct a deep reinforcement learning agent, enabling it to select appropriate actions for each loop based on system state features.Additionally, the multivariable characteristics of the recirculating cooling water system necessitate the design of a dense reward function, which enables the agent to receive various rewards through interactions with the environment and update its network, thereby gradually approaching the optimal policy.Furthermore, the introduction of the reference trajectory model accelerates the convergence speed of the agent and reduces system oscillations and instability.Simulation results show that compared to PID, fuzzy PID, DDPG and TD3, the TD3-RTM method improved the transient time in the flow loop by 6.09s, 5.29s, 0.57s, and 0.77s, respectively, and the Integral of Absolute Error(IAE) indexes decreased by 710.54, 335.1, 135.97, and 89.96, respectively, and the transient time in the temperature loop improved by 25.84s, 13.65s, 15.05s, and 0.81s, and the IAE metrics were reduced by 143.9, 59.13, 31.79, and 1.77, respectively.In addition, the overshooting of the TD3-RTM method in the flow loop was reduced by 17.64, 7.79, and 1.29 per cent, respectively, in comparison with the PID, the fuzzy PID, and the TD3.To further enhance safety and system stability, regular monitoring of system performance and adjusting as necessary are encouraged in practical applications.Furthermore, the utilization of backup control strategies to address exceptional circumstances that may be beyond the scope of deep reinforcement learning algorithms ensures the system's stability in extreme conditions.This research validates the potential of deep reinforcement learning in the circulating cooling water system and offers novel solutions and insights for practical engineering control problems.Although the method proposed in this paper achieves good control performance in simulation experiments and shows advantages over both traditional control methods and other deep reinforcement learning methods, there are some potential limitations, such as applicability limitations, computational resource requirements, hyper-parameter sensitivity, adaptability to environmental variations, and the challenge of practical system validation.Further optimization and extension of the proposed control method can be explored for broader industrial applications, along with investigating other deep reinforcement learning algorithms for complex system control.This will contribute to advancing intelligent control technology in industrial automation, enhancing production efficiency and resource utilization.

Fig 2 .

42The input variables are the opening of electric control valve M 1 and M 3 .The output variables are the water flow and temperature into the heat exchanger.The linear transfer functions G 11 , G 12 , G 21 , and G 22 represent the relationship between the input and output variables of the system, where the first number represents the output, and the second number represents the input.For example, G 21 represents the effect of valve opening M 1 on temperature.

Fig 1 .

43Fig 1.Schematic diagram of circulating cooling water system.https://doi.org/10.1371/journal.pone.0307767.g001

Fig 2 .

44Fig 2. Model of circulating cooling water system.https://doi.org/10.1371/journal.pone.0307767.g002

Fig 3 .

45Fig 3. Agent and environment interaction process.https://doi.org/10.1371/journal.pone.0307767.g003

Fig 4 .

46Fig 4. Control structure of circulating cooling water based on TD3-RTM.https://doi.org/10.1371/journal.pone.0307767.g004

Fig 6 .

47Fig 6.Output results of different controllers at the flow setpoint of 600 m^3/h.https://doi.org/10.1371/journal.pone.0307767.g006

Fig 7 .

48Fig 7. Output results of different controllers at the temperature setpoint of 25˚C.https://doi.org/10.1371/journal.pone.0307767.g007

Fig 8 .

49Fig 8. Output results for different controllers in the flow loop at different setpoints.https://doi.org/10.1371/journal.pone.0307767.g008

Fig 9 .

50Fig 9. Output results for different controllers in the temperature loop at different setpoints.https://doi.org/10.1371/journal.pone.0307767.g009

Learning curve of the control task.

51https://doi.org/10.1371/journal.pone.0307767.g005

Table 2 . Comparison of Controllers Performance Parameters.

52https://doi.org/10.1371/journal.pone.0307767.t002

참고문헌 32건

  1. Design and Simulation Test of Advanced Secondary Cooling Control System of Continuous Casting Based on Fuzzy Self-Adaptive PID Journal of Iron and Steel Research International · Springer Nature · 2011 10.1016/s1006-706x(11)60006-x
  2. Dynamic modelling and parametric control for the polymer electrolyte membrane fuel cell system Journal of Power Sources · Elsevier BV · 2013 10.1016/j.jpowsour.2012.12.116
  3. Temperature control for a vehicle climate chamber using chilled water system Applied Thermal Engineering · Elsevier BV · 2016 10.1016/j.applthermaleng.2016.05.168
  4. Economic hybrid non-linear model predictive control of a dual circuit induced draft cooling water system Journal of Process Control · Elsevier BV · 2017 10.1016/j.jprocont.2017.02.009
  5. Mastering the game of Go without human knowledge Nature · Nature Portfolio · 2017 10.1038/nature24270
  6. Modelling and predictive control of a recirculating cooling water system for an industrial plant Journal of Process Control · Elsevier BV · 2018 10.1016/j.jprocont.2018.04.009
  7. Temperature Stabilization of the Klystron Cooling Water at the KOMAC Journal of the Korean Physical Society · Springer Science+Business Media · 2018 10.3938/jkps.73.1157
  8. Learning agile and dynamic motor skills for legged robots Science Robotics · American Association for the Advancement of Science · 2019 10.1126/scirobotics.aau5872
  9. Continuous control with deep reinforcement learning arXiv (Cornell University) · Cornell University · 2016
  10. A reinforcement neural architecture search method for rolling bearing fault diagnosis Measurement · Elsevier BV · 2019 10.1016/j.measurement.2019.107417
  11. Model-free control method based on reinforcement learning for building cooling water systems: Validation by measured data-based simulation Energy and Buildings · Elsevier BV · 2020 10.1016/j.enbuild.2020.110055
  12. Vision-Based Autonomous Navigation Approach for a Tracked Robot Using Deep Reinforcement Learning IEEE Sensors Journal · IEEE Sensors Council · 2020 10.1109/jsen.2020.3016299
  13. A Lightweight Simulation Framework for Learning Control Policies for Autonomous Vehicles in Real-World Traffic Condition IEEE Sensors Journal · IEEE Sensors Council · 2020 10.1109/jsen.2020.3036532
  14. Contrastive Representation Learning: A Framework and Review IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.3031549
  15. Learning, exploitation and bias in games PLoS ONE · Public Library of Science · 2021 10.1371/journal.pone.0246588
  16. Hierarchical Program-Triggered Reinforcement Learning Agents for Automated Driving IEEE Transactions on Intelligent Transportation Systems · Institute of Electrical and Electronics Engineers · 2021 10.1109/tits.2021.3096998
  17. An advanced methodology to enhance energy efficiency in a hospital cooling-water system Journal of Building Engineering · Elsevier BV · 2021 10.1016/j.jobe.2021.102839
  18. Optimizing hyperparameters of deep reinforcement learning for autonomous driving based on whale optimization algorithm PLoS ONE · Public Library of Science · 2021 10.1371/journal.pone.0252754
  19. A Cascade Proportional Integral Derivative Control for a Plate-Heat-Exchanger-Based Solar Absorption Cooling System Energies · Multidisciplinary Digital Publishing Institute · 2021 10.3390/en14134058
  20. Finding the optimal multilayer network structure through reinforcement learning in fault diagnosis Measurement · Elsevier BV · 2021 10.1016/j.measurement.2021.110377
  21. Applications of reinforcement learning for building energy efficiency control: A review Journal of Building Engineering · Elsevier BV · 2022 10.1016/j.jobe.2022.104165
  22. Research on Temperature Control of Fuel-Cell Cooling System Based on Variable Domain Fuzzy PID Processes · Multidisciplinary Digital Publishing Institute · 2022 10.3390/pr10030534
  23. Optimal control method of HVAC based on multi-agent deep reinforcement learning Energy and Buildings · Elsevier BV · 2022 10.1016/j.enbuild.2022.112284
  24. Operation optimization of existing industrial circulating water system considering variable frequency drive Process Safety and Environmental Protection · Elsevier BV · 2022 10.1016/j.cherd.2022.08.010
  25. Online reinforcement learning with passivity-based stabilizing term for real time overhead crane control without knowledge of the system model Control Engineering Practice · Elsevier BV · 2022 10.1016/j.conengprac.2022.105302
  26. Design of Gas Turbine Cooling System Based on Improved Jumping Spider Optimization Algorithm Machines · Multidisciplinary Digital Publishing Institute · 2022 10.3390/machines10100909
  27. Design and optimization of thermal strategy to improve the thermal management of proton exchange membrane fuel cells Applied Thermal Engineering · Elsevier BV · 2022 10.1016/j.applthermaleng.2022.119880
  28. Optimization of the circulating cooling water mass flow in indirect dry cooling system of thermal power unit using artificial neural network based on genetic algorithm Applied Thermal Engineering · Elsevier BV · 2023 10.1016/j.applthermaleng.2023.120040
  29. A New Solution to the PID18 Challenge: Reinforcement-Learning-based PI Control 2022 34th Chinese Control and Decision Conference (CCDC) · 2022 10.1109/ccdc55256.2022.10033480
  30. Operation Optimization of Circulating Cooling Water System Based on Adaptive Differential Evolution Algorithm International Journal of Computational Intelligence Systems · Springer Nature · 2023 10.1007/s44196-023-00191-z
  31. Robust safe reinforcement learning control of unknown continuous-time nonlinear systems with state constraints and disturbances Journal of Process Control · Elsevier BV · 2023 10.1016/j.jprocont.2023.103028
  32. Learning Multirobot Hose Transportation and Deployment by Distributed Round-Robin Q-Learning PLoS ONE · Public Library of Science · 2015 10.1371/journal.pone.0127129