ELM-ANFIS Based Controller for Plug-In Electric Vehicle to Grid Integration

An Adaptive Neuro Fuzzy Inference System (ANFIS) based Extreme Learning Machine (ELM) theory is utilised in this research work. In particular, the proposed algorithm is applied for designing a controller for electric vehicle to grid (V2G) integration in smart grid scenario. Initially, learning speed and accuracy of this proposed approach are continuously monitored and then, the performance of ELM-ANFIS (e-ANFIS) based controller is examined for its transient response. The proposed new learning technique overcomes the slow learning speed of the conventional ANFIS algorithm without sacrificing the generalization capability. Hence, a control practice for their charge and discharge patterns can be easily calculated even with the presence of large numbers of Plug-in Hybrid Electric Vehicles (PHEV). To examine the computational performance and transient response of the e-ANFIS based controller, it is evaluated with the usual ANFIS supported controller. The IEEE 33 bus radial distribution system based approach is implemented to ensure the sturdiness of this prescribed approach.


INTRODUCTION
Depletion of fossil fuel resource, climate change, and air pollution etc. are all the key public issues in recent years. Being the largest consumers of fossil fuels, the power generation and transportation sectors contribute to these kinds of worries in higher levels. But, the invention of Battery Electric Vehicle (BEV) and Plug-in Hybrid Electric Vehicles (PHEV) seems to be one of the solutions for these problems [1]. Nevertheless, the potential introduction of electric vehicles is seen by electricity utilities as an added load and EVs operating in the Grid-to-Vehicle (G2V) mode of operation may worsen the issues particularly in peak hour demand. At the same time, the EVs operating in Vehicle-to-Grid (V2G) mode are certainly supplying the generation as backup power in order to meet out the peak demand [2].
The V2G is a relatively new concept, in which the electric energy stored in the battery of electric vehicle can also be supplied back to the power grid. The V2G structure has bidirectional energy flow. That is, energy flows from electrical vehicles to grid and vice versa. The communication link is created between utility grid operators and plugged-in vehicles for the use of data transfer. Normally, the utility can purchase the energy from the EV, whenever there is a peak demand and produced energy from utility can be sold, when the demand is less, especially off peak hours. Here, an aggregator [3] is used and it will coordinate the transactions between the utility and the electric vehicles. Depending on the current scenario of grid conditions, the aggregator has to decide the status of charging or discharging of EVs under a single huddle [4].
If charging or discharging is not coordinated, it will increase the peak hour load and it causes some local problems in distribution grid, such as additional power losses and shocking voltage deviations. As a result of these, the following problems may arise and they are listed as overloads in cables and distribution transformers, elevated power losses and no guarantee for grid reliability and thus cause increase in overall system cost [5]. An experiment has been conducted in the 1,200 node test system in Western Australia [6] to examine the effects of random uncoordinated charging of EV on transformers. A significant load surging and voltage deviations are observed from the test results even with low EV penetrations. A 14 % of increase of load from 17 % on transformers has significantly proven a rise in currents of the transformer with the penetrations of EV [5].
Similarly, another work done in Belgium shows that voltage deviations are being 10 % if the penetration of EV is during peak hours in the evening, due to uncoordinated charging of EVs [7]. An increase in peak load is 7 % for penetration of EVs of 30 %, and at the same time household peak load is reported as 54 % in the test grid in Netherlands [8]. Due to penetration of EVs the peak demand gets increased in a notable manner and it is reported as 10 % & 17.9 % and 20 % & 35.8 %, respectively in the distribution system of UK [9]. The ill effects of uncontrolled charging and discharging are presented and discussed [10,11]. But, the coordinated charging and discharging of EVs is helpful in finding the optimal charging profile and the power demand. It also reduces the electricity costs occurring daily, deviations in voltages, line currents and transformer surgeload [5,7] and also it can obtain the distribution node voltage profile as a flat one [12]. It is identified that the optimal charging and discharging models perceptibly reduce the charging cost by 51 % and 40 % for isolated EV and multiple coordinated vehicles, respectively.
It is recognised that some kind of control aspects on electric grid and electric vehicles has been only analysed in the past. An optimal aggregator is developed and the effective utilization of EVs for the control of frequency has been investigated [13]. An analogous effort is presented in [14], in which the integration of V2G in a Danish farm has also been additionally included. Conversely, more attention is focused on the technique of energy storage rather than the theory of V2G and also, the model is indented only for a transmission network. The consequences of connecting EVs on the distribution grid using load flow techniques and also the performances of the system have been examined [13,15]. But, all these efforts have not employed any control technique for the charging or discharging of EVs in E2G mode. Even if the efforts are successfully demonstrated for the analysis of vehicle charging/discharging behaviours in certain extent, the real time implementation of single EV and its coordination with other EVs need some further attention [16][17][18]. Therefore, a novel method is proposed in this work for the effective management of load especially for the coordination of plug-in electric vehicles, even if they are connected simultaneously.
An innovative e-ANFIS based controller has been developed for the control of energy flow between EVs and grid and also for the compensation of voltage and peak shaving [19]. Based on the concept of ELM [20,21], the new e-ANFIS learning algorithm is developed. The ELM concept is used in variety of applications such as signal classifications [22][23][24], electricity forecasting [25] etc. The proposed ELM based new learning technique overcomes the slow learning speed of the conventional learning techniques [26] like neural networks and support vector machines without sacrificing the generalization capability. Thus, a valuable control technique may be designed without any difficulty for the control of charge and discharge rates, even with an increased penetration of large number of EVs.
In this work two types of controllers are modelled and they are named as controller for charging station and controller for V2G. The power flow between the concerned nodes and the charging station is controlled by V2G controller and the individual participation of the EVs is monitored and regulated by charging station controller.
The structure of this manuscript is presented as follows. Section 2 describes the modelling of the distribution system. Section 3 presents the formulation of problem of this prescribed approach. The ANFIS and e-ANFIS used for the V2G control technology are addressed in Sections 4 and 5, respectively. In Section 6, computer simulation is carried out to establish the usefulness of this proposed method and the results are explored and discussed elaborately. The outcome of this manuscript is presented in Section 7 as a conclusion.

SYSTEM MODEL
The integral parts and the flow of power of this proposed V2G system are presented in Fig. 1. There are two controllers, namely Charging Station Controller (CSC) and Vehicle to Grid (V2G) controller. The V2G controller is connected with a specific node of the distribution system. In this work, IEEE 33 bus radial distribution system is considered for the entire analysis. The EVs, when connected with V2G mode can get charged or feed energy into the grid. Since both the power flow and communications are bidirectional, the status of the battery and node voltage level can easily be known. As shown in Fig. 2, the power flow is bidirectional. That means during peak hours the PHEVs in V2G mode can deliver power to the electric grid and the batteries of the vehicles can get charged in G2V mode during off peak hours or as per the requirement of owner.

IEEE 33 Bus System
To implement the vehicle to grid integration concept, IEEE 33 bus system is modelled in this work. This is an IEEE recommended balanced radial distribution system and the specifications of it are as follows. It includes 32 sectional branches, nominal voltage as 12.66 kV, total real and reactive powers are 3.72 MW and 2.3 MVAR, respectively. The corresponding real and reactive power losses are 5.67 % and 6.22 %. The one line diagram of the same is shown in Fig. 2 and the voltage profile of all the buses is given in Tab. 1. From Tab. 1, it is clearly understood that the last three nodes (nodes 16,17,18) of the radial sub feeder are more vulnerable than the other nodes in voltage stability stand point. Hence, it is identified that the last node of the radial sub feeder (node 18) needs compensation and the same is provided in this prescribed approach.

Charging Station Controller
Here, two controllers are used, namely Charging Station Controller (CSC) and V2G controller as shown in Fig. 3.

Figure 3 CSC and V2G controller
The charging and discharging statuses of individually participated EVs are determined by the CSC and the V2G controller is at distribution node level. The present node voltage of the grid and the individual vehicle battery's State of Charge (SOC) are input parameters to the CSC. The SOC is described as the percentage of charge remaining in the battery of the vehicles, when it comes to the grid. The influencing parameters of SOC are the kilometres driven and the All-Electric Range (AER) of EV [4]. The SOC is normally expressed in terms of percentage of total available charge. For example, the SOC of vehicle is evaluated by using Eq. (1), when it is fully charged.

100
; , 0 ; where: y − AER of the EV, x − the total distance driven by the vehicle The CSC delivers the total energy available from charging station for the support of grid based on the SOC of each and every vehicle and the present condition of the grid. In this case, the energy flows from EV to grid for positive energy output and energy flows from grid to EV in other case. This positive or negative sign of energy output depends on whether the node voltage requirement is to be increased or decreased.

Vehicle to Grid (V2G) Controller
V2G comprises a system in which the hybrid plug-in electric vehicle is interfaced with electric power grid for delivering/receiving a grid support. As per Fig. 1, either power flows from vehicle to grid or grid to vehicle according to the state of power in grid and battery of the vehicle. That means the power flows from vehicle to grid in V2G mode during peak hours and vice versa or as per the requirement of the owner. Here, two controllers are needed to assess the battery condition of the vehicle as well as the voltage levels of the distribution grid in the charging station and grid levels, respectively. Therefore, the two controllers, namely CSC and V2G controller are proposed as explained in section 2. The V2G controller fixes the amount of power flow to and from the node in which the charging station has been placed but depends upon the energy output information from the CSC. As shown in Fig. 3, the output of the V2G controller is connected to the node for controlling the power flow between EVs and the grid. This node is referred to as the ultimate node of interest for the support of voltage and the management of peak load. It is understood that the output power notation is positive when the EV discharges power to the grid and negative, when EV charges energy from the grid.

EV's Battery Model
The objective of this work is to establish coordination of charging and discharging between electric vehicles and electric grid. Hence, loss of the battery and cyclic efficiency are not considered due to charging and discharging. The SOC level of the battery is assumed as constant when it is ready to discharge into the grid or vice versa. That is, the voltage deviation with respect to SOC of the batteries is not considered.

PROBLEM DESCRIPTION
Load of the distribution system varies according to time. There are different loading patterns like peak load, off peak load and base load. Base load is characterized by industrial load which is 'on' most of the day. Hence, consumption is constant but domestic loads vary according to time and as a result load profile also varies. The voltage profile of the buses gets affected by these kinds of variations in the load. The consequences of EVs on voltage profile are assessed by comparing the power grid characteristics with or without extra load. For the distribution system as shown in Fig. 2, a simple feeder line power flows are calculated by using Eqs. (2)-(4). 2 2 where Q i and P i are reactive power and active power flow in the line from bus i. Q Li and P Li are the reactive and real power loads of the i th bus. The reactance and resistance of the line, which is connected between i and i+1 are expressed as X i , X i+1 and R i , R i, i+1 ,respectively. These load flows are performed for IEEE 33 bus radial distribution system for the 18th node, where the real power is 90MW, the reactive power is 40 MVAr, voltage is 0.9038 p.u. and the voltage drop is about 0.0962 p.u. Hence, 18 th node has the highest voltage drop when compared to all other branches. Electric vehicle is integrated with the grid and the change in voltage is formulated as given in (5) [5].
It is identified from the above equations that bus voltage can be improved, when EV's battery is integrated with the grid. In this work, voltage profile at the 18 th node is analyzed, since its voltage level is obviously worse than other nodes.

Assumptions
The ANFIS based V2G realization is designed at a system level. Due to the presence of large dynamics in the distribution system, the power converters, which are connected for charging and discharging the EVs, are not modelled. EV battery efficiency, charging system, design of communication infrastructure and converters, economics and tariff rates have not been considered, since this work is only focussed on the design of e-ANFIS algorithm based controller for the implementation of grid support by EVs.

ANFIS FOR V2G INTEGRATION
Fuzzy logic and neural network based controllers are well suitable for realizing V2G /G2V operations [16]. The advantages of ANFIS architecture and its approximating capabilities with great accuracy have been proved already by Jang [26] and others. ANFIS has the features of both ANN and FLC. It has the self-learning capability of ANN and the features of linguistic expression function of fuzzy inference system. It is considered as an effective method for tuning the membership functions to minimize the error in the output. In the present work, ANFIS architecture and Sugeno fuzzy model are used.
The inputs are namely m and n and the output is f as shown in Fig. 4. For a Sugeno fuzzy model (first order), a typical rule set with two fuzzy if/then rules is given below.
The parameters in this layer (p i , q i , r i ) are called consequent parameters.

Layer 5.
It is a single node layer which determines the final output as shown in (12). 5 i Forward and backward pass learning algorithm is used in conventional ANFIS. The ANFIS parameters are trained using the forward pass and backward pass alternatively which uses least square estimation (LSE) algorithm and gradient descent algorithm, respectively. The gradient method has some disadvantages and is explained in the next section. Hence, new computation algorithm called e-ANFIS is proposed in this paper for the effective implementation of V2G integration.

e-ANFIS
An extreme learning machine-ANFIS (e-ANFIS) algorithm is proposed in this work by combining ELM theory and ANFIS. The ELM [19][20][21] is a new concept learning algorithm, which works on single hidden layer feed forward neural network (SLFN) that randomly chooses hidden nodes and the output weights of SLFN is determined analytically. The outputs are learned and updated in a single step and it really makes it as a linear network model. Hence, this model is able to produce good generalization performance and also its learning speed is extremely higher than the networks trained using back propagation (BP) etc. Similarly, ANFIS is another wellestablished hybrid learning network. Conventional ANFIS introduced in [26] uses forward and backward pass, and it combines LSE and BP. In gradient method, the calculation of gradient is possible with differentiable membership functions only. Also, it is an over fitting in nature and an iterative method. Therefore, it is time consuming.
The ELM suffers from inherent randomness of the results and ANFIS suffers from strong computational complexity restrictions, respectively. Therefore, the combination of ELM-ANFIS algorithm is used in this paper to minimize the learning time of ANFIS architecture. This combination is used to curtail the computational complexity by eradicating the HLA. Also, it avoids the randomness of ELM by incorporating explicit knowledge representation of fuzzy logic. Therefore, the proposed algorithm turns out to be a simple derivativeless algorithm compared to HLA. Instead of tuning, the hidden biases are randomly produced in this algorithm. Therefore, output weight determination becomes very simple as in the case of conventional methods. The proposed algorithm is explained in section 5.1.

Algorithm
Let us assume that training data scattered over the possible input range are presented for a particular problem as: [I1 I 2 I 3 ….. I n ; f], where I i , i = 1, 2, …, n are inputs and f is the corresponding output.
Step 1: Determine the range of every input to get the universe of discourse for input membership function (MF) as, range i = max{I i } − min{I i }, where i = 1, 2, …, n is number of inputs and they decide the shape of membership function. And then, find the number of MF. Bell shaped membership function is used here. The bell shape membership function is mathematically representated as given in (13). 2 1 , where, µ ij symbolize grade of membership of the i th input and the j th MF. x j , y j , and z j is position and shape fixing parameters. The z j depicts the center of the j th MF, x j represents half width of MF, and y j /2x j depicts slope with membership grade of µ ij = 0.5.
Step 2: The values of premise parameters (x j , y j , z j ) are randomely generated including certain constraints within the range. This range is decided by size of universe of discourse and number of MFs. Assume that there are m uniformly distributed MFs with parameters (x j * , y j * , z j * ) in universe of discourse. The random parameter selection formulae are as follows.
Step 3: Select x j . The parameter x j selects the width of MF. The default value of parameter in uniformly distributed MF is expressed as in (14).
The range of selection of random value x j is given in (15) as, Step 4: Select y j . The parameter y j with the help of x j gives slop as y j /2x j . The default value of y j in uniformly distributed MF is 2. In this algorithm, the range is chosen between 1.9 and 2.1 since slight deviation itself gives notable changes in the slope.
Step 5: Selection of z j . The range of random value for center (z j ) of MF is chosen in such a way that the center of consecutive MFs should not cross each others. The range of z j selection is as given in (16).
where, z j * is the center of uniformly distributed MF and d cc represents distance between two consecutive centers of uniformly distributed MF.
Step 6: Determine final output f. It becomes a simple linear combination of consequent parameters as given in (17). 1 1 , where k represents number of rule, m is number of membership function, n is number of inputs, m n represents the maximum number of rules, i represents number of input, I i is a value of the i th input, and R ki and Q k are consequent parameters corresponding to the k th rule and i th input.
Assume that there is p number of training data pairs and then, linear matrix of p equations is represented as given in (18). 1 ( 1)  (18) where F is final output matrix of β weighted input parameter matrix and U is unknown consequent parameter matrix. This can be solved using LSE method (forward pass of hybrid learning algorithm).
Step 7: Run the algorithm for several times. Then determine root mean square error (RMSE) in each iteration.
Step 8: Generate the FIS model. The flow chart is given in Fig. 5.

e-ANFIS based CSC
Here, two controllers are used namely CSC and V2G controller. Participation of EVs' charging and discharging pattern is decided by the CSC and the V2G controller as discussed in Section 2. In this work, Sugeno type FIS is generated. First phase is to collect and load the data for each input and output pairs. It is considered that the distribution system node voltage and state of charge (SOC) as inputs and energy as output for the CSC. For V2G controller, it is considered that the node voltage and energy represent SOC of the battery as inputs and power as the output.
As in the case of conventional ANFIS, training and testing of network are done here. Small portion of the extracted data is used for testing (10 %) and the remaining portion is used for training (90 %). The training and testing data should match in a linear order so that the formed network will be correct. Then, these data are trained for the specified epochs (iterations). The proposed algorithm is run for several times and root mean square error in each epoch is determined. Finally, sugeno type FIS model is generated. The e-ANFIS algorithm is implemented in MATLAB and tested for accuracy and computational speed. Similar to CSC, FIS structure is obtained for V2G controller as well. The membership functions are formed by the proposed ANFIS itself and the output is found to be accurate. Technical Gazette 25, Suppl. 1(2018), 15-22 The vehicle to grid interfacing system is modelled using MATLAB. It consists of a battery, power converter and other integrating devices. Converter is connected to the distribution network and electric vehicle's motor. The node voltage from distribution system and SOC of the electric vehicle's battery are given to the CSC and it decides the output energy. The output of CSC and the grid voltage are fed as the inputs to the V2G controller and it decides the available or required power from the particular station. The transmission voltage is reduced to 11 kV from 120 kV and in the distribution side, the voltage is stepped down to 440 V. From this 440 V three phase line, a single phase 440 V is taken for the coordination of electric vehicle.

Simulation Results
First, the performance of e-ANFIS algorithm is checked in off-line on the basis of time required to learn the parameters from training data, training error and testing error. In the case of proposed algorithm, the time required for finding gradient and uploading premise parameters is iteratively reduced and results in significant reduction in overall learning time. This occurs due to the elimination of backward pass of hybrid learning algorithm in this proposed method. The learning speed is further improved, due to the perceptive assumption of random premise parameters in the form of membership functions which are spread throughout the universe of discourse of input variable and local mapping ability of FIS in the form of rule base. Also, by eliminating the differentiability constraint on membership function, the e-ANFIS algorithm improves the flexibility of ANFIS architecture. For modelling complex nonlinear system such as V2G integration, the reduction occurs in step of learning algorithm. Thus, it allows the ANFIS architecture to raise the amount of inputs and membership functions within the required time constraints in order to improve the accuracy. It is proved that the computation with e-ANFIS algorithm is comparatively simpler and also faster than the conventional HLA. The performance results are given in Tab. 2. By taking the average of nearly 50 trails, the learning time, training and testing error are presented in Tab. 2 for different membership function (MF) values. It is well known that accuracy increases with increase in membership function whereas time to learn parameter increases with increase in membership function with conventional algorithm. But in the case of e-ANFIS, this negative feature is completely eliminated without disturbing the generalization of conventional method and accuracy.
Second, simulation has been performed to check the coordination between PHEV and grid using e-ANFIS based controller. The performance of this proposed controller is judged with the conventional ANFIS based controller and the sturdiness of this proposed controller is proved. This controller is designed in such a way that the EV injects power to the grid in peak hours and accepts the power in off peak hours, when SOC of the battery is less than 50 %. For grid charging, it is fixed that battery SOC level should be ≥ 50 %. The simulation is performed for 0.05 seconds in order to check the transient performance of the controllers. The power factor is considered to be constant during the entire study period, since reactive power compensation is not considered in this work. The grid voltage at the 18 th node in the distribution system is Find xj * , yj * , zj * using random function Calculate membership grade using (13) Calculate final output, f using (17) Initialize inputs Ii and output f measured before discharging the EV's energy into the grid as revealed in Fig. 6. The node voltage is observed and it is getting improved from 0.90 p.u. to 0.98 p.u. after discharging the EV's energy into the grid as shown in Fig. 7. Next, power factors of 0.97 and 0.99 are considered and real power injection into the grid is analysed. The node voltage is improved to 0.94 and 0.96 when power factor is 0.97 and 0.99, respectively as shown in Fig. 8 with e-ANFIS controller. The results clearly indicate that high power factor increases the amount of real power flow. Similarly, charging pattern of EVs is analysed with e-ANFIS controller. Here, the controller restricts the real power flow according to the distribution node voltage. The node voltage before and after charging of electric vehicle is depicted in Fig. 9. It clearly indicates that the distribution node voltage is getting reduced to 0.92 p.u. from 0.96 p.u. after charging the vehicles.

CONCLUSION
A coordinated charging and discharging between electric vehicle and grid is studied in this work. e-ANFIS based controller is presented in this work to overcome all the drawbacks of conventional controllers in V2G integration. The controller is found effective in controlling the flow of energy between the electric vehicles and the grid and thus improves the overall system stability. First, computational performance in terms of accuracy and time efficiency of e-ANFIS algorithm is checked with the conventional ANFIS algorithm. Then, the transient response of the proposed e-ANFIS based controller is evaluated against the exsisting ANFIS based controller. Even though both the controllers can improve the grid stability by flattening the load profile, the transient response of e-ANFIS based controller is superior to conventional ANFIS controller. It is also found that the learning speed of proposed e-ANFIS algorithm is greatly improved compared to conventional ANFIS algorithm without affecting accuracy and hence, it is well suitable for modeling any nonlinear system.