Fuzzy Logic Weight Based Charging Scheme for Optimal Distribution of Charging Power among Electric Vehicles in a Parking Lot

Electric vehicles (EVs) parking lots are representing significant charging loads for relatively a long period of time. Therefore, the aggregated charging load of EVs may coincide with the peak demand of the distribution power system and can greatly stress the power grid. The stress on the power grid can be characterized by the additional electricity demand and the introduction of a new peak load that may overwhelm both the substations and transmission systems. In order to avoid the stress on the power grid, the parking lot operators are required to limit the penetration level of EVs and optimally distribute the available power among them. This affects the EV owner’s quality of experience (QoE) and thereby reducing the quality of performance (QoP) for the parking lot operators. The QoE is represents the satisfaction level of EV owners; whereas, the QoP is a measurement representing the ratio of EVs with QoE to the total number of EVs. This study proposes a fuzzy logic weight-based charging scheme (FLWCS) to optimally distribute the charging power among the most appropriate EVs in such a way that maximizes the QoP for the parking lot operators under the operational constraints of the power grid. The developed fuzzy inference mechanism resolves the uncertainties and correlates the independent inputs such as state-of-charge, the remaining parking duration and the available power into weighted values for the EVs in each time slot. Once the weight values for all EVs are known, their charging operations are controlled such that the operational constraints of the power grid are respected in each time slot. The proposed FLWCS is applied to a parking lot with different capacities. The simulation results reveal an improved QoP comparing to the conventional first-come-first-served (FCFS) based scheme.


Introduction
The growing concerns of carbon dioxide emissions, the effect of global warming and the reliance on fossil fuel motivated the use of electric vehicles (EVs) in the transportation sector. As a result, the transportation sector is rapidly moving towards the use of EVs including both the plug-in hybrid electric vehicles (PHEVs) and battery electric vehicles (BEVs). A PHEV has the option to use energy either from the electric battery or from the on-board engine-generator and has the flexibility to be recharged from the external power socket as well as from an on-board engine-generator [1]. A BEV uses an electric battery to run, which can be recharged only from external electrical sources [2]. The charging of both PHEVs and BEVs is solely dependent on the power grid; therefore, a considerable energy demand of vehicles will shift from the fossil fuel to the electric power grid [3].
The advancement in the Internet of things (IoT) technology is playing an important role in the intelligent transport systems (ITS) including smart mobility, vehicle-to-vehicle (V2V) communication, vehicle-to-infrastructure (V2I) communication and autonomous vehicles. Smart mobility is a modern, efficient and sustainable system that offers a revolution in all modes of transportation with respect to vehicles, infrastructures and people. The V2V communication enables nearby vehicles to exchange information together in order to improve driver safety and avoid accidents. The V2I communication enables moving vehicles to exchange valuable information with roadside units (RSU) in order to improve road efficiency and optimize travel time. In autonomous vehicles, the automated driving system relies completely on the vehicle's onboard computer, hardware and software in order to monitor both the environment condition as well as the road status without any human intervention [4][5][6]. As a result, the EVs including autonomous and connected EVs are rapidly growing in the transportation market and could potentially influence the electricity distribution infrastructure [7][8][9]. This is because EVs are moving across the city and are representing a spatial and temporal based varying charging load. The future public parking lots will represent a huge load for relatively a long period of time that may coincide with the residential peak load and will overload the power grid [10]. A relation between the vehicles on the street and the residential load profile has been identified in [11], which demonstrated an overlap between vehicles on the street and the residential peak load from 2:00 PM to 6:00 PM. During such a time period, a high penetration level of charging EVs can stress the power grid [12]. The stress on the power grid can be characterized as an additional electricity demand that may introduces a new peak load and will overwhelms the substations in the low-voltage distribution network. To avoid the stress on the power grid, the parking lot operators are required to limit the penetration of charging EVs and distribute the power within a limited number of EVs. As a result, the requirements of the power grid can be satisfied and several cost factors (i.e., the upgrade of the low-voltage distribution transformer, the upgrade of the transmission infrastructure, generation of more power for mitigating the new peak load) can be saved. However, on the other side, this can have a significant effect on the desired quality of experience (QoE) level for the EV owners during their parking duration.
The QoE defines the EV owner's satisfaction level and is a function of the battery capacity, current and required state-of-charge (SoC) of an EV as illustrated in Figure 1. The figure demonstrates the different status of an EV battery highlighted with different colors. The battery SoC is 30% (green highlighted), the QoE is 40% (white highlighted) and the lower and upper limits are 20% and 80%, respectively (red highlighted) for maintaining the efficiency of the battery. The satisfaction of QoE is a base to measure the quality-of-performance (QoP) for the parking lot operators. The QoP can be defined as the ratio of EVs with satisfied QoE to the total number of requesting EVs during the operational hours of the parking lot. Considering 12 h as the parking operational hours, a higher value of QoP corresponds to better performance and vice versa. Therefore, at any time instant, the selection of the most appropriate EVs for charging among all the EVs candidates such that maximizing the QoP while respecting all the constraints from the power grid is a complex and challenging task for the parking lot operators. The complexity of this problem is due to the dependency of QoE satisfaction level on multiple and independent factors, including the battery capacity, the required SoC, the remaining parking duration, the current parking occupancy, the charging power of charging stations (CSs), the current baseload on the low-voltage substation, and the amount of available power from the power grid. These are spatial and temporal based varying parameters with a high degree of uncertainty which results in a more complex system. Considering the required SoC of an EV battery as an example, the drivers usually determine the required SoC in terms of the battery level such as low battery level (i.e., high the required SoC), medium battery level (i.e., medium the required SoC) and high battery level (i.e., low the required SoC). The complexity and nonlinearity of temporal and spatial-based varying real-time systems can be resolved into a simple weighted sum of linear subsystems through the fuzzy logic inference mechanism [13,14]. This work aims to develop a charging strategy for EVs in a parking lot that maximizes the QoE and the QoP under the bounded constraints of the power grid, using a fuzzy logic inference mechanism. Moreover, the study aims to answer the research questions which include: what are the main entities involved in the charging system? What are the requirements of these entities? How to control the charging EVs such that it minimizes the PL load under the permissible limit of the power grid while maximizing the EV owner's satisfaction? The contributions of this research work are as follows.


The requirements of EV owners and the power grid are identified, and a charging scheme based on a fuzzy inference mechanism for EVs in the parking lot is developed with the aim to maximize the QoP under the bounded constraints of the power grid;  The problem is formulated with an objective function and solved through the fuzzy logic inference mechanism. Among the different parameters, three of the most relevant parameters (i.e., the required SoC, remaining parking duration and available power) that influence the QoP are selected to model the fuzzy logic inference mechanism;  The developed fuzzy inference mechanism correlates the required SoC, remaining parking duration and available power in real time and compute weight values for each of the EVs requesting for the charging operations. Once the weight values for each of the competing EVs are known, their charging operations are controlled, and the available power is distributed among the optimal number of charging EVs;  An algorithm for FLWCS is developed and applied to a parking lot with different parking capacities. The performance of the algorithm is validated against the FCFS-based scheme and the results are verified in terms of QoP.

Literature Review
With the growing penetration of EVs in the transportation market, it is indispensable for the fleet operators to effectively manage the charging load of EVs considering the requirements of both the power grid and the EV owners. In literature, the problem of managing the charging load of EVs in parking lots has been studied from different perspectives and objectives.
The authors in [15] studied the problem of charging cost minimization by considering three different types of public EV fleets attached with a photovoltaic (PV) system. The three parking lots included: (1) commercial customer's fleet, where the charging operation is mainly performed at night time, (2) commuter customer's fleet, where the charging is performed during day time and (3) opportunity customer's fleet, for commuters with short parking duration. Three different options for forecasting electricity generation from the PV system along with controlled and uncontrolled charging strategies were considered. In each fleet, the charging cost is optimized by utilizing electricity from the PV system. By considering the day-ahead energy market, coordination and payment mechanism for a group of sub-aggregators were introduced in [16]. The proposed strategy motivated the participation of sub-aggregators through incentives, where sub-aggregators reports their charging requirements to the main aggregator. The main aggregator employed a bidding algorithm on behalf of requesting aggregators and the purchase of energy and the corresponding payment were then distributed among them. The results showed a substantial cost reduction proportional to the fleet size and the participation of the sub-aggregators. However, these studies focused on the objective of minimizing the charging cost; whereas, the EV owner's satisfaction in terms of their required energies is yet to be explored.
In ref. [17], load shifting potential of plug-in electric vehicles (PEVs) was studied for domestic, work and public charging infrastructures. The study concluded that the coordinated charging through demand response can help to utilize the renewable energy sources and support to shift a significant amount of EVs charging load. The authors in [18] studied a rectangle placement algorithm for scheduling the charging load of EVs at a parking lot with the aim to reduce variation in load. In this algorithm, the energy requirement for a PEV was computed as a rectangle whose length is time and height is the power. The results verified that the rectangle placement algorithm combined with the charging level selection reduced the average load variation, improved the load factor and flatten the total load profile comparing to the traditional first-come-first-served based charging. An optimal charging scheduling strategy was studied in [19], which considered multiple factors, such as transport system information (road length), vehicle characteristics (velocity and wait time) and power grid information (load deviation and node voltage) for managing the EVs. The proposed optimal strategy showed reduced losses, small voltage drop in nodes and optimized the load curve. A peak load minimization strategy based on binary linear programming coupled with a bisection algorithm for parking lot was proposed in [20]. The proposed strategy was simulated with a fast CS and improved results were obtained compared to the uncontrolled charging strategy. All these studies mainly proposed solutions for optimizing the load of the power grid but lacking to address the requirements of the EV owners and the parking lot operators.
The authors in [21] presented a multi-objective optimization control strategy to minimize the charging cost of PEV owners and load variance in the low-voltage network. Several strategies such as uncontrolled charging, smart charging, smart charging with voltage unbalanced reduction (VUR) and smart charging with VUR and vehicle-to-grid (V2G) were simulated by considering a lowvoltage distribution network in Denmark. The results concluded that the proposed multi-objective strategy can reduce both the energy losses, charging cost and can support a high penetration rate of PEVs. The scope of this work was limited to residential customers where the EVs are staying overnight and have enough time to be recharged using slow charging rate, but the proposed solution may not be effective for public parking lots with EVs having shorter stay time. Two-phase optimization method for optimizing the charging cost and smoothing the total load profile was presented in [22]. In the first phase of the model, the electricity price was defined according to the status of the historical daily power curve, for ensuring the maximum profit to both power grid and PEV owners. The second phase then reduces the load fluctuation by optimizing the charging and discharging power of EVs according to the power grid constraints. The results showed the effectiveness of their proposed strategy by smoothing the total load profile than the uncontrolled charging strategy. Inspired from the gray wolf optimizer (GWO), the authors in [23] proposed an improved binary gray wolf optimization (IBGWO) algorithm for parking lot coupled with an energy storage system (ESS) and a PV system. The work aimed to reduce the charging load and cost by utilizing the usages of PV and ESS in the parking lot. The simulation results showed that their proposed IBGWO has a superior performance over the other meta-heuristic algorithms. These studies were tested for a small number of EVs with limited battery capacities and yet their feasibility need to be explored for sizeable parking lots with larger battery capacities.
The authors in [24] proposed a CS selection algorithm based on the fuzzy logic controller with the aim to balance the charging load of EVs and reduce their waiting time. Taking into account the service time (charging time), the speed of EVs and the distance between the EVs current position and the CSs, the fuzzy logic controller was used to determine a weighted priority value for each pair of EVs and CSs. The simulation results showed superior performance by reducing the average waiting time than the random and maximum weight-based scheduling schemes. Re-routing of moving EVs towards an appropriate CS based on multi-agents system for distributing the charging load of EVs among multiple geographically dispersed CSs was proposed in [25]. In this scheme, the EV agent was developed through fuzzy logic controller, which was requesting the other high-level agents to provide reservation services for charging. A total of 21 EVs with a battery capacity of 100 kWh and 6 CSs dispersed within a defined virtual block were simulated. The results showed that the proposed multi-agents based scheme supported a cognitive distribution of the charging load of EVs among the CSs. However, these studies proposed solutions for minimizing the waiting time and balancing the charging load among CSs but lacking to address the charging level satisfactions requirements of EV owners.
It is worth mentioning that all the requirements, including the constraints of the power grid, the EV owners QoE and the QoP of parking lots are of utmost importance while scheduling the charging operations of EVs in parking lots. In order to achieve these requirements, multiple uncertain parameters such as battery SoC, parking duration, required SoC, and available energy [26] needs to be considered. Most of the work solved the charging optimization problem by using dynamic & stochastic programing and heuristic algorithms with the assumption of perfect knowledge on SoC and required SoC which may result in an imprecise decision. To the best of our knowledge, none of the above work focused on an arbitrage consideration of the aforementioned requirements while scheduling the charging of EVs in parking lots. The proposed FLWCS utilizes the services of the fuzzy logic inference mechanism and correlates the information from EVs (i.e., required SoC and remaining parking duration) and from the power grid (i.e., available power) into weighted values for the EVs competing each time slot. Based on the weight values, the charging operations of EVs are controlled in such a way that help to maximize the QoE for EV owners and thereby the QoP for the parking lot under the operational constraints of the power grid.
The ongoing part of this research work is to elaborate on the behavioral aspects of electric vehicle charging including driving (social behavior of owners travels) and charging behavior (suitable charging locations, market-economics, the impact of charging load, waiting and charging time) from the socioeconomic perspective.

Proposed Fuzzy Logic Weight Based Charging Scheme
The scheduling problem for a large scale of EVs in a parking lot involves various parameters from multiple domains which results in a more complex and system [27]. The selection of the most relevant parameters and their corresponding correlation can enhance the efficiency of the algorithm. This section gives a comprehensive presentation of different domains and the correlation of their parameters through the fuzzy inference mechanism for the proposed FLWCS. An overview of the conventional system and its associated deficiencies are exemplified in the following.
Let us assume that there are five EVs in a parking lot and the operators are expected to schedule their charging operations. For the sake of simplicity, all the EVs are considered to be of the same battery capacities (i.e., 40 kWh each), however; they have different arrival times, departure times, SoCs and parking durations. The arrival sequence of these EVs is such as EV1 arrived first, then EV2, etc. The SoCs at the arrival time are 25%, 25%, 37%, 50% and 62% for EV1, EV2, EV3, EV4 and EV5, respectively. Based on the battery capacities and SoCs the required QoEs are 75%, 75%, 63%, 50% and 38% for EV1, EV2, EV3, EV4 and EV5, respectively. The total operational time period of the parking lot (in this example) is assumed to be 3 h, which is normalized into a total of 12 equal time slots with a slot size of 15 min.
Given the arrival and departure time sequence of each of the EVs, the parking durations are computed as 10, 6, 7, 6 and 3 time slots for EV1, EV2, EV3, EV4 and EV5, respectively. Considering that each of the parking spots is equipped with fast CS, which can support a charging rate of 20 kW/h, such that each of the CSs is providing charging power of 5 kW/time slot. It is further assumed that at any time slot t, the power grid can support the charging of three EVs simultaneously. The parking lot operators are required to satisfy the QoE requirements of all the five EVs while respecting the power grid operational constraints. The charging scheduling of these EVs with respect to the conventional FCFS scheme and the proposed FLWCS and their corresponding output in terms of power consumption, their QoE and QoP, are visualized in Figure 2. In the case of FCFS-based scheme (Figure 2a), the EVs start charging immediately upon their arrivals; whereas, the proposed FLWCS scheduled them based on their weight values computed through multiple factors, including the updated SoC, the remaining parking duration (RPD) and the power grid operational constraints, etc. as depicted in Figure 2d. In this example, both schemes are able to follow the power grid constraints as shown in Figure 2b,e. However, in contrast to the FCFS-based scheme, the proposed FLWCS is able to fulfill the QoE requirements for all the EV owners and thereby improve the QoP for the parking lot. Considering the QoE as charging until the full battery capacity, the proposed FLWCS is able to improve the quality of performance by 40% comparing to the FCFS-based scheme, as can be observed from Figure 2c,f.

System Model of the Proposed FLWCS
The system model of the proposed FLWCS is presented in this section, as illustrated in Figure 3. It consists of several functional components including the power grid, the power distribution infrastructure (substations & power line), the distribution system operators (DSO), the baseload (BL) of electricity consumption for residential and commercial buildings, the EVs parking lot and the communication network. The power grid controls the electricity production from different energy sources such as fossil fuels, natural gas and nuclear. The generated electricity is transmitted to the DSO through a high voltage (HV) power network covering a long distance and needs to be converted to medium voltage (MV) through the HV/MV substations. The functions of DSO include the collection of demands from residential and commercial buildings and allocating power to the lowvoltage distribution network. The low-voltage distribution network is supporting two kinds of load: the BL and an EV charging load (parking lot load). The BL is the electrical demand for daily needs such as lighting, water/room heating, air condition, laundry machine, etc. This consumption of electricity is the basic requirement of daily life and depends on the occupancies of peoples, lifestyles and conveniences. Therefore, the BL is considered to be an average consumption of the residential and commercial buildings; whereas, the parking lot load represents the charging load of EVs in parking lot, connected to the low-voltage distribution network. Assuming the futuristic smart parking lot scenarios, this work considers a parking lot with installed electrical infrastructures such that each of the parking spots is equipped with a CS. Furthermore, each of the CSs has a J1772 connector that can be plugged into the inlet of EV and is coupled with a power supply of 208-240 Volt alternate-current (AC) for feeding about 19.2 kWh energy (i.e., level 2 charging option) [28]. The parking lot controller is a central entity, responsible for running the proposed FLWCS and the overall management of the parking lot. The proposed FLWCS is classified into three main components according to their functions.


Data aggregation and CS allocation: The EV owners are expected to provide their information such as arrival time, departure time and SoC to the parking lot controller upon their arrival. The information is initially processed and any of the available CSs are allocated to the newly arrived EVs. The FLWCS manages and controls the charging operations of all the connected EVs in each scheduling period and requires the status of the CSs and the BL information in real time. It is envisioned that a bidirectional communication network is established between each of the CSs and the parking lot controller, and smart meters installed at the CSs are used to detect the status (charging/idle) and measure the amount of energy consumption for the connected EVs [29]. The power consumption of the residential and commercial buildings connected to the low-voltage distribution system is measured through the advanced metering infrastructures (AMI) installed at the customer's premises and the BL is updated to the DSO and the parking lot controller through a wide area network [30].  Fuzzy logic controller: The charging scheduling problem in this work is for a sizeable public parking lot which represents a significant charging load if all the EVs are charged simultaneously in the current time slot. Based on the EV owner's behaviors, EVs are classified into a routine and non-routine EVs [31]. The routine represents the EVs commuting on a daily basis between the home and workplaces and EVs are parking during the duty hours. The nonroutine are the EVs which can be parked for a long or short duration depending on the type of their owners activities such as visiting a shopping mall, theaters, an appointment with a doctor or other social events [32]. Depending on the type of EVs in the parking lot, the operational data of EVs and the current status of the power grid play an important role in the fuzzy logic controller. The operational data of each of the EV in the set of EVs ( ) (including required SoC and RPD and the amount of available power (AP) computed through the BL obtained in real time (t) are the inputs to the fuzzy logic controller. The developed fuzzy inference mechanism evaluates the required SoC, the remaining parking duration and the available power and computes weight values normalized in [0,1] range for the EVs in each time slot.  Charging control and power distribution: Considering the weight values obtained through the fuzzy inference mechanism (according to the updated status of the power grid and the EVs information), the number of charging operations is controlled, and the power is distributed among the most appropriate EVs. The current status of the CSs and the updated SoC (power consumption) of each the EVs are measured and reported for consideration in the next scheduling period. The process is repeated during the parking operational hours and the optimized power consumption and the QoE for each of the EVs are recorded in each of the scheduling periods.

Problem Formulation and Objective Function
The arrival and departure of an EV is a function of time and therefore, at any time slot t, a new arrived EV has to be added while a served EV has to be removed from the set of EVs. Let , , ⋯ , represents the set of parked EVs at time slot t, the arrival and departure of an EV can be handled by using union (∪) and subtraction (\) operations of set theory as given in Equation (1), where and represents newly arrived and served EVs. The parking lot operators record the current and future necessary information obtained from the EV owners for each of the new EVs. The required SoC of the newly (last) arrived is a function of the SoC and its battery capacity, and for any ith EV it can be computed according to Equation (2). The total load of the parking lot is the aggregated demand of all the existing EVs and the new arrived EV in the current time slot t and can be computed according to Equation (3). The total power consumption of the lowvoltage distribution system at time slot t can be obtained through summing up the baseload of the residential and commercial building and the total energy demand of the parking lot, as given by Equation (4).
∪ , where is the current time slot, is the arrival time of newly arrived EV, is the departure time of any ith departing EV, and are the battery capacity and the required SoC of the newly arrived EV, _ is the total energy demand of parking lot and _ is the total load. To avoid the overloading of the power grid, the total load must be within the nominal capacity of the low-voltage distribution transformers. As mentioned earlier, the baseload represents the fundamental requirements of the customers and is assumed to be an uncontrolled load, whereas considering the flexibility of EV owner's behavior, the parking lot load is assumed to be a controllable load. In order to keep the total load within the normal operation, certain limits are required to be considered. The authors in [33] defined an upper reference power limit (URPL) based on the transformer capacity. However, for the sake of safe operation, we maintained some margin between the URPL and transformer capacity. This work defines the URPL by considering the transformer capacity and the previous day baseload profile (assuming that the current and the previous day have a similar pattern of power consumption) as given by Equation (5).
where is the transformer capacity, T is the total number of time slots, is the baseload and is a percentage stability factor define by the low-voltage distribution operators for voltage and frequency maintenance. The second part in first term in Equation (5) represents some margin between the and URPL. The available power (AP) varies according to the varying BL profile and can be computed based on the URPL and the current value of BL profile, as given by Equation (6). The relationship between the total power demand _ of parking lot and the AP influences the overloading of the distribution network. The _ (Equation (3)) and AP (Equation (6)) can be correlated in any of the two possible cases [34]. In the first case, the AP is enough to support the charging load of all the requesting EVs in the current time slot t; whereas, in the second case, the power demand is higher than the AP, as expressed by Equations (7) and (8). Depending on the AP and charging power ( ) of a CS, the latter case will allow charging a certain number of EVs as calculated by Equation (9).
At any time slot t, allowing to charge more than number of EVs will abruptly affect the peak-load and may worsen the performance of the distribution network. In this case, the parking lot operators have either to request more power allocation or to cut down their charging load. Depending on the power generation and infrastructure capacities, the allocation of more power is costly and time consuming; whereas, reducing the power demand is more a feasible solution, but the complexity presents challenges on how to choose the most appropriate EVs for charging while restricting/holding the others. This work defines the objective function of minimizing the parking lot power demand by controlling the charging of EVs through their weight values, as given in Equation (10).
where is the total parking duration, is a binary variable representing whether the parking lot is empty or not, is the decision variable used to control the charging of the ith EV and ɳ is the charging efficiency. Depending on the weight value (W) of the ith EV, the accumulated load and the URPL, the value of can be defined as given by Equation (11).
Each of the ith EV has a defined parking duration and a time period ( for the charging operation, such that the charging time is the subset of parking duration. The parking duration is computed based on the arrival and the departure time sequence for each of the EVs. The charging time period of the ith EV can be defined according to its battery capacity, required SoC and the charging power per time slot, as expressed by Equation (12). = (12) The optimization function defined in Equation (10) is subject to several technical and nontechnical constraints. The parking lot has a known operational hour, defined by a pair of starting and ending time ( , ). The arrival and departure of the ith EV must be within the parking operational hours. The charging time period must be within the arrival and departure time slots of EV. These constraints are defined in Equations (13)- (15).
To maintain the battery efficiency, the SoC, charging cycles (B ) of the battery and the charging power of the ith EV must be within the defined maximum , maximum number of battery charging cycles _ maximum charging power [35] as given in Equations (16)- (18). The total load at any time slot t must be within the URPL, as given in Equation (19).
The charging operation of EVs in each time slot influences the total load of the power grid. The charging impact on total load is measured in percentage and can be computed with respect to the highest peak load and the URPL, as given in Equation (20). The QoE for the ith EV is the function of the , and and can be computed according to Equation (21). Similarly, the parking lot QoP is function of the number of satisfied EVs , the number of unsatisfied EVs , the QoE and the total number of EVs ( ) during the parking lot operational hours and can be computed according to Equation (22). (23) [36].

Definition 1. The crisp sets are based on the theory of complete knowledge, for instance, an element is either a member of a set or not. Whereas in fuzzy sets the degree of membership function determines the belonging of an element to the set. An element x in fuzzy set ∈ X (universal set) can be represented through the degree of its membership function as expressed in Equation
where is the degree of membership function which represents the belonging of x to the fuzzy set in the range [0,1]. The degree of membership function defines how closely the element x belongs to the set A. A higher degree represents a strong whereas a lower degree represents a weak belonging of x to the fuzzy set . The concepts of membership functions used in this work are as follows:  Triangular membership function: A triangular membership function reflects the shape of a triangle and can be defined by three parameters a, b and m such that a < m < b, as given in Equation (24) [37].
 Trapezoidal membership function: The trapezoidal membership function resembles a trapezoidal shape and can be defined by four parameters a, b, c and d. The parameters a and d defines the abscissa of two vertices at the bottom while the parameters b and c denotes the abscissa of the two vertices at the top of the trapezoidal [37]. Mathematically, it can be expressed as Equation (27).

Fuzzification of Crisp Inputs and Their Fuzzy Membership Functions
The charging operation of the ith EV is controlled through the decision variable (Equation (10)), which is based on its weight value. There are multiple parameters such as arrival and departure time, the , the RPD, the BL and the AP from both the EVs and the power grid domains which needs to be considered while computing the W value for the ith EV. The independent nature and the temporal-based variation of these parameters are introducing a higher degree of uncertainty, which presents complexity and challenges in the task of weight computation. It is believed that the , the RPD and the AP are the most relevant inputs that influence the weight value in each time slot [38]. Therefore, to compute an adequate weight value for the ith EV, this work correlates the , the RPD and the AP through the fuzzy inference mechanism. These crisp inputs should be linearly structured between the minimum and maximum boundaries with their corresponding units and should be defined through the set of linguistic variables for representing them through the membership functions. The RPD input is based on the operating hours (12 h) of the parking lot, which is normalized into 48 time slots such that each time slot represents 15 min. Considering the dynamic behavior of EV owners, the RPD is modeled with three membership functions and is represented with linguistic terms short duration (SD), average duration (AD) and long duration (LD) [25,32]. The linguistic terms SD and LD are implemented as left and right open shoulder membership functions, whereas the term AD is implemented as trapezoidal membership functions using Equations (25)- (27). The fuzzy set SD and AD contains the degree of membership functions for the set of EVs having RPD in the range of 0 ≤ ( ) ≤ 8 time slots and 4 ≤ ( ) ≤ 20 time slots, respectively. The is the number of EVs in the set. The fuzzy set LD holds the degree of membership functions for the set of EVs with RPD in the range of 16 ≤ ( ) ≤ 48 time slots. The implementation detail of RPD is given in Table 1 and is virtualized in Figure 4a Table 2 and is shown in Figure 4b. The third input is the AP which is measured in kW and is normalized from low available power to high available power in the range [0-100]. The AP is modeled with five membership functions and is represented with linguistic terms very low AP (VLAP), low AP (LAP), medium AP (MAP), high AP (HAP) and very high AP (VHAP). These linguistic terms are implemented with two left-right open shoulders and three triangular membership functions using Equations (25)- (27). Furthermore, the VLAP and VHAP contain the degree of membership functions for the time slots with AP in the ranges 0 ≤ ( ) ≤ 30 and 70 ≤ ( ) ≤ 100, respectively. By this way, the fuzzy sets LAP, MAP and HAP contain the degree of membership functions for the time slots in the ranges of 10 ≤ ( ) ≤ 50, 30 ≤ ( ) ≤ 70 and 50 ≤ ( ) ≤ 90, respectively. The implementation detail of AP is given in Table 3 and is shown in Figure 4c.     Table 3. Implementation detail of membership functions for AP.  Table 4 and shown in Figure 4d. The fuzzy rules represents a set of process that correlates the degree of memberships of a set of inputs to the degree of memberships of the output variable using IF-THEN logical statements [39]. The set of rules is usually designed according to the expert's knowledge of the problem domain [40]. The sequence of IF-THEN statements forms an algorithm which captures the currently known information and infers the output using fuzzy rules implication. In the logical IF-THEN statement, the IF part represents the antecedents (conditions) which capture the observed information and the THEN part shows the consequent (conclusion). The consequent is fuzzified knowledge and is represented in the form of linguistic variable and degree of membership. The antecedents relate multiple inputs through AND/OR logical operators, while the consequent infers the output by using the intersection, union and composition operations of the fuzzy set theory.

Definition 2. The relation of two fuzzy sets and is represented by = ⟶ and can be defined as the
Cartesian product in X* Y space, where X and Y are the universal sets such that ⊆ X and ⊆ Y. The mathematical representation of two fuzzy sets and multiple fuzzy sets is given in Equations (28) and (29) [37,41].
Definition 3. For two fuzzy relations = ⟶ and = ⟶ , a new relation can be computed using the fuzzy composition operation, such that relates the elements of in and elements of in , as given by Equation (30).
The symbol " ° " is the composition operator which connects the elements of and based on their membership functions. The Mamdani min-max is a famous composition method which can be used to infer the degree of input membership functions to the fuzzy set , as given in Equations (31) and (32).
Definition 4. The set of fuzzy rules R = { , , ⋯ , along with their corresponding antecedents and consequences using IF-THEN statement can be expressed as given in Equation (33) and can be generalized as given in Equation (34).
The sets , , ⋯ , and , , ⋯ , are the n input fuzzy variables and the sets A A , A ⋯ A and B B , B ⋯ B are the linguistic representation of the antecedents and consequences in universes of discourses X and Y, respectively [42]. Considering the generalized form of rules defined in Equation (35), the min and max operation on the degree of membership functions of A and B for the and input variables are expressed in Equations (35) and (36), respectively. , , , , The approximate reasoning feature of FIS is used to infer the most appropriate knowledge when multiple rules are applicable for the given inputs. The approximate reasoning is the process of matching the degree of input data to each of the applicable rules. The higher the matching degree of input data to the rules the closer is the inferred conclusion to those rules and vice versa. The approximate reasoning can be done by considering all the applicable IF-THEN rules and using any aggregation method such as Mamdani min-max operation. Considering all the combinations of three inputs and their corresponding output variable, this work defines the set of fuzzy rules for computing the weight values for the EVs, as given in Tables 5-7. In the case of multiple rules say r applicable rules such that i = 1, 2, 3… r, the aggregated inferred weight value for each of the ith EV can be obtained by min-max operation on r applicable rules as given by Equation (37).

,
, ,   The fuzzy inference results in a fuzzified output, which must be converted into crisp weight value through the defuzzification process. There are several defuzzification methods, including center of gravity (COG), middle of maxima (MOM), first of maxima (FOM) and last of maxima (LOM) and random choice of maxima (RCOM). The use of a specific defuzzification method depends on the type of input membership functions such as overlapping or non-overlapping membership functions. For the non-overlapping membership functions, the MOM is a suitable choice while for overlapping membership functions, the COG is the most feasible solution. This is because in the case of nonoverlapping membership functions a slight change in the input data reflects an abrupt change in the output, whereas in the case of overlapping membership functions any minor change does not influence the output significantly. This work uses overlapping membership functions for input data and consider the COG method to compute the crisp value for the weight variable. To compute the crisp weight value for the ith EV, the standard equations of the COG method can be utilized as given in Equations (38) and (39).
The input data can either be discrete or continuous values. For the case of discrete inputs Equation (38) can be used while for the case of continuous values Equation (39) can be used to compute the crisp value of weight variable.

Flowchart of the Proposed Algorithm
The flowchart of the proposed FLWCS is shown in Figure 5. The detailed procedure of the algorithm is explained in the following steps. Step 1. Initialize all the input parameters of the system, such as the initial and maximum simulation time, the number of CSs and their charging power and other control variables.
Step 2. Check for the new arrivals of EVs in the current time slot t. If there is new arrival of EVs the algorithm check for any available parking spot and CS by iterating through each of the CSs. Note that this work considered futuristic parking scenarios which assume that each of the parking spots is equipped with a CS. If there is an available spot and CS, the algorithm registers each of the new EVs into the system using Equations (1) and (2) and collects the inputs from the new EVs and assign them to the CSs. The status of the CSs is updated from idle to busy.
Step 3. Compute the total energy demand of parking lot, the AP and the number of EVs that can be supported by the AP according to Equations (3)-(9).
Step 4. Check whether the energy demand of parking lot is greater than the AP or not, as stated by Equations (7) and (8). If the condition is true, i.e., the energy demand is higher than the AP go to the next (Step 5) and call the fuzzy logic controller subroutine as shown in Figure 6. However, if the AP is enough to support the parking lot energy demand, then go to Step 6.
Step 5. Construct the list of weight values by computing the for each of the ith EV according to the input data using the developed fuzzy inference mechanism. Once the list of the weight values is computed, sort the list of EVs ( ) in descending order according to list. Furthermore, construct the list of decisions by checking the SoC against the battery capacity of each the EVs and the total number of allowed EVs for charging within the AP. Considering these conditions the list is updated with 0 and 1 values. Finally, the EVs and their corresponding decision lists are returned to the main calling algorithm.
Step 6. Check the departure time of each of the ith EV against the current time slot t. If in the current time slot, any of the ith EV is departing, then compute its QoE using Equation (21) and remove the departing EV from the set of EVs using Equation (1). However, if the EV has still to stay in the parking lot, the algorithm solves the optimization problem defined by Equation (10) for each of the EVs, according to their corresponding decision values. Once the optimization problem is solved for all of the EVs, their charging operations are performed in the current time slot. The algorithm then couples the aggregated charging load to the current baseload and computes the total load. If the current time slot is not reached to the maximum simulation time, increment the current time slot t and repeat the process from Step 2 to Step 6. However, if the simulation time reached to its maximum time limit, compute the load impact and the parking lot QoP using Equations (20) and (22).

Simulation Results and Discussion
This work assume a low-voltage distribution network, which feeds electricity to the residential houses and a parking lot. The transformer capacity of the distribution network is based on the lumped load of the node-820 in the IEEE 34 bus system [43]. The total baseload depends upon the number of houses in the distribution network and their electricity consumption. The average electricity consumption of a typical household is assumed to be about 2.78 kW and load factor of the houses is about 70% of the lumped load of node-820 in the IEEE 34 bus system [44,45]. As a result, a total of 34 houses was computed for the low-voltage distribution network and their aggregated baseload profile is visualized in Figure 7. The parking lot operational hours is considered to be from 7:00 AM to 7:00 PM [46]. These 12 h are normalized into 48 time slots with a 15 min resolution. The parking spots are equipped with fast CSs of 20 kW/h supporting a charging power of 5 kW/time slot. Furthermore, four different types of EVs with battery capacities of 40 kWh, 60 kWh, 80.5 kWh and 100 kWh are considered for the simulation [47][48][49][50].  The simulation is developed using java language, where the open source jFuzzyLogic libraries are utilized for implementing the fuzzy logic inference system [51]. The simulation is performed for four different parking capacities of 50 EVs (case-1), 100 EVs (case-2), 150 EVs (case-3) and 200 EVs (case-4). The four different types of EVs are distributed with a random penetration level as given in Table 8. The arrivals of EVs are randomly generated with μ = 42 slot number and σ = 6 time slots, while their stay time are generated with μ = 20 time slot number and σ = 4 time slots, using Gaussian distribution. Their corresponding departure times are then computed by summing up their arrivals and stay time distribution. The arrival and departure time distribution of EVs for the four different parking capacities is plotted in Figure 8.  Similarly, the arrival time SoCs of EVs are generated between 20% and 50% of the battery capacities using a uniform distribution. The EVs arrival time SoCs distribution and their battery capacities are plotted in Figure 9 for four the different cases. The random arrival, departure sequences of EVs and their corresponding SoCs are resulting in a different number of EVs in each time slot. The temporal-based varying occupancies for four different parking lots are shown in Figure 10. The transformer capacity is assumed to be based on the lumped load of node number 820 of the IEEE 34 bus system. The value of ω is assumed to be 10% and the charging efficiency η is considered to be about 0.90 [52].  The simulations are performed in four different cases, where each case corresponds to different parking capacity. The performance of the proposed FLWCS is evaluated against the conventional FCFS-based scheme by considering the QoE and the QoP as the performance metrics. The FCFS-based scheme performs the charging operation of EVs according to their arrival sequence; therefore, an EV with the earliest arrival time has the highest priority to be charged. In contrast, the FLWCS computes weight values for EVs in each of the time slots using fuzzy inference mechanism. The weight values are dynamically computed in each time slot and are used to choose the most appropriate number of charging EVs that help to maximize the QoE and QoP while maintaining the grid constraints. The concept is almost the same as the authors in [53] dynamically controlled a threshold value between a normal and guard channels based on the people's mobility.
The results in Figure 11 show the number of EVs requesting for charging operations, the number of EVs that can be supported by the AP under the normal operational limit of the power grid and their scheduling with FCFS and the proposed FLWCS. In each case, it can be observed that with the increasing parking occupancies the number of EVs with charging requests are also increasing. However, the variation of the baseload profile and the operational constraints of the power grid limit the number of EVs to be charged in each time slot. Following the operational constraints of the power grid, the total charging demand and the different behaviors of EV owners, in each time slot the two schemes perform their scheduling in a different manner. The FCFS-based scheme prioritizes the early arriving EVs and thereby with the passage of time most of the later arriving EVs with shorter staying duration are unable to get the opportunities for charging operations. Whereas, the proposed FLWCS maximize the charging operations by scheduling the most appropriate EVs for charging according to their weight values. In each time slot, the charging load of EVs with respect to the FCFS-based scheme and FLWCS is shown in Figure 12. It can be observed that the proposed FLWCS can utilize the AP in a more efficient manner compared to the FCFS-based scheme. The difference in AP utilization between the two charging schemes is more obvious from case-1 to case-4 with the increasing parking size and occupancy. The parking occupancies, the number of EVs with charging request and their scheduling for the charging operations affect the total load on the power grid. The aggregation of the baseload and the charging load of EVs results in the formation of the total load profile of the power grid, as shown in Figure 13. The figure shows the baseload and the total load with respect to FCFS and the proposed FLWCS schemes for four different parking capacities. The URPL (which is computed according to Equation (5)) is the threshold point representing the normal operational limit of the power grid. From figures, it can be seen that in all the four cases, both of the charging schemes follow the normal operational limits of the power grid. However, the efficient utilization of the AP and the total load profile with the proposed FLWCS is higher than the FCFS-based charging scheme. The temporal varying baseload, the operational constraints of the power grid, the different behaviors of EV owners, the battery capacities, and the required amount of charging have an effect on the QoE of EVs and thereby on the QoP of the parking lot. Considering the QoE until full battery capacity, the QoP in terms of satisfied QoE for the four different cases is shown in Figure 14. In view of the EV owner's requirements, the two schemes have different QoP in each case. For example, with the proposed FLWCS a greater number of EVs are able to get the charging opportunities and thereby improving the QoP performance than the FCFS-based scheme. In case-1, the EVs with satisfied QoE are about 76% and 68% and the EVs with unsatisfied QoE are about 24% and 32% with the proposed FLWCS and the FCFS-based charging scheme (Figure 14a).
This implies that the proposed FLWCS has about 8% improved QoP than the FCFS-based scheme. By increasing the parking lot size from 50 to 100 parking spots in case-2, a degrading QoP performance was noted. The QoP is about 51% and 41% with respect to the proposed FLWCS and the FCFS-based charging schemes (Figure 14b). The performance was further analyzed by simulating scenarios of parking lots with 150 and 200 parking spots in case-3 and case-4 (Figure 14c,d). In case-3 and case-4, the QoP is about 43% and 38%, with the proposed FLWCS. In these cases, the QoP is about 31% and 24% with respect to the FCFS-based charging scheme. The results in these cases imply that the proposed FLWCS has about 12% and 14% higher QoP comparing to the FCFS-based charging scheme.

Conclusions
This study proposed a fuzzy logic weight-based charging scheme to distribute the charging power among the optimal number of EVs in such a way that maximizes the quality-of-performance under the operational constraints of the power grid. The developed fuzzy inference mechanism correlates different parameters such as state-of-charge, remaining parking duration and the available power into weighted values for each of the EVs. Once the weight values of all the EVs are known, their charging operations are controlled in each time slot such that the operational constraints of the power grid are respected. A java-based simulator was developed and tested for a parking lot with different parking capacities by considering four types of EVs with different penetration levels. The performance of the proposed FLWCS was analyzed against the conventional FCFS-based scheme in terms of QoP. The simulation result reveals that the proposed FLWCS has a significant performance over the conventional FCFS-based charging scheme. In more detail, increasing the parking spots to a certain number such as from 50 EVs to 200 EVs the QoP was improved by about 8% to 14%, with the proposed FLWCS.

Research limitations:
There is a tradeoff between the power grid requirements and EV owner's satisfaction and it is believed that the variable charging rate could be used to optimally analyze these requirements. In the future, the proposed scheme will be extended for more complex charging scenarios based on variable charging.

Research Implications:
The emergence of electric vehicles in the transportation market and their charging system offers a vast range of research possibilities in the field of electro-mobility research. Therefore, there is a need to study the socioeconomic implications of EV fleets by developing models for sustainable development such as social, environmental and market economics.