Electrical Energy Flow Algorithm for Household, Street and Battery Charging in Smart Street Development

: The world demands a smart and green future in every sector, which directly corresponds to increases in electrical energy demand one way or another. It is unfeasible to attain future energy demand with the present electrical infrastructure. That means more research and development is required. Future energy sources should be intermittent, and, in addition, the energy sector should be more inwards for distributed energy generation with demand side control. In such cases, the smartest and most autonomous system would be essential to deliver an adequate power supply with all electrical properties. A real ‐ time monitoring and control system with a self ‐ healing infra ‐ structure is a forthcoming desideratum. By accepting these challenges, we have designed a smart street. The basic idea of the smart street is presented in this paper as a landing page; the paper is more focused on emphasizing information regarding the electrical energy flow algorithm for the household, street, and street battery storages. This algorithm is helpful for two ‐ way energy flow and the automatic detection of islanding and the grid connection mode. It will be not only helpful for the users but to the utility as well.


Introduction
Electrical energy is one of the dominant themes of research and development in the 21st century. The world is eagerly seeking the best alternative solution to fossil fuels to generate electrical energy. However, generation is not only the solution, as demand has become highly sensitive in recent years. Most of the alternative solutions are unpredictable sources of energy. There is no perfect timing of generation; also, there is the possibility of a higher generation for some times and completely zero generation at other times. That means we will not be able to follow the same patterns we have been following for a long time, utilizing electrical energy at the same time of generation. Hence, the development of immense storage systems is also one of the challenging topics for researchers.
There is no longer a possible way to deliver optimal power flow with a conventional power system. Power management systems need to modernize with the emerging concept of smart grids [1]. Moreover, from the smart grid, the microgrid concept provides proper balance in an electrical system [2]. It has the ability to provide decentralization in the electrical system, with additional power provided at the demand side for managing the consumption of energy with street generation. A microgrid consists of a distributed energy generation system, an energy storage system and a load, which are mostly governed by power electronics technology [3,4]. Owing to decentralization, microgrids lessen outages, lowering downtimes and boosting the self-restoration process.
One of the issues smart grid management faces is the integration of distributed generation and forecasts, which is clearly presented by William Sanchez-Huertas, who deals with optimization algorithms such as colonies of ants, genetic algorithms, and others in order to solve microgrid and smart grid integration problems. Smart grid integration problems include the generation forecasts, location, size, and configuration of RES. One of the biggest problems facing smart grids has been determined to be the management of smart grids [5]. DNP3 (Distribution Network Protocol) and IEC 61850 are the protocols developed for the integration of the smart grid into the existing power grid. DNP3 is designed for communication between the command center and a substation, whereas IEC 61850 operates by communicating within the substation [6]. In communication technology, another factor to consider is data transmission technology. Data transmission technology is used for transmitting user data and instructions messages between various parts of the grid. Several data transmission technologies are in the market and under research: for example, Fiber optic, Wireless, LPWAN (Low Power Wide Area Network), and Zigbee technologies, etc. [7]. To transmit data, IoT technology is being used, which is very sensible. It must be fulfilled with a high level of security technology. Modern technology is working on Cyber-Physical Systems; these contain all users' data, from the amount of electricity utilization to the location of the systems. Cybersecurity strategies are essential for the implementation of the Modern grid [8]. Cybersecurity is an emerging concept and faces many barriers to its enhancement due to the unpredictable nature of cyber-attacks [9].
Yazhou Jiang and colleagues have presented a temporal casual diagram for sending outage notifications through the smart meter to enhance outage management. A spanning tree was presented for fully utilizing fast operation remote control switches [10]. One of the essential components in the smart distribution system is self-healing, which is designed based on the algorithm architecture so that it takes preventive action after the problem occurs [11]. A comprehensive operational planning framework has been presented by Seyed Ali Arefifar and his colleagues for developing a self-healing control system for the distribution system [12].
Robert H. Lasseter has presented an alternative to smart grid concepts. This alternative is based on using many distributed energy resources with sophisticated command and control systems. His paper also pointed out that microgrid technology has matured to the point that it is possible to design a full range of microgrid functions with high power quality to utilize PV sources [13].
By focusing on the smart grid concept, it becomes clear that an efficient and rapid load flow solution is essential for the distribution planning, automation, and optimization of smart grids [1]. "According to Pragya Kirti Gupta and his colleague, the smart distribution system is the notion of three key technologies: existing electrical systems with or without smart devices, a software system for smart and distributed control, and an adaptive, self-configurable communication network, which allows the interaction between the other two. They have approached existing individual strategies to develop a vigorous smart distribution network" [14]. The generalized three-phase power flow algorithms for islanded microgrids presented use a newton trust region method and particle swarm optimization for solving nonlinear equations. Droop control methods are used for distribution generation control, and steady-state frequency is used for one of the power algorithms [15,16]. Most of the authors conducted research with conventional power flows with centralizing controllers and communication channels. The biggest challenge in centralizing the control system is that it will create coordination problems in the whole system, while also making it disable for a while [17]. At the same time, the use of a decentralizing control system, with local control, will provide complete real-time information of each respective point in the grid, progressively improving the reliability of the grid.
Much research has proposed a load flow solution with a ladder theory, newtonraphson method and data structure method [18]. Indri Suryawati has proposed an online power flow management system based on the GIS (Geographical Information System) at the distribution side, which enables real-time monitoring and control [19]. Additionally, Vishnu Suresh and Przemyslaw Janik have brought forward a genetic algorithm method for controlling optimal power flow in microgrids [20]. A modern technique has been presented by Niannian Cai and colleagues; they presented research on universal power flow algorithms for industrial systems and microgrids. Their system has the ability to handle active control strategies, including isochronous (ISOC) and droop control [21]. Design of the Smart Street is shown on Figure 1.

Basics of the Smart Street
This section will stand as a foundation for the algorithms involved in this study. It presents a vision of the future smart street.
In order to fulfill adequate electricity requirements in a smart way, we have designed the "smart street". This is an amalgamation of smart grids and smart homes. The aim of this project is to supply uninterrupted electricity, even when grid electricity is not available; the street can supply power for at least 24 h. Some of the key factors we have considered while designing the grid are as follows: 1. The availability of electricity in the absence of utility grid supply. 2. Demand Response and Time of Use strategies. 3. Variable electricity pricing. 4. Ensuring electricity bills are understandable to the average citizen. 5. The unfeasibility of small prosumer participation in the electricity market. 6. Deficiencies in communication between the consumer and utility. 7. The lack of a platform to get real-time data of consumption and generation with pricing. 8. Greater generation and management from the distribution side, etc.
As illustrated in Figure 1, we consider six smart homes, with five having street generation capacity and one having no street generation capacity. Each house has different electricity generation and consumption, and a different battery storage. The street strictly follows the underground distribution system concept. Starting with the transformer, as in the normal street, the distribution transformer is located at end of the street. This transformer has several extra features compared to a normal transformer, such as the ability to measure the voltage, current, active-reactive power, power factor, and harmonics, to selfmonitor the life cycle, oil level (oil-cooled transformer), and the temperature of oil, etc. The transformer is protected with two-sided fuse protection, along with other types of protection, such as undervoltage, overvoltage, undercurrent, and over-current protection. Each transformer will have a unique identification number so it can be easily trackable by the utility in case of any fault. The transformer will also share data with the utility after every 15 min. One side of the transformer is connected to the utility grid and another side is connected to the smart control panel of the street.
A smart control panel provides isolation between the utility grid and street grid. The smart grid panel is designed with numerous capabilities. Its basic function is the control of energy flow to the street through various resources (Street electricity generation, Street battery storage, V2G, and Utility grid supply). A controller used in the smart control panel will ceaselessly transfer data with a utility energy center via cloud base technology (Internet of Electricity). It will be a two-way exchange of data for the monitor and control. Data that the controller will share with utility centers are the energy demand of the street, electrical energy generation of the street, state of the transformer, blackout conditions, any faults in the street, street sensor status, etc. A smart controller will interface with each sensor in the street and with the smart home controller. The underground street storage is located exactly next to the smart control panel; the street storage's volume is based on each individual home's energy demand for 24 h. This energy demand needs to be submitted by the homeowner at the time of the establishment of the street.
The street consists of four power lines instead of three; three lines are common L1, L2, L3, and the fourth line is the charging line that is denoted with sign C. Electricity generation from various homes and the smart light pole (Solar Panel + V2G) will flow through it. This line will end up at the smart control panel, and from there, electric energy will flow again to the street using either all three lines or the charge of the battery, or by uploading this energy to the utility grid after auto-approval from the utility.
Smart homes will play a crucial role in the future smart grid as they will consume energy and generate electricity too. The electricity generation of smart homes is produced via street generation and a micro wind turbine, along with battery storage for backup power. Further, their data sharing of electricity consumption will help the utility for energy forecasting. In accordance with future smart home technology for energy monitoring, energy-saving and automation systems, the smart home control kit design offers an all-in-one perspective. Mobile and web applications will provide a platform to interface with the controller which controls home appliances, monitors energy consumption generation, the status of the home battery and street storage, energy flow in-home, scheduling of equipment and many others. The smart controller not just connects with the smart meter but also with the street controller for data exchange and control.
A street is never completed without streetlamps. Many types of research have been conducted on the development of advanced street poles [22,23]. At present, streetlamps are not just limited to providing illumination at nighttime but also facilitate with selfpowering solar panels and small batteries, digital display boards, and some other features. We have gone through a deep understanding of the future need of streetlamps, and we understand that streetlamps can contribute more to electricity generation on the distribution side. We came up with the design of a smart street poles, which is a well-upgraded version of a street pole. It is facilitated with 12 solar panels arranged in a flower shape, which is connected with foldable arms to protect the solar panels in heavy winds or the rainy season. This smart streetlamp can generate 3 kW of energy on a full sunny day. It is also connected to the charging line (C). Other features that have been added to the smart street pole are 5G network capability, a digital display board, LED streetlights, a 360⁰ surveillance camera, sensors (moisture, temperature, wind, pressure, visibility, motion), a utility communication controller, alert alarm, 230 V socket, electric vehicle charging plug and a touch display for the selection of credentials for vehicle charging. Indeed, an electric vehicle charging station is predicted to be one of the most essential and considerable loads in the near future. Not only does it provide a transportation facility but it can work as an electricity storage device too. This electrical charging station, along with the smart streetlamp, will work as a two-way electricity flow V2G (Vehicle to Grid) and G2V (Grid to Vehicle).
As mentioned earlier, the smart street provides a decentralized generation and distribution system platform. The street will have the ability to transfer or exchange electricity as a peer-to-peer technology. That means prosumers can exchange electricity with each other, which they have generated from renewable energy. Not only this, but prosumers can also share their electricity from the street storage with another street. With regards to the sharing of electricity, data protection is very important, so it will be facilitated via blockchain technology [24].
In brief, the smart street is a modern and futuristic re-design of the distribution grid. It can easily serve for the next 50-70 years even if electricity demand increases up to 2 or 3-fold more than the present. It will offer a single electricity price for the entire day and there will be no interruption to electricity because it has a combination of electricity sources. Because of good isolation between the utility grid and the street grid, small prosumers can also participate in the electricity market. Various sensors and controllers contribute to the continuous monitoring of data. Autonomous control strengthens the grid response time; no human measures are required, unless some disastrous event happens. It is a reliable, efficient, self-sustainable and properly conceived electrical grid.

Algorithms
It is easier to understand the key algorithms of the smart street after first knowing the foundations of the smart street. All algorithms used in the smart street's development are based on close loop control. These algorithms will govern the in-home and smart control panels of the street. These are extremely essential, as they are responsible for electrical energy flow in the smart street. These algorithms work with the 15-min load shifting. One of the good qualities of an algorithm is that it works on the time on change theory, which means that it supplies electricity to the street with respect to time through various resources. The time on change theory is split into two (Peak Hours and Normal Hours) time zones.
Peak hours are the industrial and office working hours; the energy demand during these times is very high, and consequently prices are high. In such instances, the algorithm will verify the street generation or the street storage and according to that connection will become established. Street generation is not just prioritized for the peak hours but for continuously supplying electricity to the street, with the condition that it provides sufficient energy to fulfil the load.
Peak Hours: 11 AM to 5 PM Normal Hours: 5 PM to 11 AM Resources used for supplying power to the streets are the utility grid, individual home generation, streetlamp generation (including power flow through Vehicle to Grid), and the street battery storage. The street generation mentioned in the algorithm stands for home generation and streetlamp generation.

Battery Charging Algorithm
The battery charging algorithm is applied in both the home controller and streetsmart control panel controller for the home battery storage and smart street storage, respectively. Battery charging is perpetually prioritized with street generation. The working of the algorithm is described pointwise for better understanding. On Figure 2 is shown battery charging algorithm.

Working
At the time of commencement, the controller will ensure there is a battery charging limit.
(1) In the case when the battery is charged according to the limit, contact will not be established either with the street generation or utility grid. After every 15 min of delay, the controller will check the state of charge of the battery. (2) However, the command will move forward when the battery is identified as not satisfying the charge condition. The electricity is time-dependent and therefore it must verify time while taking power from the utility grid. For the time between 11 AM to 5 PM, the battery will only take power from the street generation.
(a) The controller will assess whether the street generation is higher than the load or not; if yes, then contact will be established and the battery will charge until it is full or the generation becomes lesser than the load, if not, then contact will remain open.
(3) For 5 PM to 11 AM: (a) Again, it will check whether the weather street generation is higher than the load or not: if yes, charging will begin with the street generation, and if not, then it will move forward with verifying grid availability.
(i) Utility grid power availability will be analyzed.
(1) In the presence of the grid, it will check the state of the utility grid power, and, in the case of high-power availability, the load will develop a connection; in lower availability connections, it will not establish a connection and no charging will happen.
(2) In the absence of the grid, battery charging connection will remain unchanged.

Equations
The following equations are undertaken for battery charging, discharging, and the state of charge for the home battery and street storage: (1) Home battery charging and its limit: where, is the charging efficiency of the home battery storage; is the available power for home battery charging at time t; is home street generation at time t; is utility grid power supply (home) at time t; is home power demand at time t. ( where, is the minimum charging limit for the home storage battery; is the maximum charging limit for the home storage battery. (2) Home battery discharging and its limit: where, is the discharging efficiency of the home battery storage. is the discharging power of the home battery at time t. is the state of charge of the home battery at time (t − 1).
where, is the minimum discharging limit of the home battery storage; is the maximum discharging limit of the home battery storage.
(3) State of charge of the home battery: * where, is the state of charge of the home battery at time t. * 100 where, is the state of charge of the home battery in percentage at time t; is the maximum capacity of the home battery storage.
(4) Street battery storage charging and its limit: * where, is the charging efficiency of the street battery storage; is the available power for street battery charging at time t; is street electrical power generation at time t; is the utility grid power supply (street) at time t; is the street power demand at time t. (8) where, is the minimum charging limit for the street battery storage; is the maximum charging limit for the street battery storage.
(5) Street battery discharging and its limit: where, is the discharging efficiency of the street battery storage; is the discharging power of the street battery at time t; is the state of charge of the street battery at time (t − 1).
where, is the minimum discharging limit of the street battery storage; is the maximum discharging limit of the street battery storage.
(6) State of charge of the street battery: * where, is the state of charge of the street battery at time t. * 100 where, is the state of charge of the street battery in percentage time t; is the maximum capacity of the street battery storage.

Electrical Energy Flow Algorithm for Households
This is the electrical energy flow algorithm to the particular houses in the street with multiple energy sources. Potential sources of energy supply to the homes are home street generation, home battery storage, home street generation + home battery storage, street battery storage and the utility grid supply. The condition for street battery charging is also covered in this algorithm. Along with this, a home automation alert system is integrated for cases where there is a heavy consumption of energy in peak demand times or less availability of energy generally. On Figure 3 is shown electrical energy flow algorithm for household.

Working
At the very beginning, the controller will check the timing, as it is categorized into two sections: (1) Time: 11 AM to 5 PM; (2) Time: 5 PM to 11 AM (rest of the time from (1)).
(1) If the time is between 11 AM and 5 PM, then it will assess the accessibility of home street generation.
a. If street generation is not available, then a connection will be established for taking power from the street grid. Primarily, grid battery status will be analyzed; this refers to whether the battery has more than 15% of power or not.
i. In cases of sufficient power, it will verify whether the power limit that has been provided by the user is still available or not.
1. If the power has not yet reached its limit, then it will deliver until it reaches this limit.
2. If the user has already crossed the limit, then the controller will approach the utility grid power supply. It will verify whether utility grid power is present or not.

I.
If it is not present, then the controller will redirect the connection to the home generation for limited power usage.
II. If power is present, a connection will be established with the utility grid line and limited power will be delivered. Additionally, an alert will be sent to the home automation system (partially to the user) for a reduction in electricity consumption. ii.
b. In the case of whether street generation is accessible: i. The street generation's ability to fulfill the load will be verified.
1. If the street generation is higher than the load, then the power supply at the home will be conducted through the street generation, and an additional choice will arise for the consumer: "Does the user want to send extra power to the street grid or not?" I.
In the event of selecting the "NO" option, the controller will verify the state of charge of the home battery storage. The battery will be kept in charge until it satisfies the charging limit and after this, power contacts will be automatically connected to the street grid to send back power.

II.
For selecting the "YES" option, power will supply to the street grid without further verification.
2. A combination of street generation and home battery storage power will be supplied when only street generation is inadequate to match the load. Before supplying, confirmation that this combination has a higher potential to supply power than the grid for that moment is mandatory. I.
If it is higher, then limited power will be delivered through it until its value become lower than the utility grid power.

II.
The approach will move to the street grid supply when the combination value is lower. Further, step "-> 1) -> a -> i -> 2" will be taken into consideration for the power supply.
(2) Outside of peak time zone, it will check if the generation is higher than the load or not. If higher, then step ""-> 1) -> b -> i -> 1 "will be executed, and if not, then the grid availability will be verified first.
c. If utility grid power is present, then would it be sufficient to make the load or not? i.
In the case of fulfillment, power will be supplied through the utility grid and it will also assess the street battery status; if it is fulfilling the condition, then no charging will be performed. In case of a lower charge, charging will be executed until it sufficiently charged. ii.
If the utility grid power is not sufficient for the load level, then another condition will be applied: is the utility grid power higher than the home generation + home battery storage?
1. Limited power will be supplied through the grid if it is higher. 2. For the lower value, step "-> 1) -> b -> i -> 2 -> I" will be executed. It will also send an alert to home automation systems to reduce consumption.

Equations
The power balance equation to fulfill the home power demand is (13)

Electrical Energy Flow Algorithm for the Street
This algorithm represents electrical energy flow into the street. As discussed in the previous Section 3.2, many possible power resource combinations are considered for street energy flow. Figure 4 shows the electrical energy flow algorithm for the street. The utility grid power supply will be prioritized for the non-peak demand time. For the street generation, it will include all house street generation and smart streetlight pole generation. A closed-loop control is used so that some conditions are kept in continuous monitoring and others are monitored after 15 min of the cycle.

Working
The electricity supply process will start with examining the presence of street generation and comparing this with the load, and if it is satisfactory, then supply will begin from the street generation; otherwise, it will assess the availability of the utility grid supply.
(1) In the case of the utility grid power supply being present, it will further assess the very important variant time zone: (1) 11 AM to 5 PM, (2) Rest.
a. If the time does not lie between 11 AM and 5 PM, then the condition will be checked for generation output, whether it is higher than the load or not. If yes, power will be supply through the generation. If not, then uninterrupted power will be delivered through the utility grid. b. If the time falls between 11 AM and 5 PM: i.
The total street generation will be compared with the load for the street.
1. Continuous power will be supplied via street generation when generation power is higher than the load.
2. If the generation is not competent, it will compare the battery percentage minimal value of 15%.
a. In the event the battery has higher charging availability, power will be delivered via the battery and street generation together. b. As long as the battery has charge, power will be supplied through it; when it gets down to minimal capacity, the utility grid power status will be identified. Additionally, an alert will be sent to each home automation system to reduce power consumption to a specified limit.
i. Now, power will be supplied from the combination of street generation and a limited amount of the utility grid supply. ii.
If the utility grid is found absent, then the street controller will cut all the connections and redirect the use of energy to the individual home. In such circumstances, the home owner can use generated electricity from his own home, and if generation is not available, then power will get cut. Continuous monitoring will be carried out for reconnection.
(2) In the instance of scarcity of the utility grid power, subsequently, step "-> 1) -> b" will be carried out.

Equations
The power balance equation for fulfilling the street power demand can be written as

Relation between the Household Electrical Energy Flow algorithm and Street Electrical Energy Flow Algorithm
As noted earlier, the street microcontroller and home base microcontroller are designed so that they can communicate with each other. Following this, the energy flow algorithms will also interact with each other to fulfil the electricity demand. In the house and the electrical energy flow algorithms, demand is firstly trying to be fulfilled by the home generation, and in cases of peak time hours, a combination of the home battery storage and street generation will be used for higher demand, but if these are not providing sufficient electricity, then it is requested to take power from the street's overall generation or the street storage or utility grid. This command is transmitted from the household algorithm through the microcontroller, which is responsible for the street electrical energy flow algorithm. Similarly, when the available utility grid power is lower in normal time then the street algorithm, an alert message is sent to the household base microcontroller to reduce electricity consumption. Electricity supply is always prioritized for the street generation, even in normal hours and whether or not the street generation is higher than the demand or not. A combination of the street generation and street battery supply will not be utilized in normal times, as electricity demand should be lower, with regular electricity prices and battery storage utilized in times of emergency. As mentioned, the household algorithm will first consider home generation, then only electricity from the grid, and in cases when all street generation, street battery storage, and utility grid power is not obtainable, then the street algorithm will automatically send an alert signal to the household algorithm, and it will start supplying power through home generation only.

Case Study
In order to assess the algorithm, we have performed seven different case scenarios: (1) the first case is a normal working day (Normal Grid), (2) the second case is a fault case (Fault Grid), (3) is a cloudy day (No PV), (4) involves less utility power supply at nighttime and a partially cloudy day, (5) involves charging the street storage with PV (daytime) to be utilized at night, and involves a normal day (CSPVND), (6) involves charging the street storage with PV (daytime), to be utilized at night, and involves a partially sunny day (CSPVPD), and (7) involves charging the street storage with PV (daytime), to be utilized at night, and also involves a cloudy day (CSPVCD). A load profile generator software is used for generating consumption data of each house in the street. On Figure 5 is shown electrical energy consumption in the houses [25].
Some information is similar in all the cases, such as:  The clock cycle is considered for 15 min load changing data for 24 h, so that the 0:00 to 23:45 stage of time is considered. In theory, two different time periods are considered, which is the same as in real life: (1) Normal Time (5:00 PM to 11:00 AM); (2) Peak Hours time (11:00 AM to 5:00 PM) Table 1 contains the daily load diagram.  Six homes are considered, as shown in Figure 1. Electrical energy consumption in the houses is shown in Figure 5. These houses have different electricity generation and consumption patterns. In all cases, the household electricity consumption value is the same.  The maximum utility supply at any time during the day is 20 kWh, and the minimum is 7 kWh.  Electric vehicles are also considered in case where they perform both V2G and G2V phenomena.  The smart street battery storage is set for 150 kWh at the beginning of the day. The total battery capacity is 350 kWh.  The maximum demand at any time in a day is 24.81 kWh, and the minimum is 2.39 kWh, including EVs and streetlights.  When EVs are charging, they are included in the street load, and at the time of discharging included in street generation.  PV generation is considered to come from all homes and streetlamp generation.  The lower boundary for utilizing the street battery storage is 15% of the total size.  Table and graphical data are presented for analysis.  There is no interruptions or faults on the utility side. Total EVs (G2V and V2G) are shown in Figure 6 and EV discharge (V2G) is shown in Figure 7.  In peak hours, power is supplied by the PV and Battery. Data for utility grid power supply and PV street generation for case 1 is shown on Table 2.

Case 2: (FG-Faulty Grid) 
It is a partially cloudy day and a fault in the utility grid occurs for 6.5 h. The time of the fault is between 11:00 AM and 5:30 PM.  In this case, electricity is supplied by the street generation, street storage, and V2G phenomena.  PV generation is different in this case. Utility grid power supply and PV in Faulty Grid (FG) is shown on Figure 8.  The G2V and V2G patterns are the same as in Case 1. Data for utility grid power supply and PV street generation for case 2 is shown on Table 3.

Case 3: (Cloudy Day: No PV Generation) 
It is a full cloudy day. No PV generation during the day. Total electricity consumption by houses, streetlamps and EVs for cloudy day is shown on Figure 9 and utility grid power supply, EVs (V2G) and PV street generation for cloudy day is shown on Figure  10.  V2G and G2V patterns are also different in this case.  In peak hours, power is supplied through the street storage and EVs. Data for utility grid power supply and PV street generation in Case 3 (Cloudy Day) is in Table 4.

Case: 4: Medium Cloudy and Less Utility Power Supply at Night (MCLU) 
It is a medium cloudy day. There is less PV generation during the day. Data for utility grid power supply and PV street generation in Case 4 (MCLU) is in Table 5.  V2G and G2V patterns are the same as Case 1 and Case 2.  In peak hours, power is supplied through the street power generation, street storage and EVs. Utility grid power supply and PV (MCLU) is shown on Figure 11.  There is less utility power availability between 21:00 and 23:15, which is fulfilled by the street storage. Power utilizing conditions from the street storage, PV, and utility grid are the same as in Case 5. Table 6 contains data for Power available, charging, discharging, and SOC values in normal grid. Charging and discharging value in normal grid is shown on Figure 12.  The battery is utilized in peak hours when PV generation is only partially available. State of charge of street battery in normal grid is shown on Figure 13.  The utility power is the same as in Case 1 and PV is like Case 3.

Results of Case 1 (NG) 
The table states that the balancing of electricity is established completely; no trouble is faced in cases of limited supply from the utility. The available power is that which is available after fulfilling the street load.  In peak hours, electricity is provided by the PV generation only. No utility power supply is utilized at these times.  The total PV street generation is approximately 254.77 kWh. The total load consumed by the six houses is nearly 76.31 kWh, and after combining this with EVs, is about 289.61 kWh. By comparing demand with supply, we can say that solar has the capacity to supply more than half of the demand. Table 7 contains data for power available, charging, discharging and SOC in faulty grid.  At the end of the day, the battery status reaches up to 350 kWh. Comparing the initial status battery with that at the end of the day (350 − 150 = 200), 54% of charging takes place during the day even after the maximum demand of the day. Figure 14 shows charging and discharging of street battery in faulty grid. Figure 15 shows state of charge of street battery in faulty grid.  One of the purposes of this case is to assess the behavior of the street power generation and street battery storage on a normal sunny day.   3.5.9. Results of Case 2 (FG)  As mentioned in the conditions, the utility grid power went down for 6.5 h during the daytime. Electricity supply was fulfilled by the street generation, street storage, and EVs. For extreme conditions, the day was considered a partially cloudy day. Thus, PV street generation was lower too.  It is clearly seen from the graph that the battery was discharged during all 6.5 h of the fault. Maximum load value was reached as the fault occurred during the peak hours: this amounted to approximately 112.13 kWh of energy, and for fulfilling the load, 50.11 kWh of the energy was supplied by the battery in the smart street.  Great variation took place during the day in the battery status. Table 8 contains data for power available, charging, discharging and SOC values in cloudy day.  The values indicate that even after the long-time fault in the street, the street has the potential to fulfill the demands of maximum power consumption. Figure 16 shows charging and discharging of street battery in cloudy day and Figure 17 shows state of charge of street battery in cloudy day.

Results of Case 3 (Cloudy day-No PV Generation) 
A day considered in this case is a totally cloudy day, which means no street power generation.  As per the algorithm, in peak hours, the electricity supply is prioritized to draw from the street power generation, street storage, and EVs. Due to the unavailability of the street power generation, electricity is supplied by the street storage and EVs.  Extreme variation can be seen across the day in the state of charge of the street battery. Table 9 contains data for power available, charging, discharging and SOC values at night.  The discharge of the battery is almost 7.5 h across the day.  A total of 50.53 kWh energy in peak hours and a total of 60.97 kWh energy in general is utilized across the day. Figure 18 shows charging and discharging of street battery at night and Figure 19 shows state of charge of street battery at night.

Results of Case 4: Partial Cloudy and Less Utility Power Supply at Night (PCLU)
 This day is a partially cloudy one where there is low electricity availability at night, PV generation is the same as Case 2.  A total of 71.68 kWh of energy is discharged from the street storage battery for approximately 9.5 h. Table 10 contains data for power available, charging, discharging and SOC values in CSPVND.  The total electricity consumed in the day is 287.12 kWh, out of which 185.66 kWh is supplied by the combined PV and street battery storage, which is 64.66% of the total power requirement.  The maximum peak power drawn from the battery at any moment of the day is 18.29 kW. Figure 20 shows charging and discharging of street battery in CSPVND and Figure 21 shows state of charge of street battery in CSPVND.   The power consumption cycle is the same as in Case 1, the only difference lies in the street storage working process. It is working all the time, except during daytime, when it is being charged through the PV generation. Table 11 contains data for power available, charging, discharging and SOC values in CSPVPD.  A total of 52.87 kWh of utility grid energy is saved using the street battery storage during normal time hours. Figure 22 shows charging and discharging of street battery in CSPVPD and Figure 23 shows state of charge of street battery in CSPVPD.  In a normal working day, PV adequately fulfils the peak hours load and charges the street storage battery too. Almost 36.26 kWh of charging is done during this time.    Street storage battery charges for 5.5 h from the PV generation, with the value being approximately 49.68 kWh. Battery power is not just utilized during the normal time, but also during the peak hours. Table 12 contains data for power available, charging, discharging and SOC values in CSPVCD.  The total street storage energy consumption is about 210 kWh for the whole day. We can see from the table that at the end of the day, the battery percentage is 41.76%, which clearly means that it will be quite challenging to use the battery in the same way the next day. Figure 24 shows charging and discharging of street battery in CSPVCD and Figure 25 shows state of charge of street battery in CSPVCD.   There is no generation from PV, as the day is a full cloudy day, and due to which there is no charging of the street storage.  From the SoC graph, we can clearly understand that after the 45 cycles there is no battery power left to use in the street. Thus, the minimum power is supplied by the utility, with higher prices during the peak hours.

Discussion
In this paper, we have attempted to put forward some general information about our smart street, which was very essential for better comprehension of the algorithm. After scrutinizing many closed-loop control strategies, we came up with two feedback loops that we discussed in the main context: (1) 15 min Cycle (Load changing cycle); (2) Continuous monitoring. Continuous monitoring was established, especially for the battery charging cycle and low power states.
These algorithms would make load flow very smooth for future smart grid development. Multiple power sources, even with their specific combinations, can provide uninterrupted power even during a down period in the utility grid. There will be less chance, therefore, of a complete shutdown. Due to the higher street generation and storage at distribution, each residential street will have the independence for utilize the power it needs. The utility can transfer more power to the industrial site without any burden. Alert messages to the home automation system provide instant awareness to consumers and help to save power. Furthermore, this would be beneficial for reduction in electricity bills and would reduce the complexity of the bill, as only in normal hours the street will take power from the utility when the price would be standard.
The street power supply is always prioritized to draw from the street power generation. Only in the case when there is less street power generated than the load requires, will the utility grid power be utilized. The street battery storage will not be utilized in normal supply times, due to there being enough availability of the utility power supply. Street battery charging will be based on the condition that is stated in the equation: battery charging will begin when its value becomes less than or equal to 85% of full charge. This charging will happen only in the case when street generation exceeds the load and when utility power is higher than the load during standard times. The minimum value for discharge is 15% of the battery capacity, as the remaining power will be utilized by the controller for analyzing the status of the street.
These algorithms provide self-sufficiencies and great flexibility to homeowners to transfer home generation (renewables) to the main street grid. This flexibility is due to the smart control panel, which provides isolation between the utility grid and street grid. There will be no interruption or unbalance in the main utility grid.
The first case we observed is for a normal sunny day. The total street power generation from the houses and smart street poles achieved more than ¾ of the load of the day. In the second case, we have seen that, even after 6 h of interruption to the utility grid, complete electric power flow was still accomplished in the street, with full functioning of home equipment. Next, for Case 3, a full cloudy day is taken into account to examine the battery performance in absence of the street power generation in peak hours. The battery adequately fulfilled the load of the street without the utility grid power. The fourth case is the most critical case: a partly cloudy day with less availability of power during the night. This extreme power load was supplied by the street battery almost for 9.5 h of daytime, with full capacity of load.
Cases 5, 6 and 7 were designed to analyze the street storage performance in utilizing power during normal times, and charging it when PV generation is available. These cases were not related to a presented algorithm; they are just for analyzing the street storage power utilization of timing. On a normal day (Case 5), this street storage power utilization timing showed good performance. We observed that it minimized 50% of utility electric power. However, for the days that were not normal days, and where solar generation was at minimum or not available at all in some cases, the street storage did operate as it was expected to. If we just followed the pattern of street storage power used during normal times, then there will be a possibility that at the end of the day, less power will be available, due to the partially cloudy day and the utilization of street storage in peak hours; the same pattern will not be established for another day. The street storage was installed to minimize the electricity bill by using it in peak hours, so there was no need to follow the demand response, the time of use strategy, and the supplied power in the absence of the utility grid and PV generation, but this is not possible with this pattern anyway, for, as we stated in Case 7, street battery power finished after 25 cycles. Solar generation was not available, so the power supplied by the utility supply grid did not obey the purpose of the street storage. Additionally, the street storage will not be available during normal times and for the peak hours the next day. After comparison of these cases with the provided algorithm case, it is certainly observable that the street storage has to be utilized during the peak hours along with the street generation, and should be charged during the normal times or at night. This is quite similar to pump hydro, which is in operation for generating electricity during peak hours, and at night, water is pumped back to the reservoir when less electricity is required and prices are low.
All these algorithm cases have clearly shown the capability of the street electricity supply in the absence of the utility grid, and the sufficient electricity generation and storage in the street. This represents freedom for the user to utilize equipment at prior times. Even in the worst sunlight scenario, the low utility power accessibility algorithm can help to supply power without any interruption. The time resolution shown in a graphical way is a 15 min cycle change; this algorithm also fully functions for minute or seconds cycle changes in both generation and consumption. For these minute and second cycle change phenomena, continuous monitoring is added to the algorithm. We have compared the algorithm with some of the recent algorithm papers [1,20,26] and found that this algorithm is less complex compared to others. The power management facility for selecting resources is efficient and reliable in this paper's algorithm. The result obtained give proof of the effective utilization of batteries in various conditions. A time-variant feature is a strong point for modern and future grids for minimizing the time of use and demand response strategies, which are not available in most of the paper.
The considered power generation in the street was from individual home generation combined with smart streetlight pole generation. The streetlight pole is an example of the all-in-one concept of future equipment design for the smart grid. As per the data we received from the two cases, we can observe that the street will be more independent after establishing such a system. More cases can be analyzed for different seasons and other different conditions. Smart street development is a big project; the earliest task is to design a microcontroller kit for the laboratory testing of these algorithms. Designing and developing the smart control panel should be one of the priorities, as this would be the first thing to implement. The next steps will be the home automation kit development, which communicates with smart meters, and which just not only provides the home automation system but also the energy management system; the technical designing of smart street poles with electric vehicle charging and discharging; a simple and straightforward communication platform for the prosumer and the utility; the futuristic transformer design which has been discussed in the basics of the smart street. After the completion of all this research, we will get a true functioning prototype of a smart street.

Conclusions
All in all, smart street development's main intention is to make the street compatible for a future advanced load, and to make it self-sustainable in cases of severe conditions. Dependability on utility grid power has reduce at a certain level. The more power that is generated at the demand side, the more power that can be utilized for self-gratification. Smart street development entitles equalization to a customer, through the development of a street storage plan. The algorithms presented here are to boost up the plan for the smart street. The smart street pole is one of the key development topics for the higher generation at the distribution level. The smart vehicle charging station in the street is essential for the globalization of electric vehicles.
One of the advantages of these algorithms is that all the algorithms present interact with each other for the best outcomes. For the discussed algorithm, after performing the simulation with it, we can say that it fulfils the future balancing of electricity demand. These algorithms furnish key aspects of two-way electricity flow. Blackout and brownouts can reduce to a certain level with the help of these algorithms' performance. Another equivalent smart street can equalize the demand by sharing electricity via P2P or blockchain technology. Electric vehicle charging (G2V) and discharging (V2G) platforms are also established in the street, so no other additional systems must be developed for an individual home. Autonomous electricity supply is performed by an algorithm, and controllers are designed to interact with each other. Due to continuous data updates, electricity forecasting would be easier for the utility. The system is more user-friendly as it also helps users earn money by sharing electricity not only with the utility grid but also with neighbors. It is a more grounded platform for the participation of individual prosumers. Alert systems will assist users with minimizing consumption and will therefore save a decent amount of money. Overall, this algorithm load flow adequately meets most of the future challenges for maintaining electricity supply.

Future Scope
Renewables are the future of electricity. Efficiency of these renewables is still very low; this shows that more research needs to be done to enhance such renewables. It is also advantageous to minimize the cost of these renewable energy resources. Storage is the most essential division of the smart street; hydrogen storage and thermal storage is one of the newest research topics in static storage systems. In the case of storage systems, future work should identify which is the most sustainable system that can be used for smart street development. The use of storage option static battery storage is also a popular focus in such research.
Peer to peer energy sharing is one of the key challenging topics which must be assessed more carefully. Current 5G technology seems to be fast, with a higher transfer data rate in communication platforms, but further exploration is needed regarding how this 5G technology can benefit smart grid communication. Cloud base data sharing technology needs proper security, which could be facilitated by blockchain technology. The integration problem has to be normalized; in point of fact, this is quite a competitive topic.
EVs are the future of transport and the storage of electricity too. Fast charging and discharging infrastructure are most essential in a smart grid. It would be advantageous to find average electricity storage possibilities for EVs in a smart grid. According to the shown smart street framework, the interconnection of more than two streets is one of the key future works to develop a vision of smart city development.