Machine Learning Based Vehicle to Grid Strategy for Improving the Energy Performance of Public Buildings

: Carbon neutral buildings are dependent on effective energy management systems and harvesting energy from unpredictable renewable sources. One strategy is to utilise the capacity from electric vehicles, while renewables are not available according to demand. Vehicle to grid (V2G) technology can only be expanded if there is funding and realisation that it works, so investment must be in place ﬁrst, with charging stations and with the electric vehicles to begin with. The installer of the charging stations will achieve the ﬁnancial beneﬁt or have an incentive and vice versa for the owners of the electric vehicles. The paper presents an effective V2G strategy that was developed and implemented for an operational university campus. A machine learning algorithm has also been derived to predict energy consumption and energy costs for the investigated building. The accuracy of the developed algorithm in predicting energy consumption was found to be between 94% and 96%, with an average of less than 5% error in costs predictions. The achieved results show that energy consumption savings are in the range of 35%, with the potentials to achieve about 65% if the strategy was applied at all times. This has demonstrated the effectiveness of the machine learning algorithm in carbon print reductions.


Introduction
The future of power generation will be dominated by harvesting energies from renewable sources and methods for reducing CO 2 emissions.This is ensured through government regulations with, e.g., the UK's net-zero greenhouse gas (GHG) target by 2050 [1].As the demand for energy increases, the reliability of the generation and distribution network of national grids (NGs) decreases, due to intermittent renewable energy sources.This can be unpredictable, as the supply can be low when the renewable generation is high, and the volatility of renewable generation can create an unpredictable demand from the NG.In France, the decrease in fossil fuels leads to an increase in renewables, mostly wind, which leads to the greater import of energy and a decrease in grid consistency [2].
To compensate for the inefficiency of renewable power supply installations, Vehicle to grid (V2G) can be used.In the V2G method, the batteries from charged electric vehicles (EV) can be discharged back into the grid at peak times.It can be connected to the grid, or it can be utilised by a business, which can choose to store the energy, sell to the national grid, or use it.Peak power plants are used when the demand exceeds what is expected [3].These plants can quickly generate the required energy on top of the already generated energy of the NG, but they are not environmentally friendly, with the fuel being sourced by gas or diesel generating CO 2 as a bio-product.Therefore, it is required to develop a way of excess peak power generation without the use of fossil fuels.

UK EVs and Power Generation
In March 2019, it was estimated 38.4 million licensed vehicles in the UK [4] with 317,000 ultra-low emission vehicles (ULEV) recorded [5], and only 25,000 recorded EV charging points, mostly located in dense areas, such as cities.The EV market should scale 100% of new sales by 2030, making it a future leader in-vehicle use in the UK.As the number of EVs increase, the infrastructure and techniques used for charging-discharging will have to be adapted and improved.If there is a lack of EV chargers compared to the number of EVs, the EV market will not grow because many EV owners will not be able to charge, and use, their car.The UK's demand is 38.58 GW at 10:30 on 4 February 2020 [6], with an average EV battery size being 37.125 kW [7], meaning the EV battery capacity in the UK is 26.3% of the total demand.The sizeable, combined EV battery capacity can reduce stress and increase profitability for both the NG and businesses that employ V2G.However, the low number of charging points means this is reduced to 2.4%, which is a big loss.More EV charging points will enable more V2G to take place, meaning the EV battery capacity can be utilised more for the benefit of the grid and the business that employs it.The amount of EV charging points will obviously increase with the rising EVs.Renewable production equates to 31.49% wind, 2.36% hydro and 4.71% solar, which is 38.56% of the production.Wind power varies between 0.25-12.5GW, hydro 0-0.5 GW and solar varies between 0-4 GW per week.This equates to a variability of 16.75 GW per week, which is 43% of the demand.The EVs' current capacity is more than half of the renewable variation.

EV Infrastructure and Net Profits
The success of the V2G solution relies on consumers' cooperation, and thus, it is dictated by consumers' perspective.Location of charging stations play a great role in using EVs as some people prefer to charge their EV at home, whereas some of them do at work.The number of charging stations play a role as well, as there may not be available enough at their place of work either.This creates a disadvantage with the range of the vehicle, as using conventional fuelled vehicles allow long-distance travel and quick fuelling, whereas EV's are limited by distance and charging time.Some areas are situated without charging points for 10's of miles, thus, the availability of charging points is essential for future use of EVs.
According to 'Office for Low Emission Vehicles' (OLEV), an EV charger will cost roughly £650 to purchase and install with a Government incentive to pay up to £500 of the cost [8].This would eliminate the problem of people without having enough charging points as they could charge them at home.While charging at home, people may not charge their EV's at work, in the denser areas where bi-directional EV charging is essential.UK Government offers a grant towards EVs as they are more costly than ICE's.This grant could be up to 35% on cars passing certain requirements and 20% on motorcycles, mopeds, vans and taxis of up to £3500, £1500, £1500, £8000 and £7500, respectively.
The importance of the financial side of the method is discussed through investigating the costs and benefits of EVs participating in a V2G scheme.The work in Reference [9] uses four brands of EV, showing the trend between energy use from the battery and the higher price for peak-time, which can generate income.As the battery is being charged and discharged more commonly, the lifespan may drastically decrease where the consumers require buying new batteries more often, so the cheaper the battery, the higher the net income.The highest cost of V2G investment by power grid companies in the battery storage needed.The larger the battery capacity of EVs, the fewer EVs are needed to match the same capacity, meaning the reduction of investment costs for battery storage from the NG.

Lifespan and Variables of EVs
An average motorists' mileage is around 7600 miles per year, and the battery capacity for an EV may decrease to 80% after 20 years of driving [10,11].A certain model of EV was driven with a mileage of 232,442 miles and had a range of 220 miles of its original 265-mile range.This equates to 83% of the original battery life, meaning the batteries for an EV should last at least 20 years or even longer [10].Another EV model estimated battery life to be 10-12 years beyond the life of the car, with Nissan's evaluation of a 10-year car life and up to 22 years for the lifespan of the battery [12].
The EV is usually under perfect driving conditions when tested or simulated, whereas the driving range can be more accurately predicted using various methods.A 'Fuzzy Logic Classifier' method was used for conducting simulation and prediction.Certain variables are necessary to get a prediction, such as the battery size and weights of 1, 2 and 4 people in the car.This also includes variables, such as the slope, in which the vehicle is travelling to calculates a more accurate prediction on the battery lifespan [13].EV batteries are continuing to improve, with different companies improving at different rates.The lifespan of the battery plays a great role in the proposed method, as the owner of the EV is compensated for the reduction in battery lifespan.The range on a type of EV battery is reduced by 2% for every 100,000 km [14].As batteries become more efficient and last longer, this does not make as much of an impact on the method.

Methods of V2G Charging
Several techniques are employed for charging and discharging EVs [15].Controlled charge-discharge allows the operator to decide when EV will be charged and discharged, giving more freedom and control to the grid.If the EV is plugged in at peak demand, the operator can hold charging of the vehicle until the demand is less.Uncontrolled chargedischarge starts to charge the EV as soon as it is plugged in.It may have a great effect on the reliability of the NG, producing problems, including a greater variation of frequency, demand, and overall, reliability.Therefore, this method is unlikely to find its way into the future of EV charging.Intelligent charging uses real-time energy demand to decide whether the EVs will be charged or discharged, using grid requirements, allowing the operator to maintain the quality of the grid, such as the frequency and voltage etc. Indirect controlled charging works from the users' perspective, allowing the user to charge their car for a lower price or possibly in the future for a profit, as the EVs can be charged at off-peak and then discharged at peak times, generating a small profit.

Previous V2G Simulations
The V2G method has been proposed for use in domestic applications, but unfortunately, without the incentives for the EV owners [16,17].These simulations showed the volatility of the system and the difficulty in predicting the future supply and demand, meaning the simulations can be inaccurate.The supplier of the energy, in this case, has great advantages, through having a less volatile demand, as the V2G method provides peak shaving.Attention should be given to the V2G method for predicting energy demand rather than financial benefits for both parties.Various topologies of V2G with dependence existed where the EVs are connected to the grid.However, 'Vehicle to building' (V2B), 'Vehicle to home' (V2H) and 'Vehicle to load' (V2L) are the same methods, which covers all variations in the process [18].
The depth of discharge is a contributing factor to the results within this method, as the battery that is discharged less will have a longer lifespan [19].To improve the lifespan of the battery, if the battery does not need to be discharged, then it shouldn't be.Fuel cells can be combined with the V2G technology to provide a more efficient method.With the application of fuel cell vehicles (FCV), there can be a 51% increased income as the required supply is spread out over FCV and V2G instead of using only one method [20].
As the total cost of ownership (TCO) of EVs can vary, changing consumers' opinion on if they will use one or not.This is being amended by the tariff schemes given by the government [21].Xcel energy's off-peak EV rate is 4.3 cents per kWh compared to on-peak rates of 17 cents, with a four-fold increase, the time of purchase creates an incentive.A suitable EV infrastructure, and smart EV chargers, which enable the demands of the consumer to be met, will allow the expansion of EVs.Carbon neutral building will integrate the use of V2G systems and EVs, whether it's V2G or just the use of EVs rather than standard vehicles.It is undeniable that the use of EVs reduces the carbon footprint of the building on a university campus [22].EVs and hybrid electric vehicles (HEVs) are becoming more efficient and useable.As the V2G method requires the use of EVs, further research into better performance and attractiveness to consumers' increases the value of the V2G method [23].
V2G methods are not unfamiliar, as is shown in previous research papers.The application of V2G methods into large public and commercial buildings, e.g., university campus, validated by data collected from operational environments and critically analysed by employing advanced algorithms, have not been investigated yet.The surrounding aspects, such as the vehicle range, using ML have been previously analysed without focusing on the buildings and EV users' financial and environmental benefits.
A V2G system is currently being tested in the UK, with no mention of how the system is going to be set up or analysed.There is not enough information available in the literature for predicting energy management of public buildings, particularly with employing machine learning (ML) algorithms [24].A machine learning algorithm can enhance the quality of projects, such as these, by giving the company an accurate outcome, regarding the financial and energy characteristics of the project.The 'Parkers Vehicle-Grid Integration Summit' showed the implementation of the method, and then the obtaining of the results [25].The method proposed in Section 2 can predict the outcome before the implementation.
The problem surrounding the growth of EVs and V2G systems is uncertain for both the driver and the building.It is not only difficult to predict the existing V2G system, but also the future of the V2G system needs to be predicted considering the location, scale of the building(s), future improved efficiency in EV batteries, etc.
In this paper, an effective V2G scheme has been developed and implemented into an operational university building, enabling it to be used on a larger scale.Parameters and system requirements, considering the initial cost, and net profit for both the installers and users of the EV chargers for the campus, are shown in Section 2. The on-site energy storage's price is calculated and equated to EV chargers, cost of EV charging stations, their lifespan and the campus profit have been presented in Section 3. In addition, the net profit of both parties, considering the long-term effects of using V2G, application of machine learning (ML) for predicting energy consumption and cost have also been conducted in this section.Critical analysis of achieved results with comparisons has also been presented in this section.Finally, key conclusions are drawn, and future works are suggested in Section 4.

The Proposed Methodology
The purpose of V2G methods is to acquire energy at peak demand, while still meeting the target of net-zero GHG emissions.The V2G method presented in Figure 1 was designed and applied to an operational University campus.The method is determined by the tariff rate, which is determined by energy demand that depends on the time of day.While the energy demand is high, the tariff rate is high, and the energy can be taken from the EVs instead of buying at a higher price from the electricity grid.When the energy demand is low, the EVs can be charged, as the electricity can be bought from the grid.This method works under the proposition that the EVs will leave at 17:00, as the most common times of use is 09:00-17:00.The EV must be fully charged by 17:00, which is enabled by the above chart.
The English north-west university building used 2,666,560 kW in 2019, with a daily average of 7936.19 kW with the energy peaking at the university opening hours from 09:00 to 17:00.The university pays 12 p/kW off-peak and 15 p/kW on the peak.The average EV car battery size is 37.125 kW meaning each charger would provide 27.75 kW of battery storage for the campus.EV batteries can only be discharged to 25% to stop critical battery degradation [26].This method uses the batteries from the EVs to supply the campus at peak times instead of buying at peak prices or having a large battery installed.
Sustainability 2021, 13, x FOR PEER REVIEW 5 of 25 to 17:00.The university pays 12 p/kW off-peak and 15 p/kW on the peak.The average EV car battery size is 37.125 kW meaning each charger would provide 27.75 kW of battery storage for the campus.EV batteries can only be discharged to 25% to stop critical battery degradation [26].This method uses the batteries from the EVs to supply the campus at peak times instead of buying at peak prices or having a large battery installed.To calculate the costs and savings of charger installation, the company 'PodPoint' [27] was used.This was a quote given for purchasing and installing the charger.Equation (1) shows the profit (P) calculated using money made (M) and installation cost (I).
The period of return on investment (ROI) was calculated by plotting the 'Money made' through time until the profit is no longer a negative.Instead of buying electricity when the renewable harvesting is low, the electricity from the EV batteries can be used.This saves money as instead of buying expensive electricity from the grid at peak times, the EV batteries can be discharged and then recharged at off-peak times.In addition, the cost of large-scale batteries will outweigh the purchase and installation costs of charging stations.The electricity usage of the investigated building (Business School Building-BSB) was 8256 kW.Where 't' is time, 'Ah' is Amps per hour, 'w' is Watts, 'Nb' is the number of batteries and 'C' is battery capacity, the storage for this can be calculated through Equations (2) and (3).To calculate the costs and savings of charger installation, the company 'PodPoint' [27] was used.This was a quote given for purchasing and installing the charger.Equation (1) shows the profit (P) calculated using money made (M) and installation cost (I).
The period of return on investment (ROI) was calculated by plotting the 'Money made' through time until the profit is no longer a negative.Instead of buying electricity when the renewable harvesting is low, the electricity from the EV batteries can be used.This saves money as instead of buying expensive electricity from the grid at peak times, the EV batteries can be discharged and then recharged at off-peak times.In addition, the cost of large-scale batteries will outweigh the purchase and installation costs of charging stations.
The electricity usage of the investigated building (Business School Building-BSB) was 8256 kW.Where 't' is time, 'Ah' is Amps per hour, 'w' is Watts, 'Nb' is the number of batteries and 'C' is battery capacity, the storage for this can be calculated through Equations ( 2) and (3).
The cost and number of batteries can vary significantly depending on the required capacity.A battery of this size would be roughly £1823.86,which is too expensive to insure a good ROI.This would be costly for any ROI or to be beneficial to anyone involved, meaning the V2G method is essential.Instead of using an on-site battery, the EVs plugged into the charging points can be used as they're probably going to be there during peak times.
EV battery cost determines the net-profit of the car owner as the battery will need to be replaced more often as it is being charged and discharged more frequently.A cost analysis of the university campus and EV users was carried out to determine if this was successful for both parties, which has been further elaborated in the results section.
The proposed method is a novel algorithm that is capable of accurately predicting the present, and future, financial and energy characteristics of the vehicle-to-grid system.The collected energy characteristic data from the building will train the algorithm and improve accuracy and usability.

Machine Learning (ML) Algorithm
For a large amount of data, machine learning (ML), including supervised and unsupervised techniques, are massively used, especially for classification problems [28].Input and output data are required to build and train the supervised model, which will be used in predicting future outcome for relevant new data sets.On the contrary, only input data are enough in developing models using unsupervised learning [29,30].Machine learning was used for predicting energy savings for a building in Reference [31].The methods used multiple linear regression, support vector regression, and back-propagation neural network.ML was also used for the thermal response of buildings, e.g., comparisons between measured and predicted results.The thermal load of a building was predicted using machine learning.The ML approach proved useful, depending on whether it was predicting short-term or long-term, and the predicted data was most accurate when supplied with uncertain weather data.The approach was used to predict only the thermal load of a building [32].The behaviour of residential buildings has been predicted using machine learning techniques in Reference [33].The model required a small training set while predicting accurately.The method use was the holt-winters extreme learning machine.This proved to be accurate while only needing 50 days of input data.
As shown in Figure 2, the neural networks (NN) based model starts with an input layer, through the weights, into the hidden layer, more weights, and into the output.The input is multiplied by the weights to reduce the error.Each hidden layer function is specialised to produce a defined output.
The cost and number of batteries can vary significantly depending on the required capacity.A battery of this size would be roughly £1823.86,which is too expensive to insure a good ROI.This would be costly for any ROI or to be beneficial to anyone involved, meaning the V2G method is essential.Instead of using an on-site battery, the EVs plugged into the charging points can be used as they're probably going to be there during peak times.
EV battery cost determines the net-profit of the car owner as the battery will need to be replaced more often as it is being charged and discharged more frequently.A cost analysis of the university campus and EV users was carried out to determine if this was successful for both parties, which has been further elaborated in the results section.
The proposed method is a novel algorithm that is capable of accurately predicting the present, and future, financial and energy characteristics of the vehicle-to-grid system.The collected energy characteristic data from the building will train the algorithm and improve accuracy and usability.

Machine Learning (ML) Algorithm
For a large amount of data, machine learning (ML), including supervised and unsupervised techniques, are massively used, especially for classification problems [28].Input and output data are required to build and train the supervised model, which will be used in predicting future outcome for relevant new data sets.On the contrary, only input data are enough in developing models using unsupervised learning [29,30].Machine learning was used for predicting energy savings for a building in Reference [31].The methods used multiple linear regression, support vector regression, and back-propagation neural network.ML was also used for the thermal response of buildings, e.g., comparisons between measured and predicted results.The thermal load of a building was predicted using machine learning.The ML approach proved useful, depending on whether it was predicting short-term or long-term, and the predicted data was most accurate when supplied with uncertain weather data.The approach was used to predict only the thermal load of a building [32].The behaviour of residential buildings has been predicted using machine learning techniques in Reference [33].The model required a small training set while predicting accurately.The method use was the holt-winters extreme learning machine.This proved to be accurate while only needing 50 days of input data.
As shown in Figure 2, the neural networks (NN) based model starts with an input layer, through the weights, into the hidden layer, more weights, and into the output.The input is multiplied by the weights to reduce the error.Each hidden layer function is specialised to produce a defined output.
It is required to arrange input, output, and validation data for developing a NN model and making a prediction.After creating the model employing input data, validation data set are used for conducting prediction of the new data through the developed model [34].In NN, the gradient descent method and the Gauss-Newton method are quite popular.Particularly for solving nonlinear problems, the algorithms use its standard technique [35].Mean squared error performs an evaluation of the training performance through simplifying the construction of a network by minimising the sum of the squared errors.
Hessian matrix approximates the sum of squares by H = J T J, where J is a Jacobian matrix, gradient g = J T e. e is denoted as network error and Levenberg-Marquardt training algorithm can be presented by Equation (4).
Connection weight is called by 'X k ' at the 'k' number of iterations.Scalar combination coefficient is denoted by 'µ', which accomplishes transformation to either gradient descent or Gauss-Newton algorithm.The identity matrix is represented by 'I', where the training process of NN is performed through the descent gradient method as a learning rule.The error between the outcome of training and the targeted output is calculated through the error function.All the calculation is performed by determining the sum of the squared errors of input data and output patterns of the training set.The error function is calculated by Equation (5).
Where 't p ' indicates targeted output and 'f p ' denotes actual output.The goal of using this learning rule is to search for suitable values of weights for minimising the error.
A feed-forward neural network (FFNN) machine learning algorithm (MLA) was used to predict the future energy demand of the investigated building.The data taken from 2013-2017 was used as an input and built ML models where the years 2018 and 2019 were predicted, as depicted in Figure 3.
It is required to arrange input, output, and validation data for developing a NN model and making a prediction.After creating the model employing input data, validation data set are used for conducting prediction of the new data through the developed model [34].In NN, the gradient descent method and the Gauss-Newton method are quite popular.Particularly for solving nonlinear problems, the algorithms use its standard technique [35].Mean squared error performs an evaluation of the training performance through simplifying the construction of a network by minimising the sum of the squared errors.
Hessian matrix approximates the sum of squares by H = J T J, where J is a Jacobian matrix, gradient g = J T e. e is denoted as network error and Levenberg-Marquardt training algorithm can be presented by Equation (4).
Connection weight is called by 'Xk' at the 'k' number of iterations.Scalar combination coefficient is denoted by 'μ', which accomplishes transformation to either gradient descent or Gauss-Newton algorithm.The identity matrix is represented by 'I', where the training process of NN is performed through the descent gradient method as a learning rule.The error between the outcome of training and the targeted output is calculated through the error function.All the calculation is performed by determining the sum of the squared errors of input data and output patterns of the training set.The error function is calculated by Equation (5).
Where 'tp' indicates targeted output and 'fp' denotes actual output.The goal of using this learning rule is to search for suitable values of weights for minimising the error.
A feed-forward neural network (FFNN) machine learning algorithm (MLA) was used to predict the future energy demand of the investigated building.The data taken from 2013-2017 was used as an input and built ML models where the years 2018 and 2019 were predicted, as depicted in Figure 3.The proposed approach allows the training of data for the aim of building models and future prediction.In our study, the energy demand of the building was predicted for the years 2018 and 2019.In addition, the V2G cost was calculated using the energy demand for 2013-2017, and the cost was predicted for 2018 and 2019, which have been presented in the results section.

On-Site Battery Storage
Excess electricity is stored in a battery where the size of the battery is dependent on how much electricity is required to store.From the simulation, variables, such as the type of vehicle, battery capacity, charging rate, number of charging stations, kW rating of charging station and price of electricity, has been calculated.The ROI and overall profit  The proposed approach allows the training of data for the aim of building models and future prediction.In our study, the energy demand of the building was predicted for the years 2018 and 2019.In addition, the V2G cost was calculated using the energy demand for 2013-2017, and the cost was predicted for 2018 and 2019, which have been presented in the results section.

On-Site Battery Storage
Excess electricity is stored in a battery where the size of the battery is dependent on how much electricity is required to store.From the simulation, variables, such as the type of vehicle, battery capacity, charging rate, number of charging stations, kW rating of charging station and price of electricity, has been calculated.The ROI and overall profit for both the consumer and for the stand-alone building can be determined.The 8256 kW comes from the demand for the building on a given day-see Equations ( 6) and (7).
This can be converted to cover the capacity of 10 EVs connected to the campus in Equation (8).SC = Cr × Nc × Nh = 6.66 × 10 × 12 = 799 kW/d (8) SC is the charging station capacity, Cr is the charging rate of the station, Nc is the number of charging stations, Nh is the number of hours they will be needed for, and Nb is the number of batteries.The battery capacity for this can be calculated using Equations ( 9) and (10) The price is estimated as £27,432.90 for 15 batteries, where the price of the battery can be affected by the factors, including capacity, size and the supplier.

Charging Stations, EV Variability and Campus Profit
The time of day, price of electricity and net profit for all involved in this V2G method are analysed and explained.If the campus buys at off-peak prices, not giving the EV owners an incentive, they make 43.56 p/day using a 3.63 kW/h charger (Table 1).Figure 4 demonstrates how the profit can vary throughout the day; if the peak-time, and off-peak prices are paid for the electricity, there will be no profit.The 'x' axis represents the hours of charge and the 'y' axis represents net profit in pence.There are more discharge hours than charge hours for the EVs, meaning the building must purchase the electricity at 15 p/h and must sell it back to the EV at 12 p/h to break even.The main operating hours are 09:00-17:00, with 12 p showing the peak times and −15 p showing off-peak times for the building for an average day.
A 3.63 kW/h charger's values were calculated using the EVs' batteries at peak times and re-charging at off-peak prices.It also shows that if the University charges the EV batteries at off-peak rates instead of peak rates, the EV owner's and the campus can profit, as is shown in columns 4 and 5 in Table 1.If the university buys and sells at off-peak prices, it makes money throughout the day.While the campus pays both peak, and off-peak prices with a 1 kW/h charger, it breaks even, as the last payment of the day takes net profit to zero (Figure 4).
The tariff rate changes throughout the day.The low tariff rate is 12 p/h, and the high tariff rate is 15 p/h.When these prices are paid, the net profit ends at zero at 17:00.If the campus pays off-peak prices to the EV owner for any hour of the day, 12 p/day is earned as the last payment of the day takes net profit to 12 p. Figure 5 presents the outcome of net profit.A 3.63 kW/h charger's values were calculated using the EVs' batteries at peak times and re-charging at off-peak prices.It also shows that if the University charges the EV batteries at off-peak rates instead of peak rates, the EV owner's and the campus can profit, as is shown in columns 4 and 5 in Table 1.If the university buys and sells at off-peak prices, it makes money throughout the day.While the campus pays both peak, and off-peak prices with a 1 kW/h charger, it breaks even, as the last payment of the day takes net profit to zero (Figure 4).
The tariff rate changes throughout the day.The low tariff rate is 12 p/h, and the high tariff rate is 15 p/h.When these prices are paid, the net profit ends at zero at 17:00.If the campus pays off-peak prices to the EV owner for any hour of the day, 12 p/day is earned as the last payment of the day takes net profit to 12 p. Figure 5 presents the outcome of net profit.A 3.63 kW/h charger's values were calculated using the EVs' batteries at peak times and re-charging at off-peak prices.It also shows that if the University charges the EV batteries at off-peak rates instead of peak rates, the EV owner's and the campus can profit, as is shown in columns 4 and 5 in Table 1.If the university buys and sells at off-peak prices, it makes money throughout the day.While the campus pays both peak, and off-peak prices with a 1 kW/h charger, it breaks even, as the last payment of the day takes net profit to zero (Figure 4).
The tariff rate changes throughout the day.The low tariff rate is 12 p/h, and the high tariff rate is 15 p/h.When these prices are paid, the net profit ends at zero at 17:00.If the campus pays off-peak prices to the EV owner for any hour of the day, 12 p/day is earned as the last payment of the day takes net profit to 12 p. Figure 5 presents the outcome of net profit.Table 2 presents a 6.66 kW/h charger that brings in a net profit of 79.92 p/day when the campus pays off-peak prices at all times of the day.
The battery capacity needed to match 10 charging stations costs £27,432.90depending on the supplier, whereas the 10 charging stations purchase and installation costs £8790, giving the same amount of energy storage at one time, assuming maximum capacity of EVs.This provides a saving of £18,642.90.Lithium-ion batteries have a lifespan of 2-3 years or 300-500 charge cycles meaning this cost will build up over time.The charging stations are designed to last at least 10 years with parts that are easily replaceable, and most of them have a warranty of 3 years.The charging and discharging rate of a 6.66 kW/h charger throughout the day has been presented in Figure 6.The outcome of charging and discharging the EV battery by 6.66 kW/h using a 6.66 kW charger if the car leaves with the same capacity as it was once plugged in, the EV owner could earn 79.92 p/day.If the EVs' owners return to their vehicle and it is out of charge, they are unlikely to use the V2G method.Taking this into account, for this simulation, the campus must have the car fully charged by 17:00 when most classes are finished.The battery capacity needed to match 10 charging stations costs £27,432.90depending on the supplier, whereas the 10 charging stations purchase and installation costs £8790, giving the same amount of energy storage at one time, assuming maximum capacity of EVs.This provides a saving of £18,642.90.Lithium-ion batteries have a lifespan of 2-3 years or 300-500 charge cycles meaning this cost will build up over time.The charging stations are designed to last at least 10 years with parts that are easily replaceable, and most of them have a warranty of 3 years.The charging and discharging rate of a 6.66 kW/h charger throughout the day has been presented in Figure 6.The outcome of charging and discharging the EV battery by 6.66 kW/h using a 6.66 kW charger if the car leaves with the same capacity as it was once plugged in, the EV owner could earn 79.92 p/day.If the EVs' owners return to their vehicle and it is out of charge, they are unlikely to use the V2G method.Taking this into account, for this simulation, the campus must have the car fully charged by 17:00 when most classes are finished.The EV owner could earn 79.92 p per day, but the campus would lose that too.The campus, however, would not have to pay for large battery installation for the energy storage.In the case of 10 charging stations, the approximate loss becomes £7.99 a day for the university.The loss may accumulate up to the total cost of the battery capacity of 10 charging stations after 6.4 years.The battery must be changed every 2-3 years depending on the frequency of use.Overall, if the university campus installed ten 6.66 kW/h EV charging stations instead of buying the lithium-ion battery capacity to cover the capacity of the charging stations, the university would save £79,856.29 every 10 years.It is assumed that the batteries had to be replaced every two years and the charging stations are every 10 years.The day was simulated and mapped out, assuming the car was plugged in at 08:00 at 80% and unplugged at 17:00 at 100%, as is shown in Figure 7.
This method charges the battery as much as possible, which is 6.66 kW/h for 5 h in the day and thus, discharges it, so it sums to 100% by 17:00.This was calculated through: In Equation ( 11), the 'Dc' is the discharge/day, the 'Oc' is the charge before the EV is plugged in, the 'Cr' is how much the EV is charged during a cycle, and the 'Fc' is the EV's capacity at 100% charge.This allows the EV to leave with 100% charge, while still discharging as much as possible at peak times.

Net Savings and Charge and Discharge Times
The savings for the owner is largely dependent on the cost of the battery for the EV as a costly battery may lead to a lower net profit.The savings can be calculated through this section.A new Tesla Model S has a battery warranty of 8 years, which can last 20 years or more [12].Three EV models are used to calculate the rate of battery degradation.The models are classified as type A, B and C. EV type A, and type B have a battery warranty of 8 years.The cost of type C's battery is replaced roughly $5000 to $7000 according to 'Interesting Engineering' [11], whereas type A's battery will cost $5500 [13] with a lifespan of 20 years also.On average, the cost for an EV car battery then is $6000 or £4666.20 on 20 February 2020.The lifespan of an EV battery during this method must include faster battery degradation, so using the data taken from References [11,12,36,37], it would have a rough lifespan of 4.81 years until it has 80% of its full battery capacity left, which has been shown below.
If the average UK mileage is 12,231 km per annum and type A's battery lasts 20 years, this equates to 244,620 km.The term 'NFc' is the number of full charges, 'DL' is the distance travelled before 20% battery capacity loss, and 'DFc' is the distance from a full charge in miles.
Assuming the EV is plugged in at 80% at 08:00 and is un-plugged at 100% at 17:00, the battery discharges by 25.3 kW/day, and charges 33.3 kW/day.The battery is discharged 63.25% per day.The standard capacity 'SC' over 20 years is: The EV must charge by 69,330.6 kW over the 20 years instead of 16,656 kW if it were not using the V2G method.If 16,626 kW reduces the battery to 80% in 20 years, then at 208.2 kW, there is a 1% loss per year.If the EV is being charged by 69,330.6 kW, there is a 4.16% loss per year.The lifespan calculation of the battery has been shown in Equation (14).
The EV's battery will have deteriorated to 80% after 4.81 years of the maximum capacity where Tesla recommends that the battery is replaced.If EV type A's battery costs £4265 and needs to be replaced every 4.81 years instead of every 20, the incentives must be great.As shown above, the EV owners will make £268.52 /year or £1291.64before purchasing another battery.For the consumer to break even, the campus must pay £3.30 per day or £0.825 per hour to the EV owner, assuming the simulation parameters.The campus will save £1749.45 per year using these parameters.
The outcome will be greatly affected by the energy demand of the building as for this example, if the battery storage were for only peak times, it would only need to have a capacity of 1916 kW over 4 h, which is equivalent to 72 charging stations.A 10-year simulation on the cost analysis and ROI of installing EV chargers on campus with storage equivalent of all times of the day showing V2G storage is significantly less costly in Figure 8.The battery equivalent is only the price for the battery capacity, as the battery will also need to be charged, so the energy still needs to be bought.The EV V2G storage is the cost of the charging stations.After 2 years, the campus Li-ion battery should be replaced, whereas the EV battery should be replaced every 4.81 years.A 10-year simulation on the cost analysis and ROI of installing EV chargers on campus with storage equivalent of only peak-times of the day leading to a smaller cost for V2G storage than any other system, which is presented in Figure 9.The battery equivalent is only the price for the battery capacity, as the battery will also need to be charged, so the energy still needs to be bought.The EV V2G storage is the cost of the charging stations.After 2 years, the campus Li-ion battery should be replaced, whereas the EV battery should be replaced every 4.81 years.A 10-year simulation on the cost analysis and ROI of installing EV chargers on campus with storage equivalent of only peak-times of the day leading to a smaller cost for V2G storage than any other system, which is presented in Figure 9.The battery equivalent is only the price for the battery capacity, as the battery will also need to be charged, so the energy still needs to be bought.The EV V2G storage is the cost of the charging stations.After 2 years, the campus Li-ion battery should be replaced, whereas the EV battery should be replaced every 4.81 years.A 10-year simulation on the cost analysis and ROI of installing EV chargers on campus with storage equivalent of only peak-times of the day leading to a smaller cost for V2G storage than any other system, which is presented in Figure 9.A 10-year simulation of cost analysis and ROI of installing EV chargers on campus with storage equivalent of peak and off-peak times shows the significant price difference between off-peak and peak-time, which is presented in Figure 10.
Sustainability 2021, 13, x FOR PEER REVIEW 14 of 25 A 10-year simulation of cost analysis and ROI of installing EV chargers on campus with storage equivalent of peak and off-peak times shows the significant price difference between off-peak and peak-time, which is presented in Figure 10.After one year, it is cheaper to purchase the peak-time energy from the grid, rather than using the V2G method at peak-times.This is because the EV chargers must be bought and installed for the first year.The year 5 and 10 year plans show that the V2G method is cheaper than purchasing from the grid.Off-peak prices from the grid are higher overall than peak-time as more off-peak hours are available than peak-hours.

Energy Consumption Prediction Using ML
While most research and applications of machine learning and computational intelligence techniques relate to the energy consumption and price of electricity, the use of such technologies for enhancing future prediction is yet to be realised and demonstrated.A neural network (NN) has been employed to predict the future energy demand and the future V2G cost for the years 2018 and 2019.The predictions for energy demand on each month in a year have been presented in Figure 11.After one year, it is cheaper to purchase the peak-time energy from the grid, rather than using the V2G method at peak-times.This is because the EV chargers must be bought and installed for the first year.The year 5 and 10 year plans show that the V2G method is cheaper than purchasing from the grid.Off-peak prices from the grid are higher overall than peak-time as more off-peak hours are available than peak-hours.

Energy Consumption Prediction Using ML
While most research and applications of machine learning and computational intelligence techniques relate to the energy consumption and price of electricity, the use of such technologies for enhancing future prediction is yet to be realised and demonstrated.A neural network (NN) has been employed to predict the future energy demand and the future V2G cost for the years 2018 and 2019.The predictions for energy demand on each month in a year have been presented in Figure 11.
A general smooth trend is observed from January to April in Figure 11.However, the prediction accuracy has been slightly decreased in the month May for the year 2018 and 2019, due to the inconsistency of the trend in actual data observed in training compared to the previous years.The fundamental principles of ML techniques are to follow the trend of its training state during prediction.Hence, the prediction of energy consumption for the remaining months gradually increases in this study.The data showing as blue in the graph is indicated as actual data, whereas the orange data is the predicted output.
The yearly average prediction of energy demand for the building has also been presented in Figure 12 for the same years 2018 and 2019.It is observed that a smooth trend exists in the actual data for all years.Hence, the predictions followed the actual curve.
The predicted yearly average and actual recorded yearly average are different.The prediction error for 2018 and 2019 are 13,170 kW and 8846 kW.The error percentages for the years are 5.62% and 3.98%, respectively.This error is due to the volatility of energy consumption.
The data collected through electricity meters and the predicted data using the machine learning are varied.This variation can be shown as the prediction error below in Figure 13.A general smooth trend is observed from January to April in Figure 11.However, the prediction accuracy has been slightly decreased in the month May for the year 2018 and 2019, due to the inconsistency of the trend in actual data observed in training compared to the previous years.The fundamental principles of ML techniques are to follow the trend of its training state during prediction.Hence, the prediction of energy consumption for the remaining months gradually increases in this study.The data showing as blue in the graph is indicated as actual data, whereas the orange data is the predicted output.
The yearly average prediction of energy demand for the building has also been presented in Figure 12 for the same years 2018 and 2019.It is observed that a smooth trend exists in the actual data for all years.Hence, the predictions followed the actual curve.The predicted yearly average and actual recorded yearly average are different.The prediction error for 2018 and 2019 are 13,170 kW and 8846 kW.The error percentages for the years are 5.62% and 3.98%, respectively.This error is due to the volatility of energy consumption.
The data collected through electricity meters and the predicted data using the machine learning are varied.This variation can be shown as the prediction error below in Figure 13.The largest error was in April 2018, at 15.1%.The month with the lowest error was in September 2019 at 0.08%.April's recorded energy consumption variance was the highest, at 98,162 kW.September's recorded energy consumption variance was among the lowest, at 9680 kW.The input data consisted of the energy consumption, so the more volatile the data, the harder it is to predict, and thus, the inaccuracy for the month, April.The average prediction error across all outputs is 5.1%.
prediction error for 2018 and 2019 are 13,170 kW and 8846 kW.The error percentages for the years are 5.62% and 3.98%, respectively.This error is due to the volatility of energy consumption.
The data collected through electricity meters and the predicted data using the machine learning are varied.This variation can be shown as the prediction error below in Figure 13.The largest error was in April 2018, at 15.1%.The month with the lowest error was in September 2019 at 0.08%.April's recorded energy consumption variance was the highest, at 98,162 kW.September's recorded energy consumption variance was among the lowest, at 9680 kW.The input data consisted of the energy consumption, so the more volatile the

Cost of Electricity Prediction for V2G Using ML
The employment of NN has brought great performance in predicting the cost of electricity, which has been presented in Figure 14.From the results, it is found a smooth prediction trend for the month January and February.However, the prediction accuracy has been observed irregularity for the month May to July, due to having nonsmooth trend of the actual data for those months for the year 2018 and 2019, which has been shown as yellow colour in the figure.The prediction cost from the month August to December has shown a smooth trend between the actual and predicted values.Although accuracy has been slightly decreased for the months September and October.
Sustainability 2021, 13, x FOR PEER REVIEW 18 of 25 data, the harder it is to predict, and thus, the inaccuracy for the month, April.The average prediction error across all outputs is 5.1%.

Cost of Electricity Prediction for V2G Using ML
The employment of NN has brought great performance in predicting the cost of electricity, which has been presented in Figure 14.From the results, it is found a smooth prediction trend for the month January and February.However, the prediction accuracy has been observed irregularity for the month May to July, due to having nonsmooth trend of the actual data for those months for the year 2018 and 2019, which has been shown as yellow colour in the figure.The prediction cost from the month August to December has shown a smooth trend between the actual and predicted values.Although accuracy has been slightly decreased for the months September and October.
Sustainability 2021, 13, x FOR PEER REVIEW 18 of 25 data, the harder it is to predict, and thus, the inaccuracy for the month, April.The average prediction error across all outputs is 5.1%.

Cost of Electricity Prediction for V2G Using ML
The employment of NN has brought great performance in predicting the cost of electricity, which has been presented in Figure 14.From the results, it is found a smooth prediction trend for the month January and February.However, the prediction accuracy has been observed irregularity for the month May to July, due to having nonsmooth trend of the actual data for those months for the year 2018 and 2019, which has been shown as yellow colour in the figure.The prediction cost from the month August to December has shown a smooth trend between the actual and predicted values.Although accuracy has been slightly decreased for the months September and October.The yearly average cost of the building has also been presented in Figure 15 for the year 2018 and 2019.Having the smooth trend of actual data for all years, the prediction for both the years followed the actual trend.The yearly average cost of the building has also been presented in Figure 15 for the year 2018 and 2019.Having the smooth trend of actual data for all years, the prediction for both the years followed the actual trend.The months in the middle of Figure 16, within summer, have a higher power consumption than months in neighbouring seasons.While building becomes hotter, air conditioning is used instead of heating.This shows that air conditioning uses more energy than heating for the building.The power consumption varies from roughly 225,000 kW to 290,000 kW.The months in the middle of Figure 16, within summer, have a higher power consumption than months in neighbouring seasons.While building becomes hotter, air conditioning is used instead of heating.This shows that air conditioning uses more energy than heating for the building.The power consumption varies from roughly 225,000 kW to 290,000 kW.The data taken from electricity meters and the predicted data through ML are different.In the case of larger difference, the error is shown high (Figure 17).The data taken from electricity meters and the predicted data through ML are different.In the case of larger difference, the error is shown high (Figure 17).
The largest error percentage was 32% in April 2018.The month with the lowest error was in September 2019 at 1.74%.The average error in prediction is 7.94% over 2018 and 2019.April is more varied through the years than the other months.It ranges from £15,662 to £4081 for the use of the V2G method between 2016 and 2019.This is a difference of £11,581.September is less varied.It ranges from £5711 to £9105.This is a difference of £3393.The average error across all months is 7.9%.The more varied the data is, the more data is necessary for an accurate prediction.Between 2017 and 2019, April's calculated V2G cost varied by £6822, whereas between 2017 and 2019, it varied by £5823.The cost of the V2G method is directly linked to energy consumption.The variance of the date is the reason for the error.Additional data, including weather, footfall, etc., can be added to enhance the performance of ML.The largest error percentage was 32% in April 2018.The month with the lowest error was in September 2019 at 1.74%.The average error in prediction is 7.94% over 2018 and 2019.April is more varied through the years than the other months.It ranges from £15,662 to £4081 for the use of the V2G method between 2016 and 2019.This is a difference of £11,581.September is less varied.It ranges from £5711 to £9105.This is a difference of £3393.The average error across all months is 7.9%.The more varied the data is, the more data is necessary for an accurate prediction.Between 2017 and 2019, April's calculated V2G cost varied by £6822, whereas between 2017 and 2019, it varied by £5823.The cost of the V2G method is directly linked to energy consumption.The variance of the date is the reason for the error.Additional data, including weather, footfall, etc., can be added to enhance the performance of ML.

General Discussion
To cover the cost of battery degradation for the EV owner, the energy must be bought at 85.2 p/kW.This price has been considered to build ML models.Figure 11 has been analysed by comparing the actual data and the predicted data.The difference between the predicted and actual energy demand yearly averages, as shown in Figure 12, is a total of 22,016 kW between 2018 and 2019.This gives a prediction error of 2.07%.The least accurate month is in August, shown in Figure 11, the variance in 2018 and 2019 is 29,835 kW, which is 5.57% of the maximum value.The least accurate month from Figure 14, showing the price of the V2G method, is in April.On the other hand, the values collected through installed electric meters from 2018 and 2019 are £4081 and £7818, respectively, whereas the predicted values are £6004 and £6944, respectively.The prediction errors for 2018 and 2019 are £1923 and £875, which are 32% and 11%, respectively.This variance stems from the volatility of the energy demand in April, as is shown in Figure 11.
The prediction error is most common in months with a larger variance of data.The more varied and inconsistent the input data is the more input data is needed to secure an accurate output.In Figures 13 and 17, has the highest energy consumption, also the month with the highest price for V2G use, whereas the same with the months with the lowest V2G price and energy consumption.The method is used so that the EVs are fully charged by 17:00, allowing the EV owner to drive home and back to the university building the next day with an 80% charge, but this can be changed in the future.Smart metering can be used so the owner of the EV can input what time they will leave.The method will then

General Discussion
To cover the cost of battery degradation for the EV owner, the energy must be bought at 85.2 p/kW.This price has been considered to build ML models.Figure 11 has been analysed by comparing the actual data and the predicted data.The difference between the predicted and actual energy demand yearly averages, as shown in Figure 12, is a total of 22,016 kW between 2018 and 2019.This gives a prediction error of 2.07%.The least accurate month is in August, shown in Figure 11, the variance in 2018 and 2019 is 29,835 kW, which is 5.57% of the maximum value.The least accurate month from Figure 14, showing the price of the V2G method, is in April.On the other hand, the values collected through installed electric meters from 2018 and 2019 are £4081 and £7818, respectively, whereas the predicted values are £6004 and £6944, respectively.The prediction errors for 2018 and 2019 are £1923 and £875, which are 32% and 11%, respectively.This variance stems from the volatility of the energy demand in April, as is shown in Figure 11.
The prediction error is most common in months with a larger variance of data.The more varied and inconsistent the input data is the more input data is needed to secure an accurate output.In Figures 13 and 17, has the highest energy consumption, also the month with the highest price for V2G use, whereas the same with the months with the lowest V2G price and energy consumption.The method is used so that the EVs are fully charged by 17:00, allowing the EV owner to drive home and back to the university building the next day with an 80% charge, but this can be changed in the future.Smart metering can be used so the owner of the EV can input what time they will leave.The method will then be altered, depending on the leaving time, so the EV is fully charged.It is refreshed hourly; however, the time could be shortened to provide a more efficient V2G method.
In this work, a novel smart multienergy system with the ability to combine various energy storage technologies have been proposed to provide the best economic and environmental options for a given demand.The EV, energy storage and transaction of on-site energy must work in unison to enable an effective V2G model.Mazzoni et al. [38] have analysed the use of energy storage systems, including combined heat and power units, which show great financial and environmental benefits.V2G provides an incentive-pricing plan by motivating electric vehicles owners through participating in a charging/discharging system [39].The master planning issue on this could be that the EVs' owners can charge vehicles at a low cost using unused or extra power in the grid during off-peak demand.In the case of shortage of power in the grid system during on-peak demand, EVs owners can earn money by discharging extra stored power from their vehicles at a higher price.
The implementation of a V2G method in any university campus or similar set-up requires inspection of key economic parameters, including initial investment, operational expenditure, maintenance, return on investment, and end net profit.Key technical parameters of energy storage include type (thermal, chemical, kinetic), capacity, physical size, charge and discharge rate, depth of discharge, and lifespan of the storage technique [39].The economic parameters dictate the transferability of the V2G method as EV chargers must be installed, and there must be a return on investment to confirm that the method is transferrable to another circumstance.The technical parameters dictate how effective the method is.The buildings' characteristics (useable space, times of use, demand etc.) need to be met with a battery of the correct size, capacity, depth of discharge, and rate of charge, to ensure the method is effective.The replicability of the V2G method is dependent on available space for EV chargers, energy characteristics of the building, initial investment and storage techniques.

Conclusions
A V2G set-up of a University campus was modelled based upon energy demands, potential supply and net profits.A method of integrating V2G technology into a campus has been created under different scenarios, various demands, such as peak time and offpeak, to allow the V2G method to take place.The investigation shows that the proposed method is economically and environmentally beneficial.The proposed method can adapt depending on the variables, such as the type of EV, battery life, times and intensity of supply and demand etc. Results reveal that using the charge from EVs costs 64.7% less and 9.79% less than purchasing from the grid and using battery storage, over the 10-year period, at all times of the day.For only peak times, the cost was 10.8% less and 10.3% less than purchasing from the grid and using battery storage over the 10-year period.The finance authority can change to match requirements to suit the owners of the installations or to add incentives for the EV users.Thus, both parties gain profit instead of simulating just the benefit of using V2G for the National Grid, which has been performed thoroughly and presented in various articles [9].The university campus is used instead, showing the great financial benefits to provide incentives to improve the growth of the V2G utilisation.
The future of EVs is rapidly growing with efficiency, effectiveness [40][41][42][43], and popularity for reducing carbon footprint [44][45][46][47], lower cost of EVs, the opportunity of battery replacement and the increment of the lifespan of the batteries.Although many research works are conducting on surrounding EVs [48][49][50] however, the main obstruction for any V2G method is that the EV consumers will have to buy new batteries more often, and they will require an incentive to sell their electricity.Therefore, the electricity from the EVs needs to be paid for at a high enough rate that at least the replacement of the battery can be covered.This drastically reduces the effectiveness.
Feed forward NN has provided accurate results regarding the energy generation and V2G cost predictions, for the months of April and May.The months of April and May were less accurate, due to the volatility of the energy demand, with an error of 11% and 32%.More data regarding the V2G price could be added into the MLA, and various MLA's can be employed to prove the accuracy of volatile energy demands.The V2G price analysis didn't include the price of installation, only the price of purchasing the energy from the EVs at 85.2 p/kW.The main method used 104 EV chargers, whereas the MLA for the V2G price uses; however, many chargers are needed for the demand of the month.The amount of 6.66 kW chargers ranges from 24 to 104.Further work on the MLA could include integrating this with other energy factors of the building, such as renewable generation, to drive future building development towards carbon reduction.
In the future, a smart meter can be designed to meet the EV owners' demands so that it can be decided to select the time of charging their EVs.The users should be well informed about the degradation of their car battery and estimated their net profit.In addition, buildings with many customers, such as the Manchester University campus or various businesses, could reduce the cost of energy bill by applying the proposed method.

Figure 1 .
Figure 1.The methodological steps of the V2G implementation.

Figure 1 .
Figure 1.The methodological steps of the V2G implementation.

Figure 4 .
Figure 4. Campus net profit while peak-time and off-peak prices are paid.

Figure 5 .
Figure 5. Campus net profit while exclusively pays off-peak prices.

Figure 4 .
Figure 4. Campus net profit while peak-time and off-peak prices are paid.

Figure 4 .
Figure 4. Campus net profit while peak-time and off-peak prices are paid.

Figure 5 .
Figure 5. Campus net profit while exclusively pays off-peak prices.Figure 5. Campus net profit while exclusively pays off-peak prices.

Figure 5 .
Figure 5. Campus net profit while exclusively pays off-peak prices.Figure 5. Campus net profit while exclusively pays off-peak prices.

Figure 6 .
Figure 6.The profit earned by the campus per day.Figure 6.The profit earned by the campus per day.

Figure 6 .
Figure 6.The profit earned by the campus per day.Figure 6.The profit earned by the campus per day.

Figure 7 .
Figure 7.The times of peak and off-peak while the battery is being charged or discharged.

Sustainability 2021 , 25 Figure 8 .
Figure 8. 10-year energy price for all times of the day.

Figure 9 .
Figure 9.A 10-year simulation on the cost analysis during peak time.

Figure 8 .
Figure 8. 10-year energy price for all times of the day.

Sustainability 2021 , 25 Figure 8 .
Figure 8. 10-year energy price for all times of the day.

Figure 9 .
Figure 9.A 10-year simulation on the cost analysis during peak time.

Figure 9 .
Figure 9.A 10-year simulation on the cost analysis during peak time.

Figure 10 .
Figure 10.A 10-year simulation on the cost analysis on campus during off-peak time.

Figure 10 .
Figure 10.A 10-year simulation on the cost analysis on campus during off-peak time.

Figure 11 .
Figure 11.Energy consumptions prediction on a monthly basis for the year 2018 and 2019 using the MLA.(e.g., November (Act.) and November (Pred.).

Figure 12 .
Figure 12.Annual average energy demand prediction using NN.

Figure 12 .
Figure 12.Annual average energy demand prediction using NN.

Figure 13 .
Figure 13.Error percentage for predicted energy consumption compared to recorded.

Figure 14 .
Figure 14.The prediction of cost for electricity of V2G on a monthly basis for the year 2018 and 2019 using ML.

Figure 14 .
Figure 14.The prediction of cost for electricity of V2G on a monthly basis for the year 2018 and 2019 using ML.

Figure 15 .
Figure 15.Annual average cost of electricity prediction using NN.

Figure 16 .
Figure 16.Monthly basis energy consumption of the building.

Figure 16 .
Figure 16.Monthly basis energy consumption of the building.

Figure 17 .
Figure 17.Error percentage for predicted EV purchasing price.

Figure 17 .
Figure 17.Error percentage for predicted EV purchasing price. .

Table 1 .
Energy sale management based on time and price between EV owner and the university campus.

Table 2 .
Net profit per day while the campus pays off-peak prices.
Error percentage for predicted energy consumption compared to recorded.