Performance Analysis and Optimisation of a Solar On-Grid Air Conditioner

: Solar-powered air conditioners offer a high potential for energy-efﬁcient cooling with a high economic feasibility. They can signiﬁcantly reduce the energy consumption in the building sector, which is essential to meet the greater ambition of reducing greenhouse gas emissions by 80% in the EU by 2050. This paper presents a computational model development capable of simulating the behaviour of a photovoltaic-assisted heat pump in different locations and working conditions. In addition, this model has been used to optimise a solar on-grid air conditioning system. The generated model has been validated with experimental data obtained in a real facility for a whole summer of operation (more than 100 tested days) in a Mediterranean climate (Alicante, Spain). According to the simulation results, the average Energy Efﬁciency Ratio (EER) of the system is 16.0, 10.7 and 7.8 in Barcelona, Madrid and Seville, respectively. The optimisation analysis has proven that the severity of the climatic region increases the costs as well as the optimum PV power to drive the AC unit. The obtained values for the the PV power and the annualised cost are 400 W and 506.2 € for Barcelona, 900 W and 536.7 € for Madrid, and 1300 W and 564.7 € for Seville. The annualised cost and the CO 2 emission levels are higher for the conventional system (no PV panels) than for the solar on-grid system, regardless of the installed PV power. This difference can be up to 66.64 € (10.55%) and 112.94 kg CO 2 (64.83%) per summer season in the case of Seville.


Introduction
The 2030 climate and energy framework includes EU-wide targets and policy objectives for the next decade. Key targets for 2030 are: at least 40% cuts in greenhouse gas emissions (from 1990 levels); at least 32.5% improvement in energy efficiency, and at least a share of 32% of renewable energy. The building sector is crucial for achieving the EU's energy and environmental goals. At the same time, better and more energy-efficient buildings improve the quality of citizens' life while bringing additional benefits to the economy and the society. All new buildings must be nearly zero-energy buildings (NZEB) from 31 December 2020. Since 31 December 2018, all new public buildings already need to be NZEB (Energy Performance of Buildings Directive 2010/31/EU (EPBD)). The low amount of energy that NZEB buildings require, must come mostly from renewable sources.
The use of energy for space cooling is growing faster than any other end use in buildings, more than tripling in the last three decades. There is no doubt that global demand for space cooling and the energy needed to provide it will continue to grow for the years to come [1]. There are several applications in the tertiary sector, such as offices or hospitals, where the thermal demand for heating and cooling is mainly produced during the working hours, which coincides with sun hours. In these cases, the use of solar energy to power the air conditioning systems could be a great idea. This solution could be particularly interesting in places with high solar irradiance and long days.
According to the new generation solar cooling and heating systems task 53 issued by International Energy Agency [2], PV-driven compression chillers are the most promising and close-to-market solar solutions today in the case of small to medium units (<50 kW cooling). Until recently, it seemed that solar-assisted cooling had best chances for market deployment in cases such as large buildings with central air conditioning systems, because of the unique development of solar thermal cooling solutions, either by absorption or adsorption. However, with the huge market increase of the cooling equipment in the small residential and small commercial sector, and the tremendous decrease in the cost of PV modules, the situation has changed. The main benefits of PV systems are reported in [3]. The author focused on the energy efficiency of the system, which has highly increased in the last years with great reliability and low cost of maintenance. In addition, this work highlighted the reduction of the PV system price by almost 75% during the last 10 years.
In line with the previous paragraph, Wang et al. [4] recently reviewed and evaluated the performance of various Air Source Heat Pump (ASHP) systems from three main solar sources, such as Solar Thermal (ST), Photovoltaic (PV) and hybrid Photovoltaic/Thermal (PV/T). They conducted a systematic review of the prevailing solar-assisted ASHP systems, including their boundary conditions, system configurations, performance indicators, research methodologies and system performance. The simulation models for a solar-assisted ASHP system include TRNSYS, CFD, self-developed Matlab and mathematical model. The comparison result indicated that the PV-ASHP system has the best techno-economic performance, which performs best on average with a Coefficient Of Performance (COP). Among the future lines of action, they include it to collect field testing data from pilot projects and validate the simulation/experimental results.
Over the past years, a large number of research studies have been carried out on modelling, simulation, design and optimisation of solar photovoltaic air conditioning systems. Demirkıran et al. [5] remarked that the unpredictable and intermittent nature of solar power leads to the need for modelling and simulations of solar cooling systems in various conditions. They modelled, using Simulink-Matlab, a solar-aided air conditioner system consisting of a grid-connected PV/Battery hybrid system with a decision box that switches between grid and battery depending on the state of charge of the battery. They studied different scenarios combining PV panel numbers, battery capacity and control logic. Roselli et al. [6] evaluated a system able to meet pure electric, space heating and cooling loads of a small office building located in Southern Italy. They analysed the energy and environmental performance of the system by means of a dynamic simulation software (TRNSYS) changing the photovoltaic nominal power from 4.5 to 7.5 kW, battery capacity from 3.2 to 9.6 kWh, and the reference electrical system. The analysis showed how monthly variations of the electric reference system, due to different monthly Italian electricity mix production, influence the energy and environmental performance of the solar-based system. The proposed system guarantees high primary energy saving and an equivalent carbon dioxide emissions reduction up to about 93%. Fernández et al. [7] optimised a photovoltaic heat pump to leverage electric self consumption by harnessing building thermal mass in the residential sector. For this purpose, an EnergyPlus model of a flat in Pamplona (Spain) was used. The optimisation analysis was based on a set-point modulation control strategy. Results show that under adequate climatological circumstances, the proposed methodology can reduce the total electric energy from the grid between 60-80%. Again, a gap between solely simulation or laboratory testing and real application is identified.
The works that face the study of PV air conditioning systems from an experimental point of view are scarcer in the literature. Aguilar et al. [8] carried out an experimental work based on the analysis of an air conditioning unit powered by PV energy and the grid, simultaneously. This work, conducted in Alicante (Spain) from May to October, was focused on maximising the solar contribution and optimising the performance of the photovoltaic air conditioning (PV-AC) system. The system reached a total solar contribution of 64.5%, while the production factor was 65.1%, with a 100% reliability. The authors showed that the efficiency of the system depends mainly on the solar irradiance, the ambient temperature and the load factor of the AC unit. Using these experimental data, Aguilar et al. [9] carried out an environmental and techno-economic study focused on quantifying the environmental benefits and evaluating the feasibility of the proposed technology. In this work, the authors compared this solution with a conventional unit. On the one hand, the primary non-renewable energy consumption and the CO 2 emissions of the PV-AC system were 74% lower than the conventional unit. On the other hand, the reduction of the electrical consumption resulted in an annual cost of the proposed system 16% lower than the reference unit. Opoku et al. [10] studied the performance of a hybrid solar PV (with batteries) grid-powered air conditioner for daytime office cooling in hot humid climates (Kumasi, Ghana) during one year. Li et al. [11] analysed the annual performance of a chiller water plant powered by 1562 PV panels used to provide cooling (April to November) to a 14,220 m 2 tertiary building. The final solar contribution of the study was 52%, even without taking into account the four months in winter during which cooling was not necessary. Beyond a validation with laboratory data where, in the best of cases, the models found in the literature are validated, this work shows a validated model with experimental data obtained in a real building, both at the power level and at energy level. Based on this validated model, it is proposed to evaluate the thermal performance and economic viability in climatic conditions different from those tested and to optimise the sizing of the installation based on these particular operating conditions.
The main innovation of this research is the combination of modelling, studying the behaviour and performance in different ambient and operating conditions (simulation), and optimising a solar air conditioning system that has been validated with experimental data obtained in a real installation for a whole summer of operation (more than 100 days). The experimental data are referred to an office located in Alicante (Spain), where the summers are hot and mostly clear, and the winters are moderate (Mediterranean climate). The model is used for the optimisation of the photovoltaic solar field in terms of PV installed power. Furthermore, the behaviour of the system in different climatic zones is analysed in terms of annual behaviour parameters. This paper is organised as follows. Section 2 includes a brief description of the experimental work carried out in the office and the description of the models used in this investigation. Section 3 presents the experimental validation of the generated models and the comparison of the system performing in different climatic zones. Section 4 is devoted to the optimisation of the PV panel field. Section 5 presents the conclusion and discusses future work. Subsystem A consists of an air conditioning system with a nominal cooling and heating capacities of 3.52 kW and 3.81 kW, respectively. The performance indicators are EER = 4.09 and COP = 3.83. This subsystem is connected to two different energy sources: a PV system consisting of three panels connected in parallel (705 Wp, 24 V, subsystem B) and the grid. The total electrical energy demanded by the air conditioning unit is supplied by either one source or the other, since they work in parallel. The control system guarantees that the renewable source has priority over the grid. Finally, subsystem C, is identical to subsystem B. In this case, it is connected to the grid through a conventional inverter (DC/AC) equipment, which worked using the Maximum Power Point (MPP) of the PV panels. This subsystem is used as a reference to quantify the generation losses that subsystem B may experience by following the operation of the equipment instead of maximising its production using an MPPT inverter.

Experimental Apparatus
The experimental tests were conducted in a 35 m 2 office (Alicante, Spain). This office is located on the second (top) floor of an office building. It has only one external facade facing north, with a length of 4.5 m. The indoor unit was placed inside the office, while the outdoor unit was installed on the building's roof. Typical occupancy profiles were observed as in office hours, from 8 to 20 h. The indoor temperature (thermostat) was set to 23 • C in cooling mode.
Several sensors and measurement devices were used to record data. The main sensors used during the experimental campaign are depicted in Figure 1. The variables related to the performance of the system can be divided into electrical, ambient conditions and refrigerant (compression vapour cycle) measurements. All the sensors and measured magnitudes are included in Table 1. The current was measured using a shunt resistance (class 0.5), while the voltage was taken directly by the data acquisition system, where the voltage channel is accurate to ±5.1 mV. The refrigerant cycle temperatures were measured with thermocouples type K and the pressures using pressure transducers. A meteorological station was used for the measurement of the ambient conditions.

Variable Symbol Unit Uncertainty Range
Compressor Inlet temperature T1 This system was tested throughout a whole year, taking into account winter and summer conditions. Refer to Aguilar et al. [8] for a detailed description of the facility, building and experimental procedure.

Modelling
This section covers the description of the mathematical models used in this investigation. Firstly, the model of the building is described. Secondly, a mathematical characterisation of the PV-driven heat pump system is provided. Finally, the interaction between them is described.

Building Modelling
The geometric modelling of the building has been carried out with the LIDER/CALENER unified computer tool (HULC), [12]. The geometric model of the building includes the 3D representation of the building in the energy analysis software. Likewise, the definition of the main architectural parameters of the building is included, such as the dimensions (floor plans and height), the distribution of the indoor spaces and the composition of the opaque and transparent thermal envelope. The opaque envelope covers walls, roofs, floors, and insulation and the transparent envelope includes windows, skylights, and glass doors. Software HULC is the official tool used in Spain for both verifying compliance with buildings regulation and for energy certification of buildings, which includes the calculation engine DOE-2, which is one of the most prestigious energy analysis software packages worldwide. With the help of the experimental data, the building plans and the measurements conducted in the building, the characteristic parameters of the building have been defined, taking into account, among others: the thermal insulation, the use profile and the internal thermal loads (occupation, lighting and equipment). It was determined that the thermal envelope includes a double-sheet facade with a 4-millimetre thermal insulation layer. The glazed area consists of a 3 × 1.5 m 2 double glazed window (4/6/4) equipped with sunscreen slats. The ceiling height is 2.8 m. The installed lighting power is 14 W/m 2 of fluorescent technology.
The use profile of the building is 12 h, between 8 in the morning and 8 in the afternoon uninterruptedly. The building has the main facade facing west and has another office building attached to the east side. To the south, there is an industrial building that generates shade at certain times of the year, while the north facade is completely exposed. The photovoltaic panels located on the roof of the building generate a shade on it. All this information was taken into account when generating the 3D modelling of the building. Figure 2 shows the geometric representation of the building (Figure 2a), highlighting in the northeast corner of floor 2, the 35 m 2 office in which the air conditioning equipment with photovoltaic support is installed, and the real office building ( Figure 2b). As it can be seen, it is a building with 3 floors above ground and a non-habitable basement. The ground floor is intended for the use of a workshop and warehouse, while floors 1 and 2 have the use of offices and are habitable.

Air Conditioning Unit Modelling
A mathematical characterisation of the PV-driven heat pump system is provided in this section. The general system consists of 2 subsystems: PV panels and heat pump.
According to Skoplaki and Palyvos [13], the solar panels can be modelled by a large number of correlations expressing the temperature dependence of the PV module's electrical efficiency, η PV , or electrical power,Ẇ PV . In this work, the solar collectors are modelled via their power generation, as in Equation (1): (1) It has been often reported in the literature that the cell/module temperature, which is not readily available, can be replaced by the normal operating cell temperature (NOCT). Again, according to Skoplaki and Palyvos [13], the relationship between the PV cell temperature and the normal operating cell temperature can be written as, The quantitiesẆ PV,ref , β, and NOCT are normally given by the PV manufacturer. In this study, the following values were considered in the simulations: Concerning the air-to-air heat pump, the performance of a refrigeration cycle is usually described by the Energy Efficiency Ratio (EER), Equation (3), which measures the ratio of cooling power to electrical power.
As mentioned in Aguilar et al. [8] and Underwood et al. [14] among others, the EER depends mainly on condensation and evaporation temperatures, T cond and T evap , as well as the Load Factor, LF (i.e., ratio of the actual to maximum capacity). According to several authors [15,16], the EER depends quadratically on the condenser-evaporator temperature difference, ∆T cond-evap , and linearly with the load factor. In line with EnergyPlus [17], the EER can be correlated by means of a standard two-variables quadratic equation, as in Equation (4): Constants a 0−4 were obtained by fitting Equation (4) to the experimental data from Aguilar et al. [8], and can be found in Table 2. The fitting coefficients have been determined with 95% confidence bounds. Several Key Performance Indicators (KPIs) are defined in order to characterise the system's performance. Each KPI can be calculated in either power or energy basis. Let Θ be any magnitude involved in the analysis. The procedure for converting power data to energy data is shown in Equation (5), where ∆t refers to the time step used in the experimental measurements: The Solar Contribution, SC, or just the contribution of solar energy expresses the fraction of renewable energy used to drive the compressor. In other words, it is the ratio of the renewable to the total energy consumed by the compressor: The Production Factor, PF, is defined as the ratio of the renewable energy consumed by the compressor to the energy generated by the modules. The PF accounts for those intervals of operation when the PV generation is not used in the facility: The system Energy Efficiency Ratio (EER syst ), Equation (8), indicates the grid electricity needed for producing the energy demand. This parameter, calculated on an energy basis, can be considered as a mean EER, but in working conditions:

Building-System Interaction
Both models building and system are directly interconnected and they are used to know the behaviour of the proposed technology (PV-HP) under different working conditions. First of all, the building simulation allows us to know the hourly thermal load in June, July, August and September. In addition, the simulation program gives other results as the hourly solar irradiance, the outdoor temperature and the indoor temperature. All of them are used as input variables in the analytical model of the system defined in Section 2.2. Figure 3 shows the output variables of the analytical model that will be used as Key Performance Indicators to analyse the system behaviour.   Figure 4 shows the summer monthly comparison (June, July, August, and September), in terms of cooling thermal demand, between the results predicted by the building model and the experimental measurements. As it can be observed, the predicted results for July and August are in excellent agreement with the experimental results, obtaining differences lower than 5%. The reported results for June and September, however, are underpredicted when compared to the observed values. This may be due to the fact that the actual experimental climatic conditions during these months were more severe than those taken into account in the simulation tool.  (Figure 5b). Both days had completely different heat demand profiles, so they can help better understand the system's behaviour. On the one hand, the 31 July had the main thermal demand during the morning hours, when the solar contribution is low. At noon, the energy consumption decreased, which modified the operating point of the PV panels connected to the equipment to adapt their production to the equipment's consumption. On the other hand, on the 2 August, the thermal demand was higher and was mainly concentrated on the hours of sunshine, which was beneficial for the performance of the PV panels.  This figure includes four series of experimental ( [8]) and simulated data: the total power consumed by the air conditioning unit,Ẇ eq (blue), the power consumed by the unit and provided by the grid,Ẇ eq,grid (yellow), the photovoltaic power consumed by the unit,Ẇ eq,PV (purple) and, finally, the photovoltaic power generated by the reference panels connected to the electricity grid through an MPPT inverter,Ẇ PV (red). It can be seen that the total power consumed by the unit is greater than the photovoltaic generation and the PV production of the panels connected to the unit has a very similar performance to that of the panels connected to the grid. The only power loss was due to the lower efficiency of the unit converter which is not an MPPT inverter. However, when the thermal demand drops and the power consumed by the unit decreases, the PV panels connected to it reduce their production to adapt it to the power consumed by the unit. In these cases, the PV panels connected to the grid have a greater use since they keep working under the MPPT algorithm. During the day shown in Figure 5a, the total energy consumed by the air conditioning unit was 5.7 kWh, of which 3.2 kWh was provided by the photovoltaic installation, while the remaining 2.5 kWh was provided by the grid. Thus, the solar contribution for this day was 56.8%. The panels connected to the grid produced 4.3 kWh. The production factor was 76.0%. The day shown in Figure 5b reveals a different behaviour of the proposed system. During this day, the total energy consumed by the unit was 8.4 kWh, of which 4.0 kWh was provided by the photovoltaic installation and 4.4 kWh by the grid. During this day, the grid-connected photovoltaic panels produced 4.2 kWh, only slightly more than those connected to the unit. Thus, the solar contribution was 47.8%, while the production factor remained at 94.3%. The EER syst on the 31 July was 9.9, while on the 2 August was 7.0. This behaviour has been explained in detail in [8,9]. As it can be seen, the results predicted by the models (PV and heat pump) are in good agreement with the experimental results. Figure 6 depicts the comparison between experimental and predicted overall power consumption (instant values) for the analysed day in July. A perfect match between experimental and calculated results involves that the points would be located in a straight line passing through the origin with gradient equal to 1. The dashed lines represent the threshold of 10% difference between the calculated and predicted value. The averaged differences between simulated and experimental results are 4.54% for the system's overall power consumption and 4.61% for the PV generation. The maximum observed difference is lower than 10%.  Figure 7 depicts the daily variation of the system EER with the solar contribution for July. Each point represents one day. As it can be seen, the system EER increases exponentially with the solar contribution. This can be explained through Equations (6) and (8). A higher solar contribution implies that the system is using less energy from the grid, increasing the system EER. The imaginary situation corresponding to SC = 1 would lead to an EER syst = ∞ since no energy from the grid would be required to drive the system. Finally, Figure 8 presents the monthly comparison (June, July, August, and September) between experimental and predicted results. This figure includes the system total energy consumption (Ẇ eq ) and the renewable (PV) energy consumption (Ẇ eq,PV ). Small differences are found between the simulation and the experiments. Concerning the total energy consumption, a maximum deviation of 6.45% is observed for June, whereas a minimum of 2.17% is obtained for August. The average difference for the analysed months is 4.23%. Regarding the PV energy consumption, the minimum, average and maximum difference are 0.64%, 2.20%, and 4.49%, respectively. Therefore, in the light of the results shown, the model was considered validated.

Influence of the Climatic Region
Once the models of both the building and the system were validated, they were used to analyse the behaviour of the proposed solution under different climatic conditions. Thus, in this section, the results obtained from the simulation in three Spanish cities with different summer climates are compared, such as Seville, with high summer climatic severity, Madrid, with medium summer climatic severity, and Barcelona, where the severity of the weather in summer is low. These are three cities with representative climates of the Mediterranean geography, the results of which can be extrapolated to other locations with similar climates.
For the three simulations, the same operational characteristics were used as in the experimental study, both for the definition of the building (surfaces, insulation, etc.), and for the HVAC system with PV (panel power, orientation, inclination, etc.).
As can be seen in Table 3, the greater climatic severity in Seville is shown in the value of the cooling thermal load, since it has a cooling load of 2218.7 kWh/year, in Madrid 1684.6 kWh/year and, in Barcelona, 949.8 kWh/year. Although the average temperature during the working hours is similar in the three cases, Seville reaches the highest of the three, with 23.4 • C, followed by Madrid with 22.7 • C and this, in turn, by Barcelona, where the average temperature is 22 • C. This temperature difference affects both the operation of the refrigeration equipment and the photovoltaic solar panels.  Figure 9 compares the results of thermal demand and energy consumption of the model. Since the annual (seasonal) irradiation is similar in the three cases, the photovoltaic production is significantly the same in the three analysed locations. However, the higher thermal demand in Seville leads to a higher electrical consumption of the equipment and, therefore, to a greater use of photovoltaic solar energy. On the opposite side, Barcelona has lower thermal demand, which translates into less use of the renewable source.
As reflected in the defined analytical model, the EER of the equipment depends on the thermal load and the operation temperatures. Thus, when the equipment operates at low load, its efficiency improves, in the same way that when the outside temperature increases, the EER is reduced. This is evident in the simulation results. It can be seen that, in the Barcelona simulation, the equipment works with a lower thermal load and a lower outside temperature, so its EER is 5.6 compared to 4.6 in Madrid and 4.2 in Seville.
The EER of the system is directly related to the EER of the equipment, which we have seen was higher in the case of Barcelona and the solar contribution, which is also higher for this location (SC Barcelona = 65.3%, SC Madrid = 57.0%, and SC Seville = 45.7%). Therefore, the average EER of the system in Barcelona is 16.0, while in the case of Madrid, it is 10.8 and, in Seville, it remains at 7.8. The three points maintain the trend of the curve shown in Figure 7. From the point of view of photovoltaic panels, these have a higher level of use in Seville, since their production factor is 54.8%, while in Barcelona it is only 26%. This indicates that this PV installation is oversized in the case of Barcelona and the optimal power for this location would be below the 705 Wp used in the simulation.
The average performance of the panels has been very similar in all three cases, although their performance is slightly better in the case of Barcelona due to the lower outside temperature during sunny hours.

Optimisation Analysis
In this section, an optimisation analysis is conducted in order to determine the optimum PV power in each of the locations considered. This analysis takes into account the annual costs for investment, maintenance, and energy cost (linked to the performance of the air conditioning unit) during the system lifetime. It should be noted that the term annual for this application refers to the four-month summer period (June-September).
The idea behind this optimisation process is that, by increasing the installed PV power, the grid power consumption required to drive the air conditioning unit is reduced, decreasing the costs associated to energy consumption. It involves, however, an increase of the investment costs due to PV panel acquisition. It is, therefore, expected that an optimum value for the PV installed power will be obtained attending to the economic criterion. As it has been outlined in the previous section, the severity of the summer conditions changes dramatically depending on the location where the facility is installed. Hence, the optimum PV power will be different for the locations considered.
The annualised cost or equivalent annual cost of the system is the cost that, if it were to occur equally in every year of the project lifetime, would give the same net present cost as the actual cash flow sequence associated with that system. The annualised costs for the entire system are calculated by means of the annuity method in this paper. According to this method, the annualised cost (C annual ) is computed by multiplying the Net Present Cost (NPC) to the Capital Recovery Factor (CRF), The Net Present Cost is defined in Equation (10). This definition is equivalent to that of the well-known Net Present Value (NPV). However, in economic engineering, there are some kinds of projects in which there are no sales or incomes due to their inherent characteristics [18].
Here, i is the discount rate, n is the year number and AA TC is the adjusted annual total costs. As inflation is being considered, AA TC is calculated using Equation (11), where A TC is the non-adjusted annual total costs and i f is the inflation rate.
The Capital Recovery Factor is defined as: In order to calculate the non-adjusted annual total costs, investment, maintenance and operation, and energy costs were considered in the analysis. The investment costs cover the acquisition of the PV panels, air conditioning unit, design, planning and commissioning costs, general costs associated to works and indirect costs and industrial benefits.
The considered values are shown in Table 4. As it can be seen, all of the investment costs are constant with the exception of the PV panel cost. A market price of 0.6 € per watt-peak was considered. The maintenance cost for the PV panels was quantified as 10 €/year, while 40 €/year were considered for the air conditioning unit. Those prices were provided by companies that work at local level.
The energy costs (variable term in the energy bill) were obtained by determining the hourly electricity price during the period June-September 2021, Figure 10, and multiplying it to the grid energy consumption in the same one-hour period. As it can be seen, the price of electricity rose to 350 euros per megawatt-hour in September. The prices correspond to the new tariffs that came into force in Spain on 1 June 2021. The new tariff TD2.0 (access tariff for domestic consumers and small businesses, power up to 15 kW), includes three different rates: high, mid, and low. To give this values some context, in August 2020, a megawatt hour of electricity cost three times less than in 2021. These figures have had a huge impact on consumers. The corresponding taxes were applied to the calculated price: 21% VAT and 5% electricity tax. The fixed term of the bill, related to the hired power, was 27.04 €/kW per year. It was considered that the hired power is 4.6 kW. The period under consideration is n = 25 years, which is also the lifetime of the PV panels and the air conditioning unit. A discount rate of i = 0.03 and an inflation rate of i f = 0.031 (averaged value for 2021 in Spain) were considered in the calculations. Figure 11 shows the variation of the annualised cost of the system during its lifetime as a function of the installed PV power. This figure also includes the annualised cost for the conventional system scenario when no photovoltaic panels are installed and the air conditioning equipment is driven only by the grid (Ẇ PV = 0 W, filled markers). As expected, an optimum value for the PV installed power is obtained in each location. This value is a trade-off value between the investment costs of the PV panels and the energy savings in the electricity bill. The obtained values are 400 W, 900 W and 1300 W for Barcelona, Madrid and Seville, respectively (red dashed line in Figure 11).
The corresponding values for C annual are 506.2 €, 536.7 €, and 564.7 €. The contribution of the different concepts to the global cost of the system for the optimum case is shown in Table 5. For all the cases, the highest cost is for the initial investment (∼45-47%), followed by the electricity and power costs (∼40%) and, finally, by the operation and maintenance costs (∼13-15%). It is worth noting that C annual is higher for the case of no PV modules being installed (Ẇ PV = 0 W) than for any other value of PV power, regardless of the location analysed. This difference can be up to 66.64 €/year (10.55%) in the case of Seville. This fact involves that, from an economic point of view, the use of PV panels to drive the AC unit is profitable. Furthermore, the investment in the PV panels would be interesting due to the reductions in primary non-renewable energy consumption and CO 2 emissions (112.94 kg CO 2 per year (season) in Seville for the optimal scenario). Then, the economic savings reinforce this conclusion.
With regard to the location comparison, C annual increases with the severity of the summer conditions as a result of two different factors. On the one hand, a more severe summer involves a higher cooling demand and a worse performance of the AC unit. Accordingly, the energy consumption is higher. On the other hand, the increase in the energy consumption leads to a higher PV surface (power) needed. This fact increases the investment costs and, as a consequence, C annual . Figure 11. Results of the optimisation process for the different locations considered. The filled markers correspond to the values for the conventional system (Ẇ PV = 0 W), and the dashed red line links the optimum values for the PV installed power in the locations analysed.

Conclusions
In this paper, a combination of modelling, simulation and optimisation was used to analyse the performance of a solar on-grid air conditioning system in different Spanish locations. A thorough validation of the model using experimental data was conducted and an optimisation approach based on the annualised cost of the system is provided. The main findings obtained during this investigation can be summarised as follows: • The average EER of the equipment in Barcelona is 5.6, in Madrid is 4.6 and in Seville is 4.2. Thus, the AC unit performs better in locations with lower summer severity conditions. • The EER of the system is directly related to the EER of the equipment and the solar contribution. Both of them are higher in Barcelona, leading to an average EER of the system of 16.0, 10.7 and 7.8 in Barcelona, Madrid and Seville, respectively. • The optimisation analysis based on the annualised cost has proven that the severity of the climatic region increases the costs as well as the optimum PV power to drive the AC unit. The obtained values for the PV power and the annualised cost are 400 W and 506.2 € for Barcelona, 900 W and 536.7 € for Madrid, and 1300 W and 564.7 € for Seville. • The annualised cost and the CO 2 emissions level are higher for the conventional system (no PV panels) than for the solar on-grid system, regardless of the installed PV power. This difference can be up to 66.64 € (10.55%) and 112.94 kg CO 2 (64.83%) per year (summer season) in the case of Seville. • The proposed optimisation analysis can be extended to other locations with Mediterranean climatic conditions to obtain the optimum size of the solar-driven AC system.

Future Works
The future work will be focused on modifying the design, size and selection of the components of the system in order to improve its efficiency. The researchers will develop a control logic capable of adapting the operation of the air conditioning equipment to the availability of solar energy. This work will be focused on reducing the electricity consumption of the grid, increasing the solar contribution of the system and improving its energy efficiency. Thinking of applications for domestic use, where the thermal demand profile is predominantly centred on night hours, it is intended to carry out an experimental study of the thermal storage capacity of the enclosures. The aim is, thus, to analyse the possibility of transferring the consumption curve of air conditioning equipment in residential buildings to the hours of solar availability. Funding: This research is funded by FEDER/Ministerio de Ciencia e Innovación-Agencia Estatal de Investigación through Spanish research projects ENE2017-83729-C3-1-R and ENE2017-83729-C3-3-R, supplied by FEDER funds.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript: Symbols a n constants in Equation (4)