Temperature control method and device for air source heat pump heating system based on reinforcement learning
By designing the temperature control strategy of the air source heat pump heating system based on reinforcement learning methods, the problem of difficulty in optimizing the operation of the air source heat pump heating system in the existing technology is solved, and the automatic control of the system and the maximization of user comfort are achieved.
Patent Information
- Application Number
- CN202410745741.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-11
AI Technical Summary
The existing temperature control methods of air source heat pump heating systems lack effective optimization control strategies, resulting in high operating costs and difficulty in ensuring user comfort. Especially under the time-of-use electricity price policy, it is difficult to achieve optimal operation of the system.
A method based on reinforcement learning is used to establish a mathematical model of the air source heat pump heating system, and a Markov decision process model is designed through the Q-learning algorithm to select the appropriate state space, action space, state transition probability and reward function to achieve intelligent optimized temperature control strategy.
It realizes the automatic control of the air source heat pump heating system, reduces operating costs, maintains the user's indoor temperature comfort under the background of time-of-use electricity prices, and maximizes the efficient operation of the system and user comfort.
Smart Images

Figure CN118328458B
Abstract
Description
Technical Field
[0001] The invention relates to a temperature control method and device for an air source heat pump heating system based on reinforcement learning, and belongs to the technical field of heating system optimization control. Background Art
[0002] The rapid development of renewable energy helps to reduce dependence on traditional energy, but the randomness and volatility of its output bring higher challenges to the safe operation of the power system. In order to alleviate the power fluctuation problem caused by the access of new energy to the distribution network, the time-of-use electricity price policy is gradually implemented. By raising the electricity price during peak hours, users are encouraged to use electricity during off-peak hours, thereby balancing electricity demand and supply, reducing the load on the power grid, improving electricity utilization efficiency, and reducing energy waste. At the same time, as modern information technology has set off a wave of digital revolution, direct load control (DLC) based on information and communication technology can cooperate with the power generation side, using a large number of loads with energy storage characteristics such as air conditioners, refrigerators, water heaters, and heat pumps, and participate in the active power dispatch of the power system on multiple time scales by switching or changing control parameters in a short time without obvious perception by users. On the other hand, with the continuous implementation of the "coal to electricity" policy, clean energy heating represented by electric heating has gradually replaced traditional heating methods, with significant carbon reduction effects. Among various electric heating equipment, air source heat pumps have shown great advantages, broad application prospects, and a stable market size.
[0003] Air source heat pumps are mostly used in centralized heating scenarios, providing heating to buildings or communities through heating pipe networks. Therefore, they have a certain heat storage capacity. Combined with the time-of-use electricity price policy, the air source heat pump heating system (ASHP-HS) can achieve the purpose of optimized operation by adjusting its own power consumption, while ensuring the thermal comfort of users and reducing the cost of heating electricity, which helps to alleviate the peak load pressure of the power grid during the peak period of power generation and consumption, and promote the safe and stable operation of the power grid. In order to achieve the optimized operation of the air source heat pump heating system itself in combination with the time-of-use electricity price, and to be able to respond to the power in time when there is a peak load demand, it is necessary to design a control strategy for the heating system. For the air source heat pump heating system, its control means can be divided into quality regulation to adjust the temperature of the circulating hot water, quantity regulation to adjust the flow of the circulating hot water, and quality-quantity regulation that combines the two. However, due to the various influencing factors of the operation process of the air source heat pump heating system, the mechanism modeling and parameter identification are complex, which brings difficulties to the design of its optimized operation control strategy.
[0004] In recent years, artificial intelligence technology has been continuously developing, and research on the application of reinforcement learning (RL) to control complex systems has begun to emerge. Deep reinforcement learning can directly make optimal decision outputs based on the input multi-dimensional data. It is an end-to-end decision control system with wide application potential. "Deep reinforcement learning framework for dynamic pricing demand response of regenerative electric heating" (Zhong S, Wang X, Zhao J, et al. Deep reinforcement learning framework for dynamic pricing demand response of regenerative electric heating [J]. Applied Energy, 2021, 288: 116623.) proposed a pricing model for electric heating systems participating in demand response based on a deep reinforcement learning framework. The proposed framework considers the quantification of user behavior of demand response participants and the differences between users. This study uses the Weber-Fechner law and clustering algorithm to construct a quantitative response feature model, and uses a deep Q network to obtain dynamic subsidy prices. The framework can provide a more reasonable, applicable and intelligent control strategy for regenerative electric heating systems; however, since the scheme formulates the electricity subsidy price of the heating system, it cannot be directly applied to the temperature control of the air source heat pump heating system. Energy-saving control of subway station air-conditioning system based on reinforcement learning (Jiao Huanyan, Feng Haodong, Wei Dong, et al. Energy-saving control of subway station air-conditioning system based on reinforcement learning [J]. Control and Decision, 2022, 37(12): 3139-3148.) proposes a reinforcement learning-based energy-saving control method for subway station air-conditioning system. Aiming at the problem of high energy consumption of subway station air-conditioning system, an energy-saving control strategy of air-conditioning system based on reinforcement learning is proposed. Firstly, a neural network is used to establish an air-conditioning system model as a simulation environment for offline training of intelligent agents to solve the problem of long convergence time of online training of model-free reinforcement learning methods; then, in order to improve the efficiency of the algorithm, a deep deterministic policy gradient algorithm based on multi-step prediction is proposed for the characteristics of multi-dimensional continuous action space of subway station air-conditioning system, and an intelligent agent framework is designed to be used for interactive training with the environment model; finally, a simulation experiment is carried out based on the measured operation data of a subway station in Wuhan. The results show that the proposed control strategy has good temperature tracking performance, can ensure the comfort of the platform, and saves about 17.908% of energy compared with the current actual system. However, this study uses model-free deep reinforcement learning, which requires a large amount of actual operating data to train the system model. On the other hand, model-free reinforcement learning also has certain limitations in setting constraints.Jung Hosung. An Optimal Charging and Discharging Scheduling Algorithm of Energy Storage System to Save Electricity Pricing Using Reinforcement Learning in Urban Railway System[J]. Journal of Electrical Engineering Technology, 2021, 17(1): 1-9. proposed an optimal charging and discharging scheduling algorithm for energy storage system based on reinforcement learning to save electricity pricing in the Korean urban railway system. First, the urban railway system was modeled, including the energy storage system, the electricity pricing rate, and the change in the operating speed of the energy storage system. Then, the agent reinforcement learning was performed to reduce the peak power demand through the DQN algorithm, saving the total electricity price. This study provides a reference idea for the reinforcement learning framework for the optimal operation of the air source heat pump heating system, but it is not suitable for the temperature control strategy of the air source heat pump heating system. Gao Y, Matsunami Y, Miyata S, et al. Operational optimization for off-grid renewable building energy system using deep reinforcement learning [J]. Applied Energy, 2022, 325: 119783. The off-grid operation of renewable building energy systems and the safety of their batteries (preventing degradation) are taken as optimization objectives. Based on a real building energy system, the optimization objective is achieved by controlling the operation of generators, solar photovoltaics, and batteries. A detailed reward function design and a complete reinforcement learning workflow are introduced through Gaussian distribution. Based on the measured data set of existing buildings in Japan, two deep reinforcement learning algorithms are trained and verified through offline reinforcement learning. This study provides a reference for the operation control of air source heat pump heating systems. At the same time, the two-objective optimization control process designed by it also has certain reference value, but it is not suitable for the temperature control strategy of air source heat pump heating systems.A multi-zone residential HVAC thermal comfort control method based on deep reinforcement learning is proposed in the paper "Energy-efficient control of thermal comfort in multi-zone residential HVAC via reinforcement learning" (Kai ZD, Ming QF, Ping JC, et al. Energy-efficient control of thermal comfort in multi-zone residential HVAC via reinforcement learning [J]. Connection Science, 2022, 34 (1): 2364-2394.). Firstly, a SVR-DNN model consisting of support vector regression and deep neural network is designed to predict the thermal comfort value. Then, based on the output of the SVR-DNN model, the deep deterministic policy gradient (DDPG) is applied to realize the optimal control strategy of HVAC thermal comfort. However, this study adopts model-free deep reinforcement learning, which requires a large amount of actual operation data for training the system model. On the other hand, model-free reinforcement learning also has certain limitations in setting constraints.
[0005] However, there are few studies on the application of reinforcement learning to solve the temperature control method of air source heat pump heating system. Therefore, the present invention proposes a temperature control method and device for an air source heat pump heating system based on reinforcement learning. Summary of the invention
[0006] In order to solve the above problems, the present invention proposes a temperature control method and device for an air source heat pump heating system based on reinforcement learning, which can ensure the comfort of users while achieving optimized operation of the heating system.
[0007] The technical solution adopted by the present invention to solve the technical problem is:
[0008] In a first aspect, an embodiment of the present invention provides a temperature control method for an air source heat pump heating system based on reinforcement learning, comprising the following steps:
[0009] Establish a mathematical model of the air source heat pump heating system according to the composition of the air source heat pump heating system;
[0010] Establishing a heating system MDP model based on the Q-learning algorithm, and selecting heating system MDP (Markov Decision Process) model parameters, wherein the heating system MDP model parameters include a state space set S, a discrete action space set A, a state transition probability p, a reward function R, and a discount rate γ;
[0011] Initialize the heating system environment state S t, and selects control action A based on the s-geedy strategy t ;
[0012] Execute control action A t Get instant rewards R r ;
[0013] Update execution control action A t The heating system environmental state S r+1 ;
[0014] Storage state transfer data (S r , A r ,R r ,S t+1 ), control gradually reduces the exploration probability ε The value of is iterated until the learning process ends.
[0015] As a possible implementation of this embodiment, the air source heat pump heating system comprises an air source heat pump unit, a circulating water pump, a heating pipeline and all the buildings heated by the pipeline in a certain area.
[0016] As a possible implementation of this embodiment, the establishment of a mathematical model of the air source heat pump heating system includes:
[0017] (1) On the heat source side, the electric power consumed by the air source heat pump heating system is the power consumed by the heat pump unit :
[0018] (1)
[0019] In the formula, is the rated power of the air source heat pump unit, is the number of heat pumps in operation, The switch status of the air source heat pump, 1 for on and 0 for off;
[0020] Define the heating power of the air source heat pump heating system:
[0021] (2)
[0022] in, is the system heating power, is the energy efficiency ratio of the air source heat pump unit;
[0023] (2) Considering the transmission delay of the heating network, according to the first law of thermodynamics, the air source heat pump water supply temperature changes with time. t The changes are shown in the following formula:
[0024] (3)
[0025] in, is the water supply temperature; is the heat capacity of the circulating water; is the thermal conductivity of the circulating water; is the return water temperature; The time required to heat the water for the heat pump;
[0026] The change of return water temperature over time is shown in the following formula:
[0027] (4)
[0028] In the formula, The heat exchanged between the circulating hot water and the user side;
[0029] Considering the central heating terminal of the heat pump system as a whole, the heat exchange between the circulating hot water and the terminal room is:
[0030] (5)
[0031] In the formula, is the average indoor temperature; The water inlet temperature at the user side; Thermal conductivity for heat exchange between circulating water and room;
[0032] The average indoor temperature change is shown in the following formula:
[0033] (6)
[0034] In the formula, is the equivalent thermal conductance on the user side; is the equivalent heat capacity on the user side;
[0035] Thermal conductivity to circulating water , heat exchange between circulating water and room And the user side equivalent thermal conductivity Perform parameter identification:
[0036] (7)
[0037] in, for water supply delays;
[0038] Select the model type as the state space model and the model order as the first order. The basic form of the mathematical model of the air source heat pump heating system is:
[0039] (8)
[0040] By selecting different input and output variables and transforming equations (3)-(6) into the form of equation (8), the relevant transient parameters can be calculated through the coefficients of the corresponding variables in equation (8).
[0041] As a possible implementation of this embodiment, the state space set S is expressed as:
[0042] (11)
[0043] In the formula, is the number of heat pumps in operation, is the supply water temperature, is the return water temperature, is the indoor temperature.
[0044] As a possible implementation of this embodiment, the expression of the discrete action space set A is:
[0045] (12)
[0046] in, The maximum number of powered-on units.
[0047] As a possible implementation of this embodiment, the reward function R is expressed as:
[0048] (13)
[0049] in, is the current electricity price, Set the temperature for the room. is the weight of the temperature offset reward function, is the thermal comfort weight.
[0050] As a possible implementation of this embodiment, the formula for iteratively updating the action value function of the MDP model of the heating system is:
[0051] (14)
[0052] In the formula, is the learning rate during algorithm training, is the reward value, s t and a t The state and action at a certain moment.
[0053] In a second aspect, an embodiment of the present invention provides a temperature control device for an air source heat pump heating system based on reinforcement learning, comprising:
[0054] A mathematical model building module, used to build a mathematical model of the air source heat pump heating system according to the composition of the air source heat pump heating system;
[0055] An MDP model building module is used to build a heating system MDP model based on a Q-learning algorithm and select heating system MDP model parameters, wherein the heating system MDP model parameters include a state space set S, a discrete action space set A, a state transition probability p, a reward function R, and a discount rate γ;
[0056] Control action selection module, used to initialize the heating system environmental state S t , and selects control action A based on the s-geedy strategy t ;
[0057] Control action execution module, used to execute control action A t Get instant rewards R r ;
[0058] Environment status update module, used to update execution control action A t The heating system environmental state S r+1 ;
[0059] Iterative learning module, used to store state transition data (S r , A r ,R r ,S t+1 ), control gradually reduces the exploration probability ε The value of is iterated until the learning process ends.
[0060] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the electronic device is running, the processor executes the program to implement any of the steps of the above-mentioned reinforcement learning-based temperature control method for an air source heat pump heating system.
[0061] In a fourth aspect, an embodiment of the present invention provides a storage medium having a program stored thereon, and when the program is executed by a processor, the steps of any of the above-mentioned reinforcement learning-based temperature control methods for an air source heat pump heating system are executed.
[0062] The technical solution of the embodiment of the present invention may have the following beneficial effects:
[0063] The technical solution of the embodiment of the present invention is a temperature control method for an air source heat pump heating system based on reinforcement learning. The air source heat pump heating system as a whole is taken as the research object, and a temperature control strategy for the air source heat pump heating system is formulated based on deep reinforcement learning, so as to ensure the comfort of users while realizing the optimized operation of the heating system. The present invention is combined with the background of time-of-use electricity prices, and controls the indoor temperature of users of the heating system while realizing the optimized operation of the heating system itself. The established mathematical model of the heating system simulates the operation process of the actual system well, and the designed MDP model of the heating system based on reinforcement learning can reduce the operating cost of the air source heat pump heating system and maintain the indoor temperature of users around the set value. The present invention realizes the automated and intelligent control of the air source heat pump heating system, ensuring the efficient operation of the air source heat pump heating system and the maximization of user comfort.
[0064] A temperature control device for an air source heat pump heating system based on reinforcement learning according to the technical solution of an embodiment of the present invention has the same beneficial effects as a temperature control method for an air source heat pump heating system based on reinforcement learning according to the technical solution of an embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 is a flow chart of a temperature control method for an air source heat pump heating system based on reinforcement learning according to an exemplary embodiment;
[0066] Figure 2 is a block diagram of a temperature control device for an air source heat pump heating system based on reinforcement learning according to an exemplary embodiment;
[0067] Figure 3 is a water temperature control block diagram based on reinforcement learning according to an exemplary embodiment;
[0068] Figure 4 is a schematic diagram of a centralized heating process of an air source heat pump heating system according to an exemplary embodiment;
[0069] Figure 5 is a schematic diagram showing the number of heat pumps in operation and the outdoor temperature in the actual operation of an air source heat pump heating system according to an exemplary embodiment;
[0070] Figure 6 is a schematic diagram showing the supply and return water temperature and the user's indoor temperature in actual operation of an air source heat pump heating system according to an exemplary embodiment;
[0071] Figure 7 is a comparison diagram between a simulation result and actual data of water supply temperature of a heating system according to an exemplary embodiment;
[0072] Figure 8is a comparison diagram between a simulation result and actual data of a return water temperature of a heating system according to an exemplary embodiment;
[0073] Fig. 9 is a schematic diagram of a time-of-use electricity price according to an exemplary embodiment;
[0074] Fig.10 is a schematic diagram of the number of powered-on machines under reinforcement learning control according to an exemplary embodiment;
[0075] Fig.11 The figure is a diagram showing temperature variation of a heating system under reinforcement learning control according to an exemplary embodiment. DETAILED DESCRIPTION
[0076] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0077] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.
[0078] Example 1
[0079] like Figure 1 As shown, an embodiment of the present invention provides a temperature control method for an air source heat pump heating system based on reinforcement learning, comprising the following steps:
[0080] Establish a mathematical model of the air source heat pump heating system according to the composition of the air source heat pump heating system;
[0081] Establishing a heating system MDP model based on the Q-learning algorithm, and selecting heating system MDP model parameters, wherein the heating system MDP model parameters include a state space set S, a discrete action space set A, a state transition probability p, a reward function R, and a discount rate γ;
[0082] Initialize the heating system environment state S t , and selects control action A based on the s-geedy strategy t ;
[0083] Execute control action A t Get instant rewards Rr ;
[0084] Update execution control action A t The heating system environmental state S r+1 ;
[0085] Storage state transfer data (S r , A r ,R r ,S t+1 ), control gradually reduces the exploration probability ε The value of is iterated until the learning process ends.
[0086] As a possible implementation of this embodiment, the air source heat pump heating system comprises an air source heat pump unit, a circulating water pump, a heating pipeline and all the buildings heated by the pipeline in a certain area.
[0087] As a possible implementation of this embodiment, the establishment of a mathematical model of the air source heat pump heating system includes:
[0088] (1) On the heat source side, the electric power consumed by the air source heat pump heating system is the power consumed by the heat pump unit :
[0089] (1)
[0090] In the formula, is the rated power of the air source heat pump unit, is the number of heat pumps in operation, The switch status of the air source heat pump, 1 for on and 0 for off;
[0091] Define the heating power of the air source heat pump heating system:
[0092] (2)
[0093] in, is the system heating power, is the energy efficiency ratio of the air source heat pump unit;
[0094] (2) Considering the transmission delay of the heating network, according to the first law of thermodynamics, the air source heat pump water supply temperature changes with time. t The changes are shown in the following formula:
[0095] (3)
[0096] in, is the water supply temperature; is the heat capacity of the circulating water; is the thermal conductivity of the circulating water; is the return water temperature; The time required to heat the water for the heat pump;
[0097] The change of return water temperature over time is shown in the following formula:
[0098] (4)
[0099] In the formula, The heat exchanged between the circulating hot water and the user side;
[0100] Considering the central heating terminal of the heat pump system as a whole, the heat exchange between the circulating hot water and the terminal room is:
[0101] (5)
[0102] In the formula, is the average indoor temperature; The water inlet temperature at the user side; Thermal conductivity for heat exchange between circulating water and room;
[0103] The average indoor temperature change is shown in the following formula:
[0104] (6)
[0105] In the formula, is the equivalent thermal conductance on the user side; is the equivalent heat capacity on the user side;
[0106] Thermal conductivity to circulating water , heat exchange between circulating water and room And the user side equivalent thermal conductivity Perform parameter identification:
[0107] (7)
[0108] in, for water supply delays;
[0109] Select the model type as the state space model and the model order as the first order. The basic form of the mathematical model of the air source heat pump heating system is:
[0110] (8)
[0111] By selecting different input and output variables and transforming equations (3)-(6) into the form of equation (8), the relevant transient parameters can be calculated through the coefficients of the corresponding variables in equation (8).
[0112] As a possible implementation of this embodiment, the state space set S is expressed as:
[0113] (11)
[0114] In the formula, is the number of heat pumps in operation, is the supply water temperature, is the return water temperature, is the indoor temperature.
[0115] As a possible implementation of this embodiment, the expression of the discrete action space set A is:
[0116] (12)
[0117] in, The maximum number of powered-on units.
[0118] As a possible implementation of this embodiment, the reward function R is expressed as:
[0119] (13)
[0120] in, is the current electricity price, Set the temperature for the room. is the weight of the temperature offset reward function, is the thermal comfort weight.
[0121] As a possible implementation of this embodiment, the formula for iteratively updating the action value function of the MDP model of the heating system is:
[0122] (14)
[0123] In the formula, is the learning rate during algorithm training, is the reward value, s t and a t The state and action at a certain moment.
[0124] like Figure 2 As shown, an embodiment of the present invention provides a temperature control device for an air source heat pump heating system based on reinforcement learning, comprising:
[0125] A mathematical model building module, used to build a mathematical model of the air source heat pump heating system according to the composition of the air source heat pump heating system;
[0126] An MDP model building module is used to build a heating system MDP model based on a Q-learning algorithm and select heating system MDP model parameters, wherein the heating system MDP model parameters include a state space set S, a discrete action space set A, a state transition probability p, a reward function R, and a discount rate γ;
[0127] Control action selection module, used to initialize the heating system environmental state S t , and selects control action A based on the s-geedy strategy t ;
[0128] Control action execution module, used to execute control action A t Get instant rewards R r ;
[0129] Environment status update module, used to update execution control action A t The heating system environmental state S r+1 ;
[0130] Iterative learning module, used to store state transition data (S r , A r ,R r ,S t+1 ), control gradually reduces the exploration probability ε The value of is iterated until the learning process ends.
[0131] This paper takes the air source heat pump heating system as a whole as the research object, and studies the temperature control strategy of the air source heat pump heating system based on deep reinforcement learning, so as to ensure the comfort of users while realizing the optimized operation of the heating system. Firstly, a model-based reinforcement learning control framework for the air source heat pump heating system is designed, and then the mathematical model of the air source heat pump heating system is established by analyzing the characteristics of the air source heat pump heating system. Finally, a reinforcement learning model of the air source heat pump heating system based on the Q-learning algorithm is designed in combination with the control objectives.
[0132] 1 Water temperature control framework based on reinforcement learning.
[0133] The principle of reinforcement learning is that the agent continuously learns through interaction with the environment and is rewarded or punished in the feedback of the environment. It maximizes the cumulative reward or achieves a specific goal through continuous learning and adjustment of strategies, and finally obtains the best strategy. Unlike supervised learning or unsupervised learning, which have a large amount of past experience or input data, reinforcement learning requires continuous learning of knowledge from a certain environment.
[0134] Reinforcement learning is a learning framework based on Markov process. Markov decision process is a classic expression of decision problem, generally described as a five-tuple . Among them,S is the state space set, A is a set of discrete action spaces, p is the state transition probability, R represents the reward function, Is the discount rate, which represents the conversion factor used to calculate the cumulative reward 𝑈 of the entire process.
[0135] Combined with the actual operation background, the present invention designs a water temperature control framework for air source heat pump heating system based on reinforcement learning. The main process can be divided into three parts:
[0136] (1) Experience generation. Based on ε -greedy strategy, adjusts the start and stop strategy of the heat pump unit according to the indoor temperature and return water temperature, obtains the updated number of units started and water supply temperature according to the air source heat pump heating system model, and the environmental state will change after the relevant equipment executes the control action, and the controller will receive an instant reward.
[0137] (2) Data storage. The controller stores the state transfer process data in the format Stored in a data file, where S t is the current system environment status, A t For the selected control action, R t For instant rewards, S t+1 It is the environmental state of the system at the next moment after the control action is executed.
[0138] (3) Parameter update. During operation, the control gradually reduces the exploration probability. ε As the number of iterations increases, the control action output by the controller gradually stabilizes. When the cumulative system reward no longer changes, the learning process is considered to be over and the controller has obtained the optimal strategy.
[0139] In summary, the precise water temperature control strategy for the air source heat pump heating system based on deep reinforcement learning proposed in this paper is as follows Figure 3 shown.
[0140] 2 Modeling of air source heat pump heating system.
[0141] 2.1 Composition of air source heat pump heating system.
[0142] A heat pump is a highly efficient and energy-saving device that transfers heat from a low-temperature heat source to a high-temperature heat source. It can be divided into ground-source heat pumps, water-source heat pumps, and air-source heat pumps according to the different heat sources. When an air-source heat pump is heating, it uses outdoor air as the heat source, and uses the work of a compressor to transfer heat from an infinitely large air source to a finite indoor space, thereby raising the temperature of the indoor space and achieving the effect of heating the building in winter. A single air-source heat pump unit has a small capacity, and generally multiple heat pump units are used to centrally prepare hot water for user heating, which is then transported to multiple heat inlets or heat users through a circulating water pump through a heating pipe. The centralized heating process is as follows: Figure 4 shown.
[0143] The air source heat pump unit, circulating water pump, heating pipe and all the buildings it heats in a certain area are regarded as a thermal system, which is called the air source heat pump heating system, or heating system for short. At the same time, with the development of monitoring and control systems towards high intelligence, the intelligent control and management technology of air source heat pump heating systems is also constantly improving. The sensors and data transmission units equipped in the heating system can perform real-time data collection and realize centralized monitoring of parameters such as water supply temperature, return water temperature, and number of heat pump switches on the cloud platform, which provides data guarantee for subsequent simulation verification.
[0144] 2.2 Heating system model.
[0145] A heating system contains multiple heat pumps, which together provide heating to buildings in a certain area. The heat pump heats the heat medium (usually water) in the heating network and dissipates heat through the heating network to achieve the purpose of heat transfer. When the heating system provides heating for users, it can be divided into three links: heat input of heat medium, heat transfer of heat medium, and heat output of heat medium. During the heat cycle of the heating system, the heat medium connects the heat source side and the user side, and the entire system is connected together through the heating network. Therefore, this section models the air source heat pump heating system in stages based on the modular modeling concept.
[0146] (1) Heat source measurement and modeling.
[0147] Considering the modeling accuracy and modeling purpose, this topic ignores the dynamic process of heat exchange inside the heat pump, and only considers the relationship between the heating capacity of the air source heat pump and its power consumption. At the same time, the air source heat pump mainly consumes electricity when heating, and the power consumption of the condenser, evaporator and other equipment can be ignored. Therefore, the power consumed by the air source heat pump heating system is mainly the power consumed by the heat pump unit. , as shown in formula (1):
[0148] (1)
[0149] In the formula, is the rated power of the air source heat pump unit, is the number of heat pumps in operation, It is the switch status of the air source heat pump, 1 for on and 0 for off.
[0150] Air source heat pumps absorb heat from the air and generate heat while consuming electrical power. Describes the strength of the air source heat pump unit's heating capacity, which is the ratio of thermal power to electrical power. Considering that the heating capacity of the air source heat pump is related to factors such as the outdoor ambient temperature, the heating power of the air source heat pump heating system is defined as shown in formula (2):
[0151] (2)
[0152] in, is the system heating power, is the energy efficiency ratio of the air source heat pump unit.
[0153] (2) Heating network modeling.
[0154] The thermal inertia of the heating network is large, and the transmission delay of the network needs to be considered in the modeling process. Therefore, the present invention establishes a temperature change model of the circulating hot water in the network that takes into account the time delay. According to the first law of thermodynamics, the water supply temperature of the air source heat pump changes with time. t The change of is shown in formula (3):
[0155] (3)
[0156] in, is the water supply temperature; is the heat capacity of the circulating water; is the thermal conductivity of the circulating water; is the return water temperature; The time required to heat the water for the heat pump.
[0157] Similarly, the change of return water temperature over time is shown in formula (4):
[0158] (4)
[0159] In the formula, The heat exchanged between the circulating hot water and the user side.
[0160] Since the heat pump system central heating terminal needs to be transferred to the house through the heat exchanger, in order to simplify the model, the terminal is considered as a whole, thereby reducing the complexity of modeling. The heat exchange between the circulating hot water and the terminal room is shown in formula (5):
[0161] (5)
[0162] In the formula, is the average indoor temperature; The water inlet temperature at the user side; is the heat exchange thermal conductivity between the circulating water and the room; the average indoor temperature change is shown in formula (6):
[0163] (6)
[0164] In the formula, is the equivalent thermal conductance on the user side; is the equivalent heat capacity on the user side.
[0165] In the circulating hot water temperature model established by equations (3) to (6), the heat capacity Thermal conductivity It is difficult to measure directly, so parameter identification is required. is a steady-state variable and can be directly obtained through actual operation data, as shown in formula (7):
[0166] (7)
[0167] in, Delay in water supply.
[0168] The heat capacity It is a transient variable and requires the help of a specific parameter identification method. Here, the identification method based on system input and output is selected. Compared with the parameter identification method based on the model, the identification method based on system input and output is more flexible and more suitable for the identification of complex models. Considering the characteristics of the air source heat pump model, the subspace method suitable for state space model parameter identification is adopted here, and the identification principle is not repeated here. The model type is selected as the state space model, and the model order is the first order. Its basic form is shown in formula (8):
[0169] (8)
[0170] By selecting different input and output variables and transforming equations (3)-(6) into the form of equation (8), the relevant transient parameters can be calculated through the coefficients of the corresponding variables in equation (8).
[0171] Taking formula (3) as an example, let , , which is transformed into the form of formula (8), as shown in formula (9):
[0172] (9)
[0173] Then the transient heat capacity parameter As shown in formula (10):
[0174] (10)
[0175] Thus, the present invention has established a mathematical model of the air source heat pump heating system, and the operating conditions of the air source heat pump heating system can be understood by performing parameter identification according to actual operating data.
[0176] 3 Reinforcement learning algorithm design.
[0177] 3.1 MDP model of heating system.
[0178] The MDP model parameters of the heating system need to be selected according to the specific target task. Specifically, it can be divided into the state space set , a discrete action space set , state transition probability , the reward function , discount rate .
[0179] First, design the state space. The state space refers to the set of all possible states of the agent when interacting with the environment. In order to distinguish different states and take corresponding actions, the selection of state space parameters should contain enough comprehensive environmental characteristics and conditions to describe the system. However, too large a dimension of the state space will lead to too much information, making the training process very difficult. Analyze the operation process of the air source heat pump heating system. In order to meet the system decision-making requirements and shorten the training time, the number of heat pumps turned on was selected. , water supply temperature , return water temperature and indoor temperature Four parameters are used to characterize each state, as shown in formula (11):
[0180] (11)
[0181] Among them, the number of powered-on machines and the temperature must meet upper and lower limit constraints.
[0182] Then the action space is designed. The actual operation process is to change the supply and return water temperatures by changing the number of air source heat pumps started. Therefore, the action space design is shown in formula (12):
[0183] (12)
[0184] The purpose of designing the reward function is to find the optimal control strategy function, which can reduce energy consumption while satisfying indoor thermal comfort by adjusting the air-conditioning system, as shown in formula (13):
[0185] (13)
[0186] in, is the current electricity price, Set the temperature for the room. is the weight of the temperature offset reward function, is the thermal comfort weight.
[0187] 3.2 Value function design.
[0188] Q-Learning is an algorithm in reinforcement learning that can solve Markov decision problems with incomplete information. Its core is to use a table to represent the action value function. The state at a certain moment Next, take action Get the expected return, that is, the value function corresponding to the state-action pair. The main idea of the algorithm is to build a Q-table table to store state and action. value, and then according to value to select the action that will yield the greatest benefit.
[0189] The Q-Learning algorithm stores and estimates the value functions under different states in the MDP model of the air source heat pump heating system, and iteratively updates the value functions during the process of continuous interaction between the reinforcement learning controller and the controlled area, as shown in formula (14):
[0190] (14) ,
[0191] Where: is the learning rate during algorithm training, is the reward value. A larger learning rate can increase the convergence speed of the algorithm, and a smaller learning rate can improve the stability of the algorithm; max is the maximum value selected. The Q-Learning algorithm continuously collects samples to update The value makes the estimated value closer and closer to the true value, that is, the action of the heat pump unit reaches the preset target.
[0192] The present invention optimizes and trains the reinforcement learning controller through real-time control of state and action, and continuously improves the energy-saving optimization efficiency. ε -geedy decision-making strategy. In this strategy, the agent uses 1- ε The probability of choosing the best action currently known is ε This can prevent learning from falling into the local optimum while ensuring the convergence speed of the algorithm. During the learning and training process, the exploration probability will gradually decrease as the number of interactions increases. ε and eventually tends to ε -geedy strategy.
[0193] 4 Specific example analysis.
[0194] 4.1 Verification of air source heat pump heating system model.
[0195] The experimental data selected the actual operation data of the air source heat pump heating system of a heating system on March 8, 2023, including the number of heat pumps in operation, outdoor ambient temperature, water supply temperature, return water temperature and user indoor temperature. The actual operation data is as follows Figure 5 and Figure 6 shown.
[0196] Combined with the above modeling content, the delay is approximately estimated based on the actual operation data, and the parameters are identified based on the actual operation data of the heating system. The relevant parameters in the simulation and the results obtained by identification are shown in Table 1.
[0197] In order to verify the correctness of the obtained model, the first full start and full stop experimental data of the above heating station from 22:00 on March 12, 2023 to 3:00 on March 13, 2023 were taken. For input, The input and output data and the water supply temperature verification results are as follows: Figure 7 and Figure 8 It can be seen that the established model can simulate the operation status of the heating system well.
[0198] Table 1: Parameter values
[0199]
[0200] It can be seen from the supply and return water temperature comparison chart that due to some simplifications and assumptions in the modeling process, the simulation results are not completely consistent with the actual changes, but the supply and return water changes of the simulation model can basically simulate the supply and return water changes in the actual heat pump station.
[0201] 4.2 Verification of control strategy based on reinforcement learning.
[0202] Based on the obtained simulation model of the air source heat pump heating system, the optimal number of air source heat pumps on and off in one day can be obtained based on the reinforcement learning control strategy. The constraints are given in combination with the design requirements of the heating system, as shown in formula (15):
[0203] (15)
[0204] Exploring Probability ε =0.6, state transition probability p= 0.4, discount rate The user's indoor temperature setting value is set to 22°C, and the time-of-use electricity price is as follows Fig. 9 In order to avoid frequent start and stop of the heat pump, the control instruction time interval is set to 1h.
[0205] like Fig.10 and Fig.11 As shown in the figure, the proposed control scheme based on deep reinforcement learning can control the number of heat pump starts and stops in combination with the time-of-use electricity price to reduce the operating cost of the heating system. According to calculations, the electricity cost of the air source heat pump heating system under the control scheme is 1090 yuan, which is 1204 yuan before optimization. The electricity cost after optimization is reduced by 9.5% compared with that before optimization. The simulation results show that when the electricity price is low, the heating system can increase the heating output by appropriately increasing the number of heat pumps turned on to store some heat for the room; when the electricity price is high, the heating system can reduce the heating output by reducing the number of heat pumps turned on, releasing some of the previously stored heat to avoid the peak electricity price. At the same time, under the action of the reward function, the heating system under the control of reinforcement learning can maintain the user's indoor temperature around the temperature setting value, which is always within the set range, and the user's heating comfort will not be greatly affected, which also indirectly proves the thermal energy storage characteristics of the air source heat pump heating system.
[0206] This paper proposes a temperature control scheme for an air source heat pump heating system based on reinforcement learning. Combined with the background of time-of-use electricity prices, it controls the indoor temperature of users of the heating system while optimizing the operation of the heating system itself. Simulations show that the established air source heat pump heating system model can simulate the operation process of the actual system well, and the designed control strategy based on reinforcement learning can reduce the operating cost of the air source heat pump heating system and maintain the user's indoor temperature around the set value.
[0207] The present invention takes the air source heat pump heating system as a whole as the research object, and formulates the temperature control strategy of the air source heat pump heating system based on deep reinforcement learning, so as to ensure the comfort of users while realizing the optimized operation of the heating system. In combination with the background of time-of-use electricity prices, the present invention controls the indoor temperature of users of the heating system while realizing the optimized operation of the heating system itself. The established mathematical model of the heating system simulates the operation process of the actual system well, and the designed MDP model of the heating system based on reinforcement learning can reduce the operating cost of the air source heat pump heating system and maintain the indoor temperature of users around the set value. The present invention realizes the automated and intelligent control of the air source heat pump heating system, ensuring the efficient operation of the air source heat pump heating system and the maximization of user comfort.
[0208] An embodiment of the present invention provides an electronic device, including a processor, a memory, and a program stored in the memory and executable on the processor. When the electronic device is running, the processor executes the program to implement any of the steps of the above-mentioned reinforcement learning-based air source heat pump heating system temperature control method.
[0209] Specifically, the above-mentioned memory and processor can be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, it can execute the above-mentioned reinforcement learning-based air source heat pump heating system temperature control method.
[0210] Corresponding to the method for starting the above-mentioned application, an embodiment of the present invention further provides a storage medium on which a program is stored. When the program is run by a processor, the steps of any of the above-mentioned reinforcement learning-based air source heat pump heating system temperature control methods are executed.
[0211] The application startup device provided in the embodiment of the present application can be specific hardware on the device or software or firmware installed on the device. The device provided in the embodiment of the present application, its implementation principle and the technical effect produced are the same as those in the aforementioned method embodiment. For the sake of brief description, the parts not mentioned in the device embodiment can refer to the corresponding contents in the aforementioned method embodiment. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can all refer to the corresponding processes in the aforementioned method embodiment, and will not be repeated here.
[0212] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0213] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A temperature control method for air source heat pump heating system based on reinforcement learning, It is characterized in that The following steps are involved: Establish a mathematical model of the air source heat pump heating system according to the composition of the air source heat pump heating system; Establishing a heating system MDP model based on the Q-learning algorithm, and selecting heating system MDP model parameters, wherein the heating system MDP model parameters include a state space set S, a discrete action space set A, a state transition probability p, a reward function R, and a discount rate γ; Initialize the heating system environment state S t , and selects control action A based on the s-geedy strategy t ; Execute control action A t Get instant rewards R t ; Update execution control action A t The heating system environmental state S t+1 ; Storage state transfer data (S t , A t ,R t ,S t+1 ), control gradually reduces the exploration probability ε The value of is iterated until the learning process ends; The mathematical model of the air source heat pump heating system is established, including: (1) On the heat source side, the electric power consumed by the air source heat pump heating system is the power consumed by the heat pump unit : (1), In the formula, is the rated power of the air source heat pump unit, is the number of heat pumps in operation, The switch status of the air source heat pump, 1 for on and 0 for off; Define the heating power of the air source heat pump heating system: (2), in, is the system heating power, is the energy efficiency ratio of the air source heat pump unit; (2) Considering the transmission delay of the heating network, according to the first law of thermodynamics, the air source heat pump water supply temperature changes with time. t The changes are shown in the following formula: (3), in, is the water supply temperature; is the heat capacity of the circulating water; is the thermal conductivity of the circulating water; is the return water temperature; The time required to heat the water for the heat pump; The change of return water temperature over time is shown in the following formula: (4), In the formula, The heat exchanged between the circulating hot water and the user side; Considering the central heating terminal of the heat pump system as a whole, the heat exchange between the circulating hot water and the terminal room is: (5), In the formula, is the average indoor temperature; The water inlet temperature at the user side; Thermal conductivity for heat exchange between circulating water and room; The average indoor temperature change is shown in the following formula: (6), In the formula, is the equivalent thermal conductance on the user side; is the equivalent heat capacity on the user side; Thermal conductivity to circulating water , heat exchange between circulating water and room And the user side equivalent thermal conductivity Perform parameter identification: (7), in, for water supply delays; Select the model type as the state space model and the model order as the first order. The basic form of the mathematical model of the air source heat pump heating system is: (8), By selecting different input and output variables and transforming equations (3)-(6) into the form of equation (8), the relevant transient parameters can be calculated through the coefficients of the corresponding variables in equation (8); The expression of the state space set S is: (11), In the formula, is the number of heat pumps in operation, is the supply water temperature, is the return water temperature, is the indoor temperature; The expression of the discrete action space set A is: (12), in, The maximum number of powered-on units; The expression of the reward function R is: (13), in, is the current electricity price, Set the temperature for the room. is the weight of the temperature offset reward function, is the thermal comfort weight.
2. According to claim 1, the temperature control method of the air source heat pump heating system based on reinforcement learning, It is characterized in that The air source heat pump heating system comprises an air source heat pump unit, a circulating water pump, heating pipes and all buildings heated by the pipes within a certain area.
3. The temperature control method of the air source heat pump heating system based on reinforcement learning according to claim 1 or 2, It is characterized in that The formula for iterative updating of the action value function of the heating system MDP model is: (14) , In the formula, is the learning rate during algorithm training, is the reward value, s t and a t The state and action at a certain moment.
4. A temperature control device for air source heat pump heating system based on reinforcement learning, It is characterized in that include: A mathematical model building module, used to build a mathematical model of the air source heat pump heating system according to the composition of the air source heat pump heating system; An MDP model building module is used to build a heating system MDP model based on a Q-learning algorithm and select heating system MDP model parameters, wherein the heating system MDP model parameters include a state space set S, a discrete action space set A, a state transition probability p, a reward function R, and a discount rate γ; Control action selection module, used to initialize the heating system environmental state S t , and selects control action A based on the s-geedy strategy t ; Control action execution module, used to execute control action A t Get instant rewards R t ; Environment status update module, used to update execution control action A t The heating system environmental state S t+1 ; Iterative learning module, used to store state transition data (S t , A t ,R t ,S t+1 ), control gradually reduces the exploration probability ε The value of is iterated until the learning process ends; The mathematical model of the air source heat pump heating system is established, including: (1) On the heat source side, the electric power consumed by the air source heat pump heating system is the power consumed by the heat pump unit : (1), In the formula, is the rated power of the air source heat pump unit, is the number of heat pumps in operation, The switch status of the air source heat pump, 1 for on and 0 for off; Define the heating power of the air source heat pump heating system: (2), in, is the system heating power, is the energy efficiency ratio of the air source heat pump unit; (2) Considering the transmission delay of the heating network, according to the first law of thermodynamics, the air source heat pump water supply temperature changes with time. t The changes are shown in the following formula: (3), in, is the water supply temperature; is the heat capacity of the circulating water; is the thermal conductivity of the circulating water; is the return water temperature; The time required to heat the water for the heat pump; The change of return water temperature over time is shown in the following formula: (4), In the formula, The heat exchanged between the circulating hot water and the user side; Considering the central heating terminal of the heat pump system as a whole, the heat exchange between the circulating hot water and the terminal room is: (5), In the formula, is the average indoor temperature; The water inlet temperature at the user side; Thermal conductivity for heat exchange between circulating water and room; The average indoor temperature change is shown in the following formula: (6), In the formula, is the equivalent thermal conductance on the user side; is the equivalent heat capacity on the user side; Thermal conductivity to circulating water , heat exchange between circulating water and room And the user side equivalent thermal conductivity Perform parameter identification: (7), in, for water supply delays; Select the model type as the state space model and the model order as the first order. The basic form of the mathematical model of the air source heat pump heating system is: (8), By selecting different input and output variables and transforming equations (3)-(6) into the form of equation (8), the relevant transient parameters can be calculated through the coefficients of the corresponding variables in equation (8); The expression of the state space set S is: (11), In the formula, is the number of heat pumps in operation, is the supply water temperature, is the return water temperature, is the indoor temperature; The expression of the discrete action space set A is: (12), in, The maximum number of powered-on units; The expression of the reward function R is: (13), in, is the current electricity price, Set the temperature for the room. is the weight of the temperature offset reward function, is the thermal comfort weight.
5. An electronic device, It is characterized in that It includes a processor, a memory, and a program stored in the memory and executable on the processor. When the electronic device is running, the processor executes the program to implement the steps of the temperature control method of the air source heat pump heating system based on reinforcement learning as described in any one of claims 1-3.
6. A storage medium, It is characterized in that The storage medium stores a program, which, when executed by a processor, executes the steps of the temperature control method for an air source heat pump heating system based on reinforcement learning as described in any one of claims 1 to 3.
