Combined economic emission based resource allocation for electric vehicle enabled microgrids

: As electric vehicles (EVs) are currently under-utilised, the features of deploying EVs as distributed energy resources (DERs), based on an EV as a service (EVaaS) framework, are exploited and a resource allocation scheme is proposed for optimum association of dispersed EVs with critical load for demand fulfilment in microgrids. The proposed approach is based on a combined economic emission (CEE) optimisation model where both energy costs and carbon emissions are taken into account. The CEE optimisation problem is then formulated as a bi-objective optimisation problem, considering a number of practical constraints, such as energy demand, cost budget, emission limit and charging station limit. Carbon price is introduced to convert the bi-objective problem into a single objective function. The authors included EV battery degradation cost to ensure EV owners are not worse off after EVaaS participation. The feasibility of the proposed model is demonstrated in simulation studies. The approach has been extended to evaluate the trade-off between EVaaS and conventional DERs. Numerical results demonstrate the efficiency of the proposed resource allocation scheme.


Introduction
Environmental concerns are motivating the reform of electricity generation; including the gradual transformation from conventional power sources to distributed energy resources (DERs). In addition, the greenhouse gas (GHG) emitted by power installations is subject to carbon price and limited by emission allowances, which are stipulated by the European Union Emission Trading System (EU ETS) [1]. Scotland made an initiative to phase out new diesel and petrol vehicles by 2032, 8 years ahead of the UK government target, and develop a modern and integrated clean energy system [2]. This will lead to high popularity and manufacturing of electric vehicles (EVs), as well as development of related infrastructure. Known for their features as emission free, revenue generator and energy conserving, EVs have become the future trend. However, the large penetration of EVs will be accompanied with new challenges on the energy system [3].

Background
Despite advantages over traditional DERs, such as energy storage systems (ESSs), stationary diesel generators (DGs) and mobile emergency generators (MEGs), EVs are not being utilised to their full potential. Under vehicle-to-grid (V2G) concept, aggregated EVs can be leveraged to provide power supply and ancillary services to the electricity grid during peak demand and system failure [4]. V2G technology enables EVs plugged into charging stations to charge (store energy) and then discharge (feedback) electricity to the grid. In the conventional way of transporting energy (from generation to consumption) through the grid, a loss of about 2% occurs over the transmission network and a further 8% over the distribution network [5]. These network losses lead to increased energy costs and account for about 1.5% of the GHG emissions in the UK [5]. Alternatively, EVs can store, transport and supply energy directly to the critical loads (CLs). EVs can also be deployed to meet short-term energy demands of CLs such as popup hospitals and evacuation centres set up during emergency situations, which may not be met by regular supply [6]. By transmitting energy through EVs, power network losses will be reduced [7], which will lead to reduced energy costs and GHG emissions. Most existing studies focus only on economic benefit maximisation [8]. However, due to growing environmental concerns, strategies that automatically account for environmental constraints are desirable.
Currently, there are limited existing studies on combined economic emission (CEE) problem incorporating dispersed EVs for balancing demand-supply mismatch in microgrids. Formulation of CEE problems as described in the existing literature [9][10][11][12] differs with regards to the type of criterion function, conversion factor used to formulate the multi-criteria optimisation function and practical constraints. A weight factor-based optimisation model for cost and emission reductions in a smart grid by maximum utilisation of EVs and renewable energy resources (RESs) is presented in [9]. In [10], plug-in hybrid EVs (PHEVs) are exploited as mobile energy storage unit involving unit commitment model, where the optimal plug-in capacities of PHEVs and the scheme are obtained through a mixed-integer programming algorithm, considering cost coefficients of emission. An optimisation model using weighted sum method is proposed in [11] to solve the economic dispatch problem on a generation system, considering EVs expected future demand. Another optimisation model using weighted sum method for dynamic economic/emission dispatch including EVs for peak shaving and valley filling is proposed in [12], considering EV battery degradation cost.
The conventional centralised dispatching approach in the literature do not consider dispersed EVs, ideally EVs are distributed over large geographical areas and would need to travel to the CL to supply energy. The optimisation models in the literature are different from ours, while they solve a dispatch problem, ours finds optimal association of disperse EVs with CL. Most contributions to CCE problem focus on optimal dispatch of power generators; to the best of our knowledge, this is the first contribution that exploits EVs to provide capacity on-demand to fulfil CL demand in microgrids.

Our contributions
This work is an extension of our work [13], where we introduced the EV as a service (EVaaS) framework and modelled EV-CL association as a mixed-integer linear programming problem. In this paper, we consider the proposed CEE problem as a mixed-integer non-linear programming (MINLP) problem because it has nonlinear functions in the objective function and constraints with binary and continuous variables. Unlike focusing on economic benefit maximisation, we also consider carbon emissions as a second objective function. The main contributions of this paper can be summarised as follows: • We propose CEE optimisation to exploit the trade-off between emissions and operational costs in EV-CL association. We study EV battery degradation and the communication requirements for successful EV-CL interaction. The model integrates battery degradation cost, so they do not become financial liabilities from EVaaS participation. • We then formulate the CEE problem as a bi-objective optimisation problem, which is subject to practical constraints such as energy demand, cost budget, emission limit and charging station limit. Towards solving the bi-objective problem, we introduce carbon price to convert it into a single objective function and ensure consistency of metric units. • The proposed model is compared with traditional strategies and DERs such as ESS, DGs and MEGs via numerical results. The strategy showed reductions in operational costs and carbon emissions, thus EVaaS is efficient for green power generation and demand response.
The rest of the paper is structured as follows. The EVaaS system framework is described in Section 2. In Section 3, the CEE optimisation problem is formulated and a detailed explanation of the optimisation algorithm is presented. Simulation and numerical results are analysed in Section 4. Conclusions are drawn in Section 5.

EVaaS system framework
The EVaaS model shown in Fig. 1 consists of EVs, CLs, smart meters and microgrid central controller (MGCC). The subsystems communicate with the microgrid through a communication network to effectively carry out tasks and collectively achieve an objective. The MGCC monitors and controls subsystems to ensure overall system efficiency [14]. Microgrids demonstrate homogeneous characteristics to system of systems (SoS), thus making it convenient to integrate its subsystems in an SoS framework [15]. Now enclosed in the SoS framework, the microgrid can actualise its functions in a coordinated manner, while strategically utilising its subsystems to accomplish its objectives.
The conventional centralised dispatching approach in the literature is not ideal for EVaaS application, as a result a two-stage model comprising association and dispatch stages could be one way to model the combined problem. The operation strategy for CL demand fulfilment with dispersed EVs is a non-convex and multi-objective optimisation problem which is generally hard to solve in reasonable computational times, even for small-sized systems. Thus, the problem can be decomposed into association and dispatch problems. The association problem associates EVs with CL, while the dispatch problem schedules associated EVs to discharge energy. This paper focuses on the optimal association of EVs with CL for CL demand fulfilment in microgrids. The dispatch strategy is out of scope and will be investigated in our future study, where these two problems will be addressed sequentially.

EVaaS communications
EVaaS communication provides information and data exchange among EVaaS subsystems, consisting of communication infrastructure and processing facilities, such as data centre and cloud computing. Wireless communication is the best solution for EVaaS application [16]. Communication between EVs and the EVaaS infrastructure is enabled with a mix of wireless technologies such as Near Field Communication, Zigbee, Bluetooth, WiFi, LTE, WiMAX, IEEE 802.11p and fifth generation (5G) wireless networks. The standard protocols for long distance communication in EVaaS systems are IEEE 802.11p and WiMAX technologies, with covered distance up to 1 and 5 km, respectively [17]. During EVaaS interaction, data analytics become a concern and are required more [18]. Information on EV battery capacity, current location of EV, CL demand, location of CL and other similar information need to be available. Hence, data communication is the fundamental step to optimise the energy resources distributed over the local region and achieve the best performance.
Since the decision making is always based on updated information, the system relies on real time, high-precision and lowlatency communication networks to develop effective optimal EV association decisions. Here, EVs within a defined area are selected, based on emission and operational costs. However, issues including data collision (due to high EV deployment scale) and transmission failure (due to insufficient coverage) are usually inevitable. In the worst case, the CL would select EVs with shortest geographic distance as a backup scheme, if optimum EV association is not obtained from the system [19]. EVs are then associated based on first come first served (FCFS) scheme. The impact of communication failure in the system will be analysed in our numerical study.

EV battery capacity
EV battery capacity can be described as the maximum amount of energy that can be stored or extracted from the battery under specified conditions such as state of charge (SOC), charge and discharge rate and temperature [20]. EV models such as Chevrolet Volt, Mitsubishi iMiEV, BMW i3 and Nissan Leaf have different EV passenger models that are currently implemented in the real world, with battery capacity of 16, 16, 22 and 30 kWh, respectively, while the Telsa van has a battery capacity of 90 kWh [16]. When considering the battery capacity, the SOC is defined as a percentage ratio of the stored energy to the storage capacity of the battery. EV owners are often advised to reserve up to 30% of battery capacity for improved battery performance and to ensure that they do not run out of range [21]. The amount of energy that can be stored or extracted from the battery reduces over time, resulting in capacity loss in the battery. The capacity loss of batteries can be associated to the undesirable side reactions that occur during the overcharge and high rate charging and discharging conditions. Thus, capacity loss is directly proportional to the charge and discharge rate [22]. The mathematical model for capacity loss at different charge and discharge rate is described in [23].

Energy efficiency of EV battery
Coulombic efficiency of EV battery can be seen as a measure of how much of the stored energy is measurable as electrical energy. Since no chemical or physical process can obtain 100% energy efficiency, more energy is always used to charge the battery than can be extracted from it. Hence, the energy efficiency of the battery can be expressed as the ratio of charge output to charge input. The amount of energy received by the CL depends on the discharging efficiency of the battery. This can be mathematically represented as where v rated is the rated battery capacity, in kWh, v is the actual volume of energy that can be discharged by the EV battery, in kWh; η dis is the discharge efficiency of the battery. The energy efficiency of the battery decreases as the number of charge cycle increases, where a charge cycle is a complete charge and discharge process on the battery. As a result of natural limitations, the EV battery usage is limited to a fixed number of charge cycles, over time the capacity will gradually fall and its performance will decrease significantly.

EVaaS revenue
For an EV to participate in EVaaS, the battery has to be charged. Assuming the EV battery has 85% efficiency, 15% of the supplied energy to the battery by the grid or alternative source is always lost. The energy supplier will bill the EV according to the amount of energy supplied and not the actual amount of energy received. Therefore, the total supplied energy cost can be mathematically represented as where C c is the charge cost for energy supplied to the EV, measured in British Pounds (£) per kWh; ω off − peak is the unit energy cost during off-peak hour, measured in British Pounds (£) per kWh; ω peak is the unit energy cost during peak hour, measured in British Pounds (£) per kWh; E off − peak is the total energy supplied during off-peak hour, in kWh; E peak is the total energy supplied during peak hour, in kWh. EV battery will degrade faster due to increased charge cycles from EVaaS participation, resulting in additional loss to the EV owner. The capacity loss and high cost of battery sum up the major financial liabilities of the EV owner and this will require financial compensation [12,23]. Depth of discharge (DoD) plays an important role in estimating the number of charge cycles [24]. We consider a linear battery model which assumes the number of charge cycles multiplied by the DoD corresponds to 1 cycle operation of 100% DoD, i.e. 2 cycles of 50% DOD as equivalent to 1 cycle of 100% DoD. The battery degradation cost can be mathematically represented as where B c is the monetary equivalent of per cycle operation of a battery, B int is the initial cost of the battery and L cycle is the number of charges cycles specified by the manufacturer. The cost of the energy stored in the battery is the sum of charge cost (2) and battery degradation cost (3), that is For EVs to avoid making financial losses, the discharge cost should not be less than the valued cost of energy, i.e. C d ≮ C val , where C d is the discharge cost. This ensures EVs are not worse off after EVaaS participation.

EV emission
Unlike conventional vehicles, EVs do not produce any exhaust emission, however they can still contribute to higher carbon footprint. Charging EV from a grid with high coal usage in its energy mix will result in a higher carbon footprint compared to charging EV from a grid that generates electricity from predominately renewable energy [25]. EV emission is calculated according to the conversion factors for the electricity supplied to the grid [26]. EV emission E m can be mathematically expressed as where σ is the activity data and e f is the emission factor, expressed in terms of one unit of carbon. A notable factor associated with grid consumed energy is the emission associated with grid losses. The grid losses occur while getting electricity from generation stations to the load, in this case, charged EVs. Therefore, emissions from energy consumption can be calculated by adding together the energy generation and the transmission and distribution (T&D) values. Including emissions associated with T&D losses is optional, however it is considered the best practice. The next section presents the CEE optimisation problem for associating EVs with CL.

Problem formulation
The impacts of global warming and a changing climate are of great concern, making reduction of GHG emissions a necessity. Traditionally, EVs are associated to CLs using economic benefit maximisation as the criterion [13,27]. However, the cost-effective association does not lead to minimum emission, likewise, minimal emission association does not lead to minimum operating cost. The aim of emission association is to determine EVs with the least carbon-emission cost. The two criteria are in a trade-off relationship and are contradictory to each other. A viable approach to solve this sort of bi-objective problem using conventional optimisation methods is to convert it into a single objective function. By appropriate manipulations, the operational cost and emissions can be placed on a comparable basis which results in a single suitability function encapsulating both costs and emissions. When environmental concerns are added as a second objective to the economic association problem, it becomes a CEE optimisation problem.
Considering a microgrid where EVs and CLs are uniformly distributed in a square region of area A r , we model their locations as a binomial point process (BPP) [28]. This provides random distribution points of EVs and CLs denoted as (x i , y i ) and (x j , y j ), respectively, where i ∈ {1, 2, …, N EV } and j ∈ {1, 2, …, N CL }. From the fixed positions of EVs and CLs, the transportation distance d i j = x i − x j + y i − y j of ith EV from jth CL is derived. The Manhattan distance function computes the travel distance between EVs and CL if a grid-like path is followed. The gridlayout depicts streets of a city in a real-world scenario. The problem formulation is as follows.

Cost function:
The cost function aims to minimise the operational cost of the deploying EVs as distributed generators in a microgrid to fulfil CL demand. The operational cost here includes the energy cost and the transportation cost of EVs from its current location to the CL. The energy cost is determined by the obtainable energy from the EV battery, which considers the discharging efficiency of the battery (1). The transportation cost is determined by the travel distance. The cost function is formulated as where v i j denotes the amount of energy of the ith EV required by the jth CL, in kWh; EC i denotes the unit energy cost of the ith EV, measured in British Pounds (£) per kWh; d i j denotes the estimated transportation distance from ith EV to jth CL, in km: TC i denotes the unit transportation cost of the ith EV, measured in British Pounds (£) per km.

Emission function:
The emission function aims to minimise the total emission, in kilograms of carbon dioxide equivalent (kg CO2e), from deploying EVs as distributed generators in a microgrid to power CLs. From (5), the emissions model can be modified to include energy consumption and transportation emission for EVs. Energy consumption emission is the total energy consumption (electricity or fuel) multiplied by the emission factor (electricity or fuel). Transportation emission is the total activity of vehicle category (in km) multiplied by the emission factor. The emission function can be formulated as where e f c denotes energy consumption emission factor, measured in kg CO2e per kWh; e cr denotes energy consumption rate, measured in kWh per km. EVs do not produce any exhaust emission during transportation, however, energy is consumed during transportation and this needs to be accounted for in the emission function. The energy consumption rate e cr denotes the amount of energy used per unit distance. The energy consumption rate differs by EV manufacturer, EV model, driving patterns (speed and acceleration), weather variables, road type, trip distance and other factors [29]. Hence, an average energy consumption rate of 0.2 kWh/km distance driven has been assumed in this paper. It is assumed that EVs have been charged from the utility grid, therefore the energy consumption emission factor from [26] has been used in this paper.

Combined economic emission:
The CEE function aims to optimise the two objective functions. This problem can be formulated by including emission minimisation as an objective along with operational cost minimisation. The bi-objective optimisation problem is formulated as follows: where the carbon price cp is the amount that must be paid to emit 1 kg of CO2e. The conversion process is actualised using the carbon price and the effect of emissions can be related to the cost. The EU ETS stipulates the emission allowances and sets the carbon price [1]. To illustrate the proposed model, a carbon price of £ 0.5/kg CO2e is assumed in this paper.

Association problem formulation: The association between EVs and CL is an MINLP problem. It has a non-convex objective function and involves non-linear constraints with binary and continuous variables, i.e. A i j and v i j , respectively. Let A i j denote a binary variable that shows the association of EVs and CLs as
The objective is to associate optimum EVs with CLs such that the sum CEE cost is minimised. Such a problem can be formulated as Subject to The energy supplied by the EVs must satisfy CL demand and the system losses; however there is no loss of load being considered. This constraint can be written as (10a), where the total available energy from associated EVs v i j equals the CL demand V j . Constraint (10b) ensures that the requested energy from EV should not exceed the maximum energy limit v i j max . The total cost for resource allocation should be within a given budget of the distribution system. This constraint can be written as (10c), where C bud is the maximum budget for EV allocation in the system. Constraint (10d) is the emission allowance for the given system, which gives the emission limit E lim . The emission allowance satisfies the carbon cap, which is set on the total amount of GHG that can be emitted by installations covered by the EU ETS [1]. This means the sum of emissions cannot exceed the emission limit E lim . A limited number of discharging EVs can be connected to the system, considering the number of charging station. Then, constraint (10e) shows that jth CL can maintain a maximum number of discharging EVs as per charging station limit CS j . When EVs are associated with CL, power flow should be satisfied ensuring both active and reactive power are balanced. Variables such as discharging power of EVs should be within acceptable ranges. However, these constraints are not considered at the association stage.
Considering all the above constraints, for fixed positions of the EVs and CLs, we search for the best possible association between them.

Optimisation algorithm
The optimisation problem is an MINLP and we present here an efficient greedy solution that is designed to solve the CEE optimisation problem. The strategy here is to select the EVs with minimal CEE cost. The complete steps can be described as follows: Step 1: Compute the number of EVs and CL, and their distribution in a defined region. At this point, a snap shot of EVs and CL is obtained providing their positions (x i , x j ) and (y i , y j ), respectively. This is used to compute the transportation distance d i j of the EVs from the CL.
Step 2: The capacity of the EVs and the demand of the CL is also obtained, along with the cost budget, emission limit and charging station constraints.
Step 3: Four counters are initialised: maximum number of charging stations C CS , energy demand of CL C v , cost budget C Cb and emission limit C El . Out of the list of CL to EV links, the link that provides the minimum CEE, min (F i j ) is chosen. The algorithm then verifies the constraints of energy balance (10a), cost budget (10c), emission limit (10d) and number of charging stations (10e) such that C v + v i j ≥ V, C Cb + C i j ≤ C bud , C El + E i j ≤ E lim and C CS + 1 ≤ CS, respectively.
Step 4: If the CL-EV pair passes the verification stage, they are then associated to each other and all four counters are updated. The process is repeated until the list ends or the resources ends that can be tracked using the four counters. The steps are summarised in Algorithm 1 (see Fig. 2).
The next section presents the association of EVs with CL and the emission and cost benefit related numerical results for the EVaaS model, where EV is associated to CL during emergency response.

Numerical results and discussions
In this section, we present numerical results that validate the effectiveness of the proposed mechanism for optimum EV-CL association in microgrids. We evaluate and compare the performance of the proposed resource allocation scheme with traditional strategies [19,27]. We analyse the performances of the proposed EVaaS model with several DERs described as follows: • MEG: In this approach, a truck-mounted MEG is dispatched to the CL [30]. A heavy good vehicle (HGV) is used to transport the DG. The operating cost of MEGs includes the energy generation cost and the transportation cost. The MEG emission includes the energy consumption generated emission and the transportation emission from the HGV. The emission is determined by multiplying the activity (generation/ transportation) by the emission factors in [26]. • DG: In this approach, a stationary diesel-powered generator supplies energy to the CL. The difference between DG and MEG is the exclusion of the HGV used for transportation. This means the transportation cost and emission are excluded in this case study. • ESS: In this approach, energy is supplied to the CL from an ESS. The ESS is assumed to have charged from the electricity grid. Therefore, the emission is the same as that of the electricity grid.
For our simulation, we consider a microgrid where EVs and CL are BPP distributed in a square region of area A r = 16 km 2 . In our simulation, the number of EVs and CL are fixed and for each simulation setting, 100 scenarios are generated to average the results. The maximum distance D max of EV from CL is 4 km. We assume EVs are already charged at the time of association, thus random on-demand capacity between 15 and 28 kWh are allotted to EVs, while discharging efficiency between 0.90 and 0.95 are randomly assigned to EVs. The randomness of EV battery capacity and discharging efficiency replicates the real-world scenario where EVs have varied on-demand capacity and discharging efficiency, respectively. Unit energy cost between £0.07/kWh and £0.12/kWh and unit transportation cost between £0.8/km and £1.3/km are randomly assigned to EVs. Different energy demands are allocated to CL for different scenarios. Considering EV and CL data, with battery capacity, discharge efficiency and coordinates of EVs, energy demand and coordinates for CL and other parameters defined in Table 1, the parameters for CL to EV association are calculated. Finally, the necessary parameters are passed to the algorithms to find the best possible association between CL and EVs by minimising the CEE optimisation problem (10). Fig. 3 demonstrates one of the considered scenarios of distribution and association of EVs and CL. Figs. 3a-c show EVs associated with CL based on operational cost, emissions and CEE cost, respectively. Considering the variation of unit energy and unit transportation costs, a summation of energy and transportation costs will tend to focus the cost optimisation on the travel distance, since the unit energy cost is numerically smaller than the unit transportation cost. On the other hand, the emission is not strongly distant related, i.e. minimising travel distance is not equivalent to minimising the emission function. This is demonstrated in Fig. 3b, where the EVs with the least emission are not the same as the EVs with the shortest travel distance. The case study validates the capability of the proposed strategy and formulation to match EVs with CL, thus achieving better utilisation of EVs. Once optimal association of decision has been derived, EVs are then deployed to the assigned location to balance demand-supply mismatch.   Here, we compare the optimisation problem considering cost, emission and CEE functions. Overall all three give a good performance in comparison to other DERs considered in this study. Emission and cost functions give good performances for total emission and operational cost, respectively, while CEE optimisation gives a good trade off between the emissions and operational cost. The analysis will be covered in the last two figures. for a single value of CL demand and EV deployment scale, we have generated 100 different scenarios and then averaged the associated total emission and operational cost. Figs. 4a and b show the total emission and operational cost, respectively, for different CL demands. Optimising the emission function would typically give a better performance for total emission as seen in Fig. 4a. However, the CEE optimisation produces a good trade off. At all CL demand, the CEE optimisation produces a better performance than cost function optimisation. At CL demand of 40 and 100 kWh, the CEE optimisation produces a 5% improvement, while at CL demand of 70 kWh, it produces a 6% improvement. At every other CL demand, the CEE optimisation produces at least 3% improvement. In Fig. 4b, the CEE optimisation produces the best results compared to the cost and emission functions. At CL demand of 70 kWh, the CEE optimisation produces a 3 and 6% improvement compared to the cost and emission functions. Similarly, at CL demand of 100 kWh, the CEE optimisation produces a 3 and 5% improvement. While at every other CL demand, the CEE optimisation produces at least 2 and 4% improvement compared to the cost and emission functions, respectively. As expected, it can be seen that the total cost considering CEE optimisation is the cheapest, while the most expensive is the optimisation with emission function.
In Fig. 5, we investigate the impact of the EV deployment scale. Figs. 5a and b show the total emission and operational cost of associated EVs versus EV deployment scale. The low deployment scale represents rural areas with less EVs, while the high deployment scale represents their urban counterparts with much more EVs. As the deployment scale increases, the total emission and operational cost decreases, as seen in Figs. 5a and b, respectively. This demonstrates that EVaaS system will be cheaper in urban areas, since more EVs are distributed closer to the CL. At all EV deployment scales, CEE optimisation produces the best performance. Fig. 6 shows the variation of 100 scenarios. It is to be noted that 100 scenarios are generated for each simulation setting (e.g. CL demand). At CL demand of 70 kWh, the mean and standard deviation of the emission data are 25.5 and 2.6, respectively. While the mean and standard deviation of the operational cost data are 23.1 and 2.47, respectively. Figs. 6a and b were derived using a computational sampling approach to illustrate the normality in the distribution of the data from which we obtain our scenarios. The data are approximately normally distributed as depicted by the bell curve. This follows the central limit theorem which establishes that the distribution of a sample mean will approach a normal distribution providing the sample size sufficiently large. The normality in the distribution demonstrates the validity of the data.
In Fig. 7, we compare the performance of our proposed optimisation strategy based on a greedy algorithm (GA) with traditional strategies, considering knapsack algorithm (KPA) in [27] and FCFS scheme upon communication failure [19]. Figs. 6a and b show the total emission and operational cost for fulfilling different CL demands. In the FCFS scheme, the CL sorts geographic distances of EVs in an non-descending order, and selects EVs with shortest distance. While in KPA, the MGCC sorts costs in an ascending order and minimises the operating cost of fulfilling the CL demand. About 100 different scenarios were considered with respect to various CL demands, and for each scenario, the total emission and operational cost of associated EVs, and other parameters are used to compute the optimum association. The numerical results in Fig. 7 show that GA outperforms the FCFS scheme and KPA. In Fig. 7a, the GA produces 6 and 12% reduction in emissions for a CL demand of 40 kWh compared to KPA and FCFS scheme, respectively. Similarly, at CL demand of 60 kWh, the GA produces a 5 and 9% improvement compared to KPA and FCFS scheme, respectively. While at every other CL demand, the GA produces at least 2 and 4% improvement. In Fig. 7b, between CL demand of 40 and 80 kWh, the GA produces at least 7 and 16% improvement compared to KPA and FCFS scheme, respectively. While at every other CL demand, the GA reduces operational costs by at least 2% for KPA and 5% for FCFS scheme. Overall, we can observe that our proposed optimisation strategy achieves better capacity utilisation and significantly decreases emission and operational costs. Fig. 8 shows the energy and transportation costs for fulfilling CL demand using different resources and variety of tariffs that could impact the cost. At this stage, our analysis has variable tariffs for EV (mixed) and different fixed tariffs for the other resources. Figs. 8a-c show the energy and transportation costs for meeting low, medium and high CL demand, respectively, using DG, ESS, MEG, EV (mixed) and EV (eco). The DG and MEG costs are the amount it will cost to be supplied from a stationary and truck mounted DG at different CL demands, respectively. The ESS cost is the amount to be supplied from an ESS at the different CL demands. Fixed energy costs are assumed for utilising the DG and ESS. Two types of EV resources are considered, the EV (eco) is for EVs assumed to have been charged with renewable energy, while the EV (mixed) is for EVs assumed to have charged from the grid. Different scenarios are considered and for each scenario, the variable energy and transportation tariffs of associated EVs and other parameters in Table 1 are used to compute the operational cost. The transportation cost increases with increase in CL energy demand, which can be seen in Figs. 8b and c; this is because of the increase in number of associated EVs as seen in Fig. 4. To cut down on the transportation cost, electric vans and buses (e.g. Tesla van with capacity of 90 kWh) can be considered. However, our optimisation model and analysis covers only passenger EVs. Fixed energy and transportation costs are assumed for the deployment of MEG using heavy goods vehicle. Table 1 presents parameters used to compute operational cost. Although the rental cost for the HGV used to transport the DG has been excluded, the operating cost for deployment of MEG is still relatively high especially for low and   During contingencies, CL may be able to reach a feeder via undamaged tie lines. However, they cannot be fully restored due to operational constraints such as line flow limits. Therefore, EVs can play a key role in responding to contingencies. Fig. 9 shows the emissions for fulfilling CL demand using different resources and computed using their respective emission factors. The emission function (7) and other parameters in Table 1 are used to compute the emissions for EV (eco) and EV (mixed). The emission factors in [26] and other parameters in Table 1 are used to compute the emissions for the other resources using (5). EV (eco) is for EVs assumed to have charged from RESs such as wind turbines and solar photovoltaic systems, while EV (mixed) is for EVs assumed to have been charged from the electricity grid (energy mix). The carbon emissions from EVs charged directly from the electricity grid appear to be more than that of the other resources. This is because EVs charged from the electricity grid in countries that fossil fuel dominates their energy mix will have higher carbon footprint compared to EVs charged in countries that generate electricity from predominately renewable energy as seen in Fig. 9. Furthermore, the carbon footprint of these EVs will exceed that of diesel/petrol vehicles and traditional DERs. Unlike conventional vehicles, EVs do not produce any exhaust emission and powering CL with EVs charged from predominantly renewable energy reduces emissions remarkably as seen in Fig. 9. Also, the power quality from RESs can be significantly improved by using EVs as storage and filter devices. Thus, the combination of EVs and RESs makes the microgrid greener and improves stability, reliability and resilience. The GHG emissions from EVs are small compared with other DERs, and thus do not impede the transition towards climate friendly back-up power supply.

Conclusion
This paper proposed a CEE resource allocation framework for selecting dispersed EVs to fulfil CL demand. The EVaaS system is modelled considering EV battery degradation cost and the feasibility of the system is discussed. The CEE optimisation problem is formulated considering energy demand, cost budget, emission limit and charging station limit constraints. Illustrative cases demonstrate the effectiveness and greenness of EVaaS and by charging from predominantly renewable sources, EVs diminishes environmental pollution significantly. Compared to traditional DERs, EVaaS is cost effective for short-term demand and supply balancing in the microgrids and can be better utilised for resilient emergency response. The operation strategy for CL demand fulfilment with EVs could be model as a two-stage framework, comprising association and dispatch stages. This study only considered the association stage. In future research, the two stages will be resolved sequentially. Once the association has been determined, EVs can be scheduled to discharge energy following a dispatch strategy. Additionally, the system can be modelled in such a way that EV owners will receive incentives for participating in EVaaS.