Data-Driven Optimization for Capacity Control of Multiple Ground Source Heat Pump System in Heating Mode

With the rapid development of ground source heat pump (GSHP) system, energy saving measures are of special interest for practice. In order to meet heating demand, capacity control of GSHP system can be carried out by regulating either part load ratio (PLR) or supply water temperature. A data-driven optimization approach was developed and applied on a school building in heating mode, which aims at minimizing energy consumption without compromising thermal comfort. An artificial neural network (ANN) model of the GSHP system was proposed and trained with experimental data as well as simulated data of a validated physics-based model, which was employed for data supplement to cover more data variations. The multi-objective optimization problem was then solved using genetic algorithm. The results suggest the optimal operation strategy for either continuous or staged capacity control regarding heating demand variation. With the proposed optimal control strategy, energy savings as compared to existing strategy can be up to 22% for a single month and 14% for the whole heating season.


Introduction
For the past decades, there has been a rapid rise in the development of ground source heat pump (GSHP) due to its advantages in energy efficiency and CO 2 emission. GSHP utilizes geothermal energy with moderate temperature, higher than that of outdoor air during winter and lower during summer, in order to provide space cooling and heating. The favorable conditions on the source side of GSHP system comprehensively improve operating conditions and, therefore, reduce energy consumption. Over the last several years, a lot of efforts have been put into energy saving measures of GSHP systems, mainly by means of design and operation optimization. Model-based optimization towards higher energy performance presents a promising solution for reducing energy consumption.
Various analytical modes have been proposed to model HVAC (Heating, Ventilation, and Air Conditioning) systems based on physic laws, both in lumped form and distributed form [1][2][3][4][5]. Santa et al. [6] developed a mathematical model for water-to-water heat pump system under steady-state condition based on physical laws, with distributed parameters for heat exchangers and lumped parameters for other components.
Despite the better generalization capability and less dependency on operation data, the physics-based models are too complex to be implemented and adopted in optimization process. Physics-based modeling is commonly based on a large number of mathematical equations that are derived from physical laws and involves iteration processes to solve, which is time-consuming and difficult to be adapted to perform optimization. With the development of artificial intelligence in recent years, there has been a rapid rise in the use of data-driven models. Sun et al. [7] explored the use of the ANN model and adaptive neuro-fuzzy inference system (ANFIS) model in the prediction of coefficient of performance (COP) based on limited parameters, both for heat pump and whole system. Esen et al. [8] demonstrated the comparison of an ANN and an ANFIS on prediction of COP of a vertical ground source heat pump system, in which ANFIS showed better prediction performance and appropriateness for quantitative modeling of GSHP systems. Wang et al. [9] applied ANN to model the non-linear relation between GSHP and indoor/outdoor conditions and proposed a generalized clustering-based model for circulating pumps operation to improve the prediction performance. Gang et al. [10] proposed a data-driven method to optimize the control of the ground heat exchanger and cooling tower to achieve better energy performance of hybrid GSHP system, which uses a supplemental heat rejecter to avoid the heat imbalance. Kinab et al. [11] presented a system model, including detailed sub-models of components used for seasonal performance optimization of air to water reversible heat pump. Alamin et al. [12] proposed a predictive ANN model for fan-coil power demand for a characteristic laboratory, which was further used as input for Model-based Predictive Control. Guo et al. [13] developed and compared several energy demand prediction models integrating thermal response time based on different machine learning methods.
In order to achieve an optimal performance of GSHP system, optimization on all components of the system as a whole needs to be conducted. Over past years, various approaches have been proposed to deal with the formulation and solution of the performance optimization. Kusiak et al. [14][15][16][17][18][19] presented several data-driven approaches for multi-objective optimization of HVAC system, which minimize energy consumption while maintaining thermal comfort at a certain level. Supply air temperature and static pressure were chosen as the control variables and optimized using various algorithms, such as firefly, heuristic search, particle-swarm, and evolutionary computation. Nassif et al. [20] applied artificial intelligence approaches on HVAC system control, which exhibited better accuracy and performance on modeling and optimization than existing control strategies. Xia et al. [21] developed a mode-based optimization strategy of GSHP system to search for the optimal operating speed of the variable speed pumps in the ground loop. Sivasakthivel et al. [22] attempted to optimize the operating parameters of GSHP system in both heating and cooling modes, which took into account the working conditions of condenser and evaporator. Gao et al. [23] implemented a global optimization of a small-scale HVAC system driven by a GSHP equipped with an on/off capacity control. Energy consumption and robustness of space air temperature were considered as objective function to optimize the setpoint and control band of chilled water return temperature. Cervera-Vazquez et al. [24] developed and improved an in situ optimization methodology for GSHP systems, which optimize the water circulation pumps frequency to ensure user comfort and energy savings simultaneously. Hussain et al. [25] conducted a co-simulation integrating fuzzy controller and evolutionary optimization algorithm to moderate the energy use while maintaining indoor environment represented by predicted mean vote and predicted percentage dissatisfied indices. Esen et al. [26] performed experimental and optimization studies to investigate effects of various parameters on the performance of vertical ground coupled heat pump, including the depth of boreholes and temperatures of condenser and evaporator.
As indicated in the above literature review, only very few research works have been reported on the study of GSHP optimization regarding both supply water temperature and part load characteristics. With regard to data-driven approach, most of the models were constructed based on experimental data with predefined working conditions. The resultant models are only effective for the inputs within training range and can give unrealistic or non-physical results when applied to undefined working conditions. In this study, we explored the use of data-driven model on GSHP system, focusing on energy saving optimization. Operation data of a GSHP system with predefined supply temperature setpoint was collected in heating season. A validated detailed model of the GSHP system was used to expand data coverage, so that more data variations in undefined working conditions can be covered and included in the training process of data-driven model as supplementary data. An ANN model of the GSHP system was proposed and trained with experimental data as well as simulated data, and then used in global optimization of the GSHP system. Part load ratio (PLR) and supply water temperature were selected as the controlled variables. An attempt on the formulation of multi-objective optimization model was made to achieve optimal energy efficiency without compromising user comfort, following with the practice of GA algorithm to solve the optimization model. Figure 1 shows the flowchart of the proposed methodology.

System Description and Data Monitoring
The test building has an area of 10,997 m 2 with five floors and is located in severe cold climate region of northern China (41.8 • N, 123.38 • E), dominated by heating loads. Five water wells are drilled near-by to provide underground water, among which three (labeled as 1, 2, and 3) are used for water supply and other two (labeled as 4 and 5) are for reinjection. Figure 2 presents the layout of the building and water wells.  Figure 3 illustrates the schematic diagram of the GSHP system studied in this paper. The system consists of ground source heat pumps, underground water pumps, circulating water pumps, and terminal units. Ground source heat pumps are located in the basement of the building, which gather heat from underground water in heating mode and discharge heat into the underground water in cooling mode. The GSHPs use R22 as refrigerant and reversible on the water circuits by using reversing valves. Two variable-frequency submerged water pumps are employed to extract and delivery underground water, while two constant-frequency circulating pumps are used to pump secondary water throughout the cycle. The specifications of the GSHP system are summarized in Table 1. For capacity control of the GSHPs with screw compressor, the opening of slide valve is adjusted according to actual heating demand under part load conditions. The GSHPs are regulated by supply water temperature, which ranges from 6 • C to 8 • C in cooling mode and from 39 • C to 42 • C in heating mode. All of the rooms are equipped with fan coils supplied by the GSHP system. Each fan coil is controlled by a three ways valve to modulate water flow rate based on the thermostat mounted on ceiling. The temperature setpoint and fan speed in each room are manually decided by the users. The building is occupied from 7:00 a.m. to 6:00 p.m., during which the building has a relatively high heating demand and the GSHP system is operated continuously.
A set of experimental tests was carried out in the first two months of 2019 in order to examine the performance of the GSHP system in heating mode. Both supply and return water temperature of the GSHPs were measured using four-wire PT100 temperature sensors (PT100 WZP -Asmik, Hangzhou, China) with accuracy 0.1 • C and collected using a recorder (MIK-R200D-Asmik, Hangzhou, China) at 5 min. intervals. Flow rate was measured and recorded using flow meters (DWM2000-Krohne, Duisburg, Germany) positioned at inlet and outlet of the system components. A power meter (PAC3100-Siemens, Berlin, Germany) was used to measure the power consumption of the system components. Ten office rooms at various spatial orientations and floors were chosen as representation of indoor environment and thermal comfort. Sensors (BME280-Bosch Sensortec, Stuttgart, Germany) for monitoring room temperature and humidity were ceiling mounted or wall mounted. Sensors for recording outdoor climate were installed on the exterior surface of the building envelop.

ANN Model
ANN has been proved to be an effective data-driven approach to predict performance of nonlinear systems, which models the complex relationships between inputs and outputs. ANN is a "black box" model, with no requirements of a detailed understanding of system physics. ANN model utilizes structure of neural network inspired by biological nervous systems. The neural network consists of a large number of interconnected neurons, which can be divided into three layers: input layer, hidden layer, and output layer. All of the neurons are connected with weighted links layer by layer. Vector of Independent variables are input into the input layer and output to the output layer after being processed by the hidden layer. Activation functions on neurons are mathematical equations applied on each node to deliver an output based on inputs. Nonlinear activation functions enable the network to simulation nonlinear relations, including sigmoid, tanh, ReLU, and maxout. Among all available algorithms, the back propagation algorithm is the most widely used one, which minimizes the value of the loss function in weight space by updating the weights of the network iteratively using gradient descent method. Figure 4 shows a schematic diagram of the ANN model used in this paper. T ci , T ei , m c , m e , and PLR were collected from the test and input into the ANN model as the input layer. Eight hidden layers with 10 neurons in each layer were used to process the input data. After processing of the hidden layers, Q c , Q e , W hp were exported from the output layer of the model. Tanh and linear activation function were applied for the hidden layers and output layer respectively. Data from measurements and simulations were used in backward propagation learning process to determine the weights and functions on each neurons. The entire dataset included 357,184 data samples and it was randomly divided into two groups: 70% for training and 30% for validation. The well trained neural network is able to predict the output variables with any input variables. Pytorch were employed for the detailed implementation of the ANN model.

Detailed Model
Data-driven modeling is highly based on data quantity and quality, specifically range and accuracy. Data can be collected from experimental test or detailed numerical simulations under various conditions. During the test, the building was in normal operation and the water supply temperature of the GSHPs fluctuates within predefined setpoint range (39∼42 • C). If the ANN model is only trained with the experimental data, the resultant model will suffer from poor prediction accuracy when applied to undefined setpoint range. Operation data of the GSHP system with undefined working conditions cannot be acquired from the test, giving incomplete data collection. In order to complete the gap for operation datasets, a detailed analytical model was implemented and used to expand data range for various working conditions.
The detailed physics-based model of the GSHP system is constructed based on the heat transfer and fluid mechanics within components, including evaporator, compressor, condenser, and expansion valve. The compressor and expansion valve were simulated with a quasi-steady state model, due to their much faster transient responses as compared to other components. As for the heat exchangers, the following assumptions were made to simplify the governing equation set without significant compromise on physics [27]: • one-dimensional flow of refrigerant and secondary fluid; • refrigerant pressure drop and viscous friction neglected in heat exchangers; and, • only axial flows taken into account in heat exchanges.
Governing equations include mass conservation and energy conservation for refrigerant, secondary fluid and tube wall, as expressed from Equation (1) to Equation (4), respectively. ∂ρ r ∂τ ∂(ρ r e r ) ∂τ + ∂(ρ r u r e r + P r u r ) ∂z The finite volume method was used for the formulation and solution of the heat exchanger models. Details are referred to the reference [28]. The detailed model was first applied under the experimental condition to verify the convergence and accuracy of the model. Subsequently, various boundary conditions other than the experimental one were input into the detailed model to complete the datasets, with part load ratio varied from 0.1 to 1 and supply temperature setpoint from 35 • C to 65 • C.

DOE-2 Model
A DOE-2 performance model was employed for comparison and validation [29]. The DOE-2 model consists of three performance curves, i.e., CAPFT, EIRFT and EIRFPLR, which represent a correction of capacity and energy efficiency under some given condition and correction of power consumption based on part load, respectively [30,31]. They are defined, as follows: where CapFTemp is the cooling capacity function of temperature curve, EIRFTemp is the energy input to cooling output ratio function of temperature curve, EIRFPLR is the energy input to cooling output ratio function of part load ratio curve. The first two curves are based on evaporator outlet water temperature T eo and condenser outlet water temperature T co , and the third one is based on T co and part load ratio PLR. The coefficients of the performance curves are then fitted and determined while using the performance data that were provided by the manufacturer. Heating capacity Q avail and power consumption W hp can be calculated using reference capacity Q re f and reference coefficient of performance COP re f . A performance map of the GSHP system was exported from the DOE-2 model, as in Figure 5. To meet a fixed heating demand (dotted line), there are various combinations of water supply temperature (T co ) and part load ratio (PLR). However, different control strategies differ with COP and energy consumption, which is the goal of following optimization.

Formulation
An overall optimization model was constructed using the trained GSHP model, which describes the relationship among the controlled variables, energy consumption and heating demand. The objective function was to minimize the energy consumption of the GSHP system while providing the required heating demand. Water supply temperature setpoint and part load ratio were selected as the decision variables. In the practical operation of the GSHP system, slide valve opening was actually used to adjust the part load ratio.
Equation (6) Heat load was calculated by a demand-side usage model and integrated into the optimization model as an equality constraint. The water supply temperature setpoint is constrained from 35 • C to 65 • C, and the part load ratio is constrained from 0.1 to 1.0. The inequality constraints of the optimization model can be dealt with by imposing the penalty method, which converts constrained objective function to a non-constrained one. A penalty function is applied on the objective function that is based on the constraints and increases as the controlled variables exceed the limits.

•
Water supply temperature From the performance analysis of the GSHP system, as shown in Figure 5, it could be concluded that a lower water supply temperature leads to higher COP of the system while providing the same amount of heating. However, the temperature range of supply water is restricted by the load capacity and operation mode of the indoor terminal units. The indoor terminal units operate automatically to satisfy the heating demand and maintain the temperature setpoint in each room.
If the water supply temperature is too low, the output of the terminal units may be unable to meet the heating demand and desired indoor comfort even with full capacity. Thus, the optimization of water supply temperature depends not only on the system itself, but also on the external load conditions. An EnergyPlus model of the building, including the HVAC system, was setup to evaluate the supply water temperature range related to heating demand. •

GSHP staging
For a fixed speed compressor, capacity control can be done by regulating slide valve position in the suction area to adjust the amount of refrigerant being compressed. On the basis of operation mode, the capacity control can be either continuous (from 10% to 100%) or staged with only several specific slide valve positions, like 25%, 50%, 75%, and 100%. Thus, the optimization of PLR depends on the part-load energy performance of GSHP.

Solving
The inherent nonlinearity and complexity of the GSHP system make the optimization problem difficult to be solved by traditional mathematical methods. In this paper, a genetic algorithm was selected as solving method, which can deal with nonlinear optimization problems due to its gradient-free characteristics. As a part of evolutionary algorithms, the genetic algorithm is developed based on the principles of natural selection and genetics. It simulates the process of natural selection to search for the solution of optimization problems. The genetic algorithm starts with an initial population of individual solutions, and then modifies the population according to the fitness repeatedly until some termination condition is satisfied. The evolution operation toward an optimal solution includes recombination and mutation, which upgrades the solution based on fitness. In this study, the genetic algorithm was implemented using the gaft framework with Python programming language. The population size and generation number were set to 50 and 100, respectively. Uniform crossover algorithm was used for crossover operation with probability set to 0.8. Flip Bit mutation with adaptive big mutation rate was used to overcome premature or local-best solution. The probability of basic mutation and big mutation were set to 0.1 and 0.55, respectively.

Experimental Analysis and Model Validation
For model validation, experimental datasets other than the datasets used for training process were presented to the trained model, to examine the prediction performance of trained model. The root-mean squared error (RMS) and the coefficient of multiple determinations (R 2 ) were used to compare predicted and experimental values for model validation. As summarized in Table 2, with a R 2 of 0.9408 and RMS of 0.7729, detailed model predicted the outlet temperature of the GSHP system with higher accuracy than others at the expense of larger computational cost. The elapsed average CPU time for single timestep (10 s) in detailed simulation was about 3 s~5 s with Intel Core i7-4790 @ 3.6GHz as CPU and 16 GB RAM memory. The time scale for other models was much less than that of the detailed model. It only took seconds to finish the whole simulation process for ANN model and DOE-2 model, which makes them suitable for optimization calculation. The ANN model performed better in prediction accuracy than the DOE-2 model, with RMS and R 2 of 0.7903 and 0.9378 as compared to 1.2032 and 0.9102, respectively.  Figures 6 and 7 shows the temperature change over time at evaporator outlet and condenser outlet. The GSHP system were operated with capacity control to satisfy a constant setpoint range of supply temperature. The capacity control was realized by adjusting the number of GSHP in use and the part load ratio of each GSHP. As the supply water temperature was narrowed in a limited range, the capacity control strategy was unable to match the heating demand at some load conditions. The output capacity was either too large or too small, which resulted in oscillation of supply temperature and frequent ON/OFF of the compressor. Under the same boundary conditions as test, the detailed model predicts the temperature profiles with an mean error of 0.64 • C for condenser outlet temperature and −0.28 • C for evaporator outlet temperature. However, the detailed model is computationally intensive in comparison to other models and not suitable for optimization calculation. The ANN model and DOE-2 models were trained with the same source datasets, including experimental data and simulated data representing other operation conditions. Thus, the results of the two models were both in good agreement with the experimental results. Due to the more complex structure and better generalization ability, the ANN model presents better performance in capturing the system characteristics than the DOE-2 model.

Water Supply Temperature
The "supply water temperature constraint" needs to be respected so that the output of system can meet the heat demand of terminal unit in order to ensure the thermal comfort in each room. The control goal of the water supply temperature is to achieve higher energy efficiency while maintaining the temperature within an acceptable range to meet the heat demand. To maintain the indoor temperature at certain heating setpoint, the HVAC system needs to provide sufficient output to the conditioned space. Therefore, heating demand and indoor terminal operation need to be investigated and used to guide the control of water supply temperature. The heating demand changes according to outdoor temperature and solar radiation, along with the occupancy and occupant's activity that directly related to the temperature setpoint of indoor environment. During the cold weather period in winter, the terminal units may be unable to provide sufficient heat in case of low supply water temperature and large heat demand. The actual heating output provided to each room depends on the thermal performance and control strategy of terminal units, which are fan coils in this particular case. In addition, the heating setpoints can be adjusted dynamically according to the building occupancy schedule. As for the building researched, the annual heating period is about five months, among which nearly two months are holidays. In unoccupied time, optimizing supply water temperature may result in additional energy saving potential.
In this study, the building and the HVAC system were modeled with EnergyPlus to examine the temperature range of supply water, in which the validated DOE-2 model was employed for GSHP modeling. Figure 8 shows the lowest acceptable supply water temperature under various outdoor temperature. The thermostat setpoints for indoor environment were 21.5 • C when occupied and 12.5 • C when unoccupied. As the outdoor temperature increases, the acceptable supply water temperature decreases. The supply water temperature shows a weak linear dependence on outdoor temperature, which can be fitted as linear correlations and used to guide the operation.

GSHP Staging
For the continuous operation of multiple GSHP, the capacity control can be achieved by both adjusting slide valve opening of single compressor and turning on/off multiple compressors. To providing a specific amount of heating capacity, the running number of compressor has a variety of options with different energy performance. The optimal staging strategy with minimum energy consumption can be obtained by solving the optimization model above, as shown in Figure 9. The curves were obtained under the condition of supply water temperature at 45 • C and underground water temperature at 15 • C. At lower load conditions, the PLR increases with heating demand. The number of GSHPs put into service increases when the GSHP system operates more efficiently with more quantity and lower PLR. The switching points for running number depend on the part load performance of the GSHPs, and can be different with operating conditions. When multiple GSHPs are in operation, the heat load should be uniformly distributed among units.  Figure 10 shows the optimal operation mode for GSHP system with staged capacity control. When the capacity control of GSHP can be only staged, simple regulation of PLR cannot meet the load demand variations. The supply water temperature needs to be taken into account in the optimization process. As the heating load increases, the PLR and number of GSHPs in service increases step by step. At a certain step, water supply temperature decreases to accommodate heating load. The range of temperature adjustment changes with different PLR steps, which is the reason for the oscillation of supply temperature in tested system with constant temperature setpoint range. Therefore, for the system with staged capacity control, it is not enough to adjust PLR merely to meet the heating load. The supply water temperature also needs to be regulated based on load conditions.  Figure 11 shows the results of applying the proposed optimization method to the tested system. For the existing control strategy, the temperature of supply water is fixed at the range of 39∼42 • C. By applying the optimal control strategy, the supply water temperature is reduced by 7 • C at most. For the period with higher heating demand, from 0 h to 50 h, the decrease of water supply temperature is not so significant when compared to lower load condition. In addition, a sequential way is applied in existing control strategy as load distribution scheme. GSHP A is maintained with full load operation, while GSHP B is staged by adjusting PLR to accommodate heating demand. As for the proposed optimal control strategy, the total load was uniformly distributed between GSHP A and B. Figure 11. Comparison of operation strategy. Figure 12 shows the energy consumption comparison of existing and optimal control strategies. Lower supply temperature and optimized capacity control benefit GSHPs in terms of energy efficiency, especially at low load condition. By applying the optimal strategy, the supply water temperature is adjusted based on outdoor temperature (Figure 8), rather than restricted within a fixed range. From the performance map of the GSHP system ( Figure 5), it can be obviously seen that lower supply temperature leads to higher COP and also less energy consumption when providing the same amount of heating demand. In addition, a uniform distribution scheme is also applied in the optimal strategy for staging (Figure 9), which consumes less energy when compared to the sequential way. The proposed optimal strategy is able to provide required heat to maintain thermal comfort and reduce the energy consumption, saving a significant amount of energy up to 31% at certain time and totally 19% during testing period in comparison with the existing control strategy.  Figure 13 displays a graphical comparison of year round energy consumption between existing control mode and optimal control mode. The proposed optimization was performed only in heating season from October to March next year. It is observed that by applying the optimization method, the monthly energy consumption decreases in comparison with the existing control, leading to energy savings up to 22%. In addition, the energy savings vary inversely with the outdoor temperature. As the average outdoor temperature decreases from 11.72 • C (October) to −2.54 • C (December), the energy savings increase from 12% to 22%. The energy savings by applying the proposed optimization leads to monetary saving, 11.40 thousand Yuan for December at most and 41.86 thousand Yuan for the whole heating season.

Conclusions
A data-driven optimization of GSHP system, with data supplement and thermal comfort constraint, was proposed and implemented in order to save energy consumption while providing required heating demand. An ANN approach was employed as the model of GSHP and trained with expanded datasets, including experimental data and simulated data of a validated physics-based model. Genetic algorithm was implemented as the solution method. The optimization results indicated that the optimal strategy can provide energy saving of 12% with variations depending on load conditions. At an optimal operation strategy, maximum energy saving were achieved at low load condition. Energy performance analysis revealed that the supply water temperature and PLR both played a role in affecting the heating output and energy consumption.

Conflicts of Interest:
The authors declare no conflict of interest.