EV charging MATLAB code Highlights
- the MATLAB code for EV load demand rescheduling uses the GWO optimization
- the cost of charging and power losses on the grid are minimized
- the SoC of the EV battery is the constraint which need to be managed during the optimization
In this work, we presented a MATLAB code for EV load demand rescheduling to minimize the charging cost, grid losses and load variance.Â Electric vehicle (EV) is the most reliable and eco-friendly product of present days transportation system. EV has not polluted the environment because it does not consume any fossil oil. The main components of EV are an electric motor, battery, power electronic devices. In EV the battery is used as the storage bank of electricity. The electricity is provided for the EV charging by power grid. The grid is affected by the power losses during the charging of electric vehicles. The number of electric vehicles increases the power demand as well as grid losses. So a smart charging method or optimal scheduling of EV is necessary for the loss and cost minimization.
In this MATLAB code, we proposed Grey Wolf Optimization (GWO)  algorithm for the optimal EV load demand rescheduling on the IEEE 33 bus radial distribution system. The charging cost, power loss on grid and load variance minimization is the key objective of our work.
You can also check out our other work on Network reconfiguration to minimize the power losses in the IEEE 33 radial distribution system.
We have analyzed the proposed method for four different cases: low-level penetration of EV, high-level EV penetration, summer, and winter load of EV charging. The theoretical approach related to the GWO can be studied in the research paper  or from the Free-thesis.com
The GWO algorithm based project Hybrid Particle Swarm and Grey Wolf Optimization testing for benchmark function Â is available at Free-thesis.com
Advantages of EV
- Less dependency on the import of foreign
- Minimum noise pollution compared to the ICE vehicle.
- More economical and less maintenance
- No release of air pollution and deliver improved
EV charging station
EV charging depends on the battery state of charge (SoC) during the initial and desired stage, charging time, and load on the grid line. The connection of EV on different buses of IEEE 33 radial bus system is shown in figure 1.
Figure 1 EV insert into the IEEE 33 radial bus system 
The entire work is designed in the MATLAB 2018a software. We take the IEEE33 bus radial distribution system model and inserted 10 EV charging stations on selected buses. The bus numbers 3, 6, 10, 14, 19, 22, 23, 25, 29, and 31 are selected for the installation of the charging station of electric vehicles. The plugin EV load connected to the charging station is divided into two categories low and high penetration level. The number of plug-in EV is higher in high penetration level and lower in low penetration level.
Minimum cost of charging
The charging cost of EV should be minimum so that the extra burden of money on customer pocket is reduced. Equation 1 shows the objective function of minimum cost of charging
Where n represents the total number of a plug-in vehicle, the total number of time steps are shown byÂ m, Ck is the TOU price at time stamp k, pi, k reflects the ith plug-in EV charging power at each time, and time stamp is represented by delta t.
Load variance Minimization
While EV connected to the grid the power loss occurs, so the load variance is must required to reduce them. The equation of load variance is formulated as:
Pk is the grid forecasted load at time stamp k and t is the time stamp
Active power loss minimization
The active power loss of the distribution grid system is to be minimized at the time of EV load connected to the buses. The objective function is designed by estimating optimal scheduling coordination for the charging of EV load . The equation is written as
F3= active power loss, Ik =branch current, Rk =branch impedance, ntl=total number of lines
A single objective function is formed by the combination of three multi-objective function
The objectives function of minimum cost (F1), minimum load variance (F2) and minimum active power loss (F3) of power grid are combined to form a multi-objective function.
The constraints of the objective function are considered as
GWO optimized EV rescheduling
The power transferred from the grid to the EV in each timestamp is the key factor of smart charging control. The smart charging of EV operation includes various unsure terms like available grid power, arrival and departure time of EV at charging station, and initial SoC of battery. The hourly charging time is evaluated with the probability density function (PDF) of the arrival and departure times of EV.
GWO algorithm is used to optimize the objective function, as designed in equation 4. GWO is an iterative algorithm inspired by the hunting nature of wolves. The searching space dimension in GWO is the number of tuning variables. We have considered 156 electric vehicles for a timestamp of 24 hrs. We need to optimize the power transmitted to these 156 electric vehicles for 24 hrs, which makes the number of tuning variables equal to 24*156=3744 in a low penetration case. During high penetration, the number of vehicles reaches 312, and tuning variables are calculated as per them. The wolvesâ€™ position is changed after each iteration and the process is repeated until the optimal value of equation 1 is computed. The flow chart of the complete process is shown in figure 2.
Figure 2 flow chart of proposed firstname.lastname@example.org
The overall work is performed on the MATLAB software. All scripts and plots are generated with the help of MATLAB coding. We used the load data per hour, TOU price and flat rate from the historical Dominian Virgina Power system. The data is available on Verigina power website.Â It contains the load information of many states of America for each appliance for every hour.Â Three states dataset are used collectively in our case which are
The GWO controlled EV charging rescheduling minimizes the power loss of the grid, load variation and cost of charging power. Figure 3 shows the comparison among the three optimized objective functions which are formulated above.
Figure 3 comparison of charging cost, load variance and active power loss during uncontrolled and controlled case for low penetration email@example.com
Table 1 Cost, load variance and active power loss by GWO tuned power supplied to EV charging for summer load data
|Comparison terms||Uncontrolled Load||GWO controlled|
|Active power loss (KW)||263.5||217.4|
Figure 4 Active power loss comparisons @free-thesis.com
The power loss comparison among the GWO controlled, basic load and uncontrolled EV load is shown in figure 4. The minimum active power loss belongs to the GWO controlled category.
We tested the proposed EV rescheduling algorithm on IEEE 33 radial bus system model with inserting the EV charging station on 10 different buses. There are two cases tested as per the climate condition summer and winter. Further, the low-level penetration and high-level penetration EV cases are analyzed for both summer and winter connected load. The overall cost of electricity and active power loss of the grid are minimized using the GWO controller.
- Ãlvarez, Jorge GarcÃa, Miguel Ãngel GonzÃ¡lez, Camino RodrÃguez Vela, and Ramiro Varela. “Electric vehicle charging scheduling by an enhanced artificial bee colony algorithm.”Â Energies11, no. 10 (2018): 2752.
- Faris, Hossam & Aljarah, Ibrahim & Al-Betar, Mohammed & Mirjalili, Seyedali, â€œGrey wolf optimizer: a review of recent variants and applicationsâ€ Neural Computing and Applications, 2017.
- Zalnidzam, Wan Iqmal Faezy Wan, Hasmaini Mohamad, Nur Ashida Salim, Hazlie Mokhlis, and Zuhaila Mat Yasin. “Optimal Charging Schedule Coordination of Electric Vehicles in Smart Grid.”Â Indonesian Journal of Electrical Engineering and Computer Science11, no. 1 (2018): 82-89.
- Balram, Pavan, Tuan Le Anh, and Lina Bertling Tjernberg. “Effects of plug-in electric vehicle charge scheduling on the day-ahead electricity market price.” InÂ 2012 3rd IEEE PES Innovative Smart Grid Technologies Europe (ISGT Europe), pp. 1-8. IEEE, 2012.
Other Recommended Similar works: