Automated Optimization of Solar-Thermal Systems Using Software in a Loop

Making solar thermal systems less expensive, often results in a lower system efficiency. However, the cost-benefit ratio is relevant from the perspective of the consumer. The complex impact of component-related and system-related design parameters on the economics of a complete system makes the evaluation and economical optimization difficult. Therefore, a complete simulation environment has been developed, which can automatically optimize solar-thermal systems, including collector and system parameters. The main collector module consists of a one-dimensional thermal model that was validated with a commercial solar collector. The efficiency curve and the production cost were calculated as a function of several design and construction parameters. The collector module was linked to the commercial software Polysun ® , so that parametric studies can be performed with minimal effort. Optimization problems can be solved by using the Matlab ® optimization toolbox. The simulation environment was used for sensitivity studies and optimization problems in order to analyze the impact of collector design-parameters with respect to system cost, system yield and economic values. We will demonstrate how a collector can be optimized and how the ideal system parameters like collector number and storage volume can be easily calculated. Finally, we will show how the optimizer is used for a given system in order to find ideal values for the absorber-sheet thickness and the number of pipes. Due to the holistic approach, the application of this tool set can be used for collector development as well as for system planning.


Introduction
Cost reduction of solar-thermal systems remains a big challenge in the process of making solar heat more economically attractive. Therefore, a complete simulation environment for the automated optimization of the yield efficiency and economic value of solar-thermal systems for domestic hot water and heating was developed.
The application of this simulation tool is relevant for component developers, manufacturers and system planners. During development, it is desirable for the development engineer to collect realistic data on thermal loads, in order to design a robust and temperature resistant collector by using suitable and inexpensive materials. From the manufacturer's viewpoint, the components should be produced at the lowest possible cost without negative effect on the overall performance, which will also be to the end-user's benefit. Finally, the system planners need tools that assist in determining the relevant plant parameters (collector type, field size, storage tank, mass flow) for a cost-optimized system. The challenge is to find the best cost-benefit ratio for standard and especially for non-standard applications.
The fundamentals of solar-thermal collectors and system modelling are extensively described by Duffie and Beckman [1]. There are many other publications that deal with solar-thermal modelling in one, two or three dimensions, with different emphases. Eisenmann et al. [2] and Badescu [3] studied the design of absorbers in order to optimize the ratio of efficiency and material costs. In a recent publication by Eismann [4] the thermo-hydraulic dimensioning of solar systems is described with the focus on cost optimization.
In this paper, a simulation environment will be introduced that consists of various sub modules for collector design as well as for system simulation. These modules are coupled by specific interfaces, allowing for a fully automated variation and optimization of component and system parameters.

Methodology
The main module of the simulation environment is comprised of a collector tool based on MATLAB ® that is coupled with a numeric optimizer as well as with a system simulation tool (in this case Polysun ® Inside) [5,6].

Collector Model
The main purpose of the collector tool is the calculation of the performance parameters and the expected product cost of the collector. The efficiency curve of a collector requires the calculation of the coefficients , , along with the solar radiation and the difference Δ of the average fluid temperature and ambient temperature, as shown in equation 1.
The principle behind the model is the calculation of the efficiencies for different state points by varying the solar fluid and the ambient temperature. The coefficients are then determined by a least square method.
For the calculation of the collector's efficiency, the numeric model uses a one dimensional thermal network approach. The main collector components like absorber sheet, cover, casing, pipes, insulation, fluid etc. are represented by thermal nodes. Each node consists of a thermal capacity and thermal links to other nodes for conduction, convection and radiation.
Therefore, it is possible to compute the heat power balances for each node. These balances for a node with the heat capacity ⋅ , are shown in the differential equation 2.
The heat flow area 0 , ) and the heat resistance 1 , ) are determined for each thermal link. However, some heat resistances are functions of the nodes temperature and have to be calculated for every time step. Solving this system of equations iteratively leads to the calculation of a certain state point's efficiency.
In the current model, ten thermal nodes are included, representing the main collector components, as shown in figure  1. Generally, it is difficult to account for two or three-dimensional effects with this type of model. Nevertheless, we included some edge effects of a typical absorber design. Eismann and Presser discussed the influence of edge effects on absorber performance extensively [7]. An ideal absorber consists of a symmetric pattern of bonded pipes and absorber segments. Often times, however, it is not possible to achieve this ideal absorber design. Incomplete bonding of the absorber pipes may be due to various practical reasons like manufacturing costs. Therefore, the left, right, upper and lower boundaries that deviate from the regular absorber pattern are treated separately by defining a separate thermal node (No. 9: Absorber sheet extent). The properties of this node were adjusted relative to their proportions on the complete absorber.
Special attention was given to the treatment of the heat loss between absorber and glass cover, because it has a significant influence on the efficiency curve. The heat transfer between absorber and glass cover is predominantly caused by natural convection, driven by temperature differences. The well-established correlation by Hollands [8,9] is applicable to isothermal boundaries. However, it was found by Eismann [10] that the Hollands equation underestimates the heat losses as compared to a real collector. Thus, the heat transfer between absorber and glass cover was analysed separately by applying three-dimensional computational fluid dynamics for a typical solar-thermal collector. It was found that the heat transfer coefficient could be sufficiently modelled by a fourth order polynomial equation. The model was validated with the efficiency curve of a certified collector that consists of a parallel-flow type absorber, an aluminum absorber sheet with a typical physical vapor deposited (PVD) spectrally selective coating, copper pipes and an aluminium-alloy casing. All geometrical and material parameters were taken from material and design specifications. The solutions for the two different heat-loss-equations, the Hollands-equation and the polynomial equation, are compared to the original efficiency curve in figure 2. It can be clearly seen that the heat transfer of the Hollands equation underestimates the convective heat loss across the air gap, leading to a slower decline of the efficiency curve.
For the product cost, several functions were included to account for material and production costs of pipes, coated absorber sheets, glass cover, insulation and casing. Furthermore, production and assembly costs were roughly estimated. While several material costs simply depend linearly on component mass, it is more difficult to define cost functions for physical properties like conductivity, emissivity etc. In order to account for this, parameter sets for each material type (e.g. copper, aluminium, glasses, etc.) were defined, that can be accessed by the central control software.
With the developed tool, collector efficiency curves and costs can be calculated within seconds as a function of a large number of design parameters.

Simulation of Solar-Thermal Systems
The cost efficiency of a solar-thermal system is influenced by the cost and performance of several components like collector, storage tank and heat exchanger, but also by the climate and end-user's heat consumption. The software Polysun ® , a well-established planning tool, was selected for the simulation. A main subject was the development of a suitable interface between Matlab ® and Polysun ® , so that the collector parameters can be transferred to Polysun ® automatically. Thus, any parametric or sensitivity study can be performed, and the results will be passed back to the Matlab ® tool for further evaluation.
The reference object in this paper is a residential building in a moderate climate zone (Wuerzburg, Germany). Domestic hot water for a single family and additional heating of the residential building are considered. The system consists of a buffer storage tank with an external heat exchanger (fresh-water station), as shown in figure 3. For comparative analysis, a reference system with two flat-plate collectors was defined. The heat consumption of the building was determined in order to fulfil the requirements of the German Energy Saving Ordinance EnEV2016 [11]. The hot-water tap profile is defined according to the reference profile of the German engineering standard VDI 6002 [12]. Generally, it is possible to design varying thermal systems and integrate these into the software environment.

Calculation of Heat Production Cost
The calculation of the economic efficiency of the solar-thermal systems is done in accordance with the standard VDI6002 [12]. After each simulation run, the specific heat production cost 3 4 is determined in € per kWh of useful energy. The specific heat production costs during the system's physical life (usually 20 years) are viewed as the main target for optimization, because they represent the economic efficiency of the solar heating system when they are compared to the specific fossil fuel cost; the difference represents the savings. 3 4 should be as low as possible for the end-user.
The calculation of the solar heat production costs accounts for the capital-related, operation-related and demand-related costs. The net-present-value method for dynamic capital budgeting is used and interest rates (5%) and annual increases in fossil-fuel prices (3%) are also considered in this model. For the simulation, exemplary values were chosen to demonstrate the general methodology and qualitative effects. However, the cost-related results highly depend on the

Software Network and Procedure
The transfer of the determined efficiency curve parameters to Polysun ® Inside permits the calculation of the expected yield and the specific solar economic feasibility. The data transfer between the different software tools, Matlab and Polysun, was done by using XML files, that are encoded as ASCII text and, hence, are human readable. The system can be connected to an optimizer, so that the optimal configuration of construction and system parameters can be determined e.g. under the restriction of minimum solar economic feasibility. Up to 140 collector parameters including material and component costs as well as all relevant system parameters such as collector size and active storage capacity, can be set and varied. The complete simulation process is controlled by a MATLAB ® routine. First, standard values and boundary conditions must be provided in a typical simulation including optimization. Afterwards, all values are transmitted to MATLAB ® software control and subjected to a cyclic optimization process: 1) Calculation of collector parameters with the thermal-node model 2) Conversion of relevant data to XML and transfer to Polysun® 3) System simulation with Polysun® 4) Conversion of system simulation data to XML and transfer to the main program 5) The cost module calculates costs with data from the node model as well as from the system simulation 6) The optimizer transmits modified parameters to the central software control 7) These steps can be repeated until the desired criteria are fulfilled. In figure 4, a typical optimization process is illustrated.

Optimizer
Automatic optimization is done by making use of the Matlab Optimization Toolbox™, that provides functions for finding parameters that minimize or maximize objective targets while satisfying constraints. The toolbox includes global search, multistart, pattern search, genetic algorithm, multiobjective genetic algorithm, simulated annealing, and particle swarm solvers that can be used to solve the optimization problems.

Sensitivity Study
In the first step, a sensitivity analysis was carried out in order to study the influence of all available design parameters on the collector performance. Each parameter on the reference collector was changed separately, and the influence on the efficiency curve was determined. In terms of a yield-oriented approach, the efficiency 5 was used for comparison with the reference collector. 5 is the collector efficiency at a temperature difference Δ 40 8, which represents a typical operating condition for a collector in a solar-thermal system. In figure 5, efficiency 5 is plotted against the relative change of the most significant parameters with respect to the reference collector. This shows the collector's potential for performance improvement. Especially the absorber sheet thickness and the number of absorber pipes can significantly improve the performance.
In the next step, the same parameter set was used for an economical analysis by yearly simulation of a full solar-thermal system. The specific solar-heat-generation cost 3 4 was calculated for each simulation run. In figure 6, the cost ratios with respect to the reference collector are plotted against the parameter change. Using this method, the sensitivity on the end-user's benefit is evaluated. Naturally, this picture varies significantly from the purely performance-oriented analysis. The heat cost ratio decreases to a certain level and then increases again for the sheet thickness and number of pipes. This is because the extra costs do not sufficiently pay back.

Parametric Collector Study
For the reference system consisting of a buffer storage system equipped with a fresh water station, a variation study with more than a thousand variations was conducted, and the annual yield was evaluated. The difference in annual yield difference as well as the collector costs were compared with the data from a reference collector in figure 7. From a manufacturer`s point of view, the potential for optimization can be clearly seen: a) a primary increase of collector performance of 9% with a similar cost reduction of 1% (variant A). In this case, the customer`s benefit is taken into special consideration by reducing the payback period due to an increased system yield b) an absolute cost reduction of 4% without reduction of the system yield (variant B) Figure 8 shows a comparison between the resulting efficiency curves. The efficiency of collector A, which was optimized in terms of performance, was improved within the complete temperature interval. In contrast, the efficiency curve of collector B, which was optimized relating to overall costs, crosses the efficiency curve of the reference collector, resulting in a lower efficiency at low temperature differences than the reference collector.

Histograms
By coupling the collector and system simulation, it is possible to display histograms for each thermal node. The histogram shows cumulatively how long a certain temperature affects a component during the year (figure 9).
The temperature histograms serve the developer as the basis for a robust component design, resistant to the expected thermal loads. With this information, materials can be selected and qualified. It is also possible to use this information to define life-time robustness tests.
In the event that the model's level of detail is insufficient, extension by adding more thermal nodes is possible. Also, coupling with other simulation tools for a three dimensional calculation of temperature fields is also conceivable.

Parametric Study on Solar-Thermal System Parameters
The system cost can be optimized by the systematic variation of both the number of collectors and storage volume (figure 10) for the reference collector as well as for both optimized variants. Larger systems will lead to slightly higher production costs, but they will also provide a higher annual yield. Either relative (for a different number or different types of collectors) or absolute extreme values can be determined. The system study was carried out for the reference collector as well as for both optimized collectors A and B. The optimal system with minimal solar heat generation costs corresponds to a solar system with two type A collectors. On the other hand, the cost-optimized collector type leads to slightly higher specific solar cost. This tendency is only recognizable in a complete system simulation.

Automatic Optimization
An example of automatic optimization is shown in figure  11. In this case, the economically optimal sheet thickness is sought. For this purpose, the yield-dependent collector costs have been minimized as a command variable. The graph shows how the optimizer can detect a minimum cost from any initial value. The minimum was already found after five iteration cycles. For orientation, the dashed line in the background represents the actual correlation. Thus, with the help of the simulation, the development engineer receives a distinct answer to the frequently asked question of the optimal parameter size. Finally, a parallel optimization of two parameters was conducted in order to demonstrate the possibilities of the developed software by working in a loop. The absorber-sheet thickness and the number of pipes were selected, because it was obvious that they influence the cost behaviour significantly. If the absorber sheet is very thin, the distance between the pipes should be small in order to compensate for the increased heat resistance and vice versa. The question arises as to how this affects the solar heat generation cost. The optimizer can give a concrete answer. For better understanding and visualisation, the three-dimensional curve is plotted in figure 12. The minimum cost was found by the optimizer independently with much less effort than systematically scanning hundreds of calculations. However, when using heat-generation cost as an optimization target, it should be clear that the choice of the economic data, like the cost functions for the collector, has an influence on the location of the absolute minimum. Nevertheless, these charts help to understand how the fundamental collector design parameters contribute to the overall economic behaviour of a solar-thermal system.

Conclusion
A complete simulation environment was created that allows for the automated optimization of the overall system cost-effectiveness and yield as early as the development phase.
The full potential of the simulation system becomes obvious when including an automatic optimizer that provides design and system parameters for any kind of solar-thermal application, such as industrial process heat or thermosiphon systems. Instead of optimizing the solar cost, the optimization could also target other quantities such as amortization time.
However, this model is purely thermodynamic. Other constructive influences e.g. statics and mechanical robustness were not considered here and require a separate analysis.