Assessing and Mitigating Impacts of Electric Vehicle Harmonic Currents on Distribution Systems

Abstract: Harmonic currents of electric vehicle (EV) chargers could jeopardize the power quality of distribution systems and add to the transformer’s losses, thus degrading its lifetime. This paper assesses and mitigates the impacts of different EV chargers on distribution transformers and the voltage quality of distribution systems. The effect of state-of-charge (SOC) of the EV battery is considered through applying weighted arithmetic mean to accurately assess the impacts of EV harmonic currents on aging and losses of the EV interfacing transformer. The voltage quality of the IEEE 33-bus distribution system, supplying several EV parking lots, is also assessed at different charging levels using a fast-decoupled harmonic power flow. A new optimal harmonic power flow algorithm—that incorporates photovoltaic-based distribution generation units (DGs)—is developed to enhance the voltage quality of distribution systems, and elongate the lifetime of the substation transformer. The effectiveness of the proposed mitigation method is confirmed using the IEEE 33-bus distribution system, hosting several EV charging stations and photovoltaic-based DGs.


Introduction
Electrification of automobiles has become a vital component in the propulsion strategies of automakers around the world to lower fuel consumption, reduce climate change caused by greenhouse emissions, and increase energy security through variation of the available energy sources [1]. Electric vehicle (EV) charging systems can provide one of three power levels: Level I, slow charging; Level II, semi-fast charging; and Level III, DC fast charging. Private and public institutions usually use Level II charging that requires a 208 V or 240 V outlet. Since semi-fast and fast charging systems offer an adequate amount of power, it has drawn researchers' and developers' interests in the literature.
Due to the nonlinear load nature of battery charging, EVs induce transformer temperature and losses to rise, and thus, the transformer's lifetime to decrease [2]. The impacts of increased EV demand, including current harmonics, on load loss, temperature, and the aging acceleration factor of a 100-kVA distribution transformer (DT) were presented in [2], and the capability of the power system to safely accommodate the extra EV load was studied. However, the effect of state-of-charge (SOC) on the harmonic spectrum of charging current is neglected. SOC influences the harmonics of charging current, increasing the current distortion throughout the charging cycle [3]. In [4], the harmonic impacts of Level II and Level III chargers on the voltage total harmonic distortion (THD) were studied. However, this study was limited to the buses to which the EV chargers are connected.
The aging acceleration factor and loss-of-life (LOL) of distribution transformers were calculated in [5] for different battery charging profiles. In [6], the impacts of EV and rooftop solar photovoltaics on distribution transformer aging were studied. The distribution-level secondary transformer LOL

Transformer Loss Modeling
Transformer losses are categorized into no-load loss (P NL ), and load loss (P LL ). P LL consists of I 2 R copper loss, and stray loss (P STRL ) caused by stray electromagnetic flux. P STRL is divided into winding eddy-current loss (P EC ) and stray loss (P OSL ) in non-winding components due to structural parts, bus bar connections, the clamps, tanks and the core. The excessive temperature rise of the windings draws significant concerns about transformers operating under non-sinusoidal load conditions. The transformer losses are expressed on a per unit (pu) basis, where the base loss is the copper loss at the rated current. The load loss under rated load conditions pu is given by P LL−R−pu = 1.0 + P EC−R−pu + P OSL−R−pu (1) where the subscripts 'R' and 'pu' denote the rated current condition, and a per unit quantity. P EC−R−pu under a specific frequency is proportional to the square of the load current and approximately proportional to the frequency squared. Similar to P EC−R−pu , P OSL−R−pu is proportional to the square of the load current and the harmonic frequency to the 0.8 power [19]. Harmonic loss factors are essential to determine the transformer capability in supplying non-linear loads, such as EV chargers. Therefore, harmonic loss factors are applied to P EC−R−pu and P OSL−R−pu to determine the heating due to harmonic load currents. The harmonic loss factors for winding eddy currents, i.e., F HL , and other stray losses, i.e., F HL−STR , are given by where h max is the highest harmonic number, and I h is the ratio of the hth harmonic current to the fundamental current. By incorporating the harmonic loss factors into (1), the transformer load losses under non-linear loads can be obtained: where I pu is the root mean square (RMS) load current per unit, i.e., I pu = h max h=1 I 2 h .

Transformer Temperature Rise Modeling
Thermal stresses arise due to heat in the system introduced by transformer losses resulting from current harmonics. A total of 50% of transformer lifetime reduction is due to thermal tensions produced by non-linear loads [20]. The top-oil-rise over ambient temperature of a transformer, θ TO , is proportional to the total losses to the 0.8 exponents, and is expressed in • C, as follows [21]: where θ TO−R is the top-oil-rise over ambient temperature under rated conditions in degree Celsius ( • C), and P NL−pu is the no-load loss per unit. The hottest-spot conductor rise over top-oil temperature, θ g , is given in • C by where θ g−R is the hottest-spot conductor rise over top-oil temperature under rated conditions in • C.
Using the top-oil-rise over ambient temperature and the hottest-spot conductor rise over top-oil temperature, the hottest-spot conductor rise over ambient, θ H , is given in • C by

Transformer Lifetime Modeling
For a given transformer rated at 65 • C average winding rise, its aging acceleration factor (F AA ) is equal to 1.0 at a reference hottest-spot temperature of 110 • C. This factor is proportional to the hottest-spot temperature and exceeds the value of one for temperatures above 110 • C, indicating that the rate at which transformer insulation aging increases is beyond normal. In [21], F AA is given by The normal insulation life (Li f e norm ) at a 65 • C average winding temperature rise system is 20.55 years (180,000 h) at the hottest-spot temperature of 110 • C. Using F AA , the distribution transformer real life, Li f e real , is determined in years by

Impact of EV Harmonic Currents on Distribution Transformers
The impacts of EVs were studied on a sample 1500 kVA DT whose characteristics at the rated condition are given in Table 1 [22]. The assessment was performed by adding the EV demand to the typical daily load curve of the USA in 2011 [2]. With residential EV chargers, EV users typically charge their vehicles during the off-peak load hours from 9:00 p.m. to 4:00 a.m. Two sets of total harmonic distortion values were utilized to estimate the harmonic distortion of a Level I/II single-phase charger and a Level III three-phase charger, as presented in Tables 2 and 3, respectively [3]. It can be observed that the percentage of harmonic currents increased with the charging time, that is, when the SOC increased. The effect of the SOC on the EV harmonic currents should be considered to enhance the accuracy of the harmonic estimation. Therefore, the weighted arithmetic mean was computed on the time-changing harmonic values in Tables 2 and 3 at each harmonic order. The weighted arithmetic average of the harmonic current at the hth harmonic number was calculated using where I 1,t i and I h,t i are the fundamental and harmonic currents measured at time t i of the charging cycle, respectively; ∆t i denotes the time difference between two harmonic current measurements, i.e., ∆t i = t i − t i−1 , and t 0 = 0. K is a factor used to compensate for the harmonic magnitudes that were not measured in the harmonic distribution. This factor was considered as 5% for Level I/II and 10% for Level III charging. Two average harmonic spectrums were obtained using (10), for Level I/II and Level III chargers. Figure 1 demonstrates the eddy-current loss, other stray loss, and load loss for Level I/II and Level III chargers, which are denoted by Cases 1 and 2, respectively. In the case of the Level III charger (Case 2), it can be observed that both P EC and P OSL were greater than those of the Level I/II chargers (Case 1). The highest value of P EC rose from 4.50 pu (Case 1) to 4.99 pu (Case 2). At the same loading condition, P OSL slightly increased from 0.45 pu (Case 1) to 0.48 pu (Case 2). Consequently, the load loss values caused by the Level III chargers were greater than the ones due to the Level I/II chargers. The load losses peak reached 6.20 pu and 6.75 pu for Case 1 and Case 2, respectively.
The impact of the thermal stress on the transformer's lifetime due to power losses was then evaluated by determining the aging acceleration factor, F AA , and the transformer's real life. Based on the results of Figure 2, the values of F AA were below one when the hottest-spot temperature was lower than the reference temperature (110 • C). The aging acceleration factor increased as the temperature values exceeded the reference temperature, indicating that the rate of transformer insulation aging acceleration is greater than the normal rate at the reference temperature. This factor exceeded one between the period of 9:00 p.m. and 11:30 p.m. in Case 1, reaching a maximum of 8.6 at 9:30 p.m. For the Level III charger, this factor was also above one at midnight. It attained a value of 18.  (Case 2), it can be observed that both and were greater than those of the Level I/II chargers (Case 1). The highest value of rose from 4.50 pu (Case 1) to 4.99 pu (Case 2). At the same loading condition, slightly increased from 0.45 pu (Case 1) to 0.48 pu (Case 2). Consequently, the load loss values caused by the Level III chargers were greater than the ones due to the Level I/II chargers. The load losses peak reached 6.20 pu and 6.75 pu for Case 1 and Case 2, respectively. The impact of the thermal stress on the transformer's lifetime due to power losses was then evaluated by determining the aging acceleration factor, , and the transformer's real life. Based on the results of Figure 2, the values of were below one when the hottest-spot temperature was lower than the reference temperature (110 °C). The aging acceleration factor increased as the temperature values exceeded the reference temperature, indicating that the rate of transformer insulation aging acceleration is greater than the normal rate at the reference temperature. This factor exceeded one between the period of 9:00 p.m. and 11:30 p.m. in Case 1, reaching a maximum of 8.6 at 9:30 p.m. For the Level III charger, this factor was also above one at midnight. It attained a value of 18.7 at 9:30 p.m. These results indicate that the transformer's life expectancy is affected and drops below the normal insulation life (i.e., 20.55 years) due to EV charging. The impacts of the harmonic components of Level III charging on the transformer's loss of life are greater than those of Level I/II charging. The average lifetime of the EV interfacing transformer could drop from 20.55 years to 17.88 and 16.40 years in Case 1 and Case 2, respectively, as indicated in Figure 3.

Impact of EV Harmonic Currents on Distribution Transformers
This section investigates the impacts of current harmonics due to EV charging on a distribution system.

Impact of EV Harmonic Currents on Distribution Transformers
This section investigates the impacts of current harmonics due to EV charging on a distribution system.

Impact of EV Harmonic Currents on Distribution Transformers
This section investigates the impacts of current harmonics due to EV charging on a distribution system. Figure 4 displays the IEEE 33-bus distribution system under study with EV charging stations and PV-based DGs [23]. Various loads, including residential, commercial, and industrial types with the daily power profiles shown in Figure 5, were connected to the distribution system. The EV power profile Figure 5 describes the uncontrolled charging power profile (i.e., based on first come first serve), which was constructed using data provided by Toronto parking authority (TPA) [24]. EV charging stations were installed at buses 15, 16, 22, and 24. The EV penetration level was taken as 15% of the total system load. Three PV-based DGs were connected to buses 14, 20, and 25. Likewise, the PV penetration level was kept at 15%. S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S19 S20

Harmonic Power Flow Analysis with EV Charging Demand
Harmonic power flow is needed to estimate the harmonic distortion in the presence of nonlinear devices such as EV chargers. It is proposed to employ the decoupled harmonic power flow (DHPF) technique to assess the impacts of EV charging on power quality due to its computational efficiency and robust convergence [25]. The procedure of the DHPF is shown in the flow chart of Figure 6. Firstly, the fundamental power flow solution was obtained by solving the following active and reactive power balance equations:

Harmonic Power Flow Analysis with EV Charging Demand
Harmonic power flow is needed to estimate the harmonic distortion in the presence of nonlinear devices such as EV chargers. It is proposed to employ the decoupled harmonic power flow (DHPF) technique to assess the impacts of EV charging on power quality due to its computational efficiency and robust convergence [25]. The procedure of the DHPF is shown in the flow chart of Figure 6. Firstly, the fundamental power flow solution was obtained by solving the following active and reactive power balance equations: where P i and Q i are the injected active and reactive powers at bus i, respectively; γ (1) ij is the magnitude of the (i, j) th element of the fundamental bus admittance matrix; θ (1) ij is the angle of γ (1) j , respectively; and the superscript '1' stands for the fundamental component.
Then, the fundamental power solution was used to calculate the admittances of branches and linear loads at higher-order harmonic frequencies. The harmonic admittance of a linear load connected at a given bus i is presented by its admittance y (h) i in (13); and the harmonic admittance of a branch, y (h) ij , i.e., connecting buses i and j, is given by (14): where P D,i and Q D,i are the fundamental active and reactive power demands at bus i, r ij is the branch resistance, and x ij is the fundamental branch reactance. Based on (13) and (14), an admittance matrix where y  Formulate harmonic admittance matrix Calculate harmonic currents of EV using EV fundamental current and harmonic spectrum.
Solve Nodal equations for voltage, i.e., Use voltage profile at each harmonic order to assess power quality No Yes Figure 6. Flowchart of the DHPF technique.
Then, the fundamental power solution was used to calculate the admittances of branches and linear loads at higher-order harmonic frequencies. The harmonic admittance of a linear load connected at a given bus i is presented by its admittance ( ) in (13); and the harmonic admittance of a branch, ( ) , i.e., connecting buses i and j, is given by (14): where , and , are the fundamental active and reactive power demands at bus i, is the branch resistance, and is the fundamental branch reactance. Based on (13) and (14), an admittance matrix ( ) was formulated for each harmonic order h. ( ) was constructed with diagonal elements ( ) and off-diagonal elements ( ) as given by The power electronics circuit configuration of battery charging systems is typically formed by two back-to-back converters: an AC/DC converter and a DC/DC converter. The AC/DC converter rectifies the AC voltage from the grid to a DC voltage and maintains a constant unity power factor. The DC/DC converter controls the delivered power to the battery pack, and the voltage rectification depends on the battery pack's voltage [24]. Therefore, EV parking lots were modeled as decoupled harmonic current sources. The fundamental EV current at bus i was calculated using Energies 2020, 13, 3257 10 of 17 where P EV i and Q EV i are the EV active and reactive power charging demands, respectively. Typically, EV parking lots do not participate in voltage regulation, and thus, Q EV i was set at zero. The EV harmonic current I (1) EV i was calculated using the charger harmonic spectrum, i.e., I h / I 1 in (10), as follows: Lastly, the nodal equations were solved at each harmonic order to obtain the harmonic voltage profile at each bus using

Impact Assessment of EV Battery Charging on Voltage Quality
The IEEE 33-bus radial distribution system, shown in Figure 4, was used as a test system. Firstly, the weighted average method was applied using (10) and with a K factor of 5% to obtain the harmonic current spectrum of Level I/II chargers and Level III chargers. The average harmonic current spectrum, along with the fundamental power flow results, was employed in the DHPF to calculate the harmonic voltage at each bus. The total harmonic distortion (THD) for voltage at bus i was calculated using Figure 7 demonstrates the voltage THD at all buses for Level I/II and Level III chargers. The highest voltage THDs occurred at the EV buses. Besides those of EV buses, the voltage THDs of buses 10-14 and 17 violated the 5% standard limit, specified in [26], when using Level III chargers. With regards to Level I/II chargers, the voltage THD exceeded 5% only at buses 15, 16 and 24. These results demonstrate that Level III chargers have higher impacts on the voltage quality as compared to Level I/II chargers.
The EV harmonic current (1) was calculated using the charger harmonic spectrum, i.e., ̃ℎ /̃1 in (10), as follows: Lastly, the nodal equations were solved at each harmonic order to obtain the harmonic voltage profile at each bus using (ℎ) (ℎ) = (ℎ) .

Impact Assessment of EV Battery Charging on Voltage Quality
The IEEE 33-bus radial distribution system, shown in Figure 4, was used as a test system. Firstly, the weighted average method was applied using (10) and with a K factor of 5% to obtain the harmonic current spectrum of Level I/II chargers and Level III chargers. The average harmonic current spectrum, along with the fundamental power flow results, was employed in the DHPF to calculate the harmonic voltage at each bus. The total harmonic distortion (THD) for voltage at bus i was calculated using Figure 7 demonstrates the voltage THD at all buses for Level I/II and Level III chargers. The highest voltage THDs occurred at the EV buses. Besides those of EV buses, the voltage THDs of buses 10-14 and 17 violated the 5% standard limit, specified in [26], when using Level III chargers. With regards to Level I/II chargers, the voltage THD exceeded 5% only at buses 15, 16 and 24. These results demonstrate that Level III chargers have higher impacts on the voltage quality as compared to Level I/II chargers.

Current Total Harmonic Distortion
EV charging can also impact the harmonic current through the distribution system, mainly through the substation transformer, thus increasing its losses and accelerating its aging. The DHPF was applied to calculate the harmonic current through the main substation transformer I (h) ss using the harmonic voltages of buses 1 and 2, as follows: ij is the admittance of the branch connecting buses 1 and 2 at harmonic order h, which is equal to −Y

Current Total Harmonic Distortion
EV charging can also impact the harmonic current through the distribution system, mainly through the substation transformer, thus increasing its losses and accelerating its aging. The DHPF was applied to calculate the harmonic current through the main substation transformer ( ) using the harmonic voltages of buses 1 and 2, as follows: where ( ) is the admittance of the branch connecting buses 1 and 2 at harmonic order h, which is equal to − ( ) in ( ) . Figure 8a illustrates the percentage harmonic currents of ( ) at 10 a.m. It can be observed that the 3rd harmonic current was the highest among all the orders, reaching a value of 15.27 %.
(a) (b) The current THD of ( ) was then obtained as given by at different times of the day are shown in Figure 8b. In this figure, it can be observed that the current THD was negligible from 1:00 p.m. until 7:00 a.m due to the tiny EV charging demand during that period. At 10:00 a.m., the current disturbance was the highest, reaching a value of 17.4%. This happens when the EV charging demand is at its peak value. Consequently, the total demand distortion (TDD), which is equivalent to the THD at the peak EV charging demand, also occurs at 10:00 a.m. According to the limits set by IEEE Std. 519 [26], the TDD limit for systems rated 120 V through 69 kV is specified as 12%.

Proposed Optimal Harmonic Power Flow
To compensate harmonic currents produced by EV charging stations, it is proposed to use PVbased DGs within a centralized control approach. The harmonic spectrums of the PV-based DGs were optimally determined to minimize the harmful impacts of EV on the distribution system, thus enhancing the voltage quality and elongating the lifetime of the substation transformer. The objective function was used to minimize the voltage THD of all buses, ensuring that all buses had a voltage THD lower than the standard limit, i.e., below 5%. Thus, the objective function is given by = min (23) THD I ss at different times of the day are shown in Figure 8b. In this figure, it can be observed that the current THD was negligible from 1:00 p.m. until 7:00 a.m due to the tiny EV charging demand during that period. At 10:00 a.m., the current disturbance was the highest, reaching a value of 17.4%. This happens when the EV charging demand is at its peak value. Consequently, the total demand distortion (TDD), which is equivalent to the THD at the peak EV charging demand, also occurs at 10:00 a.m. According to the limits set by IEEE Std. 519 [26], the TDD limit for systems rated 120 V through 69 kV is specified as 12%.

Proposed Optimal Harmonic Power Flow
To compensate harmonic currents produced by EV charging stations, it is proposed to use PV-based DGs within a centralized control approach. The harmonic spectrums of the PV-based DGs were optimally determined to minimize the harmful impacts of EV on the distribution system, thus enhancing the voltage quality and elongating the lifetime of the substation transformer. The objective function was used to minimize the voltage THD of all buses, ensuring that all buses had a voltage THD lower than the standard limit, i.e., below 5%. Thus, the objective function F THD highest v is given by where THD highest v denotes the highest voltage THD among all buses in the distribution system. This objective function was subject to the following equality and inequality constraints.

Fundamental Power Flow Constraints
The real and reactive power balance constraints at the fundamental frequency for each bus i should satisfy (11) and (12).

Harmonic Power Flow Constraints
At all harmonic orders, the nodal equations that are given by (19) and solved using the DHPF should be satisfied. The proposed centralized controller sets the harmonic currents of PV-based DGs to compensate those of EV charging stations. Therefore, the control variables were the ratios between the PV harmonic currents and the fundamental component, i.e., I , where the fundamental current generated by each PV-based DG I (1) PV i was calculated using It is worth noting that at the fundamental frequency, PV-based DGs were modeled as constant power sources, where P PV i and Q PV i represented the DG active and reactive powers, respectively. The proposed method does not change the fundamental currents that form PV-DGs and EV chargers because these currents are dictated by the maximum power point tracking method (MPPTs) or the charging pattern adopted by the interfacing converters. The current source model for PV-DGs and nonlinear loads (such as EV chargers) is typically used for optimal harmonic power flow, as in [25,27,28].

Bus Voltage Limits
The RMS voltage magnitude at every bus i was bounded by where V low and V up are the lower and upper voltage limits, which are equal to 0.95 pu and 1.05 pu, respectively.

Total Harmonic Distortion Limits
The voltage THD value at each bus i was limited by where THD limit V is the maximum permissible voltage THD set by the IEEE-519 standards and is equal to 5% [26].

Individual Harmonic Distortion Limits
The individual voltage harmonic distortion at every bus i was limited by the IEEE-519 standard as follows: where IHD (h),limit V is the maximum allowable voltage harmonic distortion level at harmonic order h. Similarly, the individual current harmonic distortion at each bus i should be limited, i.e., where IHD is the maximum allowable current harmonic distortion at the hth order harmonic.

Current Limit Constraints
The feeder capacity limits should be satisfied as given by where I limit ij is feeder capacity limit and is assumed to be equal to twice the feeder current during the peak load; I ij denotes the current of the feeder between buses i and j, and is given by Due to the complexity of the optimal harmonic power flow, a meta-heuristic optimization approach was employed. A genetic algorithm (GA) can solve optimization problems that standard optimization algorithms cannot address with the objective function being discontinuous, non-differentiable, stochastic, or highly non-linear. In this paper, the objective function, i.e., minimizing the highest voltage THD, and some constraints, were highly nonlinear. Therefore, the optimal harmonic power flow problem was solved using a GA. The constraints were calculated based on the nodal equations in (19) and following the procedure in Figure 6. The equality constraints were used to calculate the objective function in (23); thus, they were always satisfied. To satisfy the inequality constraints, penalty factors were added to the objective function, as follows: where x c denotes a binary variable that is equal to 1.0 only when constraint c is violated, and n c is the total number of inequality constraints.
It is worth mentioning that the proposed compensation method is based on a centralized approach that runs an optimization program, which can be operated by local distribution companies (LDCs). The LDCs, adopting the proposed method, should dispatch the reference values of the DG harmonic currents (i.e., decision variables) every time the optimization program is solved. Typically, optimal harmonic power flow is solved, and the control signals are dispatched every 10 min to accommodate any changes happening in the demand and generation [24].

Performance Evaluation
Level III chargers are compensated in this section since they have the worst impact on the distribution system. The optimal harmonic compensation by PV-based DGs was limited to the 9th order harmonic current. Therefore, the number of decision variables (i.e., control signals) was 12-four variables for each DG connected to bus i as given by where X i is a decision vector for each PV-based DG. The GA algorithm returned the values of the unknown control variables resulting in minimizing the THD for voltage. These values determined the harmonic spectrum of each PV-based DG. The harmonic spectrum associated with each PV, along with the presence of EVs, resulted in the THD voltage profile at bus 16 presented in Figure 9. (1) where is a decision vector for each PV-based DG. The GA algorithm returned the values of the unknown control variables resulting in minimizing the THD for voltage. These values determined the harmonic spectrum of each PV-based DG. The harmonic spectrum associated with each PV, along with the presence of EVs, resulted in the THD voltage profile at bus 16 presented in Figure 9.
The voltage disturbance values were lower after integrating PV-based DGs. The highest value of THD reached 4.5% at 10:00 a.m. This value remained below the 5% allowable limit set by the standards. At this specific time, the proposed algorithm resulted in a reduction in THD by a factor of 2.89 as opposed to the uncompensated scenario (i.e., demonstrated in Figure 7). A similar response was noted for the current THD, as shown in Figure 10, in which, the maximum current disturbance took place at 10:00 a.m. with a value of 11.6%. This value is below the maximum current THD set in the IEEE standards. The current THD decreased to 7.96% at 11:00 a.m. and fell to 1.4% at noon.
Next, the harmonic current through the substation transformer was obtained using (21) at 10:00 a.m, where the highest voltage THD was minimized. The harmonic currents through the main substation transformer could be reduced using the proposed harmonic power flow. The resultant lifetime of the distribution transformer was obtained and is displayed in Figure 11. Integrating PVbased DGs into the proposed harmonic power flow-by controlling the DG harmonic currents-kept the transformer lifetime intact, i.e., constant at 20.55 years, at all loading conditions. On the other hand, the uncompensated EV harmonics resulted in a significant decrease in the transformer's lifetime, which was-for instance-below ten years at 90% loading.   The voltage disturbance values were lower after integrating PV-based DGs. The highest value of THD reached 4.5% at 10:00 a.m. This value remained below the 5% allowable limit set by the standards. At this specific time, the proposed algorithm resulted in a reduction in THD by a factor of 2.89 as opposed to the uncompensated scenario (i.e., demonstrated in Figure 7). A similar response was noted for the current THD, as shown in Figure 10, in which, the maximum current disturbance took place at 10:00 a.m. with a value of 11.6%. This value is below the maximum current THD set in the IEEE standards. The current THD decreased to 7.96% at 11:00 a.m. and fell to 1.4% at noon. where is a decision vector for each PV-based DG. The GA algorithm returned the values of the unknown control variables resulting in minimizing the THD for voltage. These values determined the harmonic spectrum of each PV-based DG. The harmonic spectrum associated with each PV, along with the presence of EVs, resulted in the THD voltage profile at bus 16 presented in Figure 9.
The voltage disturbance values were lower after integrating PV-based DGs. The highest value of THD reached 4.5% at 10:00 a.m. This value remained below the 5% allowable limit set by the standards. At this specific time, the proposed algorithm resulted in a reduction in THD by a factor of 2.89 as opposed to the uncompensated scenario (i.e., demonstrated in Figure 7). A similar response was noted for the current THD, as shown in Figure 10, in which, the maximum current disturbance took place at 10:00 a.m. with a value of 11.6%. This value is below the maximum current THD set in the IEEE standards. The current THD decreased to 7.96% at 11:00 a.m. and fell to 1.4% at noon.
Next, the harmonic current through the substation transformer was obtained using (21) at 10:00 a.m, where the highest voltage THD was minimized. The harmonic currents through the main substation transformer could be reduced using the proposed harmonic power flow. The resultant lifetime of the distribution transformer was obtained and is displayed in Figure 11. Integrating PVbased DGs into the proposed harmonic power flow-by controlling the DG harmonic currents-kept the transformer lifetime intact, i.e., constant at 20.55 years, at all loading conditions. On the other hand, the uncompensated EV harmonics resulted in a significant decrease in the transformer's lifetime, which was-for instance-below ten years at 90% loading.   Next, the harmonic current through the substation transformer was obtained using (21) at 10:00 a.m, where the highest voltage THD was minimized. The harmonic currents through the main substation transformer could be reduced using the proposed harmonic power flow. The resultant lifetime of the distribution transformer was obtained and is displayed in Figure 11. Integrating PV-based DGs into the proposed harmonic power flow-by controlling the DG harmonic currents-kept the transformer lifetime intact, i.e., constant at 20.55 years, at all loading conditions. On the other hand, the uncompensated EV harmonics resulted in a significant decrease in the transformer's lifetime, which was-for instance-below ten years at 90% loading.
Energies 2020, 13, x FOR PEER REVIEW 14 of 16 Figure 11. Transformer real-life before and after PV compensation.

Conclusions
Impacts of EV battery charging on distribution systems are assessed. The first phase of the assessment is performed at the EV interfacing transformer. A study is conducted involving the current harmonic distribution of various charging levels to understand the impacts associated with the users' charger choice. Weighted arithmetic mean is applied to consider the effect of the SOC on the harmonic currents of EV chargers. The assessment is then extended to the system level, where case studies are performed on the IEEE 33-bus test system. A DHPF technique is applied to measure the system distortion resulting from EV charging. Optimal harmonic power flow is proposed to determine the optimal dispatch of the harmonic currents from PV-based DGs to mitigate the adverse impacts of EV harmonic currents. As a result, the highest voltage THD does not exceed 5%, which complies with the standard limit. The reduced harmonic current flow through the distribution system could also reduce the harmonic current distortion through the main substation transformer, and thus, reducing its losses and elongating its lifetime. Figure 11. Transformer real-life before and after PV compensation.

Conclusions
Impacts of EV battery charging on distribution systems are assessed. The first phase of the assessment is performed at the EV interfacing transformer. A study is conducted involving the current harmonic distribution of various charging levels to understand the impacts associated with the users' charger choice. Weighted arithmetic mean is applied to consider the effect of the SOC on the harmonic currents of EV chargers. The assessment is then extended to the system level, where case studies are performed on the IEEE 33-bus test system. A DHPF technique is applied to measure the system distortion resulting from EV charging. Optimal harmonic power flow is proposed to determine the optimal dispatch of the harmonic currents from PV-based DGs to mitigate the adverse impacts of EV harmonic currents. As a result, the highest voltage THD does not exceed 5%, which complies with the standard limit. The reduced harmonic current flow through the distribution system could also reduce the harmonic current distortion through the main substation transformer, and thus, reducing its losses and elongating its lifetime.