On Optimal Sizing of a Solar Thermal Building: A Novel Approach

. Within the last decade, domestic energy management has gained a lot of attention. As the complexity of the solar thermal system in terms of the number of system components and energy sources increases, understanding how to manage the cooperation of all the components in order to improve the global efficiency measurements is of crucial importance. Here, the question is how to define an optimal size of the main components in a solar thermal system in order to minimize system cost. Unlike the existing approaches, we propose the use of a novel algorithm called Gravitational Search Algorithm (GSA) to analyze the accurate sizing of energy components, i.e. collector size, tank volume and Auxiliary Power Unit (APU). The objective is to maximize solar fraction, minimize the energy consumption and installation costs subject to constraints. Our proposed GSA model is evaluated and compared with one of the most well-known algorithms, Particle Swarm optimization (PSO) taking into account the fundamental system characteristics. Numerical results show that our proposed methodology significantly improves energy efficiency and reduces operational cost of the solar thermal system in contemporary built environment.


Introduction
With the advent of renewable energy, human beings have tried to overcome several severe limitations, including a limited supply of fossil fuels, high cost and carbon dioxide pollution.One of the most popular and fastest-growing sources of renewable energy is the solar energy which is available for local use in building heating, cooling, hot water supply and power production.
It also has the potential to meet most of the modern world energy demand by effectively integrating with local building components.Indeed, in order to phase out fossil fuels and reduce the related 2 Co emissions, solar energy is introduced as one of the most promising sources which can be used to provide hot water as well as environmental heating energy (a.k.a.solar combisystems [1]).These systems are, in fact, derived from the combination of common heating systems with solar collectors.
"Task 26" was a project initiated by the International Energy Agency (IEA) which conducts investigation on solar combisystems indicates that "if the direct use of solar energy is to make a significant contribution to the heat supply, it is necessary that solar-heating technologies must be developed and widely applied over and beyond the sole field of Domestic Hot Water (DHW) preparation" [2].
In particular, this research has focused on a solar combisystem installation that satisfy both DHW and Space Heating (SH) requirements at the same time.Solar combisystems are relatively complex and their performance depends on many parameters, such as, orientation and tilt angle of solar thermal collectors, weather conditions, DHW usage profiles and so on [3].Therefore, optimization techniques are found to be an efficient approach to get the most out of solar thermal combisystems.
Existing approaches on the solar combisystems mostly demonstrated the impact of geographic location [4] and the use of different HW load profiles [5] on solar fraction and energy consumption of the system.Also, two popular optimization techniques being used lately are Genetic Algorithm (GA) and Particle Swarm Optimization (PSO).Authors in [6] used GA technique in order to minimize the payback time of a solar domestic hot water heating system.Authors in [7] also investigated how to optimize large solar domestic hot water systems with respect to solar heat cost.Furthermore, in [2], authors applied PSO to discuss the optimal sizing of the main components of a solar thermal system in order to provide heat for both DHW and SH needs.
However, unlike the existing approaches, in this paper, we propose a novel approach which, according to a comparative study in [8], outperforms other wellknown evolutionary algorithms including Particle Swarm Optimization [9], and Genetic Algorithm (GA) [10] .
Hence, in this paper, we consider a typical mid-sized house located in Kerman, Iran, and propose a methodology to find the optimal component sizes for a solar combisystem.The simulation architecture is conducted via TRNSYS and MATLAB, using MATLAB as the main software that calls TRNSYS for the iterations.
To summarize, the primary contributions of this work are as follows: • We formulate a mathematical model, propose an optimization framework with the aim of minimizing the system cost in terms of energy consumption, installation cost and maximum solar fraction, taking into account collector size, storage tank volume and Auxiliary Power Unit (APU).• We provide the main differences between GSA and PSO, encode the framework into a GSA model and define its fitness function to minimize the system objective.• Finally, an evaluation of the proposed model is conducted by extensive simulations and compared with one of the current state-of-the-art evolutionary algorithms, PSO, to demonstrate how accuracy and system convergence of our algorithm affect the efficiency of domestic energy management in solar combisystems.
The rest of the paper is organized as follows.In Section 2, we describe a typical combisystem model and its assumptions.In Section 3, we formulate the problem.In Section 4, we present the proposed GSA optimization framework aligned with its all essential parameters.Section 5 evaluates the simulation results, and, finally, Section 6 concludes the paper.

A solar thermal combisystem model
Designing a solar thermal combisystem implies, first, selecting a configuration, and then sizing all its main components.Fig. 1 shows the setup scheme of the solar thermal combisystem used in this research.This residential solar combisystem, proposed in [4], will be used as our initial design solution, where the multiobjective optimization framework is used for the selection of a configuration and its main components sizing.However, seven out of the 21 generic solar combisystem configurations considered by "Task 26" utilize more than one storage tank, most of the related works make an assumption of only one tank [3].Thus, in this research, we follow Lund et.al. [4] and assume also hot water within storage tanks for space heating requirements too.Both solar collector and APU are associated to this storage tank.The loads are specified by the DHW and SH demands.The load profile for DHW is generated as in [5], which considers a mean consumption of 200 / l d and a load temperature of 45°C.In fact, providing energy for space heating is a bit more difficult to determine.
Because it is correlated to the specific ambient temperature and building insulation.In our area of interest, the average temperature is collected from Worldwide Meteorological Organization (WMO: 408410) with Latitude and Longitude specified as 30.25N and 56.97E respectively.Also, the energy consumption of a typical residential building during a period of one year is collected and provided as in Fig. 2. Without loss of generality, for any given area of interest, since the precision of the simulations depends on the availability of realistic data of solar system parameters, e.g.irradiation and humidity, the collected monthly mean values of data from the closest weather stations from WMO, illustrated in Table 1, can be represented more accurately in hourly manner with the same statistical properties as the measured data [11].

Problem formulation
Generally, every optimization problem formulation is composed of at least three components: (i) objective functions, (ii) a set of decision variables, and (iii) a set of constraints for the objective functions and decision variables.More particularly, in our case, we intend to determine an optimal solar combisystem design by finding the optimum feasible sets of values of decision variables which, in turn, minimizes the function vector l and j u identify the lower and upper bound of the j -th decision variable, respectively.
For instance, assuming collector size as a decision variable, we can define the lower and upper bound for this variable between 1 and 40 (List of input variables is provided based on [2] in Table 3).
Determining an optimal solar combisystem design implies finding a set of values of the decision variables * x S ∈ which optimizes the multi-objective function vector ( ) F x , taking into account all the constraints.In order to capture all the related quantities in the cost function, our objective vector is defined to maximize the solar fraction 1 ( )  f x , to minimize the total amount of consumed energy 2 ( )  f x , and to minimize the installation cost 3 ( )  f x .It is worth noting that to maximize an objective function by a minimization function, we can simply choose a negative value for the weighting factor α .

Table 3. Input variable set
Our proposed methodology is evaluated based on the GSA meta-heuristic optimization formulation [12].GSA was originally derived from Newton's theory of gravity and mass interactions to solve optimization problems.According to the comparative study [8] , the authors did show that GSA performs better than other well-known evolutionary algorithms including Particle Swarm Optimization (PSO) [13], and Genetic Algorithm (GA) [10].In the following, we discuss how the algorithm works and then, evaluate the proposed methodology.

The Proposed methodology
To evaluate the performance of the proposed approach, we first explain how GSA algorithm operates; then, we discuss how effectively our approach responds to the system variables in the solar combisystems.

Background on GSA Modelling
In this section, the structure and main principles of GSA [12] are briefly described.Recently, GSA has gained more popularity due to its robustness and effectiveness (e.g.[8], [14]).
It was originally derived from Newton's theory of gravity and mass interactions to solve optimization problems.GSA is made up of particles (objects) that interact with each other by the gravity force.The performance metric of particles are measured by their masses.Particles try to move forward towards the heavier particle's mass under the gravity force law.This force pushes the global movement of all particles.Each particle indicates a solution to the problem.Thus, the heavier the particle mass is, the better the solution will be.For the algorithm, in order to work properly, two parameters, gravitational and inertia masses, should be set with appropriate values.While executing GSA algorithm, during iterations, particles get attracted to the heaviest particle mass.At the end, the heaviest particle in the search space represents an optimal solution to the problem.More precisely, suppose a system with n masses in which the position of i th mass is presented as follows: 1 ( ,..., ,..., ) x indicates the position of i th mass in the d th dimension.The force of each mass j acting on mass i at time t can be calculated as: where ( ) G t represents gravitational constant at time t , In order to add stochastic characteristic, GSA multiplies the sum of all forces exerted from other masses with a random number in the range of [0,1] as follows: 1, ( ) ( ) ( ) ∑ By using the total force, acceleration of each mass i at time t can be measured by the law of motion: ( ) ( ) ( ) t + is measured as the fraction of velocity at time t , plus its acceleration, which can be formulated as: ( 1) ( ) ( ) ( ) Also, its position at time 1 t + is calculated as: ( 1) ( ) The gravitational constant ( ) G t is a function initialized at the beginning of the algorithm and decreased over the time lapse to control search accuracy.It is defined as: where 0 G is the intial value and γ − is the constant control parameter.Notice that mass value has direct relation with the mass attractiveness.Heavier masses are more attractive than the lighter ones; thus, they move slower and absorb lighter masses to themselves.Considering the fitness value of mass i at time t denoted by ( ) i fit t , the following equations are used to update the gravitational and inertial masses: where for a minimization problem, For the sake of simplicity, we illustrate GSA procedures in Fig. 3.

Comparison of GSA with PSO
Particle Swarm Optimization (PSO) is one of the wellknown meta-heuristic algorithms in optimization problems.We will show that our proposed methodology with GSA performs even better than PSO.In this section, in order to fully understand how GSA works, the main differences between GSA and PSO are identified as follows: • However, in both algorithms, GSA and PSO, the optimization is acheived by the movement of masses in the search space, the movement startegy is different.• In PSO, particle's direction is identified using only two position values, pbest and gbest ; while in GSA, the direction of a mass is identified by the total force achieved by all other masses.• PSO does not take the quality of solutions and the fitness values into account during the update procedure, while the force in GSA is proportional to the fitness value.• In PSO, updating is performed without taking into account the distance between solutions, while the force in GSA is reversely proportional to the distance between solutions.• In order to update velocity, PSO consumes memory to store the values of pbest and gbest .However, GSA is a memory-less algorithm and takes into account only the current position of masses.

Experimental results
In this section, the effectiveness of the proposed approach is evaluated via simulation.The building solar thermal behavior is initially modeled by TRNSYS v.17 software.Also, in order to technically evaluate the efficiency of GSA, we will compare our methodology with the PSO approach presented in [2].Generic parameters of simulation are set as follows [12].Maximum iteration is set to 1000.Initial value of gravitational constant 0 G is set to 100.In PSO, correction factors 1 c and 2 c are set to 2, and Inertia value ( ω ) is assigned with the value of 1. Plus, all the relevant installation factors for component pricing are selected from Table 2.For both algorithms, results are averaged over 50 runs and the average, best and worst solutions are also provided.
An important factor in implementation is population size.As the population size represents number of masses, larger population size results in a better solution.
However, increasing population size impose more complexity to the system and, as a consequence, requires more time to complete the execution.To find an appropriate value for population size, Fig. 4 is provided, in which best, worst and average-case GSA solutions for population size of range 8 to 22 is measured.As illustrated, with the increase in population size, we notice better results in terms of system performance (i.e. the lower the better; as we are aiming to minimize the objective function).However, as population size increases, it adds up more complexity to the system.Hence, without loss of generality, we set the population size for all cases as 10.Also, to validate our approach, the average, best and worst solutions for the minimization function are compared in case of both GSA and PSO algorithms.As demonstrated in Table 4, our proposed GSA method achieves better results over 50 runs than PSO.Investigations reveal that the average case for optimal cost function is reduced by over 20% for GSA at a faster convergence rate with higher degree of accuracy as compared with PSO.This preliminary results highlight the potential of this methodology, thereby improving the domestic energy management system in solar thermal combisystems.

Conclusion
In this paper, we targeted optimal sizing problem for solar combisystem and defined an effective optimization model to answer the fundamental question of finding the optimal size of the main components of a solar thermal system to go one step further towards efficient energy management.The analysis was performed based on a solar thermal combisystem for a typical mid-sized residential building in Kerman, Iran.We proposed the use of GSA algorithm to analyze the accurate sizing of energy components, i.e. collector size, tank volume and Auxiliary Power Unit (APU).The objective was to maximize solar fraction, minimize the energy consumption and installation cost subject to constraints.Our proposed GSA model was evaluated by comparing with one of the most well-known algorithms, Particel Swarm optimization (PSO) taking into account the fundamental system characteristics.
Numerical results demonstrated that our algorithm can significantly improve energy efficiency and reduce operational cost of the solar thermal system in contemporary built environment.

Fig. 2 .
Fig. 2.Temperature and Energy consumption analysis for the area of interest.

2 3 (
( ) F x , while taking all the constraints into account.The goal is to minimize a general function : n f R R → with respect to system parameters which can be achieved as follows: where 1 ) [ ( ), ( ), ( )] F x f x f x f x = and { the objective function vector and the decision vector respectively; , α β and γ are weighting factors applied to the objective functions in order to adjust the importance of each objective; S indicates the decision search space; n denotes the number of decision variables where in our model 3 n = , and, j active gravitational masses of agents i and j respectively.ε indicates a small constant, and ( ) ij R t indicates the Euclidean distance between masses i and j .
the inertia mass of i .Moreover, based on the law of motion, mass dynamics consist of velocity v and position x .The velocity of mass i at time 1 and maximum number of iterations, respectively.

Table 2 .
Relevant system pricing factors

Table 4 .
GSA vs. PSO optimization of objective function values over 50 runs