Utilization of EV Charging Station in Demand Side Management Using Deep Learning Method

Conventional energy sources are a major source of pollution. Major efforts are being made by global organizations to reduce CO2 emissions. Research shows that by 2030, EVs can reduce CO2 emissions by 28%. However, two major obstacles affect the widespread adoption of electric vehicles: the high cost of EVs and the lack of charging stations. This paper presents a comprehensive data-driven approach based demand-side management for a solar-powered electric vehicle charging station connected to a microgrid. The proposed approach utilizes a solar-powered electric vehicle charging station to compensate for the energy required during peak demand, which reduces the utilization of conventional energy sources and shortens the problem of fewer EVCS in the current scenario. PV power stations, commercial loads, residential loads, and electric vehicle charging stations were simulated using the collected real-time data. Furthermore, a deep learning approach was developed to control the energy supply to the microgrid and to charge the electric vehicle from the grid during off-peak hours. Furthermore, two different machine learning approaches were compared to estimate the state of charge estimation of an energy storage system. Finally, the proposed framework of the demand management system was executed for a case study of 24 hours. The results reflect that peak demand has been compensated with the help of an electric vehicle charging station during peak hours.


I. INTRODUCTION
As environmental problems continue to worsen to the point where they threaten the entire globe, it is imperative that humans take immediate action to cut emissions of greenhouse gases (GHG). Many environmental organizations have developed plans and policies to reduce CO 2 emissions [1]. The use of renewable energy sources and the electrification of transportation systems are two of the most promising approaches, being considered as a means to address rising environmental concerns and energy supply [2]. Therefore, power generation and transportation networks are shifting towards the utilization of renewable energy and electrical vehicles (EV). Currently, a major part of the electrical The associate editor coordinating the review of this manuscript and approving it for publication was Qiang Li . generation is conventional. However, to satisfy the rapidly increasing demand for power, renewable energy systems have been integrated into traditional power grids. Consequently, the previously centralized power system is evolving toward more decentralized structures, with an increasing number of small units connected to distribution grids. Distributed energy resources (DER) can supplement central power generation, by adding capacity to the utility grid or directly to endusers. However, these renewable power generation systems are climate-dependent and highly stochastic [3]. Therefore, during peak hours, the load demand may exceed maximum capacity, which could cause instability or even a blackout if the balance in the grid is not effectively maintained [4]. The peak demand lasts for a short time, and most of the time, the generation capacity is not fully utilized. Typically, pump storage or diesel engine plants are utilized to manage VOLUME 11, 2023 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ short-term peak loads. Advancements in battery technologies and EV have made it possible to use them as temporary energy storage devices for peak load management. This is because idle time of an EV is significantly longer than its charging time [5]. Therefore, EVs with other energy storage systems (ESS) play an important role in maintaining the power balance of the power system. The use of a clean energy storage system for peak demand management (PDM) leads to a low consumption of fossil fuels and less environmental pollution.
Grid ancillary services are implemented on a hundred kW basis for peak load management of the grid, whereas single EVs can only provide a limited amount of power (10-20 kW). The concept of an aggregator was implemented to achieve large-scale power rating. A third party between EVs and power grids, such as EV charging station (EVCS), can be used as an EV aggregator. When aggregated in suitable numbers, EVs become a reliable integral part of the DER as a largescale energy source with the help of a base ESS [6].
The use of electric vehicles significantly contributes to a healthier environment, with the lowest CO 2 emissions and much less noise. Research shows that by 2030, EVs could reduce CO 2 emissions by 28% [7]. However, two major obstacles affect the widespread adoption of electric vehicles: the high cost of EVs and the lack of charging stations [8]. The current problem is that EV owners are awaiting proper charging infrastructure; however, EVCS investors are waiting for sufficient EV adoption for a profitable business. This situation is like the ''chicken or egg'' theory [9]. There is a need to increase the profit of the EVCS infrastructure. This motivates investors to establish EVCSs. A renewable-energyintegrated EVCS already has an ESS for energy storage. From an economic perspective, EVSC can be utilized for grid peakload management. Moreover, with the help of an EVSC, the EV system can also be used for peak load management, which is a mutual profit for both systems [10]. This approach will shorten the problem of a lower number of EVCS in the current scenario because EVCS will have a source of earnings other than the charging of EV. An EV charging station aggregated with EVs and an ESS behaves like a dynamic battery that is utilized in demand-side management (DSM) during peak hours [11]. EV aggregators act as energy sources and have the advantages of no start-up and shut-down costs and fast response speed in solving the intermittency issue of renewable energy sources. Fig. 1 shows a potential framework for the integration of EVCS into DSM operations.
There has been an uptick in the number of utility operatorimplemented programs that use DSM strategies for cost and energy management. Participating in DSM programs can help electric power markets to run more efficiently and profitably [12]. DSM schemes that incorporate EVs, aim to maximize customer and utility profitability while minimizing overall system losses. Existing research incorporates a variety of financial models, with a focus on financial objectives. Generally, they employ energy efficiency, energy management, and cost reduction strategies. Raghavan et al. demonstrate the day-ahead participation of EVs employing large-scale integration in demand response, to optimize the net profit and excess power output of independent operators. When making the model, power generation capacity, the grid, and the power balance are taken into account. Preventing the avalanche effect, real-time regulated charging and the leverage acquired by such charging methodologies are major benefits to independent operators [13]. The resulting grouping of EVs leads to a financially beneficial DSM adoption [14]. Rezaee et al. discussed the application of plug-in electric vehicles (PEVs) in DSM, utilizing parking lots as aggregators. A methodology is presented to estimate the impact of EV aggregated in the parking lot on the grid. In terms of bus voltage and grid power loss, the results indicated acceptable levels of penetration. However, constraints on the availability of vehicles, load, and renewable energy sources were not included in this research [15]. Tong et al. present a single-family home DSM setup combining PV and ESS as an energy buffer to relay surplus photovoltaic output during off-peak hours. In this study, day-ahead market pricing signals were obtained to launch bids, expanding the viability of retired vehicle traction batteries in their second life form [16]. Arellano et al. used a simulation tool to investigate the impact of changing EV penetration levels into the distribution grid at the DSM with different load patterns. To improve performance and efficiency, an automatic demand response (ADR) approach was introduced in a test case scenario in the control aspect of the smart grid infrastructure. ADR employs a demand response (DR) approach to relay control signals from the end user to the utility's main control unit without the need for human interaction [17]. The ADR technique was also implemented by Xiang et al. with the integration of EVs and ESSs via blockchain profiling [18]. To achieve optimal management operation of grid-connected buildings, Christos et al. suggested a distributed feedback-based optimization method based on the principles of approximate dynamic programming. In this study, a multi-criteria approach was used to minimize energy expenditures without compromising end-users values. Thermostatically controllable loads, such as water heaters and clothes dryers, were featured with EVs and ESS [19]. An optimization technique for DSM was developed by Zihao Dong et al., which implemented Time-of-Use (ToU) based load shifting at the residential level. Multiple adaptable home appliances, EVCS, and rooftop PV systems are taken into account. In this case, optimization led to a 19% reduction in daily electricity costs. In addition to lowering the carbon intensity of the grid and providing energy, rooftop PV reduces domestic carbon emissions by 12%. With the growing use of electric vehicles and renewable energy, the smart scheduling of household loads has a substantial impact on grid resilience and energy efficiency [20]. Ran et al. came up with a two-stage planning optimization model for shared EVs to investigate the efficient coordination of shared EV operations under a demand response. The location of the charging facility was the first step, followed by the relocation of vehicles in the second step. In addition, both supply-side and demand-side uncertainties were taken into account and approximated into a form that was manageable by using a sample average approximation. This policy made easier to make decisions under, an uncertain charging ability. However, more DR elements, like power generation (solar and wind energy), are not considered [21]. Shariff et al. presented the design aspects and practical implementation of a modern solar-powered EVCS, controlled by a Type-1 vehicle connector. The designed model was built in MAT-LAB/Simulink. Its circuit functioning and methodical model were analyzed to establish the parametric design characteristics. A complete hardware configuration was created to demonstrate the power factor adjustment with varying steadystate loads. However, research has mainly focused on the design aspect of solar-connected EVCS. The effect of EVCS on DSM was not analyzed in this study [22]. To improve the quality of service at public stations and increase their utilization, [23] presented a data-driven performance analysis method for the charging behavior of EV at charging stations. The purpose of the data-driven model was to be adaptive to any type of issue that the EVCS can face to find a better solution. However, the study did not consider the constraints of other systems connected to charging stations. The author of [24] proposed an EV charging network as a cyber-physical system (CPS). The EVCS is regarded as a component of the micro grid (MG), whereas EVs are part of the transportation network. The findings showed that the suggested algorithms optimized the charging costs and balanced the regional load profiles and EV charging behaviors successfully. However, the limitations of batteries, renewable energy resources, and household and commercial loads are not considered in this study. Modeling the charging load of an EV is challenging owing to its complexity. However, it provides a framework for future research on the impact of EVCS on demand-side management. Yang et al. proposed a set of equations to build a probabilistic load model. The method of parameter identification was based on ant colony algorithms. A real batteryswapping charging station was used to identify and simulate the suggested concept. The findings demonstrated that the model's applicability and accuracy were satisfactory in the case of a battery-swapping EVCS [25].
Moghaddam et al. presented a dynamic pricing model for peak load adjustment. To minimize the overlap between the PEV and residential peak load periods, a constraint optimization problem was formulated and optimized using a heuristic solution [26]. Numerous factors must be considered for the proper implementation of DSM programs, including load and power forecasts, State of Charge (SoC) estimation, identification of appropriate consumers to engage in schemes, and developing automated systems that manage demand-side resources [27]. Nowadays, model predictive control (MPC) and data-driven methods are used for dynamic nonlinear system design of power systems. In the literature, data-driven approaches are used in power systems for different practices, such as optimal charging [28], economic dispatch [29], uncertainties of renewable energy resources [30], and EV and SoC prediction of ESS [31]. For the proper operation of a gridconnected, PV-integrated EVCS, the aggregator needs knowledge of the SoC level of the ESS and EVs participating in the plan. In addition, the reserved energy level of each system participates in load management. Commonly used methods of SoC estimation are mathematical modeling-based [32]. VOLUME 11, 2023 These models have less accuracy due to the nonlinear complex nature of the battery. The majority of these models can only function under certain conditions, such as a specific battery type and a fixed temperature. When other factors are considered, new models should be developed. Machine-learning (ML)-based methods have been used to overcome these limitations. ML-based methods can model the nonlinearity of a system using collected data [32]. Common machine learning techniques include, fuzzy logic [33], support vector machine [34], and artificial neural networks (ANNs) [35], [36].
Machine learning techniques have been utilized for highcomplexity global optimization issues [36] and have shown positive results in peak demand reduction [37]. A genetic algorithm (GA) based power mitigation method was investigated in paper [38]. GA is used to automate the optimization of demand-side management. As a case study for minimizing harmonic distortion for all 24-hour time steps, a basic industrial grid with five machines was utilized. The drawback of this study is that only the total harmonic distortion (THD) of the voltage and total demand distortion (TDD) of the load current are utilized to optimize operational schedules to reduce harmonic distortion in the industrial grid.
The Neural network-based deep-learning (DL) methods have received considerable attention from the research community in recent years. Deep learning is the process of learning several levels of representation and abstraction and is capable of analyzing data in its raw format as well as discovering the representations that are required for detection or classification [39]. Deep neural networks can be built in many different ways. Most often, feed-forward NNs [40], convolutional NNs [41], and recurrent neural networks (RNN) [42] are used for supervised learning, whereas autoencoders [43] and Restricted Boltzmann Machines [44] are used in unsupervised learning. Deep learning has the potential to learn highly nonlinear, complicated relationships, and correlations between input and output data in comparison with traditional techniques. Because of this, the DSM literature shows that deep learning methods are usually better at making predictions than traditional methods, such as SVR [45], [46], [47], shallow ANNs [45], and Random Forest [45]. Furthermore, it is unclear why they do so well in particular sorts of problems [48], and it should be emphasized that arbitrarily increasing the depth of an ANN may not necessarily produce the best results [49]. Long short-term memory (LSTM) networks, which are a form of RNN, are able to manage better long-term dependencies at the expense of higher computational costs. By contrast, convolutional neural network (CNN) networks are ideally suited for processing data with a grid-like architecture.
Demand response in smart grids is moving toward a future in which end-user loads can be controlled in a detailed manner. This means that load and price forecasts must be more accurate. Time-series models such as autoregressive (AR), auto-regressive integrated moving average (ARIMA), and exponential smoothing [50] have been used for a long time to predict load and price in DR. This kind of model is usually linear, and has been found to be less accurate at forecasting load [51]. The lower prediction accuracy of classical approaches can be related to their linearity assumptions. Therefore, ANNs, which can approximate highly nonlinear relationships, have been used for load and price forecasting in DSM. In addition, as demand becomes increasingly nonlinear and variable, DL methods will likely produce even more accurate load and price forecasts [27].
The existing research survey indicates that numerous techniques and optimization algorithms have been developed and implemented in EV DSM programmers to address optimization in the SG environment. These strategies and algorithms may have single or multiple objectives, as well as a single or hybrid strategy. Linear programming (LP), dynamic programming (DP), fuzzy computation, particle swarm optimization (PSO), genetic algorithm (GA), differential evolution (DE), ant colony optimization (ACO), stochastic optimization artificial, game theory algorithm and neural network (ANN) are the most widely used optimization algorithms current employed in the domain of EV DSM optimization problems. As for the current research directions, the algorithms used to schedule and control devices must be more flexible and able to work in a more diverse environment. In this research, renewable energy and EV transportation systems integrated power systems require a DSM framework that is automated, can adapt to a changing environment and can learn what users need. For the large-scale uncertainties present in this type of integrated model, a data-driven approach integrating machine learning with optimization needs to be adapted [21]. Although DL approaches are used in public charging station occupancy prediction to reduce electric vehicle operator and user inconvenience [52], load forecasting [53], [54], [55], [56], their direct implementation for peak load management in an MG integrated with RE and EV transportation system cannot be found.
The research contributions of this paper mainly include deep learning for optimal scheduling of loads and electrical transportation networks for peak load management in renewable energy-oriented power systems. It focused on creating a DL-based peak load management system for an MG that is integrated with renewable resources and an EVCS in the second stage of control. However, the first stage of controlling EVs and PV systems integrated into the electrical transportation system was performed. Moreover, the research considered a data-driven approach for modeling the different components of the proposed transportation network to overcome the nonlinearities of the components. However, in the case of mathematical modeling of components, some variables are very difficult to implement in real-time.
In the comparison of the discussed literature the key contribution of this manuscript are as follows: • In this work, a comprehensive data-driven approachbased DSM for an EVCS-connected MG is proposed. • A data-driven approach is used to incorporate the PV out in the proposed EVCS-connected MG.
• Based on the real-time commercial and residential collected load data, the load connected to the EVCS-based MG is forecasted.
• The SoC estimation of the ESS system present in EVCS is performed by the LSTM method. Comparative result of LSTM with Vector Autoregressive moving average (VARIMA) shows its suitability.
• To execute the proposed DSM, a deep learning-based efficient controller is designed and validated through a case study of 24-hour power consumption.
The rest of the paper is organized as follows: Section II describes the framework of the proposed demand-side management strategy, modeling, and their constraints are explained in the related subsections. In Section III, a case study of demand-side management using data-driven approaches is presented. In addition, the results and analysis of deep-learning approaches for SoC estimation are presented. Finally, the conclusions of the results and analysis are presented in Section IV, followed by references.

II. METHODOLOGY
Demand side management is an area of energy management that focuses on the monitoring and management of peak demands, as well as the smoothing of the load profile throughout the day [57]. DSM is required to reduce power plant capital expenditure and enhance the financial performance of electrical utilities [58]. As shown in Fig. 2, DSM methods can be categorized into six major categories: peak clipping, valley filling, load shifting, strategic conservation, strategic load growth, and flexible load shape [59].Utilizing an energy storage system for demand-side management is one of the most effective and promising strategies for peak clipping. The ESS stores energy during off-peak load conditions and supplies it to the grid during peak hours to compensate for additional energy demand [53]. The proposed methodology utilizes an electrical transportation system for peak-demand management. In the subsequent section, the modelling and control of the constituents of the proposed methodology are discussed

A. PROPOSED SYSTEM MODELLING
This work considers a PV-connected EVCS for grid peak demand management as well as EV charging station profit improvement. The proposed system contains a conventional power generator, residential loads, critical commercial loads, renewable energy sources, and an EVCS. The EVCS unit contains the ESS and EVs, which are utilized as charging/discharging loads. A two-stage framework is presented for power coordination between the EVCS and grid, as shown in Fig. 3. The first stage represents a dynamic energy source model of the ESS and EVs integration in the direct mode. In the second stage, the power allocations for each unit are presented, including the ESS and PV systems. PV and load are significant sources of uncertainty in the MG. In the process of power distribution among the units, accurate modeling of these unknown factors plays a critical role. To overcome the effect of these uncertainties, a deep neural networks (DNN) based controller is used, for the required energy flow between the two stages, for the optimal cost of energy consumed by the ESS.

1) MICRO GRID MODELING
The modelling objective is to maximize the total profit of the EVCS during the dispatch time to minimize the overall cost, which can be expressed as in Eq. (1). min C p = k n K=k 0 (C GRIDs (k) + C GRIDc (k) + C EVcc (k) (1) VOLUME 11, 2023 C GRIDs (k) is the grid tariff during off-peak load, which is defined in Eq. (2).
C GRIDs (k) = β gs (k) P gs (k) k C GRIDc (k) is energy cost supply by EVCS during the offpeak load, which is defined in Eq. (3).
where P gs (k) and P CS (k) are the power consumed and supplied by the EVCS from the main grid respectively. β gs (k) and β CSs (k) are the energy sale and purchase prices from the grid respectively and k represents the time period. C EVcc (k) is the energy cost during EV charging, and isndefined in Eq. (4).
where P EVC is the power consumed by the EV during charging. β EVcc (k) is the energy sale price of the grid during EV charging. C ESSdg (k) andC EVdg (k) are ESS and EV battery degradation cost, which are defined in Eq. (5) and Eq. (6).
where P ES (k) and P EVd (k) are overall power consumed by the ESS and EV. β ESdg and β EVdg are the average charging cost for ESS and EV respectively.

2) ENERGY STATE OF THE STORAGE ELEMENT (SOC)
The state of charge is a representation of energy available in an energy storage system. The model of an ESS in terms of SoC can be represented as in Eq. (7).
where SoC EVCS (k) is the SoC of EVCS at time k, P EVCS (k) represents the dispatched power from EVCS while η CSCH and η CSDC are charging and discharging efficiencies. E EVCS represents the EVCS energy demand.
The model represented in Eq. (7) has constrains that are represented in Eq.
where; SoC min EVCS and SoC max EVCS are denoting the minimum and maximum SoC of EVCS. P min EVCS and P max EVCS are minimum and maximum charging power required, respectively. P GRID repersents the grid capacity limit. Further, the maximum possible power flow between the grid and EVCS in terms of the EVCS to the grid and grid to the EVCS are P maxCS GRID and P maxgd GRID .

3) EVCS MODELING
The size of the power coordination problem will be reduced by treating EVCS as a single unit rather than the combination of PV unit, ESS and multiples EVs. An EVCS demand model is constructed to take all EV's charging demand and technological limitations into account. In this section, an EVCS demand model is developed, considering all energy charging and discharging systems and their technological constraints. It was assumed that EV owners will share the required information such as SoC, departure, and arrival time. At each time slot, the EVCS also gathers the most recent SoC data of energy sources. Eq. (11) and Eq. (12) where P max EV,n and P max ESS,n are the maximum power supply limits of nth EV and ESS, respectively, and P min EV,n and P min ESS,n represents minimum limit of power that can be supplied by nth EV and ESS, respectively. The total energy that can be supplied by the ESSs, connected to the EVCS can be presented in Eq. (13) and the energy supply by the EVs for the entire time slot can be defined in Eq. (14).
(SoC EV,n (k + 1) − SoC EV,n (k))E EV,n (k) (14) where; E ESS,n (k) and E EV,n (k) are total energy supply nth ESS and EV respectively at time k. SoC EV,n (k) is the SoC level of the nth EV at time k.

B. DEEP-LEARNING BASED SoC ESTIMATION 1) DATA-DRIVEN APPROACHES FOR VARIABLE ESTIMATION
Smart grids use many smart meters that send information about user behavior to a central server. Using data-driven techniques, these data can be processed to obtain insights useful for MG analysis and control. Forecasting the future load (electricity consumption) and SoCs of energy-storing elements are crucial tasks for achieving grid intelligence. If these forecasts are accurate, a utility provider will be able to plan resources and take measures to balance the supply and demand of electricity. These forecasts can be made using data-driven predictive models. Fig. 4 shows the various types of data-driven approaches. A popular statistical technique for investigating the relationship between input variables and a response variable is linear regression. Eq. (15) depicts its general form:ŷ = w 0 + wx m (15) where;ŷ is the forecasted output, w 0 is the bias term, and the weight matrix for x is w and power m is any real number. Commonly used regression techniques for nonlinear systems are ARMA) and ARIMA [19]. A moving average model (MA) with order q and an autoregressive model (AR) with order p constitute the two basic components of ARMA, which are represented in Eq. (16), (16) where ϕ1, . . . . . . , ϕp represents the weights for the autoregressive model, θ1, . . . . . . , θ q denotes the weights for the moving average model, ε is white noise and c denotes a constant. ARMA models were used for stationary time-series data prediction. Whereas, the performance of the arima model is better for nonstationary time series data in comparison to the arma model. Currently, advanced arima is used for the prediction of more complex systems that can extract features from many variables [61]. Although, models based on statistical methods perform well; however, in the event of a sudden change in the model's attributes or the presence of a statistical error in the data, deficiencies emerge and prediction accuracy decreases. This has a significant impact on the load patterns and profiles [60]. Using ann-based techniques, this type of problem can be handled and accurate predictions can be made without any loss of precision.

2) DEEP LEARNING METHODS
A mathematical representation of a biological neuron is known as an artificial neuron. It depicts nonlinear responses to input signals, similar to those of biological neurons [56]. The artificial neural network structure is based on a network of artificial neurons, known as a multilayer perceptron (MLP). The multilayer perceptron is a three-layered structure that includes input, hidden, and output layers. Each layer arranges neurons such that there are no intra layer connections between neurons. However, neurons have full-weighted connections between layers. A typical ANN structure depicts the artificial neuron's structure and describes the mechanics of the neuron's nonlinear reactions in response to input signals. An ANN structure is trained with the help of a dataset to learn the weights and bias with the appropriate number of neurons, hidden layers, and activation functions as shown in Eq. (17). ANN with two hidden layers is capable of training with arbitrary accuracy. If the number of hidden layers is increased it is called deep learning. (17) where; ∅ is the activation function of the output layer; represents the output of the hidden layer, h =(wx+b); σ is the activation function for the hidden layer; w out and w are the weight matrix; b out and b are the bias terms. Deep neural networks, convolutional neural networks, and recurrent neural networks are three categories of ANN-based deep learning methods.  The DNN is a fully connected feedforward network without lopping back as shown in Fig. 5(a). DNN models have two common issues: overfitting and computational complexity. Convolutional Neural Networks, or CNNs, are a special class of DNNs that use the convolutional layer architecture (depicted in Fig. 5(b)). CNN reduces the likelihood of overfitting by simplifying the network structure and decreasing its connectedness scale. RNNs differ from other deep learning algorithms in that their structure includes loops (illustrated as the cycle in Fig. 5(c)), which allows information to flow in both directions. An RNN can remember information from the previous state, making it the most effective technique for forecasting tasks. On the other hand, traditional RNN gradients tend to explode or vanish when the loop is run many times because the weight of the loop is constant across all time steps. This is called ''long dependency''. One widely used RNN model, LSTM, can be applied to remember information for a long period of time.

3) SoC ESTIMATION
The Proper operation of the MG requires energy-storing components for an automatic DSM scheme. As the EV charging behavior is typically complex and the battery degrades with repeated charge and discharge cycles, a battery management system (BMS) is required to monitor the battery health status and protect it from overcharging and over discharging. One of the key states in the BMS is the state-of-charge, which reflects the remaining battery charge after one chargedischarge cycle. The SoC can only be accurately estimated using current, voltage, temperature, and additional measurable variables. A new updated version of the ARIMA network is chosen to model the highly nonlinear dynamics of batteries and estimate the battery SoC from measurable voltage, current, and temperature variables. VARIMA is a multivariable time-series model that uses multiple features to estimate the output variable. The purpose of this model is to filter out meaningful patterns in the series to predict the next value. LSTM stores information about previous inputs in hiddencell memories, making it more suitable for handling timeseries data. Data were obtained from a public database for modeling a battery and preprocessed for unfitting and missing information. The final preprocessing step divided the given dataset into training and test data. After data preparation, appropriate data-driven algorithms were chosen and trained. Mean square error (MSE) is used to evaluate the overall loss function at the end of each forward pass during the training process. MSE can be represented in mathematical form as in Eq. (18).
where; y k is the true SoC value whileŷ k is the output of the proposed network at time k. To minimize the total loss, the Adam optimizer is used, which changes the biases and network weights on the loss function's gradient. In the LSTM layer, a dropout rate is employed to account for possible overtraining during the training phase. The root mean square error (RMSE) is used in the testing phase to evaluate the performance which can be represented as in Eq. (19).

4) DATA-DRIVEN LOAD FORMULATION
Load is a crucial aspect of dsm. for utilities, it is typically the most practical to view dsm in terms of general loadshaping goals. The load shape represents the time of day, weekday, and seasonal distribution of electricity consumption. Consequently, the dsm on the grid requires accurate load modeling and forecasting. Mathematical modeling of residential and commercial demands has become a challenging task. Load profiles exhibit variability and uncertainty in behavior [61]. A data-driven approach has better accuracy than mathematical modeling. Multiple linear regression, stochastic time series, general exponential smoothing, state space method, and ann-based approach are frequently employed load forecasting techniques. First, in a data-driven process, raw information is gathered from some source, like a computer simulation, a survey, or a publicly available database. Following data preparation, appropriate data-driven algorithms are chosen and trained. The accuracy of forecasted load will depend upon the quality of collected data and the validation efficiency selected methods.

C. DL-BASED CONTROLLER
An Intelligent controller is needed for controlling variable loads and charging/discharging of the different energy sources participating in demand-side management. A deep learning based controller is chosen for the energy flow between the MG and EVCS system. The flowchart of control logic for peak load management is shown in Fig. 6. The logic checks if the overall Preload on the grid (P load ) is greater than or equal to specify peak load limit (P min ) and if the time is within the specified limit by the grid (T pmin ≤ T ≤ T pmax ). Moreover, if the energy level of the EVCS system is above the threshold level then only it participates in the peak load management. Once, T ≥ T pmax then check, SoC EV ≥ SoC EVmin or SoC ESS ≥ SoC EVmin and charge the energy storage system only if, P load is less than the P min .

III. CASE STUDY RESULTS AND DISCUSSION
To formulate the micro grid, industrial and commercial load data were collected from a local real power substation. Data for energy source modeling has been collected from an open online data source https://data.nasa.gov/dataset. The proposed method was simulated using MATLAB 2020a. Load models for residential and commercial loads were simulated by using collected data and forecasted for a time duration with the help of the deep learning time series method.

A. SoC ESTIMATION USING DL METHODS
The data of an energy storage system are analyzed in Fig. 7, which demonstrates how the various parameters of the system are correlated with one another. A scatter plot illustrates the relationship between the state of charge of a battery and the input state variables such as the current, voltage, and temperature. We found that the SoC was strongly dependent on the parameters utilized during the training of the DL model. A deep learning model was trained using these parameters, VOLUME 11, 2023      voltage and current. The results presented in Fig. 8 were obtained from a deep learning model using the LSTM algorithms. Initially, two different machine-learning approaches, VARIMA and LSTM, were used to model the EVCS, and their performances were compared, as shown in Fig. 9. The LSTM network provided a better estimation with an RMSE of 0.49 % compared to the VARIMA network with 0.87 %. The LSTM validation accuracy was better than that of VARIMA Therefore, LSTM was chosen for the SoC estimation of the energy source. After that, the estimated SoC of ESS is given to the controller for peak load management of the MG

B. LOAD PROFILE ANALYSIS
Commercial and residential loads connected to the MG were simulated using the collected load data. Three commercial loads were simulated, and their behaviors were similar to those of the real loads connected to a grid. Power consumption patterns of commercial loads are shown in Fig.10 to Fig. 12.
The overall load connected to the grid is shown in Fig.15. Moreover, EVCS power consumption is shown in Fig 16. It shows that EVCS consumes power during off-peak-load and delivers power during the peak load.

C. GRID PROFILE
An MG was simulated using a 120 kW generator, 10 kW solar power source, three commercial loads, two residential loads, and an EVCS. The profiles of commercial loads are      shown in Fig. 10-12. The residential loads are shown in Fig. 13 and 14. The charging and discharging behaviors of the EVCS are displayed in Fig. 16, which shows that the VOLUME 11, 2023  EVCS consumes power during off-peak hours and supplies power to the grid during peak hours. Fig. 17 characterizes the power profile of the solar system. Fig. 18 characterizes the power supply by the conventional power generator without peak load. To reduce the power supply from the conventional source, the EVCS supplies power to the grid, and the result is shown in Fig. 19. It was found that the power shared by the conventional source was high, reaching 182 kW in the case of peak demand. The profile of the conventional power source was modified by the proposed demand-side management framework and the power supply by the conventional generator is confined below 100 kW. It successfully compensated the peak load demand between 10 to 17 hours. The central DSM controller receives load forecast data, SoC information, PV generation, and day-ahead demand, and then performs the required actions for the energy flow between the MG and EVCS. The EVCS participates in the DSM program and receives signals via two-way communication during hourly dispatch. Consequently, a peak-shaping DSM strategy is implemented to reduce system peak and total operating costs.

IV. CONCLUSION
Considering the alarming situation due to on-road IC enginebased vehicles and other GHG emissions. In this manuscript, a comprehensive framework of a data-driven-based demandside management scheme for electric vehicle-connected micro gird is proposed. Loads connected to the MG were forecasted using the deep learning time-series method. Data required to train the DL method were collected from a power substation. Moreover, modeling of PV connected to the MG was performed using a data-driven approach. The EVCS modeling was done by considering it as a single energy source and the SoC of the associated EV battery was estimated using the deep learning method. The LSTM model was used for SoC estimation because its validation efficiency was found to be 99.51 %, which is better than VARIMA model with 99.13%. Finally, DSM was achieved using the proposed efficient deep learning controller. Initially, the power supply by the conventional source was above 100 kW between 10 am to 5 pm. Moreover, supply at peak load was up to 182 kW. Analysis of results shows that power supply by the conventional power source is confined below 100 kW after the DSM using a designed controller. Also, it was analyzed that the proposed approach is less complex, more efficient and modeling of the system is more realistic as compared to conventional mathematical modeling methods. The proposed method reduces the GHG emission, increases the reliability of the DER microgrid, and increases the profit of EVCS which will motivate the investor to establish the new EV charging station.
Future research could combine this more realistic model with other intelligent operational models to increase EVCS utilization by bringing it closer to real-world scenarios. Moreover, this model can be used in conjunction with algorithms to assist operators with the placement and sizing of EVCS in order to improve operations.