# A Software Tool for Optimal Sizing of PV Systems in Malaysia

Authors: Tamer Khatib; Azah Mohamed; K. Sopian
Journal: Modelling and Simulation in Engineering
 (2012)

---

## Abstract

This paper presents a MATLAB based user friendly software tool called as PV.MY for optimal sizing of photovoltaic (PV) systems. The software has the capabilities of predicting the metrological variables such as solar energy, ambient temperature and wind speed using artificial neural network (ANN), optimizes the PV module/ array tilt angle, optimizes the inverter size and calculate optimal capacities of PV array, battery, wind turbine and diesel generator in hybrid PV systems. The ANN based model for metrological prediction uses four meteorological variables, namely, sun shine ratio, day number and location coordinates. As for PV system sizing, iterative methods are used for determining the optimal sizing of three types of PV systems, which are standalone PV system, hybrid PV/wind system and hybrid PV/diesel generator system. The loss of load probability (LLP) technique is used for optimization in which the energy sources capacities are the variables to be optimized considering very low LLP. As for determining the optimal PV panels tilt angle and inverter size, the Liu and Jordan model for solar energy incident on a tilt surface is used in optimizing the monthly tilt angle, while a model for inverter efficiency curve is used in the optimization of inverter size.


---

## Body

## 1. Introduction

Photovoltaic (PV) system installation has played an important role worldwide due to the fact that PV system is clean, environment friendly, and secure energy source. However, the drawback of PV system is the high capital cost compared with the conventional energy sources. Currently, many research works are carried out focusing on optimization of PV systems so that the number of PV modules, capacity of storage battery, capacity of inverter, and PV array tilt angle can be optimized. As in the case of hybrid PV systems, the optimal sizing of diesel generator and wind turbine is also considered. To facilitate the use of the optimization techniques developed for determining optimal sizing of PV systems, user-friendly software tools are required [1].Some of the software tools that have been developed for optimal sizing of PV systems can be found in [2–5]. In [2], a software tool named “PHOTOV-III” has been developed to determine the number of PV modules and capacity of battery based on load demand for optimal sizing of PV systems in Greece. In the optimization procedure, the number of PV modules is initially fixed while the battery capacity value is kept changing based on load demand until zero load rejection. After that, the number of PV modules is increased, and the simulation is repeated. During each simulation, PV sizing curves are generated at zero load rejection condition. However, this software only generates the sizing curves without calculating the actual sizes of the PV system, and it does not take into account the optimal inverter size and PV module tilt angle. In [3], a software program has been developed in the FORTRAN language for calculating the minimum PV array area based on a well-defined weather profile and the minimum number of storage days for the purpose of optimal sizing of PV systems. The limitation of the program is that it is not user friendly and it does not calculate the inverter size and the PV module tilt angle. Another PV software tool has been developed to monitor the performance of a small PV system in a remote area [4]. The software is used to monitor PV system but does not calculate optimal size of PV systems.Several commercially available software tools for simulating standalone and hybrid PV systems can be found in [5]. These commercial software tools are named RETScreen, PV F-Chart, SolarDesignTool, INSEL, TRNSYS, NREL Solar Advisor Model, ESP-r 11.5, PVSYST 4.33, SolarPro, PV DesignPro-G, PV*SOL Expert, and HOMER. These software tools have been developed for analyzing various types of PV systems. Table 1 shows a comparison made on the capability of the software tools in optimizing the various types of PV systems such as the standalone PV system (SAPV), hybrid PV/wind system, hybrid PV/diesel system, and grid-connected (GC) PV system. A comparison is also made to determine whether the software has the simulation capability feature to predict the performance of the designed PV system at a certain time.Table 1
Comparison of commercial PV software tools.
Software types of  PV systems simulation capabilitySAPVPV/windPV/dieselGCRETScreenxxxx√PV F-Chart√xx√√Solar Design Toolxxx√√INSELxxxx√TRNSYSxxxx√NREL SAMxxxx√PVSYST 4.33√xx√√SolarProxxxxxPV DesignPro-Gxxx√√PV*SOL Expertxxx√√HOMER√√√√xPV.MY√√√√√The RETScreen software tool is a software which has the capability of analyzing economically renewable energy systems including PV systems. However, the optimization techniques employed in the software are rather limited. The PV F-Chart software provides analysis for designing standalone PV systems but hybrid PV systems such as PV/wind and PV/diesel are not included. Moreover, the software provides a monthly performance estimation, which may not be as accurate as the daily performance estimation. The SolarDesignTool software provides design recommendations for grid-connected PV systems but not for standalone and hybrid PV systems. The INSEL software has the capability of simulating PV systems including shading analysis and sun-tracking impact, but optimal sizing of the system is not considered. The TRNSYS is a simulation program used for simulating renewable energy systems. An example on the application of the simulation program is for performing dynamic simulation of a solar hot water system for a typical meteorological year so that the long-term cost savings of such a system could be ascertained. The PVSYST 4.33 software has the capability of determining the sizing of standalone and grid-connected PV systems but not for hybrid PV systems, while the PV DesignPro-G only deals with grid-connected PV systems. Meanwhile, the Solar Pro incorporates calculations that consider shading effect, I-V curve, and power and financial analysis. The PV*SOL Expert provides visualization capability useful for visualizing all roof-parallel and roof-integrated PV systems and also calculates shading on the basis of 3D objects. The HOMER software program is a very good optimization tool and it has been widely used by many researchers. This software provides direct optimization for all types of PV systems and performs emission and economic analyses for the designed system. However, the disadvantage of the HOMER software is that it is not able to predict the performance of the designed PV system.In this paper, a new software tool has been developed for determining optimal sizing of standalone and hybrid PV systems installed for Malaysia. The software tool named PV.MY has been developed with capabilities of calculating optimal PV module tilt angle, optimal sizing of PV system, wind generator, diesel generator, and battery as well as the inverter size. In addition, the PV.MY is able to predict daily performance of the designed PV system for one year. The PV.MY stores comprehensive metrological data such as solar energy, wind speed, and ambient temperature for Malaysia, and it is able to import any data file to any location in the world. It is noted that the HOMER software has the capabilities almost similar to the PV.MY software in which it can optimize standalone, grid-connected, and hybrid PV systems, and therefore it is used as a benchmark for the purpose of validating the accuracy and effectiveness of the PV.MY.


## 2. PV.MY Software Tool Development

The developed PV.MY software tool aims to design PV system at minimum cost for Malaysia. The step-by-step procedures and calculations involved in the PV.MY are shown in Figure1 and described as follows:(i)
define a specific type of PV system under study and its location coordinates,(ii)
generate time series data of solar energy, ambient temperature, and wind speed by using the developed artificial neural network (ANN) model as described in Section3.1,(iii)
perform optimization of PV system by determining the optimum PV array/module tilt angle, PV array battery size, wind turbine, diesel generator, and inverter capacities. The optimum tilt angle is calculated by first modeling the solar energy on a tilt surface using the Liu and Jordan model as described in Section4. The optimum capacities of PV battery, wind turbine and diesel generator are then determined based on the type of the PV system (standalone, grid connected, or hybrid) as described in Section 5. The optimum inverter size for the PV system is then calculated as described in Section 3,(iv)
simulate the optimized PV system so as to investigate its performance for a period of one year as described in Section4.Figure 1
Procedures and calculations in the PV.MY.All the above-mentioned calculations are developed in MATLAB line codes and then integrated with the MATLAB GUI so as to produce a user-friendly interface. Figures2–6 show the interfaces of the PV.MY for the main page, sizing of standalone PV system, sizing of hybrid PV/diesel generator system, sizing of PV/wind system, and sizing of grid connected PV system, respectively. From the main interface of the PV.MY, as shown in Figure 2, a user can select the appropriate button depending on the type of PV system he wants to design. In the standalone PV system interface as shown in Figure 3, a user has to specify the state and enter some specified data such as the load demand, the DC voltage level, and PV module type. The calculated parameters are then displayed as outputs in terms of the optimum PV array and battery sizes, the optimum tilt angle, the optimum inverter size, dump load, number of series and parallel PV modules, charge controller capacity, monthly average solar energy, and the system capital cost. The performance of the designed standalone PV system for one year is also displayed on the interface. In the hybrid PV/diesel system interface as shown in Figure 4, a user has to specify the project location and the PV module data. The calculations and outputs are almost similar to the standalone PV system except that here the optimum capacity of diesel generator is considered as an output as shown in Figure 4. As for the hybrid PV/wind interface shown in Figure 5, the additional outputs are the optimum capacity of the wind turbine, AC-DC rectifier rating, and monthly averages of the wind speed. Figure 6 shows the interface for designing grid-connected PV system. For this case, a user has to specify data such as the size of the desired generation unit size, the primary DC-DC chopper voltage, and the PV module data. The displayed outputs are the optimum capacity of the PV array, the daily generated power, inverter size, chopper rating, PV array configuration, and system cost.Figure 2
The main page of the PV.MY software tool.Figure 3
Interface for designing optimal standalone PV system.Figure 4
Interface for designing optimal hybrid PV/diesel generator system.Figure 5
Interface for designing hybrid PV/wind system.Figure 6
Interface for designing grid-connected PV system.


## 3. Optimization of PV Systems

In the optimization of PV systems, the optimum parameters to be determined are the optimum PV array/module tilt angle, PV array battery size, wind turbine, and diesel generator and inverter capacities. Initially, the metrological variables are predicted using artificial neural networks before determining the optimum PV system parameters.


### 3.1. Prediction of Metrological Variables Using Artificial Neural Networks

The metrological data set for 25 years (1975–2005) consisting of variables such as latitude, longitude, hour, day, month, year, global solar radiation, diffused solar radiation, cloud cover, ambient temperature, relative humidity, and wind speed are used but, however, this data is incomplete and does not include data for sites without measuring devices. Therefore, to generate the weather time series data, ANN-based model is developed. This ANN model developed for meteorological variable prediction is shown in Figure7. It has four inputs and four outputs; the four inputs are site coordinates (latitude and longitude), day number (e.g., 2 FEB = 33), and sunshine ratio. The ANN is based on the feed forward neural network model, and training is done by using the Levenberg-Marquardt back-propagation algorithm in MATLAB. The first ANN model for relative humidity prediction has 4 inputs which are latitude, longitude, day number, and sunshine ratio, and the output variable is the daily relative humidity. As for the second ANN developed for daily ambient temperature prediction, the inputs are the latitude, longitude, sunshine ratio, day number, and the daily relative humidity obtained from the first ANN. The relative humidity obtained from the first ANN and the daily ambient temperature obtained from the second ANN together with the other four variables are then used as inputs to the third ANN to predict the daily global radiation. Finally, the fourth ANN is used for predicting the daily wind speed in which the inputs to the ANN are the daily global radiation, relative humidity, day number, latitude, longitude, and sunshine ratio.Figure 7
ANN based-model for meteorological variable prediction.


### 3.2. Optimization Techniques

The optimization techniques used for determining the optimum PV array/module tilt angle, PV array battery size, wind turbine, and diesel generator and inverter capacities are described in this section.


#### 3.2.1. Optimization of PV Panel/Array Tilt Angle

The amount of solar energy collected by a PV panel is a function of local solar radiation, ground reflection property, and collecting panel’s tilt and orientation. As a matter of fact, the orientation and tilt of a PV panel strongly affect the amount of the collected yield. Therefore, PV panels must be slanted and oriented at optimum angles so as to collect the maximum solar energy available in a specific region. The best method to optimize the tilt and orientation of a PV panel is by applying an active sun tracker. Active sun trackers are electromechanical devices that keep changing the tilt and the orientation of a PV panel/array periodically during the day. However, the capital cost of a PV system with active sun trackers is high, and it consumes energy during tracking. Thus, changing the tilt angle and orientation monthly, seasonal, or yearly for a PV panel may be more feasible than applying an active sun tracker [1]. For calculating the optimum tilt angle for Malaysia, the mathematical model based on the Liu and Jordan model [6] is used and expressed as follows:
(1)GTLT=(G-D)×cos⁡⁡(LAT-TLT)cos⁡⁡DECsin⁡ωsscos⁡LATcos⁡DECsin⁡ωss+ωsssin⁡LATsin⁡DEC+ωsssin⁡⁡(LAT-TLT)sin⁡DECcos⁡LATcos⁡DECsin⁡ωss+ωsssin⁡LATsin⁡DEC+D1+cos⁡TLT2+Gρ1-cos⁡TLT2,
where GTLT,G,D,LAT,TLT,DEC,ωss,andρare the global solar energy on a tilt surface, global solar energy on a horizontal surface, diffuse solar energy on a horizontal surface, location latitude, tilt angle, angle of declination, sunshine time, and ground Albedo, respectively.The average daily global, diffuse, and direct solar energy are first calculated using the provided historical data. Then, the global solar energy on a tilt surface is calculated for each station using (1) at different tilt angle values of 1–90 degrees in order to determine the optimum tilt angle, which is the angle that yields the maximum global solar energy. The map of optimum tilt angles for Malaysia can be found in [6].


#### 3.2.2. Sizing of Standalone PV Systems

Figure8 shows a typical standalone PV system (SAPV) consisting of a PV module/array, power conditioner consisting of charge controller and maximum power point tracking controller, storage battery, inverter, and load.Figure 8
Typical standalone PV system components.In general, PV array collects energy form the sun and converts it to DC current. The DC current flows through a power conditioner to supply load through an inverter. The daily output or energy produced by a PV module/array is given by(2)EPV=APV*Esun*ηPV*ηinv*ηwire,
where Apv is the area of the PV module/array and Esun is daily solar irradiation. ηPV,ηinv,andηwire are efficiencies of PV module, inverter, and conductors, respectively.The difference between the energy at the front end of a PV system,EPV, and at the load side is given by(3)Energydifference=∑i=1366(EPV-EL),
where EL is the load energy demand.The energy difference may be either positive(EPV>EL) or negative (EPV<EL). If the energy difference is positive it means that there is an excess in energy, and if it is negative then there will be an energy deficit. The excess energy is stored in batteries in order to be used in case of energy deficit. Meanwhile, the energy deficit can be defined as the disability of the PV array to provide power to the load at a specific time.In designing PV systems, it is important to know the power supply availability. 100% availability of a power supply means that the power supply is able to cover load demand in a year without any interruption. On the other hand, 0.0% availability of power supply means that the power supply is not able to cover load demand in a year at all. This means that high PV system availability leads to high-reliability and vice versa. However, high reliability PV systems incur high initial cost and, therefore, it is not feasible to design PV systems with very high availability rates. The availability of a PV system can be expressed in terms of a statistical value which is the loss of load probability (LLP). LLP is the ratio of annual energy deficits to annual load demand and it is given by(4)LLP=∑i=1366Energydeficitsi∑j=1366Energydemandj.
For optimizing SAPV, the following parameters are defined for sizing PV array and battery storage, respectively.(5)CA=CPVCL,(6)Cs=CBCL,
where CB and CPV are battery capacity and PV array capacity at specific load, respectively, and CL is the load demand.Assuming that the relation betweenCA and LLP is exponential and the relation between CA and CS is linear, the following formulas are derived for optimum values of CA and CS.(7)optimumCA=c1eC2LLP+c3eC4LLP,optimumCs=c5CA+c6.The optimization process starts by defining some constants and initial values for load demand, PV efficiency, inverter efficiency, conductor efficiency, and charging efficiency. Then a series of daily solar irradiation for the targeted site is calculated based on the long historical data in order to achieve an accurate PV system size.  After defining the load demand (Wh/day), a range of PV array areas must be set because each value of PV array area will generate different values of output energy using (2). From each PV array area value, CA is then calculated. Subsequently, the energy difference is calculated using (3). During the calculation of energy difference, arrays of excess energy, and energy deficit values will be constructed. At a specific PV array area, LLP, Cs, and CA are calculated and stored in arrays. This loop is repeated until the maximum value of PV array area is reached. Finally, plots of LLP versus CA and Cs versus CA are constructed, and from these plots, curve fitting equations are derived using the MATLAB fitting toolbox so as to derive CA as a function of LLP and Cs as a function of CA as described in (7) [7].


#### 3.2.3. Sizing of Hybrid PV/Diesel Generator Systems

Figure9 shows the components of a hybrid PV/diesel system consisting of PV array, battery, diesel generator, DC-DC and AC-DC converters, and the main and dumping loads. The system is assumed to have a PV array as the main source with a backup battery while the diesel generator is operated during deficit times. The deficit time is defined as the time in which the instantaneous energy produced by the PV array is not enough to cover the load demand. The diesel generator is able to charge the storage battery in deficit times as well [1].Figure 9
Components in a hybrid PV/diesel system.In the hybrid PV system, the diesel generator will operate in case the PV array cannot cover the load demand alone and the storage battery will operate in case both the PV array and the diesel generator cannot cover the load demand. For sizing the hybrid PV/diesel generator system, the parameters to be calculated are the number of needed PV modules, storage battery capacity, and diesel generator capacity. The hybrid PV/diesel generator system also considers a certain loss of load probability (LLP) given by (4) and a specific load demand (EL). The LLP is assumed to be less than 0.01 in order to ensure a high reliability of the designed system. For optimal sizing of PV module, diesel generator and battery, (4), (6) and the following equation are considered,(8)CDG=CDGEL,
where CDG is the ratio of diesel generator capacity to daily load demand.In the proposed optimization procedure as described in [8], it starts with specifying the PV module conversion efficiency, PV module peak power, PV module area, PV module standard operation conditions, diesel generator oil consumption, and diesel generator operating power factor. In addition, battery specifications needed are such as charging efficiency, allowable depth of charge (DOD), and battery nominal voltage. In the next phase of the optimization, a time series data of daily solar radiation for the targeted site is needed to model the PV array since the PV array output energy depends on the available solar energy. The proposed optimization technique aims to find the cheapest configuration of PV array and diesel generator at LPP less than 0.01, and, therefore, the capacities of PV array, storage battery, and diesel generator at a specified LLP are calculated. For this calculation, a range of diesel generator capacities is specified with its initial value set to zero (load is being supplied by only the PV array), while the maximum value of the range is supposed to be equal to the load demand (load is fully supplied by the diesel generator). Once the diesel generator capacity value is set, the PV array must cover the remaining load demand. Thus, the value of the load which must be covered by the PV array is given by(9)ELnew=EDG-EL.After setting the diesel generator capacity and calculating the load which must be supplied by the PV array, an iterative loop is applied to calculate the LLP and battery capacity at different values of PV array area. The range of PV array area is also set from zero to the PV area which can produce daily energy that can cover the daily load demand. In this iterative loop, only the values of PV array and the value of diesel generator capacity at LLP values less than 0.01 will be stored in array. This iterative loop is repeated until the maximum value of PV array area is reached and then a new diesel generator capacity is set. Then the iterative loop is repeated until the maximum value of diesel generator is reached. Finally, an array containing all the possible configurations of the system is resulted and converted using (4), (6), and (8) in order to generalize the obtained results.The searching for the optimal sizing of the hybrid PV/diesel generator system starts after obtaining the unit costs of PV system and diesel generator which includes the cost of Wp per PV module, Ah per battery, charge controller, inverters, diesel per liter, oil per liter, support structures, maintenance, and installation. Eventually, the optimal choice can be found by means of a graphical solution from the resultant sizing curve for each LLP. The objective function of the optimization problem which is in terms of a unit cost equation that describes the capital cost of a hybrid PV/diesel generator system in terms of PV module, battery, diesel cost, and others is given as follows,(10)Minimize:SYSTEMcost=αPVWp+βBAh+μDGrun+ρ,Subjectto:EL(t)≤EB(t)⋅BAh+EPV(t)⋅PVWp+EDG(t)⋅DGKVA,
where α,β,μ,andρare the costs of PV array ($/Wp), battery storage ($/Ah), fuel cost ($/L), and other costs.The other costs consider costs of power electronic converters, support structure, diesel generator, maintenance, installation, and commissioning. The constantEL(t) is the average daily load demand at time t, while EB(t),EPV(t),andEDG(t) are the average daily output energy of the storage battery, PV array, and diesel generator, respectively.


#### 3.2.4. Sizing of Hybrid PV/Wind System

Figure10 shows a typical hybrid PV/wind system consisting of PV array, wind generator, block of storage batteries, DC-DC converter, AC-DC converter, and loads. The calculation of the output energy of the PV array and the wind generator in terms of solar energy and wind speed of a hybrid PV/wind system is given in this section. For optimal sizing of a hybrid PV/wind system, the optimum sizes of PV array and wind turbine which give the desired availability at minimum cost are determined.Figure 10
Typical components of a hybrid PV/wind System.To generalize the proposed optimization, (4), (6) and the following equation are considered.(11)Cp=CWCL,
where Cw is wind turbine capacity.For sizing the hybrid PV/wind system, the method presented in [6] is employed, and the optimization process begins by obtaining the daily solar energy and wind speed records. In addition, information about PV module, wind turbine and chopper efficiencies, and load demand must be provided as well. Here, the PV array area and wind turbine radius are the determining variables of these sources of energy. Therefore, an initial value of PV array area is first set and then the output energy of a wind turbine with different radiuses is calculated. After obtaining the maximum value of the wind turbine rotor radius, the initial value of the PV array area is increased by a defined step. These two loops are repeated until the maximum value of the PV array area is obtained. During this iteration process, the battery energy for each system size is stored.The optimization problem is formulated so as to determine the optimum pair (CA,Cd) that covers the load demands at a specific LLP at minimum cost. The objective function of the optimization problem is in terms of a unit cost equation that describes the capital cost of a hybrid PV/wind system in terms of PV module and wind turbine watt peak (Wp) cost as follows,(12)Minimize:Systemcost=αPVWp+βWWp+Φ,Subjectto:EL(t)≤EPV(t)⋅PVWp+EW(t)⋅WWp,
where αandβare the costs of PV array and wind turbine in ($/Wp), respectively. Meanwhile, Φ refers to installation and commissioning costs which are considered constant. EL(t) is the average daily load demand at t, while EPV(t)andEW(t) are the average daily output energy of the PV array and the wind turbine, respectively.


#### 3.2.5. Optimization of Inverter Size in PV Systems

The rated power of a PV array must be optimally matched with the inverter rated power in order to achieve maximum PV array output power [1]. The optimal inverter sizing depends on the local solar radiation, ambient temperature, and inverter performance [9, 10]. For instance, under low solar radiation levels, a PV array generates power at only part of its rated power and consequently the inverter operates under part load conditions with lower system efficiency. The PV array efficiency is also adversely affected when an inverter rated capacity is much lower than the rated PV capacity. On the other hand, under overloading condition, excess PV output power which is greater than the inverter rated capacity is lost [11, 12]. This to say that optimal sizing of PV inverter plays a significant role in increasing PV system efficiency and feasibility. For determining the optimal inverter size, the inverter efficiency curve which is described by a power function is given as follows,(13)η={c1(PPVPINVR)c2+c3PPVPINVR>00PPVPINVR=0,
where PPVandPINVC are PV module output power and inverter rated power, respectively, while C1 and C3 are the model coefficients [7].The optimum inverter size is represented by the ratioRs which is the PV array rated power to the inverter rated power, and it can be described mathematically as follows,(14)RS=P(EnergySources)RatedPINVRated,
where PPVRated is the rated power of the PV array, and PINVRated is the rated power of the inverter.The optimization problem is formulated such that the objective function is to maximize the annual average inverter efficiency and is given by(15)MAX:ηannual=∑3661ηdaily366=∑3661(P(EnergySources)input/PinvR)366.
The inverter efficiency is in terms of the daily averages of solar radiation (G), ambient temperature (T), and inverter rated power (P). The optimization process starts by obtaining the PV system specifications such as PV array rated power, temperature coefficient, and MPPT efficiency. In addition, the solar energy and ambient temperature for the targeted area must be obtained in order to calculate the PV array output power. A set of Rs values is first used in the iterative loop to calculate the rated inverter capacity and the PV array output power. Here, the developed inverter models are used to estimate the inverter efficiency hour by hour at a specified period of time and then the annual efficiency is calculated and stored in an array. This loop will be repeated iteratively until the maximum value of Rs is reached. The optimum inverter size is found by determining the Rs index which gives the maximum conversion efficiency [7].


## 3.1. Prediction of Metrological Variables Using Artificial Neural Networks

The metrological data set for 25 years (1975–2005) consisting of variables such as latitude, longitude, hour, day, month, year, global solar radiation, diffused solar radiation, cloud cover, ambient temperature, relative humidity, and wind speed are used but, however, this data is incomplete and does not include data for sites without measuring devices. Therefore, to generate the weather time series data, ANN-based model is developed. This ANN model developed for meteorological variable prediction is shown in Figure7. It has four inputs and four outputs; the four inputs are site coordinates (latitude and longitude), day number (e.g., 2 FEB = 33), and sunshine ratio. The ANN is based on the feed forward neural network model, and training is done by using the Levenberg-Marquardt back-propagation algorithm in MATLAB. The first ANN model for relative humidity prediction has 4 inputs which are latitude, longitude, day number, and sunshine ratio, and the output variable is the daily relative humidity. As for the second ANN developed for daily ambient temperature prediction, the inputs are the latitude, longitude, sunshine ratio, day number, and the daily relative humidity obtained from the first ANN. The relative humidity obtained from the first ANN and the daily ambient temperature obtained from the second ANN together with the other four variables are then used as inputs to the third ANN to predict the daily global radiation. Finally, the fourth ANN is used for predicting the daily wind speed in which the inputs to the ANN are the daily global radiation, relative humidity, day number, latitude, longitude, and sunshine ratio.Figure 7
ANN based-model for meteorological variable prediction.


## 3.2. Optimization Techniques

The optimization techniques used for determining the optimum PV array/module tilt angle, PV array battery size, wind turbine, and diesel generator and inverter capacities are described in this section.


### 3.2.1. Optimization of PV Panel/Array Tilt Angle

The amount of solar energy collected by a PV panel is a function of local solar radiation, ground reflection property, and collecting panel’s tilt and orientation. As a matter of fact, the orientation and tilt of a PV panel strongly affect the amount of the collected yield. Therefore, PV panels must be slanted and oriented at optimum angles so as to collect the maximum solar energy available in a specific region. The best method to optimize the tilt and orientation of a PV panel is by applying an active sun tracker. Active sun trackers are electromechanical devices that keep changing the tilt and the orientation of a PV panel/array periodically during the day. However, the capital cost of a PV system with active sun trackers is high, and it consumes energy during tracking. Thus, changing the tilt angle and orientation monthly, seasonal, or yearly for a PV panel may be more feasible than applying an active sun tracker [1]. For calculating the optimum tilt angle for Malaysia, the mathematical model based on the Liu and Jordan model [6] is used and expressed as follows:
(1)GTLT=(G-D)×cos⁡⁡(LAT-TLT)cos⁡⁡DECsin⁡ωsscos⁡LATcos⁡DECsin⁡ωss+ωsssin⁡LATsin⁡DEC+ωsssin⁡⁡(LAT-TLT)sin⁡DECcos⁡LATcos⁡DECsin⁡ωss+ωsssin⁡LATsin⁡DEC+D1+cos⁡TLT2+Gρ1-cos⁡TLT2,
where GTLT,G,D,LAT,TLT,DEC,ωss,andρare the global solar energy on a tilt surface, global solar energy on a horizontal surface, diffuse solar energy on a horizontal surface, location latitude, tilt angle, angle of declination, sunshine time, and ground Albedo, respectively.The average daily global, diffuse, and direct solar energy are first calculated using the provided historical data. Then, the global solar energy on a tilt surface is calculated for each station using (1) at different tilt angle values of 1–90 degrees in order to determine the optimum tilt angle, which is the angle that yields the maximum global solar energy. The map of optimum tilt angles for Malaysia can be found in [6].


### 3.2.2. Sizing of Standalone PV Systems

Figure8 shows a typical standalone PV system (SAPV) consisting of a PV module/array, power conditioner consisting of charge controller and maximum power point tracking controller, storage battery, inverter, and load.Figure 8
Typical standalone PV system components.In general, PV array collects energy form the sun and converts it to DC current. The DC current flows through a power conditioner to supply load through an inverter. The daily output or energy produced by a PV module/array is given by(2)EPV=APV*Esun*ηPV*ηinv*ηwire,
where Apv is the area of the PV module/array and Esun is daily solar irradiation. ηPV,ηinv,andηwire are efficiencies of PV module, inverter, and conductors, respectively.The difference between the energy at the front end of a PV system,EPV, and at the load side is given by(3)Energydifference=∑i=1366(EPV-EL),
where EL is the load energy demand.The energy difference may be either positive(EPV>EL) or negative (EPV<EL). If the energy difference is positive it means that there is an excess in energy, and if it is negative then there will be an energy deficit. The excess energy is stored in batteries in order to be used in case of energy deficit. Meanwhile, the energy deficit can be defined as the disability of the PV array to provide power to the load at a specific time.In designing PV systems, it is important to know the power supply availability. 100% availability of a power supply means that the power supply is able to cover load demand in a year without any interruption. On the other hand, 0.0% availability of power supply means that the power supply is not able to cover load demand in a year at all. This means that high PV system availability leads to high-reliability and vice versa. However, high reliability PV systems incur high initial cost and, therefore, it is not feasible to design PV systems with very high availability rates. The availability of a PV system can be expressed in terms of a statistical value which is the loss of load probability (LLP). LLP is the ratio of annual energy deficits to annual load demand and it is given by(4)LLP=∑i=1366Energydeficitsi∑j=1366Energydemandj.
For optimizing SAPV, the following parameters are defined for sizing PV array and battery storage, respectively.(5)CA=CPVCL,(6)Cs=CBCL,
where CB and CPV are battery capacity and PV array capacity at specific load, respectively, and CL is the load demand.Assuming that the relation betweenCA and LLP is exponential and the relation between CA and CS is linear, the following formulas are derived for optimum values of CA and CS.(7)optimumCA=c1eC2LLP+c3eC4LLP,optimumCs=c5CA+c6.The optimization process starts by defining some constants and initial values for load demand, PV efficiency, inverter efficiency, conductor efficiency, and charging efficiency. Then a series of daily solar irradiation for the targeted site is calculated based on the long historical data in order to achieve an accurate PV system size.  After defining the load demand (Wh/day), a range of PV array areas must be set because each value of PV array area will generate different values of output energy using (2). From each PV array area value, CA is then calculated. Subsequently, the energy difference is calculated using (3). During the calculation of energy difference, arrays of excess energy, and energy deficit values will be constructed. At a specific PV array area, LLP, Cs, and CA are calculated and stored in arrays. This loop is repeated until the maximum value of PV array area is reached. Finally, plots of LLP versus CA and Cs versus CA are constructed, and from these plots, curve fitting equations are derived using the MATLAB fitting toolbox so as to derive CA as a function of LLP and Cs as a function of CA as described in (7) [7].


### 3.2.3. Sizing of Hybrid PV/Diesel Generator Systems

Figure9 shows the components of a hybrid PV/diesel system consisting of PV array, battery, diesel generator, DC-DC and AC-DC converters, and the main and dumping loads. The system is assumed to have a PV array as the main source with a backup battery while the diesel generator is operated during deficit times. The deficit time is defined as the time in which the instantaneous energy produced by the PV array is not enough to cover the load demand. The diesel generator is able to charge the storage battery in deficit times as well [1].Figure 9
Components in a hybrid PV/diesel system.In the hybrid PV system, the diesel generator will operate in case the PV array cannot cover the load demand alone and the storage battery will operate in case both the PV array and the diesel generator cannot cover the load demand. For sizing the hybrid PV/diesel generator system, the parameters to be calculated are the number of needed PV modules, storage battery capacity, and diesel generator capacity. The hybrid PV/diesel generator system also considers a certain loss of load probability (LLP) given by (4) and a specific load demand (EL). The LLP is assumed to be less than 0.01 in order to ensure a high reliability of the designed system. For optimal sizing of PV module, diesel generator and battery, (4), (6) and the following equation are considered,(8)CDG=CDGEL,
where CDG is the ratio of diesel generator capacity to daily load demand.In the proposed optimization procedure as described in [8], it starts with specifying the PV module conversion efficiency, PV module peak power, PV module area, PV module standard operation conditions, diesel generator oil consumption, and diesel generator operating power factor. In addition, battery specifications needed are such as charging efficiency, allowable depth of charge (DOD), and battery nominal voltage. In the next phase of the optimization, a time series data of daily solar radiation for the targeted site is needed to model the PV array since the PV array output energy depends on the available solar energy. The proposed optimization technique aims to find the cheapest configuration of PV array and diesel generator at LPP less than 0.01, and, therefore, the capacities of PV array, storage battery, and diesel generator at a specified LLP are calculated. For this calculation, a range of diesel generator capacities is specified with its initial value set to zero (load is being supplied by only the PV array), while the maximum value of the range is supposed to be equal to the load demand (load is fully supplied by the diesel generator). Once the diesel generator capacity value is set, the PV array must cover the remaining load demand. Thus, the value of the load which must be covered by the PV array is given by(9)ELnew=EDG-EL.After setting the diesel generator capacity and calculating the load which must be supplied by the PV array, an iterative loop is applied to calculate the LLP and battery capacity at different values of PV array area. The range of PV array area is also set from zero to the PV area which can produce daily energy that can cover the daily load demand. In this iterative loop, only the values of PV array and the value of diesel generator capacity at LLP values less than 0.01 will be stored in array. This iterative loop is repeated until the maximum value of PV array area is reached and then a new diesel generator capacity is set. Then the iterative loop is repeated until the maximum value of diesel generator is reached. Finally, an array containing all the possible configurations of the system is resulted and converted using (4), (6), and (8) in order to generalize the obtained results.The searching for the optimal sizing of the hybrid PV/diesel generator system starts after obtaining the unit costs of PV system and diesel generator which includes the cost of Wp per PV module, Ah per battery, charge controller, inverters, diesel per liter, oil per liter, support structures, maintenance, and installation. Eventually, the optimal choice can be found by means of a graphical solution from the resultant sizing curve for each LLP. The objective function of the optimization problem which is in terms of a unit cost equation that describes the capital cost of a hybrid PV/diesel generator system in terms of PV module, battery, diesel cost, and others is given as follows,(10)Minimize:SYSTEMcost=αPVWp+βBAh+μDGrun+ρ,Subjectto:EL(t)≤EB(t)⋅BAh+EPV(t)⋅PVWp+EDG(t)⋅DGKVA,
where α,β,μ,andρare the costs of PV array ($/Wp), battery storage ($/Ah), fuel cost ($/L), and other costs.The other costs consider costs of power electronic converters, support structure, diesel generator, maintenance, installation, and commissioning. The constantEL(t) is the average daily load demand at time t, while EB(t),EPV(t),andEDG(t) are the average daily output energy of the storage battery, PV array, and diesel generator, respectively.


### 3.2.4. Sizing of Hybrid PV/Wind System

Figure10 shows a typical hybrid PV/wind system consisting of PV array, wind generator, block of storage batteries, DC-DC converter, AC-DC converter, and loads. The calculation of the output energy of the PV array and the wind generator in terms of solar energy and wind speed of a hybrid PV/wind system is given in this section. For optimal sizing of a hybrid PV/wind system, the optimum sizes of PV array and wind turbine which give the desired availability at minimum cost are determined.Figure 10
Typical components of a hybrid PV/wind System.To generalize the proposed optimization, (4), (6) and the following equation are considered.(11)Cp=CWCL,
where Cw is wind turbine capacity.For sizing the hybrid PV/wind system, the method presented in [6] is employed, and the optimization process begins by obtaining the daily solar energy and wind speed records. In addition, information about PV module, wind turbine and chopper efficiencies, and load demand must be provided as well. Here, the PV array area and wind turbine radius are the determining variables of these sources of energy. Therefore, an initial value of PV array area is first set and then the output energy of a wind turbine with different radiuses is calculated. After obtaining the maximum value of the wind turbine rotor radius, the initial value of the PV array area is increased by a defined step. These two loops are repeated until the maximum value of the PV array area is obtained. During this iteration process, the battery energy for each system size is stored.The optimization problem is formulated so as to determine the optimum pair (CA,Cd) that covers the load demands at a specific LLP at minimum cost. The objective function of the optimization problem is in terms of a unit cost equation that describes the capital cost of a hybrid PV/wind system in terms of PV module and wind turbine watt peak (Wp) cost as follows,(12)Minimize:Systemcost=αPVWp+βWWp+Φ,Subjectto:EL(t)≤EPV(t)⋅PVWp+EW(t)⋅WWp,
where αandβare the costs of PV array and wind turbine in ($/Wp), respectively. Meanwhile, Φ refers to installation and commissioning costs which are considered constant. EL(t) is the average daily load demand at t, while EPV(t)andEW(t) are the average daily output energy of the PV array and the wind turbine, respectively.


### 3.2.5. Optimization of Inverter Size in PV Systems

The rated power of a PV array must be optimally matched with the inverter rated power in order to achieve maximum PV array output power [1]. The optimal inverter sizing depends on the local solar radiation, ambient temperature, and inverter performance [9, 10]. For instance, under low solar radiation levels, a PV array generates power at only part of its rated power and consequently the inverter operates under part load conditions with lower system efficiency. The PV array efficiency is also adversely affected when an inverter rated capacity is much lower than the rated PV capacity. On the other hand, under overloading condition, excess PV output power which is greater than the inverter rated capacity is lost [11, 12]. This to say that optimal sizing of PV inverter plays a significant role in increasing PV system efficiency and feasibility. For determining the optimal inverter size, the inverter efficiency curve which is described by a power function is given as follows,(13)η={c1(PPVPINVR)c2+c3PPVPINVR>00PPVPINVR=0,
where PPVandPINVC are PV module output power and inverter rated power, respectively, while C1 and C3 are the model coefficients [7].The optimum inverter size is represented by the ratioRs which is the PV array rated power to the inverter rated power, and it can be described mathematically as follows,(14)RS=P(EnergySources)RatedPINVRated,
where PPVRated is the rated power of the PV array, and PINVRated is the rated power of the inverter.The optimization problem is formulated such that the objective function is to maximize the annual average inverter efficiency and is given by(15)MAX:ηannual=∑3661ηdaily366=∑3661(P(EnergySources)input/PinvR)366.
The inverter efficiency is in terms of the daily averages of solar radiation (G), ambient temperature (T), and inverter rated power (P). The optimization process starts by obtaining the PV system specifications such as PV array rated power, temperature coefficient, and MPPT efficiency. In addition, the solar energy and ambient temperature for the targeted area must be obtained in order to calculate the PV array output power. A set of Rs values is first used in the iterative loop to calculate the rated inverter capacity and the PV array output power. Here, the developed inverter models are used to estimate the inverter efficiency hour by hour at a specified period of time and then the annual efficiency is calculated and stored in an array. This loop will be repeated iteratively until the maximum value of Rs is reached. The optimum inverter size is found by determining the Rs index which gives the maximum conversion efficiency [7].


## 3.2.1. Optimization of PV Panel/Array Tilt Angle

The amount of solar energy collected by a PV panel is a function of local solar radiation, ground reflection property, and collecting panel’s tilt and orientation. As a matter of fact, the orientation and tilt of a PV panel strongly affect the amount of the collected yield. Therefore, PV panels must be slanted and oriented at optimum angles so as to collect the maximum solar energy available in a specific region. The best method to optimize the tilt and orientation of a PV panel is by applying an active sun tracker. Active sun trackers are electromechanical devices that keep changing the tilt and the orientation of a PV panel/array periodically during the day. However, the capital cost of a PV system with active sun trackers is high, and it consumes energy during tracking. Thus, changing the tilt angle and orientation monthly, seasonal, or yearly for a PV panel may be more feasible than applying an active sun tracker [1]. For calculating the optimum tilt angle for Malaysia, the mathematical model based on the Liu and Jordan model [6] is used and expressed as follows:
(1)GTLT=(G-D)×cos⁡⁡(LAT-TLT)cos⁡⁡DECsin⁡ωsscos⁡LATcos⁡DECsin⁡ωss+ωsssin⁡LATsin⁡DEC+ωsssin⁡⁡(LAT-TLT)sin⁡DECcos⁡LATcos⁡DECsin⁡ωss+ωsssin⁡LATsin⁡DEC+D1+cos⁡TLT2+Gρ1-cos⁡TLT2,
where GTLT,G,D,LAT,TLT,DEC,ωss,andρare the global solar energy on a tilt surface, global solar energy on a horizontal surface, diffuse solar energy on a horizontal surface, location latitude, tilt angle, angle of declination, sunshine time, and ground Albedo, respectively.The average daily global, diffuse, and direct solar energy are first calculated using the provided historical data. Then, the global solar energy on a tilt surface is calculated for each station using (1) at different tilt angle values of 1–90 degrees in order to determine the optimum tilt angle, which is the angle that yields the maximum global solar energy. The map of optimum tilt angles for Malaysia can be found in [6].


## 3.2.2. Sizing of Standalone PV Systems

Figure8 shows a typical standalone PV system (SAPV) consisting of a PV module/array, power conditioner consisting of charge controller and maximum power point tracking controller, storage battery, inverter, and load.Figure 8
Typical standalone PV system components.In general, PV array collects energy form the sun and converts it to DC current. The DC current flows through a power conditioner to supply load through an inverter. The daily output or energy produced by a PV module/array is given by(2)EPV=APV*Esun*ηPV*ηinv*ηwire,
where Apv is the area of the PV module/array and Esun is daily solar irradiation. ηPV,ηinv,andηwire are efficiencies of PV module, inverter, and conductors, respectively.The difference between the energy at the front end of a PV system,EPV, and at the load side is given by(3)Energydifference=∑i=1366(EPV-EL),
where EL is the load energy demand.The energy difference may be either positive(EPV>EL) or negative (EPV<EL). If the energy difference is positive it means that there is an excess in energy, and if it is negative then there will be an energy deficit. The excess energy is stored in batteries in order to be used in case of energy deficit. Meanwhile, the energy deficit can be defined as the disability of the PV array to provide power to the load at a specific time.In designing PV systems, it is important to know the power supply availability. 100% availability of a power supply means that the power supply is able to cover load demand in a year without any interruption. On the other hand, 0.0% availability of power supply means that the power supply is not able to cover load demand in a year at all. This means that high PV system availability leads to high-reliability and vice versa. However, high reliability PV systems incur high initial cost and, therefore, it is not feasible to design PV systems with very high availability rates. The availability of a PV system can be expressed in terms of a statistical value which is the loss of load probability (LLP). LLP is the ratio of annual energy deficits to annual load demand and it is given by(4)LLP=∑i=1366Energydeficitsi∑j=1366Energydemandj.
For optimizing SAPV, the following parameters are defined for sizing PV array and battery storage, respectively.(5)CA=CPVCL,(6)Cs=CBCL,
where CB and CPV are battery capacity and PV array capacity at specific load, respectively, and CL is the load demand.Assuming that the relation betweenCA and LLP is exponential and the relation between CA and CS is linear, the following formulas are derived for optimum values of CA and CS.(7)optimumCA=c1eC2LLP+c3eC4LLP,optimumCs=c5CA+c6.The optimization process starts by defining some constants and initial values for load demand, PV efficiency, inverter efficiency, conductor efficiency, and charging efficiency. Then a series of daily solar irradiation for the targeted site is calculated based on the long historical data in order to achieve an accurate PV system size.  After defining the load demand (Wh/day), a range of PV array areas must be set because each value of PV array area will generate different values of output energy using (2). From each PV array area value, CA is then calculated. Subsequently, the energy difference is calculated using (3). During the calculation of energy difference, arrays of excess energy, and energy deficit values will be constructed. At a specific PV array area, LLP, Cs, and CA are calculated and stored in arrays. This loop is repeated until the maximum value of PV array area is reached. Finally, plots of LLP versus CA and Cs versus CA are constructed, and from these plots, curve fitting equations are derived using the MATLAB fitting toolbox so as to derive CA as a function of LLP and Cs as a function of CA as described in (7) [7].


## 3.2.3. Sizing of Hybrid PV/Diesel Generator Systems

Figure9 shows the components of a hybrid PV/diesel system consisting of PV array, battery, diesel generator, DC-DC and AC-DC converters, and the main and dumping loads. The system is assumed to have a PV array as the main source with a backup battery while the diesel generator is operated during deficit times. The deficit time is defined as the time in which the instantaneous energy produced by the PV array is not enough to cover the load demand. The diesel generator is able to charge the storage battery in deficit times as well [1].Figure 9
Components in a hybrid PV/diesel system.In the hybrid PV system, the diesel generator will operate in case the PV array cannot cover the load demand alone and the storage battery will operate in case both the PV array and the diesel generator cannot cover the load demand. For sizing the hybrid PV/diesel generator system, the parameters to be calculated are the number of needed PV modules, storage battery capacity, and diesel generator capacity. The hybrid PV/diesel generator system also considers a certain loss of load probability (LLP) given by (4) and a specific load demand (EL). The LLP is assumed to be less than 0.01 in order to ensure a high reliability of the designed system. For optimal sizing of PV module, diesel generator and battery, (4), (6) and the following equation are considered,(8)CDG=CDGEL,
where CDG is the ratio of diesel generator capacity to daily load demand.In the proposed optimization procedure as described in [8], it starts with specifying the PV module conversion efficiency, PV module peak power, PV module area, PV module standard operation conditions, diesel generator oil consumption, and diesel generator operating power factor. In addition, battery specifications needed are such as charging efficiency, allowable depth of charge (DOD), and battery nominal voltage. In the next phase of the optimization, a time series data of daily solar radiation for the targeted site is needed to model the PV array since the PV array output energy depends on the available solar energy. The proposed optimization technique aims to find the cheapest configuration of PV array and diesel generator at LPP less than 0.01, and, therefore, the capacities of PV array, storage battery, and diesel generator at a specified LLP are calculated. For this calculation, a range of diesel generator capacities is specified with its initial value set to zero (load is being supplied by only the PV array), while the maximum value of the range is supposed to be equal to the load demand (load is fully supplied by the diesel generator). Once the diesel generator capacity value is set, the PV array must cover the remaining load demand. Thus, the value of the load which must be covered by the PV array is given by(9)ELnew=EDG-EL.After setting the diesel generator capacity and calculating the load which must be supplied by the PV array, an iterative loop is applied to calculate the LLP and battery capacity at different values of PV array area. The range of PV array area is also set from zero to the PV area which can produce daily energy that can cover the daily load demand. In this iterative loop, only the values of PV array and the value of diesel generator capacity at LLP values less than 0.01 will be stored in array. This iterative loop is repeated until the maximum value of PV array area is reached and then a new diesel generator capacity is set. Then the iterative loop is repeated until the maximum value of diesel generator is reached. Finally, an array containing all the possible configurations of the system is resulted and converted using (4), (6), and (8) in order to generalize the obtained results.The searching for the optimal sizing of the hybrid PV/diesel generator system starts after obtaining the unit costs of PV system and diesel generator which includes the cost of Wp per PV module, Ah per battery, charge controller, inverters, diesel per liter, oil per liter, support structures, maintenance, and installation. Eventually, the optimal choice can be found by means of a graphical solution from the resultant sizing curve for each LLP. The objective function of the optimization problem which is in terms of a unit cost equation that describes the capital cost of a hybrid PV/diesel generator system in terms of PV module, battery, diesel cost, and others is given as follows,(10)Minimize:SYSTEMcost=αPVWp+βBAh+μDGrun+ρ,Subjectto:EL(t)≤EB(t)⋅BAh+EPV(t)⋅PVWp+EDG(t)⋅DGKVA,
where α,β,μ,andρare the costs of PV array ($/Wp), battery storage ($/Ah), fuel cost ($/L), and other costs.The other costs consider costs of power electronic converters, support structure, diesel generator, maintenance, installation, and commissioning. The constantEL(t) is the average daily load demand at time t, while EB(t),EPV(t),andEDG(t) are the average daily output energy of the storage battery, PV array, and diesel generator, respectively.


## 3.2.4. Sizing of Hybrid PV/Wind System

Figure10 shows a typical hybrid PV/wind system consisting of PV array, wind generator, block of storage batteries, DC-DC converter, AC-DC converter, and loads. The calculation of the output energy of the PV array and the wind generator in terms of solar energy and wind speed of a hybrid PV/wind system is given in this section. For optimal sizing of a hybrid PV/wind system, the optimum sizes of PV array and wind turbine which give the desired availability at minimum cost are determined.Figure 10
Typical components of a hybrid PV/wind System.To generalize the proposed optimization, (4), (6) and the following equation are considered.(11)Cp=CWCL,
where Cw is wind turbine capacity.For sizing the hybrid PV/wind system, the method presented in [6] is employed, and the optimization process begins by obtaining the daily solar energy and wind speed records. In addition, information about PV module, wind turbine and chopper efficiencies, and load demand must be provided as well. Here, the PV array area and wind turbine radius are the determining variables of these sources of energy. Therefore, an initial value of PV array area is first set and then the output energy of a wind turbine with different radiuses is calculated. After obtaining the maximum value of the wind turbine rotor radius, the initial value of the PV array area is increased by a defined step. These two loops are repeated until the maximum value of the PV array area is obtained. During this iteration process, the battery energy for each system size is stored.The optimization problem is formulated so as to determine the optimum pair (CA,Cd) that covers the load demands at a specific LLP at minimum cost. The objective function of the optimization problem is in terms of a unit cost equation that describes the capital cost of a hybrid PV/wind system in terms of PV module and wind turbine watt peak (Wp) cost as follows,(12)Minimize:Systemcost=αPVWp+βWWp+Φ,Subjectto:EL(t)≤EPV(t)⋅PVWp+EW(t)⋅WWp,
where αandβare the costs of PV array and wind turbine in ($/Wp), respectively. Meanwhile, Φ refers to installation and commissioning costs which are considered constant. EL(t) is the average daily load demand at t, while EPV(t)andEW(t) are the average daily output energy of the PV array and the wind turbine, respectively.


## 3.2.5. Optimization of Inverter Size in PV Systems

The rated power of a PV array must be optimally matched with the inverter rated power in order to achieve maximum PV array output power [1]. The optimal inverter sizing depends on the local solar radiation, ambient temperature, and inverter performance [9, 10]. For instance, under low solar radiation levels, a PV array generates power at only part of its rated power and consequently the inverter operates under part load conditions with lower system efficiency. The PV array efficiency is also adversely affected when an inverter rated capacity is much lower than the rated PV capacity. On the other hand, under overloading condition, excess PV output power which is greater than the inverter rated capacity is lost [11, 12]. This to say that optimal sizing of PV inverter plays a significant role in increasing PV system efficiency and feasibility. For determining the optimal inverter size, the inverter efficiency curve which is described by a power function is given as follows,(13)η={c1(PPVPINVR)c2+c3PPVPINVR>00PPVPINVR=0,
where PPVandPINVC are PV module output power and inverter rated power, respectively, while C1 and C3 are the model coefficients [7].The optimum inverter size is represented by the ratioRs which is the PV array rated power to the inverter rated power, and it can be described mathematically as follows,(14)RS=P(EnergySources)RatedPINVRated,
where PPVRated is the rated power of the PV array, and PINVRated is the rated power of the inverter.The optimization problem is formulated such that the objective function is to maximize the annual average inverter efficiency and is given by(15)MAX:ηannual=∑3661ηdaily366=∑3661(P(EnergySources)input/PinvR)366.
The inverter efficiency is in terms of the daily averages of solar radiation (G), ambient temperature (T), and inverter rated power (P). The optimization process starts by obtaining the PV system specifications such as PV array rated power, temperature coefficient, and MPPT efficiency. In addition, the solar energy and ambient temperature for the targeted area must be obtained in order to calculate the PV array output power. A set of Rs values is first used in the iterative loop to calculate the rated inverter capacity and the PV array output power. Here, the developed inverter models are used to estimate the inverter efficiency hour by hour at a specified period of time and then the annual efficiency is calculated and stored in an array. This loop will be repeated iteratively until the maximum value of Rs is reached. The optimum inverter size is found by determining the Rs index which gives the maximum conversion efficiency [7].


## 4. Examples on the Application of PV.MY in Determining Optimal Sizing of PV Systems

To illustrate the use of the developed software tool, PV.MY, a designed example for determining optimal sizing of a standalone PV system which supplies a daily load demand of 2.215 kWh/day with loss of load probability of 0.01 and location coordinate of Kuala Lumpur is considered. Initially, all the required data is entered through the GUI shown in Figure3. Then by clicking on the button “Simulate the designed System”, the results of the optimum size of the standalone PV system are displayed as shown in Figure 11. From the figure, the results of the optimum tilt angles of the PV array are shown on the right of the system capture. The biggest tilt angle values at this state are in the months of January, November, and December, and the optimum tilt angle decreases in February and October by almost 10 degrees. However, for March, the optimum tilt angle is almost equal to the latitude angle. The results also show that the optimum sizes for the PV array and battery storage are approximately 725 Wp and 146 Ah, respectively. Meanwhile, the optimal inverter size as shown in Figure 11 is 0.6 kW.Figure 11
Output display of the GUI for designing standalone PV System.


### 4.1. Useful Feature of the Software

One of the useful features of the proposed PV.MY software is the ability to simulate a designed system considering a period of one year. After obtaining the optimum sizes of the desired PV system, a user is able to predict the performance of the system for a period of one year. By pressing the button “Simulate the designed System” (Figure11), the software called the specification of the designed system and appropriate metrological variables for the selected site. Here, an iterative simulation is done by calculating the energy produced by the system, the battery state of charge, dump load, and the energy deficits through a year’s time.To illustrate this, consider the designed PV system with optimum ratings for the PV array and battery storage of 725 Wp and 146 Ah, respectively. The energy produced by the designed PV array is then calculated with respect to the load and the energy is plotted as shown in the first row of Figure12. Here, the average energy generated by the designed PV array is 2.9 kWh. This energy is supposed to cover the load demand while the excess energy is stored in the battery. In the case of fully charged batteries, the excess energy will be dumped using a dumping load. The state of charge (SOC) of the battery storage for one year (1–366 days) is shown in the second row of Figure 12. The SOC value of 1.0 indicates that the battery is not in use while the SOC value of less than 1.0 means that the battery is in use. From the figure, the battery supplies power to the load for 79 days which is about 22% of the days in a year. From the 79 days, the battery reaches its allowable minimum SOC (0.2) twelve times, while SOC value greater than 0.6 is about 62% of the 79 days. When the SOC reaches a value of 0.2, some load will be lost and this is the loss of load days as shown in the fourth row of Figure 12. The figure shows the percentage of covered load demand during loss of load days. During a year, the load is lost for 10 days which means 2.7% of a year. However, most of load loss incidences happen in November and December. From the figure, in most load loss days, 60% of load demand is covered and the loss of load probability is 0.95%. Finally, the third row of Figure 12 shows the net energy which needs to be dumped. The daily average of dumped energy is 0.67 kWh while the sum of the dumped energy per year is 244 kWh. Dumping this daily energy of 0.67 kWh may be considered feasible rather than storing it in a battery considering that the stored energy in a battery with 80% charging efficiency is 0.54 kWh/day. The cost of dumped energy per year based on kWh unit price is 65$ per year. Installing battery storage to save this amount of energy may cost more than dumping since the price of Ah/12 V of battery storage is about 2.5–3.5$ and furthermore battery storage needs changing every 4 to 5 years. Therefore, the most appropriate solution to the problem of net energy is to add a load which does not require a stable energy demand. A suitable load for this purpose is a water pump which is used for pumping domestic water in which the amount of pumped water depends on the excess energy.Figure 12
Designed PV system performance for a period of one year.


### 4.2. Comparison between PV.MY and HOMER

One of the commercially available softwares tool for designing PV system is HOMER. In this work, a comparison is made between the proposed software tool PV.MY and HOMER in designing PV systems by referring to interfaces shown in Figures11 and 13. From the results displayed on the interfaces, it is clear that both software tools yielded close results except that there is a 75 Wp difference in the PV array rating and a small difference in the battery size. These differences are due to different solar energy data used, in PV.MY the daily solar energy data is used while in HOMER the monthly solar energy is used. As for the difference in the system cost, this is due to the difference in the calculated PV array capacity and also the charge controller price is not included in HOMER unlike PV.MY.Figure 13
A capture of HOMER for the designed system.There are several useful features in PV.MY which are not available is HOMER. A comparison of the features is as shown in Table2. For example, the PV.MY has the capability of performing simulation of the designed PV system for predicting the system performance, whereas this feature is not available in HOMER. The dumped energy can be calculated in PV.MY unlike HOMER which does not do this calculation. In addition, the PV.MY provides calculation of the optimum monthly/seasonal optimum angles for real PV system design implementation unlike HOMER which does not provide this feature.Table 2
Comparison with HOMER.
PV.MYHOMERSimulating the designed systemYesNoExporting the optimum tilt anglesYesNoDC-DC chopper consideration (rating/cost)YesNoDumped energy calculationYesNoImport solar data filesxls and txtOnly txtPV array configurationYesNoTime to search for the optimum size72 s531 ms


## 4.1. Useful Feature of the Software

One of the useful features of the proposed PV.MY software is the ability to simulate a designed system considering a period of one year. After obtaining the optimum sizes of the desired PV system, a user is able to predict the performance of the system for a period of one year. By pressing the button “Simulate the designed System” (Figure11), the software called the specification of the designed system and appropriate metrological variables for the selected site. Here, an iterative simulation is done by calculating the energy produced by the system, the battery state of charge, dump load, and the energy deficits through a year’s time.To illustrate this, consider the designed PV system with optimum ratings for the PV array and battery storage of 725 Wp and 146 Ah, respectively. The energy produced by the designed PV array is then calculated with respect to the load and the energy is plotted as shown in the first row of Figure12. Here, the average energy generated by the designed PV array is 2.9 kWh. This energy is supposed to cover the load demand while the excess energy is stored in the battery. In the case of fully charged batteries, the excess energy will be dumped using a dumping load. The state of charge (SOC) of the battery storage for one year (1–366 days) is shown in the second row of Figure 12. The SOC value of 1.0 indicates that the battery is not in use while the SOC value of less than 1.0 means that the battery is in use. From the figure, the battery supplies power to the load for 79 days which is about 22% of the days in a year. From the 79 days, the battery reaches its allowable minimum SOC (0.2) twelve times, while SOC value greater than 0.6 is about 62% of the 79 days. When the SOC reaches a value of 0.2, some load will be lost and this is the loss of load days as shown in the fourth row of Figure 12. The figure shows the percentage of covered load demand during loss of load days. During a year, the load is lost for 10 days which means 2.7% of a year. However, most of load loss incidences happen in November and December. From the figure, in most load loss days, 60% of load demand is covered and the loss of load probability is 0.95%. Finally, the third row of Figure 12 shows the net energy which needs to be dumped. The daily average of dumped energy is 0.67 kWh while the sum of the dumped energy per year is 244 kWh. Dumping this daily energy of 0.67 kWh may be considered feasible rather than storing it in a battery considering that the stored energy in a battery with 80% charging efficiency is 0.54 kWh/day. The cost of dumped energy per year based on kWh unit price is 65$ per year. Installing battery storage to save this amount of energy may cost more than dumping since the price of Ah/12 V of battery storage is about 2.5–3.5$ and furthermore battery storage needs changing every 4 to 5 years. Therefore, the most appropriate solution to the problem of net energy is to add a load which does not require a stable energy demand. A suitable load for this purpose is a water pump which is used for pumping domestic water in which the amount of pumped water depends on the excess energy.Figure 12
Designed PV system performance for a period of one year.


## 4.2. Comparison between PV.MY and HOMER

One of the commercially available softwares tool for designing PV system is HOMER. In this work, a comparison is made between the proposed software tool PV.MY and HOMER in designing PV systems by referring to interfaces shown in Figures11 and 13. From the results displayed on the interfaces, it is clear that both software tools yielded close results except that there is a 75 Wp difference in the PV array rating and a small difference in the battery size. These differences are due to different solar energy data used, in PV.MY the daily solar energy data is used while in HOMER the monthly solar energy is used. As for the difference in the system cost, this is due to the difference in the calculated PV array capacity and also the charge controller price is not included in HOMER unlike PV.MY.Figure 13
A capture of HOMER for the designed system.There are several useful features in PV.MY which are not available is HOMER. A comparison of the features is as shown in Table2. For example, the PV.MY has the capability of performing simulation of the designed PV system for predicting the system performance, whereas this feature is not available in HOMER. The dumped energy can be calculated in PV.MY unlike HOMER which does not do this calculation. In addition, the PV.MY provides calculation of the optimum monthly/seasonal optimum angles for real PV system design implementation unlike HOMER which does not provide this feature.Table 2
Comparison with HOMER.
PV.MYHOMERSimulating the designed systemYesNoExporting the optimum tilt anglesYesNoDC-DC chopper consideration (rating/cost)YesNoDumped energy calculationYesNoImport solar data filesxls and txtOnly txtPV array configurationYesNoTime to search for the optimum size72 s531 ms


## 5. Conclusion

A software tool for determining optimal sizing of PV systems in Malaysia called PV.MY has been developed. The software has the capabilities for prediction of metrological variables, optimization of PV module tilt angle, optimization of SAPV, optimization of PV/diesel generator system, optimization of hybrid PV/wind system, and optimization of inverter size. A useful feature of the software is that it has the ability to simulate the designed PV system and predict its performance for a period of year. The PV.MY is also found to be better than the commercial software HOMER in terms of providing additional calculations for designing PV systems.



---

*Source: 969248-2012-05-09.xml*