Charging and Discharging of Electric Vehicles in Power Systems: An Updated and Detailed Review of Methods, Control Structures, Objectives, and Optimization Methodologies

: As a result of fossil fuel prices and the associated environmental issues, electric vehicles (EVs) have become a substitute for fossil-fueled vehicles. Their use is expected to grow signiﬁcantly in a short period of time. However, the widespread use of EVs and their large-scale integration into the power system will pose numerous operational and technical challenges. To avoid these issues, it is essential to manage the charging and discharging of EVs. EVs may also be considered sources of dispersed energy storage and used to increase the network’s operation and efﬁciency with reasonable charge and discharge management. This paper aims to provide a comprehensive and updated review of control structures of EVs in charging stations, objectives of EV management in power systems, and optimization methodologies for charge and discharge management of EVs in energy systems. The goals that can be accomplished with efﬁcient charge and discharge management of EVs are divided into three groups in this paper (network activity, economic, and environmental goals) and analyzed in detail. Additionally, the biggest obstacles that EVs face when participating in vehicle-to-grid (V2G) applications are examined in this paper.


Introduction
The transportation sector is one of the most critical energy consumers globally, accounting for roughly one-third of the total energy consumption [1]. Furthermore, the new transportation system, based on the internal combustion engine (ICE), is the leading source of air pollution and greenhouse gas emissions. Electrification of the transportation system has gained a lot of attention in recent years for minimizing these negative effects and decreasing the reliance on fossil fuels. In this regard, research on electric vehicles (EV) as a safe alternative has found a particular position [2]. From one viewpoint, the development of EVs has been slow due to high costs and a shortage of charging stations. As a result, most countries have implemented policies and legislation to address these obstacles and increase the use of EVs on a large scale. According to the International Energy Agency, there will be 130 million EVs on the road worldwide by 2030 [3].
As the number of EVs on the road grows, controlling their charging and discharging will become increasingly difficult in a short period of time. Uncoordinated EV integration into the network may cause issues with the power system's control, management, and operation and jeopardize its stability by making a new peak demand for the power system [1,2]. As a result, numerous studies have been conducted to date to manage EVs'    The remainder of this study is structured as follows. EV battery charging methods are discussed in Section 2. In Section 3, control systems for EV charge and discharge management are assessed. Section 4 introduces a systematic classification system for EV charge and discharge management strategies based on their goals as well as the optimization techniques used in different studies. The complexities of incorporating EVs into the power grid are discussed in Section 5, and a discussion of the results and recommendations for the future are given in Section 6. Finally, Section 7 provides conclusions and suggestions for future studies.

Methodologies for Charging EV Batteries in the Power System
Generally, EVs that need to be charged from the power grid can be divided into two categories: battery EVs (BEVs) and plug-in hybrid vehicles (PHEVs) [14]. BEVs use only the electrical energy stored in the battery for propulsion, while PHEVs can also use fossil fuels. Hence, BEVs have batteries with a higher capacity than PHEVs [1,14]. In this article, 'EV' refers to these two types of EVs. In general, EV battery charging methods can be divided into conductive, inductive, and battery swapping methods [33]. In this section, these three charging methods are introduced, but since conductive charging is used to charge EV batteries in most practical applications, the characteristics and effects of this type of charging are considered from different perspectives in this article.

Conductive Charging
Conductive charging refers to how a direct physical connection charges the EV from the power grid. In conductive charging, two types of chargers can be used to charge EVs: on-board and off-board chargers. An on-board charger is mounted on the EV itself and does not require additional equipment to connect to the grid, so the EV can be charged anywhere by plugging in an electrical outlet. However, this type of charger has a low power transfer capability, and, therefore, in this method, the EV charging operation takes longer. However, off-board chargers are not part of the EV formation and are usually installed in commercial parking lots, highways, or fast-charging stations [34,35]. Since off-board chargers charge EVs with a higher power, the waiting time for charging is reduced. However, these chargers are not available in all places and are more expensive and complex [33,34].
The Society for Automatic Engineers (SAE) has defined a standard for different EV charging levels [36]. This standard defines three charge levels for each AC and DC charge. A summary of these charge levels is given in Table 2. Table 2. The SAE standard for AC and DC charging of EVs in a power grid [35].

Inductive Charging
In the inductive charging method, which is also called wireless charging, there is no need for a physical connection between the EV and the power grid, and the power transmission is done using an electromagnetic field. One of the advantages of inductive charging is reducing the risk of electric shocks and related damages due to the power transmission through the air gap; but, on the other hand, due to the relatively large air gap and non-compliance of the windings, the charging efficiency decreases in this case [30,33]. In general, inductive charging can be implemented in both static and dynamic ways. As shown in Figure 1, the EV remains stationary during the charging process in the static mode. However, the EV can also be charged while moving in dynamic charging mode. Therefore, according to Figure 2, by creating special paths for inductive charging from the road floor on highways, the EV driving range could be increased, and the size of the EV's battery may be reduced due to the ability to charge it while moving. Additionally, since a significant portion of an EV's price is due to its battery, dynamic inductive charging will help reduce the initial EV price [33,34]. As a result, dynamic inductive charging will balance many of the barriers seen by users, such as a limited driving range, a long charging time, and higher EV prices compared with conventional internal combustion engine vehicles [37,38]. Hence, the benefits of this charging method have attracted the attention of many researchers. However, high investment costs are one of the main challenges in developing the dynamic inductive charging method [33].

Battery Swapping
Battery swapping is one of the fastest ways to receive a fully charged battery for an EV. In this method, the EV's owner replaces the discharged battery with a newly charged battery at a battery swapping station [39]. This method significantly reduces the charging time for the EV's owner and benefits the battery swapping station by managing charging, discharging, and battery swapping [40]. Additionally, by optimal charge and discharge management of batteries at the battery swapping station, it is possible to improve the operation and overall efficiency of the power grid [41,42]. In [41], a battery charging schedule for a battery swapping station is proposed to flatten the voltage profile and release the network capacity. Additionally, in [42], the battery swapping behavior of EVs in swapping stations is optimized, which is a useful method for reducing the difference between peak and valley loads and further integration of renewable energy sources in the power grid. On the other hand, there are challenges for the battery swapping method, including the fact that the battery belongs to its manufacturer, the battery has its own characteristics and compatibility, and it is difficult to find a similar battery. In addition, the design of the battery should be such that it can be easily detached from the EV and replaced with a newly charged battery. Additionally, the infrastructure required for this charging method is more complex and expensive than other methods. Another issue is battery ownership, where one option is that the EV's owner buys an extra battery to use when the main battery is discharged to support it, which in turn increases the EV owner's cost. In the other case, the EV's owner has no extra battery, the charging station owns the battery, and the EV's owner must pay the battery's owner to rent the battery in addition to paying for the charge [33,39]. Table 3 compares the conductive charging, inductive charging, and battery swapping methods from different perspectives.
Because the conductive charging method is currently used more in practical applications than the other two methods, the features and characteristics of this type of charging method are discussed in next section of the paper, and the purpose of charging EVs in the remainder of this article is based on the conductive charging approach.

Feature
Conductive Charging Inductive Charging Battery Swapping

Battery Swapping
Battery swapping is one of the fastest ways to receive a fully charged battery for an EV. In this method, the EV's owner replaces the discharged battery with a newly charged battery at a battery swapping station [39]. This method significantly reduces the charging time for the EV's owner and benefits the battery swapping station by managing charging, discharging, and battery swapping [40]. Additionally, by optimal charge and discharge management of batteries at the battery swapping station, it is possible to improve the operation and overall efficiency of the power grid [41,42]. In [41], a battery charging schedule for a battery swapping station is proposed to flatten the voltage profile and release the network capacity. Additionally, in [42], the battery swapping behavior of EVs in swapping stations is optimized, which is a useful method for reducing the difference between peak and valley loads and further integration of renewable energy sources in the power grid. On the other hand, there are challenges for the battery swapping method, including the fact that the battery belongs to its manufacturer, the battery has its own characteristics and compatibility, and it is difficult to find a similar battery. In addition, the design of the battery should be such that it can be easily detached from the EV and replaced with a newly charged battery. Additionally, the infrastructure required for this charging method is more complex and expensive than other methods. Another issue is battery ownership, where one option is that the EV's owner buys an extra battery to use when the main battery is discharged to support it, which in turn increases the EV owner's cost. In the other case, the EV's owner has no extra battery, the charging station owns the battery, and the EV's owner must pay the battery's owner to rent the battery in addition to paying for the charge [33,39]. Table 3 compares the conductive charging, inductive charging, and battery swapping methods from different perspectives.  Because the conductive charging method is currently used more in practical applications than the other two methods, the features and characteristics of this type of charging method are discussed in next section of the paper, and the purpose of charging EVs in the remainder of this article is based on the conductive charging approach.

EV Charge and Discharge Control Structures in the Power System
As shown in Figure 3, due to the limited capacity of each EV, the power exchange between EVs and the power grid is usually done through aggregators. On the other hand, aggregators can directly or indirectly control the charging and discharging of EVs. In general, according to the control structure, EV charge and discharge management in the power grid can be implemented using three types of methods: centralized, decentralized, and hierarchical methods. The following is a comparison of these three types of methods from different perspectives.

Static Dynamic
Charging

EV charge and discharge control structures in the power system
As shown in Figure 3, due to the limited capacity of each EV, the power exchange between EVs and the power grid is usually done through aggregators. On the other hand, aggregators can directly or indirectly control the charging and discharging of EVs. In general, according to the control structure, EV charge and discharge management in the power grid can be implemented using three types of methods: centralized, decentralized, and hierarchical methods. The following is a comparison of these three types of methods from different perspectives.

Centralized Control Structure
In a centralized control structure, aggregators typically manage and control EVs' charging and discharging behavior directly, and EV owners waive their authority to control EV charging and discharging. In this scheme, aggregators first aggregate the information and charging requirements of each EV. Depending on the network situation and based on a specific purpose, the aggregator determines EVs' charge or discharge rate for

Centralized Control Structure
In a centralized control structure, aggregators typically manage and control EVs' charging and discharging behavior directly, and EV owners waive their authority to control EV charging and discharging. In this scheme, aggregators first aggregate the information and charging requirements of each EV. Depending on the network situation and based on a specific purpose, the aggregator determines EVs' charge or discharge rate for each time. Finally, the aggregator sends the control signal to the installed controller on the charger of each EV to optimize the charging or discharging rate of the EV. Since all the system information is collected in the aggregator, the aggregator can achieve the optimal global solution within the centralized control framework and provide various ancillary services to the grid. On the other hand, this method suffers from several challenges and limitations. For example, if the aggregator fails to solve the problem of optimizing the charging and discharging of EVs, the whole system will fail. So, a backup system will be needed, but this backup system will increase costs. Another problem with the centralized method is its scalability. As the number of EVs increases, the computational burden will increase, and solving the EV charge and discharge optimization problem will become more time-consuming and complex [15,43]. Although the problem solving time is not essential in scheduling for the day ahead, the speed of problem solving is important for real-time applications. Accordingly, using a centralized control method for large-scale and real-time problems may be impractical.
Due to the advantages and disadvantages mentioned above, many studies have used a centralized control method to optimize the charging and discharging of EVs in the power grid. In [44], the centralized control method is used to optimize the charging and discharging of EVs in the distribution network for peak-shaving, minimizing losses, and maximizing the profit of the EV's owner. Additionally, to reduce the dimensions of the problem and apply the proposed method to a large-scale EV fleet, the power exchanged by each bus with the network instead of the power exchanged by each EV with the network is considered as a decision variable. In [45], centralized control is also used to minimize the load variance and regulate the network voltage. In [46], EV charging is coordinated along with power system equipment, such as the on-load tap changer operation and the capacitor, to reduce power losses and voltage deviations. In addition, the proposed method uses the time of use electricity tariff to minimize the EV owner's charging cost. The authors in [47] also propose a multi-objective optimization method based on a centralized control approach to reduce network imbalances and energy losses and improve the voltage profile.

Decentralized Control Structure
In decentralized control, as opposed to centralized control, each EV owner decides whether to charge or discharge the battery according to their specific purpose, which is usually to minimize the cost of charging. Therefore, the system operator or aggregator can indirectly control EVs' charging and discharging behavior with the help of pricing strategies and transfer the charging load of EVs from peak hours to non-peak hours with appropriate price incentives. Additionally, due to the lack of direct control in the decentralized method, achieving the optimal global solution is not guaranteed, and it is more difficult to provide ancillary services in the decentralized model than in the centralized one. At the same time, because decentralized control divides the computational burden between EVs, and each EV solves its own charge and discharge problem, the decentralized method is highly scalable and suitable for large-scale EV fleets. In decentralized control, EVs share their charge and discharge scheduling information with each other to reach a global equilibrium point. Although this method requires a lot of communication between EVs, to reduce the need for communication, an aggregator can be used to aggregate information and send to EVs control signals, which are usually price-based [14,15]. Figure 4 shows a sample of a decentralized control structure [15]. the main purpose is to optimize the cost of charging the EV battery. The proposed model in [49] is almost identical to that presented in [48], which suggests an EV charging schedule for the day-ahead model based on game theory. However, to calculate the game's Nash equilibrium, [49] offers a second-order programming optimization method that achieves optimal solutions compared with [48]. However, in [51][52][53], methods other than game-theoretic ones are used for decentralized control. In [51], a decentralized charging control scheme is proposed to achieve valley filling in a residential distribution network, and a new shrunken primal-dual sub-gradient (SPDS) algorithm is proposed to solve the problem in a decentralized manner. In [52], a new decentralized charging control method is presented using historical voltage magnitude data at each EV charging point. In the proposed method, a stand-alone controller installed at each EV charging point implements a local charging algorithm based on the current and historical measurement of the three-phase voltage magnitude. There is no need for communication between controllers or communication with a central server to coordinate EVs in this method.

Aggregator
Indirect control signal

Hierarchical Control Structure
The hierarchical control framework has features of both centralized and decentralized control, and there are advantages over centralized and decentralized control in terms The decentralized control method has been considered in various articles [48][49][50][51][52][53]. Due to the special nature of the decentralized control method and the exchange of information between EVs to achieve an equilibrium point, several articles have used game theory to solve the problem of decentralized control of EVs. In [48], a practical demand response program for charging PHEVs is proposed based on the non-cooperative game-theoretic approach with the Nash equilibrium solution, which considers the effect of each EV charging strategy on the electricity price and the charging strategy of other EVs, and the main purpose is to optimize the cost of charging the EV battery. The proposed model in [49] is almost identical to that presented in [48], which suggests an EV charging schedule for the day-ahead model based on game theory. However, to calculate the game's Nash equilibrium, ref. [49] offers a second-order programming optimization method that achieves optimal solutions compared with [48]. However, in [51][52][53], methods other than gametheoretic ones are used for decentralized control. In [51], a decentralized charging control scheme is proposed to achieve valley filling in a residential distribution network, and a new shrunken primal-dual sub-gradient (SPDS) algorithm is proposed to solve the problem in a decentralized manner. In [52], a new decentralized charging control method is presented using historical voltage magnitude data at each EV charging point. In the proposed method, a stand-alone controller installed at each EV charging point implements a local charging algorithm based on the current and historical measurement of the three-phase voltage magnitude. There is no need for communication between controllers or communication with a central server to coordinate EVs in this method.

Hierarchical Control Structure
The hierarchical control framework has features of both centralized and decentralized control, and there are advantages over centralized and decentralized control in terms of computational burden and the need for a communication network. Hierarchical control usually has a two-layer structure. In the upper layer, a central controller, such as a DSO schedules for all EV aggregators. In the lower layer, each aggregator is responsible for controlling several EVs and schedules the charging and discharging of each EV. Additionally, both the central controller in the upper level and the aggregator in the lower level can control the aggregators and EVs directly or indirectly by using a price signal, respectively. However, the weakness of these frameworks is that the whole system is affected and disintegrates in the event of a failure in the central controller. Hence, another framework can be expressed for hierarchical control in which the central controller is removed, the aggregators make schedules by communicating with each other, and then each aggregator controls its own EVs according to the schedules made. In this framework, with the failure of an aggregator, only the EVs under the control of that aggregator are affected, and the rest of the system can continue to operate. This hierarchical control structure is shown in Figure 5 [15,54].
Due to the greater advantages of a hierarchical control framework over centralized and decentralized control, special attention has been paid to this method in recent years [54][55][56][57][58][59][60][61][62][63]. In [54], a two-layer hierarchical control structure is proposed to coordinate the charging and discharging of EVs. In the lower layer or EV layer, a controller estimates the charging power and energy flexibility of the EV based on various characteristics such as the battery energy status and future travel information, and in the upper layer or coordination layer, based on the model of charging flexibility received from each controller and the status of the power network, the optimal power allocation is determined in order to smooth the network load curve and meet the charging needs of EV owners. In [55,56], a two-level hierarchical control structure is used to manage EVs to prevent power grid congestion and transformer overload. Additionally, unlike most cases where the top-level controller communicates commands directly, in these studies, the top level indirectly controls the lower level with the help of market-based control [55] and both market-and price-based control [56]. In [57][58][59], hierarchical control is used to minimize network operating costs. Achieving frequency regulation through hierarchical control of EV charging and discharging has also been considered in [60][61][62][63]. Due to the greater advantages of a hierarchical control framework over centralized and decentralized control, special attention has been paid to this method in recent years [54][55][56][57][58][59][60][61][62][63]. In [54], a two-layer hierarchical control structure is proposed to coordinate the charging and discharging of EVs. In the lower layer or EV layer, a controller estimates the charging power and energy flexibility of the EV based on various characteristics such as the battery energy status and future travel information, and in the upper layer or coordination layer, based on the model of charging flexibility received from each controller and the status of the power network, the optimal power allocation is determined in order to smooth the network load curve and meet the charging needs of EV owners. In [55,56], a two-level hierarchical control structure is used to manage EVs to prevent power grid congestion and transformer overload. Additionally, unlike most cases where the top-level controller communicates commands directly, in these studies, the top level indirectly controls the lower level with the help of market-based control [55] and both market-and price-based control [56]. In [57][58][59], hierarchical control is used to minimize network operating costs. Achieving frequency regulation through hierarchical control of EV charging and discharging has also been considered in [60][61][62][63].
The authors of [61,62] also consider minimizing the cost of EV battery degradation due to participation in frequency regulation. Table 4 compares the centralized, decentralized, and hierarchical control structures from different perspectives.

Optimization Objectives of EV Charging/Discharging in Power Systems
The primary aim of connecting EVs to the power grid is to obtain enough charge for the next trip; however, with optimal EV charge/discharge management, other goals can be achieved in addition to the stated primary goal. The literature has considered various The authors of [61,62] also consider minimizing the cost of EV battery degradation due to participation in frequency regulation. Table 4 compares the centralized, decentralized, and hierarchical control structures from different perspectives.

Optimization Objectives of EV Charging/Discharging in Power Systems
The primary aim of connecting EVs to the power grid is to obtain enough charge for the next trip; however, with optimal EV charge/discharge management, other goals can be achieved in addition to the stated primary goal. The literature has considered various goals, such as minimizing losses [64], reducing voltage imbalances [65], frequency regulation [66], load flattening [54], minimizing the charging cost for the EV's owner [49], supporting the integration of renewable energy sources [67], decreasing the cost of operating the distribution system [68], maximizing EV profits through market participation [69], and reducing greenhouse gas emissions [70], to optimize the EV charging/discharging process in the power grid. Additionally, some papers have examined multi-objective optimization of EV charging/discharging. In [71], the objectives of minimizing the load variance and the EV charging cost are considered. According to the above-mentioned facts, the objectives pursued by charge and discharge management in the power network can be divided into three categories: the improvement of the power grid's operation, economic objectives, and environmental issues. A classification of the optimization objectives of EV charging/discharging in power systems is shown in Figure 6.
in the power grid. Additionally, some papers have examined multi-objective optimization of EV charging/discharging. In [71], the objectives of minimizing the load variance and the EV charging cost are considered. According to the above-mentioned facts, the objectives pursued by charge and discharge management in the power network can be divided into three categories: the improvement of the power grid's operation, economic objectives, and environmental issues. A classification of the optimization objectives of EV charging/discharging in power systems is shown in Figure 6.
Objectives of charging and discharging coordination of EVs in power system

Improvement of the Power Grid's Operation
In this section, the services that can be provided to the power system by optimizing the charging and discharging of EVs are examined. EV services are divided into three categories: active power support, reactive power support, and support for the integration of renewable energy sources. Active power support includes frequency control services, load variance minimization, peak shaving, valley filling, loss minimization, and voltage regulation. EVs can also help reduce losses and regulate the distribution network's voltage by injecting reactive power. In addition, EVs can support the large-scale integration of renewable energy sources, such as wind and solar, into the power system by recharging their batteries during periods with a high level of production of renewable energy sources and discharging when the level of renewables production is declining. In the following, each of these services will be reviewed.

Active Power Support Frequency Regulation
Frequency regulation is performed by the transmission system operator (TSO) to balance the generation of and demand for electrical energy. It is divided into three types (primary, secondary, and tertiary frequency regulation) according to various factors such as response time, drop control, and power requirements. Power plants have traditionally provided this service to the TSO, but recently EV batteries have also been used to provide this service due to their high response speed. Because EVs can play a role in both generation and demand in the power grid, they can participate in upward and downward frequency regulation. Although participation in upward frequency regulation can result in

Improvement of the Power Grid's Operation
In this section, the services that can be provided to the power system by optimizing the charging and discharging of EVs are examined. EV services are divided into three categories: active power support, reactive power support, and support for the integration of renewable energy sources. Active power support includes frequency control services, load variance minimization, peak shaving, valley filling, loss minimization, and voltage regulation. EVs can also help reduce losses and regulate the distribution network's voltage by injecting reactive power. In addition, EVs can support the large-scale integration of renewable energy sources, such as wind and solar, into the power system by recharging their batteries during periods with a high level of production of renewable energy sources and discharging when the level of renewables production is declining. In the following, each of these services will be reviewed.

Active Power Support Frequency Regulation
Frequency regulation is performed by the transmission system operator (TSO) to balance the generation of and demand for electrical energy. It is divided into three types (primary, secondary, and tertiary frequency regulation) according to various factors such as response time, drop control, and power requirements. Power plants have traditionally provided this service to the TSO, but recently EV batteries have also been used to provide this service due to their high response speed. Because EVs can play a role in both generation and demand in the power grid, they can participate in upward and downward frequency regulation. Although participation in upward frequency regulation can result in EV battery degradation, EV owners can provide frequency regulation services with the proper incentives. In general, the involvement of EVs in frequency regulation faces two main problems: stability and economic issues. The stability problem refers to maintaining the frequency of the network and providing a frequency adjustment service with large-scale EV management. The economic problem encourages EV owners or aggregators to participate in frequency tuning by increasing their profits [72].
As the penetration and influence of EVs in the power system have increased, many researchers have examined the technical and economic problems of EVs' participation in power grid frequency regulation [4,[60][61][62][63]66,[72][73][74][75][76][77][78][79]. In [60], an optimal strategy for EVs at charging stations is proposed in order for them to participate in secondary frequency regulation, which also considers the charging demand of EVs. Additionally, for a fair appropriation of dispatching from the control center between EVs according to their charge demand, two optimal real-time strategies are proposed based on the area control error (ACE) and the area adjustment requirement (ARR). In [61], similar to [60], EVs participate in secondary frequency control. The proposed scheme in this paper uses bi-level hierarchical control to minimize network frequency deviations, satisfy the EV owner's charge needs, reduce battery degradation, and maximize the EV owner's revenue. In [62], an EV partnership in primary frequency control was considered. In this study, a dual-level consensus-based frequency control method is presented. The upper level reduces the deviation in the frequency of the power system. The cost of frequency regulation and EV battery degradation is minimized at the lower level. Graph theory is also used to build the communication network between neighboring control areas on the upper control level and between neighboring EVs on the lower control level. In [72], a new dynamic demand control method is proposed to coordinate the charging and discharging of EVs according to the frequency deviation signal in order to address intermittent renewable energy generation. In addition, the charging demands of EV owners are guaranteed to be satisfied. Additionally, to increase the aggregator's profits, the remaining capacity of EV chargers is used to inject reactive power and provide a voltage regulation service. In [75], EV participation in frequency regulation is done by considering the battery damage and in order to reduce the charging cost of the EV's owner. Additionally, to increase the aggregator's profits, the remaining capacity of EV chargers is used to inject reactive power and provide a voltage regulation service. In [76], in addition to various objectives such as minimizing energy costs, battery degradation, and carbon dioxide emissions, the use of EV batteries was examined to provide a frequency regulation service from 11 p.m. to 7 a.m. It was found that the frequency regulation service was, overall, profitable for EV owners.

Minimization of Load Fluctuations
Minimization of load fluctuations causes the system load to decrease during peak periods and increase during non-peak periods, such as midnight, resulting in a flatter load profile and increasing the overall efficiency of the power system. EVs using a V2G capability can be charged during non-peak periods and discharged during peak periods to help flatten the system load curve. Therefore, the objective function of minimizing load fluctuations must be capable of peak shaving and valley filling. In (1), the objective function related to minimizing load fluctuations is given [80]: where P c,t and P d,t represent the charging and discharging power of the EV battery at time t, respectively, N c,t and N d,t represent the number of EVs in charging and discharging mode at time t, respectively, P Load,t represents the baseload at time t, and P represents the average load during a day without the EV.
In the literature, various algorithms for charging and discharging EVs to minimize load fluctuations have been introduced [6,45,54,71,[80][81][82][83][84][85][86][87][88][89][90]. In [71], an intelligent charging method for EVs in a low-voltage distribution network is proposed. The charging algorithm is implemented locally in each EV; thus, the scalability and reliability of the system are improved. The proposed algorithm pursues two goals: minimizing load fluctuations and the EV charging cost. Voltage imbalances are also reduced by coordinating the charging between the phases. In [80], to optimize the charging and discharging of EVs and minimize the load fluctuations in the distribution network, the purpose of maximizing the profit of the EV owner is also considered. Additionally, EV owners' travel needs have been met. In [81], the vehicle-to-building (V2B) approach is considered. A mathematical model is proposed for peak shaving and valley filling of a university building's load profile by charging and discharging electric vehicles parked in the university's parking lot. In [82], a novel charging and discharging control strategy is proposed to manage the bi-directional power flow between the EVs and the power grid. This strategy aims to smooth the daily load curve of the power network by minimizing the load power variance. Additionally, seven operating modes are considered for flexible charge and discharge management of EVs. In [84], a multi-agent-based strategy for charging and discharging control of EVs is presented that considers three objectives: load flattening, voltage regulation, and minimizing EVs' charging cost. Among these three goals, load flattening using EVs is the main objective. In [85], optimal charge and discharge programming for EVs is presented to minimize load fluctuations. In the proposed method, the EVs are charged when the power grid load is less than the target load, and the EVs are discharged when the power grid load is higher than the target load. Therefore, the performance of the proposed algorithm is highly dependent on the setting of the target load, the power grid load, and the capability of the EVs connected to the grid. In [86], a two-stage optimization method is proposed. In the first stage, the EV aggregator applies the optimal EV charging and discharging schedule to minimize load fluctuations and the charging cost. In the second stage, the distribution system operator (DSO) performs the distribution feeder reconfiguration according to the optimal EV load obtained from the first stage and the load of the distribution system in order to minimize power losses. In [89], a multi-objective optimization problem is presented that considers two objectives: minimization of load variance and scheduling system operator cost minimization. A multi-objective particle swarm optimization algorithm is used to solve the proposed model.

Peak shaving and Valley Filling
Peak shaving refers to reducing the grid's peak load by controlling the load, while valley filling refers to creating a demand on the grid during non-peak periods. By controlling the charging and discharging of EVs, their demand can be transferred from peak to non-peak periods to help reduce losses and improve the grid's load factor. Optimal EV charging and discharging strategies for peak shaving also reduce the need to invest in the grid to increase the equipment capacity. The objective function related to peak shaving and valley filling is given in (2) and (3), respectively [44]: where P peak,t represents the peak load, P target,t represents the target load at time t, and P base is the grid's base load. By reviewing various papers, it can be seen that multiple strategies have been proposed for peak shaving and valley filling with optimal charge and discharge management of EVs [7,43,48,51,[91][92][93][94][95][96]. The authors in [7] propose a centralized charging strategy for large-scale vehicles intending to fill the valley. This paper defines two indicators: the capacity margin index and the charge priority index. The capacity margin index is used to select the time when the grid has excess power to charge EVs. The charge priority index is used to determine the priority of charging EVs in each time interval. In [91], an approach is proposed for coordinating the charging and discharging of domestic EVs for peak shaving and active power loss minimization. Additionally, in this scheme, EV owners have the ability to select their charging and discharging time zones based on priority selection. In [92], two smart strategies for minimizing the total daily cost and peak-to-average ratio are presented, respectively, for EVs parked in workplace carparks. Additionally, the performance of these strategies in the case of slow and fast charging is evaluated. In [95], a real-time smart charging algorithm is presented for EVs implemented at commercial and industrial sites. The proposed algorithm can reduce the peak demand.

Voltage Regulation with Active Power Management
Uncoordinated charging of EVs in the grid may cause the voltage to drop and an increase in the load during peak load periods. To overcome voltage drops in the grid, equipment such as capacitor banks and transformer changer tabs can be used. In addition, the incidence of these problems can be reduced by managing the active or reactive power of EVs. Some studies performed voltage control by applying a constraint to the optimization problem [65], and others defined an objective function to minimize voltage deviations [84] or mains voltage imbalances [47]. The voltage constraint and objective functions used are given in (4) to (6), respectively.
In (4) Voltage regulation by managing the active power of EVs has been considered in the literature [46,47,65,71,84,[97][98][99][100][101]. In [47], a multi-objective optimization method for EV coordination and distributed generation in the distribution network is presented that considers issues related to power quality, such as neutral current, energy loss, voltage imbalance, and bus voltage problems. In [65], the effect of EVs on a grid voltage imbalance is investigated. The grid's voltage imbalance factor (VIF) is minimized by the optimal choice of three elements, namely charging or discharging the EV, the EV's connection point between the three phases of the network, and the rated charging or discharging power of the EV. This paper also evaluated the effect of coordinated and uncoordinated EV charging on the VIF. In [97], a novel coordinated charging strategy for EVs is presented that considers their temporal and spatial uncertainties and can be used to minimize distribution system power losses and voltage deviations. In [98], the effect of low and high penetration of EVs on a voltage imbalance is investigated, where it is assumed that EV owners can participate in the demand response. In this article, EV owners can cooperate with realtime photovoltaic (PV) systems to produce an acceptable grid voltage imbalance. In [99], a combined method using battery energy management of plug-in EVs (PEVs) and active power curtailment of PV arrays is proposed to regulate voltage in LVDNs with a high level of penetration of PV resources. A distributed control strategy composed of two consensus algorithms is used to effectively utilize the limited storage capacity of the PEV battery, considering its power/capacity and state of charge. A consensus control algorithm is also developed to share the required power curtailment of PVs during overvoltage periods fairly. In this paper, the main objective is to mitigate the voltage increase due to the reverse power flow and to compensate for the voltage drop resulting from the peak load. In [100], a real-time scheduling scheme is proposed for EV charging in a low-voltage distribution system. The proposed scheme schedules the charging of EVs to minimize grid losses or prevent the voltage from dropping below the lower limit during the charging period.

Minimization of Losses by Managing the Active Power
As the demand in the network increases, energy losses also increase. So, uncoordinated charging of EVs and an increased peak load will also lead to increased losses in the network. By managing EVs' active and reactive power and adopting appropriate strategies, the network's power losses and operation cost can be reduced. In this section, algorithms that minimize network losses by managing the active power of EVs are investigated. The objective function related to power loss minimization is given in (7) [44]: where N line is the number of network lines, R l is the resistance of the lth line, and I l,t is the current of the lth line at time t.
Active power management of EVs has been studied for minimizing network losses [44,46,47,50,83,87,91,97,98,[102][103][104][105][106]. In [50], the battery charge profile of EVs is assumed to be rectangular, and a decentralized charging algorithm is proposed. Its objective function includes three factors: transformer aging, energy loss, and EV battery charge cost. In [83], a new charging model for EVs is proposed that includes the optimal power flow, statistical characteristics of EVs, EV owners' degree of satisfaction, and the power grid cost. Minimizing network losses is also considered to be a factor that reduces the cost of operating the network. Furthermore, minimizing the load variance of the power grid has been considered in the objective function of the optimization problem. In [102], a two-stage charge control strategy is proposed; in the first stage, the EV charging cost is considered a goal. In the second stage, a multi-criterion optimization structure is applied to achieve optimal charging planning. The total losses of the distribution network and the cost of reprogramming and application of wind energy to charge EVs are considered in this structure. Unlike other mentioned studies, in [103,104] network losses are reduced by optimal management of EVs' active and reactive power. In [105], the coordination of EVs and DGs in day-ahead electricity markets is done using the local marginal price (LMP) in fleets and at DG-connected buses. This optimization problem's objective is to minimize the distribution grid costs, including the cost of losses, reliability, and EVs. Additionally, the owners of EVs and DGs are encouraged to participate in the proposed scheme by earning rewards.

Reactive Power Support Voltage Regulation with Reactive Power Management
EV chargers can inject inductive or capacitive power into the grid by selecting the current phase angles. Since the EV battery charger provides a reactive power compensation service, this service does not result in additional degradation of the EV battery. Therefore, reactive power management of EVs in the power grid to control the voltage, reduce losses, and correct the power factor has received much attention [45].
Reactive power compensation by EVs has been considered for voltage control in [5,8,45,75,101,103,104,[107][108][109][110]. In [5], a two-level coordinated voltage control method that is applied by the EV charger (EVC) is proposed to regulate the voltage in low-voltage distribution networks. At the higher level, the voltage is adjusted by measuring the voltage of the critical bus, and the control signals are transmitted between all EVCs. At the lower level, the active and reactive power output of each EVC is determined by considering the operating limitations and charging needs. In [101], the management of EVs' active and reactive power is performed to minimize the cost of energy purchases and grid voltage deviations. The constraints of the optimization problem include distribution network operation constraints and charging and discharging constraints related to the EV's batteries and chargers. This problem is modeled as a mixed-integer linear programming (MILP) problem. In [103], an EV is considered to be both an active and a reactive power source. A control strategy is proposed in which total system costs, including the loss cost, energy cost, and voltage imbalance cost, are reduced by optimal charging and discharging of EVs. Reactive power compensation based on day-ahead price signals is also used to provide a voltage regulation service and reduce costs. In [104], management of the active and reactive power of EVs is performed to minimize the cost of energy losses and the cost of operating transformers. The algorithm proposed in this paper can improve the power quality parameters, voltage, and power factor by managing the reactive power. In [108], a two-tier hierarchical control method based on model prediction control (MPC) is proposed to compensate for reactive power and the participation of EVs in voltage regulation. In [109], the impact of reactive power support of EVs during the charging process in a low-voltage residential distribution system was investigated. This support service was tested using three different EV charging strategies: uncoordinated charging, residential off-peak tariff charging, and vehicle-based peak shaving. This paper aimed to determine an appropriate capacitive power factor for all EV chargers to provide several benefits, such as a reduction in the voltage deviation of the distribution grid.

Minimization of Losses by Managing the Reactive Power
As mentioned earlier, EVs can reduce network losses by compensating for the reactive power, reducing network operation costs. The authors in [8,64,103,104,106,107,111] considered minimizing power grid losses by managing the reactive power of EVs. In [8], two models are presented to optimize the distribution network; the first model includes the optimal power flow at the distribution network level, and the second model focuses on the optimal charging of EVs and the support of the reactive power. In the second model, minimizing power losses is also considered to be one of the goals. In [64], a two-layer intelligent energy management approach is proposed to manage EVs' active and reactive power in the distribution system. The second layer is designed for reactive power management from the point of view of the distribution system's operator to minimize system losses by using the reactive power capacity of EVs. In [107], reactive power compensation by EVs is performed to reduce the reactive power support of central generators, which causes the operation of generators to have a higher power factor and increases economic benefits, reducing power losses and improving the voltage's stability.

Support for the Integration of Renewable Energy Sources
Because the output power of renewable energy sources fluctuates, their large-scale integration into the power grid poses many challenges to the system operator. However, EVs, with their V2G capability, can help to increase the penetration of these sources into the power system by supporting renewable energy sources with charging during highgeneration periods and discharging during low-generation periods.
In various papers, EVs have been used to support the integration of solar sources [5,99,[112][113][114][115][116], wind sources [73,102,[117][118][119][120], or both [9,67,121,122]. In [112], an EV charge management scheme is proposed to coordinate the amount of self-consumption of PV output by shifting the charging period of customers' EVs, reducing the PV curtailment caused by a voltage increase in the low-voltage distribution network. Additionally, an auction mechanism is introduced to assure both the equity of the benefit to each customer and the autonomy that enables customers to voluntarily participate in the EV charging management scheme. In [114], the power grid is assumed to have small-scale charging stations and solar panels. EVs' charging and discharging behaviors are optimized to balance the renewable energy cycle and reduce energy costs. The EV charging and discharging cycles are also shortened to prevent battery degradation. In [116], a structure based on coordination between home and grid energy management systems without disturbing EV usage for driving is proposed. The home energy management system develops an EV charging-discharging plan for reducing the residential operation cost and PV curtailment based on voltage constraint information in the grid provided by the grid energy management system and the forecasted power. In [117], the EV demand response is used to flatten the wind power curve, and a hierarchical controller is proposed in which, at the top layer, the ramp rate is calculated and the request signal is sent to all participating EVs. At the second layer, a fuzzy controller is created by defining two fuzzy indices to measure the readiness of each EV to participate in the demand response program. These indices are inferred from the state of charge (SOC) and the time remaining until the EV leaves the parking lot. In [119], a real-time scheduling algorithm is proposed for the charging and discharging of the EVs in a fleet, which maximizes the integration of wind resources and minimizes the cost of charging the EV considering the battery's destruction. In [120], integrated scheduling of EV fleets and wind farm systems in the day-ahead wholesale market is considered. Additionally, the effects of the integrated EV fleets and wind farm on the market outcomes and price as a price-making player are investigated. Furthermore, minimization of the emission of harmful gases is considered in the objective function of the optimization problem. In [9], an intelligent charging strategy for EVs is presented to reduce the impact of output fluctuations of solar and wind resources by considering their temporal and spatial characteristics. This study modeled EVs as demand-responsive loads by introducing stochastic dynamic pricing. Then, two indices are defined to measure the output fluctuations of renewable sources, and the cost of charging the EV is also considered an economic indicator. These indicators are minimized in an optimal charge model. Table 5 summarizes the classification of literature on EV services to improve the power system's operation. Table 5. Classification of EV services to improve the power system's operation.

Economic Objectives
By managing the charging and discharging of EVs and improving the technical performance of the power grid, economic benefits can be achieved. Various EV charge and discharge management strategies have been introduced based on real-time electricity market prices, historical market price data, or price forecasts. Each strategy has economic objectives, such as increasing profits through the discharge process during high price periods and reducing costs through the recharging process during low price periods. In general, three main actors, the EV owner, the aggregator, and the system operator, are involved in the optimization of the charging and discharging of EVs. Therefore, strategies related to economic goals can be considered from three perspectives: the system operator, the aggregator, and the EV owner [123].

System Operator Point of View
The system operator is responsible for the secure and economical operation of the grid and tries to achieve its goals by direct or indirect management of EVs. With optimal EV management, the system operator can reduce the number of power purchases from the upstream network during peak periods, integrate a larger number of renewable resources into the grid, and minimize the cost of starting, shutting down, and fueling generators, reducing costs. In (8), the objective function for minimizing the cost of the grid's operation in the presence of thermal units, renewable sources, and EVs is expressed [63]: In (8), P t and π t are the power purchased from the grid and the price of electricity at time t, respectively. C DG k.t , SUC k , and SDC k represent the fuel costs, start-up cost, and start-down cost of DG k, respectively. N i is the total number of EVs and P Dch i.t and C Dch i.t are the discharge power and the discharge price of EV i at time t, respectively. The on and off states of DG k at time t are also indicated by the binary variables u on k.t and u off k.t , respectively. The fuel cost of DG units is also expressed in (9).
Several studies have aimed to minimize grid operation costs by optimal charge and discharge management of EVs [53,[57][58][59]68,83,101,[103][104][105][106]114,[120][121][122][124][125][126][127][128][129]. In [53], a robust, decentralized model is proposed for the optimal and coordinated operation of the distribution grid with EV aggregators, which aims to minimize the overall system cost, including the cost of purchasing power from the upstream grid, the start-up cost, the shutdown and fueling of generators, and the EV discharge cost. In [68], a robust optimization model for coordinated dispatching of EVs is proposed that aims to minimize the overall grid costs, including the cost of fuel for thermal generators, the cost of discharging EV aggregators, and the cost of providing a reserve service by generators and aggregators. In [104], an algorithm for minimizing the cost of energy losses and operating costs of transformers through active and reactive power management of EVs is proposed to optimize the operating costs of the distribution grid. In [106], an optimal active and reactive power exchange between EVs and the power grid is proposed that increases the benefits to EV owners and grid operators simultaneously. The benefits to EV owners include minimization of the cost of charging EVs and an increase in the lifespan of their batteries, whereas the benefits to grid operators include minimization of the cost of power losses and an improvement in the lifespan of the grid's power transformers. In [122], by managing the charging behavior of EVs and other power generation units in the grid, the total cost of the network is minimized. Additionally, the cost of unsupplied energy is considered as the cost of reliability in the objective function. In [124], in addition to the cost of purchasing energy from the upstream grid, the cost of fuel, the cost of starting-up CHP units, the cost of charging and discharging the EV, the cost of wind and solar units, and the cost of CO 2 emissions are considered to minimize the operating cost of the distribution grid. In [127], a two-stage model is proposed in which EV uncertainties are modeled in the first stage, and parking operators participate in energy distribution, reservation, and regulation markets with optimal management of their EVs. In the second stage, the technical constraints on the distribution grid are met, and the overall cost of the system is minimized.

EV Aggregator's Point of View
An individual EV does not have sufficient capacity to participate in the electricity market or provide ancillary services. Therefore, EV aggregators are responsible for controlling and managing the charging and discharging of a group of EVs. Aggregators can participate in various markets, such as the energy market and the ancillary services market, and can earn revenue by adopting appropriate strategies in addition to supplying the energy that EVs need. By discharging the EV's battery into the power grid, additional degradation of the battery occurs. The aggregators must share a portion of their profits with EV owners to satisfy them.
Strategies to maximize EV aggregator's profit through market participation have been examined in [8,63,69,75,77,92,96,[130][131][132][133][134][135][136][137][138][139][140]. In [69], a robust optimization technique is used to consider the market price uncertainty in the upstream grid. Instead of estimating the market price, high and low values of the market price in the upstream network are used to model the market price uncertainty and maximize the EV aggregator's profit. In [77], an optimal dispatching strategy is proposed to maximize the aggregator's profit in which aggregators participate in supplementary frequency regulation while meeting the demand of EV owners. The authors in [131] introduced two types of stakeholders: the charging station operator and EV owners. A dual-objective optimization method is proposed to minimize the costs of charging stations and increase the convenience of EV owners by charging batteries faster. In [132], the optimal scheduling of aggregators' participation in the day-ahead energy market and the reserve market of the day was performed with the aim of maximizing their profits. In this paper, each aggregator's revenue is obtained through the sale of electric energy to EVs and participation in the day-ahead market and reserve market. Aggregator costs include the cost of purchasing electricity from the grid and the degradation of EV batteries. Market price uncertainties and the availability of EVs are also considered in the optimal scheduling. In [135], a fuzzy optimization model is proposed to maximize the profitability of the parking operator while meeting the charging demand of EV owners. The parking operator offers EV recharge scheduling in the day-ahead energy market and balances any deviation from the scheduling in the day-ahead in the real-time market. Profit uncertainties due to market price fluctuations as well as EV uncertainties are also considered. In [139], a comprehensive day-ahead scheduling framework is developed for electric vehicle operation, including three main types of stakeholders: electric vehicles, charging stations, and retailers. Additionally, an equilibrium problem is solved to maximize the benefits of all stakeholders.

EV Owner's Point of View
EV owners can reduce their charging costs and even earn money by recharging their EV batteries during low-energy-price periods and discharging them during high-energyprice periods. Therefore, the coordination of charging and discharging EVs in the power grid has been considered in various studies by using economic strategies to benefit the EV owner. In addition to reducing costs for the EV owner, these strategies prevent peak loads and network congestion from shifting demand to hours with lower demand. However, discharging the batteries of EVs in the network reduces their life cycle. It affects the profit of the EV owner, so the cost of the battery's destruction must also be considered to formulate the problem. The objective function for minimizing the charging cost for the EV owner is given in (10) [44]. In this equation, P charge t and P discharge t are the charging and discharging rates of the EV battery at time t, respectively, and C charge t and C discharge t represent the charge and discharge prices of the EV power, respectively. C deg (E trans ) Represents the cost of the battery's destruction as a function of the energy exchanged (E trans ) in V2G mode.
Minimizing the charging cost of EV owners has been considered in [4,9,44,[46][47][48][49][50]61,71,75,76,[85][86][87]102,110,118,119,[137][138][139][140][141][142][143][144][145]. In [110], the reactive power compensation capability of EVs is used for monetization. In this paper, a robust optimization approach is proposed to manage the active and reactive power of the distribution network using EVs with the aim of minimizing the difference between the cost of energy and revenue from the exchange of reactive power of EVs with the network. In [118], a structure based on stochastic optimization for the coordinated operation of EVs and wind generators as virtual power plants is introduced in a three settlement pool-based market. A balancer is provided in which the aggregator buys enough energy based on the daily driving patterns of the EVs and programs. The stored energy is used to balance the fluctuations in wind energy production. It reduces energy costs for EV owners. The cost of the battery's destruction is also considered in the formulation of the problem. The authors in [143] evaluate the EV owner's economic benefits from participating in the primary frequency tuning market by considering battery degradation and suggest a way to optimize the power bid to maximize the EV owner's revenue from providing the primary frequency tuning service. In [144], a joint planning strategy for charging, discharging, and routing EVs is proposed that aims to maximize the income of EV owners. It is shown that, with a slight change in driving patterns, the EV owner gains profit and the network's operation also improves. In [145], a centralized charging and discharging control method for EVs is proposed to minimize the operational costs of EV owners while maintaining feeder voltages within certain limits. Table 6 lists the articles based on the economic goals of each of these three main actors. Table 6. Classification of economic goals from the perspective of the three main actors.

Environmental Goals
Minimization of greenhouse gas emissions, such as CO 2 , has been considered the objective of charge and discharge strategies for EVs in some cases. Greenhouse gas emissions from EVs depend on various factors such as the structure of the power system, the weather, the economic power of the EV, and the EV's charging period. For example, the simultaneous charging of EVs during the high peak period of renewable sources (i.e., the periods with low CO 2 emissions) and discharging of EVs during the low peak period of renewable sources (i.e., the periods with high CO 2 emissions) would not only help to involve these sources, but also help to lower CO 2 emissions. However, the uncontrolled charging of a large number of EVs in a power system that is directly dependent on fossil fuels could significantly increase CO 2 emissions [70,146]. In (12) is presented the objective function for the minimization of CO 2 emissions, which includes the CO 2 emissions from the grid (Em grid ) and DG (Em DG ).
min Em grid +Em DG The Em grid and Em DG are presented in (12) and (13).
In (12), Em grid is the CO 2 emission rate in the main system at time interval t, and in (13) Em DG is the CO 2 emission rate related to DG k. Investigation of the environmental issues in EV charging and discharging problems has been carried out in several studies. In [126], a multi-objective function for the charging and discharging of EVs in the distribution system is formulated, where the objectives are minimization of the total cost of the system and minimization of the emitted greenhouse gases from DGs and the main power system. Moreover, Benders' decomposition is considered to split the MINLP problem into two MILP and NLP problems to enhance the calculation time. In [130], another multi-objective model for smart EV parking based on PV panels is presented, and a time-of-use strategy in the demand response program is proposed to enhance the environmental performance and economy of parking. Furthermore, the total cost of parking and greenhouse gas emissions from DGs and the upstream grid are minimized.

Mathematical Models and EV Charge and Discharge Optimization Methods
Large-scale EV charge and discharge optimization problems have a lot of decision variables and are therefore very difficult. To date, a variety of approaches have been used to address these optimization issues. In the literature, the charging and discharging of EVs have been optimized by using mathematical optimization methods and creating linear programming (LP) [66], mixed-integer LP (MILP) [11], mixed-integer non-LP (MINLP) [124], mixed-integer quadratic programming (MIQP) [53], and non-LP (NLP) [104] models. Heuristic optimization techniques, such as the genetic algorithm (GA) [85], particle swarm optimization (PSO) [107], differential evolution (DE) [47], ant colony optimization (ACO) [142], the bat algorithm (BA) [122], the improved electromagnetism-like algorithm (IEMA) [44], and the whale optimization algorithm (WOA) [87], have also been used to solve nonlinear and non-convex optimization models. Other approaches to optimizing the management of EVs or EV aggregators include game theory [48,96,136] and fuzzy logic [117,135]. For optimal EV programming, robust optimization methods [53,68] as well as stochastic optimization [118,122] have been used. Table 7 compares various papers based on different aspects, such as priorities, the control structure, the optimization process, and the form of power exchange, based on what has been said so far.   Maximizing the average and deviation in the profit of the EV aggregator Centralized Both MILP/CPLEX solver [135] Maximizing the profit of the parking operator (i.e., the EV aggregator) Centralized G2V Fuzzy optimization [138] Maximizing the profit of the parking operator, minimizing the EV owner's charging cost

Centralized
Both PSO [144] Maximizing the EV owner's benefit Centralized Both MILP

The Main Challenge of V2G Technology: EV Battery Degradation
The preferences of EV owners must be considered when developing a charging strategy. It is reasonable to assume that the owner will wish to keep the cost of operating the car as low as possible. This includes both the cost of energy utilized and the cost of battery degradation. Electric batteries degrade over time, and repeated charging and discharging speeds up the process. As a result, when contemplating a V2G strategy in which the battery may be charged and discharged repeatedly, accelerated degradation costs must be factored in. Given this, it is likely that the EV owner will need some sort of financial incentive to consent to participate in the V2G context if it causes the battery to age faster [147].
Since batteries are one of the most important and costly components of EVs, the cost of battery degradation influences the economic benefits of smart EV charging and discharging. As a result, EV battery degradation is widely acknowledged as a significant barrier to EV participation in the V2G phase. As a result, the system operator or EV aggregator should have an appropriate mathematical model of battery degradation in order to make the best decisions on the charging and discharging of EVs in the power grid. In general, there are two types of battery degradation: calendar aging and cycling aging. Factors such as temperature, time, and SOC have an effect on calendar aging, while the number of cycles, the charge and discharge rate, and the discharge depth affect the aging cycle. Additionally, cycling degradation causes more aging in the battery than calendar degradation [148].
The cost of battery degradation has recently been modeled in several studies on the optimal charge and discharge management of EVs, especially in cases where the EV participates in the electricity market or provides ancillary services. Minimizing the cost of EV battery degradation is considered one of the goals of charge and discharge optimization in [75,76,119]. On the other hand, the performance of different batteries differs under various conditions and in various applications. The authors in [149] examined the operation and degradation of two different types of lithium-ion (Li-ion) batteries while delivering frequency and peak-shaving control services and with and without considering EV driving cycles. They found that different batteries have different efficiencies with unique features that should be considered when delivering ancillary services. In [150], battery degradation caused by driving and V2G services is quantified, and it is shown that low V2G services have little effect on EV battery life.

Discussion, Future Trends, and Suggestions
The foundation of this review paper is the various goals of EV charge/discharge management approaches with a focus on the charging/discharging methods, control structures, objectives, and optimization techniques used to solve such problems. Accordingly, conductive charging, inductive charging, and battery swapping, as the most-discussed EV charging methods, were discussed with a focus on the characteristics and effects of conductive charging as most-used method for charging EVs. Considering the investigation of the literature in this area, battery swapping technology has not been focused on in the literature to an acceptable level and should be studied considering various types of batteries for EVs, battery degradation, and the tendency of EV owners to contribute to the swapping technology. Additionally, it is suggested that the unification of inductive charging facilities for all types of EVs be studied as the lack of universality in the EV industry has resulted in the isolation of EV networks. In addition, in Section 2, the advantages and disadvantages of each of these charging and discharging methods were discussed. For example, as shown in Table 3, using the dynamic inductive charging method, the driving range of the EVs increases and the size of the EVs' battery decreases, which leads to a reduction in the initial cost of EVs. However, on the other hand, the development of inductive charging infrastructure imposes a very high investment cost compared with conductive charging. Furthermore, the charging efficiency in the case of the inductive charging method is lower than that of the conductive charging method. Therefore, by increasing the efficiency of the inductive charging method and reducing the costs associated with its infrastructure, it can be used effectively in the future.
Then, the centralized, decentralized, and hierarchical methods as controlling methods for EV charge and discharge management in the power grid were discussed and compared in terms of their structure and advantages/disadvantages. As shown in Table 4, the centralized structure is superior to the decentralized structure in terms of achieving the optimal solution and the required communication infrastructure. However, in terms of scalability, computational complexity, and the EV owners' ability to manage the charging and discharging of their EV, a decentralized structure offers more advantages than a centralized structure. The hierarchical method can also be implemented using various structures, and, according to the implemented structure, it can offer the advantages of both the centralized and decentralized methods. Additionally, more precise management of EV charging and discharging should be investigated in future works by simultaneously considering EVs' temporal and spatial uncertainties. To incorporate EVs into most smart grid applications, the decision-making period of EV charge and discharge management would need to be more precise. The management of data related to EVs needs further investigation in terms of security and privacy, which should be analyzed in future work.
The enhancement of the power grid's operation, economic issues, and environmental issues were then investigated in this study as three types of goals sought by EV charge and discharge management in the power network. The objectives of EV management with the goal of the enhancement of the power grid's operation were found to be focused on active power support, reactive power support, and support for the integration of renewable energy sources. Accordingly, frequency regulation, peak shaving, valley filling, load leveling, voltage regulation, and loss minimization with active power management were classified as active power support services. Furthermore, voltage regulation and loss minimization with reactive power management were classified as reactive power support services. Additionally, support services for increasing the penetration of solar and wind energy sources were included in the category of support services for the integration of renewable energy sources. It is clear that, by combining different EV services, for example, active and reactive power support services and better support for the power grid, EV owners can obtain more profit. As a suggestion for future work, the capability of EVs to recover loads and increase the network's resilience as well as improvement of power system indices could be investigated. Additionally, economic objectives were analyzed considering the system operator's point of view, the EV aggregator's point of view, and the EV owner's point of view. It is more practical to consider the interests of all stakeholders involved in the issue, such as EV owners, aggregators, retailers, and distribution network operators, when evaluating the economic benefits of the optimal management of EV charging and discharging.
Mathematical modeling and some of the most important methods for solving the EV charging and discharging optimization problem, including mathematical optimization methods, meta-heuristic algorithms, game theory, and fuzzy logic, were also briefly reviewed. Finally, the main challenge of V2G technology, which is the degradation of the EV's battery, was studied. As mentioned above, frequent charging and discharging of an EV's battery accelerates its aging. Therefore, battery degradation due to V2G technology must be considered in charge and discharge optimization problems.

Conclusions
The most recent studies on optimizing the charging/discharging of EVs in power systems were reviewed in this paper. First, the advantages and disadvantages of various EV charging methods, including conductive charging, inductive charging, and battery swapping, were studied. As mentioned above, if the dynamic inductive charging method is used, the battery size of EVs can be reduced, decreasing the EVs' initial cost. As a result, dynamic inductive charging can help to increase the adoption of EVs. Moreover, in the inductive charging method, the risk of electric shocks is significantly reduced. The battery swapping method, as one of the main battery charging methods, also faces many challenges. These include the differences between batteries from different manufacturers, the complex and expensive infrastructure, and the issue of battery ownership. However, as mentioned above, battery swapping stations can effectively support the power grid and provide various services due to their high energy storage capacity. The battery swapping method is also the fastest charging method, eliminating the need for EV owners to park for long periods for charging. The EV charging and discharging control systems were divided into three categories, namely centralized, decentralized, and hierarchical systems, and the characteristics of each of these approaches were studied and compared. A centralized structure is very efficient for small-scale problems, but it has issues on a large scale due to the complexity of the problem. Hence, although the probability of achieving an optimal global solution in a decentralized structure is low, on a large scale, and especially in real-time problems, the decentralized method is superior to the centralized method. Additionally, the hierarchical method can be implemented in various ways according to the needs of the power network and offers the advantages of both centralized and decentralized methods.
The various goals of EV charging and discharging optimization were then grouped into three categories, namely technological goals to enhance the network's operation, economic goals, and environmental goals, with each of these goals being further subdivided and analyzed in detail. The technical goals for improving the grid's operation were divided into three categories: active power support, reactive power support, and support for the integration of renewable energy sources, and the various EV services were classified into these three categories. Economic goals were also divided into three categories, including economic goals from the perspective of the EV owner, the aggregator, and the distribution network operator, and examined in detail. The various objective functions used in EV charge and discharge optimization problems for each of the technical, economic, and environmental goals were also reviewed. Various optimization approaches have been used to solve EV charge and discharge management problems in various studies; therefore, a short study of these approaches was presented. Mathematical optimization methods, meta-heuristic algorithms, such as GA and PSO, game theory, and fuzzy logic are among the main methods researchers have used to solve the EV charge and discharge optimization problem. Eventually, the factors affecting EV battery degradation and models of EV battery degradation for EV charge and discharge optimization problems were evaluated. As mentioned above, the factors that affect battery degradation were divided into two categories: calendar aging and cycling aging. Additionally, it was stated that cycling degradation causes more aging in the battery than calendar degradation. Therefore, in EV charge and discharge optimization problems, it is necessary to provide the economic justification for providing V2G services considering the battery degradation cost.