Artiﬁcial Intelligence for Electric Vehicle Infrastructure: Demand Proﬁling, Data Augmentation, Demand Forecasting, Demand Explainability and Charge Optimisation

: Electric vehicles (EVs) are advancing the transport sector towards a robust and reliable carbon-neutral future. Given this increasing uptake of EVs, electrical grids and power networks are faced with the challenges of distributed energy resources, speciﬁcally the charge and discharge requirements of the electric vehicle infrastructure (EVI). Simultaneously, the rapid digitalisation of electrical grids and EVs has led to the generation of large volumes of data on the supply, distribution and consumption of energy. Artiﬁcial intelligence (AI) algorithms can be leveraged to draw insights and decisions from these datasets. Despite several recent work in this space, a comprehensive study of the practical value of AI in charge-demand proﬁling, data augmentation, demand forecasting, demand explainability and charge optimisation of the EVI has not been formally investigated. The objective of this study was to design, develop and evaluate a comprehensive AI framework that addresses this gap in EVI. Results from the empirical evaluation of this AI framework on a real-world EVI case study conﬁrm its contribution towards addressing the emerging challenges of distributed energy resources in EV adoption.


Introduction
Human emissions of greenhouse gases is the primary driver of the most pressing challenge faced by human civilisation, climate change [1].Fossil fuels account for over 75% of global greenhouse gas emissions and nearly 90% of all carbon dioxide emissions [1].In order to ensure at least 50% likelihood of staying within 2 °C of global warming, sustainability initiatives should target a 3-5% yearly decrease in the greenhouse gas emissions until 2030 and a further total decrease of 50-80% by 2050 [2].The transportation sector is one of the largest consumers of fossil fuels at more than 90% of all vehicles, a majority lightduty vehicles such as cars, but also trucks, ships and aeroplanes [3,4].The sustainability of distributed energy sources is a necessary mechanism to reduce energy emissions and energy demand while also addressing the challenges of a warming planet.In response to this challenge, advanced economies across the world are increasingly adopting plug-in hybrid electric vehicles (PHEV) and electric vehicles (EVs) in both public and private transport sectors [5].This growth in transport electrification will lead to significant changes in the energy landscape from generation, distribution, regulation, supply and consumption.Commercially, global vehicle manufacturers have invested more than USD 140 billion in transportation electrification, with approximately 130 EV models estimated to be available in global markets by 2023 [6,7].Besides its environmental benefits, EVs are also attributed with an increased efficiency, low maintenance, noise reduction and the opportunity to be recharged [7][8][9].However, effective transport electrification also requires a significant investment in the electric vehicle infrastructure (EVI) design, implementation and operation.Government initiatives such as the European Investment Bank's EUR 1.6 billion supporting EVI and battery projects in EU member countries [10], the Australian Government's AUD 1 billion Clean Energy Innovation Fund for EVI [11], and the Bipartisan Infrastructure Law and National Electric Vehicle Infrastructure Formula program in the USA [12] are instrumental in this transformation of the EVI.Simultaneous to a financial investment in EVI, several technical challenges in EVI need to be addressed for increased adoption and integration of PHEVs and EVs into transport electrification.This primarily stems from the divergent origins of the two sectors: the limited to no intersection or interaction between conventional fossil-fuel-based transportation and the electricity sector.In contrast, EVI is transforming this into a significant intersection or dependency where transport electrification is not only a new consumer of electricity, but in some scalable settings, it is also a supplier of energy to electrical grids [8], as well as providing supplementary services such as harmonic mitigation and reactive power supply [13,14].The technical challenges that need to be addressed to realise these opportunities include optimised charging locations and capacity, operationalising EV aggregators, controlling for power generation, transmission and distribution, as well as the integration, coordination and overall optimisation of power, control and communication infrastructure [5,8,14].For instance, in a real-world application setting, the aggregation of energy demand and supply can be captured as data streams that are learned, profiled, predicted and optimised to identify underlying causal behaviours and thereby provide scheduling opportunities for the EVI and related distributed energy sources.In such a setting, most EV users expect to have a typical behaviour on work days where the charging events start soon after the morning peak and end just before the evening peak, which then enables opportunities for scheduling.It is within this control, communication and operations management space that we propose a comprehensive AI framework.
The objective of this study was to address the technical challenges of a rapidly expanding EV infrastructure using AI capabilities.Thereby, the main contribution was the design, development and evaluation of an artificial intelligence (AI) framework for charge-demand profiling, data augmentation, demand forecasting and optimisation of the EVI.The framework consists of five modules, namely demand profiling, data augmentation, demand forecasting, forecast explainability, charge optimisation, supported by a centralised EVI data lake for a cyclic connection of information sharing between these often disconnected capabilities in a practical EVI setting.
The rest of the paper is organised as follows.Section 2 presents related work on the application of AI for the improved operations and management of the EVI, followed by Section 3 that delineates the overall composition of the proposed AI framework.In Section 4, we present the constituents of the AI framework alongside an empirical evaluation of its functionality in a real-world application setting.Section 5 presents a discussion, and Section 6 concludes the paper.

Related Work
This section begins with a deliberation on AI in the broad topic of transport electrification, focusing on challenges and opportunities.Given the modular composition of the proposed AI framework, the second part of this section focuses on related work in AI that is relevant to each module and the expected capabilities of that module.
The role of AI in transport electrification was initially studied by [15], where they reported on the benefits of AI across all EVI functionality, such as energy efficient EV routing, charging-point selection, integration of EVs into the smart grid, battery-charging algorithms and network congestion management algorithms.They also documented the key challenges in this space as uncertainty, dynamism, interoperability, privacy and real-world validation, followed by the need for operating standards that enable universal adoption.In a recent review [8], the authors have explicated the role of AI in terms of facilitating the charging process, automatic power balancing capabilities, adaptive charging, the mobility analysis of EVs, the transition process of assisted driving and the management of demand-supply for the charge and discharge of the EVI.They also deliberated on the emerging development of the Internet of EVs (IoEVs), as a complex system of humans, vehicles, humans, data, algorithms and EV infrastructures.A blockchain-based decentralised energy framework was proposed in [16], where a novel algorithm was presented for data exchange between the EV fleet and the grid.Related to the EVI but on the topic of AI and EVs, the utility of AI in semiconductor devices, design and prognostics and thermal management design was reported by Paret et al. [17].In [18], the authors claimed the current research and practice of AI in the EV infrastructure was still in the early stages of development, where they enumerated the application of AI in EV battery design and discovery, battery management and the smart control of EVI hardware and auxiliary systems.More broadly in transport electrification, the intelligent detection of driver behaviour changes [19], commuter behaviour profiling [20], self-learning for autonomous surveillance [21], bidding optimisation with uncertainty [22] and urban traffic control and optimal coordination [23,24] have also been reported in the recent literature.
In terms of EV charge-demand profiling, a stochastic model for EV users was proposed by Fotouhi et al. [25] and used for the investigation of the congestion of charging stations by an increasing number of EVs in order to achieve an appropriate service quality.EV user behaviour was modelled as a state machine, such that there was a behavioural reaction of the driver to the battery state of charge.Quirós-Tortós et al. [26] analysed the charging behaviour of 221 EVs, using a dataset of over 68,000 data samples.Diverse charging features were modelled into probability density functions to analyse EV user behaviour and augmentation.In terms of EV charge schedule optimisation, Cao et al. [27] proposed an intelligent method to control the EV charging load in response to the time-of-use (TOU) price in a regulated market.By using an iterative algorithm, EVs were able to adjust the charging power and time, reduce the cost of consumers, and thus "reduce peaks and fill valleys" in the load demand.In [28], a day-ahead EV-charging scheduling based on an aggregative game model was proposed.The impacts of the EV demand on electricity prices were formulated with the game model in the scheduling considering possible actions of other EVs.A quadratic programming technique was used to calculate the Nash equilibrium of the game model.Furthermore, González Vayá and Andersson [29] proposed a bidding price market with a bilevel mixed-integer linear programming approach, while Vandael et al. [30] proposed a reinforcement learning approach to learn and adapt to the charging behaviour of an EV fleet.Kristoffersen et al. [31] modelled EVs as prosumers that determined charging price through participation in a transitive market.As exemplified in this section, the related literature on the application of AI in EVs and EVI are limited to a few reviews and implementations.To the best of our knowledge, a comprehensive study of the practical value of AI algorithms in charge-demand profiling, data augmentation, demand forecasting and the optimisation of the EVI has not been explored.In the following section, we propose an AI framework that addresses this gap, alongside its empirical evaluation using a real-world case study.

Proposed AI Framework
The proposed AI framework operates within the digitalised EVI as depicted by the lowest layer of Figure 1.As explicated by Das et al. [14]), the EVI receives data and communications from the upper levels of a typical smart grid, such as the transmission network and control centres for utility and distribution.Additionally, it would also have direct feeds from renewables within local microgrids.The constituents of the proposed AI framework are depicted in Figure 2, consisting of five modules supported by a central EVI data lake.This data lake maintains a persistent record of all data inputs, actionable outputs and intelligent processes of the five modules, which in turn facilitates a layer of knowledge representation for current and future EVI operations.This layer of knowledge representation can be used for both lateral and hierarchical communication within the smart grid.The five modules of the proposed AI framework are, EV charge-demand profiling, EV data augmentation, charge-demand forecasting, forecast explainability and EV charge optimisation.Figure 2 further depicts the transition of information and insights between these five modules, as well as the cyclic composition of the framework where the charge optimisation feeds back recurrently into the demand profiling for the next iteration of EVI usage.The modules of this framework operate on diverse AI capabilities, such as association, profiling, prediction and optimisation.The algorithms used for these capabilities can be summarised as the k-means algorithm, Gaussian mixture models (GMM), multivariate regression and deterministic optimisation.

Constituents of the Proposed AI Framework
Here, we unpack each of the five modules in terms of its AI functionality and algorithmic capabilities.An empirical evaluation of each module is also presented in each subsection where we use the real-world case study of the Adaptive Charging Network (ACN) from Caltech [32].ACN data were collected from two adaptive charging networks inside the Caltech campus and the other at the Jet Propulsion Laboratory (JPL) site.This dataset represents a hybrid of a workplace and a public charging station and provides detailed data about each of the charging sessions.Table 1 summarises the key data points acquired by the EVI in each charging session.A smartphone application was used to interact with the registered users to obtain the details of the requested energy, the model of the vehicle and the time the user planned to depart from the location.This user information is uncommon in EVI data sources, where most contain data collected only when the EVs are connected.

Demand Profiling
In demand profiling, we used AI to determine EV charge demand behaviours and microprofiles that are instrumental in data augmentation to support the downstream applications of demand forecasting and charge optimisation.Suppose the dataset X has N charging session.Each charging session i = 1, 2, . .., N is represented by a multidimensional vector x i = (base year , base month , base day , base weekday , ∆ connect , ∆ disconnect , ∆ done , ∆ modified , ∆ req-departure , e mile , e required ) and the dependent variable, the charged energy, as y i = e charged .Attributes base year , base month , base day and base weekday are the year, month, the day of the month and the weekday of the day for each session's connection time, respectively.All ∆ parameters represent time differences in hours measured from the base date's 0000 h, i.e., the base time.Attributes, ∆ con , ∆ disconnect , ∆ done , ∆ modified and ∆ req-departure represent the time difference between the connection time, disconnection time, done-charging time, user-input modified time and requested departure time and the base time, respectively.e mile and e required are the energy required per mile by the vehicle and the energy requested by the user in kilowatt-hours (kWh).We applied a novel unsupervised learning algorithm, Hyperseed [33], on this 11-dimensional feature space.Hyperseed operates on few-shot learning and a learning rule based on a single vector operation.It has been successfully demonstrated to learn an entire feature space from a few input vectors and few iterations, which qualifies its application in a low-resource, low-energy and time-sensitive setting such as optimised EVI operations at the ebb of a smart grid.The Hyperseed learned projection is depicted in Figure 3a, where it contains two significant profiles identifying charging sessions beginning before and after 0800 h.Furthermore, charging sessions with high energyconsuming EVs form a separate profile closer to that which describes charging sessions after 0800 h.Through this profile generation, we can infer that high-throughput EVs are charged in evening sessions.This Hyperseed projection can be further evaluated using a principal components analysis (PCA), as depicted in Figure 3b-d.Principal component (PC) 1 has feature contributions for ∆ done , ∆ con , ∆ modified , ∆ req-departure and ∆ disconnect of 19%, 19%, 18%, 18% and 17%, respectively, meaning PC1 is more related to the charging time of the day.PC2 has feature contributions for base year , base month and e mile of 36%, 33% and 14%, respectively, while PC3 has feature contributions for e required , e mile and base weekday of 34%, 23% and 13%, respectively.PC2 is a representation of the time of the year the charging session occurred and PC3 is more related to the type of EV, assuming an owner with a higher e mile EV will tend to enter a higher e required during the user input phase during charging sessions.e mile is a vehicle-specific parameter, so the EV user knows the required energy during one charging session.The initial observation of Figure 3b is the profiling of data around two major regions in orange and green.These profiles represent the different times of the day for EV charging.The majority of the orange cluster includes charging sessions that started and ended within the first 8 h of the day, the green cluster represents evening charging sessions after the first 8 h of the day, which is also the largest cluster.Figure 3c reveals another profile, the red cluster, which is a profile of high-energy-consuming EVs.This profile is part of the green cluster, meaning all these high-energy-consuming vehicles were charged in evening sessions.Figure 3d shows that this profile is spread throughout the months in a year meaning these high-energy consumers are regulars of the EVI.The feature importance of the PCA analysis is shown in grey vectors adjacent to each subfigure in Figure 3.The magnitude of the vectors of each feature represents the importance of the feature and the length of the projection of the vector to each PC represents how much each feature contributes towards the PCs.The explained variance for PC1, PC2 and PC3 are 38.1%,13.4% and 9.9%, respectively.

Data Augmentation
Common challenges with EVs and EVI data streams are the imbalanced nature, the low volume of complete data and missing or erroneous values.This is a further challenge that can be addressed using AI techniques.As noted in the proposed AI framework, the demand profiles feed into this module to inform and validate the augmentation process in addition to the original data sources.We demonstrated data augmentation on the ACN dataset [32], which is representative of a workplace charging scenario consisting of over 30,000 charging sessions from 52 electric vehicle supply equipment (EVSE) or fast-charging points.Data augmentation was performed using an unsupervised learning technique, the Gaussian mixture model (GMM) algorithm.A GMM draws on the assumption that data points are generated from a mixture of a finite number of Gaussian distributions with unknown parameters represented as a weighted sum of Gaussian component densities.They are a generalisation of k-means clustering that takes into account latent Gaussian functions and the covariance structure of the data.The data augmentation process begins with the assumption that augmented data are generated using a charging station with q fast-charging points.The EV range is known to be dependent on the ambient temperature of the environment [34], and this can cause some of the seasonal EV charging behaviours to be unrealistic if the same timestamps were to be used.Therefore, in order to conduct a seasonal adjustment to the dataset, a specific location is needed.Here, we decided to adopt a geographically disparate location to Caltech, the city of Melbourne in Australia.The quality of the resulting augmented data confirmed the robustness of using AI for this task, even when the augmentation locations were geographically disparate.Since the augmentation using GMM increased the number of data points, we needed to fix the number of charging stations in order to filter out unrealistic data, so we set q = 52, the same as at the JPL charging site.Furthermore, about 6.5% of the data points in the dataset lacked the user input fields.These missing user input data were completed considering the most popular EVs in Australia in the year 2021 and their EV batteries [35].The seasonal adjustment for the time stamps of the dataset was carried out by matching the yearly temperature charts of California and Melbourne in 2021.The temperature was at an average minimum in the months of December-January in California and June-July in Melbourne for the year 2021.Therefore, the data points in January of the ACN dataset were matched to July in the new dataset and the following months were matched accordingly.The weekday data of each data point was preserved by mapping Mondays to Mondays, Tuesdays to Tuesdays and so on, for all the data points.After completing the missing user input data, the GMM was executed as follows.Suppose the dataset X had N charging session.Each charging session i = 1, 2, . . .,N was represented by a 12-dimensional vector x i = (base year , base month , base day , base weekday , ∆ connect , ∆ disconnect , ∆ done , ∆ modified , ∆ req-departure , e mile , e required , e charged ).Note that here, e charged was included in the feature space.Let the random variable representing x i be X i .We considered that X i was an independently and identically distributed (i.i.d.) random variable according to some unknown distribution.We assumed that all drivers had a finite K number of behaviour profiles, denoted by µ 1 ,..,µ K .Therefore, each of the data points in the dataset could be considered as a deviation of the typical profiles with some probability.A latent variable Y was defined such that Y i ≡ k, if and only if X i was a deviation of µ k .Furthermore, each EV had the identical probability of π k taking µ k such that π k = P(Y i = k) for i = 1, . . .,N and k = 1, . . .,K.Therefore, the difference Xi − µ k could be regarded as a Gaussian noise deviating from the typical profiles.Thus, under the assumption of Y i = k, we let X i ∼ N (µ k , Σ k ) be a Gaussian random variable (r.v.) with mean µ k and covariance matrix Σ k .Finding θ k = (π k , µ k , Σ k ) for k = 1, .., K approximated the underlying distribution as a mixture of Gaussian functions.The probability of observing the data x could then be approximated by, The approximation was done considering K = 10 and the resulting Gaussian functions were used to generate new data points.The green cluster, the orange cluster and the red cluster were fitted with 8, 1, and 1 Gaussian functions, respectively.Initially, 7500 new samples were generated from all 3 profiles, which was about 25% of the original full dataset.The resulting samples were filtered out by removing unrealistic data based on the timestamps.For example, the connection time could not be less than the disconnected time, the charging finished time had to be less than the disconnected time and the resulting date had to be a valid date.This filtering reduced the new samples down to 3395.As per the initial assumption that the charging facility consisted of 52 fast-charging points, no more than 52 EVs could be charged simultaneously, thereby, contradictory samples were removed.This augmented dataset flowed into the next AI module for charge demand forecasting.

Demand Forecasting
This module predicts the next day energy demand for EVI, and these predictions are used in the final module along with the model explainability output for the charge optimisation.The statistical parameters of the distribution of the daily energy delivered are summarised in Table 2. Days where no energy was delivered were omitted assuming that there was some operational fault in the charging infrastructure.Considering the whole dataset, there were 33.05 charging sessions and 31.6 users per day on average.We designed demand forecasting as a multivariate regression problem.The feature space for the regression model generation included the day of the week, energy delivered on the previous day, 3-and 7-day moving averages of the total energy delivered, the month of the year and the number of days since the starting date of the dataset.Two approaches were taken during model generation.The first (Model A), used the total energy delivered daily.The second (Model B) comprised two separate models for the charging sessions started during 0000-0800 h and 0800-2400 h on each day as shown in Figure 4.These two were trained separately with the charging sessions belonging to each of the time periods and the summation of these two models were taken as the output of Model B. This Model B design was informed by the demand-profiling module that revealed two major clusters of data for the charging sessions before 0800 h and after.Model training was performed by allocating 75% of the dataset to training data and the remaining 25% to testing data.Hyperparameter tuning was conducted by a grid search for different types of models and the performances are summarised in Table 3. Models A and B were the final models, and the morning and evening models were intermediary models trained separately to obtain Model B. The morning model corresponded to models trained only using charging sessions before 0800 h and the evening model after 0800 h.The best-performing model was the multi-layer perceptron (MLP) Model B with 2 hidden layers consisting of 6 and 5 neurons in each layer.It had a root mean squared error (RMSE) of 96.753 and mean absolute error (MAE) of 65.096 with a coefficient of determination (COD) of 94.910%.A further inference from Table 3 was that Model B outperformed Model A in every metric.This meant that the underlying user behaviour was better represented through data partitioning across the time axis for green and orange clusters.

Demand Explainability
The demand forecast generated in the previous module could be further processed for the explainability factors that contributed towards this prediction.Explainable AI (or XAI) is a collection of processes and methods to interpret and understand the intelligent output produced by a complex and opaque AI model [36].SHAP (SHapley Additive exPlanations) is a game-theoretic approach for XAI.It assigns each feature an importance value for a particular prediction [37].Demand-forecasting model analysis using SHAP values revealed that the 3-day moving average and the day of the week had the highest SHAP values in the best-performing model meaning that the total EV user charging pattern was closely related to the energy charged in the last 3 days and the day of the week.This could be justified by the typical behaviour pattern in a workplace, where most of the employees report working on weekdays compared to the weekends and tend to charge their EVs based on the most recent charging events of the vehicles.The mean SHAP value and the bee-swarm plots are depicted in Figures 5 and 6, respectively.In these plots, the features in Figures 5 and 6 represent the day of the week, 7-day moving average, 3-day moving average, previous day's delivered energy, month and the date count from the first date of the dataset.

Charge Optimisation
The final module is focused on charge optimisation.It receives inputs on forecasted demand and the contributing factors to this forecast. Minimise/Maximise: Subjected to: Where ε and ł are sets of indices containing equality and inequality constraints.
To solve the following deterministic optimisation problems, we used the sequential least squares programming algorithm (SLSQP).
The SLSQP algorithm was proposed by Klaus [38] and solves a constrained least squares (LSQ) subproblem in each major iteration to generate a descent direction.The LSQ problem solved at iteration k is shown as follows, Minimize: Subjected to: where d k is the search direction to be solved.g k and h k are values of the constraint functions at iteration x k , while g k and h k are current gradients of inequalities and equalities.R k and q k are the least squares matrix and observation vector, respectively, which are updated during optimisation according to the Broyden-Fletcher-Goldfarb-Shanno (BFGS) formula and an LDL updating algorithm.
Following through with our focus on real-world application settings, we conjoined the ACN dataset with conventional demand and supply data collected from a large multibuilding organisational setting for the optimisation experiments.The selected organisational setting was the La Trobe Energy AI/Analytics Platform (LEAP), which is the flagship AI initiative of La Trobe University's commitment towards achieving net zero carbon emissions in all campuses by 2029.The UNICON dataset from LEAP [39] consists of consumption data from smart electricity meter readings with a 15-minute granularity and weather data collected at a two-speed latency of 1 minute and 10 minutes.The Unisolar dataset from LEAP consists of solar energy generation, solar irradiance and weather data from 42 PV sites deployed across five locations [40].

Optimising Maximum EV Demand
In this subsection, we focus on charge optimisation to maximise the EV demand over a period of time.It takes the following inputs: the predicted demand (consumption) for the given time period (which is denoted by the set T), the total demand that can be accommodated for the entire period, the maximum demand that can be accommodated at any time point of the given period, the preferred time period (which is denoted by T pre f ) and the dominating constant (α).The mathematical formulation of the deterministic optimisation problem is presented as follows. Maximise: Subjected to: The objective of the formulation was to maximise the total EV demand for the given period of time (9).Constraint (10) controlled the demand balance while constraint (11) limited the maximum allowed demand.Constraint (12) was set in a way for the solver to not get stuck on the obvious answer for such a problem, which is to have a peak EV demand on minimal building demand time steps (see Figure 7a).It controlled the EV demand spread more towards the preferred time period (see Figure 7b).Furthermore, we introduced α (0 < α ≤ 1) to control the bias towards the preferred time period.As it got closer to 0, it was more biased towards the preferred time period and vice versa.Solving this optimisation reveals the maximum EV demand required by the EVI.This is crucial information for long-term planning to decide whether an expansion is needed in the EVI.The resulting optimised EV demand curve also provides a visualisation of how the EV demand has to be spread across the day in order to avoid peak events.

Experiment 1-Optimising maximum EV Demand
In this experiment, we evaluated the module for optimising the maximum EV demand.It took the following inputs: predicted EVI/building demand (considered provided from the EVI), the total demand and maximum demand that the building can accommodate (these were specific to the building and had a constant value) and the preferred time period (this was selected by the EVI and set to 5 am to 8 am and 5 pm to 8 pm).The dominating constant(α) was set to 0.2.Furthermore, to understand the effect of Equation ( 13), we evaluated the same experiment with and without the constraint (Equation ( 13)). Figure 7b shows the results of the unconstrained optimisation whereas Figure 7a shows the results of the constrained optimisation.We can clearly see that the constraint module tried to force a significant amount of EV demand toward the preferred time period.

Optimising Target EV Demand
In this subsection, we optimised the forecasted total EV demand to spread it across the given time period.It took the following additional input compared to the previous formulation Section 4.5.1, the total forecasted EV demand (D EV tot ).The mathematical formulation of the deterministic optimisation problem is presented as follows. Minimise: Subjected to: The objective of the formulation was to minimise the difference between the total forecasted EV demand and the total EV demand for the given period of time (14).It had a set of similar constraints to the previous formulation as mentioned below: (15) was similar to (10), ( 16) was similar to (11) and finally, (17) was similar to (12).Constraint (18) ensured that total EV demand for the given period of time did not exceed the total forecasted EV demand, in other words, it positively minimised (14).
By solving this optimisation, the EVI is informed with a close-to-realistic day-ahead EV-demand-per-hour curve that helps to minimise the load on the grid.Thus, the EVI is aware of which hours peak events are likely to occur in and act upon them.The EVI may choose to increase the price of charging during these hours in the hope of decreasing demand or bring in other sources such as renewables or battery storage in order to discharge during peak hours.

Experiment 2-Optimising Target EV Demand
In this experiment, we evaluated the module for optimising the target EV demand.It took the forecasted EV demand for the given time period, which was a result of the EV demand prediction module.Constraints and constants were similar to those of the previous experiment.
Figure 8 shows the results obtained for this experiment.(Results here are without the constraint ( 13)).The value of the forecasted EV demand was 1700 kWh.
∀ e ∈ E (c e (t e end − t e start ) ≤ E e ), The objective of the formulation was to minimise the difference between the EV user's charging requirements and the optimum scheduled charging amount for all the users (20).The charge rate was assumed to be constant throughout the charging period of time.Constraint (21) ensured that for any time step, the total sum of charge rates did not exceed the optimised EV demand (which was the output from the previous optimisation).Constraint (22) bounded the start and end times based on the time preference of each EV.Constraint (23) ensured that the optimised charge amount was not greater than the requested charging amount.Constraint (24) limited the charging rate of each EV to stay within a certain practical range.

Experiment 3-Optimising EV Charge Scheduling
In this experiment, we evaluated the module for optimising EV scheduling.For each EV, it took the following inputs: the charging requirement (in kWh) and the preferred charging time.Table 4 displays the sample data for the first five EV users.
Figure 9 shows the resulting final EV demand received from the scheduling experiment which emphasize the behaviour according to the constraints.Furthermore, Table 5 displays the scheduling results for the first five EVs.

Results Analysis
Across all five modules of this framework, we can derive the following results and analysis.The demand-profiling module revealed several key profiles along the time and energy usage dimensions.Demand profiling also provided key information to the demandforecasting stage, where the results suggested that modelling user behaviour on each of the clusters identified during profiling produced a better model performance.The bestperforming demand forecast model was used to identify the contributing features through XAI and SHAP.This revealed the day of the week and the three-day moving average were of high importance.This means most EV charging behaviours were based on the day of the week and how much they had charged in the past few days.The seven-day moving average had a lower feature importance comparatively, implying users were less concerned about the charge cycles from a week ago.In the charge optimisation, experiments 1 and 2 demonstrated the viability of using deterministic optimisation techniques to address constrained EV demand management.According to the simulation results of experiment 3, the optimisation framework managed to accommodate the EV charging requirements of users with no more than a 5% compensation of their original charging requirement while maintaining their desired charging period.

Discussion
The proposed framework was composed of five modules, demand profiling, data augmentation, demand forecasting, forecast explainability, charge optimisation and a centralised EVI data lake for a cyclic connection of information sharing between these EVI application requirements.In addition to the independent interactions of the modules, the feed-forward flow of information provided valuable insights into the subsequent modules of the framework.In our empirical evaluation, demand profiling revealed two significant profiles based on the charge time of the day.In the data augmentation module, this information was used for Gaussian mixture modelling that further revealed having two separate forecasting models improved the prediction accuracy in the forecasting module.The predictions were then used in the charge optimisation module.This module generated an optimised charging schedule which became a decision point in the EVI, as well as fed forward into the next iteration of the framework and updated the EVI data lake with EV user profiles and behaviours.All optimisation formulations were based on deterministic optimisations.As future work, we intend to generalise these formulations to accommodate stochastic EVI behaviours.
In contrast to Fotouhi et al. [25] and Quirós-Tortós et al. [26], where the EV user profiles were stochastic models, our framework used AI models to draw data-driven profiles.Quirós-Tortós et al. [26] created probability density functions considering variables that were observed among all users, while in the proposed data augmentation module, new samples were generated based on each of the clusters found in the demand-profiling stage.In the demand-forecasting module, we treated the prediction as a multivariate regression problem, which was relative to the related work [28,29].Going beyond prediction, we input this into the charge optimisation module for the EV charge scheduling.Although we solved this as an optimisation problem, González Vayá and Andersson [29] and Vandael et al. [30] framed scheduling as a bidding price market outcome and a reinforcement-based learning and adaptation method, respectively.

Conclusions
In this paper, we proposed a comprehensive AI framework for distributed energy sources in EVI.The framework consisted of five modules for demand profiling, data augmentation, demand forecasting, demand explainability and charge optimisation of the EVI, supported by a central EVI data lake that received inputs and outputs from each module to inform the next iteration of EVI operations.The framework was also cyclic in that it fed output from charge optimisation back into demand profiling for the next iteration of EVI operations.We evaluated this framework using two real-world datasets that demonstrated the challenges of EVI and EV management.The results of these experiments confirmed the practical value of AI in responding to the complex needs of EV adoption.

Figure 1 .
Figure 1.Hierarchical composition of EVI in a smart grid setting.

Figure 3 .
Figure 3. Demand profiling: learned projection from Hyperseed and subsequent analysis of this projection using PCA.Orange cluster: charging sessions started during 0000-0800 h.Green cluster: charging sessions started during 0800-2400 h.Red cluster: charging sessions with high energy consuming EVs.(a) Hyperseed learned projection.(b) PC1-PC2 projection of the dataset.(c) PC2-PC3 projection of the dataset.(d) PC1-PC3 projection of the dataset.Vector plots in (b-d) show the feature contributions to each of the PCs.

Figure 4 .
Figure 4. Architecture of the forecasting models.(a) Model A architecture.(b) Model B architecture.In Model B, the summation of the morning model and the evening model was taken as the final output.Morning and evening models were trained separately without any data sharing.

Figure 5 .
Figure 5. SHAP values of the best performing model.

Figure 6 .
Figure 6.Beeswarm plot for the best-performing model.

Figure 8 .
Figure 8. Target EV demand optimisation.4.5.5.Optimising EV Charge SchedulingIn this final formulation, we optimised the charging schedules for a given set of EVs according to their availability.It took the following inputs: a set of EVs (which is denoted by the set E), the preferred charging start and end times of EVs (t e p_start and t e p_end ) and

Table 1 .
Selected data fields of the ACN dataset.
* Field not available for every session.† User input field.Registered users can enter these data.

Table 2 .
Statistical parameters of daily energy-delivered distribution.

Table 3 .
Accuracy of models predicting day-ahead EV demand.
e p_start and t e p_end ) and the charging requirement for each of the EVs (E e ).The mathematical formulation of the deterministic optimisation problem is presented as follows.

Table 4 .
EV sample data (preferred charging amount and period).

Table 5 .
EV scheduling results (scheduled charging amount and period).