Minimizing electric vehicle charging costs in the microgrid using the BFGS Quasi-Newton Method

. Electric vehicles (EVs) offer a compelling solution for mitigating pollution, addressing environmental alterations, and enhancing energy security. This research presents a methodology employing the Broyden Fletcher Gold-farb Shanno quasi-Newton technique to streamline the charging costs associated with plug-in electric vehicles (PEVs). The initial step involves formulating an objective function directed at minimizing the expenses tied to PEV charging. This function takes into account crucial constraints pertaining to charger specifications, state of charge limitations, and voltage levels. Subsequently, we detail the application of the BFGS Quasi-Newton algorithm in computing node topology voltages within a microgrid featuring distributed energy resources (DERs). The findings demonstrate that the BFGS-enabled method outperforms alternative approaches in minimizing the cost of charging PEVs


Introduction
In recent times, the global concern surrounding air pollution and the pressing need to address environmental changes has led to a significant shift in the automotive industry.This transition has seen a growing preference for EVs as an alternative to ICEs.The allure of EVs is rooted in their potential to reduce carbon emissions and mitigate the environmental impact associated with conventional automobiles.However, this transition is accompanied by a set of unique challenges, notably in the context of power distribution systems that were not originally designed to accommodate this emerging category of consumers [1].This paper explores the evolving landscape of electric vehicles and their intricate relationship with the power grid.The widespread adoption of EVs has been remarkable, driven by their ecofriendliness, lower operational costs, and reduced reliance on fossil fuels.Yet, beneath the surface, there exists a complex interplay of energy dynamics, grid management, and the crucial role played by EV batteries.At the core of every electric vehicle, both figuratively and literally, lies the battery-a critical component that dictates the vehicle's performance, range, and overall functionality.Maintaining the desired state of charge (SOC) within these batteries is essential for the efficient operation of electric vehicles.Consequently, an increasing number of EV owners opt for home charging solutions.However, the convenience of home charging is not without its financial implications, as it necessitates the installation of Level 2 charging stations, 240V sockets, wiring, and wall mounts.This paper delves into the multifaceted challenges arising from the proliferation of electric vehicles, with a particular emphasis on the complexities of integrating these vehicles into existing power distribution systems.It examines the repercussions of EV battery charging on energy demands, grid stability, and the economic considerations for homeowners.Through this exploration, we seek to illuminate the evolving landscape of electric mobility and its broader implications for energy systems and sustainable transportation.The primary focus of this paper revolves around addressing the challenges associated with charging Plug-in Electric Vehicles (PEVs) at centralized charging stations instead of individual home chargers.The objective at hand is to minimize the charging costs for multiple PEVs at these charging stations, utilizing a suitable optimization approach.Numerous optimization methods have been documented in the existing literature.Among these, Quasi-Newton methods stand out due to their computational efficiency, typically demanding less processing time.Furthermore, the Quasi-Newton method distinguishes itself by not necessitating the computation of second derivatives, in stark contrast to the Newton method, which relies on calculating the Hessian matrix.Another notable distinction is that the Quasi-Newton method avoids solving systems of linear equations, while the Newton method entails precisely that.

Literature review
Prior studies and prior research efforts have employed a variety of optimization techniques to enhance the efficiency of Plug-in Electric Vehicle (PEV) charging cost management [3]- [8].One of these techniques involved the application of Newton's method to improve the charging plans for EVs.In this present work, we introduce a approach that addresses the integration of PEV charging across diverse scenarios.This research takes into careful consideration the constraints pertaining to charger voltage, state of charge limits, and voltage levels at various grid nodes.To incorporate these constraints into our objective function, we utilize an approximate linear model tailored for low-voltage distribution systems.The effectiveness of previous methods the Dual Splitting (DS), GD, and Incremental Stochastic Gradient) in handling various facets of intelligent PEV charging is well-documented in the literature [9].These techniques not only excel in optimizing PEV charging but also prove instrumental in enabling rigorous convergence analysis.Nonetheless, these techniques come with a notable computational overhead, particularly when dealing with intricate data and systems.Earlier re-search has delved into a range of factors related to load optimization and the intelligent charging of Electric Vehicles (EVs).For example, previous studies have explored load balancing strategies such as filling the demand lulls during nighttime (referred to as "valley filling").Additionally, investigations have considered the impact of grid limitations, encompassing concerns like transformer overheating and constraints within local distribution grids [10].

Contribution of the paper
This article introduces optimal charging strategies to complement existing cost minimization research in the following manner.We employ the BFGS algorithm as our optimization method within the quasi-Newton framework.The rationale behind opting for the BFGS Quasi-Newton method over other optimization techniques is rooted in its computational efficiency and speed advantages compared to the traditional Newton method.Unlike the Newton method, the Quasi-Newton approach does not demand the calculation of second derivatives, making it a more computationally economical and swifter choice.The BFGS algorithm computes an approximate Hessian function incrementally, diverging from Newton's method, which necessitates second derivative calculations.Furthermore, programming Newton's methods tends to be more intricate in comparison to the Quasi-Newton method.However, it is worth noting that the Quasi-Newton method does have certain drawbacks.It often requires more convergence iterations than the Newton method, and its convergence path is typically less precise than that of the Newton method.

Problem Formulation
The primary goal of our optimization process revolves around the minimization of energy charging costs for EVs.OF that is to be minimized is given by Here S is the number of connected EVs, m is the labeling index for EV and m = {1,2,3, … … ., S}, k represents discrete time steps k = {1,2,3, … … ., L � }, and  � � and  � � are elements of auxiliary vectors  � and  � .The power consumption or injection  � � of each connected mth EV is Active Power constraints: Assume that the power flow from the EV Chargers is bidirectional and they have restricted rates of charge and discharge.The following equations describe the battery constraints

Constraints of State of Charge (SOC):
To reduce the damage for the batteries health owing to deep discharging, SOC must be constrained to certain boundaries such as Desired SOC: The desired SOC has a more limiting constraint which is established by the EV owner and it is expressed as Grid voltage constraints: The node voltages are kept within maximum and minimum limits for the satisfactory performance of the electric grid.In this work, maximum the voltage limit is taken as 1.1pu and minimum limit as 0.9 pu.
We examine a test microgrid system comprising 35 nodes, operating on LV(220 V) network with a voltage source situated at second node.Within this grid system, four photovoltaic systems are installed at four bus (35,29,18,16).Additionally, there are eight electrical power loads distributed across various buses.This test microgrid system incorporates ten Distributed Energy Resources (DER) bus generations at nodes 13, 16, 18, 20, 25, 27, 29, 31, 34, and 35.It is noteworthy that only 18 nodes are available for PEV charging and discharging, given that there are a total of eight power loads and ten distributed energy resource (DER).DER generation refers to the production and storage of electricity through various small devices connected to the grid or distribution system.Line impedance values between each pair of buses, which are detailed in Table 2. Electrical power loads at various buses are presented in Table 1. Fig

BFGS Algorithm
Newton's method and the BFGS (Broyden-Fletcher-Goldfarb-Shanno) method are both widely used optimization algorithms for finding the minimum of a function.However, they differ in several key aspects:

 Computation of Hessian
Newton's Method: Newton's method directly computes and requires the storage of the Hessian matrix (a matrix of second derivatives).This can be computationally expensive, especially in high-dimensional problems.BFGS Method: BFGS, on the other hand, approximates the Hessian matrix without explicit computation.It iteratively updates an estimate of the Hessian matrix, making it computationally more efficient, particularly in high dimension  Convergence: Newton's Method: Newton's method tends to converge faster, especially when the Hessian is well-conditioned.Its convergence can be quadratic, which means the number of correct digits approximately doubles with each iteration BFGS Method: The BFGS method exhibits a more robust convergence and may be more suitable for poorly conditioned Hessian matrices.It typically achieves superlinear convergence but not necessarily quadratic  Global vs. Local Minimum: Newton's Method: Newton's method can be sensitive to the choice of the initial guess and may converge to a local minimum, which may not be the global minimum.While the BFGS method also converges to local minima, it is generally less sensitive to the initial guess.Neither method guarantees the discovery of the global minimum  Memory and Storage: Newton's Method: It requires memory for the full Hessian matrix, which can be a limitation in large-scale problems.The BFGS method needs memory for the approximation of the Hessian, which is usually lower-dimensional and more memoryefficient  Applicability: Newton's Method It excels in well-conditioned problems with a well-behaved Hessian.
The BFGS method is more versatile and robust, making it applicable to a broader range of optimization problems, including those with poorly conditioned Hessians.
In summary, while Newton's method is highly efficient for well-conditioned problems, the BFGS method is often preferred for its robustness and its ability to handle a wider variety of optimization scenarios.The choice between these methods should be based on the specific characteristics of the problem, including the nature of the objective function and the computational resources available.
This algorithm used in this work outlines the steps involved in an optimization process, where the goal is to minimize the objective function(OF) while considering voltage constraints and electric vehicle charging states.It iteratively refines the solution until the stopping criteria are satisfied.6 Determine the direction of descent using backtracking line search(BLS).
7 Check if the stopping criteria are met.If so, end the loop.
8 Update the output based on the optimization process.

Simulation Results and discussion
Utilizing the suggested PEV load management strategy with the BFGS Quasi-Newton method, we explored its application in two distinct tariff scenarios.The outcomes are categorized into four distinct subsections.It's worth noting that the BFGS Quasi-Newton method required 310 iterations to yield the results, which are visually depicted in Figure 2.
In subplot 1, we can observe a graphical representation where the blue line corresponds to the first PEV, the red line represents the second PEV, and the yellow line signifies the third EV.The horizontal axis indicates time in half-hour increments, while the vertical axis represents the battery charge level for these three PEVs.Notably, the first PEV, depicted by the blue line, initially sells its stored energy back to the grid, while the other two PEVs do not engage in such transactions at the outset.All three PEVs significantly increase their charging rates during off-peak hours until their batteries reach full capacity.Additionally, the dashed lines in the graph denote the upper and lower state of charge limits  In Subplot 2, we can observe two key lines: the blue line illustrates the total base load for all 18 nodes, while the red line represents the cumulative load, encompassing both the total base load and the collective load from the three PEVs.Notably, the current for the base load is depicted as negative, indicating power generation from the DER buses, wherein the surplus electricity is fed back into the grid.A noteworthy observation emerges from the period between 20 and 30, where the total PEV load surpasses that of the base load.Additionally, there is a substantial uptick in load consumption during the charging of PEVs, particularly within the timeframe of 25 to 30.For a detailed visual representation, refer to Figure 4.In Subplot 3, the load profiles for the 18 nodes across various time intervals are presented.
The dashed lines on the graph signify the upper voltage limit set at 260 volts and the lower voltage limit at 200 volts.It's evident that the voltage levels for nodes spanning the time range from 10 to 30 surpass both the upper and lower voltage limits.Furthermore, there is notable variation in voltage levels among different nodes within the time frame of 10 to 30.For a more detailed visual representation, refer to Figure 5.In Sub-graph 4, we present the individual performance metrics for each PEV.The blue line corresponds to the first PEV, the red line represents the second PEV, and the yellow line signifies the third PEV.Additionally, the dotted lines demarcate the upper and lower performance limits for each PEV, set at 3 kW and -3 kW, respectively.It's noteworthy that all outputs of the three PEVs remained well within the defined upper and lower limits.Notably, the performance of the three PEVs, when employing the BFGS Quasi-Newton method, exhibits more variability compared to their counterparts using the Newton method.For a more detailed visual representation, please refer to Figure 6.The findings of our simulation shed light on the performance and state of charge of Plug-in Electric Vehicles (PEVs) in the given scenario.Notably, when employing the Newton method, three PEVs opted not to sell their initially stored energy back to the chargers during peak-rate hours.However, a different outcome emerged when the BFGS Quasi-Newton method was applied, as these three PEVs chose to sell their stored energy back to the chargers.Consequently, the use of the BFGS Quasi-Newton method resulted in reduced charging costs.While the BFGS Quasi-Newton method demonstrated promise in optimizing PEV charging costs, there remain several areas for improvement: 1.Reducing Iteration Count: The BFGS method required a substantial number of iterations (420) to approximate the Hessian value and complete the optimization loop.Future research should focus on methods to reduce the iteration count to enhance computational efficiency.2.Smoothing: Addressing the issue of excessive fluctuations in the results of the quasi-Newton method is crucial.Developing techniques to stabilize and smoothen the outcomes would be beneficial.
3.Incorporating Real Data: Future studies should consider incorporating real-world data and practical constraints to enhance the applicability and accuracy of the optimization methods

1 Initialization:
Set the maximum infeasibility bound on voltage constraints(VC) for each iteration, from n = 1 to N 2 Compute the charging states and voltage contributions of electric vehicles 3 Calculate the current value of the objective functions 4 Compute the gradient(G) of the objective function 5 Approximate the Hessian of the objective function(OF).

Table 1 .
Power loads at each bus

Table 2 .
Impedance of the system under considerationThe network system configurations for DER generations on each bus are listed in the following table3.his table provides information about Distributed Energy Resource (DER) generation configurations at various bus numbers within the network system.DERs are small-scale electricity generation and storage devices connected to the grid or distribution system.