Modeling of a Microgrid System with Time Series Analysis using HOMER Grid Software and it’s Prediction using SARIMA Method
Rituraj Rituraj1*, Shoaib Ali2 and Annamaria R Varkonyi Koczy3
1Doctoral School of Applied Informatics and Applied Mathematics, Óbuda University, Hungary
2John Von Neumann Faculty of Informatics, Óbuda University, Hungary
3Institute of Software Design and Software Development, Óbuda University, Hungary
Submission: November 08, 2021; Published: January 24, 2022
*Corresponding author: Rituraj, Doctoral School of Applied Informatics and Applied Mathematics, Óbuda University, Hungary
How to cite this article: Rituraj R, Shoaib A, Annamaria R V K. Modeling of a Microgrid System with Time Series Analysis using HOMER Grid Software and it’s Prediction using SARIMA Method. Robot Autom Eng J. 2024; 5(2): 555660. DOI: 10.19080/RAEJ.2024.05.555660
Abstract
The optimal dispatch of a microgrid is of great significance to reduce energy consumption, user’s electricity costs, and environmental pollution. The microgrid models are not only able to meet the power requirements but also improve the system economically efficient and environmentally friendly. In this regard, this paper proposes a new off-grid microgrid model to meet the energy requirement of a small touristic place in India. This paper proposed a time series analysis of a microgrid that helps to see how the given system’s environmental and economic variable changes over time. The proposed model optimizes the value of the hybrid power system from utility-scale and distributed generation to standalone microgrid. The paper also discussed the market value of microgrid systems around the globe. The paper used the HOMER grid software simulation tool to analyze the microgrid. It helps to determine the use of the system’s components for demand change reduction while serving the electric loads. This paper also explains the SARIMA model for forecasting the economical behavior of the microgrid. For the analysis and prediction, only the economic factors are taken into consideration. The analysis compares the performance of the system and shows that the system is economically viable concerning the present grid system. To improve the time series analysis information and efficiency of the proposed model, this paper proposes the integration of SARIMA with the HOMER grid software solution. The results show that the effectiveness and superiority of the proposed model. This can reduce the electricity’s costs and pollution of the system
Keywords: Time-Series Analysis, Microgrid, Hybrid Power System, Electric Loads, Market Value, HOMER Grid Software, SARIMA
Abbreviation: TPS: Traditional Power System; SG: Smart Grid; TPG: Traditional Power Grid; GER: Global Energy Review; RES: Renewable Energy Resources; HGS: HOMER Grid Software; PV: Photovoltaic; CCS: Carbon Capture & Storage; NPC: Net Present Cost; LCOE: Levelized Cost of Energy; MESC: Modified Electric System Cascade; HOMER: Hybrid Optimization of Multiple Energy Resources; SARIMA: Seasonal Autoregressive Integrated Moving Average; MG: Microgrid; RMSE: Root Mean Square Error; TSP: Time-Series Plot; kWh: Kilowatt-hour; ADF: Augmented Dickey-Fuller; PACF: Partial Autocorrelation Factor; TSA: Time-Series Analysis.
Introduction
The TPS infrastructures are prone to failures because of aging and limitations. These failures lead to blackouts. It is a condition where the end consumer receives no power to its unit causing downtime. The TPS is the interconnection of several power systems elements. These are synchronous machines, transmission lines and substations, power transformers, distribution lines and substations, and different types of loads. They are located several miles away from the power consumption areas. The electric power is transmitted through long transmission lines which leads to transmission losses. It is estimated that the overall losses between the power plants and consumers are around 8 percent to 15 percent. The TPG systems have centralized electricity generation, few sensors throughout the infrastructure, and manual monitoring of energy distribution. To make repairs in the TPG system the technicians must physically go to the locations of the failures and repair them. This not only leads to time-consuming but also requires extra money. In TPG energy is very difficult to control. Once the energy leaves the power plant or substation, companies have no control over the power distribution. The TPG is not consumer-friendly which means it doesn’t give an option to the consumer to choose the way they want to receive electricity [1]. On the other hand, the SG is a modern form of the TPG. It provides secure and dependable electric services. It is bi-directional communication between the electricity consumer and the utility. It can monitor the grid-connected system’s activity and consumers’ preferences of using electricity. It also provides real-time formations of all the events. The important components of SG are smart appliances, smart meters, smart substations, and advanced synchro-phasor technologies.
The TPG uses electromechanical technology whereas SG uses digital technology. The SG system has a two-way distribution system. However, power is still distributed from the primary power plant in the SG system, but it can also go back up the lines to the main plant from a subsidiary provider. A consumer who has access to RESs (such as solar energy, wind energy) can put energy back on the grid. In this way consumers can not only use the energy but also, he can sell the extra energy and earn money. The SG system provides distributed power from multiple plants and substations to aid in decreasing peak time strains, limiting the number of power outages, and balancing the loads. The SG has multiple sensors placed on the lines which help to pinpoint the address of a fault. It also helps to reroute power to where it is needed at the same time it limits the area affected by downtime. The SG can monitor itself using digital technology. This allows to balance troubleshoot outages, power loads, and manage distribution without the need for direct intervention from a technician. Sensors can detect problems on the line and work to do simple troubleshooting and repair them without intervention [2]. If there are any damages to the infrastructure, the SG can immediately report to the technicians at the monitoring centers, so that it can be repaired as soon as possible. This system can also be rerouted to go around any faulty areas. It limits the area impacted by the power outages. The energy companies have more control over power distribution as the increasing number of sensors and other smart infrastructures. Due to this, energy and energy consumption can be monitored down the transmission lines from the moment it leaves the generating station and to the consumer. Using this, it is possible to share the infrastructure which allows more energy companies and renewable energy resources to come onto the grid. This allows consumers to have more choices to receive the energy [3].
The COVID-19 has a huge impact on the power system. During the COVID-19 lockdown, the energy demand has been significantly reduced, affecting in turn the power mix. The increase in residential power demand was far outweighed by a reduction in industrial and commercial operations. According to the data collected for more than 30 countries shows, the extent of demand declines depends on the stringency and duration of lockdowns. On average the power demand was reduced by 20% in every month of a full lockdown. According to the projection made based on this data, for 2020 global electricity demand fall 5% with a 10% reduction in some regions. The impact on electricity demand can be cut by half if the economy starts to recover in V-shaped. This leads to smaller year-on-year falls for coal, nuclear, and gas power. However, longer lockdowns, the wide diffusion of COVID-19 in developing countries, slower economic recovery could further cut the electricity demand. In the first quarter of 2020, global electricity demand decreased by 2.5% [4]. Electricity demand fell by 2.5% to 4.5% in Europe, the USA, Japan, and South Korea in the first quarter of 2021 relative to the first quarter of 2019. This was only because of the COVID-19 but also because of mild weather conditions in January and February. In a full lockdown, countries experienced an average of 25% decline in energy demand per week. However, countries in partial lockdown experienced an 18% decline in energy demand. The coal demand declined by 8% due to a fall in electricity demand. The output from the coal-fired generators was reduced by more than 10%. According to the report of the ‘GER-20’, the recovery of coal demand for industry and electricity generation in China limits the global decline in coal demand. The GER-20 mentioned that Italy has been heated hard in Europe as electricity demand declined by 75% relative to the same period in 2019. However, the impact on power demand on an average was less significant in the industrial sector. This is because many of the factories were continuing to operate with precautionary measures. This sector was affected the most in China.
The construction and manufacturing industry’s demand decreased by 12% which was 68% of total demand in 2019. On the other hand, the residential electricity demand increased in most of the economies. As a result of lockdown measures, most of the people were spending time at their homes undertaking additional activities at home. Residential energy demand was seen to have an increase of more than 40% in the last week of March 2020 and the first week of April 2020, across many European countries as compared to the same weeks in 2019. The global fall in electricity demand in 2020 seemed to be the largest decline since the great depression and could be eight times the reduction due to the financial crisis of 2009. In recent years, renewable energy sources have claimed a greater share of electricity generation. It is due to lockdown measures and reduced electricity demand [5]. The global electricity generation was reduced by 2.6% in the first quarter of 2020 than the first quarter of 2019. Renewable energy generation increased by 3% during this period. This is mainly because of a double-digit percentage increase for wind power and an increase in the PV output from new projects over the past year. The share of renewables in the electricity supply increased by 28% in the first quarter of 2020 as compared to 26% in the first quarter of 2021. Due to lower demand, nuclear power generation fell by 3%. However, overall low-carbon generation increased in total. Gas-fired generation increased by 4%. This is buoyed by low prices for natural gas in markets around the world. The coal-fired power generation squeezed from all sides and output fell by 8% in the first quarter of 2021 than of 2019 [6].
Many developing and underdeveloped countries are facing the worst electricity crisis. In September 2021, around 20 provinces of China were struggling with a severe shortage of electricity. This left millions of businesses and homes hit by power cuts. In the past years, China has struggled to balance electricity supplies which left many provinces of China at power outages risk, especially during peak power consumption time in the summer and winter. After the pandemic, the world starts to reopen, and demand for Chinese goods surged. This enhances the power needed by the factories. The Beijing government wants to make China carbon neutral by 2060 and therefore trying to the carbon production, at present the country relies on coal for more than half of its power demand. The price of coal has been pushed up and on the other side, the government strictly controls the electricity prices. The coal-fired power plants are unwilling to operate at such losses. Therefore, they drastically reduce their power output. In September 2021, Chinese factories ‘ activities shrunk to the lowest since February 2020 pandemic lockdown. According to Goldman Sachs, this power shortage had affected 44% of the country’s industrial activity that hit its economy to expand by 7.8% in 2020 which was predicted to be 8.2%. The power crisis in China, energy bills jumping in Europe, United Kingdom petrol stations running out of fuel, and soaring crude oil, natural gas, and coal prices on the wholesale market ripple the world economy.
Similarly, Kabul is reportedly going to face a winter 2021 blackout due to unpaid dues to the central Asia electricity suppliers. In Afghanistan, most of its electricity supplied from its neighbors has been hit by drought conditions in the country. Pakistan is also facing an electricity crisis since 2008. This led the industry, commerce, and agriculture to decline. This result in Pakistan’s gross domestic product declining from 8% to 2% in the last decade. 20% of the country’s gross domestic product depends on the agricultural sector. This country is the world’s fourth-largest user of groundwater for agricultural irrigation. This sector of Pakistan is the largest consumer of the country’s electricity. The power crisis in this sector affects the overall country’s economy badly. There are many Indian states and union territories, mainly Uttar Pradesh, Jammu, and Kashmir, Ladakh, Jharkhand is facing a power shortage due to the high demand for coal by the industrial firms after pandemic 2020. In August 2019, the electricity consumption in India was 1,00,600 billion units which increased by 1,20,400 billion units in August 2020. Only in August and September 2021, the energy consumption in India has been increased by 17%. Around 70% of the total electricity generation in India depends on coal. A sudden increase in electricity consumption can’t meet the required coal for electricity generation. Therefore, a power crisis is observed in India. Most of the countries across the globe need coal for electricity generation. This has increased the coal price by 40% in October 2021. Also, in Spain, the price of keeping the lights on has tripled. This reflects a broader spike in power bills across the European Union in September 2021.
All these scenarios force the government and power companies to rely mostly on RES. Therefore, the demand for SG and MG has increased on a large scale. The government is also providing subsidies on the development of MG systems. The expansion of RES, mainly solar and wind, is included by many countries in their energy strategies to increase clean domestic energy supply. For example, Lebanon mostly imports its energy demand but by 2030, it is going to use RES to increase domestic production by 12%. Countries having significant coal generation are also increasing renewable capacity [7]. The CCS is gaining a high impact issue in 2019 as compared to 2015. According to the world energy council report 2020, there are 19 large-scale CCS projects in operations globally. This includes four projects under construction. Further 28 projects are under various stages of development. According to the Statista report 2020, the primary energy consumption is maximum in China with 145.46 exajoules (1018 joules), followed by the USA and India with 87.79 and 31.98 exajoules. In 2020, 61.3% (35.1% coal, 2.8% oil, 23.4% gas) of the world’s electricity was generated by fossil fuels, and 38.7% (10.1% nuclear, 5.9% wind, 3.2% solar, 16.0% hydro, 2.6% geo and biomass, and 0.9% others renewable resources. In 2020, the electricity generation from solar surpassed oil for the first time.
Related Work
Several studies have shown the performance and sensitive analysis of HGS. Shahzad et al. [8] performed a techno-economic feasibility analysis of a solar-biomass off-grid system using HGS. This system is used for the electrification of rural areas in Pakistan. The system was economically analyzed by sensitivity parameters of HGS. It is found economically favorable for small areas with the lowest per-unit cost of 5.52 PKR/kWh. They used the HGS to analyze the solar irradiance data and the available biomass potential on the farm. They optimized the system for a payback period of 9.5 years. Mamaghani et al. [9] designed an off-grid rural electrification system using diesel, wind, PV, and hybrid electrification systems in Colombia. They designed the most efficient and cost-effective system using the HGS. They also used the HGS to find the optimal systems from economic and environmental viewpoints. The main performance indexes for the system are the cost of energy, net present cost, and pollutant emissions. The variation in the fuel price and solar panel price were taken into consideration to perform the sensitivity analysis of the designed system. Halabi et al. [10] perform the analysis of PV, diesel, and battery systems using the HGS. They studied the performance of two decentralized power stations in Malaysia and analyze all possible scenarios of hybrid PV/diesel/battery systems. They compared the optimum design using HGS. They examine the impact of main factors on the system by plotting the sensitivity analysis. The minimum value of total NPC and the LCOE verified the good outcome. The result also focused on the maximum use of RES which showed the best environmental characteristics with the highest costs. Their research improves the performance of standalone RES and reduces energy storage requirements.
Zahboune et al. [11] present a method of designing hybrid electricity generation systems. This is based on the MESC Analysis method. The power pinch analysis is used for developing an isolated power supply system. This system consists of wind turbines, PV panels, and energy storage units. The results of the
MESC analysis and HOMER Pro show that both tools successfully identified the optimal solution. This solution has a difference of 5.4% in a potential excess of electricity, 0.04% in produced energy, and 0.07% in the cost of the energy. Rajbongshi et al. [12] designed a hybrid system based on conventional and renewable energy sources using HOMER software. This system uses PV, diesel generators, converters, batteries, and biomass gasifiers. They calculated the energy-cost generation for different peak loads and energy demand profiles. They analyze the designed system for both off-grid and on-grid. The COE for an off-grid hybrid system at a peak load of 19 kW and energy demand of 178 kWh/day is US$ 0.145/kWh. On the other side, an on-grid hybrid system reduces to US$ 0.91/kWh for the same scenario. Also, they found the grid sale of 23% and grid purchase of 9% of the total energy demand or generation for the above load profile. They used the economic distance limit to compare both types of grid connections.
Wasesa et al. [13] develop the SARIMA and artificial neural networks system to forecast one month and a day electricity consumption of an MG. This MG is constructed for an educational building. They used more than two million records of the electricity consumption data. These data were imported from the SM of 6-floor MG. They used the Hyndman-Khandakar stepwise algorithm for predicting electricity consumption. They compared the values obtained from the artificial neural network and SARIMA and got comparatively good results from the artificial neural network. Tavakoli et al. [14] designed an MG for a commercial building using PVs and wind power. Their paper deals with a two-stage hierarchical control for optimal energy management of the proposed MG. This paper incorporated the uncertainty of electricity prices in a model predictive control-based plan. This is done for the optimization of energy management. SARIMA model is used to forecast the values for wind power, load demand, and electricity prices. Xiao et al. [15] forecast the short-term ultraviolet index using the ARIMA model. This paper Based on the analysis of the cumulative autoregressive moving average model.
The stationarity of the data is compulsory for the time-series analysis. It also estimates the order of ultraviolet index of the and then the ARIMA model of the ultraviolet index was determined. The predict the accuracy of the model it is necessary to determine the RMSE and MAE. Alsharif et al. [16] predict the daily and monthly solar radiation in Seoul. The prediction used the SARIMA model. For the accuracy of the model, autocorrelation function, partial autocorrelation, and standard residuals parameters were tested. The result shows that the ARIMA model can be used to represent the daily solar radiation while the SARIMA model can be used to predict the monthly solar radiation. Seoul’s expected average monthly solar radiation ranges from 176 to 377 Wh/ m2. Saiful et al. [17] focused on developing an MG system and predicting the behavior of the MG, ARIMA, and artificial neural network. These methods allow optimizing the operation modes of the MG system. This paper also uses MATLAB Simulink to analyze its various problems at different operating operation modes. For this purpose, it assumes that the PV generator is coupled with the utility grid as a power source. The result shows a balance between power supply and demand at different times. This leads to economic efficiency and feasibility.
The rest of the paper includes five more sections. Section 2 details the MG specifications, characteristics, and behaviors. The MG has achieved enormous advantages and therefore many countries are implementing it. Therefore, the market size of the MG is increasing very rapidly. This section also explains the various reasons for the development of MG structures across the globe. Section 3 describes all the main components used for building the MG system. It also explains the software used for the modeling and simulation of the proposed MG system. All the main components of the MG system are explained with the specifications. Section 4 briefly explains the time series analysis process. Section 5 shows various results of different parameters obtained after the simulation of the base MG system This section explains the proposed solution of the base MG system in the HGS. This also explains the SARIMA model of prediction for the optimized system. Finally, section 6 concludes the paper and briefly explains the future work which can be done in this field.
Microgrid Behavior and specifications
A Microgrid system includes multiple loads and distributed energy resources. It can be operated parallelly with the wide utility grid or small, independent power system. It increases reliability with the distributed generation, easier integration of alternative energy sources, and increases efficiency with reduced transmission length [18]. On the other side, the SG is a modernized electrical grid that uses information and communications technology to gather information and act correspondingly. This helps to get a much more clear idea about the behaviors of consumers and suppliers. This helps to improve the efficiency, economics, sustainability of the production, distribution, and reliability of electricity. MGs are especially affecting the local economic activities. It is a self-sufficient energy system that serves discrete geographic footprints, like university campuses, hospitals complexes, industrial areas. There is more than one kind of distributed energy, such as photo-voltaic panels, wind turbines, generators, combined heat, and power in MGs. In addition, many new MGs contain energy storage systems, like batteries which further work as electric vehicle charging stations. The MGs are interconnected to the nearby building which provides electricity and heat or cooling for its consumers, delivered through control systems and sophisticated software.
Characteristics of microgrids
The three main characteristics to define microgrids are:
a. Local: The MG creates energy for nearby customers. It helps to overcome the transmission losses.
b. Independent: The MG can disconnect from the central grid and operate independently. It allows the system to supply power to its customers when some natural calamity occurs, for example, the Northeast Blackout of 2003, in which a single tree falls on a power line and knocks out power in several states of the USA and Canada. The MG escapes such cascading grid failures.
c. Intelligence: MG intelligence emanates from the MG controller which is the central brain of the system. It manages the generators, nearby buildings, and batteries with a high degree of sophistication [19]. To meet the energy goals established by MG’s customers’ controllers orchestrate multiple resources. These days customers have many objectives, like lowest prices, greatest electric reliability, cleanest energy, or some other outcome. The controllers help to achieve these goals by decreasing or increasing any MG’s resource usage.
The controller and software-based system can manage energy supply in many ways. The real-time changes in the power prices on the central grid can be tracked using an advanced controller as the wholesale electricity prices fluctuate depending upon electricity demand and supply. Sometimes, the energy prices might be expensive at any point then the MG can choose to buy power from the central grids to serve its consumers. The MG’s solar panels charge its battery system and discharge its battery rather than using grid power when it becomes expensive. MGs contain many other energy resources, like wind power, reciprocating engine generators, fuel cells, and combined heat and power, which add greater nuance and complexity to the existing permutations [20].
Development of microgrids
Sometimes people use the term microgrid to describe an ordinary distribution system, like rooftop solar panels. The key difference is that a MG will always keep the power flowing even if the central grid fails, on the other hand, a solar panel will not [21]. Many homeowners having solar panels are surprised of losing power during a grid outage. Also, simple backup generators are not MG, these are only employed for emergency purposes. MGs operated 24*7*365 supplying and managing energy to its customers. The MG market is segmented by
a. Application: Institutional sites, commercial facilities, remote off-grid communities
b. Type: Customer MG, remote power systems, and other types
c. Geography: North America, Europe, Asia-Pacific, South America, the Middle East, and Africa
d. Other application: Utility/grid-connected communities, military, etc.
In 2019, the MG market was valued at USD 8.29 billion. It is estimated to reach USD 25.45 billion by 2026 at a CGPR of 21.5 percent during 2021-2026. The COVID-19 pandemic has a significant effect on the global MG market. Globally, this pandemic has delayed the commissioning of under construction and planned projects because of economic slowdown. In the first half of 2020, the USA recorded the lowest number of MG installations in four years, i.e. 2015-2019. An almost similar trend was registered in India. After 2021, the market is likely to grow for the forecast period. Increasing deployment of renewable energy sources in MG acts as a driver for the market while the long payback period and high upfront of renewable energy sources act as a major barrier. Each day the power demand is increasing and therefore the MG establishments in remote off grid areas are expected to dominate the power market. The MG is evolving a lot as a service model as it provides a wide variety of third-party ownership schemes. These schemes include pay as you go, lease, Power Purchase Agreements, and other types of financial agreements. This enables the usage of MGs without any upfront investment. This helps in providing huge market opportunities for MGs. North America (especially countries like the United States, Canada, etc) is expected to be the largest market during the forecast period.
Remote Off-grid communities’ segment to dominate the market
The growing power demand in remote areas results in gaining the importance of the off-grid MG systems. Moreover, the remote communities proliferate during 2021-2026 due to increasing power consumption by the remote areas, like hilly regions, islands, far remote areas, deserts, etc. Several developing and under-developed countries are adopting MG technology to provide electricity in the remote locations of their countries. The Myanmar government approved the MG projects for Kha Lang village in 2019, developed by InfraCo Asia and Electricite de France. In the same year, Maharashtra Energy Development Agency issued a tender worth USD 84137.96 for a 29.4 KW MG project in Maharashtra. It provides electricity to more than three villages. There are over 300 remote off-grid communities in Canada. The MG design and operation is a critical topic with social and economic implications. In 2018, Canada issued a three-years tender for microgrid projects to a multidisciplinary team at Alberta led by government and industrial support. This team addresses issues like microgrid operation, reliability, stability, and the study of social and economic aspects. It provides ample opportunity for the global MG market in the future. In 2019, Tata Power Delhi Distribution Limited inaugurated a project at Behlolpur, Bihar. This provides a quality and reliable power supply to more than 1200 persons living in 220 houses. In the same year, Tata power signed a contract with the government of Bihar and install 16 MG projects in the area near Nepal. The factors, like private investment, upcoming projects, and government initiatives drive the global MG market during the forecast period.
North America microgrid’s market
North America is the leading market for MG systems and will be dominating in the future as it has several upcoming projects. I
Puerto Rico, the Environmental Defense Fund aims to alimentary collaborate on low carbon MG projects in rural communities. The governments in North America are taking many initiatives to attract private companies’ investors in the market. Nowadays, the grids are more dependent on data-sharing and computers, also they are more responsive to changes in the power demand, due to the automation techniques throughout the system. On the other hand, high dependency on automation and its complex nature make the national grid more vulnerable to cyber-attacks. For example, in 2015 and 2016, Ukraine has witnessed a cyber-attack in the power grid system. Therefore, the authorities are more concerned about the vulnerability of the national grid system. The renovation of TPG requires large investments, and therefore, the vulnerability of the national grid to cyber-attacks is the main concern. This is one of the main reasons why MGs are the preferred choice for economic reliability and viability. In 2020, Siemens (USA) launched an MG research and demonstration environment in Princeton. It is expected to validate and investigate in a real environment. This results in a clear blueprint for a more efficient and flexible MG system. Canada is committed to building a clean energy future for its strong national grid network using the MG systems which will strengthen its economy and support the natural resource sectors. Mexico is testing a few pilot projects of the MG system, like, the DC modular MG systems focused on behind-the-meter applications. These projects are expected to create a huge opportunity for the market.
Micro grid’s rise in developing countries
The population settlement pattern is the most underlying factor for the need for microgrids in most developing countries. The rural centers and villages are far away from the main grid. If any government endeavors to extend the electricity network to remote locations, then it will be time-consuming and capital intensive. In compliance with the Paris agreement and other sustainable climate pacts, the developing countries promote clean energy policies by using MG systems. According to the International Energy Agency statistics, about 80 million people will have direct access to electricity through MG by 2040. Also, according to the Navigant research report, there were 4,475 MG projects all across the world by the mid of 2019. This sums up to 27GW of the total installed capacity. North America and Asia- Pacific regions are developing the MG at the highest capacity. However, sub-Saharan Africa and Southeast Asia regions are also developing their MG capacity at an impressive rate. Indonesia has 34 provinces with 17508 officially listed islands. Half of Indonesia’s population lives in rural areas. Before 2019, only 66 percent of Indonesia was electrified which gain up to 88 percent by starting of 2021. This is made possible because of several government initiatives like Bright Indonesia, which was aimed to provide 1 GW of electricity to over 12000 villages. In the sub-Saharan region of Africa, the USA government has initiated a project named ‘Beyond the grid’. This will make 30,000 MW of new and clean electricity.
It will be available for 60 million African households in rural and remote areas by 2030. This project has 40 partners from all across the world, committed to investing more than I billion USD in that region on MG projects. As per the latest report, this program is generating 3,481 MW of power for 14.8 million houses with the help of 56 power projects. This is further creating a huge market for the future as well. In 2015, the Rockefeller Foundation launched a program to provide renewable MG systems to approximately 25 million users across six Indian states. This project will invest 20 million USD in five years. Four Indian states out of 29 states and 7 union territories, i.e., Bihar, Uttar Pradesh, Rajasthan, and Odisha have 160 MG systems, out of which 80 percent is solar-powered, and their power capacity ranges from 10 kW to 70 kW. Until January 2021, over 70,000 people in Indian remote areas have access to sustainable electricity.
Components of Proposed Microgrid System Homer Grid Simulation Software
The HOMER is software that helps to create an optimized solution for a hybrid power system from the distributed generation and utility-scale to standalone microgrids [22]. It provides the most accurate, flexible, and robust techno-economic solution. It is available in three versions (i.e., HOMER Pro, HOMER Grids, and HOMER Front) and used by more than 250,000 systems designers and developers in 190 countries. In this paper, the MG system is modeled using HGS tools. HOMER grid navigates to invest in distributed, grid connected, and behind-the-meter technologies to lower the cost of electricity by demand charge reduction and energy arbitrage. It helps to create a traffic structure based on the user’s demand [23]. It helps to simplify evaluation design tasks for grid-connected power systems. Its sensitivity analysis algorithms and optimization techniques help to optimize many factors like component’s efficiency, complex traffic structures, availability of energy resources, variation in costs, etc to evaluate the many possible system configurations. It simulates the energy system, shows an optimized system, and provides a sensitivity analysis [24].
The proposed MG system is modeled in the trial version of the HG. This system consists of PV modules, generator, battery, convertors, maximum power point tracking, and solar charge controller. The proposed MG is at a location 25°56.3N, 83°44.32W, which is a small hotel and a small touristic place in India. It covers 43200 square feet and has 4 floors. July is taken as a peak month for an appropriate evaluation. The main components of the proposed system are discussed. Figure 1 shows the base microgrid connection in the HGS. This is further optimized by the software to give the best solution for the optimum use of energy. Figure 2 shows the actual structure of the proposed MG system. The electric vehicles can be charged through the ac bus bar at any convenient location.


PV module
It is a generic PV system of Schneider electric’s grid following a central inverter. A 680 KW PV module is installed to the DC bus bar of the MG with a derating factor of 96 percent. The lifespan is around 25 years. The efficiency, operating temperature, maximum power point tracking voltage range, and dedicated converter efficiency are 17.3 percent, 45°C, 550-800V, and 99 percent, respectively. It has a user-defined capital-based incentive and marginal tax percent of 21 percent. It has a maximum input current of 1280 Ampere. The maximum output current, output voltage, and output power are 1040 A,380V, 680 kW, respectively. The power consumption at night is less than 210 watts. The weight of the PV module is 1588.934 Kg. Figure 3 shows the heat map graph. The heat map graph shows the energy consumption pattern. The crest factor for this heat map is 1.86.

Battery
The Generic 1MWh lithium-ion idealized battery is used in the proposed MG system. The nominal voltage of the battery is 600V. It is an idealized storage model that replicates a simple storage model and assumes a flat discharge curve. This is because the supply voltage stays mostly constant during the discharge cycle. The maximum discharge power, maximum charge current, maximum discharge current, and nominal capacity of the used battery are 300 kW, 1.67E+0.3, 5E+0.3, and 1E+03, respectively. The lifetime of it is 15 years. The HOMER software helps to clarify that the lifetime throughput does not depend on the depth of discharge.
Generator
The rated voltage of the installed generator in the MG system is 380 to 415V. The engine model is Cat® C3.3, In-line 3, 4-cycle diesel. The power rating is 50kVA and the speed is 1500 rpm with an operating frequency of 50Hz. It has a 105 mm bore and 127 mm strokes. The generator’s compression ratio is 17.25:1 and has a mechanical governor. The maximum dry weight of the generator is 1031kg.
Electric load
The proposed MG system is consisting of an electric load. Any MG system or electrical system requires an electric load to meet the power system work. HGS consigns the power-producing components of the system in each time step to serve the load. This software simulates any load in several ways. It can model stand-alone systems for resiliency and outages that occur throughout the year. It allows the user to add a non-critical load in any outage events. It will serve both electrical and non-critical loads during normal operation. However, a non-critical load will not be served during a utility outage, otherwise treated identically. The HGS provides a climate zone map that is found by International Energy Conservation Code in 2012. It is funded by the United States of America’s “Department of Energy-Efficiency and Renewable Energy”. India’s counties have five different climate sectors as per the Energy Conservation Building Code. These are composite, hot and dry, warm and humid, moderate, and cold.
The other classification system for load available in the HGS tool is the Koeppen-Geiger climate classification system. It matches the project model location with the available data in the OpenEI database. This provides the load profile of the same climate class. The Koeppen-Geiger climate variables are calculated at each station and interpolated between stations. This is done using a twodimensional, i.e., latitude and longitude, thin-plate spline with tension onto a 0.1°×0.1° grid for each continent [25]. The small hotel and residential area model is 43200 square feet. July is considered the peak month. The random variability of the day-to-day load is 4.647. The time-steps for the load are 5.819 percent. Table 1 shows the load metrics of the proposed MG. It shows the baseline and scaled values of some metrics like average power consumption per day (kWh/day), an average of the overall power consumption (kW), peak power consumption (kW), and the load factor. Figure 4 shows the load profile of the base microgrid system. It can be seen that in July the load is maximum. In February and March, the load is comparatively lower than in the other months.


Time series analysis
In the time series analysis, there is only one variable i.e., time. The time series analysis is important to make future estimations and also to know about the stability of the designed system. A time series is fundamentally a set of observations taken at a specified time and usually at equal intervals. The time series can be created at equal intervals only. It can be used for any business forecasting, understanding the past behavior, planning the future, and evaluating the current accomplishments [26]. The components of time series are the trend, seasonality, irregularity associated with them, and cyclic patterns. However, the cyclic pattern is not necessary. The trend is nothing but the movement of relatively higher or lower values over a long period of time. So, when a time series analysis shows a general pattern that is up, it is called an ‘uptrend’ and if the trend exhibits the lower pattern, it is called a ‘stay-steady trend’. Irregularity is noise in the system. They are erratic or unsystematic and known as residual. It happens for a very short duration and is non-repeating. The cyclic pattern is basically repeating up and down movements [27]. The time-series analysis can’t be used when the values are constant or in the form of functions. The time series has a particular behavior over time, there is a very high probability that it will follow the same in the future. The stationary series is preferred over the nonstationary series as the theories and formulas that are related to stationary series are more mature and easier to implement.
There are two major reasons behind the non-stationary of a time series. First is ‘Train’, which is basically the wearing mean over time. Secondly ‘seasonality’ is the variation of a specific time frame. Therefore, stationarity should have a constant mean according to time and constant variance at a different time interval, and auto-covariance independent of time. The electrical power system is exposed to the environment therefore many losses occur during the transmission of power. The technical losses in the power system are due to the energy dissipated in the conductor, equipment used for the transmission line, transformer, sub-transmission line & distribution line, and magnetic losses in transformers. The technical losses are about 22.5%. These losses directly depend on the operation mode and network characteristics. The major losses in a power system are in primary and secondary distribution lines. However, the transmission and sub-transmission lines account for 30% of the total losses. Apart from this, there are fixed losses as well in the power system. The TSA plays an important role in the MG modeling. It allows recognizing which factors influence certain variables from time to time. The TSP graphs several model variables throughout the simulation. The scale of detail in a set of data is defined by the time-step of the model. The hourly TSP helps to visualize the generation from each component and how it serves the load, the number of important operational characteristics from each component, resources that power the components for the year of user’s simulation. Two different TSP can be viewed in the HGS for resilience a) one year during which a resilience event occurs, b) one year of normal with no outage operation. The Scatter plot graph allows users to plot any variable against any other variable. It helps to understand the system’s operation. The Delta plot shows the change in any variable over some time length. By using preselected data series the ‘pre-set” creates a graph in the time series.
This saves the selection of data series and their order. The data series should be displayed in the lower or upper plot and the color of the data series to the plot. This makes it easier to view the same plot format in different files. It quickly adds plots to the simulation report. After this, it is available across all simulations, models, and HGrid files. Creating of the ‘preset’ is completed in four steps, a) pick the simulation to open the time series viewer, b) selection of blank from the pre-set drop down to start with the blank plot, c) selection of variables from upper and lower plot, and d) save the pre-set. The HGS consolidates all the annual consumption prices on grid purchases and net purchase and import which is called total consumption rate. It is a ratio of the total monthly consumption cost (in USD) to the total monthly grid purchases (kWh). The Grid Sellback rate defines the consumption prices for the year on the grid sales and net excess and export. It can be calculated by dividing the total monthly consumption cost (USD) by the total monthly grid sales (kWh). In HGS, the time series plot can graph several model variables over the duration of the simulation. The granularity is defined by the time-step of the proposed model. The hourly tab in the simulation result describes how the MG serves the load. The monthly tab is represented by a blue box-and-whisker plot that shows the monthly values of the selected parameters. The overall maximum value is represented by the top line whereas the bottom line corresponds to the overall minimum value. The profile tab shows the hourly performance for an average day of each month for the selected parameters. The DMap tab is a concise way to visualize an entire year of data. In this, the x-axis represents the day of the year whereas the y-axis represents the hours of the day. The DMap shows the corresponding color from the legend on the right for each time step. The histogram tab groups the values from the selected parameter into bins based on their values. This can show the user how often the parameter’s value falls within each bin. The cumulative distribution function tab in the time series simulation result of the HGS is the integral of a histogram function. It is the probability that the selected parameters will have a value less than or equal to the value shown on the x-axis. The duration curve tab of the time series plot shows similar data to the cumulative distribution function if axises flip. The duration curve representation is very commonly used in the electric utility industry.
Results HOMER Grid Simulation results of the base system
The HGS simulates the designed base microgrid system (BMGS). The result shows that the average electrical energy consumption of the BMGS is 2053.2kWh/day, 62.5MWh/month, and 794.4MWh/year. The load profile shows that the largest electricity demands occur on 6 July. Figure 5 shows the cost and saving for the BMGS. The HGS helps to outline different options for reducing a site’s electricity bill. It costs and savings for installing different combinations of batteries, generators, and solar panels. It uses powerful optimization techniques to find the system that will maximize the saving of the MG system. A bill from an electric utility comprises of few different types of charges. The energy charges are the monthly quantity of energy in kilowatt-hours. However, the demand charge is the highest peak power in kW or MW drawn in a month. The fixed charge is the same amount of power charged in a month that is not the user’s consumption and peak demand. HGS integrates with the generator utility rate database to ensure the most accurate and possible up-to-date results. It is the only tool that considers generators as a method for peak saving and demand charge reduction. This provides to estimate and ensure accuracy of the simulation result by checking the baseline electricity costs which matches the user’s actual electricity bills. Figure 6 shows the environmental impact of the BMGS. The BMGS has the least environmental impact in March and November. This is because the generator is not used in these months for the functioning of the MG.


HGS simulates the base system electricity bill. In June and July, the electricity usage seems to be at most because of the excessive use of refrigerators, air conditioners, and other cooling devices as of excessive temperature in this month. The increase in consumption is again observed in December and January but not to the extent that was observed in July. During these months, the temperature is very low almost close to zero degrees, therefore, the use of extra heating devices raises the consumption and demand values. The energy charges for the base system are observed maximum in July as shown in Figure 7 & 8. It is the amount of direct energy charges to the consumers for their electricity usage. This is based on the use (kWh) in a particular billing cycle and the rate for that electricity (in cents per kWh). The fixed charge for the system is 75 USD. The fixed charge depends on the connected load that the distribution companies provide the consumer. The connected load is calculated by the sum of wattage of all the electrical appliances at home. The connected load helps to determine if the connection will be a single-phase or three-phase. The energy charges and monthly total charges of the BMGS are shown in Figure 7. These two parameters are having the highest value in July. However, the monthly total charges started decreasing from January till March then again it increases till May. In short, it can be seen that the monthly total charges have a more uneven graph as compared to the energy charges. This is because the energy charges cover the costs of operating and maintaining an energy system. It means it includes the cost of power plants and power lines. On the other hand, monthly total charges include the consumer’s utility cost as well. Therefore, it varies according to the user’s needs.


The demand charge is the additional fees charged to non-residential or commercial customers for maintaining a constant supply of electricity. These fees amount to a substantial sum of money that businesses must pay in monthly electricity bills. It can be as 50% or more of the total electricity bills. These are on-peak demands, semi-peak demand, off-peak demand. If a consumer wants to lower his demand charges, s/he should identify the period when the highest demand occurs and try to soften the load by shifting demand for electricity to other times of the day. The result shows that solar electric power generation is an effective method for achieving this goal. Demand for electricity consumption can be shifted to daytime when solar power is generated. This lowers the usage of electricity from the grid and thereby reduces the demand charges.
Figure 9 shows the graphs between the demand charges peak demand and monthly carbon dioxide emission of the base MG system. All these three factors are having their maximum values in July. The demand charges range between 1386 USD to 1795 USD, peak demand varies from 175 kW to 219 kW, and monthly CO2 emission is lowest with 34 metric tons in February and a maximum of 45 metric tons in July. Peak demand refers to the occasions of day when the electricity consumption is at its highest. Figure 8 shows the average values of all three parameters in each month. Annual peak demand occurs in summer during prolonged heatwaves. Winter peak demand occurs on very cold weekday evenings when people use several heating appliances. It is observed that winter peak demand is slightly lower than summer peak demand but has a significant impact on some areas of the MG network. It is also observed that saving electricity during the peak demand period is very beneficial for the community and the MG system. The simulation shows that supplying electricity for an ever-increasing peak demand requires building more electricity infrastructure. It can consist of generators and high capacity powerlines. In the end, consumers are supposed to pay to build this infrastructure through an increase in the price of power even though much of it goes unused for the remainder of the year.
The energy consumption is maximum in July with 70823 kWh. The demand charges and peak demand is also maximum in July i.e., $1795 and 219kW. Figure 9 shows the load profile for the day on which the largest demand occurs, i.e., on 6 July. The result shows that the demand is high between 8 pm to 9 pm. This might be because during that time most of the users came back home and uses various electrical appliances. Figure 10 shows the energy consumption by the base MG (which is designed in the HGS and taken into consideration before the simulation result). The value of energy consumption is maximum in July because of summer. In summer, the users use many cooling devices like refrigerators, air conditioners, fans, coolers. The geographical condition and the nature of users at the proposed MG suggest that people will use more water in summer. At the location, most of the users are having their motor for pumping out the groundwater. In summer, people need extra water therefore, there is extra consumption of electricity during this period. In December and January, the electricity consumption again starts increasing. This increase in consumption is less in comparison to June and July but more than the rest of the months. This is due to the cold in the winter season the users start using the heating appliances which increases the total consumption.


For the analysis of the purposes, the BMGS should be defined with some system control variables. These are effective on the operating costs and the output of the system. As the system is renewable and used for the comparative analysis with the non-renewable or TPS, economical parameters are considered for the analysis and prediction purposes. After the simulation of the BMGS system designed for analysis purposes, the HGS gives five cost-efficient systems suitable for the MG. These parameters are average annual energy bill saving, capital expenditure, project lifetime saving over 25 years, and annual carbon dioxide emission per year by those systems as shown in Table 2. The annual energy bill saving can be calculated by determining the blended energy costs from energy bills and dividing it by total energy bill cost by total kWh. It is given by cost/kWh. The capital expenditure is the total amount spent on acquiring or maintaining the MG. The project lifetime is the number of years over which the net present cost of the project should be calculated. For the proposed analysis the lifetime saving is considered for 25 years. The HGS assumes that salvage values occur at the end of the project lifetime. In this software, the annual carbon dioxide emission is the annual cost penalty HOMER applies to the system’s emission of carbon dioxide. It is expressed in $/tons.

After analyzing the five systems obtained from the simulation of BMGS in the HGS, system 3 is considered the best out of the other systems. The economical parameters of each system are shown in Table 2. The overall project lifetime saving over 25 years is the maximum for system 3. Figure 11 shows the month-wise hourly plot of peak day PV and grid purchase, system grid purchases compared with BMGS, and battery state of charge versus time of system 3. The plot of peak day PV and grid purchases shows that the time for the PV modules varies from 6:00 AM to 6:00 PM. It means the solar modules will receive some amount of sunlight to be able to capture the solar energy. It can also be seen the maximum PV power output is at noon as the intensity of sunlight is maximum at that time. The grid purchase shows a flat curve for January, April, July, August, and December. The grid purchase capacity is the maximum electrical power drawn from the grid at any time. This is a decision variable because of the effect of the changes in demand. The HGS calculates the demand charges at the end of each annual simulation. If the demand rate is zero, the user of HGS needs to specify a single value for the maximum grid demand. If the demand rate is not zero, specify a value equal or to greater than the peak load and at least one value smaller than the peak load. The system grid purchase follows the same pattern as grid purchase.
However, the baseline grid purchase varies significantly with the system grid purchase. The battery state of charge is the electric battery charge level relative to its capacity. The unit of battery state of charges is percentage points. If it is ‘0%’ it means the battery is empty and if it is ‘100% ‘then it means the battery is full. The ‘depth of discharge’ is an alternative form to measure the same that is the inverse of ‘state of charge’ (100% = empty and 0% = full). The battery state of charge is generally used to discuss the current state of a battery is in use whereas the depth of discharge is mostly discussed the lifetime of the battery after the repeated use. The battery state of charge is an equivalent of a fuel gauge in a battery electric vehicle, plugin hybrid electric vehicle, or hybrid vehicle. Figure 12 shows that the battery state of charge varies with the time in each month. It shows that between 3 AM to 6 AM is gaining the peak values every month. It means that the battery is getting fully charged during this period. It is an obvious and valid result as most of the users put their vehicles for charging at night. The battery is most probably plugged, let’s say around 10 PM then it will gain the charge saturation stage after 4 or 5 hours depending on the level of discharge. It can also be seen that in December and April, the battery state of charge is very low as compared to other months. This means the use of vehicles is for maximum hours during these months. In the month of February and October, there is very little variation in the battery state of charge. According to the graph, the battery is almost fully charged which means the use of the battery is very less in these months.


Using ARIMA model
As a preprocessing step in ARIMA time series must be stationary and to check the stationarity of a time series two types of tests are performed, rolling statistics and ADF tests. In rolling statistics, the users can plot the moving average or moving variance. It is more of a visual technique. ADF test is a common statistical test used to check the stationary of a time series. The ARIMA is a statistical analysis model. It uses time-series data to predict the future and better understands the data. It is widely used in technical analysis to forecast future stock prices. It is a form of regression analysis that presumes the strength of one dependent variable relative to other independent variables. The major components of this model are a) Autoregression (AR): This refers to the order of changing variable which regresses on its values, lagged, and prior, b) Integrated(I): This refers to the differencing order of raw observations. It allows for the time series to become stationary, and c) Moving average (MA): This assimilates the order of the dependency between an observation and a residual error from a moving average model applied to lagged observations. The parameters of this model are the lag order, the degree of difference, and the order of the moving average. ARIMA forecasting can be achieved by plugging in time-series data for useful variables. The statistical model identifies the appropriate number of lags or order of difference. This is then applied to the data and checked for stationarity before feeding to the model. Finally, it will give an output that is often interpreted similarly to that of a multiple linear regression model. The ADF belongs to the unit root test (URT). The unit root makes the time-series non-stationary.

Where Yt stands for Value of time series at the time ‘t’, Xe denotes exogenous variable. A unit root exists in a test series when the alpha is equal to 1. The number of unit roots contained in the time series correlates to the number of differencing operations required to make the series stationary. A Dickey-Fuller test is a kind of URT that tests the null hypothesis.

Here, Yt-1 equals to lag 1 of time series, 1 t Y − Δ denotes first difference of the series at the time(t-1). If the coefficient of 1 t Y − is not 1 then it is taken to be non-stationary. The ADF test is an augmented version of Dickey Fuller. The ADCF equation can be represented as:

After a time, series has been stationaries by differencing, the next step in fitting an ARIMA model is to determine whether AR or MA terms are needed to correct any autocorrelation that remains in the differenced series. Of course, with software like Stat graphics, you could just try some different combinations of terms and see what works best. But there is a more systematic and valid way to do this by looking at the autocorrelation function (ACF) used to find MA order and PACF used for finding the order of AR plots of the differenced series, you can tentatively identify the order of AR and/or MA terms that are needed. In ACF P is periods to lag. For example, if P is equal to 3 then it will use the three previous periods series in the autoregressive portion of the calculation. P helps adjust the line that is being fitted to forecast the series. The value of P corresponds with the MA parameter. The PACF, D refers to the number of differencing transformations required by the time series to get stationary. The correlation plot helps to find the order of AR and MA in the data set. Figure 12 shows the ACF and PACF variations for the used data set. In the Python programming language, the ‘auto_arima’ function is implemented to automatically find the optimal parameters for an ARIMA model. This function automatically determines the parameters p,d, and q of the ARIMA model. This is very convenient as the data preparation and parameter tuning processes end up being very time-consuming. The ARIMA model is considered to be a widely used statistical method for time series forecasting. The final step in the ARIMA model before forecasting is the selection of optimum. The criteria commonly used to estimate the goodness of fit are the Akaike information criterion, corrected Akaike information criterion, Bayesian information criterion, and Residual sums of squares. The mathematical representation of these factors are explained as:
Akaike information criterion: = -2log (maximum likelihood) + 2k, (4)

In equations 4, 5, 6, k is an independently adjusted number of parameters and n is the total number of data points. The users always prefer a model which minimizes all the above criteria. For the proposed work, the Akaike information criterion and residual sums of squares are used for the optimum model selection.
Figure 12 states the values of autocorrelation give the value of ‘p means AR’ and partial autocorrelation gives the value of ‘q means MA’. Any value outside the confidence level can be selected as an order value of ‘p’ and ‘q’. The six steps are followed to analyze the ARIMA model. In step 1 we check the stationarity of the data. For the stationary, the value of ‘p’ in ADF should be less than 0.05. In step 2 we differentiate the data. If the time series is not stationary, it needs to be stationaries through differencing. We take the first difference then check for stationarity visually if the time series is still not stationary and its mean fluctuates then go for another difference. In step 3 we filter out a validation sample. This will be used to validate the accuracy of our model. In step 4 we select AR and MA terms: This uses the ACF and PACF to decide whether to include an AR term, MA terms, or both. In step 5 we build the model and set the number of periods to N to forecast. Step 6 is used to validate the model. It compares the predicted values to the actuals in the validation sample.
Time series decomposition is a combination of trend, level, seasonality, and noise components. These components are defined as follows:
a. Level: it helps to find the average value in the series.
b. Trend: this filtered out the increasing and decreasing value in the series.
c. seasonality: this shows the repeating short-term cycle in the series.
d. Noise: this is a random variable in the series.
Generally, this is done for a better understanding of the problems during time series analysis and forecasting. All series have a level and noise. The seasonality and trend components are optional.
Additive: y(t) = Level + Trend + Seasonality + Noise
Multiplicative: y(t) = Level×Trend×Seasonality×Noise
The data set used for the analysis purpose has a seasonal repetition so seasonal ARIMA is used for prediction. Seasonal ARIMA has similar three components as ARIMA have P, D, and Q but this time for the season. A special type of SARIMA model called SARIMAX is used from the ‘stats models’ library in python 3.8 for prediction. SARIMAX takes care of seasonal trends, repetition, and finding a pattern in seasonal data. Figure 13 shows the ‘auto_ arima’ function from the pdARIMA library used to find the best-fit combination of p, d, q(for ARIMA) and P, D, Q (for SARIMA) values in python 3.8.

Therefore, for the analysis of the available data set decomposed into trend, season, and residuals separately. SARIMA is an extension of ARIMA. This supports the direct modeling of the seasonal components of the time series. The ARIMA model is a forecasting method for univariate time series data. This supports both autoregressive and moving average elements of the data set. The integrated element of the ARIMA refers to differentiation. This allows the method to support time-series data with a trend. The major drawback of ARIMA is that it doesn’t support seasonal data. The seasonality in the data set means the repetition cycle during a particular time. It supports univariate time series data with a seasonal component. The seasonal part of the model consists of terms very similar to the non-seasonal components of the model. However, it involves backshifts of the seasonal period. SARIMA configuration requires hyperparameters selection for both the trend and seasonal elements of the series. Three trend elements require configuration that is like the ARIMA model, i.e., ‘p’: trend autoregression order, ‘d’: trend difference order, ‘q’: trend moving average order. There are four seasonal elements. These are not part of ARIMA that must be configured i.e. (P: seasonal autoregressive order, D: seasonal difference order, Q: seasonal moving average order, and m: the number of time steps for a single seasonal period).
Many parameters and combinations can be used to analyze data using SARIMA in python 3.8 programs are written to analyze the data and the result. The SARIMAX prediction results show all the four parameters, i.e., grid purchase, AC primary load, AC required operating capacity, AC operating capacity. These four parameters are considered for the forecasting of the proposed MG. The HGS models the grid as a component from which the MG purchase ac electricity and to which the MG can it. Figure 14 shows the prediction for system 3 using SARIMAX that is considered the best system for the proposed MG system. The prediction starts from January 2021 till December 2022, i.e., for two years. The model was evaluated before prediction over the test dataset with root mean squared error which shows the model performing quite well. The RMSE is the standard deviation of the prediction errors. The prediction errors are a measure of how far the data points are from the regression line. It measures the extent to which the prediction errors values are spread out. In other words, it tells how concentrated the data is around the best suitable line. It is used in forecasting, regression analysis, climatology to verify the experimental results.


Equation 7 is the mathematical formula used to find out the RMSE. In this, N= number of non-missing data points, Yi= actual observations time series, ŷi = estimated time series, and i = variable. In python, it can be calculated using the function of the Numpy module. Firstly, the difference between the estimated and the actual value is calculated using ‘numpy.subtract()’. Further, ‘numpy.square()’ function is used to calculate the square above the result. ‘numpy.mean()’ function is used to calculate the mean of the squared value. This step gives the mean square error value. In the end, ‘math.sqrt()’ function is used to calculate the square root of the mean square error value. The RMSE is very efficient for the mean performance of forecasting technologies. This technique might be difficult to interpret for an MG system design when a worst-case scenario has to be taken into consideration.
Grid Purchase
The grid purchase can comprise an energy charge based on the amount of energy purchased in a billing period and a demand charge based on the peak demand within the billing period. The HGS uses the term grid power price for the price in dollars per kilowatts. These are the electric utility charges that are purchased from the grid. The demand rate for the price is in dollars per kilowatt per month that the utility charges for the peak grid demand. The result shows that the grid purchase power price varies from hour to hour as the applicable rate changes as shown in Figure 14. The marginal cost of energy of the proposed grid can also change from hour to hour. It has very important effects on the HGS’s simulation of the system’s behavior. The blue line in Figure 14 shows the grid purchase as predicted by the HGS simulation and the following dotted line shows the forecast using the SARIMA model. The result shows the grid purchase value is having a constant variation each month. This means that the amount of energy purchased in the billing period is having constant variation every month. It means the proposed MG can maintain the required energy requirement with any extra need from any external grid system. Figure 15 model evaluation of the simulated system of the proposed MG. The top-left graph shows that the residual errors seem to fluctuate around a mean of zero and have a uniform variance between -3 and 3. The top right shows that the density plot suggests normal distribution with a mean zero. The bottom left shows that most of the blue dots are over the red line, so it seems that the distribution is very low skewed. The bottom right shows that the correlogram and the ACF plot show the residual errors are not autocorrelated. The total annual energy charge can be calculated by using the given equation


In equation 8, Egridpurchase,i,j is the amount of energy purchased from the grid in month j during the time that rate ‘i’ applies [kWh], Cpower,i denotes the grid power price for rate ‘i’ [$/kWh], Egridsales,i,j represents the amount of energy sold to the grid in month j during the time that rate ‘i’ applies [kWh], and Csellback,i is equivalent to the sellback rate for rate ‘i’ [$/kWh].
AC Primary Load
The AC primary load is the total amount of energy that went towards serving the AC primary loads during a year. The black color graph in Figure 14 shows the original AC primary load of system 3 of the BMGS. The following dotted line shows the SARIMA prediction. The SARIMA prediction result shows that the main load subjected to the proposed grid is a constant increase each month. This suggests that the number of appliances used by the users is increasing each month which suggests that the total amount of energy that went to serve the AC primary loads is significantly increasing. Figure 16 shows the model evaluation for the AC primary load of the simulated system. The top left shows that the residual errors seem to fluctuate around a mean of zero and have a uniform variance between -3.8 and 3.8. The top right shows that the density plot suggests normal distribution with a mean zero. The bottom left shows that most of the blue dots are over the red line, so it seems that the distribution is very low skewed. The bottom right graph shows that the correlogram. The ACF plot shows the residual errors are not autocorrelated.
AC required operating capacity
In Figure 14, the green color graph shows the AC required operating capacity of the simulated system, and the following dotted line graph is its prediction using the SARIMA model. The SARIMA prediction result shows that the proposed grid has a constant variation throughout the two years. This calculates the required operating capacity each time step. It can be done by adding the required operating reserves to the electric load. When simulating the operation of the power system. The HGS attempts to keep the operating capacity. This can be equal to or greater than the required operating capacity. The HGS records any shortfall as a capacity shortage.


Figure 17 shows the model evaluation for the AC required operating capacity of the simulated system. In the figure, the top-left graph shows the residual errors seem to fluctuate around a mean of zero and have a uniform variance between -2.5 and 3). The top right graph shows the density plot suggesting normal distribution with mean zero. The bottom left graph shows most of the blue dots are over the red line, so it seems that the distribution is very low skewed. The bottom right graph shows the Correlogram that shows the residual errors are not autocorrelated.
AC Operating Capacity
Figure 14 has a red graph that shows the AC operating capacity, and the following dotted graph shows the SARIMA prediction model. The AC operating capacity is the total amount of electrical generation capacity. This generated electricity is either operating or ready to produce electricity. Therefore, this is the maximum amount of electric load that the system could serve at a moment. This should be greater than the electric load to ensure the reliable supply and the difference between them is known as operating reserve. Figure 18 shows the standard residual from -2.5 to 3. It also shows most of the data varies at the mean value which is considered the best prediction model. The histogram plus estimated density shows that the normal distribution has the maximum value at zero. The normal Q-Q graph shows that most of the blue dots are over the red line which ranges from -3 to 3. On the other hand, the correlogram graph suggests that residual errors are not autocorrelated during the prediction.
Data and code availability statement
All the machine learning algorithms were created using Python 3.8.8. The codes for the execution of the constructed model and feature engineering are available at https://github.com/ shoaib- intro/grid_data_analysis_AIML. The prediction model was constructed using SARIMAX. original data used for the model is also available as supplemental information. The HOMER grid data is used for the SARIMAX prediction. Time series analysis is done in the HOMER Grid software which is analyzed.

Conclusion and Future work
This paper presents a time-series analysis of a newly constructed microgrid system and its prediction for two years using SARIMA predictive model. Different system configurations of hybrid PV, battery, and generator units were analyzed in the HOMER grid software by simulating a dynamic hybrid model. These configurations were assessed through sensitivity analysis. The sensitivity analysis was done using parameters like solar radiation, battery performance, system sizing, and generators output. An optimal solution was proposed based on cost analysis. The paper mainly discusses the time series analysis of the proposed microgrid system using the HOMER grid software. This software simulates the base microgrid system and provides the best system. The result obtained from the cost analysis revealed that the combination of Schneider ConextCoreXC 680kW with Generic PV and Generic 1MWh Li-Ion was an optimized solution for the proposed system. The price of Schneider ConextCoreXC 680kW with Generic PV is $6.00/watt, installation size is 3.41kW, the total installed cost is $20,444, and annual expenses is $307/ year. The total installed cost for Generic 1MWh Li-Ion is $70,000 and annual expenses are $1000/year. The average annual energy bill saving is $17,774.69 and the project lifetime saving over 25 years is $444,367. The estimated payback period for this system is 10 years. This hybrid system provides electricity to the consumers at a low cost of 4.98INR/kWh and saves around 2.09INR/kWh. This hybrid renewable system is generating about 749.4 MWh/ Year with excess electricity generation of 3,574kWh/year making the studies are independent of the grid. The SRIMA model is used to predict the overall cost variation for two years. The predictive model is found to be very appropriate. The prediction is made without varying any parameters and the electrical losses were neglected. The various graphs are shown which justify the new model.
The proposed microgrid system is a more effective and reliable source of energy. The government of India can play a significant role to overcome the energy crisis by facilitating such areas with the proposed system. The government of India can use such a microgrid system to overcome the energy crisis that occurs due to the lack of coal, as in September 2021. Moreover, the current supporting legislation includes only tax reduction or exemption which is not sufficient to attract the consumers having low income to employ such systems. The government should change its policy because of the several advantages of such systems and provide incentives for the system’s employment for further electrification in the country. Based on the two years predictive model, it can be concluded that the hybrid system proposed in this study can be employed in the remote, village, or small-town areas to make them independent of grids and to reduce the dependency on coal for electricity production in India. In the future, the same microgrid system can be analyzed with different loss factors in the system and the time series prediction can be done using a long short-term memory model. This model extends the memory of recurrent neural networks. This model will mitigate the vanishing gradients and help to find better predictive analysis.
References
- Oliver RL (2014) Satisfaction: A behavioral perspective on the consumer: A behavioral perspective on the consumer. Routledge, pp. 544.
- Wang W, Xu Y, Khanna M (2011) A survey on the communication architectures in smart grid. Computer networks 55(15): 3604-3629.
- Hancke GP, Hancke GP (2013) The role of advanced sensing in smart cities. Sensors 13(1): 393-425.
- Cook M (2021) Trends in global energy supply and demand. In Developments in Petroleum Science 71: 15-42.
- Liu Z, Ciais P, Deng Z, Lei R, Davis SJ, et al. (2020) Near-real-time monitoring of global CO2 emissions reveals the effects of the COVID-19 pandemic. Nature communications 11(1): 5172.
- Hoang, AT, Nižetić S, Olcer AI, Ong HC, Chen WH, et al. (2021) Impacts of COVID-19 pandemic on the global energy system and the shift progress to renewable energy: Opportunities, challenges, and policy implications. Energy Policy 154: 112322.
- Ćetković S, Buzogány A (2016) Varieties of capitalism and clean energy transitions in the European Union: When renewable energy hits different economic logics. Climate Policy 16(5): 642657.
- Shahzad MK, Zahid A, Rashid T, Rehan MA, Ali M, et al. (2017) Techno-economic feasibility analysis of a solar-biomass off grid system for the electrification of remote rural areas in Pakistan using HOMER software. Renewable energy 106: 264-273.
- Mamaghani AH, Escandon SAA, Najafi B, Shirazi A, Rinaldi F (2016) Techno-economic feasibility of photovoltaic, wind, diesel and hybrid electrification systems for off-grid rural electrification in Colombia. Renewable Energy 97: 293-305.
- Halabi LM, Mekhilef S, Olatomiwa L, Hazelton J (2017) Performance analysis of hybrid PV/diesel/battery system using HOMER: A case study Sabah, Malaysia. Energy conversion and management 144: 322-339.
- Zahboune H, Zouggar S, Krajacic G, Varbanov PS, Elhafyani M, et al. (2016) Optimal hybrid renewable energy design in autonomous system using Modified Electric System Cascade Analysis and Homer software. Energy conversion and management 126: 909-922.
- Wasesa M, Tiara AR, Afrianto MA, Ramadhan FI, Haq IN, et al. (2020) SARIMA and Artificial Neural Network Models for Forecasting Electricity Consumption of a Microgrid Based Educational Building. In 2020 IEEE International Conference on Industrial Engineering and Engineering Management (IEEM), pp. 210-214.
- Tavakoli M, Shokridehaki F, Marzband M, Godina R, Pouresmaeil E (2018) A two stage hierarchical control approach for the optimal energy management in commercial building microgrids based on local wind power and PEVs. Sustainable Cities and Society 41: 332-340.
- Xiao S, Liu S, Liu L (2021) Short-term Ultraviolet Index Forecasting Using ARIMA Model.
- Alsharif MH, Younes MK, Kim J (2019) Time series ARIMA model for prediction of daily and monthly average global solar radiation: The case study of Seoul, South Korea. Symmetry 11(2): 24.
- Islam S, Patil SS, Rafajlovski G, Hartmann M, Creutzburg R (2021) Technical Design And Operational Control Of A Decentralized Microgrid In Rural Area. Electronic Imaging, 2021(3): 97.
- Sarangi S, Sahu BK, Rout PK (2020) Distributed generation hybrid AC/DC microgrid protection: A critical review on issues, strategies, and future directions. International Journal of Energy Research 44(5): 3347-3364.
- El Naily N, Saad SM, Hussein T, Mohamed FA (2019) A novel constraint and non-standard characteristics for optimal over-current relays coordination to enhance microgrid protection scheme. IET Generation, Transmission & Distribution 13(6): 780-793.
- Akram U, Khalid M, Shafiq S (2018) Optimal sizing of a wind/solar/battery hybrid grid-connected microgrid system. IET Renewable Power Generation 12(1): 72-80.
- Thale SS, Wandhare RG, Agarwal V (2014) A novel reconfigurable microgrid architecture with renewable energy sources and storage. IEEE Transactions on Industry Applications 51(2): 1805-1816.
- González A, Riba JR, Rius A (2015) Optimal sizing of a hybrid grid-connected photovoltaic–wind– biomass power system. Sustainability 7(9): 12787-12806.
- Tomar V, Tiwari GN (2017) Techno-economic evaluation of grid connected PV system for households with feed in tariff and time of day tariff regulation in New Delhi–A sustainable approach. Renewable and Sustainable Energy Reviews 70: 822-835.
- Shahzad MK, Zahid A, Rashid T, Rehan MA, Ali M, et al. (2017) Techno-economic feasibility analysis of a solar-biomass off grid system for the electrification of remote rural areas in Pakistan using HOMER software. Renewable energy 106: 264-273.
- De Carli M, Bernardi A, Cultrera M, Dalla Santa G, Di Bella A, et al. (2018) A database for climatic conditions around Europe for promoting GSHP solutions. Geosciences 8(2): 71.
- Deb C, Zhang F, Yang J, Lee SE, Shah KW (2017) A review on time series forecasting techniques for building energy consumption. Renewable and Sustainable Energy Reviews 74: 902-924.
- Tang L, Wang C, Wang S (2013) Energy time series data analysis based on a novel integrated data characteristic testing approach. Procedia Computer Science 17(2013): 759-769.