Techno-Economic Optimization of Grid-Connected Photovoltaic (PV) and Battery Systems Based on Maximum Demand Reduction (MDRed) Modelling in Malaysia

Under the present electricity tariff structure in Malaysia, electricity billing on a monthly basis for commercial and industrial consumers includes the net consumption charges together with maximum demand (MD) charges. The use of batteries in combination with photovoltaic (PV) systems is projected to become a viable solution for energy management, in terms of peak load shaving. Based on the latest studies, maximum demand (MD) reduction can be accomplished via a solar PV-battery system based on a few measures such as load pattern, techno-economic traits, and electricity scheme. Based on these measures, the Maximum Demand Reduction (MDRed) Model is developed as an optimization tool for the solar PV-battery system. This paper shows that energy savings on net consumption and maximum demand can be maximized via optimal sizing of the solar PV-battery system using the MATLAB genetic algorithm (GA) tool. GA optimization results revealed that the optimal sizing of solar PV-battery system gives monthly energy savings of up to 20% of net consumption via solar PV self-consumption, 3% of maximum demand (MD) via MD shaving and 2% of surplus power supplied to grid via net energy metering (NEM) in regards to Malaysian electricity tariff scheme and cost of the overall system.


Introduction
The release of greenhouse gases, especially CO 2 , by utilities using coal and gas reduces the ozone layer and creates more pollution. Energy demand in developing countries is projected to rise about 65% by 2040, reflecting the growing prosperity and the accelerating economies. The global energy demand will increase by about 35% due to the world's population growth [1]. The high penetration level of solar photovoltaic (PV) in the utility sector decreases the greenhouse gases emissions and  C1 a represents the commercial sector (general) [6]. C2 b represents the commercial sector (peak and off-peak) [6]. E1 c represents the industrial sector (general) [6]. E2 d represents the industrial sector (peak and off-peak) [6].
Adding solar photovoltaic generation to commercial or industrial loads reduces utility energy (kWh) charges, but often has little effect on maximum demand (kW) charges. As per Figure 1, peak demands or maximum demand often occur early in the morning during the beginning of office hours when the solar PV generation is slowly increased. Commercial customers with PV generation may have the same high peak (kW) demand but with a lower average (kW) demand. Since they have a higher maximum demand, they will generally benefit more from maximum demand reduction using a Energies 2019, 12, 3531 3 of 21 battery energy storage system. Peak shaving or maximum demand reduction is the process of reducing the amount of energy purchased from the utility sector during peak hours. A couple of the options include reducing consumption by turning off non-essential equipment during peak hours. Apart from that, installing solar PV-battery systems that can assist with reducing maximum demand, since much of the peak demand occurs during times when this system would be effective.
However, variation in solar irradiance pattern especially during peak hours may lead to a minimal reduction of MD since electricity billing for MD charges are captured on any day with peaking load throughout the month. Therefore, a new approach called Maximum Demand Reduction (MDRed) scheme has been developed to optimally size the solar PV-battery system with respect to Time-of-Use (ToU) pricing scheme of Malaysian electricity tariff and cost of the overall system corresponding to Return on Investment (ROI). Apart from that, this approach will solve the challenges faced due to intermittency of solar PV generation for reliable operation of maximum demand reduction during peak hours with the support of battery energy storage system.

Concept of Maximum Demand Reduction (MDRed) Model
Recently, a lot of studies and models have been developed using solar PV-battery systems. Braam et al. [7] have developed a novel forecast-based control system for photovoltaic-battery systems. It estimates the photovoltaic excess power and develops a charging plan for the battery to store the energy from the photovoltaic peak-production. Wang et al. [8] have developed a state-space based model for BESS and implement a modest yet effective method for peak load reduction by considering device limitations. Pimm et al. [9] have developed a demand model to produce high-resolution domestic load profiles to determine how much peak shaving could be achieved with battery storage. An efficient technique of finding the prospective peak shaving using electricity storage is developed for this purpose. It shows that adequate levels of storage capacity can provide significant peak demand reductions if properly coordinated. Ru et al. [10] have studied the minimization of the cost associated with purchasing from (or selling back to) the utility grid and the battery capacity loss while at the same time sustaining the load and decreasing the peak demand purchased from the grid.
Apart from that, Linssen et al. [11] have developed the Battery-Photovoltaic-Simulation (BaPSi) model to conduct techno-economic analyses of PV-battery systems. The model reflects the variation in the environment to determine the solar PV sizing and battery storage capacity. For each system, the mixture of the total costs of electric supply as well as associated technical and economic output parameters are calculated. Kleissl et al. [12] have developed an operational battery dispatch control system using linear programming for a solar PV-battery storage system that practices load and solar prediction to alleviate peak load. Moghim et al. [13] developed the battery energy storage system (BESS) control algorithm to concurrently overcome the outage issue and shave the peak demand considering the BESS sizing and degradation, microgrid system cost reduction, as well as microgrid scheduling. Liu et al. [14] studied the energy management with battery energy storage system (BESS) optimisation by bearing in mind the cost of distributed generations, cost of battery system, and bi-directional energy trading. Dongol et al. [15] developed the Model Predictive Control (MPC) scheme that could be applied to an existing grid linked household with PV-battery system such that the use of battery is maximized and at the same time, peaks in PV power and load demand are reduced.
Optimal sizing of the solar PV-battery system needs to be based on the effectiveness of self-consumption and MD reduction with respect to return on investment. As stated by Subramani, et al. [16], based on Figures 1 and 2, the optimal solar PV-battery sizing depends on important elements such as load pattern, techno-economic traits, and electricity billing scheme to meet high maximum demand reduction. In regard to load profile, the load consumption data of one (1) or two (2) years will be adequate to show the load steadiness mainly on MD level and load consumption pattern during the peak period. Since the MD charges are very high, the energy savings through optimal sizing of the PV and battery system will be able to maximize the electricity bill savings mainly due to peak load reduction for commercial and industrial customers. Battery efficiency in terms of the state of charge (SOC) and depth of discharge (DOD) together with solar irradiance and PV inverter efficiency will be key for optimal sizing. The total cost of the solar PV-battery system will be very critical in response to the total energy savings, to have a good return on investment to undertake the project. As the core battery technology matures and unit pricing declines, bi-directional battery converters providing both battery charging (AC to DC) and battery inverting (DC to AC) will emerge as a rapidly growing new market for power converters. The Maximum Demand Reduction (MDRed) model is proposed and developed as an optimization tool for the solar PV-battery system. It focuses on peak load shaving and maximization of self-consumption via PV generation and battery system with respect to MD limits. The MDRed model consist of a solar PV array, PV inverter, lithium-ion battery and bi-directional converter. The MDRed model is developed by considering the technical and economic perspective. Firstly, a technical model is formulated which focuses on the battery storage and solar PV capacity to reduce the net load consumption and maximize the MD shaving for a given load pattern. Secondly, the economic model focuses on the cost associated with the system components compared with the energy savings through net consumption and maximum demand to cater for the highest Return on Investment. A flowchart describing the proposed MDRed model is shown in Figure 2. The required input parameters for MDRed model calculation include the consumer load data, solar PV-battery system specification data, and general economic parameters. In MDRed Model, the electricity supply chain is based on the energy balance between the supply and the demand side with respect to MD limitations. critical in response to the total energy savings, to have a good return on investment to undertake the project. As the core battery technology matures and unit pricing declines, bi-directional battery converters providing both battery charging (AC to DC) and battery inverting (DC to AC) will emerge as a rapidly growing new market for power converters. The Maximum Demand Reduction (MDRed) model is proposed and developed as an optimization tool for the solar PV-battery system. It focuses on peak load shaving and maximization of self-consumption via PV generation and battery system with respect to MD limits. The MDRed model consist of a solar PV array, PV inverter, lithium-ion battery and bi-directional converter. The MDRed model is developed by considering the technical and economic perspective. Firstly, a technical model is formulated which focuses on the battery storage and solar PV capacity to reduce the net load consumption and maximize the MD shaving for a given load pattern. Secondly, the economic model focuses on the cost associated with the system components compared with the energy savings through net consumption and maximum demand to cater for the highest Return on Investment. A flowchart describing the proposed MDRed model is shown in Figure 2. The required input parameters for MDRed model calculation include the consumer load data, solar PV-battery system specification data, and general economic parameters. In MDRed Model, the electricity supply chain is based on the energy balance between the supply and the demand side with respect to MD limitations. Figure 1. Peak or maximum demand shaving concept using solar PV-battery system [13]. Figure 1. Peak or maximum demand shaving concept using solar PV-battery system [13].

MATLAB Genetic Algorithm (GA) for MDRed Optimization Model
Based on Table 2, optimization techniques such as Genetic Algorithm (GA), Harmony Search (HS), Particle Swarm Optimization (PSO) and Hybrid Optimization are the most prominent algorithms to size the solar PV-battery system.

MATLAB Genetic Algorithm (GA) for MDRed Optimization Model
Based on Table 2, optimization techniques such as Genetic Algorithm (GA), Harmony Search (HS), Particle Swarm Optimization (PSO) and Hybrid Optimization are the most prominent algorithms to size the solar PV-battery system. Also, these techniques can deal with the random probability distribution or generate a pattern of renewable energy sources [23]. In this paper, the GA programming is developed for the optimization of optimal solar PV-battery sizing in regard to peak load shaving. GA has several advantages such as problem-solving with numerous solutions, easy to understand and can directly be transferred to existing simulations and models [24]. Therefore, several modeling equations and approaches for designing a solar PV-battery system via GA have been developed to ensure the optimum sizing of the overall system. The proposed MDRed model using GA coding was developed to solve the optimal capacity of solar PV and battery system to maximize the energy savings via self-consumption and MD shavings. Input data includes hourly solar irradiation in Watts-peak (Wp) and multiple patterns of monthly load power consumption in kilowatts (kW). Besides that, battery charging and discharging shall be operated based on Time of Use (ToU) under Malaysian electricity tariff for commercial and industrial sector. MDRed modelling scheme is made of mathematical formulation which includes the electricity tariff model, solar PV model and battery energy storage system model. Apart from that, the economical model mainly focuses on cost of the solar PV and battery system and Return on Investment (ROI).

Electricity Tariff Model
Most electricity tariff categories for commercial and industrial sectors are designed to encourage customers to control their electricity demand at daytime peaks since MD charges are very high. Referring to Table 1, the electricity tariff model is specified in Table 3 for net consumption and maximum demand calculation according to electricity tariff categories on commercial and industrial sectors. The total electricity bill (C bill ) for commercial and industrial customers as calculated as follows [6]: where the combination of maximum demand bill (C MD_kW ) in Equation (1) and net consumption bill (C net_kWh ) in Equation (2) will be added on a monthly basis. Equations (1)-(3) are formulated based on the Malaysian electricity tariff category for the commercial and industrial sector. Based on Table 4 and Figure 3, a Malaysian higher learning institution's load profile under C1 electricity tariff is chosen for the case study. Since the case studies is focusing on solar PV-battery sizing based on maximum demand (MD) reduction approach, the concept can be explained using one (1) type of load profile from any commercial or industrial sector. In this paper, C1 category load profile for four (4) consecutive months from January 2017 until April 2017 is used for validation studies. Based on energy data evaluation, highest load or maximum demand is recorded at 1300 kW during beginning of academic calendar for the higher learning institution. Therefore, four (4) months of load profile data is sufficient to cater for optimal sizing of solar PV and battery system based on the Malaysian electricity tariff. 8.30 a.m. and 10.00 a.m. for first four months in the year 2017. These data will be used in a MATLAB (2016a, The Mathworks, city, state abbrev, USA) GA optimization algorithm for solar PV and battery sizing. The weather condition in Malaysia is suitable for solar PV generation. Based on Figure 4, the weather condition is almost predictable with intermittent sunlight from 8.30 a.m. until 5.30 p.m. The peak PV generation is normally achieved at 1000 W/m 2 and with solar PV module temperature and ambient temperature reaching 50 °C and 33 °C, respectively.    The MD is recorded between 1200 kW and 1300 kW during peak hours in between 8.30 a.m. and 10.30 a.m. Figure 3 shows the monthly net consumption and maximum demand recorded in electricity billing of the commercial building. Table 4 shows the maximum demand recorded throughout the months during peak hours only. It can be observed that the highest MD occurs in the month of February 2017 at 1300 kW. Besides that, the highest load has been consumed in between 8.30 a.m. and 10.00 a.m. for first four months in the year 2017. These data will be used in a MATLAB (2016a, The Mathworks, Natick, MA, USA) GA optimization algorithm for solar PV and battery sizing. The weather condition in Malaysia is suitable for solar PV generation. Based on Figure 4, the weather condition is almost predictable with intermittent sunlight from 8.30 a.m. until 5.30 p.m. The peak PV generation is normally achieved at 1000 W/m 2 and with solar PV module temperature and ambient temperature reaching 50 • C and 33 • C, respectively. data is sufficient to cater for optimal sizing of solar PV and battery system based on the Malaysian electricity tariff. The MD is recorded between 1200 kW and 1300 kW during peak hours in between 8.30 a.m. and 10.30 a.m. Figure 3 shows the monthly net consumption and maximum demand recorded in electricity billing of the commercial building. Table 4 shows the maximum demand recorded throughout the months during peak hours only. It can be observed that the highest MD occurs in the month of February 2017 at 1300 kW. Besides that, the highest load has been consumed in between 8.30 a.m. and 10.00 a.m. for first four months in the year 2017. These data will be used in a MATLAB (2016a, The Mathworks, city, state abbrev, USA) GA optimization algorithm for solar PV and battery sizing. The weather condition in Malaysia is suitable for solar PV generation. Based on Figure 4, the weather condition is almost predictable with intermittent sunlight from 8.30 a.m. until 5.30 p.m. The peak PV generation is normally achieved at 1000 W/m 2 and with solar PV module temperature and ambient temperature reaching 50 °C and 33 °C, respectively.

Solar PV Model
The difficulty of calculating the energy generated by a solar PV has been extensively studied in the technical literature. The calculation of solar PV power of a grid-connected solar PV system is classified under two categories which is indirect method and direct method. As the operation and the performance of a PV focuses mainly on its maximum power, the indirect method describing the PV module's maximum power output behaviors are more theoretical for solar PV system valuation. Indirect method directly calculates the maximum power without calculating first the I-V curve of the solar PV array [25]. This simplified indirect method provides the modelled power to be used in MDRed modelling. Based on Rus-Casa et al., indirect method directly provides power from atmospheric parameters and information provided by the manufacturers in the datasheets. PV modelled power in per-unit conversion is based on PV module temperature and solar irradiance level at Standard Testing Condition (STC). The formula for PV modelled power in per-unit convention, P mod is given as follows [25]: where Gs (t) is the measured solar irradiance (hourly) and P PV_kwp is the rated PV power at Standard Testing Condition (STC). G STC and T STC is the solar irradiance (1000 W/m 2 ) and PV module temperature (25 degC) at Standard Testing Conditions (STC), respectively. Besides that, γ is the temperature correction based on measured polycrystalline silicon PV module temperatures with a power decrease in between 0.30%/ • C and 0.5%/ • C. The measured module temperature, T C is set at 50 • C at solar irradiance of 3.5 up to 4 h per day averagely based on Malaysian climate. Solar irradiance measurement was taken at Nilai, Negeri Sembilan, Malaysia using a CMP3 pyranometer (KIPP & ZONEN, Delft, The Netherlands). Apart from the measured solar irradiance, the actual generated power will be obtained with respect to solar irradiance and PV module temperature. The cost of the solar PV system and batteries are the important parameters for optimal sizing of the solar PV-battery system. Table 5 shows the historical prices of the solar PV-inverter system from the year 2010-2016 in Peninsular Malaysia [26]. The P PV_rated can be calculated as follows: where P PV_rated is the rated dc output power of the proposed PV array in kWp and η inv is the conversion efficiency from dc to ac according to inverter efficiency. Nowadays, the PV inverters can operate at 90% of conversion efficiency.

Battery Energy Storage System (BESS) Model
The battery energy storage system (BESS) comprises batteries, control and power conditioning system (C-PCS). Typically, batteries will absorb power from the grid during the off-peak hours and discharge power during peak demand. Currently, significant research and development in battery technology are being carried out. Tesla (Arizona, AZ, USA) has designed and commercialized the Powerwall 2, the second iteration of its home battery system. Tesla Powerwall 2 costs MYR24,200 (USD5500) and delivers 14 kWh of capacity [27].
As the core battery technology matures and the unit pricing decays, bi-directional converters providing both battery charging (AC to DC) and battery inverting (DC to AC) will grow due to the new market for power converters. Various technologies for BESS are available, namely lead acid (LA), vanadium redox flow (VRB), zinc-bromine flow (ZnBr), polysulfide bromide battery (PSB), Energies 2019, 12, 3531 9 of 21 nickel-cadmium battery (NiCd), sodium sulfur and lithium-ion (Li-ion) battery [28]. Four battery technologies are chosen for the investigation of BESS systems such as LA, VRB, ZnBr, and Li-ion.
The key parameters for these batteries are tabulated in Table 6. a Data is collected from [29]; b Data is collected from [30]; c Data is collected from [31].
The batteries are rated in terms of their energy and power capacities. Some of the other essential features of a battery are its efficiency, life span, operating temperature, depth of discharge (DOD), self-discharge and energy density. In most cases, lithium-ion batteries and lead-acid batteries are the best choices for peak shaving techniques, although other battery types can be more affordable [32]. While lead-acid batteries have a relatively short lifespan and lower DOD than other battery types, they are also one of the least expensive options in the energy storage sector. Lithium-ion batteries are lighter and better than lead-acid batteries [33]. They also have higher DOD and longer lifespan when compared to lead-acid batteries. Since the battery is also operated on DC, an AC-to-DC converter is necessary for charging the battery and a DC-to-AC converter is necessary during discharging the battery. For simplicity, we assumed that both converters have the identical constant conversion efficiency satisfying: Note that, η B is the round trip efficiency of the battery converters. In other words, P conv is the power exchanged with the AC bus when the converters and the battery are treated as a single entity. Similarly, we can derive: Apart from that, the rated capacity of the battery, P Bat is calculated by considering the optimal size of the battery, E bat as follows: The battery Depth of Discharge (DOD) has a significant impact on a battery's life cycle. The battery life cycle is inversely proportional to the DOD. The DOD of a battery defines the fraction of the power that can be withdrawn from the battery. For instance, if a battery system is 100% fully charged, it means the DOD of this battery is 0% and vice +Generally, battery state of charge (SOC) provides the ratio of the amount of energy presently stored in the battery to the nominal rated capacity.

Economical Model
The cost of optimal PV array, C PV_inv can be calculated as follows: where U PV_kWp is the unit cost of PV array per kWp. Apart from that, reducing the cost of PV inverter system will lead to lower miscellaneous costs such as operation and maintenance costs and replacement costs. The overall cost of the solar PV system is the combination of both costs of power conversion units and cost of inverter. In this paper, the overall solar PV system cost, C total_PV_inv is evaluated by referring to a specific planning period and is given by: The cost of batteries, C Bat is calculated as follows: where U Bat is the unit cost of the batteries in kWh, P Bat is the rated capacity of the batteries. The cost of power conversion units, C conv is as follows: where U Conv is the unit cost of the power conversion units in kW and P conv is the power rating of the converter. The overall cost of the BESS is the combination of both costs of power conversion units and cost of batteries. In this paper, the total overall BESS cost, C total_BESS is evaluated by referring to a specific planning period and is given by: where C BESS is the capital cost, C o&m_BESS is the operation and maintenance cost, C rep_BESS is the replacement cost, C disp_bat is the disposal cost related to the potential cost achievable from recycling old batteries and lifespan cost (C LS_bat ) of all the main components including its system. However, this is not added in MDRed modeling since the cost of the BESS is very high and will lead to longer ROI. Cost of energy savings on net consumption and MD are according to Malaysian electricity tariff allocated for each category of commercial and industrial customers. For commercial consumers with tariff rates of C1 category, the annual savings, S yr_shave can be calculated as follows: S yr_shave = ( P load_shave * E load_net ) + (P shave_MD * E MD ) + ( P PV_suplus * E _surplus ) * 12 (16) Under the NEM scheme, the rate of surplus generation, E _surplus has been formulated at MYR 0.238 (USD 0.05)/kWh for medium voltage interconnection. Apart from that, overall loan payment is important to include all the incurred cost such as operation and maintenance cost (C O&M ), replacement cost (C RC ) and lifespan cost (C LS ) of all the main components including its system. This is applied to PV-inverter and BESS components which includes the batteries and converter unit. Therefore, the overall cost of the system comprises of: The energy flow schedule of solar PV-battery system integration has been included to lower the daily operating cost mainly on the MD reduction at the specific limit. For GA optimization, 7% of interest rate for total load payment has been included.

Modeling of System Reliability
Several approaches have been used to achieve the optimal configuration of solar PV-battery systems from the technical and economical perspective. In this paper, the technical algorithm for the optimal sizing is developed according to the concept of MDRed model to evaluate the reliability of solar PV-battery system. The GA model attains the optimal size in terms of various degrees of reliability. A binary coded GA was introduced to solve the optimal capacity of solar PV and battery. Input data includes hourly data per year, solar irradiation by indirect power calculation, load power consumption and timeframe of battery DOD and SOC with respect to peak hours and off-peak hour's tariff charges. The flowchart of the GA process applied to PV-battery sizing problem with respect to MDRed modelling is illustrated in Figure 5. One of the key parameters that represent the battery sizing is the capacity of battery charging, P bat_chg and battery discharging, P bat_dischg . Based on Figure 5 and Table 7, the amount of maximum demand reduction (MDRed) is based on battery discharging capacity (P bat_dischg ) to maintain the maximum demand limit (P MD_limit ), in the presence and/or absence of generated PV power (P PV ) during peak hours from 8.00 a.m. and 10.00 p.m. Battery charging capacity (P bat_chg ) will be in operation during off-peak hours in between 10.00 p.m. and 8.00 a.m. As per Figure 7, the battery energy management system works to monitor the net load continuously in the presence of solar PV and will immediately activate the battery operation to discharge if the new net load exceeds the MD limit. Besides that, the battery discharging will not take place if the new net load is below the MD limit. Besides that, as per Figure 7, the Battery Energy management system scenarios for MDRed modeling approach is based on any scenarios (efficient, intermittent or zero solar PV). Therefore, the proposed optimization method will deliver the optimal operation condition or optimal sizing of solar PV-battery in real time scenario.  Table 7, the amount of maximum demand reduction (MDRed) is based on battery discharging capacity (Pbat_dischg) to maintain the maximum demand limit (PMD_limit), in the presence and/or absence of generated PV power (PPV) during peak hours from 8.00 a.m. and 10.00 p.m. Battery charging capacity (Pbat_chg) will be in operation during off-peak hours in between 10.00 p.m. and 8.00 a.m. As per Figure 7, the battery energy management system works to monitor the net load continuously in the presence of solar PV and will immediately activate the battery operation to discharge if the new net load exceeds the MD limit. Besides that, the battery discharging will not take place if the new net load is below the MD limit. Besides that, as per Figure 7, the Battery Energy management system scenarios for MDRed modeling approach is based on any scenarios (efficient, intermittent or zero solar PV). Therefore, the proposed optimization method will deliver the optimal operation condition or optimal sizing of solar PV-battery in real time scenario.  [Battery will change to achieve 0% Figure 5. Flowchart of MDRed model for optimal sizing simulation using Genetic Algorithm. [Battery will not change since 0% DOD] Fully charged Figure 5. Flowchart of MDRed model for optimal sizing simulation using Genetic Algorithm. DOD: 0% Figure 5. Flowchart of MDRed model for optimal sizing simulation using Genetic Algorithm. As per Equation (18), the generated PV power, PPV will be supplied for self-consumption to reduce the actual load, Pload_actual. Therefore, new net load, Pload_net will be obtained. However, the battery will not discharge if the Pload_net is below PMD_limit. Due to the intermittent solar irradiance during bad weather condition, the optimal battery sizing can be calculated using Equation (19) - (20) to cater for the MD limit. If the Pload_net is above PMD_limit, the battery will discharge (Pbat_dischg) to maintain the required MD limit. During off-peak hours, the batteries will be charged (Pbat_chg) during off-peak hours until minimum DOD is reached. Therefore, new net load, Pload_net can be calculated as: The total load net consumption reduction will be based on sum of the new net load mainly due to generated PV power. Therefore, total load shaving (Pload_shave) can be calculated as: MD reduction shaving varies according to system performance which mainly relies on total generated PV power and battery capacity. The excess PV power, PPV_suplus will be achieved when generated PV power is more than actual load and it can be calculated as: [Condition #4: PPV > Pload_actual with solar PV]: The basic Return on Investment (ROI) is calculated based on payment of loan in regard to interest rate using total profit achieved using solar PV-battery system. The ROI can be calculated as: ROI (in years) = Cload_payment/Syr_shave (13)

System Optimization
As per Table 8, the system parameters used for GA optimization covers the technical and economical data of PV, inverter, converter and battery energy storage system. In this paper, the GA optimization gives an optimal sizing of solar PV and battery system without considering the lifespan cost of battery since replacement of battery will be neglected after completion of life span period. As per Equation (18), the generated PV power, PPV will be supplied for self-consumption to reduce the actual load, Pload_actual. Therefore, new net load, Pload_net will be obtained. However, the battery will not discharge if the Pload_net is below PMD_limit. Due to the intermittent solar irradiance during bad weather condition, the optimal battery sizing can be calculated using Equation (19) - (20) to cater for the MD limit. If the Pload_net is above PMD_limit, the battery will discharge (Pbat_dischg) to maintain the required MD limit. During off-peak hours, the batteries will be charged (Pbat_chg) during off-peak hours until minimum DOD is reached. Therefore, new net load, Pload_net can be calculated as: The total load net consumption reduction will be based on sum of the new net load mainly due to generated PV power. Therefore, total load shaving (Pload_shave) can be calculated as: MD reduction shaving varies according to system performance which mainly relies on total generated PV power and battery capacity. The excess PV power, PPV_suplus will be achieved when generated PV power is more than actual load and it can be calculated as: [Condition #4: PPV > Pload_actual with solar PV]: The basic Return on Investment (ROI) is calculated based on payment of loan in regard to interest rate using total profit achieved using solar PV-battery system. The ROI can be calculated as: ROI (in years) = Cload_payment/Syr_shave (13)

System Optimization
As per Table 8, the system parameters used for GA optimization covers the technical and economical data of PV, inverter, converter and battery energy storage system. In this paper, the GA optimization gives an optimal sizing of solar PV and battery system without considering the lifespan cost of battery since replacement of battery will be neglected after completion of life span period. As per Equation (18), the generated PV power, P PV will be supplied for self-consumption to reduce the actual load, P load_actual . Therefore, new net load, P load_net will be obtained. However, the battery will not discharge if the P load_net is below P MD_limit . Due to the intermittent solar irradiance during bad weather condition, the optimal battery sizing can be calculated using Equations (19) and (20) to cater for the MD limit. If the P load_net is above P MD_limit , the battery will discharge (P bat_dischg ) to maintain the required MD limit. During off-peak hours, the batteries will be charged (P bat_chg ) during off-peak hours until minimum DOD is reached. Therefore, new net load, P load_net can be calculated as: [Condition #1: P MD_limit < P load_net with solar PV]:-Condition #1: P MD_limit < P load_net with solar PV P load_net = P load_actual − P PV (18) [Condition #2: P MD_limit > P load_net with solar PV]:- [Condition #3: P MD_limit > P load_net without solar PV]:- The total load net consumption reduction will be based on sum of the new net load mainly due to generated PV power. Therefore, total load shaving (P load_shave ) can be calculated as: MD reduction shaving varies according to system performance which mainly relies on total generated PV power and battery capacity. The excess PV power, P PV_suplus will be achieved when generated PV power is more than actual load and it can be calculated as: [Condition #4: P PV > P load_actual with solar PV]: The basic Return on Investment (ROI) is calculated based on payment of loan in regard to interest rate using total profit achieved using solar PV-battery system. The ROI can be calculated as: ROI (in years) = C load_payment /S yr_shave (23) Energies 2019, 12, 3531 13 of 21

System Optimization
As per Table 8, the system parameters used for GA optimization covers the technical and economical data of PV, inverter, converter and battery energy storage system. In this paper, the GA optimization gives an optimal sizing of solar PV and battery system without considering the lifespan cost of battery since replacement of battery will be neglected after completion of life span period.

Problem Formulation
The aim of this study is to attain an optimal sizing of a solar PV-battery system, which should be properly designed in terms of technical, economic and reliability measures subject to physical and operational constraints/strategies. The objective function of the optimization is to achieve the optimal sizing with respect to highest energy savings on maximum demand and net consumption.

System Constraints
In this study, battery charging and discharging mechanism and the distribution lines are ideal. Besides that, the inverter efficiency, battery efficiency and manufacturers' round-trip efficiency is constant regardless of the operation period. Since the battery cost is very high, the life span cost or total cost of the new battery system will be set to zero after achieving the life span of the battery operation. For any period, t, the total power supply from the solar PV-battery system must supply the total demand with a certain reliability criterion. This relation can be represented by Equation (24) as follows: P PV + P Bat ≤ P load_actual (24) This minimizes the excess power supply to the grid since the self-consumption of PV power or existing net consumption rate [MYR 0.365 (USD 0.08)/kWh] will be higher than net metering rate [MYR 0.238 (USD 0.05)/kWh].

Bounds of Design Variables
The proposed solar PV-battery system optimization parameters including the solar PV capacity, P PV_kWp and maximum demand limit, P MD_limit should be within a certain range: Load profile (Min) < P PV_kWp < Load profile (Max) (25) Load profile (Ave) < P MD_limit < Load profile (Max) The bounds of the design variable on PV and MD limit sizing is to maximize the self-consumption instead of surplus to the grid.

Validation of Numerical Results
Experimental data on PV model using indirect method is verified using a 50 kWp PV system. The experimental data and figure are shown in Figure 6 and Table 9 respectively. Based on the results, based on the indirect method of Equation (4), at 1000 W/m 2 of measured solar irradiance, a 50 kWp solar PV system only delivers up to 35 kW of actual PV power and 38 kW of PV modelled power.  For this paper, load profile with actual MD load of 1050 kW has been used. Apart from that, two different phenomena of solar irradiance pattern with perfect data is used for solar PV-battery system integration to verify the MDRed scheme. For validation purposes, an MD limit of 750 kW and a PVinverter rating of 1200 kWp are used to formulate the required battery capacity together with the financial data. Validation data is important to verify that the solar PV-battery system works according to MDRed scheme. In this paper, the MDRed control algorithm is based on a few conditions to achieve the new MD limit of 750 kW as shown in Table 10 and Figure 7.
Apart from that, the MDRed model shows the control algorithm battery management system to cater for MD reduction with the support of solar PV power at preset MD limit. However, the rated sizing of solar PV-battery system is higher than the formulated optimal values since the calculation of rated values are based on Equations (5) and (8). The total savings is the combination of net consumption savings at rate of MYR 0.365/kWh, surplus power supplied to the grid at rate of MYR 0.238/kWh and maximum demand savings at rate of MYR 30.3/kW. Based on assumption, the annual total savings is calculated for 12 months period. Besides that, the cost of the solar PV-battery system will increase drastically due to additional cost of O&M and replacement apart from the interest rate of 7% incurred to the total cost of the system.   For this paper, load profile with actual MD load of 1050 kW has been used. Apart from that, two different phenomena of solar irradiance pattern with perfect data is used for solar PV-battery system integration to verify the MDRed scheme. For validation purposes, an MD limit of 750 kW and a PV-inverter rating of 1200 kWp are used to formulate the required battery capacity together with the financial data. Validation data is important to verify that the solar PV-battery system works according to MDRed scheme. In this paper, the MDRed control algorithm is based on a few conditions to achieve the new MD limit of 750 kW as shown in Table 10 and Figure 7.   Table 10 data.) Control algorithm of MDRed modeling scheme falls under any of the conditions applied on Table 11 where battery management system works based on maximum demand to maintain the MD limit setting of 750 kW. However, battery discharging mode will take place in between 8.00 a.m. until 10.00 p.m. and battery charging mode in between 10.01 p.m. until 7.59 a.m. everyday with respect to the MD limit of different load profiles.   Table 10 data.)

Optimization Results
Apart from that, the MDRed model shows the control algorithm battery management system to cater for MD reduction with the support of solar PV power at preset MD limit. However, the rated sizing of solar PV-battery system is higher than the formulated optimal values since the calculation of rated values are based on Equations (5) and (8). The total savings is the combination of net consumption savings at rate of MYR 0.365/kWh, surplus power supplied to the grid at rate of MYR 0.238/kWh and maximum demand savings at rate of MYR 30.3/kW. Based on assumption, the annual total savings is calculated for 12 months period. Besides that, the cost of the solar PV-battery system will increase drastically due to additional cost of O&M and replacement apart from the interest rate of 7% incurred to the total cost of the system. Table 11 where battery management system works based on maximum demand to maintain the MD limit setting of 750 kW. However, battery discharging mode will take place in between 8.00 a.m. until 10.00 p.m. and battery charging mode in between 10.01 p.m. until 7.59 a.m. everyday with respect to the MD limit of different load profiles.

Optimization Results
Based on Figure 8, on average 25% of total energy savings can be achieved on a monthly basis which can be used to calculate the Return on Investment (ROI). GA optimization results on MDRed modelling revealed that optimal sizing of solar PV-battery system contributed to energy bill savings up to 20% of net consumption via solar PV self-consumption, 3% of maximum demand (MD) via MD shaving and 2% of surplus power supplied to grid via net energy metering (NEM) in regards to Malaysian electricity tariff scheme and cost of overall system. GA optimization results from 10 population sizes and via 300 iterations are shown in Figure 9. In this paper, GA optimization studies is based on 21-years of load pattern assumption to cater for optimal sizing of solar PV-battery system. Since all actual MDs are captured during peak hours between 8.30 a.m. and 10.00 a.m., it does not show huge differences in solar PV-battery optimal sizing. Therefore, the total energy savings achieved in the range of 23% to 26% with the use of solar PVbattery system. However, the differences in optimal sizing are influenced by the load margin in between maximum demand and average load consumed during peak hours throughout the month.
The surplus energy savings under Net Energy Metering (NEM) achieved at minimal level due to low NEM billing rate compared to net consumption rate. The commercial sector may experience fluctuating load pattern with different ranges of maximum demand. Therefore, the optimal solar PVbattery sizing at various load pattern falls in between 870 kWp and 970 kWp of solar PV and 230 kWh up to 330 kWh of total battery capacity. In addition, the new MD limit has been achieved in the range 1025 kW and 1098 kW of MD reduction using solar PV-battery system.  GA optimization results from 10 population sizes and via 300 iterations are shown in Figure 9. In this paper, GA optimization studies is based on 21-years of load pattern assumption to cater for optimal sizing of solar PV-battery system. Since all actual MDs are captured during peak hours between 8.30 a.m. and 10.00 a.m., it does not show huge differences in solar PV-battery optimal sizing. Therefore, the total energy savings achieved in the range of 23% to 26% with the use of solar PV-battery system. However, the differences in optimal sizing are influenced by the load margin in between maximum demand and average load consumed during peak hours throughout the month. Load profile of the system influence the MDRed modelling optimal sizing on the solar PVbattery system using a GA algorithm. The load profile of the system influences the MDRed modelling optimal sizing on the solar PV-battery system using the GA algorithm. Based on Table 12, the month of March 2017 is proven to give the best optimal sizing for solar PV-battery system with highest percentage of total energy savings. This is due to the load profile changes especially the load margin in between maximum and average loading for every month. Based on Figure 10, load margin and maximum demand of March 2017 is lowest compared to other months which gives the significant Load profile of the system influence the MDRed modelling optimal sizing on the solar PVbattery system using a GA algorithm. The load profile of the system influences the MDRed modelling optimal sizing on the solar PV-battery system using the GA algorithm. Based on Table 12, the month of March 2017 is proven to give the best optimal sizing for solar PV-battery system with highest percentage of total energy savings. This is due to the load profile changes especially the load margin in between maximum and average loading for every month. Based on Figure 10, load margin and maximum demand of March 2017 is lowest compared to other months which gives the significant The surplus energy savings under Net Energy Metering (NEM) achieved at minimal level due to low NEM billing rate compared to net consumption rate. The commercial sector may experience fluctuating load pattern with different ranges of maximum demand. Therefore, the optimal solar PV-battery sizing at various load pattern falls in between 870 kWp and 970 kWp of solar PV and 230 kWh up to 330 kWh of total battery capacity. In addition, the new MD limit has been achieved in the range 1025 kW and 1098 kW of MD reduction using solar PV-battery system.
Load profile of the system influence the MDRed modelling optimal sizing on the solar PV-battery system using a GA algorithm. The load profile of the system influences the MDRed modelling optimal sizing on the solar PV-battery system using the GA algorithm. Based on Table 12, the month of March 2017 is proven to give the best optimal sizing for solar PV-battery system with highest percentage of total energy savings. This is due to the load profile changes especially the load margin in between maximum and average loading for every month. Based on Figure 10, load margin and maximum demand of March 2017 is lowest compared to other months which gives the significant impact on MD shaving compared to net consumption savings. Therefore, the acceptable sizing of solar PV and battery capacity will be 986 kWp and 330 kWh respectively. This will be the best choice to allow the MDRed model to work efficiently at any load pattern to achieve high MD load reduction with yearly energy savings up to MYR 600,000.

Conclusions
The proposed MDRed modeling scheme works as an optimization model which focuses on maximum demand (MD) shaving. This reduces the maximum demand and net consumption costs when using solar PV generation and battery systems. GA optimization results on MDRed modelling reveal that optimal sizing of the solar PV-battery system contributed to energy bill savings up to 20% of net consumption via solar PV self-consumption, 3% of maximum demand (MD) via MD shaving and 2% of surplus power supplied to grid via net energy metering (NEM) in regards to the Malaysian electricity tariff scheme and cost of the overall system. In addition, the optimal battery sizing will be based on the amount of MD savings annually with respect to the cost of the battery system including the bi-directional converters. If the load demand is reduced as a result of effective energy management systems in place or low production in the factory or buildings, re-optimization may be useful to increase or maintain the current solar PV-battery size to maximize the net consumption and MD savings. In future, with higher demand for energy storage system and reduction in battery prices

Conclusions
The proposed MDRed modeling scheme works as an optimization model which focuses on maximum demand (MD) shaving. This reduces the maximum demand and net consumption costs when using solar PV generation and battery systems. GA optimization results on MDRed modelling reveal that optimal sizing of the solar PV-battery system contributed to energy bill savings up to 20% of net consumption via solar PV self-consumption, 3% of maximum demand (MD) via MD shaving and 2% of surplus power supplied to grid via net energy metering (NEM) in regards to the Malaysian electricity tariff scheme and cost of the overall system. In addition, the optimal battery sizing will be based on the amount of MD savings annually with respect to the cost of the battery system including the bi-directional converters. If the load demand is reduced as a result of effective energy management systems in place or low production in the factory or buildings, re-optimization may be useful to increase or maintain the current solar PV-battery size to maximize the net consumption and MD savings. In future, with higher demand for energy storage system and reduction in battery prices will lead to the realization of a higher rate of maximum demand shaving for commercial and industrial sector via MDRed modeling. Funding: This research received partial funding from EEEIC International, Poland.

Acknowledgments:
The authors acknowledge the financial assistance from the Ministry of Higher Education (MOHE), Malaysia for the support to embark on renewable energy research.

Conflicts of Interest:
The authors declare no conflict of interest.