A Case study of Exergy Losses of a Ground Heat Pump and Photovoltaic Cells System and Their Optimization

The aim of this scientific research is to experimentally determine the exergy losses of a ground heat pump and further optimization for more efficient use of operating modes and improvement of individual structural elements. In addition, it is proposed to use photovoltaic panels as a backup power source for the experimental installation under study. The exergetic losses are calculated, not only for the ground heat pump itself, with R407C refrigerant. The research methodology consists in a comprehensive assessment of exergetic flows, their optimization using new methods of approximation of piecewise linear functions, and the development of prerequisites for the use of anergy as one of the components of a new type of analysis of the efficiency of low-potential energy sources. As a result of processing the experimental data, the values of Coefficient of performance (COP) 4.136, exergetic temperature for the lower heat source 0.0253 and for the upper heat source 0.155, exergetic efficiency of the installation 0.62, and total loss of specific exergy of the heat pump 24.029 kJ/kg were obtained. Controllers with the Modbus protocol were used for data collection. Matlab Simulink was used to process the experimental data. When carrying out the procedure for optimizing the operating modes and selecting several modes with minimal exergetic losses, an important role is given to mathematical methods of processing statistical data. The method of increasing the efficiency of the heat pump is shown, first of all, based on the use of photovoltaic panels as a backup power source and optimization of exergetic losses due to exergo-anergetic evaluation of operating modes. The authors present the measurement errors of the heat pump plant parameters in the form of a 3D Gaussian curve, which becomes possible only when applying new approximation methods in the processing of measurements.


Introduction
Experience shows that the standard energy method or its special cases based on the first law of thermodynamics are not enough for thermodynamic analysis of the working cycle of the fluid in the temperature range 173-2273 K. The application of the method based on the concepts of exergy and anergy is required to reveal the physical basis for the conversion of various types of energy, heat and work in separate processes and in the work cycle, as well as the further development of the exergy method and its transformation into an exergy-anergy method. The latter concept is applied for the first time. The authors will reveal its essence later in the article and show its advantages compared to others that already exist in practice. This method is based on both the first and second laws of thermodynamics and allows analysis of the energy, heat and work conversions in gas cycles. The proposed method was developed by synthesizing existing methods that are based separately on the first and second laws of thermodynamics. However, the method takes into account factors that could not be considered earlier.
The need to solve heat power and thermodynamic tasks in a more visual way came about during the 1950s. This would make it possible to estimate the efficiency of a plant or process by calculation. It would also be possible to visualize several solutions to the optimization problem and compare them. This would allow the design and construction of new heat power plants based on the most suitable option. The energy method of thermodynamic analysis did not give the necessary results, so the researchers began to apply the concept of exergy, for example, in Germany, Baehr [1], in Poland, Shargut and Bes [2,3], in Ukraine, Brodyanskiy and Ishkin [4,5]. The work of Gokhstein [6], which influenced the future development of this direction in the countries of Eastern Europe and Asia, is especially notable.
A large number of articles, monographs and books on this topic have been published over the past 40 years. Moreover, the authors of publications divided the application of thermodynamic analysis into low, medium and high temperatures systems. Separate methods should be distinguished, in addition to the exergy methods, which researchers used in their work.
Heat pumps are used as thermal plants for various purposes; they are efficient units for energy conversion. They reduce primary energy consumption by utilizing heat [7] from a low-temperature energy source [8] and remove heat to a higher temperature environment. Water can be a heated medium [9]. Scientific articles on the heat recovery system were presented in studies by various authors. The authors distinguish energy, enthalpy, exergy, and COP among other thermodynamic quantities and functions [10].
Currently, researchers are moving from the method of energy balances on the basis of the first law of thermodynamics to the exergy method, on the basis of the second and first laws of thermodynamics. The trend is particularly noticeable in the field of low-temperature technology. The methodological foundations of the use of exergy in various industries are known, for example, in the oil and gas, metallurgical and energy sectors. However, the development of algorithms and mathematical models for the use of flow exergy is most relevant for units and plants in the field of refrigeration, air conditioning, ventilation, heat pumps and renewable energy. It should be noted that the improvement of existing methods and the development of new ones are possible only during experimental studies.
The aim of this research is to experimentally determine the exergy losses of a ground heat pump and their further optimization for more efficient use of operating modes and improvement of individual structural elements.
To achieve this goal, the work is divided into the following scientific tasks.
1. A study of the operation of an underground heat pump operating on freon R407c in a research installation. 2. Determination of the main thermodynamic parameters during the operation of a heat pump installation, namely temperature, pressure, flow rate of coolants and refrigerant. 3. Determination of the basic functions of the parameters, in particular, enthalpy and entropy at specific points; determination of specific values of the cycle. 4. Compilation of exergy balance according to experimental data and comparison of the obtained results with analytical calculation. 5. Calculation of exergy and anergy of the refrigerant flow in individual elements of the heat pump installation. 6. A mathematical description of the loss of specific exergy and exergy fluxes using piecewise linear functions. 7. The use of new methods for approximating piecewise linear functions by recursive functions using the method of Professor S.V. Aliukov. 8. The use of new methods for approximating piecewise linear functions to solve the optimization problem for exergy and anergy flows.
The scientific novelty of the work lies in the fact that the theoretical and methodological base for the study of low-temperature power plants using the exergy method based on the concept of using exergy and flow anergy has been improved. The authors created a mathematical modeling technique based on new approaches to the approximation of piecewise linear functions by recursive functions. It improves the accuracy and reliability of the results and is adapted to the capabilities of modern technologies, regulation of the thermal characteristics of the flow and the properties of the refrigerant. A software algorithm that allows calculation of the optimal value of exergy losses in individual elements of the installation is created, based on the technique developed by the authors. This algorithm can be used in the future to determine the efficiency of a heat pump installation.
The practical significance lies in increasing the efficiency of the designed heat pump plants, as well as extending the lifetime and increasing the efficiency of those already in use.
The applied part of the work from the point of view of economic prospects for science is that the developed software product itself does not use complex and expensive computational systems for modeling. Its algorithms are based on the use of empirical data.
At the moment, there are standard methods for analyzing the operation of a heat pump unit.

Pinch Analysis
The issues of thermodynamic optimization of processes occurring in the elements of heat power equipment and in the heat power systems themselves are considered in solving problems of increasing the initial energy efficiency of technical systems. Pinch analysis is one of the most effective methods for parametric optimization of heat and power processes. It is also known as the method of integrating thermal processes [11]. One of the main limitations of this method is its orientation toward the enthalpy approach to the analysis and optimization of heat fluxes in the system under consideration.

Exergy Method
The development of thermodynamic analysis led to the formation of a separate exergy method. The works of Brodyanskiy, Fratsher, and Michalek should be noted as the most significant [12].
Sankey diagrams are widespread in various branches of technology [13]. However, they are no longer the only tools for visualizing forms of energy such as heat and work in relation to energy flows in heat power systems. Moreover, the flows of enthalpy, heat and work are not enough to understand the possibilities of increasing the efficiency of a thermodynamic cycle.
Grossman diagrams [14] are widely used in connection with the development of the exergy method of thermodynamic analysis based on the second law of thermodynamics. Grossman diagrams are more informative compared to Sankey diagrams because Grossman diagrams represent exergy flows.

Exergo-Economic Method
The exergo-economic method is a continuation of the development of the exergetic method when combined with the methods of economic analysis [15]. The main factors affecting the efficiency of power plants are discussed here. Energy costs and energy losses are reduced due to increased efficiency. This method involves solving the problem of optimizing the use of energy for installations operating on geothermal energy [16]. The method under consideration is effective and intuitive for low-temperature installations [17], but difficulties arise when solving individual technological problems for power plants using high potential energy.

Prospects for the Development of the Exergetic Method
The need for a specialized literature appeared in connection with the expansion of the number of scientific and engineering workers using the exergy method. The foundations of this method and its application should be presented in detail in such literature. Such a generalization was first made in [2]. Then applied problems for some types of thermal equipment were described in [12], where they were solved using the exergy method. This literature shows a methodology for optimizing energy transformation systems and working fluid flows. The concepts of transit exergy, generalized efficiency, and secondary energy resources are introduced for the first time. The diagrams are given here for substances and mixtures in which exergy is deposited along the ordinate and enthalpy is plotted along the abscissa. Diagrams are also considered in which exergy is plotted along the ordinate axis, and entropy is plotted along the abscissa axis. The work is also known for the fact that Sankeyʹs band diagrams are given. The methodology presented in [12] is based on the methodology of exergy balances and methods for calculating exergy efficiency. The fundamentals of the modern exergetic method are described in [18][19][20]. Dincer in [19] presents the methodological foundations of exergy use and exergy losses as the main values that show the efficiency of various heat-technological plants.

The Theoretical Basis of the New Methodology
All forms of energy consist of exergy and anergy according to the second law of thermodynamics. That is, in the most general case, it can be written that energy is the sum of exergy and anergy. As is known, exergy is that part of energy that can be converted into any other form of energy under given environmental parameters. It should be noted that there are forms of energy that can be converted without residue. Such forms of energy include useful work, kinetic and potential energy, and electricity. These forms of energy consist only of exergy. Anergy is that part of energy that cannot be converted into any other form of energy. The forms consisting only of anergy include the internal energy of the environment, the energy accumulated in thermodynamic systems, which is in a state of thermodynamic equilibrium with the environment, heat at ambient temperature, and the work to overcome environmental pressure.
It should be noted that there are also forms of energy that can partially be converted into other forms of energy. These are the heat and internal energy of thermodynamic systems, the temperature and pressure of which are different from the temperature and pressure of the environment. For these forms of energy, the amount of exergy is limited by the second law of thermodynamics. According to the second law of thermodynamics, the following statements are valid for exergy and anergy. Exergy turns into anergy in whole or in part in all irreversible processes. The sum of exergy and anergy remains constant in all processes. Exergy remains constant only in reversible processes. Anergy cannot be turned into exergy.

The Maim Formulas Used in the Development of the Methodology
We will briefly describe the theoretical values on which the developed methodology is based. To do this, consider an arbitrary cross Section 1 of the freon flow in the cycle of a heat pump installation, in which the freon flow is characterized by pressure p 1 , Pa, and temperature T 1 , K.
The specific exergy of the flow e i , kJ / kg, is determined by the Formula (1): where i 1 -specific enthalpy of flow in cross Section 1, kJ/kg, s 1 -cross Section 1 specific entropy, kJ/(kg·K), environmental parameters and functions: i env -specific enthalpy of the environment, kJ/kg, Т env -absolute ambient temperature, K, and s env -specific entropy of the environment, kJ/(kg·K).
Formula (1) may be presented in another form: Thus, the specific anergy of the flow a i , kJ/kg, can be calculated by the Formula (3): Specific exergy of the flow e i has its natural zero value in the state of the environment when i=i env , s=s .
Specific anergy of the flow a i , like the enthalpy itself, is determined up to an arbitrary constant depending on an arbitrary reference point. When determining the difference in energy, these arbitrary constants are reduced.
Specific exergy of the flow e i can be numerically larger than the specific enthalpy itself; in this case the specific anergy of the flow will have a negative value.
On the T-s diagram, the specific exergy of the flow e i is represented by the area, if we select the point of intersection of the line of enthalpy i=i with isobar р=const. Next, an experimental research plant and its process scheme are considered. Then, an example of calculating the thermodynamic analysis using the developed exergy method based on this plant is given.

Experimental Unit
A prototype heat pump plant assembled specifically for scientific research in the field of low-potential energy sources is used for experiments. Figure 1 shows a general view of the experimental setup. Figure 2 shows the thermal diagram of the installation according to Figure 1.

Theoretical Basis for the Use of Photovoltaic Cells as a Backup Power Source for a Heat Pump
The transformation of the electromagnetic energy of radiation in the region of light wavelengths leads to the appearance of three types of effect: external photo effect -the emission of electrons from the surface of the body; internal photo effect -changing the electrical properties of materials; and photo effect of the locking layer -appearance of electromotive force in semiconductors. In photovoltaic converters, a third type of photoelectric effect is used, exergy at the input to photovoltaic converters -this is the energy of solar radiation.
As shown by the conducted experimental work, as well as analytical calculations of the exergy losses of using photovoltaic cells as a backup power source, it allows an increase in the efficiency of the thermodynamic cycle. In this case, part of the electrical energy required for the electric drive of the pump can be obtained by photovoltaic cells with low exergetic costs.
The connection diagram of the photovoltaic panels is shown in Figure 3. According to Figure 3, the inverter is used to convert direct current from batteries or solar panels to alternating current, similar to the current in centralized power supply networks. The purpose of connecting the photovoltaic panels is to provide backup power to the compressor, pumps and an additional electric heater of the heat pump unit.

Measurement of Parameters and Their Regulation
Two of the most important parts of a heat pump unit are the evaporator and condenser. For example, a condenser is used to transfer heat from the R407C refrigerant to the hot water circuit. The evaporator is used to transfer heat from an underground installation or a cold water tank, as in a laboratory installation, to the R407C refrigerant. The main task of the evaporator and condenser control systems is to maintain the set temperature of the hot water circuit depending on the ambient temperature. It must also ensure efficient and reliable operation of the evaporator and condenser. The control valve provides the supply of refrigerant to the evaporator, thereby ensuring its overheating at the outlet in a strict temperature range. This can be presented in the form of a temperature-regulating or electronic expansion valve, which opens the pipeline for supplying liquid to the evaporator at a given temperature and closes it if necessary.
Here is the applicable sensor installation scheme for the refrigerant evaporation system R407C.
Temperature control valve ТЕ2 controls the supply of liquid refrigerant and maintains the superheating of gas at the outlet of the evaporator at a given level. Digital controller ЕКС regulates the temperature of the cooled medium and controls the solenoid valve EVRС, which measures the sensor AKS РТ 1000.
Note that not all temperature and pressure sensors are shown in Figure 4a. Consider these further in Figure 4b.  Separately, we note the location of the temperature and pressure sensors without taking into account the valves in this case.
Nomenclature of temperature sensors and pressure transmitters in controllers: S1: Temperature sensor for measuring the evaporation temperature Pe: Pressure transmitter for measuring the true evaporation pressure S2: Suction temperature sensor at the outlet of the evaporator S3: Temperature sensor for ethylene glycol entering the evaporator inlet S4: Temperature sensor for ethylene glycol coming out of the evaporator S5: Intermediate temperature sensor (only for monitoring) S6: Controller used The order of the sensors: Po: Pressure transmitter for measuring suction pressure Pc: Pressure transmitter for measuring discharge pressure Ss: Temperature sensor for monitoring the suction temperature against overheating, together with a pressure transmitter Po Sd: Temperature sensor for measuring the discharge temperature It should be noted that Pt temperature sensors are used. Sensors of this type are also called RTD sensors -Resistance Temperature Detectors (temperature resistance detectors). The sensing elements of these sensors are made of platinum, for example, the Pt1000 sensor. The numbers indicated in the name indicate the nominal resistance at 0 °C; in this case the resistance is 1000 Ohms. When the temperature increases/decreases by 1 °C, the resistance increases/decreases by 4 Ohms; this characteristic of the sensor is a linear relationship. The error of the Pt1000 sensor is less than (±0.3 + 0.005 T). This means that, during the heating control, the temperature error is less than 0.5 °C. When using additional cables for sensors, it is necessary to take into account in the course of experiments that the resistance of a long cable can lead to an increase in error. Therefore, the recommended total resistance of the cable should not exceed 2 Ohms, so that the total declared temperature error is not more than 0.5 °C (for Pt1000).
The main task of researchers in measuring pressure is to select the correct pressure transmitter that corresponds to the range of measured pressure, the declared sensitivity and the signal compatible with the electronic cooling controller. In traditional cooling and heating systems, two pressure ranges are measured: evaporation pressure and condensation pressure. Since the measurements are performed for different pressure levels, the measured pressure ranges of the pressure transmitters must be different when measuring high and low pressure. Typically, pressure transmitters with a range of −1 to 12 bar are used to measure low pressure, and transmitters with a range of −1 to 34 bar for high pressure. The pressure measurement error of such sensors is ±0.5%.

Determination of the Errors in the Measurements
In addition, a standard algorithm for processing direct multiple measurements was used. The arithmetic mean value is calculated using the formula: Next, the sample standard deviation from the measurement error value is calculated using the formula: The range of the confidence interval for the random error is calculated: where ∆ . -random error, t -Studentʹs coefficient. Next, the confidence interval for the error is determined: where ∆ ∑ -confidence interval for error, k -coefficient, for such calculations is usually taken k = 0,65, ∆ -absolute value of the error according to the international system of measurement. Formula (7) can also be replaced by the following formula: where Θ -range of non-excluded error residuals. Ultimately, the result is written as:

Determination of the Refrigerant Parameters at the Characteristic Points of the Heat Pump Installation
The operating mode of the heat pump installation is characterized by the following temperatures during the experiments: t -boiling point (saturation point) of the liquid refrigerant in the evaporator t = -7 °С, which corresponds to pressure p =3,2 Bar; t -refrigerant vapor condensation start temperature in the condenser; t -refrigerant condensing temperature in the condenser, t =28 °С, which corresponds to pressure p =12,3 Bar; t -liquid refrigerant subcooling temperature in front of the control valve; t -superheated steam temperature at the compressor inlet (suction temperature); t . , t . -temperature of hot water (high potential heat source) at the inlet and outlet of the condenser: t . = 41 °С, t .
= 45 °С. The above temperatures were measured experimentally. Next, temperatures are calculated whose numerical values are unknown, but can be determined on the basis of the obtained experimental data.
The condensation temperature in water-cooled condensers depends on the temperature and the amount of supplied water. The optimum temperature is the temperature of the onset of condensation, which is 10-15 °С higher than the temperature of the water t .
The refrigerant inlet of the compressor is overheated to prevent wet running of the compressor. In machines running on R407c, steam overheating can be obtained in two ways. First, gas overheats directly in the evaporator if its filling is regulated by steam overheating. Second, steam overheats in the pipeline on the way to the compressor as a result of the influx of heat from the environment. Safe operation of machines running on R407c freon is ensured by gas overheating by 5-15°С: t = t + (5 − 15) = −7 + 15 =8 °С.
Consider the standard method of exergetic analysis of a heat pump unit

The Cycle of the Heat Pump Plant on the Diagrams in the Coordinates lg(p)-i and T-s
Compression heat pump installation cycle is more convenient to calculate according to the scheme lg(p) ( Figure 5).
The following processes are shown in lg(p)-i diagram: 6-7 -boiling of freon in the evaporator (dry saturated gas leaves the evaporator); 7-1 -overheating of freon vapor in front of the compressor in a regenerative heat exchanger; 1-2″ -adiabatic (ideal) compression in the compressor; 1-2 -actual vapor compression process in a compressor; 2-2′-3 -the heat removal process in the condenser which can be divided into two separate processes. The first process 2-2′ is cooling the steam to saturation. The second process 2′-3 is the condensation of wet freon vapor; 3-4 -supercooling of liquid freon in a sub-cooler at constant pressure; 4-5 -further subcooling of liquid freon in the regenerative heat exchanger at a constant pressure in the regenerative heat exchanger; 5-6 -throttling of freon in the control valve.  Table 1. They are recorded in the order of determination.  In addition, the missing values of the parameters and parameter functions at characteristic points are determined by i-s diagram. The results are summarized in Table 2.

Exergy Method for Evaluating the Efficiency of a Heat Pump Installation
Parameters of characteristic points of the cycle (Р, Т, i, s, е) are determined by their location. Next, the cycle is constructed in i-s coordinates, Figure 7, and results are summarized in Table 3.  The exergy balance shows energy values taking into account their technical value, which depends on the temperature potential of heat flows. Energy balance does not show this. An exergy balance was compiled, and the results are summarized in Table 4. The differences in determining the sum of the specific losses in the heat pump are associated with measurement error in the experimental determination of the main parameters of the cycle, as well as with the error in using the diagrams in determining the specific entropy.

Calculation of Specific Exergy and Anergy from Experimental Data Obtained during Operation of a Heat Pump Plant
The values of specific exergy and anergy of the flow are determined by the formulas (1) and (3). Consider the results in Table 5 and Figure 8.

Exergetic Balance of Photovoltaic Cells
The expression for this exergy can be obtained from Formula (10), in which the temperature T is the temperature of the sun, and solar radiation can be considered as the radiation of a completely black body: At the temperatures of the sun and the environment T = 6000 K, T0 = 300 K, the specific radiation energy fluxes and exergy are linked by the ratio That is, the exergy of the radiation is slightly less than the energy of the radiation. The exergy flow at the outlet of the installation is equal to the electrical power of the photoelectric converter where -photoedc -voltage applied to the external load; , where I -electric current passing through an external load; Iph -photocurrent; and Ip-ncurrent through p-n semiconductor transition. Then exergetic COP of the photovoltaic converter is equal to: .
In this expression, the main exergetic losses are associated with the fact that only the part of the radiation spectrum corresponding to the wavelengths in the visible part is effective. For silicon, the maximum wavelength of the radiation that creates the photocurrent is 1200 nm. In addition, exergy losses are associated with incomplete use of photon energy, side processes in the p-n junctions of a semiconductor, and the reflection of part of the radiation from the photosensitive surface. The contribution of these processes to the total exergy losses depends on the individual properties of the materials used in photovoltaic converters and can be estimated by methods of semiconductor theory.

Theoretical Considerations in the Recommendation to Improve the Accuracy of Determining Parameters and Development of Basic Mathematical Relations
Specific exergy losses can be described in the range of the distinctive specific exergy, with the intervals to be taken ex F(e1/e2) and F(e2/e3). In this case, it turns out: Specific points Fi are formed when determining the specific exergy losses by Equation (15). The specific points are thus obtained from a continuous curve characterizing the unity of specific exergy parts. The specific exergy curve can be differentiated or integrated to describe in detail the processes of energy transfer from one type to another due to the continuity property of its function. This contributes to the construction of a future mathematical model of the heat transformation process. The reliability of the decision should be increased with an increase in the number of direct laboratory measurements of parameters on each element of the heat pump.
Further, taking into account the transition to a continuous function and the mandatory increase in the number of parameter measurements, as well as by analyzing the fundamental foundations of distribution theory, it can be concluded that the Gaussian curve corresponds to the chosen form of function. In addition, the density of the normal probability distribution of deviations from the mean, which is denoted by θ u , is determined by the standard formula: The argument for the function in Formula (11) is the standard normal deviation: In Formula (17), ξ -is the quantity that corresponds to ex, which corresponds to the maximum on the curve Fi under consideration, σ is standard deviation, and σ 2 is dispersion.
Normalization of the given function was carried out after placing the entire unity of the specific exergy parts near the maximum ξ in their number and reducing the values to dimensionless form. The standardization of the function can be carried out by adducting the characteristics of unity to the type of function depending on the standard deviations σ.
In fact, the error function ʺθʺ (ʺuʺ) obtained by (16), which in this case is better referred to as the deviation function, is tabulated and given in reference books. This is also mentioned in [11].
The standard deviation uniquely determines the function (16). The values u = 1 and u = −1 correspond to the inflection point on the curve constructed according to dependence (16). The dispersion σ 2 = (e -ξ) 2 /(ξ·u) 2 is easily determined by the curve θ (u) constructed in accordance with the fractional composition. The reliability of the description of (15) can be quantified by determining in the usual way the correlation coefficient between practical results from experimental measurements of temperature, and hence exergy, and the Gauss curve. This technique can also be applied at the F(ei) determination stage.
In addition, the authors emphasize that the developed technique for normalizing the continuous function described by the Gaussian curve can be applied not only to the heat pump. This procedure is suitable for conducting an exergy analysis for virtually any heating equipment. The Gaussian distribution density of the normalized value in 3D is shown in Figure 9, where it can be seen that the distribution is shifted to the region of positive x values.

Using Differential Curves to Describe Particle Distribution
It is necessary to determine the normalized value of the specific exergy for the given initial operating conditions of the heat pump, corresponding to the most common operating mode. This is necessary for mathematical modeling of the distribution of specific exergy over the elements of the heat pump and for further optimization of the heat pump in general.
This normalized specific exergy can be found from the differential distribution curve. It is necessary to process the integral curve in order to construct it. Ordinates are drawn up to the intersection with the integral curve at equal intervals of sizes Δei, which are selected in proportion to the specific operating mode of the heat pump. Then the Δy value is found -the difference between two adjacent ordinates. Then, rectangles are constructed, normalized specific exergy values are plotted on the abscissa axis, and Δy / Δei are plotted on the ordinate axis. equal intervals of sizes Δei are taken as bases, and equal intervals Δy / Δei are taken as height ( Figure 10).

The Use of Piecewise Linear Functions and Approximations by Recursive Functions for the Mathematical Description of the Specific Exergy Distribution over the Components of a Heat Pump
In the process of solving the problem, it is proposed to take as a basis the obtained distribution graph (stepwise figure, Figure 11), which is described by a piecewise continuous function y= ∑ p i x i <x .
A solution can be obtained using the methods of linear systems theory on each section of such a function. At the same time, problems often arise when constructing solutions over the entire domain of determining a piecewise linear function and linking solutions to sections with the need to use special mathematical methods. To simplify the calculations, it is possible to resort to approximation methods, in many cases working with piecewise linear functions. One of the most widely used methods for approximating piecewise linear functions is the expansion of these functions using Fourier series: In Formula (18) φ 1 ,φ 2 ,…,φ n ,… is an orthogonal system in a functional Hilbert space L2[-π, π] of measured functions with Lebesgue integrable squares: A trigonometric system of 2π-periodic functions can be adopted as an orthogonal system, for example, such functions as 1,sin(n·x), cos(n·x); n N .
The use of Fourier series has its disadvantages. For example, if the number of terms in the Fourier series used to decompose a piecewise linear function is relatively small, then the approximating function has a pronounced wave-like character even within the same rectilinear section of the piecewise linear function. This leads to a sufficiently large approximation error. In [21][22][23], Aliukov shows that for a function with rectangular moment (20), the points x = π/m, m = 2[(n + 1)/2] and [(n + 1)/2] are the integer parts of the number (n + 1)/2.
This point is the maximum point of the partial sum S n (y 0 ) of the trigonometric Fourier series [21][22][23]. Moreover That is, the magnitude of the absolute error will be equal to: Then the relative error is more than 17%, regardless of the number of summands in the partial sum of the Fourier series.
In addition, an increased approximation error in the vicinity of the discontinuity points of the initial function appears for the graph of the approximating function. This is the manifestation of the so-called Gibbs effect [22][23][24][25], and the Gibbs effect does not disappear with an increase in the number of harmonics, which leads to extremely negative consequences of using the approximating function.

New Approaches to the Approximation of Piecewise Functions
It is proposed to approximate the initial step function (18) by a sequence of recursive periodic functions [26] to eliminate the noted drawbacks.
y n x |y n x =sin π 2 ·y n-1 x , Approximation (23) is based on the use of trigonometric expressions, but not in the form of summands, as in the Fourier series, but in the form of embeddings.
The graphs of the step function (23) and its four successive approximations in this case have the form shown in Figure 12. It should be noted that the graph of the approximating function approximates the initial function y even at relatively small values of n during procedure (23). In the case of the proposed approximation method, the sinusoid is stretched along the straight sections of the original function graph. In this case, no fluctuations of the approximating function within the rectilinear sections of the initial step function occur. The Gibbs effect is also completely absent.

Analytical Calculations by the Proposed Method of Mathematical Modeling
The integral of the probability distribution function of deviations (16) corresponds to the sequential nature of the increase in specific exergy and the additive dependence of the total exergy content. In their studies [23], the authors considered similar points, but in burning fuel. In addition, it was assumed in [24] that the most basic thermodynamic functions can be used as the basis of the exergy method. In the study [25], the direction of analysis laid down in [23] was partially continued. Finally, similar methods of thermodynamic analysis were used in [26,27]. It is rational to set the integration limits from -∞ to the maximum specific exergy value, emax, which corresponds to the upper limit of integration: The lower limit of integration is determined by the number of components in the heat pump design. This is important for calculating heat transformation processes. The upper limit is associated with the calculation of the most effective heat pump operating modes in terms of specific exergy, which is also associated with the composition of the heat pump structures in the region of large values of ei. It is necessary to add the conditions of interaction of the refrigerant and the environment to the adopted scheme in order to determine the interaction of specific exergies. As a result, more accurate results of experimental and numerical studies can be obtained using new methods of approximation and analysis of deviations of specific exergy ( Figure 12). In particular, the three-dimensional distribution of deviations in the calculation of specific exergy is given below. Figure 13 is based on the data presented in Table 6.  Table 6). A large number of sources of small random errors affects the measurement results. The entire set of measurements has a symmetrical bell-shaped Gauss function as a limit distribution ( Figure 10). The distribution center, which coincides with the maximum of this function, will be the true value of the measured value. The values of the measurement error within 3-4% were obtained using the approximation method of Professor S.V. Aliukov. The method was first considered in connection with numerical methods of gas dynamics of real liquids and vapors and experimental data for the flux of R407C freon.

Results of Direct Measurements and Samples
The studies are carried out in cooperation with one of the firms of representatives of the European Union countries in Russia (Figure 1). The following values of the specific exergy of Freon (Table 7) were obtained from the results of experimental studies, depending on temperature. In this case, the values shown in Table 7 represent the maximum deviations (uncertainty) in the collection of experimental data. After processing this data, the validation procedure was performed in the Matlab Simulink program. In addition, the authors of the article note that a pilot study is regularly conducted at the research object, including changes in the pressures of the lower and upper sources, as well as the temperatures of the heated water and the environment.

Recommendations on the Use of New Mathematical Methods for Assessing the Anergy of Individual Processes and Systems
It is proposed to evaluate the increase in specific anergy in a similar way. This can be described by the integral of the probability distribution function of deviations. Moreover, it is rational to establish the integration limits from the minimum value of anergy аmin to +∞ corresponding upper limit of integration: The upper limit of integration ax is determined by the number of elements in the design of the heat pump and is important for calculating heat transformation processes.
The lower limit is associated with the calculation of the least effective values in terms of specific anergy, which is also associated with the composition of the heat pump structures in the region of the smallest values of аi. The given dependence is theoretically and experimentally justified, but it requires further development of the theory and practice of applying anergy as the least effective quantity in the thermodynamic cycle of the heat pump.

Conclusions
The experimental studies carried out by the authors allowed us to determine the main technical and economic indicators of the heat pump installation.
1. The values of Coefficient of performance (COP) 4.136, exergetic temperature for the lower heat source, 0.0253, and for the upper heat source, 0.155, exergetic efficiency of the installation, 0.62, and total loss of specific exergy of the heat pump, 24.029 kJ/kg, were obtained. Modbus controllers were used for data collection, and Matlab Simulink was used for data processing.

2.
A research methodology is developed for evaluating exergetic flows and optimizing these using new methods for approximating piecewise linear functions.
3. The measurement errors of the heat pump unit parameters are presented in the form of a 3D Gaussian curve, which became possible only with the use of new approximation methods in the processing of measurements.
4. Thus, for the ground heat pump with R407C refrigerant and photovoltaic panels, the operation modes were optimized, and new analytical methods were developed to improve the efficiency of the heat pump unit.