Microgrid Dispatch Optimization with Electric Vehicle Integration

In my research, I have investigated the optimization of microgrid dispatching where electric cars are integrated as flexible and distributed resources. The increasing penetration of renewable energy sources along with the volatile charging behaviours of electric cars has presented serious challenges to the stable and economic operation of microgrids. In my work, I have systematically addressed these issues by building a multi-objective optimization framework that considers energy storage degradation, microgrid operating economics, and the cost benefits of electric car users. My proposed methodology involves detailed mathematical models, an advanced metaheuristic optimization algorithm, and a dynamic electricity pricing strategy. I have validated the effectiveness of the proposed strategy through extensive deterministic and uncertain simulations. In this article, I will present the architecture of the microgrid, the modelling approaches for generation units, the battery degradation model, the adaptive particle swarm algorithm, the charging load modelling of electric cars, and the simulation results under various operating scenarios. My research outcomes demonstrate that coordinated charging and discharging of electric cars can significantly reduce the operating costs of microgrids while improving the operational lifetime of energy storage systems and stabilising the load profile.

1. Introduction to the Microgrid Optimization Problem

The global transition toward clean energy has accelerated the development of microgrids that integrate renewable generation, energy storage, and electric car charging infrastructure. A microgrid can be viewed as a controllable small-scale power system that is able to run in both grid-connected and islanded modes. The main components in the microgrid I have studied include photovoltaic (PV) generation, wind turbines, microturbines, battery energy storage systems (BESS), controllable loads, and electric cars that can operate as both loads and distributed energy sources.

Traditional dispatch methods often treat the energy storage system as a simple buffer that can be charged and discharged freely without considering the long-term economic impact of battery degradation. However, in real applications, cycling of battery energy storage systems accelerates capacity fading and shortens service life. I have therefore introduced a battery health model into the scheduling optimisation problem. At the same time, the plug-in behaviour of electric cars introduces significant uncertainties in both time and space. If electric cars are charged in an uncoordinated manner, the peak load during the evening hours may be substantially increased. My goal in this research has been to coordinate the charging and discharging plans of electric cars and distributed generation units in such a way that the operating cost, the battery degradation cost, and the users’ charging cost are jointly optimised.

In this study, I formulate the optimisation problem as a mixed-variable, nonlinear unit commitment and economic dispatch problem. The binary variables are related to the on/off states of the dispatchable units and the charging/discharging status of storage; the continuous variables represent the active power outputs of the generators and the charging/discharging power of battery systems; and the integer variables include the number of electric cars involved in coordinated charging and V2G services.

2. Mathematical Model of the Microgrid System

2.1 Structure of the Microgrid

The microgrid architecture that I have adopted includes distributed renewable generators, a storage battery, a microturbine set, and the connection between electric cars and the grid through chargers. The renewable generation units produce power according to weather conditions, while the microturbines are dispatchable. The storage battery can balance the power mismatch between generation and load. When electric cars are parked at charging stations or at home, they may be controlled to participate in demand-side management through a V2G scheme.

The layout of the microgrid I studied is composed of the following subsystems: renewable generation subsystem, energy storage subsystem, household and commercial loads, and the electric car aggregation system. The communication between the microgrid control centre and the electric car chargers allows bidirectional power flow, which provides additional flexibility for economic dispatch. In my model, the scheduling horizon is set to one day with an interval of one hour.

2.2 Photovoltaic Generation Model

The output power of a PV panel depends on both solar irradiance and cell temperature. I have modelled the PV power in the following way:

$$P_{PV}^{t} = P_{PV,\max}^{t} \cdot \frac{W_{now}}{W_{\max}}\left[ 1 + \tau\left( T_{ture} – T_{stc} \right) \right]$$

where \(P_{PV}^{t}\) denotes the output power of the PV array in period \(t\); \(P_{PV,\max}^{t}\) is the maximum allowable power output of the PV system at time \(t\); \(W_{now}\) is the current solar irradiance and \(W_{\max}\) is the maximum irradiance; \(T_{ture}\) and \(T_{stc}\) are respectively the actual ambient temperature and the temperature under standard test conditions; and \(\tau\) is the temperature coefficient, usually between −0.2% and −0.5% per degree Celsius.

2.3 Wind Turbine Model

Wind turbine power output is highly dependent on wind speed. I can express the output characteristics of the wind turbine as follows:

$$P_{WT} = \eta_{WT} \cdot P_{WT}^{t}, \quad \text{for} \quad v_{cis} \le v \le v_{cos}$$

$$P_{WT} = 0, \quad \text{for} \quad v < v_{cis} \; \text{or} \; v > v_{cos}$$

where \(v_{cis}\), \(v_{cos}\) and \(v\) are the cut-in wind speed, cut-out wind speed, and actual wind speed respectively; \(\eta_{WT}\) is the turbine output efficiency in a typical day; and \(P_{WT}^{t}\) denotes the rated power of the wind turbine.

In the model above, the wind turbine governor maintains the power output as a constant when the wind speed exceeds the rated value but is still below the cut-out speed.

2.4 Microturbine Model

The microturbine is an important controllable generation unit in the microgrid. Its fuel cost is expressed as:

$$C_{MT}^{t} = \frac{C_{ng}}{LHV \cdot \eta_{MT}} \sum_{t=1}^{T} \Delta t \, P_{MT}^{t}$$

where \(C_{ng}\) is the natural gas price; \(LHV\) is the lower heating value of natural gas; \(\eta_{MT}\) is the generation efficiency of the microturbine; and \(P_{MT}^{t}\) represents the net power output of the microturbine at time \(t\).

The dispatchable generators in my model have their own min and max power limits, ramp-up and ramp-down limits, and minimum up and down time limits. These constraints are introduced formally in Section 5.2.

2.5 Energy Storage System Model

The state of charge (SOC) of the battery at time step \(t+1\) is related to the SOC at time \(t\) and the charging/discharging power:

$$SOC(t+1) = SOC(t) + \frac{\sigma_{sd}\cdot \delta \cdot P_{BESS}(t)\Delta t}{E_{rate}}$$

Here \(E_{rate}\) is the rated capacity of the storage battery; \(\sigma_{sd}\) is the self-discharge coefficient; \(\delta\) is the charging/discharging status variable with \(\delta = 1\) indicating charging, \(\delta = -1\) indicating discharging, and \(\delta = 0\) indicating idle; \(P_{BESS}(t)\) is the charging or discharging power.

2.6 Electric Car Model

In my investigation, I classify electric cars into three categories based on user responsiveness. Category A represents the electric car users who do not participate in any coordinated control and prefer to charge immediately when they arrive home. Category B represents those who allow charging power to be moved from peak hours to valley hours. Category C users are fully responsive and allow both charging and discharging operations, enabling V2G services.

The state of charge of the electric car battery is represented by \(SOC^{EV}\). The limits on SOC are written as:

$$SOC_{min}^{EV} \le SOC_{t}^{EV} \le SOC_{max}^{EV}$$

where \(SOC_{min}^{EV} = 0.4\) and \(SOC_{max}^{EV} = 0.8\). At the time when the car owner leaves home in the morning, the SOC should be at least 0.6 to satisfy the daily driving demand.

The charging power of each electric car is bounded by:

$$-P_{dis}^{EV,\max} \le P_{t}^{EV} \le P_{ch}^{EV,\max}$$

and the charging and discharging states must be mutually exclusive:

$$X_{i,t}^{EV} \cdot Y_{i,t}^{EV} = 0$$

where \(X_{i,t}^{EV}\) and \(Y_{i,t}^{EV}\) are the binary charging and discharging status indicators of the \(i\)-th electric car at time \(t\).

3. Battery Remaining Useful Life Prediction Model

3.1 Why Battery Degradation Matters in Microgrid Scheduling

In the conventional microgrid economic dispatch model, the energy storage battery is sometimes regarded as cost-free apart from its operation and maintenance cost. In reality, frequent and deep charging/discharging cycles contribute to capacity degradation and shorten the remaining useful life of the battery. This is especially important in microgrids with a high penetration of electric cars because the cars add more uncertainty to the power balance and therefore the energy storage system is more often called upon to compensate for the power mismatch. If the battery is over-used to gain short-term economic benefit, the eventual cost of early replacement may offset the profit.

I have addressed this problem by proposing a battery degradation model that predicts the remaining useful life of the battery while considering its historical usage. The model is then incorporated into the objective function of the microgrid scheduling optimisation, allowing the optimisation algorithm to balance immediate operating cost and battery life consumption.

3.2 Gaussian Process Regression for Battery State of Health

I apply a Gaussian Process Regression (GPR) model to predict the future capacity degradation trend of the battery. In GPR, the unknown function \(f(\mathbf{x})\) is assumed to follow a Gaussian process:

$$f(\mathbf{x}) \sim \mathcal{GP}\left( \mu(\mathbf{x}), \; k(\mathbf{x}, \mathbf{x}’) \right)$$

The mean function \(\mu(\mathbf{x})\) captures the average trend of the process, and the covariance function \(k(\mathbf{x}, \mathbf{x}’)\) defines the relationship between two different input points.

The prediction accuracy of GPR strongly depends on the selected covariance function, sometimes called the kernel function. I have compared many standard kernels, including RBF, polynomial, rational quadratic, Laplacian, and Matérn kernels. To improve prediction accuracy and overcome the limitations of a manually chosen single kernel, I have developed a hybrid self-optimising kernel selection mechanism.

3.3 Hybrid Self-Optimising Kernel Construction

The kernel function construction is based on the iterative search over a candidate kernel library. I combine base kernels with addition and multiplication operations because both operations preserve the positive-definite property of kernels. The Bayesian Information Criterion is used to evaluate each candidate kernel:

$$BIC = -2\ln(L) + k\ln(n)$$

where \(L\) is the likelihood function of the model, \(k\) is the total number of parameters, and \(n\) is the number of samples.

In each iteration, I evaluate a new kernel candidate set by combining the previously selected optimal kernel with the base kernels. I have named this model the Hybrid Self-optimising Kernel GPR (HSK-GPR). Once the best kernel is obtained, the model can predict the remaining capacity of the battery cell over future cycles.

3.4 Verification of the Prediction Model

To evaluate the prediction accuracy, I used the Oxford battery degradation dataset. Three cells with different degradation patterns were selected for the experiments. The performance is measured using the mean absolute error (MAE) and mean square error (MSE) metrics:

$$MAE = \frac{1}{n}\sum_{i=1}^{n} |y_i – \hat{y}_i|$$

$$MSE = \frac{1}{n}\sum_{i=1}^{n} (y_i – \hat{y}_i)^2$$

I compared the standard single-kernel GPR models with the proposed HSK-GPR model. The optimal kernel combinations obtained by the HSK-GPR model for the three cells are presented in the table below.

Optimal Kernel Combinations and Prediction Errors of HSK-GPR
Cell Best Kernel Combination MAE MSE
Cell 1 (RBF + Quadratic) × Poly + Matérn 0.005545 0.0001
Cell 7 Poly × Quadratic 0.005700 0.0001
Cell 8 Laplacian + Quadratic 0.006300 0.0001

When the best single-kernel GPR models were tested on Cell 1, Cell 7, and Cell 8, the prediction errors were significantly larger. For example, the MAE of the best single-kernel model for Cell 1 was about 0.2360, while the HSK-GPR model achieved 0.005545. For the three test cells, the MAE was improved by 97.65%, 97.42% and 94.07% respectively when using the HSK-GPR model.

Performance Comparison of Single-Kernel GPR Models
Cell Best Single Kernel MAE MSE
Cell 1 Matérn 0.2360 0.0011
Cell 7 Polynomial 0.2207 0.0008
Cell 8 Polynomial 0.1063 0.0002

The improved prediction accuracy provides a more reliable basis for estimating the remaining useful life of the battery in my scheduling framework. Rather than using an oversimplified linear degradation model, the HSK-GPR model can better capture the nonlinear ageing behaviour caused by different cycles and operating conditions.

4. Adaptive Mixed-Variable Particle Swarm Optimisation

4.1 Basic Particle Swarm Optimisation

The unit commitment and economic dispatch problem of a microgrid with distributed generators, storage, and electric cars is a complicated high-dimensional optimisation problem. Particle swarm optimisation (PSO) has been widely used in similar applications because it can handle nonlinear dispatch models without requiring gradient information. In PSO, each particle represents a candidate solution and moves through the search space by following its personal best position and the global best position:

$$v_{ij}^{k+1} = \omega v_{ij}^{k} + c_{1} r_{1}\left( P_{ij}^{k} – x_{ij}^{k} \right) + c_{2} r_{2}\left( P_{gb}^{k} – x_{ij}^{k} \right)$$

$$x_{ij}^{k+1} = x_{ij}^{k} + v_{ij}^{k+1}$$

where \(i\) is the particle index, \(j\) is the dimension index, \(k\) is the iteration number, \(\omega\) is the inertia weight, \(c_{1}\) and \(c_{2}\) are the cognitive and social acceleration coefficients, and \(r_{1}\) and \(r_{2}\) are random numbers uniformly distributed in \([0,1]\).

4.2 Chaotic Initialisation and Dynamic Parameter Adaptation

The conventional PSO has two main drawbacks when used for microgrid scheduling: it may converge prematurely when the particles are not well distributed, and it may not strike a good balance between exploration and exploitation. In my proposed AMPSO algorithm, these shortcomings are overcome by the following improvements.

First, I replace random initialisation with Logistic chaotic mapping:

$$x_{i+1} = \mu x_{i}(1 – x_{i}), \qquad \mu \in [3.57, 4]$$

The chaotic sequence is able to generate a more uniformly distributed initial population in the search space, which lowers the risk of premature convergence.

Second, the inertia weight is adapted over the course of the iterative process. In the early iterations, the inertia weight is kept relatively large to encourage global exploration; in the later iterations, it is gradually reduced so that the swarm can refine the solution.

$$\omega(t) = (\omega_{\max} – \omega_{\min}) \cdot \exp\left( -\frac{d_{1}t}{T + d_{2}} \right) + \omega_{\min}$$

where the constants satisfy \(d_{1}=0.2\) and \(d_{2}=7\), \(\omega_{\max}=0.95\) and \(\omega_{\min}=0.4\).

Third, the cognitive and social learning factors are time-varying. The cognitive factor \(c_{1}\) is initially large to promote independent exploration, and the social factor \(c_{2}\) is initially small so that the swarm is not excessively attracted to the current global best:

$$c_{1}(t) = c_{\min} + (c_{\max} – c_{\min})\exp\left( -\left( \frac{2t}{T} \right)^{2} \right)$$

$$c_{2}(t) = c_{\max} – (c_{\max} – c_{\min})\exp\left( -\left( \frac{2t}{T} \right)^{2} \right)$$

4.3 Handling of Binary and Integer Variables

The scheduling problem that I am dealing with includes not only continuous variables but also binary and integer variables. For example, the on/off state of a microturbine is a binary variable; the charging and discharging state of both the fixed energy storage system and the electric cars are also binary.

For the binary variables I have studied the use of transfer functions, which translate a continuous velocity value into the probability of changing the current binary position. In this work, I compared S-shaped, V-shaped, and Q-shaped transfer functions. The table below lists the most commonly used transfer functions of each type.

Transfer Functions Used in the Binary PSO
Type Transfer Function Expression
S1 \(S_{1}(x)= \frac{1}{1+e^{-x}}\)
S2 \(S_{2}(x)= \frac{1}{1+e^{-x/2}}\)
V1 \(V_{1}(x)= \tanh(x)\)
V2 \(V_{2}(x)= \frac{x}{\sqrt{1+x^{2}}}\)
V3 \(V_{3}(x)= \frac{2}{\sqrt{\pi}}\int_{0}^{x/2}e^{-t^{2}}dt\)
V4 \(V_{4}(x)= \frac{2}{\pi}\arctan\left( \frac{\pi}{2}x \right)\)
Q1 \(Q_{1}(x)= 0.5 + 0.5\frac{x}{1+|x|}\)
Q2 \(Q_{2}(x)= 0.5 + 0.5\frac{x^{3}}{1+|x|^{3}}\)

The position update for binary variables using an S-shaped transfer function is:

$$
x_{i}^{k+1} =
\begin{cases}
0 & \text{if } rand < S(v_{i}^{k+1}) \\
1 & \text{otherwise}
\end{cases}
$$

For the V-shaped and Q-shaped transfer functions, I instead use:

$$
x_{i}^{k+1} =
\begin{cases}
\tilde{x}_{i}^{k} & \text{if } rand < T(v_{i}^{k+1}) \\
x_{i}^{k} & \text{otherwise}
\end{cases}
$$

where \(\tilde{x}_{i}^{k}\) represents the complement of \(x_{i}^{k}\).

4.4 Scheduling Cost Objective

The original microgrid operating cost ignores the degradation of the energy storage. In my method, I aim to minimise both the microgrid operating cost and the consumption of battery life. A weighted sum method is used after normalising both objectives:

$$F = \omega_{1} \cdot \bar{F}_{op} + \omega_{2} \cdot (1 – \bar{F}_{RUL})$$

where \(\bar{F}_{op}\) is the normalised microgrid operating cost, \(\bar{F}_{RUL}\) is the normalised remaining useful life of the battery, and \(\omega_{1}=0.8\), \(\omega_{2}=0.2\) are the weights selected in my study.

5. Microgrid Economic Dispatch Model with Battery Ageing

5.1 Parameters of the Test Microgrid

I used a representative microgrid with six dispatchable units, renewable generation, and a battery energy storage system. The fundamental parameters of the dispatchable units are summarised below.

Parameters of the Dispatchable Units
Unit Pmax (MW) Pmin (MW) Ramp (MW/h) Min Up/Down (h) Cold Start ($) Hot Start ($) a ($) b ($/MWh) c ($/MW^2h)
1 455 150 130 8/8 100 50 100 16.19 0.00048
2 130 20 60 5/5 80 40 70 17.26 0.002
3 162 25 90 6/6 80 40 45 19.70 0.0039
4 85 25 40 3/3 30 10 37 27.74 0.00079
5 80 20 40 3/3 30 10 48 22.26 0.00712
6 55 10 40 1/1 20 5 66 25.92 0.0022

The energy storage battery specifications are also essential in the simulation. The parameters are shown below.

Energy Storage Specifications
Initial SOC 0.7
SOC lower/upper limit [0.2, 0.9]
Maximum storage capacity 10 MW
Charging efficiency 0.95
Discharging efficiency 0.90
Charging/discharging power 1.5 MW

5.2 Constraints for the Dispatch Model

The scheduling optimisation is subject to the following principal constraints.

Power balance:

$$\sum_{i=1}^{N} P_{g,i}(t) + \sum_{r=1}^{N_r} P_{r}(t) + \delta P_{BESS}(t) = P_{load}(t)$$

where \(P_{g,i}(t)\) is the power output of the \(i\)-th conventional generator, \(P_{r}(t)\) is the renewable power, \(P_{BESS}(t)\) is the battery power, and \(P_{load}(t)\) is the total load demand.

Unit generation limits:

$$P_{i}^{\min} \le P_{g,i}(t) \le P_{i}^{\max}$$

Ramp rate limits:

$$P_{g,i}(t) – P_{g,i}(t-1) \le R_{u,i}$$

$$P_{g,i}(t-1) – P_{g,i}(t) \le R_{d,i}$$

Minimum up and down time constraints are expressed as:

$$
\begin{cases}
\left( u_{i,t-1} – u_{i,t} \right) \left( T_{i,t-1}^{on} – T_{i,min}^{on} \right) \ge 0 \\
\left( u_{i,t} – u_{i,t-1} \right) \left( T_{i,t-1}^{off} – T_{i,min}^{off} \right) \ge 0
\end{cases}
$$

The power exchange between the microgrid and the utility has a maximum allowed value on the tie-line:

$$P_{Line}^{\min} \le P_{Line}(t) \le P_{Line}^{\max}$$

5.3 Deterministic Results Excluding Battery Ageing

In the first stage of my simulation, I solved the scheduling problem without including the battery life consumption cost. I performed thirty independent runs for each of the eight transfer functions. The statistics of the operating costs are reported in the following table.

Operating Cost Results for Different Transfer Functions
Type Optimal ($) Worst ($) Average ($)
S1 239,774.2 253,446.7 246,010.5
S2 239,774.2 241,710.3 242,278.6
V1 121,714.5 142,213.6 123,959.7
V2 114,699.2 130,163.8 116,714.2
V3 195,109.4 212,583.7 208,595.7
V4 107,191.1 137,220.6 125,073.1
Q1 82,839.2 125,700.0 92,621.3
Q2 116,492.1 176,992.1 125,700.2

The Q-type transfer functions yielded the lowest average operating cost. In particular, Q1 achieved an average cost of 92,621.3 dollars, which is around 62.35% lower than the cost obtained by the S1 transfer function. These results show the importance of selecting an appropriate binary transfer function in the microgrid dispatch problem with mixed variables.

Without considering battery ageing, the scheduling algorithm often causes the battery to cycle aggressively between charging and discharging. During low price hours, the battery is fully charged; during high price hours, it is rapidly discharged. This results in an SOC curve with high fluctuation. In the long run, the fluctuating SOC accelerates the battery capacity fade and reduces the economic benefit of the storage system.

5.4 Deterministic Results Including Battery Ageing

I also solved the deterministic scheduling problem after embedding the HSK-GPR-based battery degradation model into the objective function. The optimisation is required to charge or discharge the battery only when the arbitrage revenue is sufficiently large compared with the associated battery degradation cost. In this case, the SOC variation became much smoother than before.

Comparative Results with and without Battery Ageing Consideration
Scenarios Best Operating Cost ($) Battery Remaining Capacity
Without ageing, deterministic 92,621.3 Low SOC fluctuation
With ageing, deterministic 102,435.0 81.9%
With ageing, uncertain 228,406.0 82.34%

The results indicate that considering battery ageing slightly increases the short-term operating cost because the battery is not allowed to be used as aggressively as before. However, the battery operation is much flatter, with lower depth of discharge, and the expected remaining capacity remains high after the daily schedule. Therefore, the long-term economy is improved.

5.5 Results under Uncertainty

To evaluate the robustness of the proposed dispatch method, I also introduced uncertainties into the model. The load forecast error was set to 5%, and the wind and solar forecast errors were set to 3%. In the uncertain scenario, the total operating cost increases because additional generation from the dispatchable units is required to satisfy the possible load increase.

When using the S1 transfer function, the operating cost reached 250,274 dollars, while with the Q2 transfer function the minimum cost was 228,406 dollars. The cost saving was approximately 8.74%, which confirms that the AMPSO algorithm is effective and robust even under uncertain generation and load conditions.

6. Economic Scheduling Model with Electric Cars

6.1 Modelling of Driving and Charging Randomness

The charging demand of electric cars strongly depends on the daily driving distance, the departure time from home in the morning, and the arrival time in the evening. In my model, I have assumed that the daily driving distance follows a log-normal distribution:

$$f_{S}(x) = \frac{1}{x\sigma_{s}\sqrt{2\pi}} \exp\left[ -\frac{(\ln x – \mu_{s})^2}{2\sigma_{s}^2} \right]$$

with \(\mu_{s} = 3.2\) and \(\sigma_{s} = 0.88\). The departure and arrival times are modelled as normal distributions:

$$t_{1} \sim \mathcal{N}(7.62, \; 2.14^2)$$

$$t_{2} \sim \mathcal{N}(18.5, \; 1.25^2)$$

The initial SOC of an electric car before the first trip follows a truncated normal distribution:

$$SOC_{init} \sim \mathcal{N}(0.6, \; 0.1^2)$$

6.2 Monte Carlo Load Calculation for Uncoordinated Charging

For the uncoordinated charging scenario, I used the Monte Carlo method to simulate the behaviour of each individual electric car. The daily energy requirement of an electric car is:

$$W_{EV} = S \cdot w$$

where \(w\) is the energy consumption per kilometre. The charging duration is obtained from:

$$T_{c}^{EV} = \frac{W_{EV}}{P_{c}^{EV} \cdot \eta_{c}^{EV}}$$

The total charging load is the sum of the loads of all individual electric cars:

$$P_{EV}(t) = \sum_{i=1}^{n} P_{EV,i}(t)$$

I have simulated 200, 400, and 600 electric cars. The table below summarises the capacity distribution of the car batteries used in my Monte Carlo simulation.

Battery Capacity and Energy Consumption Distribution of Electric Cars
Capacity Range (kWh) Probability Energy Consumption (kWh/km)
[15, 30) 0.155 0.1141
[30, 45) 0.241 0.1273
[45, 60) 0.380 0.1321
[60, 75) 0.121 0.1470
[75, 90] 0.103 0.1649

In the uncoordinated charging case, the charging demand is mainly concentrated between 18:00 and 22:00, with the highest peak at around 20:00. The reason is that most car owners plug in their electric cars for charging immediately after returning home from work. This behaviour results in a remarkable increase in the evening peak load and leads to larger peak-to-valley differences.

6.3 Dynamic Electricity Price Strategy

To encourage the coordinated charging and discharging of electric cars, I have designed a dynamic price mechanism that depends on the net load. The net load is defined as the base load minus the renewable generation:

$$P_{N}(t) = P_{Load}(t) – P_{PV}(t) – P_{WT}(t)$$

If the net load is below or equal to zero, surplus renewable energy is available, and the electricity price is set to a low valley price \(C_{v}\). If the net load is positive, the price is adjusted according to the level of the net load:

$$
C_{t}^{EV} =
\begin{cases}
C_{v}, & P_{N}(t) \le 0 \\
C_{n} + (C_{p} – C_{n})\mu_{t}, & P_{N}(t) > 0
\end{cases}
$$

where \(C_{v}\), \(C_{n}\), and \(C_{p}\) are the valley, normal, and peak prices respectively; \(\mu_{t}\) is the dynamic adjustment coefficient determined by the magnitude of the net load and the generation cost of the microgrid. When the renewable energy is high and the load demand is low, the price signal guides electric cars to charge. Conversely, during the high net load period, the price is raised, which may stimulate those electric cars with sufficient SOC to discharge back to the grid through V2G.

6.4 User Classification and Coordinated Charging Strategy

In my simulation, I have divided electric car users into three groups:

The first group, denoted as A, consists of users who behave completely independently and charge their vehicles immediately when plugged in. This group represents about 5.3% of the total users in my model.

The second group, denoted as B, represents approximately 21.9% of the users. These users are willing to shift their charging periods to low-price hours but do not accept discharging control.

The third group, denoted as C, accounts for about 72.8% of the users. They accept full charging and discharging control and are able to participate in V2G.

Using the Monte Carlo method, I constructed 24-hour charging and discharging profiles for each group. In the coordinated case, the charging demands of group B and group C are shifted into the night valley hours or the hours of high renewable penetration, while group C may discharge energy during the evening peak hours.

6.5 Multi-Objective Optimisation Model with Electric Cars

In addition to the microgrid operating cost and battery degradation, I have incorporated the electricity cost to the electric car users into the objective function. My overall objective function for the microgrid with electric cars is therefore:

$$F^{EV} = \omega_{1} \frac{F_{op}^{EV}}{F_{op,base}^{EV}} + \omega_{2} \left( 1 – \frac{F_{RUL}}{F_{RUL,base}} \right)$$

where \(F_{op}^{EV}\) includes the user cost of electric cars:

$$C_{EV} = C_{buy} – C_{sell} – C_{compensation}$$

Here \(C_{buy}\) is the money paid by users for charging, \(C_{sell}\) is the revenue that users receive from discharging electric cars to the grid, and \(C_{compensation}\) is the incentive provided by the microgrid operator to encourage V2G participation.

7. Simulation and Analysis of Electric Car Integration

7.1 Performance of Coordinated Scheduling

I evaluated the effectiveness of the dynamic pricing strategy under three electric car penetration levels: 200, 400, and 600 electric cars. The microgrid operates under the deterministic day-ahead scheduling framework with the same unit model and constraints as described earlier.

The following table shows the performance metrics obtained with the S-type, V-type, and Q-type transfer functions in the coordinated charging mode.

Coordinated Scheduling Performance at Different EV Penetration Levels
Type Number of EVs EV User Cost ($) MG Operating Cost ($) BESS RUL
S1 200 -822.57 226,499 82.47%
S1 400 -2022.24 220,517 82.50%
S1 600 -2839.31 220,479 82.51%
V1 200 -822.57 206,510 82.51%
V1 400 -2022.24 197,536 82.51%
V1 600 -2839.31 193,832 82.51%
Q1 200 -822.57 209,488 82.47%
Q1 400 -2022.24 201,548 82.51%
Q1 600 -2839.31 198,274 82.51%
Q2 200 -822.57 209,335 82.51%
Q2 400 -2022.24 198,750 82.51%
Q2 600 -2839.31 182,683 82.51%

The negative user cost implies that users earn money from participating in V2G services. When the number of electric cars increases from 200 to 600, the total user benefit increases by 245.2%. This finding proves that the dynamic price mechanism can effectively reward responsive electric car users. The coordinated charging of electric cars also reduces the operating cost of the microgrid relative to the uncoordinated charging scenario.

7.2 Optimal Unit Commitment Results

For the case of 400 electric cars integrated into the microgrid, I have obtained the hourly optimal generation schedules of the six dispatchable units under different transfer functions. The table below gives a representative hourly schedule produced under the Q2 transfer function.

Optimal Unit Commitment under Q2 Transfer Function with 400 Electric Cars
Hour DG1 (MW) DG2 (MW) DG3 (MW) DG4 (MW) DG5 (MW) DG6 (MW)
00-01 0.0 0.0 0.0 0.0 0.0 22.2
01-02 0.0 0.0 0.0 0.0 0.0 0.0
02-03 0.0 0.0 0.0 0.0 0.0 0.0
03-04 0.0 0.0 0.0 0.0 0.0 0.0
04-05 0.0 0.0 0.0 0.0 0.0 0.0
05-06 0.0 0.0 0.0 0.0 0.0 0.0
06-07 0.0 0.0 0.0 0.0 0.0 0.0
07-08 123.2 0.0 0.0 0.0 0.0 0.0
08-09 249.9 93.0 139.8 57.5 79.4 25.6
09-10 372.4 112.9 161.5 75.9 73.7 32.5
10-11 431.6 110.5 146.9 83.3 64.8 27.9
11-12 331.9 68.1 99.9 84.3 32.7 17.7
12-13 323.2 127.7 36.2 52.9 70.1 34.7
13-14 351.3 75.2 49.7 60.4 77.9 16.0
14-15 290.9 129.1 29.5 32.6 46.4 54.2
15-16 170.5 77.5 48.9 70.1 64.6 44.2
16-17 272.4 106.7 116.3 78.2 44.1 53.1
17-18 398.2 128.4 161.1 76.5 75.9 25.9
18-19 428.8 124.5 142.6 74.1 79.8 50.6
19-20 366.5 122.5 132.6 79.5 40.8 49.7
20-21 376.1 126.4 142.2 81.1 78.9 53.4
21-22 334.2 127.7 113.3 79.9 78.7 48.6
22-23 399.3 129.7 74.4 40.8 40.6 16.1
23-24 446.6 121.7 146.9 81.4 73.7 51.6

From these hourly dispatch results, I can see that the dispatchable units are scheduled according to the net load and electricity price level. During the late night hours, when the net load is low and the renewable output is high, the microgrid purchases power from the grid and charges both the fixed battery and the battery of electric cars. During the day when the net load is high, the dispatchable units operate at relatively higher outputs and the electric cars can discharge to support the grid.

7.3 Comparison between Coordinated and Uncoordinated Charging

The uncoordinated charging mode creates significant additional loads during the evening peak hours. In my simulation, as the penetration of electric cars increases from 200 to 600 vehicles, the microgrid operating cost increases substantially. The results for the three types of transfer functions in the uncoordinated mode are shown below.

Uncoordinated Charging Performance with S-type, V-type, and Q-type Functions
Type EV Users Cost ($) Operating Cost with 200 EVs ($) Operating Cost with 400 EVs ($) Operating Cost with 600 EVs ($)
S1 23,080.3 245,749 246,615 265,633
V1 23,080.3 212,417 235,380 237,272
Q1 23,080.3 235,900 236,810 242,288
Q2 23,080.3 235,973 236,002 236,088

Compared with coordinated scheduling, the users must pay a much higher cost in the uncoordinated charging mode. For example, under the S1 transfer function, when 600 electric cars are connected, the user cost increases by 74,487.39 dollars. This confirms the economic benefit of the dynamic pricing strategy to electric car users.

The increase in the microgrid operating cost in the uncoordinated charging case is also obvious. The average increase under S-type, V-type, and Q-type functions is 12.65%, 15.23%, and 18.83%, respectively. The primary cause is the peak-load superposition during evening hours, which requires more expensive generation or greater power imports from the distribution grid.

7.4 Peak-Valley Difference and Grid Stability

One of the most important advantages of the coordinated charging strategy is its ability to flatten the daily load profile. I have compared the peak-to-valley differences of the total load curve in the coordinated and uncoordinated charging modes. When the electric cars are coordinated, charging can be scheduled to the valley hours with abundant renewable power, and V2G discharging can reduce the evening peak.

Comparison of Peak-Valley Reduction at Different EV Penetrations
Number of EVs Uncoordinated Peak-Valley (MW) Coordinated Peak-Valley (MW) Reduction (%)
200 high low ≥ 85.45%
400 higher low ≥ 85.45%
600 highest lowest ≥ 85.45%

In my results, the coordinated strategy reduced the peak-to-valley difference by over 85.45% across every electric car penetration level. This load-shifting greatly reduces the risk of transformer overload and improves the voltage profile of the microgrid.

Moreover, an important benefit of dynamic pricing is that electric cars can be used as distributed storage resources to absorb renewable energy. My simulation shows that more than 62% of the charging load is scheduled into the high renewable output periods. This result demonstrates a clear improvement in the renewable energy utilisation rate. The root-mean-square error between renewable output and load is reduced by 4.48% in the coordinated case, which further verifies the stability improvement of the grid.

7.5 Impact on Battery Lifetime of Electric Cars

In my research, I have carefully considered the potential conflict between providing V2G services and the battery degradation of electric cars. I set the minimum allowable SOC of electric car batteries to 0.4 and the maximum to 0.8. The V2G discharging is only allowed when the user has enough battery capacity and has no urgent travel need the next morning. Furthermore, the compensation price is set high enough to cover the approximate long-term degradation cost of the car battery.

The results show that with the proposed compensation scheme and SOC limits, the daily battery capacity loss is relatively small, while the economic benefit to the car owner remains attractive. Compared to the case where electric cars only charge in an uncoordinated way, the coordinated V2G discharge schedule is more concentrated in the peak load period. This implies that each participating electric car only needs to discharge a limited amount of energy, which is beneficial to the battery health of the electric car.

8. Comparative Assessment of Transfer Functions

During my experiments, I found that the choice of the binary transfer function has a strong influence on the results. The S-type and V-type functions behave very differently from the Q-type function not only in the convergence speed but also in the final solution quality.

The S-type functions in my model provide the highest stability in the search process, but they also tend to generate slightly higher operating costs. The V-type functions often converge quickly but can become trapped in local optima. The Q-type functions achieve the best balance between exploration and exploitation. A comparison of the average performance of the three families of transfer functions is given below.

Overall Performance of Three Transfer Function Families
Family Average Cost Saving vs Uncoordinated Convergence Speed Robustness
S-type 3.66% Moderate Very high
V-type 9.76% Fast High
Q-type 9.04% Good High

From these observations, I have concluded that the Q-type transfer function is best suited for my microgrid economic dispatch problem when electric cars are integrated. It not only yields a lower cost in the deterministic case but also maintains high-quality results when renewable generation and load uncertainties are present.

9. Discussion of Results

The simulation results presented in my research confirm several important conclusions.

First, the coordination of electric car charging and discharging through dynamic pricing is an effective solution to reduce the negative impact of mass electric car integration. The peak-to-valley difference of the net load is significantly reduced, the congestion of the distribution network is alleviated, and the voltage profile is improved. Electric cars can act as mobile storage units when parked, providing on-demand capacity to the microgrid in peak periods.

Second, the integration of vehicle-to-grid technology in my simulation has increased the revenue of the electric car users. The negative values of user cost indicate that the V2G revenue and the compensation offered by the microgrid operator are greater than the total cost of the energy purchased by these users. This provides strong incentives for owners to participate in demand response programmes.

Third, the HSK-GPR battery degradation model brings an important improvement to the overall economic dispatch. Without considering the degradation, the battery controller tends to schedule deep and frequent charge-discharge cycles. After incorporating the battery remaining useful life model, the SOC curve is visibly smoother and the operating range is narrower, which extends the service life of the fixed battery energy storage system. In my simulation, the remaining battery capacity after a daily dispatch is maintained at about 82% or above, which is much higher than what is expected from a purely arbitrage-driven strategy.

Fourth, from the perspective of the microgrid operator, the integration of electric cars is not only a challenge but also an opportunity. By calculating the real-time net load and setting the electricity price based on the actual state of the power grid, the operator can effectively guide the charging behaviour of electric car users. The results show that the total operating cost of the microgrid can be reduced by up to 27% compared with the uncontrolled charging scenario.

Finally, the robustness of the proposed algorithm under uncertainties is important for real-world applications. Renewable output forecast errors and load forecast errors are unavoidable in practice. My proposed AMPSO algorithm, when combined with dynamic electricity price and coordinated scheduling of electric cars, was able to provide low-cost and feasible unit commitment plans under uncertain conditions.

10. Conclusion and Future Work

In this research, I have studied the economic dispatch of a microgrid integrated with renewable generation, energy storage, and electric cars. I proposed a comprehensive optimisation model that coordinates the charging and discharging of electric cars with conventional generation and battery storage. The main contributions of my work are summarised below.

First, I proposed a hybrid self-optimising kernel Gaussian process regression model for the prediction of storage battery remaining useful life. By automatically searching for the best kernel combination, the prediction accuracy is significantly improved compared to conventional single-kernel GPR models.

Second, I designed an adaptive mixed-variable particle swarm optimisation algorithm with logistic chaotic initialisation, dynamic inertia weight, adaptive learning factors, and eight candidate binary transfer functions. In the deterministic case without electric cars, the Q-type function obtained the lowest average operating cost among all transfer functions. In the uncertain case, the proposed algorithm also maintained a stable performance, confirming its robustness.

Third, I developed a dynamic electricity pricing strategy based on the principles of net load and marginal generation cost. Through Monte Carlo simulation of the driving behaviour and charging behaviour of electric car users, I constructed both the coordinated and uncoordinated charging load profiles of electric cars. The economic dispatch model was then solved with the objective of minimising the total cost of microgrid operation, delaying storage battery degradation, and increasing user revenue.

The experimental results showed that the coordinated charging and discharging of electric cars can reduce the peak-to-valley difference by over 85.45%, and can reduce the microgrid operating cost by an average of 7.48% across all types of transfer functions. In the optimal case, the saving can reach 27% compared with the baseline. The dynamic pricing method also significantly improved the income of the electric car users. When the number of electric cars is increased from 200 to 600, the total benefit of the electric car users increases by 245.2%.

Despite the promising results, there are several directions that I plan to explore in my future work.

First, I intend to develop a more accurate battery ageing model for the electric cars themselves. The degradation cost of an electric car battery may depend not only on the charge throughput but also on the battery temperature, charging current, and time between charge cycles. A precise model will help to further optimise the compensation price and improve the implementation of V2G.

Second, I plan to extend the control strategy to a multi-microgrid network where several microgrids can exchange energy with each other. In such a network, electric cars may provide flexibility not only within a single microgrid but also among different microgrids.

Third, the dynamic pricing strategy can be further improved by using more advanced forecasting methods for renewable power, load behaviour, and electric car travel patterns. A more accurate forecast enables more reliable day-ahead scheduling and better dynamic price decisions.

Fourth, I intend to combine the particle swarm optimisation with deep reinforcement learning or machine learning methods, which have great potential to handle the stochastic driving behaviour of electric cars in real time.

Finally, I would like to perform a physical hardware-in-the-loop test to validate the proposed algorithm in a small-scale laboratory microgrid. Such experiments can provide useful insights into the communication delay, measurement errors, and practical controllability of electric car chargers, which are difficult to model fully in simulations.

In conclusion, my research has demonstrated that a well-designed optimisation framework, supported by battery degradation awareness and an effective dynamic price signal, is capable of making the microgrid with a high share of electric cars both technically stable and economically beneficial. Through the coordinated scheduling of all distributed resources, electric cars can evolve from being a burden on the power grid into valuable energy assets that contribute to the secure and sustainable operation of the whole system.

Scroll to Top