The modelling of reverse defrosting cycles of air-to-water heat pumps with TRNSYS

. The most widespread defrosting technique adopted by Air-Source Heat Pumps (ASHPs) during the heating season is Reverse Cycle Defrosting (RCD). In this paper a dynamic model of RCD, based on performance data provided by the heat pump manufacturer, designed for TRNSYS and with a core-structure suitable for commercial units, is presented. A defrost cycle is divided in three phases. First, the unit heating capacity is reduced as a linear function of the ice layer thickness (Pre-Defrost phase). Subsequently, the reverse cycle operating mode is modelled on the basis of the performance data given by the manufacturer (Defrost phase) and, finally, the heat pump performances are altered taking into account the higher surface temperature of the external coil after the reverse mode (Post-Defrost phase). Then, the influence of defrosting energy losses on the heat pump seasonal performance factor in sites characterized by different climatic conditions has been assessed. Results point out that the ASHP seasonal efficiency decreases of about 5% taking into account defrost energy losses; in addition, the influence of defrost cycles on the internal air temperature is studied by assessing under which conditions the indoor thermal comfort can be guaranteed even in presence of frequent defrost cycles.


Introduction
Technologies based on fossil fuels have been the basis of the main energy services, such as electricity generation and buildings climatization, of the contemporary society with the evidence of negative environmental effects (e.g. increase of greenhouse gas emissions, air pollution and global warming). In this context, during the last decades a series of relevant actions to tackle climate change has been adopted by the European Union (EU): for instance, in 2011 an ambitious target for the cut of emissions up to 80% below 1990 levels has been set by the European Commission [1], by means of the total decarbonisation of the power sector. More recently, EU imposed to Member States to increase the share of energy consumptions covered by renewable resources at least at 27% before 2030 [2]. In order to promote a widespread diffusion of renewables, the Directive 2009/28/EC [3] has recognized aerothermal, hydrothermal and geothermal energy sources as renewable ones: for this reason, heat pumps can be considered as the most suitable solution to achieve the targets reported above since they are able to fulfil the building energy services (i.e. space heating, space cooling and DHW production) with a single device and have the potential for significant energy and emission savings.
In recent years, air-source heat pumps (ASHPs) are the most adopted technology within the heat pump European market [4]. In fact, ASHPs are characterized by low installation cost, large availability of the external heat source (i.e. outdoor air) and installation easiness. Nevertheless, air-source units present a series of drawbacks which do not allow to completely achieve the maximum energy saving potential. The main problem of ASHPs is the frost formation on the external surface of the outdoor heat exchanger during the winter operation: under certain weather conditions (typically external air temperature (Text) lower than 6°C and relative humidity (RH) above 50% [5]), an ice layer is deposited on the evaporator coil when its surface temperature is below the air dew point temperature and the water freezing point. Consequently, the heat pump performance is reduced due to a dual penalization effect: on the one hand, the accumulated frost acts as a thermal insulation layer, decreasing the evaporator heat transfer coefficient, and, on the other hand, the air flow area is reduced due to the shrinkage of the cross-flow area. For both reasons, the evaporation temperature Teva lowers and the unit energy performance are significantly degraded.
Therefore, in heat pump systems the ice layer has to be periodically removed during the winter operating mode in order to restore the unit efficiency. For this reason, a series of defrost cycles is performed by the heat pump to melt the accumulated ice: evaporator defrosting can be carried out by commercial devices in several ways [6], such as compressor shut-down, use of electric resistances, reverse-cycle defrosting, hot water spraying and hot-gas bypass defrosting. Among the abovementioned methods, reverse-cycle defrosting (RCD) is the most common technique for frost removal due to its simplicity and high defrosting efficiency. According to this procedure, the heat pump reverses the refrigerating cycle to remove the accumulated ice: the condenser (i.e. the indoor heat exchanger) becomes the evaporator and, In reverse cycle operating mode the hot high-pressure refrigerant discharged by the compressor is pumped into the external coil to melt the frost. Once the ice layer is completely removed, the four-way valve reverses again and the heat pump resumes to the heating mode.
Although the logic of RCD is not complex, the optimization of defrosting control algorithm, as well as the detailed evaluation of the energy losses linked to defrost cycles, is still an open issue for heat pump designers and academic researchers. Therefore, a significant number of scientific studies can be found in literature, based on both numerical and experimental approaches, with the aim to enhance the heat pump defrosting efficiency during RCD. For example, by means of experimental measures conducted on a residential ASHP it was found that the accumulator of the unit and its expansion valve significantly affect the heat pump performance during RCD (i.e. the defrosting duration and the electric power input during a cycle) [7]. On the other hand, several numerical studies have been conducted to evaluate the behaviour of ASHPs under frosting and defrosting conditions. For instance, Qiao et al. [8] developed a five-stage defrost model, integrated with a detailed analysis of frost growth and incorporated into a dynamic model of the whole fin-and-tube heat exchanger. The simulation results point out that about 18% of the total energy supplied from the refrigerant is used to melt the accumulated ice layer: the outcomes allow to improve the defrost control strategy and, consequently, the system energy performance.
The analysis of literature shows that the modelling of the behaviour of an air-source heat pump during RCD operating mode is still incomplete: this work aims at improving the state of the art by developing a dynamic simulation model able to evaluate the heat pump performance during a defrost cycle based on RCD. In fact, a comprehensive modelling of the whole cycle which takes into account the penalization of the heat pump heating capacity during the frost layer growth, the unit performance during the reverse cycle operating mode (i.e. cooling capacity and electric power input), as well as the influence of outdoor climatic conditions on defrosting main parameters, is missing.
In the present study, a mathematical model of RCD based on a performance map approach is proposed: the developed model is suitable for TRNSYS 17 [9] and its core-structure can be simply adapted to commercial ASHPs which use RCD method. Furthermore, the procedure presented in this work is characterized by high computing speed, which makes it perfectly suitable also for heavy parametric simulations (e.g. for co-simulation or optimization processes) with low computational cost. In order to highlight the influence of defrost cycles and climate conditions on the seasonal energy performance of the heat pump, several simulations have been carried out considering three Italian locations characterized by similar values of external air temperature but different humidity levels during the heating season.

Modelling of a defrost cycle
In Fig. 1 the logical scheme adopted to model a generic defrost cycle is represented. In winter, when the heat pump operates in heating working mode, the outdoor heat exchanger acts as the evaporator, extracting heat from the ambient air. It is important to stress that the surface temperature of the heat exchanger coil (Twall) is intermediate between Text and Teva: when the evaporator wall temperature is below the air dew point temperature, part of the air moisture content condensates on the evaporator, forming a thin liquid film which enhances the heat pump energy performance. Furthermore, if Twall is also lower than the water freezing point (i.e. 0°C at atmospheric pressure) the liquid film freezes and frost begins to accumulate on the heat exchanger surface.
After the ice layer formation, the defrost transient starts and the heat pump performance decreases. According to Fig. 1, the Pre-Defrost phase begins: during this phase, the frost layer thickness increases and the unit heating capacity is increasingly reduced. In fact, the accumulated ice represents an additional thermal resistance for the evaporator and, consequently, the global heat transfer coefficient of the outdoor heat exchanger decreases. Furthermore, the evaporating temperature decreases as well to broaden the difference between Text and Teva, mitigating the negative effect linked to the frost layer formation. The duration of the Pre-Defrost phase (dpre) depends on several factors: the ambient conditions (especially the air humidity ratio), which influence the amount of accumulated ice, the heat pump modulation capacity, the evaporator characteristics (i.e. geometry, material, superficial treatment, refrigerant circulation) and, last but not least, the algorithm adopted by the heat pump control system to manage defrost cycles. Different defrosting control logics have been developed and can be found in literature. Actually, the most widespread control strategy is time control [10]: according to this method, an ASHP automatically activates defrosting cycles after a fixed time interval, ignoring the effective conditions of the external heat exchanger. Despite its simplicity, time control method is characterized by poor reliability and, for this reason, its adoption is linked to significant energy losses.
Once the Pre-Defrost phase is concluded according to the used control logic, the Defrost phase is activated by the control system. During this phase, the four-way valve reverses and the heat pump operates in cooling working mode, releasing heat to the outdoor heat exchanger, which acts as a condenser, in order to melt the accumulated frost. The duration of the Defrost phase (ddef) is determined by the heat pump control system, as well: typically, the reverse cycle operating mode is terminated on the basis of the outdoor coil surface temperature [11] or after a fixed time interval. It is important to stress that the defrost operation ends when the system believes that all the melted ice has been drained away: in fact, the external coil surface temperature is an indirect indicator of the melting process and this methodology is affected by large uncertainty.
As soon as the Defrost phase terminates, the fourway valve reverses again and the heat pump operates in the usual heating mode. Nevertheless, the transient linked to the defrost cycle does not immediately end: as pointed out by Fig. 1, the Post-Defrost phase can be defined before the re-establishment of steady-state operation. In fact, after RCD the surface temperature of the finned-tube outdoor heat exchanger is larger than the stationary value achieved in heating operating mode: for this reason, during Post-Defrost phase the energy performances of the heat pump are enhanced with respect to steady-state ones. As it will be deeply investigated in the following part of the paper, the duration of this last part of the defrost transient (namely dpost) mainly depends on the external climatic conditions.
In conclusion, the total duration of the whole defrosting transient (ddc) is influenced by several factors, such as ambient conditions, the control algorithm adopted by the unit and the evaporator characteristics and it is one of the main parameters which affect the defrosting efficiency. In the following Sections a simple mathematical model of a generic defrosting cycle, by means of which the evaluation of the heat pump energy performance during the whole transient becomes possible, is presented.

Mathematical modelling of the heat pump performance during a defrost cycle
As pointed out in the previous Section, a generic defrost cycle performed by an ASHP is characterized by three distinct phases; during each phase the deviation of the heat pump energy performance from the steady-state values can be approximated with different mathematical functions. In Fig. 2 the heating capacity and the electric power input trends are reported during a generic defrost transient. In this Figure, the three parts in which the defrost process is subdivided (i.e. Pre-Defrost, Defrost and Post-Defrost phases) are highlighted, as well as the characteristic parameters of the transient. More in detail, during the Pre-Defrost phase the unit heating capacity linearly decreases in time with respect to the steady-state value (Pth,ss) corresponding to the operating conditions (i.e. source and sink temperature), while the electric power input is not reduced as well: during the first part of the transient, the absorbed electric power does not change from the stationary value (Pel,ss).  On the other hand, during the Defrost phase both Pth, and Pel significantly deviate from the corresponding steady-state value. First, the heat pump reverses its working cycle and for this reason we refer to cooling capacity in place of heating capacity. As pointed out by Fig. 2, in this phase the heat pump cooling capacity can be approximated by means of two parabolic branches: during the first part of the Defrost phase, the unit cooling power increases following a parabolic trend until the maximum value (namely Ppeak,def) is reached after the time interval dpeak,def. Therefore, during the second part of this phase, the heat pump cooling capacity decreases according to a different parabolic trend; at the end of the Defrost phase, the cooling power is null and the fourway valve reverses again to switch the heat pump operating mode. Finally, the electric power input follows a similar trend to that of the heat pump cooling capacity: it is characterized by an increasing tendency during the initial part of this phase, approximated with a linear function, and by a decreasing trend during the second part, approximated by means of a linear function, as well.
In the final part of the defrost transient (i.e. Post-Defrost phase) the unit heating capacity can be estimated by means of two mathematical functions: initially, the heat pump thermal power increases with a parabolic tendency and reaches a peak value (Ppeak,post), larger than the stationary value, after the time interval dpeak,post. Then, the delivered heating capacity linearly decreases until the transient is completed and the heat pump steady-state performance recurs. As for the Pre-Defrost phase, the electric power input of the unit is not influenced by the defrost process during the final part of the transient (see Fig. 2 for reference).

Heating capacity -Pre-Defrost phase
In this Section the mathematical model developed to simulate the behaviour of the heat pump during the Pre-Defrost phase is shown. As reported in the previous Section, only the heat pump heating capacity deviates from the steady-state performance, while the unit electric power input is not influenced by the frost layer accumulated on the outdoor heat exchanger; for this reason, the COP of the device is significantly reduced during this phase. The thermal power effectively delivered by the device during the Pre-Defrost phase (Pth,pre) can be evaluated by means of Equation 1: where dpre is the duration of the Pre-Defrost phase, Pth,ss is the stationary value of the heating capacity evaluated at source/sink temperatures of the generic timestep t, tpre is a time counter which is initialized at the beginning of the phase and it is reset to zero when its value becomes equal to dpre; ∆Ppre is the maximum reduction of the heat pump heating capacity during the phase. ∆Ppre can be assessed as: where α is a numerical coefficient, ranging from 0 to 1. It is important to highlight that dpre and α depend on the heat pump characteristics (i.e. evaporator geometry, modulation capacity, defrost control algorithm), as well as on the values of external air temperature and relative humidity. For this reason, a series of experimental or insitu measurements are needed to completely define the behaviour of the considered unit during the Pre-defrost phase (and during Defrost and Post-Defrost phases, of course).

Cooling capacity -Defrost phase
During the Defrost phase the heat pump melts the accumulated frost layer by reversing the thermodynamic cycle. As previously reported, the unit cooling capacity (drawn from the user side of the device) can be calculated by means of two parabolic branches, evaluated by Equation 3: where ddef is the duration of the Defrost phase, Pc,def is the cooling power drawn from the building during this phase, tdef is a time counter which is initialized at the beginning of the Defrost phase and it is reset to zero at the end of the phase (i.e. when its value becomes equal to ddef), while the numerical coefficients of the parabolic branches a1, b1, a2, b2 and c2 can be assessed as: In order to fully calculate the heat pump performance during the Defrost phase, the maximum value of the unit cooling capacity Ppeak,def and the time interval from the beginning of the phase in correspondence of which this value is reached (dpeak,def) must be defined: where Pth,nom is the heat pump heating capacity evaluated at rated conditions (i.e. Text=7°C, inlet/outlet water temperature=40/45°C),  and  are numerical coefficients, ranging from 0 to 1. Rated heating capacity of the heat pump is taken into account in order to adapt the developed model to devices characterized by different size.

Heating capacity -Post-Defrost phase
Finally, during the Post-Defrost phase the heat pump heating capacity is slightly enhanced with respect to the steady-state value due to the larger wall temperature (if compared to the stationary value) of the outdoor coil immediately after the Defrost phase. Therefore, the thermal power delivered by the unit during this phase (Pth,post) can be evaluated by means of Equation 7: ,, where tpost is a time counter which is initialized at the beginning of the Post-Defrost phase and it is reset to zero at the end of the phase (i.e. when its value becomes equal to dpost and the defrost transient is completed), while the introduced numerical coefficients a3, b3, m1 and q1 can be calculated as: The maximum value of the heating capacity delivered by the heat pump during the Post-Defrost phase (Ppeak,post) is determined according to Equation 9: where ε is a numerical coefficient which must be evaluated by means of experimental measures

Electric power input
In this Section the mathematical model implemented to approximate the trend of the heat pump electric power input during the defrost transient is shown. As pointed out by Figure 2, in correspondence of both Pre-Defrost and Post-Defrost phases, the absorbed electric power does not vary from its stationary value (Pel,ss), while during the Defrost phase it is characterized by a variable trend, which can be evaluated by means of two linear functions following Equation 10: ,,  (10) where Pel,def is the effective electric power input of the heat pump during the Defrost phase. Furthermore, the numerical coefficients of the linear functions m2, q2, m3 and q3 are evaluated as follows: , , , , .
, el peak el peak def peak def peak def el peak def Finally, the maximum value of the electric power absorbed by the heat pump during the Defrost phase (Pel,peak) is determined according to Equation 12: ,, el peak el nom PP  = (12) where Pel,nom is the heat pump electric power input evaluated at rated conditions and ρ is a numerical coefficient, ranging from 0 to 1 and assessable from experimental measures. Again, rated performance of the heat pump is considered to adapt the developed model to devices characterized by a different size.

Case study
In order to test the developed mathematical model and to evaluate the effect of defrost cycles on the seasonal performance of an ASHP, an application study has been considered and the obtained results are reported in this Section. A residential building, characterized by twopipe fan-coils as terminal units, has been coupled to an air-to-water heat pump sized on the maximum heating load to avoid any back-up system. The analysis has been carried out by means of TRNSYS 17, taking into account three different locations in Northern Italy (Milan, Bologna and Udine) to assess the influence of climatic conditions on defrost cycles and, consequently, on the system energy performance. The residential building simulated for this study is a detached, one-storey home composed by four thermal zones above which an unheated attic is present; the floor plan of the building is shown in Fig. 3. The apartment is characterized by net floor area equal to 70 m 2 and conditioned volume of about 205 m 3 . The properties of building envelope components are summarized in Table  1; the U-value of each envelope element is compared with the corresponding limit value imposed by actual Italian law; Table 1 highlights that opaque and transparent elements of the envelope show an appropriate level of thermal insulation, even if not optimal. As reported previously, the heating system is based on two-pipe fan-coils, one for each room, connected to the heat pump by means of a single hydronic loop. No additional water storage tanks have been inserted within the distribution loop. The terminal units, as well as the heat generator, has been sized on the building peak load, which has been calculated with TRNSYS, as well. More in detail, the heat pump modelled in this case study is an inverter-driven device (30-95 Hz frequency range) with R410A as refrigerant fluid; the unit performance data, obtained from the manufacturer data sheets, are reported in Table 2 as a function of the inverter frequency and the external air temperature. Three distinct climates have been considered in this case study: Milan, Bologna and Udine; it is important to highlight that these locations are characterized by the same conventional heating season, which starts on October, 15 th and ends on April, 15 th , for a total of 183 days. For each location, the climatic data reported in TRNSYS meteorological library, based on the Meteonorm database, has been used.

Climatic data, building and HVAC system modelling
In Fig. 4, the bin distribution of external air temperature and relative humidity. evaluated for the heating period, is shown for the selected cities. On the one hand, results point out that the climate of Milan is the most severe one among the considered locations: its bin distribution is shifted towards lower values of external air temperature with respect to Bologna and especially Udine climates. Furthermore, the analysis of Heating Degree Days (HDD) confirms this evidence: during the heating season Milan, Bologna and Udine are characterized by 2736, 2386 and 2285 HDD, respectively. On the other hand, the relative humidity bin distribution reported in Fig. 4b shows that large values of humidity are more frequent in Bologna, if compared to other cities. In addition, in Bologna about 33% of the heating period (corresponding to 1452 hours) is characterized by extremely severe conditions for frosting (i.e. Text between 0°C and 6°C and RH above 70%) while in Milan and Udine these conditions occur only for 28% and 24% of the season, respectively.  Finally, the frequency of defrost cycles has been defined according to the work of Zhu et al. [12]. The Authors developed a "frosting map" in the RH-Text plane, identifying the climatic conditions in correspondence of which ASHPs perform defrost cycles (namely the "frosting region"). Moreover, within the frosting region different sub-regions can be determined: a severe and a moderate frosting zone, characterized by higher and lower defrost cycle frequency, respectively. According to the experimental measures carried out by the heat pump manufacturer, the interval between two consecutive defrosting cycles (i.e. between the end of the Post-Defrost phase and the beginning of the following cycle Pre-Defrost phase) has been fixed at 25 and 45 minutes when the external air conditions drop in the severe and moderate frosting zone, respectively.

Results and discussion
In this Section the main results obtained by means of TRNSYS 17 are reported and discussed in detail. The main key performance indicator used to evaluate and compare the energy performance of the heat pump among the selected cities is the Seasonal Coefficient of Performance (SCOP), defined as the ratio between the thermal energy supplied by the unit to the building and its electric energy need, both calculated during the heating season. Furthermore, two series of simulations have been performed: the first one takes into account defrost cycle energy losses by means of the model presented in this paper (identified as the Real case), while in the second one, referred as the Ideal case, these losses have not been considered in order to assess the influence of defrost cycles on the overall energy performance of the heat pump. In Fig. 5 the seasonal results obtained by ignoring or not the defrosting cycles are shown. The analysis highlights that, if defrost cycles are neglected (i.e. Ideal case), the heat pump SCOP does not vary among the selected cities. In fact, as pointed out in Section 3.1 the three localities are characterized by similar values of HDD: since the building is the same, the unit performance directly depends on the external air temperature only and for this reason the difference between seasonal performance factors is negligible. On the other hand, the introduction of defrost cycle energy losses leads to a larger variability of SCOP: for all cities the heat pump seasonal efficiency decreases in Real cases, if compared to Ideal cases, but with different magnitude. In fact, in Milan the unit SCOP is reduced of 4.1% owing to defrost cycles, while in Bologna and Udine the SCOP penalization is equal to 4.4% and 2.2%, respectively.
As reported in Fig. 5, the heat pump located in Udine performs 1169 defrost cycles during the heating season (-56% and -46% with respect to Milan and Bologna, respectively) and for this reason it is less influenced by defrosting energy losses: in fact, Udine is characterized by the least severe climatic conditions among the three localities (see Fig. 4 for reference). Although the number of defrost cycles carried out by the unit placed in Bologna is significantly lower than the one of the device located in Milan, the SCOP penalization is larger in the former city. The motivation is related to the external air RH: as pointed out by Fig. 4b, high humidity levels are more frequent in Bologna than in Milan. According to Equations reported in Section 2 and to empirical correlations shown in Table 3, relative humidity strongly influences the heat pump performance during defrosting cycles and, as a consequence, the seasonal energy performance of the unit. On the other hand, the defrost frequency, thus the number of defrost cycles, is more related to external air temperature values.
Reported results show that defrosting cycles have only a slight influence on the seasonal energy performance of ASHPs, with a reduction of SCOP lower than 5%. Nonetheless, performed simulations highlight that the indoor air temperature and, consequently, the indoor thermal comfort is instead strongly influenced by defrost cycles. In fact, when defrosting phenomena has been taken into account (i.e. Real cases), in Milan a minimum temperature of 17°C has been reached within the building, while in Bologna and Udine the lowest values of indoor air temperature are equal to 18°C and 20°C, respectively. Furthermore, discomfort conditions occur for a significant fraction of the heating season, especially in Milan: in this location more than 810 hour of the season (corresponding to almost 19% of the period) are characterized by internal air temperatures lower than 20°C; on the other hand, in Bologna and Udine this share decreases to 9% and 2.5%, respectively. Results put in evidence that the indoor conditions are strongly influenced by the number of defrost cycles: a larger cycling frequency causes a significant reduction of the supplied hot water temperature and, consequently, of the indoor air temperature.

Conclusions
In conclusion, in the present study a mathematical model, able to simulate the behaviour of an air-to-water heat pump during frosting and defrosting transient, is described. More in detail, the model is developed within TRNSYS 17 environment and takes into account Reverse Cycle Defrost (RCD) technique, the most widespread solution adopted by commercial air-source heat pumps. The model presented in this paper splits the defrost transient into three successive parts (namely, Pre-Defrost phase, Defrost phase and Post-Defrost phase) and allows to calculate the heat pump effective energy performance (i.e. heating capacity and electric power input) during each phase. First, in correspondence of the Pre-Defrost phase, heat pump heating capacity linearly decreases, while the absorbed electric power does not vary from its stationary value; then, when the unit control system activates RCD, the Defrost phase begins: the heat pump cooling power is modelled by means of two parabolic branches and the electric power input is interpolated by means of two linear functions. Finally, during the Post-Defrost phase the heat pump performance is slightly improved due to the larger temperature of the external heat exchanger surface. It is important to highlight that the developed model is characterized by several advantages, such as its high computing speed and its generalized approach, which makes it suitable for heavy dynamic simulations and for the application to each commercial unit based on reverse cycle technique, respectively. In order to test the developed model, a series of simulations has been performed, coupling an ASHP to a typical residential building located in three Italian cities (Milan, Bologna and Udine) characterized during the heating season by similar values of the external air temperature but different air humidity levels. Moreover, the mathematical model, applied to the considered heat pump, has been calibrated according to experimental measures provided by the manufacturer of the unit. Results point out that the energy losses linked to defrost cycles are not significant on a seasonal basis: even for severe climatic conditions the reduction of the heat pump SCOP is lower than 5%. Nonetheless, the energy penalty due to frosting and defrosting transients is influenced by the external climate: defrost energy losses are halved in the least humid climate (Udine) with respect to other locations. On the contrary, defrost cycles have a strong impact on the indoor thermal comfort: in locations characterized by a high frequency of cycles the internal air temperature might significantly decrease during the most severe part of the season and, for this reason, the adoption of a thermal storage tank should be taken into account by HVAC designers.