# Differential Evolution and Fuzzy-Logic-Based Predictive Algorithm for V2G Charging Stations
## 1 Introduction  
In recent years, there has been a growing use of distributed generators across the electrical grid. Most of the distributed generation is supplied by alternative and renewable energy sources whose energy production is conditioned on the availability of natural resources, observing climatic conditions, and timely and seasonal cycles [1]. In this regard, frequent studies have been conducted to analyze the stability of the system and the technical impacts that may arise or need to be minimized with the insertion of new generators [2]. In this context, the concept of smart grids presents itself as a viable possibility to provide regulatory agents with the necessary data for intelligent decision-making, resulting in less vulnerability from the generator side and an encouragement for new technically viable connections. On the other hand, the popularization of electric vehicles has brought to light the need for studies evaluating the impact on the grid from the increase of these loads [3, 4, 5]. According to the International Energy Agency, it is estimated that the electric vehicle market has worldwide projections of reaching 22 million electric vehicles in 2030 [6]. Hand in hand with the energy demand, there are difficulties in identifying appropriate times for recharging, considering the available power capacity and the electricity cost. In addition, the possibility of vehicles acting as generators has also been widely discussed, especially in the sense of relieving the electrical system at times of peak demand, when overload issues may occur [7, 8, 9]. Clearly, the decision of charging or discharging becomes an optimization problem, whose instantaneous solution depends on technical, financial, and environmental factors. Reasonable energy management is a key factor to reduce the impacts on the electrical grid. Recent studies presented strategies and optimization techniques that improvedvoltage regulation, losses, recharge time, storage quality, and profitability. In [10], for the electric vehicle to work with a bidirectional power flow, an energy management system was proposed by exploiting a linear programming method. The vehicle was considered as a bank of batteries whose charging and discharging were carried out to maximize the consumption of the photovoltaic energy produced in situ. In [11], the authors analyzed several strategies and proposed a solution considering each autonomous consumer connected to a microgrid, which, in turn, was integrated into an alternating bus current that shared a connection with other local microgrids. Both microgeneration and electric vehicles were connected to the local microgrid. In [12], the proposed vehicle-to-grid (V2G) control led to a rapid and effective response to ensure the grid frequency stability, while the smart charging control satisfied the scheduled charging by the vehicle user. However, there remain research subjects on the efficiency of the proposed V2G control, impact to the battery life, secure interconnection method to the grid, and so on. In [13], a fuzzy algorithm was proposed that worked alongside a virtual synchronous generator for different scenarios throughout the day. In that study, the main objective was to flatten the demand curve and achieve a greater equity in battery charging time. In [14], two fuzzy algorithms were presented in comparison with several optimization techniques; they showed satisfactory results, performing relatively close to an optimization metaheuristic technique, with less computational complexity and the introduction of expert knowledge into the model. In [15], two charging algorithms based on a self-critical logic were presented. The first one sought optimal results regardless of the computational cost and high storage requirements. The second sought a computational optimization to make data processing faster; however, it sacrificed performance when solving the optimal charging cost.