An Experimental Data-Driven Model of a Micro-Cogeneration Installation for Time-Domain Simulation and System Analysis

In this article, an investigation of a free-piston Stirling engine-based micro-cogeneration (μCHP) unit is presented. This work is a step towards making the system calculations more reliable, based on a data-driven model, which enables the time-domain simulation of the μCHP behavior. A laboratory setup was developed that allowed for the measurement of a micro-cogeneration unit during long-term operation with a variable thermal load. The maximum efficiency of electricity generation was equal to 13.2% and the highest overall efficiency was equal to 95.7%. A model of the analyzed μCHP system was developed and validated. The simulation model was based on the device’s characteristics that were obtained from the measurements; it enables time-domain calculations, taking into account the different operating modes of the device. The validation of the system showed satisfactory compliance of the model with the measurements: for the period modeled of 24 h, the error in the heat generation fluctuated in the range 0.31–4.50%, the error in the electricity generation was in the range 2.48–4.70%, the error in the natural gas consumption was in the range 0.26–4.59%, and the engine’s runtime error was in the range 0.14–8.58%. The modelling process is easily applicable to other energy systems for detailed analysis.


Introduction
Low-stack emission reduction can be implemented by using sources of lower emissions in dwellings (e.g., gas boilers) or renewable sources. The need to increase the share of renewable and distributed energy sources in the production structure, enforced by laws introduced by the European Union, will cause an increase in the interest in such technologies at the local level. Obtaining the required share of renewable energy in total production and reducing pollutant emissions will take place through the implementation of new technologies as well as the modernization of current technological resources, but also through support for distributed energy, in particular, prosumer systems. The use of renewable sources, widely promoted by the EU for many years, is the future of energy production, but it poses significant challenges, which include, first of all, a high investment cost and the discontinuous nature of energy production.
Therefore, for renewable energy to become a reliable source of energy, in addition to the need to reduce costs, it is necessary to:

Review of Stirling µCHP Research
Research on Stirling engines has intensified exceptionally over the past decade. There are numerous examples in the experimental research, aimed mainly at determining the efficiency potential [9,10] or modeling studies describing the Stirling cycle [11,12]. A separate category is papers concerning free piston engines [13][14][15], which take into account the engines kinematics; in general, these papers focus on the engine itself. There are also examples of using dedicated software (e.g., Sage) for simulation FPSEs [16,17]. An innovative modeling approach has been presented in paper [16]. Researchers implemented a thermoacoustic theory to simulate the micro-cogeneration system based on a free piston Stirling engine. The simulation process was complemented with an experimental study, which revealed the primary deviation within 10%. The combined heat and power (CHP) system only included the engine and it supplied over 6.3 kW of thermal power at mean water temperature of 60 • C. The obtained electric power was 2.9 kW with an overall thermal efficiency of 87.5%. The comprehensive approach for the design of the FPSE for cogeneration purposes was presented in paper [17]. Sage software was used for performance mapping, and the main components of the designed engine were manufactured and examined. The designed engine was meant to operate at 60 Hz due to integration with a preexisting linear alternator and the proximity of the power grid frequency, however the performance mapping of the system was performed within the range of 50-70 Hz. A review of the research conducted on engine modeling, together with its own proposition of model analysis, was described in detail by the authors of article [18]. An interesting viewpoint has been presented by papers related to the potential applications of the engine for larger power systems, usually supplied with biomass [19][20][21][22].
The field tests of the Whispergen Mk IV have been presented in the literature [24]. The µCHP system (1 kW of electrical power and 7 kW of thermal power) is equipped with a four-cylinder Stirling engine; the unit is powered by natural gas. The tests of the system when operating in a single-family house allowed for a 20.8% reduction in the electricity purchased from the grid. The annual overall efficiency of the system was 86.3%, while the manufacturer's stated efficiency was 90%. An important result of the research was the availability of the system for 97% of the time throughout the year. The field data of the Whispergen device was also used for modeling [32]. The proposed solution seems to be able to be used for the selected demand profile, however, it does not include cooperation with the heat buffer or external control system. Significant work regarding micro-cogeneration modelling Energies 2020, 13,2759 3 of 26 has been presented within IEA/ECBCS Annex 42 [33]. The main outcome is the zero-order modeling approach related to fuel cell and combustion-based µCHP devices [34]. The models omit the physical phenomena and rely on engine-specific parametric equations; it has to be calibrated using experimental data [35]. Its empirical nature makes it applicable for only one device when calibrated. In the case of the Stirling engine, the Whispergen SE data was used [36].
Significant research has been demonstrated [23], where a model of the µCHP gas system with a Stirling engine has been prepared, which was validated by the measurement data. The researchers noticed a significant difference in the approach to modeling, focusing on the proper mapping of the Stirling cycle, and the simulations of buildings equipped with energy generators. Detailed models of the engine did not answer the questions posed in the system analysis and energy assessment of prosumer systems. The prepared model contains transient states of the engine; however, it does not take into account the control system and power modulation of the system. Important experimental tests have been described in [25]. The researcher performed an analysis of a micro-cogeneration unit (a Stirling engine with nominal parameters of 1 kW el and 5 kW th and peak boiler power of 18 kW th ) in real conditions. Although this type of analysis is burdened by situations that are important for the measurement results, such as holidays and power blackouts, it provided valuable data on the efficiency of the µCHP system. For the selected reference measurement, which lasted 1 h (including start-up and shutdown), the efficiency of electricity production was 12.2%, and the total efficiency was 88.5%. In the case of longer, stable work, the authors achieved a total efficiency of about 91%. Efficiencies have been given in relation to the lower calorific value of natural gas. During the described field tests, two modes of operation of the analyzed unit were determined: 0.65 and 0.8 kW el net.
One example of the use of software for dynamic building simulations is a publication in the literature [37], the authors of which used the TRNSYS environment to calculate the seasonal efficiency of a micro-cogeneration unit, based on the data provided by Baxi. The calculation effect indicated that a reduction in the carbon dioxide emissions was achieved through the use of the µCHP. The system efficiency was maintained at a very similar level, regardless of the unit's operating mode.
A paper in the literature [38] presented the concept of using the µCHP system for a combined customer (a multi-family building and an office building), which resulted in an increase in the system's operating time compared to the conventional customer profile, and thus better results with regard to the energy and economic contexts. The researchers pointed out that the key to the proper application of micro-cogeneration is the heat demand profile. For well-insulated buildings with a lower ratio of heat demand to electrical power, a micro-generator based on a gas piston engine was indicated to be more suitable than the variant with a Stirling engine. The same team of authors [39] performed an analysis of a prosumer who uses an electric car and charges it using the µCHP (charging station power of 3.3 kW). The possibility of charging a vehicle overnight significantly increased the level of self-consumption. Charging a vehicle for approximately 7.5 h made it possible to cover an average of 120 km in a day. It should be emphasized, however, that the calculations concerned only the heating season in which it is possible to use heat from the Stirling engine.

Operation Strategies for µCHP Units
Profiles of energy demand in buildings are highly variable. The changing load forces the adaptation of the device supplying the power. A way to prevent peaks in the load is to use energy buffers. However, building heat storage systems have limited capacities, hence there is a need to adjust the power of the energy device. In micro-cogeneration systems, the Stirling engine is an energy generator that usually operates in a two-state, on-off mode, or with a small number of available operating modes.
The general operating strategy is crucial for the optimal effectiveness of the unit, both economic and ecological. Cogeneration units usually operate in two basic modes [40,41]: following the thermal load (FTL, heat tracking), where the maximum possible part of the heat demand is covered by the CHP system, and any deficits are covered by another source. Electricity is an additional product: in the case of overproduction, it is fed back into the grid, and if the demand is higher, electricity is bought from the electricity grid to cover the deficit, • following the electrical load (FEL, electricity tracking), when the most important criterion is the maximum possible coverage (by the CHP system) of the electricity demand and the deficits in the electrical energy production are covered by the grid. If there is too much heat generated, it is dissipated and any deficits are covered by another source.
There are some operational strategies where the objective functions are related to the economic or ecological effects, however they are, in actuality, a combination of the basic modes, including switching the device off. In the case of systems other than micro scale, operation without the cogeneration is also considered-electricity is generated and all the heat is dissipated. A paper in the literature [42] presented the least-cost mode (LC), which minimizes the cost of covering both heat and electricity demand in full by the cogeneration system.
There are also strategies which integrate model predictive control to search for the most appropriate operation mode [42,43]. The methods of optimal switching between different modes or optimal power modulation for the CHP unit have been the subject of extensive analysis in the literature. The analyses applied various mathematical approaches, e.g., fuzzy logic, and were related to the µCHP based on fuel cells [44], microturbines [45] or the integration of photovoltaic/thermal (PVT) modules with a heat pump [46]. A fairly common approach to the system analysis of micro-cogeneration is to assume that the µCHP unit operation is in the on-off mode once or twice per day (only using the daily energy balances) [26,[47][48][49] or applying power modulation to the device within a certain range, e.g., 0-100% [41,50] or 50-100% [51].

Motivation and Novelties of Current Work
It was postulated that the assessment of the system implementation of micro-cogeneration units should take into account the operational characteristics and limitations of real systems. It is reasonable to conduct experimental research that allows for the full performance characteristics of micro-cogeneration systems to be determined, and apply it in the modeling, which takes into account the various constraints and better reflects the operation of the unit, which means that the system analysis will have a smaller error. The analyses of energy systems based on a Stirling engine presented in the literature are a good starting point. They have raised a variety of issues which concern system analysis. This work is a step towards making the system calculations more reliable, thanks to the data-driven model. Moreover, a much smaller time step has been used here, which will allow sudden changes in energy demand to be taken into consideration.
The main novelty of the research presented in this paper lies in a contribution to the time-domain modeling of a micro-cogeneration device. The µCHP can be the basis of the prosumer system. The model was developed on the basis of a detailed experimental investigation under a variable thermal load. The research tasks that were performed led to reliable results in the long-term analysis of the prosumer system operation, e.g., by the year or by the heating season. The purpose of the paper is also to present the modeling process, which is applicable for other energy devices in residential scale providing satisfactory results. The results can provide information allowing economic evaluation for given type of consumer.
The paper consists of six sections. Section 2 presents the laboratory installation and measuring equipment used in the experimental work. Section 3 describes, in detail, the results of conducted measurements. The investigated characteristics of micro-cogeneration device are presented. Section 4 presents the developed model of the installation, including the assumptions and equations used for simulations. Section 5 is focused on the model validation. This part presents the applicability of the model and consistency with the experimental results. Section 6 presents the most important outcomes Energies 2020, 13, 2759 5 of 26 and the conclusions that can be drawn from conducted research. The last part shows also the possible directions for further investigation.

Experimental Setup
The laboratory apparatus was based on the Viessmann Vitotwin µCHP unit. It is fueled with natural gas and consists of a condensation gas boiler with a built-in free piston Stirling engine, which is the product of Microgen [52]. This engine has been implemented in multiple micro-cogeneration devices, e.g., Viessmann Vitotwin, Baxi Ecogen, Remeha eVita. It is characterized by the following parameters: maximum electrical power: 1 kW, working gas: helium, nominal pressure 23 bar, nominal voltage: 230 V, frequency: 50 Hz, weight (without a burner): 49 kg, dimensions (without a burner): 450 mm in height, 300 mm in diameter, noise at a distance of 1 m without a housing: 52.5 dB, in a standard housing: 45 dB, declared service life: 50,000 h, hermetically sealed and maintenance free.
The free piston Stirling engine is supplied with heat by a ring-shaped basic burner. This burner is a source of thermal energy for the engine and it covers the basic heat demand. The burner of an auxiliary boiler (for covering the peak load) is a cylindrical radiant burner. The maximum power of the µCHP device is 26 kW of thermal power and 1 kW of gross electrical power. Figure 1 presents the scheme of the research installation, including characteristic points measured during the investigation. The laboratory stand was described in detail in the literature [53] and the following description is mostly based on the aforementioned paper. The free piston Stirling engine is supplied with heat by a ring-shaped basic burner. This burner is a source of thermal energy for the engine and it covers the basic heat demand. The burner of an auxiliary boiler (for covering the peak load) is a cylindrical radiant burner. The maximum power of the μCHP device is 26 kW of thermal power and 1 kW of gross electrical power. Figure 1 presents the scheme of the research installation, including characteristic points measured during the investigation. The laboratory stand was described in detail in the literature [53] and the following description is mostly based on the aforementioned paper. From the figure: Ti-temperatures-measured by a thermocouple, TDQi, TRQi, VQi-delivery temperature, return temperature and water flow from the heat meter (i = 1 the first circuit μCHP-heat buffer, i = 2 the second circuit: heat buffer-fan heaters), E-bidirectional electrical energy meter, Pump1-internal μCHP unit pump, Pump2-additional pump for the second circuit, obci-fan heaters.
The laboratory installation consists of: a water heat buffer with a capacity of 750 dm 3 ; a water treatment station Aquahome; and two fan heaters Leo Flowair with nominal powers of 46.8 kW and 8.9 kW (for the delivery and return water parameters TDQ2/TRQ2 = 90 °C/70 °C). The fan heaters allow for the dispersion of the heat generated in the μCHP device. The laboratory apparatus allows for the operation of the Vitotwin module to be observed for various ambient conditions and to determine the characteristics of the device without interfering with its internal control system [53]. The external system for measuring and control allows for archiving the results of the measurements of the From the figure: T i -temperatures-measured by a thermocouple, T DQi , T RQi , V Qi -delivery temperature, return temperature and water flow from the heat meter (i = 1 the first circuit µCHP-heat buffer, i = 2 the second circuit: heat buffer-fan heaters), E-bidirectional electrical energy meter, Pump 1 -internal µCHP unit pump, Pump 2 -additional pump for the second circuit, obc i -fan heaters.
The laboratory installation consists of: a water heat buffer with a capacity of 750 dm 3 ; a water treatment station Aquahome; and two fan heaters Leo Flowair with nominal powers of 46.8 kW and 8.9 kW (for the delivery and return water parameters T DQ2 /T RQ2 = 90 • C/70 • C). The fan heaters Energies 2020, 13, 2759 6 of 26 allow for the dispersion of the heat generated in the µCHP device. The laboratory apparatus allows for the operation of the Vitotwin module to be observed for various ambient conditions and to determine the characteristics of the device without interfering with its internal control system [53]. The external system for measuring and control allows for archiving the results of the measurements of the temperature, water flows, and natural gas consumption. It consists of: The system also allows the rotational speed of the fans in the heaters to be adjusted in the range of 0-100%. This is convenient for precise control of the heat demand. The system allows the water outlet for simulating the hot water consumption to be activated. Also, as the internal, weather controller of the µCHP unit is based on heating curves, the ambient temperature has to be adjustable. In order to control the ambient temperature, a Peltier module-based system was developed (the temperature sensor of the µCHP unit is cooled by the Peltier module, and the regulator operates with on-off control). The main feature of the presented control and measurement system is its ability to execute a predetermined operation schedule for the devices. The schedule consists of the number of measurement cycles and, for each cycle, the rotational speed of the heater fans (range: 0-100%), the ambient temperature (T 5z ), and the water sluice from the tank (binary: 0% or 100%) [53].
The set of measured data is archived every ten minutes (τ meas = 10 min). In the case of the counting devices (gas, electricity, heat, and water meters), the current state of the meter is archived. The determined values of the thermal power, electrical power, or efficiencies are the average values for 10-min periods. The efficiency values presented in this paper are related to the lower calorific value of the fuel at LHV gas = 35 MJ/m 3 n . This methodology was previously described in paper [53].
It is important to mention that this study significantly increased the studied range of the device's power. Multiple heating curves were investigated, as it was necessary to provide full information for the modeling process. The experimental determination of the thermal power was improved, which allowed for the thermodynamic effectiveness of the micro-cogeneration unit to be studied better.

Results of the Measurements
The purpose of the measurements was to determine the operational characteristics of the µCHP unit at various heat demands to improve the mathematical modeling of the device.
The following is the nomenclature of the experimentally determined parameters of the µCHP unit, following the installation description in the previous section: T RQ1 -temperature of the return water • C; T DQ1 -temperature of the delivery water, • C; T 5 -ambient temperature (simulated for controller), • C; Q (Q1) -thermal power of the µCHP unit (heat generation), kW; Q (Q2) -total thermal power of the fan heaters (simulated heat demand), kW; E ch -chemical energy of the natural gas, kW; N el_n -net electrical power, kW.
Measurements of the micro-cogeneration system were carried out for three heating curves with different slopes, marked as K1, K2 and K3. The results of the K1 and K3 series of measurements are presented in Figures 2-7, respectively. Due to the concise form of this publication (article), it was decided to only graphically present two series with extreme slopes of the heating curve.
Energies 2020, 13, x FOR PEER REVIEW 7 of 27 system. When the unit worked in cogeneration, the heat demand was covered by the Stirling engine operating at partial load. The system operation was stable; only one mode of the system was active throughout the entire testing period.   The highest TDQ1 temperature values were obtained for a series of measurements of the K3 heating curve. In this case, starting at an ambient (outside) temperature of T5 = 0 °C, the system worked at the highest possible water delivery temperature, i.e., TDQ1 = 78 °C. The range of the tested temperature T5 was from −15 °C to 13 °C ( Figure 5). Figure 6 shows the device's adaptation to the heat demand that exceeded 13.5 kWth. In addition to the Stirling engine, the peak burner was started, which allowed for a smooth adjustment to the heat demand above approximately 10.5 kWth.
An analysis of Figure 7 indicates that the operation of the unit with a thermal power above the level enabled by the Stirling engine with the peak burner at its minimum load (in total above about 10.5 kWth) can be defined as one mode with modulated thermal power. Below this level, it can be seen that the system, due to the presence of a heat accumulator in the installation, did not have to adjust the power to the current demand, it only regulated the heat production by enabling/disabling the individual modes and the operating time of a particular mode. When the heat demand exceeded Energies 2020, 13, x FOR PEER REVIEW 7 of 27 system. When the unit worked in cogeneration, the heat demand was covered by the Stirling engine operating at partial load. The system operation was stable; only one mode of the system was active throughout the entire testing period.   The highest TDQ1 temperature values were obtained for a series of measurements of the K3 heating curve. In this case, starting at an ambient (outside) temperature of T5 = 0 °C, the system worked at the highest possible water delivery temperature, i.e., TDQ1 = 78 °C. The range of the tested temperature T5 was from −15 °C to 13 °C ( Figure 5). Figure 6 shows the device's adaptation to the heat demand that exceeded 13.5 kWth. In addition to the Stirling engine, the peak burner was started, which allowed for a smooth adjustment to the heat demand above approximately 10.5 kWth.
An analysis of Figure 7 indicates that the operation of the unit with a thermal power above the level enabled by the Stirling engine with the peak burner at its minimum load (in total above about 10.5 kWth) can be defined as one mode with modulated thermal power. Below this level, it can be seen that the system, due to the presence of a heat accumulator in the installation, did not have to adjust the power to the current demand, it only regulated the heat production by enabling/disabling the individual modes and the operating time of a particular mode. When the heat demand exceeded Energies 2020, 13, x FOR PEER REVIEW 7 of 27 system. When the unit worked in cogeneration, the heat demand was covered by the Stirling engine operating at partial load. The system operation was stable; only one mode of the system was active throughout the entire testing period.   The highest TDQ1 temperature values were obtained for a series of measurements of the K3 heating curve. In this case, starting at an ambient (outside) temperature of T5 = 0 °C, the system worked at the highest possible water delivery temperature, i.e., TDQ1 = 78 °C. The range of the tested temperature T5 was from −15 °C to 13 °C ( Figure 5). Figure 6 shows the device's adaptation to the heat demand that exceeded 13.5 kWth. In addition to the Stirling engine, the peak burner was started, which allowed for a smooth adjustment to the heat demand above approximately 10.5 kWth.
An analysis of Figure 7 indicates that the operation of the unit with a thermal power above the level enabled by the Stirling engine with the peak burner at its minimum load (in total above about 10.5 kWth) can be defined as one mode with modulated thermal power. Below this level, it can be seen that the system, due to the presence of a heat accumulator in the installation, did not have to adjust the power to the current demand, it only regulated the heat production by enabling/disabling the individual modes and the operating time of a particular mode. When the heat demand exceeded  the heat production capacity of the Stirling engine (about 5.8 kWth), the peak burner started, although it worked with a low (basic) load.     One of the elements that controls the operation of the micro-cogeneration device are the aforementioned heating curves K, i.e., the relationship between the ambient temperature and the water delivery temperature. Figure 8 shows the TDQ1 temperature value as the T5 = Tamb function, which reflects the waveforms of the analyzed curves that were implemented in the device controller.    One of the elements that controls the operation of the micro-cogeneration device are the aforementioned heating curves K, i.e., the relationship between the ambient temperature and the water delivery temperature. Figure 8 shows the TDQ1 temperature value as the T5 = Tamb function, which reflects the waveforms of the analyzed curves that were implemented in the device controller.  Figure 2 presents the recorded values of the delivery/return water temperature and the ambient temperature for the K1 heating curve. In the wide range of the ambient temperature that was tested, from −15 • C to 15 • C, relatively small differences in the supply temperature were obtained; this means that the slope of the K1 curve is shallow. The temperature range below 40 • C allowed for the thermal powers shown in Figure 3 to be achieved. The possibilities of heat dissipation were controlled by the air temperature in the room which had a large volume, in which the fan coolers were located, therefore the thermal power demand Q (Q2) did not exceed 5 kW th . The same figure shows the heat output generated in the µCHP Q (Q1) .
It is clear that the system could match the demand well, but it worked on an on-off basis. Figure 4 shows the thermal and electrical power as well as the chemical energy stream used by the µCHP system. When the unit worked in cogeneration, the heat demand was covered by the Stirling engine operating at partial load. The system operation was stable; only one mode of the system was active throughout the entire testing period.
The highest T DQ1 temperature values were obtained for a series of measurements of the K3 heating curve. In this case, starting at an ambient (outside) temperature of T 5 = 0 • C, the system worked at the highest possible water delivery temperature, i.e., T DQ1 = 78 • C. The range of the tested temperature T 5 was from −15 • C to 13 • C ( Figure 5). Figure 6 shows the device's adaptation to the heat demand that exceeded 13.5 kW th . In addition to the Stirling engine, the peak burner was started, which allowed for a smooth adjustment to the heat demand above approximately 10.5 kW th .
An analysis of Figure 7 indicates that the operation of the unit with a thermal power above the level enabled by the Stirling engine with the peak burner at its minimum load (in total above about 10.5 kW th ) can be defined as one mode with modulated thermal power. Below this level, it can be seen that the system, due to the presence of a heat accumulator in the installation, did not have to adjust the power to the current demand, it only regulated the heat production by enabling/disabling the individual modes and the operating time of a particular mode. When the heat demand exceeded the heat production capacity of the Stirling engine (about 5.8 kW th ), the peak burner started, although it worked with a low (basic) load. One of the elements that controls the operation of the micro-cogeneration device are the aforementioned heating curves K, i.e., the relationship between the ambient temperature and the water delivery temperature. Figure 8 shows the T DQ1 temperature value as the T 5 = T amb function, which reflects the waveforms of the analyzed curves that were implemented in the device controller.

Determination of Operating States
The measurements made it possible to determine the parameters of the conditions of stable operation at various heat loads. The described operational states were characterized by different thermal powers, electrical powers, the use of chemical energy of the fuel and the efficiency of energy production. Each of the operating states was determined for a five-hour operation of the microcogeneration unit at a constant power, and the presented power values, Nel_n(av), Q(Q1)(av), and Ech(av), were determined as the average values of 30 measurement points during the five hours of operation, in accordance with the general relationship expressed by the Equation (1). Each of the measurement points is an average value for a 10-min period, which resulted from the use of measurement devices to measure the flow of the media (as described in Section 2). (1) where, X: _ -net electrical power at the working point, kW, ( ) -thermal power at the working point, kW, -chemical energy flux at the working point, kW. For each operating state, the efficiency of electricity generation ηel_av, heat generation ηq_av and the overall efficiency ηel+q_av were also determined in accordance with the following relationships: Two operating states of the Stirling engine can be distinguished: partial load (SP1) and maximum load (SP2). In the case of operation of a cogeneration unit with thermal power above the production capacity of the Stirling engine, two further operating modes can be generally distinguished: SP3-operation with a power of approximately 10.5 kWth (Stirling engine + peak burner with a basic load) and SP4-work with heat power above 10.5 kWth, when the power is smoothly modulated due to the peak burner. The periods of stable operation in these modes are

Determination of Operating States
The measurements made it possible to determine the parameters of the conditions of stable operation at various heat loads. The described operational states were characterized by different thermal powers, electrical powers, the use of chemical energy of the fuel and the efficiency of energy production. Each of the operating states was determined for a five-hour operation of the micro-cogeneration unit at a constant power, and the presented power values, N el_n(av) , Q (Q1)(av) , and E ch(av) , were determined as the average values of 30 measurement points during the five hours of operation, in accordance with the general relationship expressed by the Equation (1). Each of the measurement points is an average value for a 10-min period, which resulted from the use of measurement devices to measure the flow of the media (as described in Section 2).
where, X: For each operating state, the efficiency of electricity generation η el_av , heat generation η q_av and the overall efficiency η el+q_av were also determined in accordance with the following relationships: Two operating states of the Stirling engine can be distinguished: partial load (SP1) and maximum load (SP2). In the case of operation of a cogeneration unit with thermal power above the production capacity of the Stirling engine, two further operating modes can be generally distinguished: SP3-operation with a power of approximately 10.5 kW th (Stirling engine + peak burner with a basic load) and SP4-work with heat power above 10.5 kW th , when the power is smoothly modulated due to the peak burner. The periods of stable operation in these modes are presented on the basis of time periods. The operation of the micro-cogeneration unit in the SP4 state, i.e., with smoothly modulated thermal power, can be described in detail in two points: for a thermal power of 13.7 kW th (SP4.1) and 16.68 kW th (SP4.2). A summary of the parameters of all operating modes is presented in Table 1. An example of the characteristics for one operating state (SP2) is shown in Figure 9. For the other modes, they were determined analogously to the presented variant. power of 13.7 kWth (SP4.1) and 16.68 kWth (SP4.2). A summary of the parameters of all operating modes is presented in Table 1. An example of the characteristics for one operating state (SP2) is shown in Figure 9. For the other modes, they were determined analogously to the presented variant. The SP1 mode is the mode of operation with the lowest possible heat output; however, due to it mainly starting at low operating temperatures of the system, it is characterized by high efficiency. The average water flow rate in the first circuit during the five hours of operation is Vav = 0.197 dm 3 /s (709.4 dm 3 /h). The device operates with a small difference in supply/return temperatures (average ∆Tav = 5.6 K).
The SP2 mode is the Stirling engine operated at maximum power. This is the mode of operation with the highest obtained net electrical power Nel_n = 0.938 kWel. The average water flow rate is Vav = 0.128 dm 3 /s (459.5 dm 3 /h), and the device works with an average supply/return temperature difference of ∆Tav = 11.2 K.
The SP3 mode is activated at higher system operating temperatures than the SP1 and SP2 modes. The system was operated at an average water flow rate in the first circuit Vav = 0.200 dm 3 /s (721.7 dm 3 /h), for a difference in the supply/return temperatures of ∆Tav = 13.0 K.
For two points describing work with a thermal power above 10.5 kWth (SP4), the following was determined: at state SP4.1, the average water flow rate during five hours of operation was Vav = 0.202 dm 3 /s (728 dm 3 /h), for a difference in the supply/return temperature of ∆Tav = 16.6 K on average. At point SP4.2, the average water flow rate was Vav = 0.201 dm 3 /s (725.3 dm 3 /h), for a difference in the supply/return temperature of ∆Tav = 20.3 K.  The relationship between the reduction in the net electricity production, together with the increase in the heat load of the cogeneration unit, demonstrated in selected operating states, can also be seen in longer measurements. This results from the reduced power of the Stirling engine caused by the higher temperature of the return water and from the increased energy consumption for its own needs-in this case, for the work of the circulation pump in the first circuit (μCHP-storage tank) and for the operation of the fan supplying air to the combustion chamber. On the basis of the presented work points, one can also see how the flow control system works, which reduced the flow to about 64% (approximately 460 dm 3 /h) only when working in the SP2 mode. The SP1 mode is the mode of operation with the lowest possible heat output; however, due to it mainly starting at low operating temperatures of the system, it is characterized by high efficiency. The average water flow rate in the first circuit during the five hours of operation is V av = 0.197 dm 3 /s (709.4 dm 3 /h). The device operates with a small difference in supply/return temperatures (average ∆T av = 5.6 K).
The SP2 mode is the Stirling engine operated at maximum power. This is the mode of operation with the highest obtained net electrical power N el_n = 0.938 kW el . The average water flow rate is V av = 0.128 dm 3 /s (459.5 dm 3 /h), and the device works with an average supply/return temperature difference of ∆T av = 11.2 K.
The SP3 mode is activated at higher system operating temperatures than the SP1 and SP2 modes. The system was operated at an average water flow rate in the first circuit V av = 0.200 dm 3 /s (721.7 dm 3 /h), for a difference in the supply/return temperatures of ∆T av = 13.0 K.
For two points describing work with a thermal power above 10.5 kW th (SP4), the following was determined: at state SP4.1, the average water flow rate during five hours of operation was V av = 0.202 dm 3 /s (728 dm 3 /h), for a difference in the supply/return temperature of ∆T av = 16.6 K on average. At point SP4.2, the average water flow rate was V av = 0.201 dm 3 /s (725.3 dm 3 /h), for a difference in the supply/return temperature of ∆T av = 20.3 K.
The relationship between the reduction in the net electricity production, together with the increase in the heat load of the cogeneration unit, demonstrated in selected operating states, can also be seen in longer measurements. This results from the reduced power of the Stirling engine caused by the higher temperature of the return water and from the increased energy consumption for its own needs-in this case, for the work of the circulation pump in the first circuit (µCHP-storage tank) and for the operation of the fan supplying air to the combustion chamber. On the basis of the presented work points, one can also see how the flow control system works, which reduced the flow to about 64% (approximately 460 dm 3 /h) only when working in the SP2 mode.
The results of the conducted experimental analyses of the system with a Stirling engine were confirmed by the literature, which is described in more detail [25,53].
Based on the series of measurements, the system performance characteristics as a function of the return water temperature (cold, T RQ1 ) were determined and described by the Equation (5). Only the points where the system was enabled were taken into account. The efficiency of the micro-cogeneration device at a point is defined by the following equation: The slope of the approximation function clearly indicates an increased efficiency when the system is operating at a lower temperature range. This is a consequence of the system working as a condensing unit; the lower temperature T RQ1 allows for the recovery of more heat from the exhaust gases, but also provides better cooling for the Stirling engine working in the system, improving its efficiency.

Modeling Principles and Assumptions
The energy systems and their parts were investigated through experiments or mathematical modeling. The essence of the mathematical modeling process is mapping the behavior of the real object, although the calculation process often requires a number of simplifications, which can lead to the wrong conclusions. In many cases, running an experiment is impossible for technological reasons or because of the required costs of the laboratory apparatus. Both approaches towards the analysis of the physical phenomena and the operation of utility devices should complement each other as closely as possible. This is represented by the validation of mathematical models based on the results of experiments.
Knowledge of the phenomenological description of the modeled phenomenon allows for forward modeling. Assuming the parameters and structure of the model, which can be very complex, the response for specific input values may be received. However, when it is possible to take measurements from an actual device, one of the possibilities of the mathematical description of its behavior is the use of data-driven modeling. What is more, models of power systems are usually analyzed at the nominal working points of the system, and the use of measurement data makes it possible to include various operating states in the model description; this modeling method was used in this paper. It should be pointed out that data-driven modeling might provide some limitations as the model is influenced by particular dataset; the results are valid for specific case study within the experimental-stand conditions. First, the modeling method is described, and then a comparison of the measurement results and the modeling is presented.
It is necessary to properly assess the efficiency and the operating method of the micro-cogeneration system for various customers. For this purpose, the µCHP unit model was built, which enables the implementation of customer characteristics (as heat and electricity demand profiles).

General Description of the Model
The µCHP system was modelled in Simulink, which is an integral part of the Matlab computing environment. The main premise of the prepared solution is to present the way the real device operates during a longer working period. The use of the information gathered during long-term measurements of the real micro-cogeneration system allowed for time-domain calculations to be performed. This is necessary, because the presentation of the nature of the device's operation has a significant impact on the accuracy of the subsequent economic analyses. The modeling of the discussed µCHP system must take into account the fact that, for example, there is a heat buffer included, which not only plays an accumulative role, but also an inertial role. The model is modular, and the exchange of information between the individual modules is continuous. The concept of the model and the data exchange scheme are shown in Figure 10. According to the diagram, the model consists of six modules: • M0-a set of input information that is necessary to start the calculations, i.e., heat demand, electricity and ambient temperature demand profiles (consumer characteristics), • M1-µCHP management system, the effect of which is to choose the operating mode, • M2-a set of data and relationships that directly result from the measurements of the device. It describes the operation of the µCHP system for the given conditions, • M3-electricity balances are carried out here. Depending on the configuration of the model, this module may only contain the prosumer's own consumption and connection to the power grid or other variants of the system's operation, • M4-responsible for the thermal part of the installation. The module calculates the heat accumulator, the heat generation of the µCHP system and the heat used by the consumer, • M5-this module archives the behavior of the micro-cogeneration system for the entire time that it is modeled and information from part M3, e.g., the amount of energy used from its own production and the amount of electricity purchased or sold to the grid, which allows for a comprehensive assessment of the prosumer's efficiency.
The calculations are made in the time domain, therefore the input information to the model must also be presented as a function of time f (τ). This allows for the calculation results to be compared with the results of the laboratory measurements. In the model, the timestep was constant and is equal to τ step = 1 s.

Operating Modes
In the model of the micro-cogeneration device that was developed, the measurement characteristics presented in Section 3 were used as the main elements describing the operation of the system.
Four main operating modes (OM) termed OM0-OM3 were considered. The OM0 mode is a standby state. In this mode, the system does not generate energy and only uses electricity from the grid for its own needs, i.e., maintaining the power supply of the control system (60 W was adopted). In the OM1 mode, the Stirling engine works at partial load, i.e., it corresponds to the SP1 operating state. In a situation where the value of the water delivery temperature is only slightly lower than the set value, it is possible to work with a lower load (in this case both thermal and electrical) to extend the operating time of the engine itself and produce more electricity.

Operating Modes
In the model of the micro-cogeneration device that was developed, the measurement characteristics presented in Section 3 were used as the main elements describing the operation of the system.
Four main operating modes (OM) termed OM0-OM3 were considered. The OM0 mode is a standby state. In this mode, the system does not generate energy and only uses electricity from the grid for its own needs, i.e., maintaining the power supply of the control system (60 W was adopted). In the OM1 mode, the Stirling engine works at partial load, i.e., it corresponds to the SP1 operating state. In a situation where the value of the water delivery temperature is only slightly lower than the set value, it is possible to work with a lower load (in this case both thermal and electrical) to extend the operating time of the engine itself and produce more electricity.
The OM2 mode is the basic mode where the Stirling engine operates at full load (operating state SP2) and the μCHP system reaches its maximum electrical power. The OM3 mode allows the system The OM2 mode is the basic mode where the Stirling engine operates at full load (operating state SP2) and the µCHP system reaches its maximum electrical power. The OM3 mode allows the system to cover the increased heat demand. In addition to the full-load engine, the peak burner (auxiliary boiler) is also started. In this mode, two categories of working conditions were considered. When the Stirling engine cooperates with the peak burner, and the demand does not exceed approximately 10.8 kW, the OM3 mode corresponds to the SP3 operation condition, i.e., the peak burner works with the basic load. When the heat demand increases, the device adapts flexibly to it (as during the K3 measurement series, described in Section 3) which needs to be taken into account in the calculation of the µCHP unit.
A series of measurements were made over a wide range of thermal loads without the Stirling engine running, which allowed for the determination of the peak boiler operational characteristics, which are shown in Figure 11. This was implemented into the OM3 mode in order to cooperate with the engine for higher thermal loads. The role of the heat buffer in this situation is clearly visible, because in the thermal load range from 0 to 10.8 kW th , the system operates in step adjustment and the heat buffer makes it possible to function smoothly with the Stirling engine (and peak boiler) generally operating in an on-off state.
exceeds the production capacity of the Stirling engine itself, which is the primary source. The additional demand is determined from the formula: where: QDEM-instantaneous heat demand, kW, QSE_MAX-maximum thermal power of the Stirling engine, kW. The condition of a maximum thermal power of 26 kWth for the micro-cogeneration device was adopted. Individual operating modes are characterized by the electrical power and thermal power as well as the water flow rate (according to Section 3). The total efficiency of the device (ηel+th) in a given mode, and thus the use of natural gas chemical energy, is defined as a function of the return water temperature in the first circuit (TRQ1), according to Section 3. Table 2 presents a set of functions describing the individual modes of operation.
The net electricity production in the OM3 mode, in which the electrical power is variable, is described by the function shown in Figure 12. The way the system works in cooperation with the peak source is described in Section 3, and the measurements carried out at three operating points The operation of the auxiliary boiler in the OM3 mode, which generates Q AUX heating power in cooperation with the Stirling engine, is reflected by the characteristics shown in Figure 11. The thermal power generated (Q AUX ) is a function of an "additional" heat demand-Q DEM_AUX , i.e., one that exceeds the production capacity of the Stirling engine itself, which is the primary source. The additional demand is determined from the formula: where: Q DEM -instantaneous heat demand, kW, Q SE_MAX -maximum thermal power of the Stirling engine, kW.
The condition of a maximum thermal power of 26 kW th for the micro-cogeneration device was adopted.
Individual operating modes are characterized by the electrical power and thermal power as well as the water flow rate (according to Section 3). The total efficiency of the device (η el+th ) in a given mode, and thus the use of natural gas chemical energy, is defined as a function of the return water temperature in the first circuit (T RQ1 ), according to Section 3. Table 2 presents a set of functions describing the individual modes of operation. The net electricity production in the OM3 mode, in which the electrical power is variable, is described by the function shown in Figure 12. The way the system works in cooperation with the peak source is described in Section 3, and the measurements carried out at three operating points (SP3, SP4.1, SP4.2) allowed for the relationship between the net electrical power and the thermal power of the system to be prepared. (SP3, SP4.1, SP4.2) allowed for the relationship between the net electrical power and the thermal power of the system to be prepared.

Management of the μCHP Operation
The micro-cogeneration unit considered was controlled by a PID controller. Based on the temperature signals and set temperatures, it was possible to select the desired power of the device. The management module in the model should not be considered in the category of a control system, because it was not possible to correctly identify the exact way of regulating the μCHP device. The M1 module consists of a set of conditional instructions developed on the basis of long-term observations of the actual system. A comparison of the model's work with the measurements (described in detail in Section 5) indicates that it satisfactorily manages the operation of the installation model. The presented method of regulating the system allows it to operate in the heat tracking strategy. The generated electricity is, in this case, an additional product. Figure 13 presents the conditional instructions (thresholds) enabling a given operating mode. The system will activate the mode indicated by a specific condition and will keep it until another condition is met. The calculations always started with the micro-cogeneration device turned off. Two signals were used to control the model's operation. The calculations provided the possibility of using more information than in the case of the control of the real device. The first signal (u1) is the difference between the value of the desired water supply temperature (which results from the heating curve) and the one that was actually measured. This is an equivalent signal with a control error (e) that would actually be introduced in the PID controller. The second control signal (u2) is the difference between the current heat demand (in kilowatts) and the maximum thermal power of the Stirling engine. This signal indirectly provides the management module with information about the dynamics of the temperature changes. This is additional information for the model control module, which the real controller would be able to identify from the differentiating part. Based on this information, the operating conditions in the individual modes of the device were determined ( Figure  13).

Management of the µCHP Operation
The micro-cogeneration unit considered was controlled by a PID controller. Based on the temperature signals and set temperatures, it was possible to select the desired power of the device. The management module in the model should not be considered in the category of a control system, because it was not possible to correctly identify the exact way of regulating the µCHP device. The M1 module consists of a set of conditional instructions developed on the basis of long-term observations of the actual system. A comparison of the model's work with the measurements (described in detail in Section 5) indicates that it satisfactorily manages the operation of the installation model. The presented method of regulating the system allows it to operate in the heat tracking strategy. The generated electricity is, in this case, an additional product. Figure 13 presents the conditional instructions (thresholds) enabling a given operating mode. The system will activate the mode indicated by a specific condition and will keep it until another condition is met. The calculations always started with the micro-cogeneration device turned off. Two signals were used to control the model's operation. The calculations provided the possibility of using more information than in the case of the control of the real device. The first signal (u 1 ) is the difference between the value of the desired water supply temperature (which results from the heating curve) and the one that was actually measured. This is an equivalent signal with a control error (e) that would actually be introduced in the PID controller. The second control signal (u 2 ) is the difference between the current heat demand (in kilowatts) and the maximum thermal power of the Stirling engine. This signal indirectly provides the management module with information about the dynamics of the temperature changes. This is additional information for the model control module, which the real controller would be able to identify from the differentiating part. Based on this information, the operating conditions in the individual modes of the device were determined (Figure 13). Where: u1-signal 1, u2-signal 2, OMi-selected operation mode of the μCHP, ∈ 0,1,2,3 , TD_ZAD-desired water delivery temperature (which is a result of the heating curve and depends on the ambient temperature), TDQ1-current water delivery temperature, QDEM-instantaneous heat demand, QSE_MAX-maximum thermal power of the Stirling engine. Where: u 1 -signal 1, u 2 -signal 2, OM i -selected operation mode of the µCHP, i ∈ {0, 1, 2, 3}, T D_ZAD -desired water delivery temperature (which is a result of the heating curve and depends on the ambient temperature), T DQ1 -current water delivery temperature, Q DEM -instantaneous heat demand, Q SE_MAX -maximum thermal power of the Stirling engine.

Thermal Part Calculations
The M4 module is responsible for the calculations related to heat generation and dissipation, as well as storage behavior, which is an important element of the system. Thermal energy storage (TES) is a technology that allows for peak loads to be covered and compensated for the fluctuations in heat demand. Heat is stored during periods of overproduction for later use. There are three methods of heat storage: in the form of sensible heat; in the form of latent heat (phase change enthalpy); in the form of thermochemical energy.
A thorough analysis of the heat transfer phenomena in the tank is not a subject of this paper, nevertheless, it is crucial to take it into account in the calculations in order to reflect the nature of the system's operation. Therefore, elements of the CARNOT library [54] were used to simulate the thermal part of the model. The use of external tools for modeling installation elements or the use of simplified methods is a popular method in the calculation and analysis of cogeneration systems [5,39,47,49].
Calculations of the water heat accumulator were carried out in a one-dimensional model, according to the concept of the division of volumes into nodes, and in each of them heat and mass flow were considered (StorageTank_3 model), described in detail in [54]. This method has been widely adopted in the literature [55][56][57][58]. The parameters that can be set in the tank model (total volume, distribution of the connectors) correspond to the heat buffer, which is part of the laboratory installation (described in Section 2). Heat generation and heat dissipation with the thermal power resulting from the M2 module (µCHP system) and the heat demand profile (M0 module), respectively, were implemented in the heat exchangers [54]. The general scheme of the calculations performed using CARNOT submodels is presented in Figure 14. Where: u1-signal 1, u2-signal 2, OMi-selected operation mode of the μCHP, ∈ 0,1,2,3 , TD_ZAD-desired water delivery temperature (which is a result of the heating curve and depends on the ambient temperature), TDQ1-current water delivery temperature, QDEM-instantaneous heat demand, QSE_MAX-maximum thermal power of the Stirling engine.

Thermal Part Calculations
The M4 module is responsible for the calculations related to heat generation and dissipation, as well as storage behavior, which is an important element of the system. Thermal energy storage (TES) is a technology that allows for peak loads to be covered and compensated for the fluctuations in heat demand. Heat is stored during periods of overproduction for later use. There are three methods of heat storage: in the form of sensible heat; in the form of latent heat (phase change enthalpy); in the form of thermochemical energy.
A thorough analysis of the heat transfer phenomena in the tank is not a subject of this paper, nevertheless, it is crucial to take it into account in the calculations in order to reflect the nature of the system's operation. Therefore, elements of the CARNOT library [54] were used to simulate the thermal part of the model. The use of external tools for modeling installation elements or the use of simplified methods is a popular method in the calculation and analysis of cogeneration systems [5,39,47,49].
Calculations of the water heat accumulator were carried out in a one-dimensional model, according to the concept of the division of volumes into nodes, and in each of them heat and mass flow were considered (StorageTank_3 model), described in detail in [54]. This method has been widely adopted in the literature [55][56][57][58]. The parameters that can be set in the tank model (total volume, distribution of the connectors) correspond to the heat buffer, which is part of the laboratory installation (described in Section 2). Heat generation and heat dissipation with the thermal power resulting from the M2 module (μCHP system) and the heat demand profile (M0 module), respectively, were implemented in the heat exchangers [54]. The general scheme of the calculations performed using CARNOT submodels is presented in Figure 14.

Electrical Part Calculations
Calculations which relate to electricity were solved in the module M3. Appropriate energy balances were made here, depending on the current configuration of the system. In the basic variant, presented in Figure 15, the module contains the prosumer's own consumption and connection to the power grid.

Electrical Part Calculations
Calculations which relate to electricity were solved in the module M3. Appropriate energy balances were made here, depending on the current configuration of the system. In the basic variant, presented in Figure 15, the module contains the prosumer's own consumption and connection to the power grid.  Figure 15 shows the basic solution, typically used as the μCHP system, for an on-grid application. The electrical power of the μCHP unit (NμCHP) is the net power, i.e., it takes the system's own needs into account. The prosumer's own electricity production is used as a priority. When the demand profile (Nd) does not coincide with the current production capacity, the deficits are compensated for by the grid (Npg) or the excess energy produced is fed to the grid (Nsg). The  Figure 15 shows the basic solution, typically used as the µCHP system, for an on-grid application. The electrical power of the µCHP unit (N µCHP ) is the net power, i.e., it takes the system's own needs into account. The prosumer's own electricity production is used as a priority. When the demand profile (N d ) does not coincide with the current production capacity, the deficits are compensated for by the grid (N pg ) or the excess energy produced is fed to the grid (N sg ). The calculation algorithm is shown in Figure 16. In addition to the balance of the sold/purchased power, the DSC kW parameter (in kilowatts) is monitored when performing a given procedure, i.e., covering the electrical demand.  Figure 15 shows the basic solution, typically used as the μCHP system, for an on-grid application. The electrical power of the μCHP unit (NμCHP) is the net power, i.e., it takes the system's own needs into account. The prosumer's own electricity production is used as a priority. When the demand profile (Nd) does not coincide with the current production capacity, the deficits are compensated for by the grid (Npg) or the excess energy produced is fed to the grid (Nsg). The calculation algorithm is shown in Figure 16. In addition to the balance of the sold/purchased power, the DSCkW parameter (in kilowatts) is monitored when performing a given procedure, i.e., covering the electrical demand.

Validation of the Model Using Experimental Data
The developed model of the micro-cogeneration system was intended to reflect the operation of the real device. The main application of the model is the possibility of the assessment a prosumer's system in the heating season or the whole year, which is a valuable representation of the efficiency

Validation of the Model Using Experimental Data
The developed model of the micro-cogeneration system was intended to reflect the operation of the real device. The main application of the model is the possibility of the assessment a prosumer's system in the heating season or the whole year, which is a valuable representation of the efficiency of the selected technology. This section compares the effects of the modeling with the results of long-term measurements from the laboratory apparatus.

Evaluation Methods
Due to the use of a model that combines elements of data-driven modeling (µCHP unit, management system based on observations) and elements of analytical calculations using models from the available thermodynamic libraries (thermal part), it was assumed that full compliance was not expected with the measurement of the model at the moment τ 0 . The goal is the smallest possible deviation in the amount of energy generated (used) in the long-term evaluation. A specific characteristic of heating installations is high inertia (large time constants), so any changes occur relatively slowly.
A simplified scheme of the laboratory installation, where the variables that were validated with the model have been marked, is presented in Figure 17.
not expected with the measurement of the model at the moment τ0. The goal is the smallest possible deviation in the amount of energy generated (used) in the long-term evaluation. A specific characteristic of heating installations is high inertia (large time constants), so any changes occur relatively slowly.
A simplified scheme of the laboratory installation, where the variables that were validated with the model have been marked, is presented in Figure 17. Where: T6, T7, T8-temperature sensors in the buffer, TDQ1-water delivery temperature, TRQ1water return temperature, TDQ2-temperature of the water delivered to the fan heaters, TRQ2temperature of the water returning from the fan heaters, Q(Q1)-thermal power of the μCHP-heat generation, Q(Q2)-thermal power of the fan heaters-heat demand.
During the validation, as a set of input information to the model, the heat demand profile and the ambient temperature profile, which were obtained during the measurements, were introduced. The record of the operation of the real μCHP system was then compared to the operation of the model. During validation, the relative error δ of the following parameters was calculated: the amount of heat generated Eth (δth), the amount of electricity generated Eel (δel), the amount of natural gas Egas (δgas) used, the operating time of the Stirling engine τSE (δSE). It is necessary to distinguish between the values of the electricity generated and the operating time of the engine due to the two possible modes of its operation (of different powers). The checked parameters are described by Equations (8)- (10). The relative error is defined by Equation (11).
where: x-modeled variable, x0-measured variable. Where: T 6 , T 7 , T 8 -temperature sensors in the buffer, T DQ1 -water delivery temperature, T RQ1 -water return temperature, T DQ2 -temperature of the water delivered to the fan heaters, T RQ2 -temperature of the water returning from the fan heaters, Q (Q1) -thermal power of the µCHP-heat generation, Q (Q2) -thermal power of the fan heaters-heat demand.
During the validation, as a set of input information to the model, the heat demand profile and the ambient temperature profile, which were obtained during the measurements, were introduced. The record of the operation of the real µCHP system was then compared to the operation of the model. During validation, the relative error δ of the following parameters was calculated: the amount of heat generated E th (δ th ), the amount of electricity generated E el (δ el ), the amount of natural gas E gas (δ gas ) used, the operating time of the Stirling engine τ SE (δ SE ). It is necessary to distinguish between the values of the electricity generated and the operating time of the engine due to the two possible modes of its operation (of different powers). The checked parameters are described by Equations (8)- (10). The relative error is defined by Equation (11).
where: x-modeled variable, x 0 -measured variable. The verification calculations did not include the M3 module with the electricity balance, because all the energy (net) generated from the real installation was fed into the grid.
The checking of the compliance of the model with the operation of the actual installation was carried out for a variety of cases, which differed in heat demand profile and water temperature operating range.

Results of Validation
Four representative cases (SPR1-SPR4) were considered, and in each case, the system's operating time was equal to τ val = 24 h, which was monitored and modeled. Due to the short form of this publication, the results of the calculations for cases SPR1 and SPR2 are presented graphically. The results of the validation calculations in the form of the analyzed parameters values and error percentage are presented in Tables 3 and 4, respectively. Figures 18-21 present the temperature waveforms at the characteristic points (marked in Figure 17) and the thermal powers (generation and demand) were recorded during the measurements and modeled. The SPR1 variant is characterized by a heat demand profile in the range of 0-8 kW th and a T DQ1 water delivery temperature in the range of 50-60 • C (this depends on the ambient temperature). In the case of the SPR2 variant, the heat demand is up to 10 kW th , for a water delivery temperature of approximately 60 • C. The analyzed SPR3 case is characterized by an almost constant heat demand profile at the level of about 6 kW th at a water supply temperature of 45 • C, which allowed the mostly "Stirling engine-only" (without the auxiliary boiler) operation modes to be analyzed. The final option considered, SPR4, allowed the model's behavior to be observed when the heat demand is increased, even up to 16 kW th and a T DQ1 temperature above 70 • C.     T6  T7  T8  TDQ1  TRQ1 TDQ2 TRQ2   T6  T7  T8  TDQ1  TRQ1 TDQ2 TRQ2   T6  T7  T8  TDQ1  TRQ1 TDQ2 TRQ2  The analysis of the presented data indicates that the operation of the proposed model satisfactorily reflects the operation of the micro-cogeneration system. The modeled µCHP device maintained the desired water delivery temperature using the operating modes characterizing the real unit. The calculations that were performed using the prepared model were evaluated in the form of a comparison (between the model and the experiment) of the amount of energy produced (or used) and the determination of the relative error. Table 3 contains the results of the validation for daily runs, and Table 4 presents the relative error percentage for the individual types of energy and the operating time of the Stirling engine. The "mod" index refers to the values obtained from the modeling, while the "exp" index refers to the measured values. The designations in the tables were used in accordance with the Equations (9)- (11).
In the case of heat generation, the model worked best for the SPR2 variant-the relative error value δ th of which was 0.31%. This calculation variant had an error equal to δ el = 2.50% related to electricity generation. The smallest relative error (δ gas = 0.26%) in determining the use of the chemical energy of natural gas was achieved in the SPR3 variant, which at the same time was the least favorable in terms of assessing the Stirling engine's operating time (δ SE = 8.58%). The operating time of the Stirling engine was modeled with good accuracy in the SPR2 calculations (δ SE = 0.14%) and in the SPR1 calculations (δ SE = 1.32%), which were characterized by the largest error in heat generation (δ th = 4.50%). The range of discrepancies is influenced by the use of simplified characteristics, which was obtained from the system measurements (e.g., application of linear functions), analytical elements (a one-dimensional model of the heat storage from the CARNOT thermodynamic libraries) and their impact on the operating temperature range, on which the current efficiency of the micro-cogeneration unit directly depends. Nevertheless, the presented level of discrepancy should not have a significant impact on the assessment of the system's effectiveness over a year or heating season.
The calculations of the micro-cogeneration unit operation were also carried out for a longer period (τ val = 10 days) using the K2 measurement series (described in detail in Section 3) for additional verification (SPRK2 variant). The results of the calculations and the relative error percentage are also presented in Tables 3 and 4. The analysis of the results clearly indicates that the increase in the modeled Energies 2020, 13, 2759 22 of 26 operating time of the µCHP device did not cause the increase in the relative error in relation to the measurements of the actual installation. The proposed computational model can be used for system analysis and assessment of the efficiency of the micro-cogeneration system.

Conclusions
The main purpose of the work presented in the paper was to experimentally determine the operational characteristics and efficiency of a micro-cogeneration system based on a free piston Stirling engine, as well as to accurately map its characteristics in the form of a computational model.
The following research tasks were carried out: • a laboratory setup was developed that could take measurements of the micro-cogeneration unit during long-term operation with a variable thermal load. The achievements also include the implementation of operating schedules enabling comprehensive measurements to be carried out over the full power range of the device and revealing all the operating modes of the µCHP module. The control and measurement system enabled the simulation of variable ambient conditions and forced operation with the use of all the operational modes without interfering with the µCHP's internal control system. The measurements were carried out, which enabled the operational characteristics and thermodynamic efficiency of the micro-cogeneration unit to be determined, • a model of the analyzed micro-cogeneration system was built in the Matlab and Simulink environment. The simulation model was based on the device's characteristics that were obtained from the measurements. It enabled time-domain calculations (simulations) that took into account the different operating modes of the device. It allows for the operation of the µCHP unit to be simulated for various types of consumers because of the possibility of implementing the given profile of electricity and heat demand. The developed model, due to its modular structure, is a tool that can be used for the analysis of distributed energy systems. It enables the implementation of various devices and control methods and has provided a good basis for modeling other energy systems. The calculations that were made with the use of the model were compared with the measurement results, which revealed good compliance when assessing 24-h operation of the µCHP unit or longer.
The completed research tasks can be summarized as follows: • four basic operating modes of the micro-cogeneration system were determined. The net electrical power of the Stirling engine operating within the system varied in the range of 0.65-0.94 kW.
The system was tested in the thermal power range of 4.6-16.7 kW. A maximum efficiency of electricity generation of η el_av = 13.2% was achieved for the SP2 mode with full engine load (without the peak burner). A highest overall efficiency of η el+q_av = 95.7% was achieved for the SP1 mode with partial engine load (without the peak burner), which resulted from the unit operating at the lowest water temperatures and recovering more heat from the exhaust gases, • the results showed that the developed model sufficiently reflected the actual operation of the device. The relative errors of the heat and electricity generation, as well as the natural gas use and the operating time of the engine for longer operating periods of the µCHP unit, were analyzed. For a modeled period of τ val = 24 h, the error in the heat generation fluctuated in the range of δ th = 0.31-4.50%, the error in the electricity generation was δ el = 2.48-4.70%, the error in the natural gas consumption was δ gas = 0.26-4.59%, and the engine's runtime error was δ SE = 0.14-8.58%. • the modelling process is applicable to other energy systems.
The next step towards recognition of the full potential of the micro-cogeneration units is a comprehensive system analysis, utilizing the proposed model. For instance, gas-fueled micro-cogenerators, as a stable prime mover, could be integrated with an electrical energy storage or renewable energy systems (e.g., photovoltaic system) to increase the prosumer's self-sufficiency and the reliability of the distributed generation technologies. These are worthwhile topics for further exploration. Funding: The publication was supported by the SUT Rector's grant. Silesian University of Technology, project no. 08/050/RGJ20/0208. WU gratefully acknowledge the support of the National Science Centre (Poland, Kraków) through the Etiuda scholarship (project no. 2018/28/T/ST8/00160).