Study on the Optimum Design of a Ground Heat Pump System Using Optimization Algorithms

: Geothermal energy has attracted attention as a high-e ﬃ ciency energy source that can be used year-round, but it has a relatively higher initial investment cost. For the design of ground source heat pump (GSHP) systems, a calculation method to determine the capacity of a system to meet the peak load of the target building is usually used. However, this method requires excessive system capacity design, especially regarding buildings with partial load operations. In this study, the optimization of a system design was performed in the view of the cost of the lifecycle cost. Several optimization algorithms were considered, such as the discrete Armijo gradient algorithm, a particle swarm optimization (PSO) algorithm, and a coordinate search method algorithm. The results of the optimization described the system capacity (heat pump, ground heat exchanger, thermal storage tank, etc.) and the cost performance, showing that the total investment cost was reduced compared to the existing design.


Research Background
Environmental problems, such as global warming and fine dust, have emerged across the world due to the indiscriminate use of fossil fuels, such as coal and petroleum. The United Nations Framework Convention on Climate Change (UNFCCC) secretariat published a second comprehensive report on the analysis of the 161 Intended Nationally Determined Contributions to greenhouse gas (GHG) reduction effects, submitted by 189 parties. According to the report, the priority areas for GHG reduction are the energy efficiency and renewable energy sectors, and it was mentioned that the support of the private sector and local governments are important for the parties to achieve their GHG reduction goals [1]. Canada set its goal to reduce GHG emissions to less than 30% of 2005 levels by 2030 throughout its economy, even though it represents only 1.6% of global GHG emissions [2]. South Korea announced the "2030 GHG reduction roadmap" to respond to such environmental problems [3], and it has implemented the "renewable energy 3020" plan [4] to improve the proportion of renewable energy power generation to 20% in 2030, thereby actively participating in international efforts against climate change to reduce GHG emissions. Accordingly, renewable energy has been applied to various areas, and basic plans for the development, use, and distribution of renewable energy technologies, as well as laws for activating the distribution of renewable energy, such as mandatory supplies of renewable energy [5], have been established and enacted. Table 1 shows the target renewable energy proportions based on the primary energy by year. The Korea Energy Agency announced that "the building area consumes the largest amount of energy worldwide and its energy consumption is continuously increasing." It also announced that energy consumption is expected to increase by 50% by 2050 if energy efficiency is not improved, due to the continuous increase in the number of buildings and facilities that consume energy. Accordingly, the agency mentioned a need for zero-energy buildings that can contribute to energy savings and GHG reduction [6].
Renewable energy sources that are mainly used for zero-energy buildings are solar photovoltaic energy, solar thermal energy, and geothermal energy. Among them, ground source heat pump (GSHP) systems use the constant heat emitted from the ground. These systems discharge high indoor temperatures to the ground in summer and absorb heat from the ground in winter for cooling/heating and hot water. GSHP systems can be used regardless of weather conditions and time of year or day, and they are currently attracting attention as high-efficiency and high-performance energy options because they are more stable than air as a heat source or a heat sink.
The distribution of GSHP systems, however, has not been actively initiated compared to other energy sources due to their relatively high initial investment cost. Existing design methods for GSHP system are shown in Figure 1 [7]. For the introduction of a GSHP system, boring works must be conducted to install ground heat exchangers, and the borehole depth must exceed 200 m in the case of a vertical closed-loop system [8], which incurs a relatively high initial investment cost. Moreover, the capacity of a GSHP system is generally calculated in response to the maximum load of the building or based on the practical experiences of experts. It is also difficult to reflect load patterns according to the use of the building, the partial-load operation characteristics of the heat pump, and the performance characteristics of ground heat exchangers according to their lengths. Therefore, the initial investment cost may increase due to the excessive design capacity, and it is necessary to improve the efficiency of GSHP systems and to determine the optimal design for their capacity. Ryu et al. [9] conducted research on the optimal design of plastic pipes in ground heat exchangers and analyzed the heat exchange efficiency according to the entering water temperature (EWT) and a need for heat insulation via a computational fluid dynamics (CFD) simulation. Min et al. [10] studied the effects of the design variables of a vertical closed-loop GSHP system on the design lengths of ground heat exchangers. They analyzed the effects of operating conditions, the spacing between ground heat exchanger pipes, and the grout materials on the design lengths of ground heat exchangers. Park et al. [11] analyzed the optimal design lengths of ground heat exchangers according to the EWT using an optimization tool. Bonamente et al. [12] conducted research on the optimal GSHP system by connecting thermal storage to a GSHP system; they constructed three GSHP system cases and analyzed various elements, such as the energy consumption, efficiency, and the coefficient of performance (COP), using CFD. Kim et al. [13] investigated the optimal design of ground heat exchangers while considering EWT and conducted analyses from an economical perspective. They analyzed the tendency of the efficiency of a GSHP system and the length of the borehole to increase when the EWT decreased during cooling.
Studies on the optimal design of GSHP systems are being conducted using various methods, but research regarding the design capacity, considering both the real-time cooling/heating loads of the target building and the performance of the GSHP system, is not sufficient. Moreover, no design method has yet been constructed that comprehensively considers the initial investment cost according to the system capacity and the operational cost according to the system efficiency Therefore, a study that simultaneously derives optimal design values considering the aforementioned conditions is required.
There are various optimization algorithms, including gradient algorithms, pattern search algorithms, and genetic algorithms. Si et al. [14] applied various optimization algorithms to the design of buildings. They analyzed the characteristics of design elements, such as the direction, area ratio, and wall conductivity, which are passive elements, and then performed optimization to obtain values that minimized energy consumption. Si et al. [15] determined the optimal design for the positions of windows, direction of the building, and thermal conductivity using pattern search algorithms, genetic algorithms, and particle swarm optimization (PSO) algorithms to design energy-efficient buildings. Many studies on optimization in the design stages of buildings have been conducted using various optimization algorithms, but most of them were focused on the optimization of passive elements of buildings to minimize energy consumption.
In this study, design elements were optimized by performing both the modeling of the target building and the construction of a GSHP system. Research was conducted by selecting the optimal capacity of the GSHP system that minimized the sum of the cost incurred by energy consumption for 20 years and the initial investment cost incurred by the introduction of the GSHP system. For the selection of the optimal capacity, various optimization algorithms were used, and their characteristics were analyzed. The performances of the GSHP system and the economic efficiency in terms of cost were analyzed using the results of each optimization algorithm.

Research Method
In this study, various optimization algorithms were used, and the optimal design values for the design elements (ground heat exchangers, heat pumps, and heat storage tanks) of the GSHP system were analyzed for each algorithm. The most suitable optimization algorithm was selected by analyzing the time required to complete the simulation and the design values for each optimization algorithm. The validity of the introduction of the optimization technique was considered by analyzing the economic efficiency and the system efficiency based on the optimization results.
This study was conducted as shown in Figure 2. First, the target building was modeled, and its peak heating load and peak cooling load were calculated using dynamic analysis simulation software. The capacity of the GSHP system was designed based on the maximum load. The EWT and the system efficiency were analyzed based on the capacity of the existing GSHP system, and the initial investment cost, as well as the 20-year operational cost of the existing system, was derived. The design variables, objective functions, and constraints to be used for optimization were then set, and the simulation was performed by selecting cases for each optimization algorithm.

GSHP System Design
With respect to the current status of GSHP systems in South Korea, approximately 70% of the GSHP systems are vertical closed-loop systems due to small land areas; continuous research regarding vertical closed-loop systems [16], and related studies has been conducted [17]. For this reason, optimization was performed by introducing a vertical closed-loop GSHP system to the target building in this study.
When a heat storage tank is used with a GSHP system, it is effective in inducing a uniform power load and reducing electricity cost [18]. Yu et al. [19] analyzed the economic efficiency of a GSHP system with a heat storage tank by comparing it with a GSHP system without a heat storage tank in a greenhouse. Figure 3 shows the operation method of the applied GSHP system. Direct cooling was performed using geothermal energy as the heat source for the heat pump. During heating, the thermal energy of the heat pump was stored in the heat storage tank, and the energy was sent to the fan coil unit (FCU). When the temperature of the tank dropped below the set temperature, the tank performed heat storage, and the heat pump directly performed heating.

Target Building Modeling
To analyze the energy demand of the target building, the location of the building, the heat transfer coefficient of the building's external wall, and the internal load value according to the use of the building were entered. Busan metropolitan city in South Korea was selected as the location of the building. It generally had a mild maritime climate, and its average annual temperature ranged from 11 • C to 14 • C.
The target building was assumed as a typical office building of eight stories. The floor area of each floor was 900 square meters, and the total floor area of the building was 7200 square meters [20]. Figure 4 shows the image of three-dimension modeling. As for the thermal transmittance of the external wall, the heat transfer coefficient for the southern areas of South Korea was used based on the "energy saving design standard of building" provided by the Ministry of Land, Infrastructure, and Transport [21]. Table 2 shows the heat transfer coefficient of the target building. The occupancy and lighting schedules of the office building were created based on the standards provided by ASHRAE Standard 90.1 [22]. During the weekend, the cooling/heating operation was not performed under the assumption that the offices were not occupied. The internal loads of the target building, such as the occupancy density, people load, lighting load, and equipment load, and the elements applied to the building, such as ventilation and the infiltration rate, were created based on ASHRAE Standard 90.1 and ASHRAE Standard 62.1 [23]. Table 3 provides an overview of the target building. The heating and cooling loads of the target building were analyzed using the dynamic analysis simulation software TRNSYS. Measurements were performed every hour in the simulation, and the cooling/heating load for one year was simulated. Figure 5 shows the cooling and heating operation patterns of the office building. During the cooling operation, the day with the highest load was August 17, and the maximum load was measured to be approximately 437.5 kW. During the heating operation, the day with the highest load was January 15, and the maximum load was measured to be approximately 336.2 kW. The maximum load of cooling was found to be higher than that of heating. Thus, the maximum load of cooling was used for the design of the GSHP system. In order to verify the simulation model in this study, the calculation results of the heating load were compared with real measurement data. Figure 6 shows the comparison result between the calculation results in the same condition as the real building and the measurement data of the real building during the heating season. There were a few errors, but the safety factor of total value was within 4% and below 20%, which is the ASHRAE standard of prediction simulation [24].

Initial Design Values for the GSHP System
The capacities of the ground heat exchanger, heat pump, and heat storage tank were calculated using the design method that considered the maximum load, which is the existing GSHP system design method.
In this study, TRNSYS, a dynamic analysis simulation software program, was used to design the GSHP system. For the ground heat exchanger, the Type 557 model was used. It performed relatively fast calculations while freely describing the boundary conditions compared to analytical models through components constructed by properly using the benefits of a numerical model and an analytical model. For the heat pump, Type 927 was used, which utilized a water-to-water heat pump. This was based on the capacity according to the input load and temperature and the user data file on power consumption. For the heat storage tank, Type 534 was used, which was a vertical cylindrical model, and stratification inside the heat storage tank was achieved by adjusting the number of nodes. For the target building, Type 56 was used. Data based on the data file, such as the temperature and humidity, were connected by applying the building modeled in TRNBuild. Figure 7 shows the GSHP system modeled using TRNSYS. The initial design values of the GSHP system were set in response to the maximum load of the target building. The maximum load of the building was higher during the cooling operation. The capacity of the heat pump was designed by applying a safety factor of approximately 10% to this maximum load. The length of the ground heat exchanger was designed by applying a heat exchange rate of approximately 50 w/m per unit length based on the "Design Guide for Ground Source Heat Pump System" [25]. Table 4 shows initial design values of the GSHP. This optimization algorithm used gradient descent optimization, and was one of the basic function optimization methods, applying the concept of differentiation to optimization. It minimized the value of the objective function using the characteristics of the gradient. The algorithm found the x value that minimized the value of f (x), while moving x in the opposite direction of the gradient from the initial value of x 0 = (x 1 , · · · , x n ), as shown in Equation (1). Figure 8 summarizes this algorithm.
The parameters of the discrete Armijo gradient algorithm were set by referring to the paper that used this optimization algorithm [14].

Particle Swarm Optimization Algorithm (PSO algorithm)
PSO algorithm was an optimization algorithm proposed by Eberhart and Kennedy in 1995. It was developed based on the idea of proving the regularity of the social behavior patterns of swarms of birds or fish [26].
The particles of various generations derived their own optimal values, and optimization was performed based on the optimal values of the previous generation. The particles in each generation had their own inertia, cognitive force, and social force, and the particles moved accordingly. Figure 9 shows the PSO algorithm. The positions of the particles varied depending on the current velocity of each particle, the optimal value (pbest) experienced by the particles, and the optimal value (gbest) of the generations. When optimization was performed using the PSO algorithm, the PSO parameters may have significantly affected the optimization performance. Therefore, various studies were conducted on the generations, particles, and values of various parameters [27]. The PSO algorithm did not need a large capacity because it was simple and only required a short calculation time. The possibility of the occurrence of a local optimization was also slim, and could be used in various areas because it could be applied to both continuous variable and discrete variable problems [14]. In this study, the number of particles and the number of generations were set as defaults, the number of particles was 8, the number of generations was 16, and the PSO algorithm was optimized.

Coordinate Search Method
The coordinate search method algorithm is an optimization algorithm that uses the generalized pattern search algorithm. The pattern search method is an optimization algorithm proposed by Hooke and Jeeves [28]. The pattern search algorithm does not need a gradient and can solve nonlinear optimization problems.
The pattern search method performed optimization through convergence, and it was based on the theory of positive bases. The pattern search algorithm first analyzed the pattern through Global Search and found the minimum value of the objective function through local search. By repeating this procedure, movement was performed to the point at which the value of the objective function wad minimized. If the value was not lower than that of the current point, the step size was randomly reduced, and convergence was performed until optimization was achieved. Figure 10 shows the coordinate search method algorithm. For the pattern search algorithm, local optimization may have occurred. To address this problem, studies were conducted on the local optimization of the pattern search method [29,30].
Coordinate searching performed optimization using only local search in the optimization method of the existing pattern search algorithm, excluding global search. Therefore, the possibility of the occurrence of local optimization was relatively large, but the optimization results could be reached within a relatively short time period, as with the existing pattern search method if appropriate initial design values were considered [31].

Classification of the Properties of Optimization
In this study, the ground heat exchanger length, the heat pump capacity, and the heat storage tank capacity were set as design variables for their optimal design. Table 5 shows the initial values, minimum values, maximum values, and step sizes of the design variables for performing the optimization calculation. Simulations were repeated for 10 and 20 years, respectively, using the GSHP system, and the values of the design variables were modified using optimization in each simulation. Equation (2) shows the objective function to be used for optimization. The initial investment cost was calculated using the design variables, i.e., the ground heat exchanger length, the heat pump capacity, and the heat storage tank capacity, and the operational cost was calculated based on the subsequent energy consumption. The objective function was the sum of the initial investment cost and the energy consumption cost. In relation to the cost of the GSHP system, the material purchase site provided by the Public Procurement Service [32] and the reference prices of each renewable energy source [33] were referred to. The cost according to the energy consumption was based on the charge presented by the Korea Electric Power Corporation [34].

C Initial
Ground Heat Exchanger = C Price Ground Heat Exchanger × N Ground Heat Exchanger (2) f(x) = C Ground Heat Exchanger + C Heatpump + C Heat Storage Tank + C Energu 20 Year × PWAF (7) where C Initial Ground Heat Exchanger is the initial investment cost of the ground heat exchanger, C Price Ground Heat Exchanger is the cost of the ground heat exchanger for 1 m, N Ground Heat Exchanger is the length of the ground heat exchanger, C Initial Heatpump is the initial investment cost of the heat pump, C Price Heatpump is the cost of one heat pump, N Heatpump is the number of heat pumps, C Initial Heat Storage Tank is the initial investment cost of the heat storage tank, N Heat Stroage Tank is the price of the heat storage tank for 0.1 ton,

C Price
Heat Storage Tank is the capacity of the heat storage tank, C Energy Year is the annual energy consumption, and C Energy month is the monthly energy consumption. The values calculated by the simulation were used. PWAF stands for the Present Worth of Annuity Factor, i is the discount rate, and n is the number of years. For the calculation of the energy consumption cost, the same cost that occurs every year was converted to the current value by multiplying it by PWAF, using the present value conversion method.
For optimization, it was important to set constraints so that the value of the objective function could be obtained properly. In this study, the standards for the unmet load hour provided by ASHRAE Standard 90.1 [35] were applied as constraints for the indoor temperature. These were set so that a penalty was given when the indoor temperature differed from the set point temperature by more than 2 • C for over 300 hours during the cooling/heating operation. Moreover, constraints were set for the EWT so that the efficiency of the GSHP system could be maintained. The EWT was set to 35 • C for cooling and 5 • C for heating by referring to the geothermal energy assessment report [36]. A penalty was given to the value of the objective function when these constraints were not met.

Heat Source Temperature and COP
Based on the aforementioned results for each optimization algorithm with an operating period of 20 years, the performance of the GSHP system was analyzed. The COP of the heat pump, the COP of the entire system, and the EWT of the heat pump during cooling/heating were analyzed.
Energy Consumption All of Ground Heatpump System , where Q Heatpump is the heat release of the heat pump when the heat pump was working in both cooling mode and heating mode and Energy Consumption Heatpump is the power consumption of the heat pump. Energy Consumption All of Ground Heatpump System is the total power consumption of the GSHP system. Figure 11 shows the average EWT values of the heat pump during cooling/heating for the existing design and optimization designs. For the existing design and all of the optimization algorithms that were used, the aforementioned constraints for the EWT during cooling/heating were met. For the existing design, the average EWT of the heat pump was 26.43 • C for cooling and 12.34 • C for heating. For the discrete Armijo gradient algorithm (gradient), the average EWT increased by 3% for cooling and reduced by 2% for heating compared to the existing design. For the particle swarm optimization (PSO), the average EWT increased by 21% for cooling and reduced by 15% for heating. For the coordinate search method (GPS), the average EWT increased by 7% for cooling and reduced by 5% for heating. The largest variation of the average EWT was observed for the cooling/heating of the PSO algorithm. This appeared to be because the largest reduction was seen in the capacity due to optimization.  Figure 12 shows the average heat pump COP and average system COP results for the existing design and the optimization algorithms used. For the existing design, the average heat pump COP and average system COP were found to be 3.25 and 2.79 for heating and 5.31 and 4.08 for cooling, respectively. The PSO algorithm exhibited the lowest average heat pump COP and average system COP for both cooling and heating, while the discrete Armijo gradient algorithm showed the highest values. This was because optimization was performed in this study with a focus on cost; thus, the system performance was minimized. It appeared that the discrete Armijo gradient algorithm exhibited the highest average COP values because it reached local optimization relatively fast while performing optimization.

Optimization Results
The discrete Armijo gradient algorithm (gradient) achieved optimization after performing 90 simulations when the operation period was 10 years, while the particle swarm optimization (PSO) and coordinate search method (GPS) achieved optimization after performing 124 and 62 simulations, respectively. For the gradient method, a relatively large amount of time was required to achieve optimization because the design variables were modified linearly based on the results, and the cases that achieved local optimization were observed. For the PSO method, relatively less time was required to achieve optimization because several particles performed optimization at the same time with their own design variables in one generation. The possibility of achieving local optimization was relatively slim because each particle had various values for the design variables within the determined step size. The PSO algorithm exhibited the lowest investment cost among the optimization algorithms used in this case. The coordinate search method required relatively less time than the gradient algorithm because optimization was performed by analyzing the pattern of the simulation. Table 6 shows the optimal values for the 10-year cost and the optimal values of the design variables for each algorithm. The optimization results showed that the investment cost was reduced for all the algorithms compared to the existing GSHP system design. The initial investment cost and 10-year operational cost of the existing GSHP system were approximately 477,756 thousand won and 79,086 thousand won, respectively. The initial investment cost and 10-year operational cost of each optimization algorithm are shown in Figure 13. Compared to the existing design, the initial investment costs of the discrete Armijo gradient, PSO, and coordinate search method reduced by 4.9%, 21.3%, and 23.2%, respectively, while their 10-year operational costs increased by 5.2%, 28.5%, and 27.9%. For all of the optimization algorithms used in this study, the reduction in the ground heat exchanger length was the largest, and the heat pump capacity was increased compared to the existing design.   Figure 14 shows the result of life-cycle cost for 20 years, including the initial investment cost and the annual operation cost. The optimization results showed that the investment cost was reduced for all the algorithms compared to the existing design method.
The results of the discrete Armijo gradient were similar to those observed from 10 years of operation. Compared to the existing design, the total costs of the PSO and the coordinate search method were reduced by 14% and 15%, respectively. In this case, the total costs of PSO were reduced effectively as before. For the 20-year coordinate search method, results caused by local optimization were observed. These was also affected by the results of the previous simulation, and the results caused by local optimization were observed because the values of the design variables were adjusted.  Table 7 shows the optimal values for the 20-year cost and the optimal values of the design variables for each algorithm.

Conclusions
In this study, in order to develop the design guide of a GSHP system using an optimization algorithm, performance and feasibility studies were conducted using various optimization algorithms, such as the discrete Armijo gradient, PSO, and the coordinate search methods. The results showed that the design method with the optimization algorithm reduced the system capacity and the initial cost of the GSHP system, which was a weak point regarding its wide-spread introduction. Detailed conclusions of this study are given as follows.

•
All of the optimization algorithms used in this study reduced the cost of the GSHP system compared to the existing design.

•
In this study, the PSO algorithm was best algorithm for GSHP optimization, with minimal investment costs. The time to complete the optimization was short; the PSO algorithm took the least time, followed by the coordinate search method, and finally the discrete Armijo gradient algorithm.

•
For the operating period of 20 years, compared to the existing design, the investment cost was reduced by approximately 4.5% for the discrete Armijo gradient algorithm, 10.0% for the PSO algorithm, and 5.3% for the coordinate search method algorithm.
• For the operating period of 10 years, compared to the existing design, the investment cost was reduced by approximately 4.9% for the discrete Armijo gradient algorithm, 21.3% for the PSO algorithm, and 23.2% for the coordinate search method algorithm.

•
Regarding the coordinate search method, the life-cycle cost was effectively reduced, but local optimization was a possibility, which may be different from the real optimal value. • Compared to the existing design, the heat pump COP and the system COP of the PSO algorithm, which exhibited the lowest investment cost, were reduced by approximately 13% and 11%, respectively.

•
In the future, the optimal operation method for GSHP systems should be developed while considering the characteristics of the building load and energy efficiency. Furthermore, the optimization of hybrid systems with other heat source systems should be considered for real building applications.