A Real-Time Pricing Method for Smart Grids Considering Electric Vehicle Classification

Abstract

To account for differences in travel characteristics among different types of electric vehicles, a real-time pricing method for smart grid considering electric vehicle classification is proposed. According to characteristics such as grid-connection time, grid-disconnection time, and daily driving mileage, electric vehicles are divided into private electric vehicles, electric taxis, and electric buses, and the Monte Carlo method is used to generate corresponding operation scenarios. On this basis, combined with the demand-side management mechanism and with the goal of maximizing social welfare, a real-time pricing model is established that takes into account wind power and photovoltaic output, V2G charging and discharging of electric vehicles, and energy storage devices, and a distributed dual algorithm is used to solve for the real-time electricity price. Simulation results show that the proposed real-time pricing method can dynamically adjust electricity prices according to the supply-demand relationship of the system, guide energy storage devices and electric vehicles to charge and discharge reasonably, optimize resource allocation, and significantly improve total social welfare.

Share and Cite:

Liu, C. and Gao, Y. (2026) A Real-Time Pricing Method for Smart Grids Considering Electric Vehicle Classification. Open Journal of Applied Sciences, 16, 4039-4057. doi: 10.4236/ojapps.2026.1610223.

1. Introduction

Against the backdrop of the “dual carbon” development strategy, the proportion of renewable energy generation continues to increase. Due to its volatility and intermittency, the difficulty of power grid system regulation has been exacerbated [1]. Meanwhile, with the large-scale popularization of electric vehicles, their concentrated and uncoordinated charging will aggravate load peaks, imposing higher requirements on the safe and stable operation and supply-demand balance of the smart grid [2] [3]. It is worth noting that electric vehicles are not merely electricity loads; their batteries possess certain energy storage properties. With the help of V2G technology, they can participate in grid charging and discharging regulation, realize load transfer, and alleviate supply-demand contradictions to a certain extent [3] [4].

Demand-side management guides users to adjust their electricity consumption behavior through price or incentive signals, so as to optimize load distribution, alleviate system supply-demand contradictions, and enhance the stability of power grid operation [5]. As an important implementation approach of demand-side management, demand response mainly relies on electricity price mechanisms to encourage users to actively adjust their electricity consumption periods and levels [6]. Existing pricing methods mainly include fixed electricity price, time-of-use electricity price, critical peak pricing, and real-time pricing [7]. Compared with other pricing mechanisms, real-time pricing can change dynamically according to the supply-demand state of the system and reflect the electricity supply-demand relationship in a more timely manner, thus better meeting the development needs of flexible regulation in future smart grids [8].

At present, research methods for smart grid real-time pricing mainly include game theory, bilevel optimization, and social welfare maximization [9]. Game theory regards the supply side and the demand side as decision-making entities, in which the supply side acts as the leader to formulate pricing strategies, and the demand side adjusts electricity consumption behavior according to price signals, thereby forming a master-slave game model [10]. Bilevel optimization constructs a hierarchical decision-making model of upper and lower levels to characterize the interaction between supply and demand parties, and accordingly achieves electricity price optimization [11]. Social welfare maximization starts from the perspective of the overall system benefit, takes total social welfare as the pricing objective, and promotes optimal resource allocation and fair distribution [12]. The social welfare maximization method was first introduced into the electric power field in the 1960s and solved by the Lagrangian duality method, in which the multiplier can serve as the electricity price [13]. With the continuous deepening of research, social welfare maximization-based real-time pricing has gradually been oriented toward more complex practical application scenarios, such as considering day-ahead and real-time coordination [14], demand-side appliance classification [15] [16], multiple types of users [17], privacy protection [18], and multi-energy demand coupling [19].

In power grids, the potential of electric vehicles to participate in grid charging and discharging regulation through V2G technology has attracted increasing attention. A reasonable price mechanism can guide electric vehicles to adjust their charging and discharging behavior and improve the operational flexibility of the power grid [20]. With the development of V2G technology, related studies have further incorporated bidirectional charging and discharging into pricing mechanisms, incentivizing electric vehicles through price compensation to discharge to the grid during high-load periods, thereby achieving coordination between user benefits and system operation benefits [21] [22]. In recent years, research on electric vehicle pricing has gradually considered factors such as distribution network constraints, user preferences, and individual differences, and has achieved collaborative optimization between electric vehicle charging behavior and power grid operation states through differentiated pricing [23].

In summary, previous studies have mostly focused on the price response of electric vehicles as a whole, without fully combining the differences among different types of electric vehicles with smart grid real-time pricing. To this end, under the premise of considering different types of electric vehicles and energy storage devices on the demand side, this paper establishes a smart grid real-time pricing model with the goal of maximizing social welfare and solves it using a distributed dual method. Finally, the effectiveness of the model is verified through simulation experiments.

2. System Framework

Consider a smart grid system composed of a supply side and a demand side. The supply side includes thermal power units (TPUs), photovoltaic (PV) systems, and wind turbines (WTs). The demand side consists of electric vehicles (EVs) that can be charged and discharged, as well as N users equipped with energy storage systems (ESSs). The supply and demand parties exchange information through a power market scheduling center (PMSC) to achieve coordinated scheduling, thereby determining the optimal real-time electricity price. Users’ electricity demand is preferentially met by renewable energy to improve the level of renewable energy accommodation. Let N={ 1,2,⋯,N } denote the set of users, ℳ={ 1,2,3,⋯,M } denote the set of private electric vehicles, V={ 1,2,3,⋯,V } denote the set of electric taxis, and W={ 1,2,3,⋯,W } denote the set of electric buses. A scheduling cycle is divided into K time slots, and K={ 1,2,⋯,K } denotes the set of time slots.

3. System Model

A modular modeling method is employed in this section to build operational models of different distribution-network market participants. By incorporating physical network constraints, we formulate a global optimization model targeting maximum social welfare.

3.1. Wind Turbines and Photovoltaic Systems

The power output of a wind turbine is closely related to the actual wind speed. When the wind speed is below the cut-in wind speed, the available wind energy is insufficient to drive the turbine for normal power generation. When the wind speed lies between the cut-in wind speed and the rated wind speed, the turbine output gradually increases with wind speed. Once the wind speed reaches the rated value, the turbine operates at its rated power. When the wind speed exceeds the cut-out wind speed, the turbine is shut down to ensure operational safety. Therefore, the output of the wind turbine during time period k can be expressed as follows [24]:

P k,WT ={ P r , v r < v k < v co P r v k − v ci v r − v ci , v ci < v k ≤ v r 0, v k ≤ v ci , v k ≥ v co (1)

where P r is the rated output power; v k is the actual wind speed in time slot k ; v r is the rated wind speed; v ci is the cut-in wind speed; and v co is the cut-out wind speed.

The wind speed approximately follows a Weibull distribution, and its probability density function is as follows [25]:

f( v k )= k s c ( v k c ) k s −1 exp( − ( v k c ) k s ) (2)

where k s and c are the shape parameter and scale parameter.

The photovoltaic power generation capacity is related to solar irradiance, conversion efficiency, and radiation area, and its output model is as follows [26]:

P k,PV = η k S k θ k (3)

where η k is the solar radiation efficiency, S k is the solar radiation area, and θ k is the solar irradiance in time slot k .

Renewable energy generation includes wind power generation and photovoltaic power generation. Let L k,r denote the total renewable energy generation in time slot k , which is expressed as follows:

L k,r = P k,WT + P k,PV ,∀k∈K (4)

Since wind power and photovoltaic power generation mainly rely on natural resources, their power generation cost is assumed to be negligible, and only the operation and maintenance cost is considered, which is expressed by the following quadratic function [1]:

C k,r ( L k,r )= δ k,r ( L k,r ) 2 + σ k,r L k,r (5)

where δ k,r >0 and σ k,r ≥0 are preset parameters.

3.2. Thermal Power Unit

Conventional generation has strong controllability and regulation capability in power systems and can provide stable power support when renewable generation is insufficient or system load is high. In this study, thermal power units are used to represent conventional generation, and L k denotes the conventional generation output during time period k . Due to unit capacity and operating constraints, the generation output must satisfy the upper and lower limit constraints:

L k,min ≤ L k ≤ L k,max ,∀k∈K (6)

The cost of traditional thermal power generation mainly comes from fossil energy consumption, and is usually expressed by a quadratic convex function [9]:

C k ( L k )= a k ( L k ) 2 + b k L k + c k (7)

where a k ≥0 and b k , c k ≥0 are the power generation cost coefficients.

3.3. Utility Function

The utility function is a concept in microeconomics, used to describe the relationship between the satisfaction obtained by consumers and the quantity of goods consumed. The utility function is non-decreasing and exhibits diminishing marginal utility. In existing pricing models, the utility function of users is usually expressed in the following quadratic form [7]:

U( x,ω )={ ωx− α 2 x 2 , 0≤x≤ ω α ω 2 2α , x≥ ω α (8)

where x is the electricity consumption; ω>0 is the electricity elasticity coefficient, which varies among different users and at different time slots; and α>0 is a predetermined parameter. Let U i,k ( x i,k , ω i,k ) denote the utility function of user i in time slot k .

3.4. Energy Storage System

Let x i,k s denote the charging and discharging quantity of energy storage device i in time slot k , where x i,k s >0 indicates that the energy storage device is charging, x i,k s <0 indicates that the energy storage device is discharging, and x i,k s =0 indicates that the energy storage device is idle. The charging/discharging quantity of the energy storage device should satisfy the capacity constraint [27]:

0≤ ∑ k=1 K x i,k s ≤ B i ,∀i∈N (9)

where B i is the maximum capacity of the energy storage device. Energy storage systems also incur degradation-related costs, as repeated charging and discharging can cause fatigue damage and reduce the durability of the storage device. Therefore, the operating cost of the ESS is modeled using the following quadratic function:

C i,k s ( x i,k s )= δ i,k s ( x i,k s ) 2 + σ i,k s x i,k s (10)

where δ i,k s >0 and σ i,k s ≥0 are the relevant coefficients.

3.5. Electric Vehicles

3.5.1. Charging and Discharging Model

The charging and discharging behavior of electric vehicles is mainly related to the grid-connection time, grid-disconnection time, daily driving mileage, SOC, and battery performance. Studies [3] have shown that the grid-connection and grid-disconnection times of electric vehicles follow a normal distribution, and their probability density functions are as follows:

f t ( t s )={ 1 σ s 2π exp[ − ( t s − μ s ) 2 2 σ s 2 ], μ s −12< t s <24 1 σ s 2π exp[ − ( t s +24− μ s ) 2 2 σ s 2 ], 0< t s ≤ μ s −12 (11)

f t ( t e )={ 1 σ e 2π exp[ − ( t e −24− μ e ) 2 2 σ e 2 ], μ e +12< t e <24 1 σ e 2π exp[ − ( t e − μ e ) 2 2 σ e 2 ], 0< t e ≤ μ e +12 (12)

where t s and t e are the grid-connection charging start time and the grid-disconnection charging end time of electric vehicles; μ s and μ e are the expected values of the grid-connection and grid-disconnection times; σ s and σ e are the variances of the grid-connection and grid-disconnection times.

The probability density function of the daily driving mileage of electric vehicles is

f( x )= 1 σ d 2π exp[ − ( x− μ d ) 2 2 σ d 2 ] (13)

where σ d is the daily driving mileage of electric vehicles; μ d is the expected value; and σ d is the variance.

According to the daily driving mileage, the SOC of each electric vehicle at the charging start time can be obtained as

S in =1− d j / D max (14)

where D max is the maximum cruising range of electric vehicle j .

3.5.2. Classification of Electric Vehicles

Considering the differences in travel patterns and charging demands among different types of electric vehicles, this paper classifies electric vehicles into private electric vehicles, electric taxis, and electric buses based on the parameter settings reported in [28], and establishes probability distribution models for their grid connection times, departure times, and daily travel distances, respectively.

The travel region and driving behavior of private electric vehicles exhibit a certain degree of regularity [28], mainly manifested as driving out in the morning for commuting and returning to the residence in the evening. Their grid-connection periods are highly concentrated in the nighttime hours at home. N( 19.55,2.06 ) and N( 8.32,0.85 ) are used as the distributions of their grid-connection and grid-disconnection times. Considering that the daily mileage of private cars is relatively short and a single charge per day can satisfy their travel demand, N( 46.3,15.3 ) is adopted as the distribution of their daily driving mileage.

Electric taxis are an important component of urban transportation, with relatively long operating hours, and charging once a day cannot meet their demand. It is assumed that the charging behavior of electric taxis is mainly concentrated at noon and at night, with the corresponding distributions being N( 16,2.5 ) and N( 16.72,2.51 ) , N( 2,2.5 ) and N( 4.89,2.54 ) . The average daily driving mileage of electric taxis ranges from 40 to 450 km, and its distribution conforms to N( 186,85 ) .

Electric buses have fixed operating schedules, running according to route schedules during the daytime, and are connected to the grid for charging after returning to the bus station at night. Their grid-connection and grid-disconnection times follow normal distributions N( 22.1,1.42 ) and N( 5.8,0.96 ) . The average daily driving mileage of buses ranges from 50 to 300 km, and its daily driving mileage distribution conforms to N( 151,55 ) .

It should be noted that the probability distribution parameters for the grid connection times, departure times, and daily travel distances of the three types of electric vehicles are all determined with reference to Reference [28], primarily to characterize their typical travel patterns. These parameters are used as simulation inputs rather than being independently estimated through statistical fitting of actual vehicle operation data in this study. Based on these parameters, the Monte Carlo method is employed to generate operating scenarios for different types of electric vehicles, providing the necessary input data for subsequent charging and discharging optimization and real-time pricing analysis.

3.5.3. Constraints and Cost Functions

When electric vehicles participate in grid charging and discharging regulation, their charging and discharging energy is constrained by factors such as battery capacity, charging/discharging power limits, and grid-connection status. To ensure that different types of EVs participate in scheduling within feasible operating ranges, constraints should be imposed separately on the net charging/discharging energy of private electric vehicles, electric taxis, and electric buses. These constraints are expressed as follows [3]:

0≤ ∑ m=1 M x m,k ≤ B m ,∀m∈M (15)

0≤ ∑ v=1 V x v,k ≤ B v ,∀v∈V (16)

0≤ ∑ w=1 W x w,k ≤ B w ,∀w∈W (17)

where x m,k is the net charging and discharging quantity of electric private car m in time slot k ; x v,k is the net charging and discharging quantity of electric taxi v in time slot k ; x w,k is the net charging and discharging quantity of electric bus w in time slot k ; and B m , B v and B w denote the maximum allowable charging and discharging quantities for the corresponding vehicle types.

To ensure that electric vehicles can meet their travel requirements after leaving the grid, the state of charge (SOC) needs to reach a preset minimum level [3]:

S out,min m ≤ S in,m + ∑ k=1 K B m / E m (18)

S out,min v ≤ S in,v + ∑ k=1 K B v / E v (19)

S out,min v ≤ S in,v + ∑ k=1 K B v / E v (20)

where S in,m , S in,v and S in,w are the corresponding initial SOC states. E m , E v and E w are the corresponding rated battery capacities.

Let x ev,k denote the total net charging and discharging quantity of all electric vehicles in time slot k , where x ev,k >0 indicates that electric vehicles are generally in a charging state, x ev,k <0 indicates that electric vehicles are generally in a discharging state, and x ev,k =0 indicates that electric vehicles are generally in an idle state. The details are as follows:

x ev,k = ∑ m=1 M x m,k + ∑ v=1 V x v,k + ∑ w=1 W x w,k (21)

The operation and maintenance cost of electric vehicles can be expressed by the following quadratic function [29]:

C ev,k ( x ev,k )= δ ev,k ( x ev,k ) 2 + σ ev,k x ev,k (22)

where δ ev,k >0 and σ ev,k ≥0 are preset parameters.

4. Real-Time Pricing Model and Solution

4.1. Social Welfare Maximization Model

The core objective of the classic social welfare maximization model is to maximize the difference between total user utility and power generation cost. When energy storage systems and electric vehicles are deployed on the user side, the calculation of social welfare needs to further deduct the total operation and maintenance costs of all users’ energy storage systems and electric vehicles on the basis of the classic model. The specific form is as follows:

max x i,k , x i,k s , L k , x ev,k ∑ k=1 K { ∑ i=1 N [ U( x i,k , ω i,k )− C i,k s ( x i,k s ) ] − C ev,k ( x ev,k )− C k ( L k )− C k,r ( L k,r ) }

s.t.  ∑ i=1 N ( x i,k + x i,k s ) + x ev,k ≤ L k + L k,r ,∀k∈K (23)

where Equation (23) is the supply-demand balance constraint, which is used to ensure that the total electricity demand in each time slot does not exceed the total power generation available from the system. The optimization problem is subject to the constraints in Equations (6), (9), (15), (16), (17), (18), (19), (20) and (23). In the model, the costs of TPU, PV, WT, ESS and EV are all convex functions, and the utility function is concave; therefore, the model is a convex optimization problem.

4.2. Dual Problem Solution

To solve the optimal real-time electricity price, the Lagrangian multiplier is introduced to construct the Lagrangian dual problem of the model:

min λ≥0 D( λ ) (24)

where

D( λ )= max x i,k , x i,k s , L k , x ev,k ∑ k=1 K { ∑ i=1 N [ U( x i,k , ω i,k )− C i,k s ( x i,k s ) ] − C ev,k ( x ev,k )                − C k ( L k )− C k,r ( L k,r ) }+ ∑ k=1 K λ k ( L k + L k,r − ∑ i=1 N ( x i,k + x i,k s ) − x ev,k ) (25)

According to the variable separability property, the problem can be decomposed into supply-side and demand-side subproblems:

D( λ )=B( λ )+S( λ ) (26)

where

B( λ )= max x i,k , x i,k s , x ev,k ∑ k=1 K { ∑ i=1 N [ U i,k ( x i,k , ω i,k )− C i,k s ( x i,k s ) ] − C ev,k ( x ev,k )            − λ k ( ∑ i=1 N ( x i,k + x i,k s ) + x ev,k ) } (27)

S( λ )= max L k ∑ k=1 K [ − C k ( L k )+ λ k L k − C k,r ( L k,r )+ λ k L k,r ] (28)

Since the model is a convex optimization problem, the subgradient projection method is employed to solve problem (24) and update the Lagrange multiplier λ , which represents the optimal real-time electricity price. The iterative formula is given as follows:

λ k ( t+1 ) = [ λ k ( t ) − ν t ⋅ ∂D( λ k ( t ) ) ∂ λ k ] + = [ λ k ( t ) + ν t ⋅( ∑ i=1 N ( x i,k ( t ) + x i,k s( t ) ) + x ev,k ( t ) − L k ( t ) − L k,r ( t ) ) ] + (29)

where [ z ] + =max{ 0,z } , v t > 0 is the iterative step size; x i,k ( t ) , x i,k s,( t ) , x ev,k ( t ) and L k ( t ) are the optimal solutions of subproblems (27) and (28), respectively. After the PMSC announces the current electricity price, the supply side and the demand side respectively solve their own subproblems to maximize their own welfare. When the electricity demand is higher than the supply, the electricity price rises, prompting users to reduce demand and power generators to increase supply; conversely, when the supply is greater than the demand, the electricity price falls, incentivizing users to increase demand and power generators to reduce supply, until supply and demand are balanced. When the electricity price fluctuation satisfies the preset convergence condition max k∈K | λ k ( t+1 ) − λ k ( t ) |≤ ξ λ , the iteration terminates. At this point, the prices of both supply and demand parties in this time slot reach equilibrium, and social welfare maximization is achieved.

It should be noted that this study adopts a 24-hour scheduling horizon, using the forecasted wind and photovoltaic power generation and user electricity demand for each time period as optimization inputs. The available charging and discharging time windows of electric vehicles are determined based on their grid connection and departure times generated by the Monte Carlo method. During each optimization process, the forecasted information and EV availability are assumed to remain unchanged throughout the current scheduling horizon. The supply and demand sides iteratively update electricity prices through the distributed dual algorithm until the convergence criterion is satisfied, thereby obtaining the optimal real-time electricity prices for each time period. When the forecasted information or actual operating conditions change in subsequent scheduling periods, the optimization model can be solved again using the updated data to adjust the corresponding electricity prices. This study primarily focuses on the real-time pricing mechanism under a given forecast scenario, while rolling-horizon optimization considering forecast errors is beyond the scope of the present work. The specific iterative steps are as follows:

Algorithm 1: Demand-side execution steps

Step 1. Receive the current electricity price λ k ( t ) from the PMSC, and set the iterative step size and termination condition.

Step 2. Solve problem (27) to obtain the optimal electricity consumption x i,k ( t ) , the charging and discharging quantity of energy storage x i,k s,( t ) , and the charging and discharging quantity of electric vehicles x ev,k ( t ) .

Step 3. Report the electricity consumption information to the PMSC.

Algorithm 2: PMSC and supply-side execution steps

Step 1. Set the initial electricity price λ k ( 0 ) , and select an appropriate step size v t >0 and convergence accuracy ξ λ >0 .

Step 2. Broadcast the current electricity price λ k ( t ) to all supply-side and demand-side entities.

Step 3. Solve problem (28) to obtain the optimal power generation L k ( t ) .

Step 4. The PMSC receives the total electricity consumption information reported by the demand side and the total power generation information reported by the supply side, and solves problem (29) to update the electricity price λ k ( t+1 ) .

Step 5. Determine whether the electricity price satisfies the convergence condition. If so, the algorithm terminates and outputs the optimal electricity price; otherwise, let t=t+1 and proceed to the next iteration.

During the above iterative process, the supply side and demand side exchange information and make optimization decisions through real-time price signals under the coordination of the PMSC. On the demand side, after receiving the current electricity price, users optimize their electricity consumption and charging/discharging behaviors to maximize their own utility. On the supply side, generation output is adjusted according to the current electricity price and the generation costs of different energy sources to maximize supply-side profit.

As the information coordination center between the supply and demand sides, the PMSC receives electricity consumption information reported by the demand side and generation information reported by the supply side, and dynamically updates the real-time electricity price according to the current supply-demand imbalance. When total system demand exceeds total supply, the PMSC increases the electricity price to encourage users to reduce their electricity consumption while motivating the supply side to increase generation output. Conversely, when total supply exceeds demand, the electricity price is reduced to encourage additional electricity consumption or charging of ESSs and EVs, while the supply side appropriately reduces its generation output. By repeatedly performing this process, the supply-demand imbalance is gradually reduced until the predefined convergence criterion is satisfied. At this point, the system reaches supply-demand equilibrium and the corresponding optimal real-time electricity price is obtained.

During the distributed solution process, each participant only needs to exchange essential information, such as electricity prices and power quantities, with the PMSC, without disclosing its private data. Therefore, the privacy of individual participants can be protected to a certain extent. In addition, the supply-side and demand-side subproblems can be solved independently and in parallel, thereby reducing computational complexity and improving computational efficiency.

5. Simulation Experiments

5.1. Monte Carlo Simulation

EV travel behavior is affected by various stochastic factors, including users’ travel demands. Consequently, daily driving distances, initial states of charge (SOC), grid-connection times, and departure times may vary across vehicles. Therefore, based on the probabilistic EV travel models established in Section 3.5, the Monte Carlo method is employed to randomly sample the travel parameters of different types of EVs and generate corresponding operating scenarios.

In the simulation, 12 private electric vehicles, 5 electric taxis, and 3 electric buses are considered. The random seed is fixed at 2026, and 1000 random operating scenarios are independently generated according to the probability distributions of different EV types. Each scenario contains the grid connection times, departure times, and daily travel distances of 20 EVs, and the initial SOC of each vehicle is calculated based on its daily travel distance. For travel distance samples that fall outside the predefined reasonable ranges, resampling is performed. For vehicle connection intervals spanning midnight, a cyclic 24-hour scheduling approach is adopted, in which the connection intervals are divided into the evening period of the current day and the early morning period of the following day to determine the actual charging and discharging availability of each vehicle.

Based on these sampled parameters, the operating scenarios of different types of EVs are constructed by considering their battery capacities, SOC constraints, and charging and discharging power limits, thereby providing the necessary input data for subsequent EV charging and discharging optimization and real-time pricing analysis.

5.2. Parameter Settings

The effectiveness of the proposed real-time pricing method is verified through simulation experiments. A total of 30 users are set up in the system, each equipped with an energy storage device, and 12 private electric vehicles, 5 electric taxis, and 3 electric buses are considered. A complete scheduling cycle is set to 24 h and divided into 24 scheduling time slots, with each time slot lasting 1 h. For each user, the utility function parameter ω i,k in the first time slot is independently and randomly generated within the interval [ 1,5 ] , and randomly fluctuates in subsequent time slots. To reflect the typical intraday photovoltaic output pattern, the simulation sets the solar irradiance to 0 at night, gradually increases with solar radiation during the daytime, reaches its maximum value around noon, and then gradually decreases. Wind and photovoltaic power generation are shown in Figure 1. The parameter settings are shown in the following table (Table 1).

Table 1. Main parameters of the simulation system.

Parameter

Value

Parameter

Value

P r / v ci / v r / v co

60/3/12/25

E m / E v / E w

60/75/250

k s /c/ S k / η k

2/7.5/250/0.18

D max m / D max v / D max w

350/450/300

δ k,r / σ k,r

0.0005/0.02

S out,min m

0.9

a k / b k / c k

0.004/0.2/0

S out,min v

0.8

B i / δ i,k s / σ i,k s

8/0.01/0

S out,min w

0.8

δ ev,k / σ ev,k

0.05/0.01

B m / B v / B w

7/15/40

Figure 1. Wind and PV generation.

The simulation experiments are conducted using MATLAB R2024b. The proposed real-time pricing model is solved using a distributed dual algorithm, in which the quadratic optimization subproblems on the supply and demand sides are solved using the quadprog solver, and the Lagrange multipliers are updated using the projected subgradient method. The maximum number of iterations is set to 1000, and the convergence tolerance for electricity price changes is set to 10−4 CNY/kWh.

5.3. Simulation Results and Analysis

Figure 2 presents the optimal real-time electricity price obtained from the proposed model, which varies dynamically across different time periods. Figure 3 shows the system supply-demand balance. The system load exhibits clear intraday fluctuations, while thermal power and renewable energy jointly meet the electricity demand. ESSs and EVs participate in demand-side regulation in response to the real-time electricity price. Through coordinated adjustments of supply-side generation and flexible demand-side resources, the supply-demand balance is maintained throughout the scheduling horizon, demonstrating that the proposed real-time pricing mechanism can effectively facilitate interactions between the supply and demand sides.

Figure 2. Optimal real-time electricity price.

Figure 4 presents the optimal electricity consumption schedule of user 18, who is equipped with the first private electric vehicle. The user’s baseline electricity consumption varies to some extent in response to the real-time electricity price. The ESS shifts load across different time periods through charging and discharging, thereby reducing electricity purchases from the grid during high-price periods. These results indicate that the ESS and EV can respond to real-time price signals while satisfying their respective operational constraints, thereby enhancing the demand-side load regulation capability.

Figure 3. Supply and demand balance.

Figure 4. Optimal electricity consumption schedule of user 18.

As can be seen from Figures 2-4, during 0:00-6:00, the system load remains at a relatively low level, while the real-time electricity price stays at a moderate level overall. The ESS and EV participate in load shifting through charging and discharging. During 7:00-10:00, system electricity demand increases, and the real-time price adjusts accordingly. The ESS and EV on the demand side gradually change their charging and discharging states in response to the price signal. From 11:00 to 17:00, PV generation increases significantly, enhancing the renewable energy supply capability. Consequently, thermal power generation decreases, while the real-time electricity price remains relatively low, and flexible demand-side resources show a stronger tendency to charge during this period. After 18:00, renewable generation gradually declines while the system load remains at a relatively high level, resulting in a tighter supply-demand balance and a corresponding increase in the real-time electricity price, which reaches a relatively high level around the evening load peak. During this period, the ESS reduces grid electricity purchases on the demand side through discharging, while EVs participate in V2G regulation subject to their grid-connection status and SOC constraints. Meanwhile, thermal power units increase their output to compensate for the supply shortfall caused by the decline in renewable generation.

5.4. Comparison of Different Pricing Mechanisms

To verify the effectiveness of the proposed real-time pricing mechanism in improving social welfare, social welfare under real-time pricing and fixed pricing is compared. To ensure a fair comparison, both pricing mechanisms use identical system parameters, wind and photovoltaic power generation profiles, user electricity demand, and electric vehicle travel scenarios. In addition, the operating constraints of energy storage systems and electric vehicles remain unchanged, with only the electricity pricing mechanism being modified. The fixed electricity price is calculated as follows [27]:

λ fixed k = ω max k − L k α N (30)

where ω max k denotes the maximum elasticity coefficient among all users at time period k . The fixed electricity price is determined based on the given parameters before the beginning of the scheduling period and remains constant throughout the 24-hour scheduling horizon, whereas the real-time electricity price is dynamically adjusted according to the system’s supply-demand conditions using the distributed dual algorithm. As shown in Figure 5, the social welfare under the real-time pricing mechanism is higher than that under the fixed pricing mechanism in all time periods, with relatively small overall fluctuations, indicating that the system can maintain a relatively stable welfare level. In contrast to fixed pricing, real-time pricing can dynamically adjust electricity prices according to the supply-demand relationship, thereby guiding users, ESSs, and EVs to optimize their electricity consumption and charging/discharging behaviors. Meanwhile, it coordinates supply-side generation, which helps reduce system operating costs and improve user utility.

Figure 5. Comparison of social welfare across different time periods.

6. Conclusions

This study proposes a real-time pricing model for smart grids considering multiple supply- and demand-side resources, including thermal power, wind power, PV generation, ESSs, and different types of EVs. According to their travel and charging characteristics, EVs are classified into private electric vehicles, electric taxis, and electric buses, and Monte Carlo simulation is used to generate their operating scenarios. The model is formulated with social welfare maximization as the objective and solved through Lagrangian dual decomposition and a distributed iterative method. The main conclusions are summarized as follows:

1) EV classification can better reflect the differences in demand-side flexibility. Different types of EVs have distinct grid-connection times, departure times, travel distances, and charging/discharging characteristics, which directly affect their ability to participate in demand response and V2G regulation.

2) The proposed real-time pricing mechanism can effectively coordinate supply- and demand-side resources. The electricity price changes dynamically with the system supply-demand relationship and guides users, ESSs, and EVs to adjust their electricity consumption and charging/discharging behaviors, thereby improving the coordination between generation and demand response.

3) The proposed method can improve system economic performance and social welfare. Simulation results show that ESSs can achieve load shifting through intertemporal charging and discharging, while EVs can provide V2G regulation under grid-connection and SOC constraints. Compared with fixed pricing, real-time pricing achieves higher social welfare and better resource allocation performance.

4) The model still has room for further improvement. The current study simplifies EV user behavior, source-load uncertainty, and distribution-network operating constraints. Future research can further consider user participation willingness, renewable generation and load forecast errors, network power-flow constraints, and actual operating data to improve the robustness, scalability, and practical applicability of the proposed method.

Author Contributions

Chang Liu was responsible for developing the research methodology, constructing the mathematical models for electric vehicle classification and real-time pricing, formulating the optimization problem, implementing the distributed dual algorithm in MATLAB, conducting simulation experiments, analyzing the numerical results, and preparing the original manuscript. Yan Gao contributed to the conceptualization and overall design of the study, provided guidance on mathematical modeling and algorithm development, supervised the research process, evaluated and discussed the simulation results, and critically reviewed and revised the manuscript. Both authors participated in discussions of the research findings, reviewed the manuscript, and approved the final version for publication.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Yang, Y. and Gao, Y. (2026) Robust Optimization Method for Real-Time Pricing in Smart Grids Considering Dual Uncertainties. Chinese Journal of Management Science.
https://link.cnki.net/urlid/11.2835.G3.20260210.1621.002
[2] Qian, K., Zhou, C., Allan, M. and Yuan, Y. (2011) Modeling of Load Demand Due to EV Battery Charging in Distribution Systems. IEEE Transactions on Power Systems, 26, 802-810.[CrossRef]
[3] Yu, Z.A., Xiao, H.L., Xia, Q.W. and Liu, J.W. (2025) Simulation Study on Optimal Scheduling of a Microgrid with Electric Vehicles Participating under V2G Mode. Journal of System Simulation, 37, 1412-1426. (In Chinese)
[4] Li, Y.R., Zhang, S., Xiao, X.Y., et al. (2021) Electric Vehicle Charging and Discharging Scheduling Strategy Considering the Needs of Both Supply and Demand Sides under V2G Mode. Electric Power Automation Equipment, 41, 129-135, 143. (In Chinese)
[5] Lu, R., Hong, S.H. and Zhang, X. (2018) A Dynamic Pricing Demand Response Algorithm for Smart Grid: Reinforcement Learning Approach. Applied Energy, 220, 220-230.[CrossRef]
[6] Samadi, P., Mohsenian-Rad, A., Schober, R., Wong, V.W.S. and Jatskevich, J. (2010) Optimal Real-Time Pricing Algorithm Based on Utility Maximization for Smart Grid. 2010 1st IEEE International Conference on Smart Grid Communications, Gaithersburg, 4-6 October 2010, 415-420.[CrossRef]
[7] Gao, Y. (2022) Review of Real-Time Pricing Optimization Methods Based on Demand-Side Management. Journal of University of Shanghai for Science and Technology, 44, 103-111, 121. (In Chinese)
[8] Khan, A.R., Mahmood, A., Safdar, A., Khan, Z.A. and Khan, N.A. (2016) Load Forecasting, Dynamic Pricing and DSM in Smart Grid: A Review. Renewable and Sustainable Energy Reviews, 54, 1311-1322.[CrossRef]
[9] Gao, Y. (2020) Study on a Social Welfare Maximization Model for Real-Time Pricing in Smart Grids. Chinese Journal of Management Science, 28, 201-209. (In Chinese)
[10] Dai, Y. and Gao, Y. (2015) Real-Time Pricing Decision Based on Leader-Follower Game in Smart Grid. Journal of Systems Science and Information, 3, 348-356.[CrossRef]
[11] Zhang, L., Gao, Y., Zhu, H. and Tao, L. (2022) Bi-Level Stochastic Real-Time Pricing Model in Multi-Energy Generation System: A Reinforcement Learning Approach. Energy, 239, Article ID: 121926.[CrossRef]
[12] Wu, Z.Q., Wang, J.Q. and Gao, Y. (2024) Analysis of Social Welfare under Real-Time Pricing. Chinese Journal of Management Science, 32, 218-227. (In Chinese)
[13] Williamson, O.E. (1966) Peak-Load Pricing and Optimal Capacity under Indivisibility Constraints. The American Economic Review, 56, 810-827. (In Chinese)
[14] Zhu, Z.Y., Gao, Y. and Ding, X.D. (2024) Two-Period Integrated Pricing Strategy for Smart Grids Based on Demand-Side Management. Chinese Journal of Management Science, 34, 409-419. (In Chinese)
[15] Yuan, G.X., Gao, Y. and Wang, H.J. (2020) Real-Time Pricing Algorithm for Smart Grids Based on Utility Classification. Journal of University of Shanghai for Science and Technology, 42, 29-35. (In Chinese)
[16] Zhu, H., Gao, Y., Hou, Y., Wang, Z. and Feng, X. (2019) Real-Time Pricing Considering Different Type of Smart Home Appliances Based on Markov Decision Process. International Journal of Electrical Power & Energy Systems, 107, 486-495.[CrossRef]
[17] Lin, J., Xiao, B., Zhang, H., Yang, X. and Zhao, P. (2020) A Novel Multitype-Users Welfare Equilibrium Based Real-Time Pricing in Smart Grid. Future Generation Computer Systems, 108, 145-160.[CrossRef]
[18] Li, J.X., Zhang, T.H., Qu, D.Q. and Pan, L.B. (2022) Real-Time Pricing for Smart Grids Based on Blockchain Privacy Protection. Journal of University of Shanghai for Science and Technology, 44, 122-130. (In Chinese)
[19] Zhao, N., Lv, J., Gao, Y., Tang, J. and Zhou, F. (2024) Real‐Time Pricing for Smart Grid with Multiple Energy Coexistence on the User Side. IET Renewable Power Generation, 18, 2162-2176.[CrossRef]
[20] Cedillo, M.H., Sun, H., Jiang, J. and Cao, Y. (2022) Dynamic Pricing and Control for EV Charging Stations with Solar Generation. Applied Energy, 326, Article ID: 119920.[CrossRef]
[21] Ghosh, A. and Aggarwal, V. (2018) Menu-Based Pricing for Charging of Electric Vehicles with Vehicle-to-Grid Service. IEEE Transactions on Vehicular Technology, 67, 10268-10280.[CrossRef]
[22] Zhan, X. and Guo, B. (2026) Electric Vehicles to the Grid: Costs, Benefits, and Pricing Mechanisms. Energy Economics, 155, Article ID: 109200.[CrossRef]
[23] Cheng, R., Liu, G., Liu, W., Shi, Q. and Chen, Q. (2025) A Personalized Network-Aware Price Design for Electric Vehicle Charging Using a Sequential Stackelberg Game. Applied Energy, 381, Article ID: 125145.[CrossRef]
[24] Sohoni, V., Gupta, S.C. and Nema, R.K. (2016) A Critical Review on Wind Turbine Power Curve Modelling Techniques and Their Applications in Wind Based Energy Systems. Journal of Energy, 2016, Article ID: 8519785.[CrossRef]
[25] Mi, Y., Zhao, H.H. and Fu, Q.X. (2023) Bi-Level Game-Based Optimal Operation of a Regional Integrated Energy System Considering Wind-PV Uncertainty and Carbon Trading. Power System Technology, 47, 2174-2188. (In Chinese)
[26] Chen, M.L. and Gao, Y. (2022) Optimal Configuration of Integrated Energy Systems Considering Dual-Sided Source-Load Uncertainty. Journal of University of Shanghai for Science and Technology, 44, 77-84. (In Chinese)
[27] Li, N. and Gao, Y. (2023) Real-Time Pricing Based on Convex Hull Method for Smart Grid with Multiple Generating Units. Energy, 285, 129543.[CrossRef]
[28] You, L., Jin, X.M. and Liu, Y. (2024) Research on a Calculation Method for Charging Load of Electric Vehicle Clusters. Southern Energy Construction, 11, 159-167. (In Chinese)
[29] Chai, Z.F., He, G.Q. and Lu, X.J. (2020) Distributed Orderly Charging Scheduling Algorithm Based on ADMM. Journal of Chongqing University, 43, 101-110. (In Chinese)

Copyright © 2026 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.