선정목록으로
An Energy Management Strategy for Virtual Power Plants Integrating EVs Behaviour Analysis Based on TD3 and DQN
수소연료전지 · (6) PEM(고분자전해질막)
기본 정보
- 저자
- DOI
- 10.1049/rpg2.70048
- 저널
- IET Renewable Power Generation
- 발행년도
- 2025
- 발행기관
- Institution of Engineering and Technology
- 피인용수
- 0
- 라이선스
- cc-by
- 논문 유형
- –
- 언어
- –
- 원문 페이지
- https://doi.org/10.1049/rpg2.70048
- 토픽
- Electric and Hybrid Vehicle Technologies
- OpenAlex ID
- W4409686440
평가 내용
- 관련도
- 사업분야
- 수소연료전지 · (6) PEM(고분자전해질막)
- 부 분야
- –
- R&D 측면
- –
- 확신도
- –
- 근거 용어
- –
- 판단 근거
- 규칙(키워드) 기반 평가로 '수소연료전지 > PEM(고분자전해질막)' 분야에 선정된 논문입니다.
- R&D 활용 포인트
- –
- 평가 입력
- –
초록
ABSTRACT An efficient energy management plays a crucial role in enhancing the operational efficiency of distributed energy systems (DERs) and virtual power plants (VPPs). However, existing optimization methods face persistent challenges in coordinating dynamic EV behaviours. High‐dimensional state spaces and stochastic demand fluctuations lead to suboptimal performance. This study introduces a dispatch optimization strategy for VPPs that incorporates electric vehicles (EVs) based on the twin delayed deep deterministic policy gradient (TD3) and proposes a behaviour analysis driven by deep Q‐network (DQN) to precisely evaluate the charge demands of EVs for the TD3 optimization. The simulation results show that: (1) The proposed TD3‐EV achieves a 16.7% cost reduction compared to battery scenario, with an 89.45% reduction in MT output and a 38.5% enhancement in grid interaction. Notably, it exhibits 89.07% and over 100% lower costs than deep deterministic policy gradient (DDPG) and Gurobi; (2) TD3‐EV reduces peak unbalance power by 26.1% and 14.3% compared to TD3‐Battery and DDPG‐EV, highlighting its robustness in energy management; (3) TD3‐EV demonstrates 84.71% and 94.39% higher mean reward than TD3‐battery and DDPG‐EV with more stable convergence.
본문 86,624자
본문 펼치기
ORIGINAL RESEARCH
# An Energy Management Strategy for Virtual Power Plants Integrating EVs Behaviour Analysis Based on TD3 and DQN
Wei Hu Shuo Wang Puliang Du
School of Economics and Management, Shanghai University of Electric Power, Shanghai, China
Correspondence: [Wei Hu (hwshiep@shiep.edu.cn)](mailto:hwshiep@shiep.edu.cn)
Received: 7 January 2025 Revised: 25 March 2025 Accepted: 8 April 2025
Funding: This work was supported by the National Nature Science Foundation of China (Grant: 72401182).
ABSTRACT
An efficient energy management plays a crucial role in enhancing the operational efficiency of distributed energy systems (DERs)
and virtual power plants (VPPs). However, existing optimization methods face persistent challenges in coordinating dynamic
EV behaviours. High-dimensional state spaces and stochastic demand fluctuations lead to suboptimal performance. This study
introduces a dispatch optimization strategy for VPPs that incorporates electric vehicles (EVs) based on the twin delayed deep
<u>deterministic</u> <u>policy</u> <u>gradient</u> <u>(TD3)</u> <u>and</u> <u>proposes</u> <u>a</u> <u>behaviour</u> <u>analysis</u> <u>driven</u> <u>by</u> <u>deep</u> <u>Q-network</u> <u>(DQN)</u> <u>to</u> <u>precisely</u> <u>evaluate</u>
the charge demands of EVs for the TD3 optimization. The simulation results show that: (1) The proposed TD3-EV achieves a
16.7% cost reduction compared to battery scenario, with an 89.45% reduction in MT output and a 38.5% enhancement in grid
interaction. Notably, it exhibits 89.07% and over 100% lower costs than deep deterministic policy gradient (DDPG) and Gurobi; (2)
TD3-EV reduces peak unbalance power by 26.1% and 14.3% compared to TD3-Battery and DDPG-EV, highlighting its robustness
in energy management; (3) TD3-EV demonstrates 84.71% and 94.39% higher mean reward than TD3-battery and DDPG-EV with
more stable convergence.
1 Introduction
1.1 Background and Motivation
The notion of ‘dual carbon’ objective has been established for
several years, with the low-carbon paradigm acting as the primary
driving force behind the development of virtual power plants
(VPPs) [1, 2]. Furthermore, the unpredictability and fluctuation associated with the integration of renewable energy into
the grid have hastened the development and enhancement of
VPPs [3]. By consolidating and overseeing distributed energy
resources (DERs), VPPs promote energy distribution efficiency
and reliability [4].
Motivated by low-carbon objectives, there has been a notable
advancement in the development of electric vehicles (EVs).
The integration of EVs into VPPs has emerged as a forefront
research area. EVs exhibit bidirectional flexible energy storage
unit characteristics, allowing them to effectively manage the
supply and demand equilibrium within the power grid [5, 6].
Nevertheless, the incorporation of EVs introduces a new aspect
to energy management, which presents challenges to scheduling
capabilities and may pose risks to security [7]. Consequently,
the quest for optimal solutions in management systems has
garnered significant attention, leading to ongoing enhancements
and refinements in the methods employed to address these
optimal solutions.
1.2 Literature Review
The dispatchment of energy management systems (EMS) involving EVs has been extensively researched, and the evolution of
schedule techniques can be categorized into three primary stages.
[This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly](http://creativecommons.org/licenses/by/4.0/)
cited.
© 2025 The Author(s). _IET Renewable Power Generation_ published by John Wiley & Sons Ltd on behalf of The Institution of Engineering and Technology.
g
The preliminary stage consists of strategies that are based on
established rules [8]. Notable approaches in this phase encompass
fuzzy logic, deterministic rules, as well as charging consumption and charging maintenance (CD-CS) strategies, particularly
tailored for EVs. A power management approach utilizing fuzzy
logic control to prolong battery lifespan has been introduced
[9]. Wang et al. develops a rule-based energy management
strategy that employs a Bayesian Monte Carlo approach [10].
Horrillo et al. proposes a dynamic fuzzy logic-based EMS
for multi-energy microgrids [11]. While these techniques are
straightforward to implement and have found applications in
large-scale industrial settings, they do not consider the dynamic
variations in driving conditions. Consequently, this limitation has spurred extensive exploration into optimization-driven
strategies.
1.2.2 Optimization-Based Strategies
The second stage is grounded on optimized strategies, which
are primarily categorized into global optimization and local optimization [12]. These strategies rely on numerical optimization
algorithms and modern control theory. A dynamic programming
(DP) method to approximate the solution to the Bellman equation has been utilized, aiming to derive the optimal discrete
solution for planning [13]. However, this approach necessitates
complete driving cycle information and entails a substantial
computational burden. In a similar vein, a DP optimized energy
management strategy for series-parallel hybrid vehicles has
been created [14]. This strategy leverages the optimal control
sequence from DP to investigate the optimal operational characteristics of powertrain component. Nonetheless, it is important
to note that optimization strategies are frequently constrained
by computational capabilities and may not adequately address
uncertainties.
In contrast, the real-time optimization strategy known as the
equivalent consumption minimization strategy (ECMS) has been
extensively studied. The effectiveness of this method by incorporating a fuzzy inference system (FIS) for online estimation
of the reference state of charge (SOC) and an adaptive update
law that integrates traffic recognition into the adaptive equivalent consumption minimization strategy (A-ECMS) has been
demonstrated [15]. Nevertheless, the optimization effectiveness
of ECMS is constrained by the selection of the equivalent
factor [16]. Model predictive control (MPC) addresses this
issue by converting the global optimization problem into an
instantaneous or local optimization problem, enabling online
optimization [17]. MPC is often considered a compromise
between DP and ECMS, leveraging rolling optimization and
feedback correction mechanisms to achieve superior economic
performance compared to ECMS [18]. Ganesh et al. proposes
a hybrid moving horizon estimation-model predictive control (MHE-MPC) framework for energy-optimal management
[19]. Ramesh et al. develops a multiparametric multi-objective
MPC framework [20]. Nonetheless, if the prediction is inaccurate, the control performance of MPC may not always be
satisfactory.
g g
The third stage involves the implementation of a learningbased strategy [21]. Deep reinforcement learning (DRL) has
emerged as a significant tool for addressing virtual power plant
scheduling challenges due to its robust adaptive capabilities and
effective management of intricate dynamic environments [22].
DRL leverages the strengths of deep learning and reinforcement
learning, allowing it to autonomously acquire optimal scheduling
approaches through continual interaction with the environment,
thereby facilitating efficient management of diverse energy
resources.
1.2.3.1 Traditional DRL Strategies. Gao et al. proposes a
novel variable boundary reinforcement learning (VBRL) algorithm to address dynamic environmental conditions [23]. Lin
et al. proposes a self-tuning maximum power point tracking
(MPPT) framework integrating reinforcement learning (RL) with
a Beta parameter constraint mechanism [24]. Wang et al. proposes
an online model-free RL framework for joint optimization of
charging scheduling and dynamic pricing in public EV stations
[25]. An online control framework based on a Q-learning fuzzy
inference system (QLFIS) has been introduced, which demonstrates commendable dynamic performance [26]. While this
conventional reinforcement learning-based strategies is relatively
straightforward to deploy, they are susceptible to the ‘curse of
dimensionality’, and the training process can be time-intensive
[27].
1.2.3.2 Introduction and Optimization of DRL. In an
effort to enhance both fuel efficiency and training effectiveness,
an energy management strategy for EVs that utilizes deep Qlearning (DQL) has been proposed [28]. The researchers also
incorporate Bayesian optimization (BO) as a hyperparameter
tuning method to optimize the configuration of the EMS. This
approach is adept at handling multi-dimensional continuous
state inputs and demonstrates superior control performance
compared to QL. In contrast, conventional DQL strategies often
encounter challenges related to Q-value overestimation. A MPC
system based on EMS and double deep Q-learning (DDQL) has
been proposed, which delivers fuel efficiency levels comparable
to those achieved by offline stochastic dynamic programming
strategies [29]. A technique that integrates DDQL to tackle the
backward horizon optimal problem within the MPC module has
been introduced, thereby enhancing the adaptability of energy
management in dynamic environments [30].
1.2.3.3 Continuous Control and Distributed RL Applications. The energy management of VPPs with EVs is commonly
regarded as a continuous control problem. The discreteness of
DQL can hinder advancements in fuel economy. To address
the discretization errors associated with DQL, actor-critic (AC)
framework has been utilized to enable continuous action output
[31]. This method introduces the prioritized experience replay
(PER), incorporating DP to enhance training efficiency significantly. A locality-sensitive hashing (LSH) based on PER has
been presented, which offers enhanced exploration capabilities and management performance [32]. However, in scenarios
with large-scale training datasets, the deep deterministic policy
gradient (DDPG) exhibits better performance to traditional RL
[33]. Additionally, DDPG has been proposed, a fully continuous
g g Q,
thereby improving system applicability [34]. Yu et al. proposes
an energy management algorithm based on DDPG without
requiring prior knowledge of building dynamics and uncertain
parameters [35]. Wang et al. combines computer vision and
DRL to enhance the fuel economy [36]. Lu et al. presents a
reward shaping-based actor-critic deep reinforcement learning
(RS-ACDRL) algorithm for managing residential energy consumption [37]. He et al. proposes a policy updating method
based on offline deep reinforcement learning to address energy
optimization in hybrid electric vehicles [38]. He et al. proposes a
hierarchical predictive energy management strategy integrating
the DDPG algorithm [39]. However, similar to DQL, DDPG is
susceptible to overestimation due to maximization operations, Li
et al. propose distributed proximal policy optimization and EMSs
based on asynchronous advantage actor-critic (A3C), demonstrating favourable training efficiency and economic performance
[40]. Furthermore, to investigate the effectiveness of distributed
reinforcement learning in energy management, twin delayed
deep deterministic policy gradient (TD3) has been developed [41,
42]. In Table 1, a comprehensive literature taxonomy table is
presented between the recent studies.
1.3 Research Gaps and Contributions
The management of energy within VPPs that integrate EVs
through DRL has become a significant focus of research in recent
years. However, there are two major challenges that persist in
this field. Initially, in complex dynamic environments, there
exist technical challenges that hinder the complete utilization
of the self-learning and robust exploration features of DRL
for the improvement of multi-objective scheduling methodologies. Moreover, prevailing studies predominantly concentrate
on single-objective optimization, neglecting the diversity and
intricacy inherent in multi-objective optimization. Secondly, the
substantial volume of data produced by EVs and their associated
devices result in suboptimal information processing efficiency,
significantly hampering the learning efficacy of DRL. Consequently, it is imperative, from both theoretical and practical
standpoints, to develop a DRL model that can effectively tackle
complex energy management issues. This model must also
provide an accurate assessment of its actual operational costs,
while taking into account the efficiency of data processing and
the requirement for multi-objective optimization.
In an effort to address the identified research gaps, this study
proposes an energy management strategy for VPPs utilizing the
DQN and TD3 to optimize scheduling strategies. The research
delves into the topic comprehensively, examining it from three
distinct perspectives:
i. This study aims to investigate the implications of integrat
ing EVs into VPPs, examining the economic advantages,
enhancements in energy efficiency.
ii. This study employs deep Q-network (DQN) and the min
imum redundancy maximum relevance (mRMR) criteria
to identify and extract characteristic data features of EVs,
with the aim of enhancing the prediction of future charging
demands for these vehicles.
y p p
Ref. Contribution
(A) Ruled-based
[8] Developed strategies based on predefined rules
[9] Proposed fuzzy logic control for battery life
[10] Developed rule-based strategy with Bayesian
[11] Proposed dynamic fuzzy logic-based system
(B) Optimization-based
[13] Implemented DP methods for discrete planning
[14] Developed DP strategies using control sequences
[15] Integrated fuzzy inference systems with ECMS
[16] Analysed ECMS regarding equivalent factor
[17] Implemented MPC to local optimization
[18] Developed rolling optimization in MPC
[19] Proposed MHE-MPC framework
[20] Developed multi-objective MPC framework
(C) Learning-based
[21] Constructed online control framework
[22] Developed Q-learning combined with Bayesian
[23] Developed VBRL algorithm
[24] Constructed MPPT-RL-Beta framework
[25] Proposed online model-free RL
[26] Introduced QLFIS framework
[28] Designed DQL for EVs energy management
[29] Implemented MPC with dual deep Q-learning
[30] Integrated DDQL to address backward problem
[31] Designed Actor-Critic framework
[32] Developed sensitive hashing based on PER
[34] Proposed DDPG
[35] Proposed DDPG without prior knowledge
[36] Combined computer vision with DRL
[37] Presented RS-ACDRL algorithm
[38] Proposed policy updating method by offline DRL
[39] Proposed DDPG for EV management
[40] Developed distributed optimization and A3C
[41] Designed TD3 to address DDPG overestimation
[42] Implemented TD3 and soft actor-critic
iii. Constructing a simulation model using real operational data
is essential to thoroughly evaluate the cost-effectiveness
of the strategy across various operating conditions. This
approach also helps confirm the feasibility and effectiveness
of the algorithm in intricate energy management scenarios.
The remainder of this article is structured as follows. Section 2
introduces fundamental concepts of the method proposed in this
study. Section 3 introduces the mathematical model of VPPs
incorporating EVs and examines the internal resource interac
pp,
research framework, and algorithm details. Section 5 presents
the simulation outcomes and offers an elaborate account of the
training procedure. Finally, Section 6 encapsulates the research
discoveries and outlines future research directions.
2 Preliminaries
2.1 Deep Reinforcement Learning
DRL constitutes a cutting-edge advancement in the field of
artificial intelligence, integrating the advantages of deep learning
and reinforcement learning to tackle complex decision-making
problems. Through acquiring the optimal strategy concerning
states and actions within a given environment, DRL has exhibited
formidable prowess across diverse domains. The agent engages
with the environment to acquire a strategy that maximizes its
cumulative reward. This process entails the agent’s perception of
the environmental state, the selection of an appropriate action,
and the subsequent refinement of its strategy based on feedback
received in the form of rewards.
DRL issues are commonly represented as a Markov decision
process (MDP), which is defined as a five-tuple (?, ?, ?, ?, ?) and
can be articulated as follows:
(??, ??, ??+1, ??, ?) (1)
where ? is state, ? is action, ??+1 is next state by state transfer
function ?, ? is reward, ? is discount rate.
Within the field of DRL, the training of an agent predominantly
involves the simultaneous development of both the policy network and the value network. The overarching objective is to
optimize value, which is achieved by establishing a value function
to assess the value of various decisions.
?? = ?? + ? × ??+1 + ? <sup>2</sup> × ??+1 + ⋯ + ? <sup>?−?</sup> × ?? (2)
where ?? denotes the total reward of the current round after
the ? moment decision, ?? denotes the reward in ? moment
decision state.
According to the definition of discount return, it can be obtained:
EMS
FIGURE 1 VPP-EV model.
policy ? in the current state, ?∗(??, ??) denotes the expectation
of the highest value in ?? of the ?? according to ? at ? moment.
The expectation ? eliminates all states and all actions after the ?
moment. Therefore, the optimal action value function ?∗ is used
to maximize expectation to eliminate ?, and ?? is never less than
or equal to ?∗.
According to the above definition and the optimal Bellman
equation, the Q learning formula approximated by Monte Carlo
method is:
?∗(??, ??; ?) ≈?? + ? × max?∈?(??+1, ?; ?) (6)
where ? is the parameters of Q-network, ?∗(??, ??, ?) denotes
prediction of the target through the neural network layer, the
right formula is prediction of the target again by experience after
the next state.
2.2 Virtual Power Plant
The primary components of VPPs are illustrated in Figure 1. VPPs
are governed by an integrated EMS that oversees all operations.
Functioning as a novel energy management framework, VPPs
facilitate the efficient operation and reliable power supply of the
electrical grid by integrating and optimizing DERs. It functions
as a virtual energy management entity that consolidates and
synchronizes DERs through information and communication
technology to achieve centralized scheduling and optimized
management. The primary aims encompass improving the efficiency of energy utilization, reducing power losses, and providing
support for flexibility and stability within the power grid. Typically, the VPP aims for two main objectives: power balance and
economic maximization, the two objectives are as follows.
?? = ?? + ? ×
∑?
?=?+1
? <sup>?−?−1</sup> × ?? (3)
where <sup>∑?</sup>
?=?+1 <sup>??−?−1 × ??</sup> <sup>is ??+1.</sup>
A form of optimal Bellman equation can be derived according to
the definition of action value function and optimal action value
function. The formula of the two value functions is as follows:
??(??, ??) = ?[?? ∣?? = ??, ?? = ??] (4)
?∗(??, ??) = max??[?? ∣?? = ??, ?? = ??] (5)
where ?? denotes the expectation of the value of the current
action after ?? performs the action ?? according to the action
∑?
?=1
∑?
?=1
∑?
?=1
?? <sup>load</sup> = 0 (7)
?? <sup>load</sup>
?
?gen +
?? <sup>stor</sup>
?? <sup>stor</sup>
gen
?
)
(8)
min
∑?
?=1
??
(
?
(
where ?
?gen is the output of generator ?, ?? <sup>stor</sup>
where ??gen is the output of generator ?, ?? <sup>stor</sup> is storage power
in battery ?, ?? <sup>load</sup> is local load demand for user ?, ?? is cost of
generator ?.
p g
<u>?</u> <sup>?−1</sup> <u>(1 −</u> <u>?)</u> <sup>?−1</sup>
3.1 Micro-Conventional Gas Turbine
Micro-conventional gas turbine (MT) is known for its short
start-up and shutdown times, along with its ability for flexible
power regulation. Additionally, it can offer ancillary services to
the electricity market to optimize its economic advantages. The
model is outlined as follows:
?MT = ?MT + ?MT?MT,? + ?MT?MT <sup>2</sup>,? (9)
?MT <sup>?</sup>,? <sup>= [?MT,?(1 −</sup> <sup>?MT,?)]?MT,?</sup> (10)
where ?MT and ?MT <sup>?</sup>,? <sup>represent</sup> <sup>the</sup> <sup>fuel</sup> <sup>cost</sup> <sup>and</sup> <sup>start-stop</sup> <sup>cost</sup>
of the unit, ?MT, ?MT and ?MT are the energy consumption
coefficients, ?MT,? is the output of the unit, ?MT,? represents the
start-stop status of the unit, ?MT,? is the cost of a single start-stop.
(16)
?(?) =
⎧
⎪
⎨
⎪⎩
∫
1, 0 ≤ ? ≤ 1, ? ≥ 0, ? ≥ 0
0 <sup>??−1(1 −</sup> <sup>?)?−1??</sup>
1
0, otherwise
where ? symbolizes solar radiation, ? and ? denotes the shape
parameter of the ? distribution.
Based on historical data of solar radiation intensity, and are
determined, ? and ? can be calculated as follows.
)
(17)
? = (1 − ?) ×
( <u>?</u> <u>× (1 −</u> <u>?)</u>
- 1
? <sup>2</sup>
? = <sup><u>?</u></sup> <sup><u>× ?</u></sup> (18)
1 − ?
MT <sup>min</sup> <sup>≤</sup> <sup>?MT,?</sup> <sup>≤</sup> <sup>?MT,??</sup> MT <sup>max</sup>
?MT,??MT <sup>min</sup>
MT <sup>max</sup> (11)
where ? and ? represent the expected value and standard
deviation of solar radiation intensity. The distribution function of
radiation intensity is as follows.
?max
?(?) = ∫
?min
?(?)?? (19)
MT <sup>−</sup> <sup>≤</sup> <sup>?MT,?</sup> <sup>−</sup> <sup>???,?−1</sup> <sup>≤</sup> <sup>?MT,?Δ?+</sup>
?MT,?Δ? <sup>−</sup>
MT <sup>+</sup> (12)
where ?max and ?min represent the limits of solar radiation
intensity.
3.3 EV Exchange Model
This study focuses on the state changes of EVs, specifically the
dynamic variations in SOC of battery that illustrate the influence of EVs participating in VPPs dispatchment. The formula
representing the change of SOC is outlined as follows.
SOC?+1 = SOC? + <sup>?ev,?</sup> <sup>×</sup> <sup>?</sup> (20)
?
SOCmin ≤ SOC? ≤ SOCmax (21)
(
MT <sup>on</sup>,?−1 <sup>−</sup> <sup>?</sup> MT <sup>on</sup>
?MT <sup>on</sup>
MT
)
(?MT,?−1 − ?MT,?) ≥ 0 (13)
(
MT <sup>off</sup>,?−1 <sup>−</sup> <sup>?</sup> MT <sup>off</sup>
?MT <sup>off</sup>
MT
)
(?MT,? - ?MT,?−1) ≥ 0 (14)
where ?MT <sup>max</sup>
MT <sup>min</sup> <sup>represent the limits of MT output, Δ?+</sup>
MT <sup>max</sup> <sup>and ?</sup> MT <sup>min</sup>
where ?MT <sup>max</sup> <sup>and ?</sup> MT <sup>min</sup> <sup>represent the limits of MT output, Δ?</sup> MT <sup>+</sup> <sup>and</sup>
Δ?MT <sup>−</sup> <sup>denotes the upper and lower limits of MT’s ramp-up, ?</sup> MT <sup>on</sup>,?−1
indicates the time that MT has been running, ?MT <sup>on</sup> <sup>indicates the</sup>
shortest startup time of MT, ?MT <sup>off</sup>,?−1 <sup>indicates the time that MT has</sup>
been stopped, ?MT <sup>off</sup> <sup>indicates the shortest downtime of MT.</sup>
MT <sup>−</sup> <sup>denotes the upper and lower limits of MT’s ramp-up, ?</sup> MT <sup>on</sup>
MT <sup>off</sup> <sup>indicates the shortest downtime of MT.</sup>
3.2 Photovoltaic
Photovoltaic (PV) relies on the photovoltaic effect occurring on
semiconductor surfaces, converting absorbed solar energy into
electrical energy. When equipped with maximum power point
tracking, the power output of a photovoltaic device can be directly
expressed as follows.
? <sup>max</sup>
discharge <sup>max</sup> <sup>≤</sup> <sup>?ev,?</sup> <sup>≤</sup> <sup>?</sup> charge <sup>max</sup>
charge <sup>max</sup> (22)
where SOC? denotes the state of charge, ?ev,? denotes the output
of EVs, ? denotes the conversion efficiency, SOCmax and SOCmin
denote the limit of state, ?charge <sup>max</sup> <sup>and ?</sup> discharge <sup>max</sup> <sup>denote the limit of</sup>
output from EVs.
Following the integration of EVs, it is imperative for the VPP to
uphold a stable balance of electricity to guarantee system stability
and safety as follows.
[
?air + <sup><u>??</u></sup> <sup><u>−</u></sup> <sup><u>20</u></sup>
800
<sup><u>−</u></sup> <sup><u>20</u></sup> ?? - ?ref
800
?pv,? =
(
1 − ?
)]
?PV???PV?PV (15)
where ? denotes the photovoltaic panel’s conversion efficiency,
?air denotes the atmospheric environmental temperature, ??
stands for the normal operating temperature, ?ref is the reference
temperature, ?PV signifies the reference efficiency, ?? represents
the solar radiation intensity, ?PV is the area of a single panel, ?PV
is the number of photovoltaic panels.
PV exhibits characteristics such as randomness, intermittency,
and fluctuation, with its output intensity being dependent on the
solar radiation intensity. The distribution function is commonly
employed to model solar photovoltaic radiation intensity, with the
where ?gen,?, ?import,?, ?export,? and ?ev,? are costs.
∑
??,? + ???,? + ?import,? = ?? + ?ev,? + ?export,? (23)
?
where ??,? is output of MT, ?import,? and ?export,? is exchange with
grid, ?? is load.
The VPP aims to simultaneously minimize system costs to attain
economic objectives as follows.
min
∑
?
(?gen,? + ?import,? - ?export,? + ?ev,?) (24)
p
Parameters ?? ?? ??
?MT 0.0034 0.001 0.001
?MT 3 10 15
?MT 30 40 70
?MT <sup>min</sup> <sup>(kWh)</sup> 1 5 10
?MT <sup>max</sup> <sup>(kWh)</sup> 150 375 500
Δ?MT <sup>+</sup> <sup>(kWh)</sup> 100 100 100
Δ?MT <sup>−</sup> <sup>(kWh)</sup> 100 100 100
? 0.9 0.9 0.9
?(yuan) 80 80 80
SOCmin 0.1 0.1 0.1
SOCmax 0.9 0.9 0.9
?charge <sup>max</sup> <sup>(kWh)</sup> 10 10 10
?discharge <sup>max</sup> <sup>(kWh)</sup> 10 10 10
?penalty 0.9 0.9 0.9
?grid <sup>max</sup> <sup>(kWh)</sup> 100 100 100
The main parameters involved in the virtual power plant are
shown in Table 2.
4 Method
4.1 Overview
Figure 2 presents a detailed representation of the process involved
in VPPs that integrates EVs. In Figure 2A, the diagram delineates
the approach utilized for the extraction of user characteristics
related to EVs through the application of DQN.
Figure 2B illustrates the training process of DQN, in which
the agent engages with the environment continuously and
determines the optimal action through the AC. The detailed integration of TD3 is elaborated in Section 4.3. In order to assess the
robustness and efficacy of the proposed methodology, a variety
of widely utilized algorithms and settings have been established.
These algorithms encompass TD3, DDPG, and Gurobi, while the
environment comprises EVs and battery.
As illustrated in Figure 2C, following the conclusion of the
training process, the EMS is capable of interfacing with EVs to
enable real-time decision-making and develop efficient energy
management strategies.
4.2 EV Features Extract and Demand Prediction
Based on Data Driven
Figure 3a shows the input data collected during the training
process of DQN. Figure 3b shows the local electricity demand
containing EVs, which is predicted based on typical features
selected by DQN. The algorithm details is listed in Appendix A.
EV Construction
0.16
0.14
0.12
0.10
0.08
0.06
0.04
0.02
2
1
Total cosumption
Daily max
Daily min
Mean load
Peak-valley
Valley coefficient
Load rate
Difference rate
Peak consumption rate
<sup>Normal period</sup>
<sup>Fluctuation rate</sup>
Night consumption
Consumption peak
Median consumption
A
0
0 1000 2000 3000 4000 5000
User
0.00
0 100000 200000 300000 400000 500000
Day ID
Critic
network
Adam optimizer
B
Critic
network
Adam optimizer
Datasets
TD3 Agent
Actor
network
Adam optimizer
_Gradient_
_L(w1)_
Update _w1_
_Gradient_
_L(_ - _)_
Update � _Gradient_ _L(w2)_
Update _w2_
Actual network
_Gradient_
Actual network
Soft
update
Target network
_Gradient_
_w2_
Actual network
_y2_ updateSoft
Target network
_y_ 1 updateSoft
Target network
_w1_
_y1'_ _y2'_
min
Update Update
Batch size Random sampling
_μ_ ( _θ_ ) C
Replay _st_, _at_, _st_ +1, _rt_ noise
_st_, _at_, _st_ +1, _rt_ Replay
Buffer
<sup>_a_</sup> _t_
FIGURE 2 Overall framework of proposed method.
4.3 VPP Energy Management Strategy Based on
TD3
The TD3 represents an advancement of the DDPG in DRL,
specifically designed to tackle decision-making challenges within
continuous action spaces. In the context of energy dispatchment
for VPP incorporating EVs, the TD3 is employed to address
intricate optimization tasks. The dispatch issue is formulated
and resolved by defining the state space, action space, and
reward function. The methodology for addressing the energy
scheduling challenge in VPPs with EVs using TD3 is illustrated
in Figure 2B,C.
In TD3, the agent learns the optimal policy by interacting with
the environment, executing a series of interaction actions and
self-learning actions as an intelligent decision-making entity. TD3
effectively combines the advantages of policy search methods and
value functions by introducing mechanisms such as double Qnetworks, delayed policy updates, and target network smoothing,
which enhances the stability and performance of learning. TD3
is a non-policy and model-free algorithm that learns the optimal
policy by sampling transitions from an experience replay pool
throughout the training process. The details of TD3 algorithm
code framework are listed on Appendix B.
Therefore, this study uses the TD3 to solve the energy system
dispatchment optimization problem, which can better handle
dynamic scheduling and resource optimization in continuous
action spaces. The state variables and action variables for the
TD3-based EMS are set as follows.
{
? =
? =
?1,?, ?2,?, ?3,?, ?ev,?
{
{
?, ?, ?, ?1,?−1, ?2,?−1, ?3,?−1, ?ev,?−1, ?ev,?−1
}
} (25)
2
1
Total cosumption
Daily max
Daily min
Mean load
Peak-valley
Valley coefficient
Load rate
Difference rate
Peak consumption rate
<sup>Normal period</sup>
<sup>Fluctuation rate</sup>
Night consumption
Consumption peak
Median consumption
0
0 1000 2000 3000 4000 5000
User
(a) Input data of DQN
0.16
0.14
0.12
0.10
0.08
0.06
0.04
0.02
Demand (kWh)
0.00
0 100000 200000 300000 400000 500000
Day ID
?actual = ?1,? + ?2,? + ?3,? - ?ev,? (31)
?net = ?? - ?pv (32)
where Reward? is the reward for one round, and Reward?−1 is
the reward settled in the previous round, ?1, ?2, ?3 are the
costs of the MTs, ?ev is the cost of EVs, ?penalty is the imbalance
penalty cost, ?buy is the cost of purchasing electricity from the
grid, ?deficient is the insufficiency penalty, ?sell is the revenue from
selling electricity to the grid, ?excess is the excess electricity, ?penalty
is the penalty coefficient, ?unbalance is the unbalance electricity,
?actual is the actual power generation, ?1,?, ?2,?, and ?3,? are the
output of MTs, ?net is the net load, ?? is the demand, ?pv is the
photovoltaic power generation.
The reward function in this context is formulated as a backward
cumulative function to minimize costs. However, the principle of
action selection in TD3 aims to maximize returns, necessitating
the design of the reward function as negative.
Currently, the policy network ?(?; ?) generates a deterministic
policy, represented by a ?-dimensional vector as the action vector.
For a given state, the action a produced by the policy network is
deterministic and not randomly sampled.
The value network ?(?, ?; ?) serves as an estimation of the action
value function ??(?, ?). Taking the state and action as inputs, the
value network produces a real number q that signifies the value of
selecting that action, hence, a higher _q_ indicates a better action.
Consequently, the value network can assess the performance of
the policy network. During the training phase, the value network
facilitates the training of the policy network. Upon the conclusion
of this training, the policy network assumes control over the
actions of the agent.
TD3 is an off-policy method that involves utilizing outdated policy
network parameters in the behaviour policy, thereby decoupling the experience collection process from the neural network
training. The experiences gathered are stored in a replay buffer.
Therefore, when training the strategy network, deterministic
policy gradients will be used, and the specific derivation is as
follows.
? = (?, ?(?; ?); ?) (33)
?(?) = ??[?(?, ?(?; ?); ?)] (34)
max ?(?) (35)
?
(b) Scenario of electricity load demand
FIGURE 3 Input data of DQN and the forecast of electricity load
demand.
where ? is time step, ? is price of electricity, ? is load, ?1,?, ?2,?, ?3,?
are the outputs of the three thermal power generators, ?ev,?
denotes the SOC of EVs. The objective reward of the EMS
based on TD3 is to control the minimum operating cost while
meeting load demand, and to keep the SOC within an appropriate
range, minimizing the imbalance penalty as much as possible.
Therefore, the reward function is defined as:
Reward? = Reward?−1 − ?1 − ?2 − ?3 − ???− (26)
?penalty − ?buy − ?deficient + ?sell
?penalty = ?excess × ?penalty (27)
?deficient = |?unbalance| × ?penalty (28)
?excess = ?unbalance − ?grid <sup>max</sup> (29)
?unbalance = ?actual − ??a?? (30)
∇??
)
; ?
(36)
?? ≜ ∇??
(
??, ?
(
??; ?
(
)
where ?(?; ?) is the policy network, ? is the parameters of ?, ?(?)
is the expectation of _q_, ?? is deterministic policy gradients.
According to the chain rule, the deterministic policy gradient can
be obtained:
(
??; ?
)
; ?
)
= ∇??
(
??; ?
(
)
⋅∇??
)
(37)
(
??, ?
(
??,̂ ??; ?
j y p y g g
)
⋅∇??
(
(38)
?←? + ?⋅∇??
(
??; ?
??,̂ ??; ?
)
, p j g
gradient ascent, thereby finalizing the training process of TD3.
The process details are as follows.
+ ? (45)
where, ? is the learning rate and̂ ?? denotes the action selected by
current policy network.
The value network is trained using conventional temporaldifference (TD) algorithms. Upon selecting a tuple from the
experience replay buffer, the parameters are updated once based
on that tuple. The update process can be outlined as follows:
Firstly, the action value is assessed by considering the current
state and the selected action with respect to the existing value
network parameters. Subsequently, the TD target is computed.
?? <sup>−</sup> +1 <sup>= ?</sup>
?? <sup>−</sup>
(
??+1; ?now <sup>−</sup>
now
)
(
?1,? <sup>−</sup> +1 <sup>= ?</sup>
(
?2,? <sup>−</sup> +1 <sup>= ?</sup>
(
1,? <sup>−</sup> +1 <sup>= ?</sup>
(
2,? <sup>−</sup> +1 <sup>= ?</sup>
??+1,̂ ?? <sup>−</sup>
? <sup>−</sup> +1 <sup>; ?</sup> 1, <sup>−</sup>
??+1,̂ ?? <sup>−</sup>
? <sup>−</sup> +1 <sup>; ?</sup> 2, <sup>−</sup>
)
1, <sup>−</sup> now
)
2, <sup>−</sup> now
{
}
1,? <sup>−</sup> +1 <sup>,̂ ?</sup> 2,? <sup>−</sup> +1
(46)
(47)
(48)
?? = ?? + ?⋅min
?1,? <sup>−</sup>
(
??, ??; ?
(39)
?? = ?
)
?1,? = ?(??,̂ ??; ?1,now) (49)
?2,? = ?(??,̂ ??; ?2,now) (50)
?1,? =̂ ?1,? −̂ ?? (51)
?2,? =̂ ?2,? −̂ ?? (52)
?1,new ←?1,now − ?⋅?1,? ⋅∇??(??, ??; ?1,now) (53)
?2,new ←?2,now − ?⋅?2,? ⋅∇??(??, ??; ?2,now) (54)
?new ←?now + ?⋅∇??(??; ?now) ⋅∇??(??,̂ ??; ?1,now) (55)
??+1 = ?(??+1, ?(??+1; ?)?; ?) (40)
?? = ?? + ?⋅̂ ??+1 (41)
wherê ?? denotes the prediction,̂ ?? is TD target, ?? is reward, ? is
discount rate.
According to the current TD target, the loss function is defined,
followed by the calculation of the gradient. Subsequently, the
value network parameters are updated using the gradient descent
method as follows.
)
−̂ ?? <sup>2</sup>
]
(42)
now <sup>−</sup> (56)
?(?) = <sup><u>1</u></sup>
2
[
?
(
??, ??; ?
(
? <sup>−</sup>
new <sup>−</sup> <sup>= ??</sup> new <sup>+ (1 −</sup> <sup>?)?−</sup>
∇??(?) = (̂?? −̂ ??) ⋅∇??(??, ??; ?) (43)
?←? - ?⋅∇??(?) (44)
where ?(?) is loss function, ? is another learning rate.
To address the challenges associated with overestimation and bias
propagation in deterministic policy gradients, modifications are
made to the neural network structure during parameter training.
Furthermore, a truncated double Q-learning method is employed
to augment the TD algorithm. Additionally, noise is introduced
during action computation, and the exploration capability of the
algorithm is enhanced by sampling elements from a truncated
normal distribution.
The truncated double Q-learning algorithm utilizes two value networks and one policy network, in addition to three corresponding
target networks. Consequently, the training procedure of TD3 can
be outlined as follows:
Firstly, noise is sampled from a truncated normal distribution.
Subsequently, the target policy network and two target value
networks are utilized to predict the action and action value,
respectively, following which the TD target is computed. The
two value networks then generate predictions to calculate the
TD error, and the parameters of the value networks are updated
through gradient descent based on the TD error. As for the policy
network, predictions are made via the policy network after a
?1, <sup>−</sup> new <sup>= ??1,new + (1 −</sup> <sup>?)?</sup> 1, <sup>−</sup> now (57)
?2, <sup>−</sup> new <sup>= ??2,new + (1 −</sup> <sup>?)?</sup> 2, <sup>−</sup> now (58)
wherê ?? <sup>−</sup>
̂ ? <sup>−</sup> +1 <sup>,</sup> <sup>??+1,</sup> <sup>and</sup> <sup>?−</sup>
wherê ?? <sup>−</sup> +1 <sup>,</sup> <sup>??+1,</sup> <sup>and</sup> <sup>?</sup> now <sup>−</sup> <sup>are</sup> <sup>action,</sup> <sup>state,</sup> <sup>and</sup> <sup>weight</sup> <sup>of</sup> <sup>target</sup>
network, respectively, ? is noise,̂ ?1,? <sup>−</sup> +1 <sup>denotes the</sup> <sup>_q_</sup> <sup>value calcu-</sup>
lated by target network 1,̂ ?2,? <sup>−</sup> +1 <sup>denotes the</sup> <sup>_q_</sup> <sup>value calculated by</sup>
target network 2, ? <sup>−</sup> is weight of target network, ? is TD error,
?? denotes TD value, ? is manually adjusted hyperparameters for
soft update.
The algorithm flow of TD3 is listed in Algorithm 1.
5 Results and Discussion
5.1 Precondition of Verification
The local electricity demand containing EVs is shown in
Figure 3b. In order to ensure the generalization ability, the initial
SOC is set at 0.5, and the limit is set between 0.1 and 0.9.
The other main parameters involved in the VPPs are shown
in Table 2. Employing the scenario analysis methodology, two
distinct scenarios and three algorithms have been established
to evaluate the efficacy of the proposed approach, as shown in
Table 3. Battery charging and discharging in EV scenario has no
cost but degradation cost, and the charge and discharge rate is
0.9. All DRL methods utilized in this paper run on the Windows
g gy y g
Require: Environment ???, episodes ???_????????, max
steps ???_?????, batch size ????ℎ_???? Learning rates ?, ?,
discount ?, noise ?, policy noise ?? Policy delay
??????_?????, soft update factor ?
Ensure: Trained actor network parameters ? <sup>actor</sup>
1: Initialize environment and parameters
(?????_???, ??????_???), actor ????? and Critics
??????1, ??????2, target networks ?????_??????,
??????1_??????, ??????2_??????, replay buffer
????????????
2: for episode = 1 to ???_???????? do
3: ?????←???.?????()
4: for step = 1 to ???_????? do
5: ??????←?????.??????_??????(?????) + (0, ?)
6: ????_?????, ??????, ????←???.????(??????)
7: ????????????.?????(?????, ??????, ??????,
????_?????, ????)
8: if ????????????.????() _>_ ????ℎ_???? then
9: ????ℎ←????????????.??????(????ℎ_????)
10: ??????, ???????, ???????, ????_??????, ?????←
????ℎ
11: ????_???????←
?????_??????(????_??????) + (0, ??)
12: ??????_?←??????? + ?⋅(1 − ?????) ⋅
min(??????1_??????, ??????2_??????)
13: ??????1_????←
???(??????1(??????, ???????), ??????_?)
14: ??????2_????←
???(??????2(??????, ???????), ??????_?)
15: ??????1.??????(??????1_????)
16: ??????2.??????(??????2_????)
17: if ????mod ??????_????? == 0 then
18: ?????_????←
−??????1(??????, ?????(??????)).????()
19: ?????.??????(?????_????)
20: ????_??????(?????_??????, ?????, ?)
21: ????_??????(??????1_??????, ??????1, ?)
22: ????_??????(??????2_??????, ??????2, ?)
23: end if
24: end if
25: ?????←????_?????
26: if done then
27: break
28: end if
29: end for
30: end for
31: return Trained actor network parameters ? <sup>actor</sup>
FIGURE 4 Power unbalance among algorithms with electricity
price and reward evolution of different hyperparameters set.
11 operating system, and the framework of DRL is Pytorch 2.0.1.
The computer hardware configuration is i5-11300H @3.10 GHz
3.11 GHz, NVIDIA GeForce MX450 GPU and 16 GB memory.
5.2 Analysis of Training Efficiency Among
Different Algorithms
The algorithms hyperparameters tested and their reward evolution in this study are presented in Table 3 and Figure 4.
As can be observed from Figure 4a, TD3-EV exhibits a consistently smaller unbalance compared to the other two algorithms.
The peak unbalance is reduced by 26.1% compared to TD3Bat and by 14.3% compared to DDPG-EV. Specifically, TD3-Bat
exhibits an average unbalance that is 462% and 11.5% higher
than the other two algorithms during the specified intervals
(2–5, 9–11, 14–17, and 21–24 h). This indicates that under the
battery algorithm, a significant portion of the generated energy
cannot be timely consumed, leading to significant costs associated
with energy storage and penalties. DDPG-EV demonstrates an
average unbalance that is 404% higher than TD3-EV. Thus, it is
evident that the EV scenario exhibits a lower unbalance than the
yp p p
Parameters ? ? ? ? Samples ? ?? Time (s)
TD3-EV 0.0001 0.0001 0.995 2 <sup>−8</sup> 256 0.1 0.2 7316
TD3-EV 0.0001 0.00001 0.990 2 <sup>−8</sup> 256 0.1 0.2 7138
TD3-EV 0.0001 0.0001 0.999 2 <sup>−8</sup> 256 0.2 0.2 7927.16
TD3-Bat 0.0001 0.0001 0.995 2 <sup>−8</sup> 256 0.2 0.2 3298.23
DDPG-EV 0.0001 0.0001 0.995 2 <sup>−8</sup> 256 0.1 0.2 6143.47
battery scenario, and the TD3 algorithm outperforms the DDPG
algorithm in managing power consumption effectively.
As illustrated in Figure 4b, the experimental results demonstrate
that the TD3-EV algorithm achieves significantly higher mean
reward compared to TD3-Bat and DDPG-EV, with performance
improvements of 84.71% and 94.39%, respectively. Within the
range of 0 to 20 rounds, The mean rewards of TD3-EV under the
conditions of ? = 0.0001, ? = 0.00001 and ? exhibit a consistent
trend. The values exhibit an increasing trend starting from −300
or −400. In contrast, TD3-Bat and DDPG-EV demonstrate a
downward trend. Among them, TD3-Bat exhibits fluctuations
starting from approximately −50. Excluding TD3-Bat, the remaining cases exhibit relatively stable performance. Nevertheless,
TD3-Bat demonstrates six fluctuations over the course of 20
rounds. During the interval from 20 to 60 rounds, DDPGEV consistently remains at −650, TD3-Bat starts to rise in an
oscillatory manner, other algorithms maintain stability near
zero.
Within the 60 to 100-round range, TD3-Bat remains in a state of
fluctuation, with its oscillatory behaviour consistently bounded
within the range of (−100, 0). While TD3-EV with ? = 0.00001
achieves a reward 19.2% higher than TD3-EV with ? = 0.0001.
However, it remains in a fluctuating state during the 90 to 100round interval and has not yet stabilized, the latter stabilizes
after 90 rounds. Furthermore, although TD3-EV with ? = 0.999
and ? = 0.2 achieves a reward 9.8% higher than TD3-EV with
? = 0.0001. However, due to the relatively narrow reward range
and the presence of continued fluctuations beyond 90 rounds, it
is not reasonable to choose.
As seen in Table 3, TD3-Bat has a 54.9% shorter computation
time compared to EV due to its simpler environment interaction.
However, the reward evolution in the battery environment,
shown in Figure 4b, is unstable, making it unsuitable for use.
Although the computation time of DDPG is 16% lower than that
of TD3, it exhibits excessive fluctuations in the training episodes
between 20 and 60. Therefore, DDPG is not selected. In addition,
the computation time of the TD3 algorithm with ? = 0.00001 is
2.4% lower than that with ? = 0.0001, but the former has not yet
converged between training episodes 90 and 100. Therefore, it is
not suitable. The TD3 algorithm with ? = 0.2 and ? = 0.999 has
a computation time 8.4% higher than that with ? = 0.1 and ? =
0.995. Furthermore, the reward values between episodes 90 and
100 have not yet converged and are lower than those of the latter.
Therefore, based on its good balance between stability, training
time, and computational efficiency, the first set of parameters
exhibits superior overall performance compared to the other sets.
TABLE 4 Analysis of critic loss.
Hour (h) TD3-EV TD3-Battery DDPG-EV
1 0.448515 1.667911 16.81442
2 0.905783 1.57132 18.53016
3 1.083718 2.385098 23.82378
4 1.410683 3.192376 28.79084
5 1.666018 4.00933 34.0377
6 2.032107 4.793072 38.4274
7 2.473916 5.550845 43.32481
8 2.80828 6.132689 48.61489
9 3.04702 7.13738 53.0072
10 3.563076 7.699511 56.80326
11 1.764263 2.015392 23.51357
12 2.307341 2.772328 42.64852
13 2.352622 2.998439 52.52729
14 2.905607 3.526117 62.98933
15 3.026869 3.883044 71.58075
16 3.799314 4.524705 82.79166
17 3.944015 5.109792 93.08815
18 3.98647 5.777887 103.6054
19 4.310284 6.583944 113.2043
20 4.907628 7.381915 124.7413
21 2.730727 2.701012 13.14947
22 2.619135 2.781275 19.50189
23 3.139557 2.837301 22.99949
24 3.579236 3.148154 26.82862
The critic loss serves as a significant metric for assessing policies
in DRL. Through an examination of the critic loss, valuable
insights can be obtained regarding the algorithm’s convergence,
stability, adaptability, and the efficacy of policy enhancement
throughout the training phase. They play a pivotal role in optimizing algorithmic performance, improving model generalization
abilities, and guaranteeing the stability of the training procedure.
A comparison of the critic loss across various algorithms and
scenarios listed in Table 4.
From the data presented in Table 4, it is evident that TD3-EV
exhibits a notable advantage in terms of critic loss. Specifically,
20
15
10
5
0
-5
-10
60
40
20
0
-20
-40
Grid
Battery
Thermal_2
Thermal_1
EV
Grid
Thermal
5 10 15 20
Hour (h)
(a) Electric vehicles scene
-60
5 10 15 20
Hour (h)
(b) Battery scene
FIGURE 5 VPP energy schedule under different scenes.
at the tenth iteration, the critic loss value for TD3-EV is 3.563076,
whereas battery-TD3 and DDPG-EV show values of 7.699511 and
56.80326, respectively, indicating a lower loss value for TD3EV. Furthermore, the critic loss value for TD3-EV demonstrates
smoother changes with increasing iterations, implying a more
stable training process. The initial critic loss value is relatively
low, starting at 0.448515 in the first iteration, indicating a faster
convergence rate. Overall, the increment in critic loss value
is minimal, progressing from 0.448515 in the first iteration to
4.907628 in the 20th iteration, showcasing its ability to sustain
good performance during prolonged training. In contrast, the
critic loss values of TD3-battery and DDPG-EV exhibit significant
fluctuations, particularly DDPG-EV, which experiences a rapid
increase in the later stages, peaking at 124.7413 in the 20th
iteration, suggesting lower stability and slower convergence
compared to TD3-EV. In summary, TD3-EV surpasses the other
two conditions in terms of training stability, convergence speed,
and overall performance.
5.3 Analysis of EV and Battery Scenes
Energy scheduling serves as a visual depiction of the EMS
performance, as illustrated in Figure 5 for two distinct scenarios.
In contrast to the battery scenario, the MT output in the EVs
charging scenario is reduced, accompanied by a decrease in
g g
power generation expenses and contributes to a more efficient
reduction in carbon emissions. Furthermore, the EV scenario
exhibits a higher discharge capacity, thereby diminishing the
expenses associated with procuring electricity from the grid.
In the EV scenario, there is a decrease in the output of MT
unit number and power output from 4062.985 to 397.0174 kWh,
resulting in an 89.45% reduction in output. This phenomenon can
be attributed to EVs being considered a dispatchable resource,
which incurs a higher cost for initiating additional thermal
power units compared to procuring electricity from the grid.
Consequently, the decision is made to cease the generation from
thermal power units.
Compared to battery scenario, the interaction between EVs
and the grid occurs more frequently and effectively, with the
interaction volume increasing by 38.5%, which is increased from
112.148 to 155.326 kWh. During high-pressure periods in the power
system, electricity prices are higher, prompting EVs to discharge
in order to generate revenue. Conversely, when the pressure in the
power system is lower, electricity prices decrease, leading EVs to
choose to charge in order to reduce charging costs.
The operational expenses of VPPs play a crucial role in determining their economic feasibility, with enhanced economic efficiency
being a fundamental factor for ensuring the sustainability. The
scheduling expenses of VPPs within the context of EVs and
battery scenarios are shown in Figure 6a. In the EV scenario,
the cost is reduced by 16.7%, which amounts to 444,100 yuan
compared to the battery. In the context of DRL, a greater reward
is generally associated with improved performance. The reward
function defines the feedback value that the agent receives
after taking a certain action in the environment, with the goal
of learning the optimal policy by maximizing the cumulative
reward. The rewards per hour of the TD3 in two scenarios are
shown in Figure 6b.
In the early stages (from 1 to 6), the rewards in the two scenarios
exhibit entangled states. This is due to the introduction of noise,
which causes TD3 to have a certain level of randomness during
initial exploration in order to better search for optimal actions,
resulting in fluctuations. However, in the battery scenario, the
maximum reward value is −0.04912, occurring at time 0, with
fluctuations reaching ten instances, indicating extreme instability. In contrast, the EV scenario achieves a maximum reward
value of 0.04499, which is 1.91 times higher than that of the battery
scenario. Moreover, the EV scenario exhibits only three instances
of fluctuation, demonstrating significantly greater stability. As the
number of hour increases (from 7 to 14), the reward trend becomes
more stable. The rewards for EVs outperform those for batteries
by 6.7%.
5.4 Analysis of Different Algorithm
Various algorithms utilize different solution strategies for
scheduling schemes in VPPs, resulting in varied cost outcomes.
Improved algorithm performance can optimize the reduction
of operational costs while efficiently coordinating strategies.
The costs under different algorithms are shown in Figure 7a. In
350
300
250
200
150
100
50
0
TD3
DDPG
Gurobi
60
40
20
0
-20
-40
EV
Battery
- �� �� ��
-60
0 5 10 15 20 25
-50
5 10 15 20
Hour (h)
(a) Costs of VPP under different algorithm
1.0
0.8
0.6
0.4
0.2
TD3
0.05
Hour (h)
(a) Costs of VPP under EV and battery scene
Battery
EV
0.00
-0.05
-0.10
-0.15
-0.20
-0.25
-0.30
0 5 10 15 20 25
Hour (h)
(b) Reward between EV and batteryscene
FIGURE 6 Costs of VPP and TD3 learning reward between EV and
battery.
particular, the cost associated with TD3 (370.017) is 89.07% lower
than that of DDPG (4062.985) and more than 100% lower than
that of Gurobi (6144), demonstrating a high degree of economic
efficiency. TD3 and Gurobi exhibit a scenario of negative costs
(from 6 to 13 and from 16 to 19), indicating that the VPP is
generating revenue (−44.99199). In contrast, DDPG incurs costs
exclusively, the most cost is 1700 yuan. This discrepancy arises
from the ability of TD3 and Gurobi to capitalize on revenue
generation opportunities through effective electricity sales and
DR tactics within specific time frames.
The SOC serves as a representative measure of the dynamic
strategy performance of EVs, indicating the rationality of EVs
under the scheduling framework of VPPs. The variations in
SOC levels under three different algorithms are illustrated in
Figure 7b. The SOC fluctuations observed in the TD3 follow
a certain pattern and exhibit a correlation with fluctuations
in electricity prices. Conversely, the DDPG demonstrates less
variability in SOC, maintaining a consistently high SOC level
(0.9) during peak demand periods. The Gurobi algorithm displays
more frequent changes in SOC compared to TD3. TD3 showcases
0.0
DDPG
Gurobi
0 5 10 15 20 25
Hour (h)
(b) SOC change under different algorithm
FIGURE 7 Analysis of costs and SOC under different algorithm.
a stable charge–discharge pattern, minimizing the frequency of
charging and discharging cycles, and displaying both charging
and discharging activities in the short term to ensure battery
safety. Both DDPG and Gurobi exhibit simultaneous charging and
discharging activities in the short term. The TD3 demonstrates
the highest level of flexibility, rendering it more suitable for
dynamic scheduling operations.
6 Conclusion
This article proposes an energy management strategy based on
TD3 for VPPs concluding EVs. The main conclusions are drawn
as follows.
i. The combination of proposed algorithm and electric vehi
cles, which is TD3-EV, demonstrates superior performance
in terms of computational efficiency, stability, and reward
convergence compared to TD3-Bat and DDPG-EV. Specif
y, p
time relative to TD3-Bat, while maintaining a 26.1% lower
peak power unbalance and a 14.3% reduction compared to
DDPG-EV. Furthermore, TD3-EV exhibits a significantly
lower critic loss, starting at 0.448515 in the first iteration and
reaching only 4.907628 by the 20th iteration, compared to
7.699511 for TD3-Bat and 56.80326 for DDPG-EV at the tenth
iteration. Although TD3-EV with ? = 0.00001 achieves a
19.2% higher reward than TD3-EV with ? = 0.0001, the latter
stabilizes after 90 rounds, whereas the former continues to
fluctuate. Similarly, TD3-EV with ? = 0.999 and ? = 0.2
achieves a 9.8% higher reward but remains unstable beyond
90 rounds. Overall, TD3-EV with ? = 0.0001, ? = 0.995, and
? = 0.1 offers the best balance of stability, computational
efficiency, and reward convergence.
ii. The application of TD3 for energy dispatch in VPPs that
incorporate EVs has the potential to mitigate carbon emissions. The findings reveal that in the EV scenario, the
number of thermal power units is reduced by 50%, leading
to an 89.45% decrease in output which is from 4062.985 to
397.0174 kWh. Additionally, the capacity of interaction electricity increases by 38.5%, resulting in a notable reduction in
purchasing costs.
iii. This study proposes an economical optimization method
based on the TD3, which introduced strategy noise, double
Q-learning, and delayed update mechanism. The results
showed that the TD3’s cost is 89.07% lower than that of
DDPG and over 100% lower than that of Gurobi. Findings also show that the economic efficiency of the VPP
operating in the EV context surpasses that of the battery scenario, resulting in a 16.7% decrease in scheduling
expenses. Ultimately, the reward performance within the EV
context exhibits a 6.7% improvement compared to the battery
scenario.
In general, the learning efficiency and robustness of DRL make
it more conducive to practical applications in EVs. Nonetheless,
to improve the efficacy of DRL, it is crucial to continue exploring
opportunities for algorithmic advancements from multiple viewpoints.
Author Contributions
Wei Hu: writing – original draft, methodology, conceptualization, writing
- review and editing. Shuo Wang: visualization, writing – original draft,
data curation, formal analysis. Puliang Du: visualization, validation,
supervision, data curation.
Acknowledgements
This work was supported by the National Nature Science Foundation of
China (Grant: 72401182).
Conflicts of Interest
The authors declare no conflicts of interest.
Data Availability Statement
Data available on request from the authors.
1. W. Fan, L. W. Ju, Z. F. Tan, et al., “Two-Stage Distributionally Robust
Optimization Model of Integrated Energy System Group Considering
Energy Sharing and Carbon Transfer,” _Applied_ _Energy_ 331 (February
[2023): 120426, https://doi.org/10.1016/j.apenergy.2022.120426.](https://doi.org/10.1016/j.apenergy.2022.120426)
2. Q. Li, F. C. Wei, Y. C. Zhou, et al., “A Scheduling Framework for VPP
Considering Multiple Uncertainties and Flexible Resources,” _Energy_ 282
[(November 2023): 1–20, https://doi.org/10.1016/j.energy.2023.128385.](https://doi.org/10.1016/j.energy.2023.128385)
3. J. Q. Song, Y. B. Yang, and Q. S. Xu, “Two-Stage Robust Optimal
Scheduling Method for Virtual Power Plants Considering the Controllability of Electric Vehicles,” _Electric Power Systems Research_ 225 (September
[2023): 1–23, https://doi.org/10.1016/j.epsr.2023.109785.](https://doi.org/10.1016/j.epsr.2023.109785)
4. H. C. Gao, T. Jin, C. Feng, C. Y. Li, Q. X. Chen, and C. Q. Kang,
“Review of Virtual Power Plant Operations: Resource Coordination and
Multidimensional Interaction,” _Applied_ _Energy_ 357 (March 2024): 1–20,
[https://doi.org/10.1016/j.apenergy.2023.122284.](https://doi.org/10.1016/j.apenergy.2023.122284)
5. M. S. Abid, R. Ahshan, R. Al Abri, A. Al-Badi, and M. Albadi, “TechnoEconomic and Environmental Assessment of Renewable Energy Sources,
Virtual Synchronous Generators, and Electric Vehicle Charging Stations
in Microgrids,” _Applied Energy_ [353 (January 2024): 1–16, https://doi.org/](https://doi.org/10.1016/j.apenergy.2023.122028)
10.1016/j.apenergy.2023.122028.
6. S. Liu, C. Lu, and G. He, “Distributed Electric Bicycle Batteries for
Subway Station Energy Management as a Virtual Power Plant,” _Applied_
_Energy_ 370 (September 2024): [1–12,](https://doi.org/10.1016/j.apenergy.2024.123094) https://doi.org/10.1016/j.apenergy.
2024.123094.
7. E. Nokandi, M. Vahedipour-Dahraie, S. R. Goldani, and P. Siano, “A
Three-Stage Bi-Level Model for Joint Energy and Reserve Scheduling of
VPP Considering Local Intraday Demand Response Exchange Market,”
_Sustainable Energy Grids_ [33 (March 2023): 1–11, https://doi.org/10.1016/j.](https://doi.org/10.1016/j.apenergy.2024.123094)
apenergy.2024.123094.
8. S. F. Silva, J. J. Eckert, F. L. Silva, et al., “Aging-Aware Optimal Power
Management Control and Component Sizing of a Fuel cell Hybrid Electric
Vehicle Powertrain,” _Energy Conversion and Management_ 292 (September
[2023): 1–20, https://doi.org/10.1016/j.enconman.2023.117330.](https://doi.org/10.1016/j.enconman.2023.117330)
9. P. Nambisan and M. Khanra, “Optimal Power-Split of Hybrid Energy
Storage System Using Pontryagin’s Minimum Principle and Deep Reinforcement Learning Approach for Electric Vehicle Application,” _Engi-_
_neering_ _Applications_ _of_ _Artificial_ _Intelligence_ 135 (September 2024): 1–15,
[https://doi.org/10.1016/j.engappai.2024.108769.](https://doi.org/10.1016/j.engappai.2024.108769)
10. Y. J. Wang, Z. D. Sun, and Z. H. Chen, “Development of Energy
Management System Based on a Rule-Based Power Distribution Strategy
for Hybrid Power Sources,” _Energy_ [175 (April 2019): 1055–1066, https://doi.](https://doi.org/10.1016/j.energy.2019.03.155)
org/10.1016/j.energy.2019.03.155.
11. P. Horrillo, P. García, E. Hosseini, C. A. García, H. Sánchez, and C. E.
Ugalde, “Dynamic Fuzzy Logic Energy Management System for a MultiEnergy Microgrid,” _IEEE Access_ [12 (July 2024): 93221–93234, https://doi.](https://doi.org/10.1109/ACCESS.2024.3422009)
org/10.1109/ACCESS.2024.3422009.
12. R. C. Huang, H. W. He, X. Y. Zhao, Y. L. Wang, and M. L. Li, “Battery Health-Aware and Naturalistic Data-Driven Energy Management
for Hybrid Electric Bus Based on TD3 Deep Reinforcement Learning
Algorithm,” _Applied_ _Energy_ 321 [(September](https://doi.org/10.1016/j.apenergy.2022.119353) 2022): 1–15, https://doi.org/
10.1016/j.apenergy.2022.119353.
13. C. Maino, D. Misul, A. Musa, and E. Spessa, “Optimal Mesh Discretization of the Dynamic Programming for Hybrid Electric Vehicles,”
_Applied_ _Energy_ 292 (June 2021): [1–15,](https://doi.org/10.1016/j.apenergy.2021.116920) https://doi.org/10.1016/j.apenergy.
2021.116920.
14. C. Rojas, L. Oca, I. Lopetegi, U. Iraola, and J. Carrasco, “A Critical
Look at Efficient Parameter Estimation Methodologies of Electrochemical
Models for Lithium-Ion Cells,” _Journal of Energy Storage_ 80 (March 2024):
[1–23, https://doi.org/10.1016/j.est.2023.110384.](https://doi.org/10.1016/j.est.2023.110384)
15. J. Q. Xue, X. H. Jiao, D. M. Yu, and Y. H. Zhang, “Predictive
Hierarchical Eco-Driving Control Involving Speed Planning and Energy
Management for Connected Plug-In Hybrid Electric Vehicles,” _Energy_ 283
[(November 2023): 1–13, https://doi.org/10.1016/j.energy.2023.129058.](https://doi.org/10.1016/j.energy.2023.129058)
of Powertrain Configurations for Power-Split Hybrid Electric Vehicle: A
Comprehensive Overview,” _IEEE Transactions on Transportation Electri-_
_fication_ [8, no. 1 (March 2022): 325–344, https://doi.org/10.1109/TTE.2021.](https://doi.org/10.1109/TTE.2021.3105244)
3105244.
17. A. Nawaz, J. Wu, J. Ye, Y. D. Dong, and C. N. Long, “Distributed
MPC-Based Energy Scheduling for Islanded Multi-Microgrid Considering
Battery Degradation and Cyclic Life Deterioration,” _Applied_ _Energy_ 329
[(November 2022): 1–13, https://doi.org/10.1016/j.apenergy.2022.120168.](https://doi.org/10.1016/j.apenergy.2022.120168)
18. H. W. Hu, K. Ou, and W. W. Yuan, “Fused Multi-Model Predictive
Control With Adaptive Compensation for Proton Exchange Membrane
Fuel Cell Air Supply System,” _[Energy](https://doi.org/10.1016/j.energy.2023.128459)_ 284 (December 2023): 1–19, https://
doi.org/10.1016/j.energy.2023.128459.
19. H. S. Ganesh, K. Seo, E. H. Fritz, et al., “Indoor Air Quality and Energy
Management in Buildings Using Combined Moving Horizon Estimation
and Model Predictive Control,” _Journal of Building Engineering_ 33 (July
[2020): 1–13, https://doi.org/10.1016/j.jobe.2020.101552.](https://doi.org/10.1016/j.jobe.2020.101552)
20. K. U. Ramesh, S. Avraamidou, and H. S. Ganesh, “Energy and
Temperature Management in Buildings Through Multi-Objective Model
Predictive Control on a Chip,” _Computers_ _and_ _Chemical_ _Engineering_
192 (January 2025): 1–15, [https://doi.org/10.1016/j.compchemeng.2024.](https://doi.org/10.1016/j.compchemeng.2024.108903)
108903.
21. X. D. Zhang, L. X. Guo, N. Y. Guo, Y. Zou, and G. D. Du, “Bi-Level
Energy Management of Plug-in Hybrid Electric Vehicles for Fuel Economy and Battery Lifetime With Intelligent State-of-Charge Reference,”
_Journal of Power Sources_ [481 (January 2021): 1–12, https://doi.org/10.1016/](https://doi.org/10.1016/j.jpowsour.2020.228798)
j.jpowsour.2020.228798.
22. C. G. Ruan, D. W. Qiu, S. Sivaranjani, A. S. Awad, and G. Strbac,
“Data-Driven Energy Management of Virtual Power Plants: A Review,”
_Advances in Applied Energy_ [14 (March 2024): 1–19, https://doi.org/10.1016/](https://doi.org/10.1016/j.adapen.2024.100170)
j.adapen.2024.100170.
23. F. Gao, R. Z. Hu, and L. F. Yin, “Variable Boundary Reinforcement
Learning for Maximum Power Point Tracking of Photovoltaic GridConnected Systems,” _Energy_ 264 [(February](https://doi.org/10.1016/j.energy.2022.126278) 2023): 1–13, https://doi.org/
10.1016/j.energy.2022.126278.
24. D. Lin, X. Li, S. Ding, H. Wen, Y. Du, and W. Xiao, “Self-Tuning
MPPT Scheme Based on Reinforcement Learning and Beta Parameter in
Photovoltaic Power Systems,” _Energy_ 36 (December 2021): 13826–13838,
[https://doi.org/10.1109/TPEL.2021.3089707.](https://doi.org/10.1109/TPEL.2021.3089707)
25. S. Wang, S. Bi, and Y. A. Zhang, “Reinforcement Learning for RealTime Pricing and Scheduling Control in EV Charging Stations,” _IEEE_
_Transactions on Industrial Informatics_ 17 (February 2021): 849–859.
26. L. Bo, L. J. Han, C. L. Xiang, H. Liu, and T. Ma, “A Q-Learning Fuzzy
Inference System Based Online Energy Management Strategy for OffRoad Hybrid Electric Vehicles,” _[Energy](https://doi.org/10.1016/j.energy.2022.123976)_ 252 (August 2022): 1–11, https://
doi.org/10.1016/j.energy.2022.123976.
27. J. Gan, S. Li, C. Wei, L. Deng, and X. Tang, “Intelligent Learning
Algorithm and Intelligent Transportation-Based Energy Management
Strategies for Hybrid Electric Vehicles: A Review,” _IET Intelligent Trans-_
_port_ _Systems_ 24, no. 10 (October [2023):](https://doi.org/10.1109/TITS.2023.3283010) 10345–10361, https://doi.org/10.
1109/TITS.2023.3283010.
28. H. Kong, J. Yan, H. Wang, and L. Fan, “Energy Management Strategy
for Electric Vehicles Based on Deep Q-Learning Using Bayesian Optimization,” _Neural_ _Computer_ _applications_ 32 (September 2020): 14431–14445,
[https://doi.org/10.1007/s00521-019-04556-4.](https://doi.org/10.1007/s00521-019-04556-4)
29. G. Y. Liu, F. X. Guo, Y. G. Liu, et al., “Weighted Double Q-Learning
Based Eco-Driving Control for Intelligent Connected Plug-In Hybrid Electric Vehicle Platoon With Incorporation of Driving Style Recognition,”
_Journal_ _of_ _Energy_ _Storage_ 86 (May [2024):](https://doi.org/10.1016/j.est.2024.111282) 1–17, https://doi.org/10.1016/j.
est.2024.111282.
30. A. Mathew, M. J. Jolly, and J. Mathew, “Improved Residential
Energy Management System Using Priority Double Deep Q-learning,”
_Sustainable Cities and Society_ [69 (June 2021): 1–12, https://doi.org/10.1016/](https://doi.org/10.1016/j.scs.2021.102812)
j.scs.2021.102812.
Robustness Energy Management Strategy of Hybrid Electric Vehicle
Based on Improved Soft Actor-Critic Deep Reinforcement Learning,”
_Energy_ 258 (November 2022): 1–13, [https://doi.org/10.1016/j.energy.2022.](https://doi.org/10.1016/j.energy.2022.124806)
124806.
32. P. Mei, H. R. Karimi, H. H. Xie, F. Chen, C. Huang, and S. C. Yang, “A
Deep Reinforcement Learning Approach to Energy Management Control
With Connected Information for Hybrid Electric Vehicles,” _Engineering_
_Applications of Artificial Intelligence_ [123 (August 2023): 1–15, https://doi.](https://doi.org/10.1016/j.engappai.2023.106239)
org/10.1016/j.engappai.2023.106239.
33. X. Tang, J. Chen, T. Liu, Y. Qin, and D. Cao, “Distributed Deep Reinforcement Learning-Based Energy and Emission Management Strategy
for Hybrid Electric Vehicles,” _IEEE Transactions on Vehicular Technology_
70, no. 10 (October 2021): [9922–9934,](https://doi.org/10.1109/TVT.2021.3107734) https://doi.org/10.1109/TVT.2021.
3107734.
34. N. Iqbal, H. Wang, Z. Zheng, and M. Yao, “Reinforcement LearningBased Heuristic Planning for Optimized Energy Management in PowerSplit Hybrid Electric Heavy Duty Vehicles,” _Energy_ 302 (September 2024):
[1–12, https://doi.org/10.1016/j.energy.2024.131773.](https://doi.org/10.1016/j.energy.2024.131773)
35. L. Yu, W. Xie, D. Xie, et al., “Deep Reinforcement Learning for Smart
Home Energy Management,” _IEEE Internet Things_ 7, no. 4 (April 2020):
[2751–2762, https://doi.org/10.1109/JIOT.2019.2957289.](https://doi.org/10.1109/JIOT.2019.2957289)
36. Y. Wang, H. Tan, Y. Wu, and J. Peng, “Hybrid Electric Vehicle Energy
Management With Computer Vision and Deep Reinforcement Learning,”
_IEEE_ _Transactions_ _on_ _Industrial_ _Informatics_ 17, no. 6 (June 2021): 3857–
[3868, https://doi.org/10.1109/TII.2021.3051787.](https://doi.org/10.1109/TII.2021.3051787)
37. R. Z. Lu, Z. Jiang, H. Wu, Y. Ding, D. Wang, and H. T. Zhang, “Reward
Shaping-Based Actor-Critic Deep Reinforcement Learning for Residential
Energy Management,” _IEEE Transactions on Industrial Informatics_ 19, no.
[3 (March 2023): 2662–2673, https://doi.org/10.1109/TII.2023.3238721.](https://doi.org/10.1109/TII.2023.3238721)
38. H. He, R. Huang, X. Meng, X. Zhao, Y. Wang, and M. Li, “A Novel
Hierarchical Predictive Energy Management Strategy for Plug-In Hybrid
Electric Bus Combined With Deep Deterministic Policy Gradient,” _Jour-_
_nal of Energy Storage_ 52 (August [2022):](https://doi.org/10.1016/j.est.2022.104787) 104787, https://doi.org/10.1016/j.
est.2022.104787.
39. H. He, Z. Niu, Y. Wang, R. Huang, and Y. Shou, “Energy Management Optimization for Connected Hybrid Electric Vehicle Using Offline
Reinforcement Learning,” _Journal of Energy Storage_ 72 (November 2023):
[108517, https://doi.org/10.1016/j.est.2023.108517.](https://doi.org/10.1016/j.est.2023.108517)
40. M. Z. Li and X. X. Yin, “Distributed Deep Reinforcement LearningBased Energy and Emission Management Strategy for Hybrid Electric
Vehicles,” _IEEE Transactions on Vehicular Technology_ 70, no. 10 (October
[2021): 9922–9934, https://doi.org/10.1109/TVT.2021.3107734.](https://doi.org/10.1109/TVT.2021.3107734)
41. Z. X. Wang, H. W. He, J. K. Peng, et al., “A Comparative Study of Deep
Reinforcement Learning Based Energy Management Strategy for Hybrid
Electric Vehicle,” _Energy Conversion and Management_ 293 (October 2023):
[1–13, https://doi.org/10.1016/j.enconman.2023.117442.](https://doi.org/10.1016/j.enconman.2023.117442)
42. B. Xu, D. Rathod, D. R. Zhang, et al., “Parametric Study on Reinforcement Learning Optimized Energy Management Strategy for a Hybrid
Electric Vehicle,” _Applied_ _Energy_ [259](https://doi.org/10.1016/j.apenergy.2019.114200) (February 2020): 1–21, https://doi.
org/10.1016/j.apenergy.2019.114200.
Appendix A: Description of Deep Q-Network and mRMR
Algorithm
This paper employs a deep Q-network (DQN) to combine with the mRMR
(minimum redundancy maximum relevance) method for selecting the
most representative and typical feature combinations, thereby enhancing
prediction accuracy. In response to the volatility and outliers present
in daily load data, the first step is to preprocess the data. For the
preprocessed data, a multi-feature dataset is constructed, followed by the
application of an autoencoder (AE) algorithm to reduce dimensionality
and compress the data. The value of ? corresponding to the maximum
silhouette coefficient is selected as the optimal number of clusters. Finally,
with mRMR serving as the action value function, the model learns the
most valuable feature combinations through the exploration-exploitation
trade-off. Leveraging the policy learning capability of DQN, the selected
feature set is dynamically adjusted, thereby enhancing the flexibility and
adaptability of the feature selection model.
A.1 Process of Original Data
Firstly, calculating the initial features set from the raw data. And the
process core code is as follows:
Listing 1 Calculation of the initial feature set.
for i in range(groups):
start_idx = i - 24
end_idx = start_idx + 24
group_data = data.iloc[start_idx:end_idx, 0]
daily_consumption = group_data.sum()
The computed data is then subjected to dimensionality reduction using
the AE algorithm. The data compression formula and loss function of AE
are as follows:
? = ?(?) (A1)
? = ?(?) (A2)
?(?,̂ ?) = |? −̂ ?| <sup>2</sup> (A3)
where _z_ represents the encoding operation, _x_ is the input data, _f_ is the
encoding neural network,̂ ? is the reconstructed output, _g_ is the decoding
function, and _L_ is the loss function.
The core structure of AE is as follows:
Listing 2 AE core code.
input_layer = Input(shape=(input_dim,))
encoded = Dense(encoding_dim, activation=
’relu’)(input_layer)
decoded = Dense(input_dim, activation=
’sigmoid’)(encoded)
autoencoder = Model(input_layer, decoded)
encoder = Model(input_layer, encoded)
autoencoder.compile(optimizer=’adam’,
loss=’binary_crossentropy’)
A.2 Minimum Redundancy Maximum Relevance
mRMR is a heuristic method that identifies a feature set from the input
feature set with the maximum relevance and minimum redundancy in
relation to the class. By calculating the correlation between features and
the class, as well as the redundancy between features, mRMR performs
a filter-based feature selection process with the objective function of
maximizing relevance and minimizing redundancy, thereby improving
the model’s clarity. At the same time, mRMR, as a numerical computation
method, is only influenced by changes in the data and is not dependent
on any specific model, making it compatible with other machine learning
and data mining techniques. Therefore, this paper selects mRMR as the
most action-relevant value function in the DQN feature selection model.
This paper uses the histogram binning method to compute the joint
probability distribution of all data points for each feature, and then calculates the mutual information of the current feature sample set through
cross-entropy. The formula for calculating the mutual information is as
follows:
?(?, ?) = −
?∈?,?∈?
?(?, ?) log2 ?(?, ?) (A4)
?(?) = −
?(?) = −
∑
?∈?
∑
?∈?
?(?) log2 ?(?) (A5)
?(?) log2 ?(?) (A6)
?(?; ?) = ?(?) + ?(?) − ?(?, ?) (A7)
where _H_ ( _X_, _Y_ ) represents the joint entropy of _X_ and _Y_, _p_ ( _x_, _y_ ) is the
joint probability distribution of feature X and class Y, _H_ ( _X_ ) and _H_ ( _Y_ )
are the individual entropies of the feature and class, respectively, _p_ ( _x_ )
and _p_ ( _y_ ) are the probability distributions of _X_ and _Y_, and _I_ ( _X_, _Y_ )
represents the contribution of information between _X_ and _Y_, which is the
mutual information.
The core code is as follows:
Listing 3 Mutual information core code.
def calculate_joint_entropy(
self, feature, labels):
joint_data = np.c_[feature, labels]
joint_entropy = -np.sum([p - np.log2(p)
if p _>_ 0
else 0 for _, p in
return joint_entropy
def calculate_mutual_information(self,
feature_index):
feature_entropy = -np.sum([p - np.log2(p)
if p _>_ 0 else 0 for p in
np.histogram(self.data.iloc[:, feature_index],
bins=8, density=True)[0]])
joint_entropy = self.calculate_joint_entropy
(self.data.iloc[:, feature_index],
self.labels)
labels_entropy = -np.sum(
[p - np.log2(p) if p _>_ 0 else 0 for p in
np.histogram(self.labels, bins=8,
density=True)[0]])
mutual_information = feature_entropy +
labels_entropy - joint_entropy
return mutual_information
After calculating the mutual information, the information redundancy
within the selected feature set is computed based on the Pearson correlation coefficient. The formulas for the Pearson correlation coefficient and
the average redundancy are as follows:
∑?
??? =
<u>?=1</u> <sup>(??</sup> <sup>−̄ ?)(??</sup> <sup>−̄ ?)</sup>
~~√∑~~ ? ~~√∑~~ ?
(A8)
?=1 <sup>(??</sup> <sup>−̄ ?)2</sup>
~~√∑~~ ?
?=1 <sup>(??</sup> <sup>−̄ ?)2</sup>
∑
? =
?≠? <sup>|???|</sup>
(A9)
? <sup>2</sup>
where ??? is the correlation coefficient between _X_ and _Y_, _n_ is the number
of selected features, and ? is the average redundancy.
The core code is as follows:
Listing 4 Information redundancy core code.
def calculate_redundancy(self):
if len(self.selected_features) _<_ 2:
return 0
self.selected_features]
correlation_matrix = selected_data.corr().abs()
sum_of_correlations = correlation_matrix.sum(
).sum()-len(self.selected_features)
redundancy = sum_of_correlations /
(len(self.selected_features) ** 2)
return redundancy
After the calculations, the mRMR value is computed based on mutual
information and the average correlation coefficient. The formula for
mRMR is as follows:
mRMR = MIaverage − ? (A10)
where MIaverage represents the average mutual information between the
feature set and the class.
Therefore, the core code for using average mutual information as the
evaluation criterion for feature selection is as follows:
Listing 5 mRMR criterion core code.
def calculate_reward(self):
if not self.selected_features:
return 0
mi_sum = sum(self.calculate_mutual_information(idx)
for idx in self.selected_features)
mi_average = misum / len(self.selected_features)
if self.selected_features else 0
redundancy = self.calculate_redundancy()
reward = mi_average - redundancy
return reward
A.3 Deep Q-Network
DQN fits the optimal action-value function (Q-function) through a deep
learning network, enabling it to handle complex decision-making problems with reinforcement learning capabilities. Additionally, DQN has the
characteristic of being an offline model, allowing it to continuously replay
the data collected by the online agent for self-learning, thereby improving
data utilization and reducing the number of samples needed. Therefore,
DQN can effectively integrate mRMR into the offline training module
of the model, which, while increasing the computational load, helps
improve the training performance of DQN and enhances the model’s
computational efficiency. First, based on the Markov decision process
(MDP), the state space and action space of the DQN are defined. In this
paper, the selection of the fifteen features is represented as a 0–1 vector,
where 1 indicates that the feature is selected, and 0 indicates the opposite.
Therefore, the state space of the feature selection model is a finite discrete
set, denoted as ??, and is defined by the following formula:
?? = (⃗?1,⃗?2, …,⃗??!) (A11)
where⃗?1 is a 0–1 vector representing the feature selection state at time _t_ .
The action space is the set of all possible actions. In this paper, it represents
whether a feature is selected to enter the optimal feature set. The number
of actions in the action space is equal to the number of features. Therefore,
the action space ?? is a discrete index sequence, which can be represented
as:
?? = [0, 1, 2, 3, …, ?] (A12)
where 0, 1, 2, 3, …, ? represents the indices of all the features.
it performs an action. In this paper, the reward is defined based on the
mRMR criterion.
After defining the state space and action space, this paper will construct
the DQN network structure, which consists of a two-layer neural network:
a hidden layer (with a ReLU activation function) and an output layer. The
core code for the neural network structure and the forward propagation
algorithm is as follows:
Listing 6 Core code of neural network and forward.
class DQN(nn.Module):
def __init__(self, input_size, output_size):
super(DQN, self).__init__()
self.fc1 = nn.Linear(input_size, 4)
self.relu = nn.ReLU()
self.fc2 = nn.Linear(4, output_size)
def forward(self, x):
x = self.relu(self.fc1(x))
x = self.fc2(x)
return x
After defining the network structure, the environment for the DQN
algorithm needs to be set up. In this paper, it is defined that the state,
action, and reward tuples obtained by DQN during initial runs are stored
in the replay buffer. Once the replay buffer is full, the environment
information for the next training will be sampled from the replay buffer.
The core code for the replay buffer is as follows:
Listing 7 Core code of replay buffer.
class ReplayBuffer:
def __init__(self, capacity):
self.buffer = deque(maxlen=capacity)
def push(self, state, action, reward,
next_state, done):
self.buffer.append(Transition
(state, action, reward, next_state, done))
def sample(self, batch_size):
return random.sample(self.buffer, batch_size)
def __len__(self):
return len(self.buffer)
Next, the state transition algorithm of the DQN model is defined. First, the
Q-value is calculated based on the current state, and then the parameters
are optimized through backpropagation using the Huber loss. The core
code for this module is as follows:
Listing 8 Core code of agent state transfer.
state_action_values =model(state_batch).gather
(1, action_batch.unsqueeze(-1))
next_state_values = torch.zeros(batch_size)
if non_final_mask.sum() _>_ 0:
next_state_values[non_final_mask] =
model(non_final_next_states).max(1)[0].detach()
expected_state_action_values =
(next_state_values - gamma) + reward_batch
loss = F.smooth_l1_loss(state_action_values,
expected_state_action_values.unsqueeze(-1))
optimizer.zero_grad()
loss.backward()
optimizer.step()
Finally, based on all the modules defined above, the DQN algorithm
framework is constructed. The Adam optimizer is used for hyperparameter tuning. After setting the parameters, DQN selects the optimal feature
combination to determine the optimal condition. The core code for this
process is as follows:
Listing 9 Core code of DQN train framework.
def train_dqn(env, model, episodes,
batch_size, gamma, epsilon_start,
epsilon_end, epsilon_decay):
optimizer = optim.Adam(model.parameters())
replay_buffer = ReplayBuffer(1000)
epsilon = epsilon_start
max_reward = float(’-inf’)
optimal_feature_set = []
for episode in range(episodes):
state = env.reset()
state = torch.FloatTensor(
state).unsqueeze(0)
episode_reward = 0
while True:
if random.random() _<_ epsilon:
action = random.randrange(
env.n_features)
else:
q_values = model(state)
action = q_values.max(1)[1].item()
next_state, reward, done = env.step(action)
next_state = torch.FloatTensor(
next_state).unsqueeze(0)
next_state = torch.FloatTensor(
next_state).unsqueeze(0)
replay_buffer.push(state, action,
reward, next_state, done)
optimize_model(replay_buffer, model,
optimizer, batch_size, gamma)
state = next_state
episode_reward += reward
if done:
break
epsilon = max(epsilon_end,
epsilon_decay - epsilon)
if episode_reward _>_ max_reward:
max_reward = episode_reward
optimal_feature_set = env.selected_
features.copy()
Appendix B: TD3 Algorithm Framework Details
The TD3 algorithm framework used for optimizing the scheduling of
the VPP in this paper consists of five modules: the agent, network,
environment, function, and train.
B.1 Agent Module
This module is primarily responsible for constructing the value network
and target network structure of the TD3 algorithm and setting the soft
update logic for the network parameters. The core code for this module is
as follows:
Listing 10 Core code of TD3 agent logic.
for episode in range(episodes):
state = env.reset()
episode_reward = 0
while True:
if random.random() _<_ epsilon:
action = random.randrange(env.n_features)
else:
q_values = model(state)
action = q_values.max(1)[1].item()
next_state, reward, done = env.step(action)
next_state = torch.FloatTensor(
next_state).unsqueeze(0)
replay_buffer.push(state, action, reward,
next_state, done)
optimize_model(replay_buffer, model,
optimizer, batch_size, gamma)
state = next_state
episode_reward += reward
B.2 Network Module
The network module is used to construct the structure of the actor
network and two critic networks, as well as the forward propagation
method. In this paper, the network structure consists of an input layer,
two hidden layers, and an output layer. The activation functions used are
ReLU and Hardswish. The core code for this module is as follows:
Listing 11 Core code of net framework.
class Actor(nn.Module):
def __init__(self, mid_dim, state_dim, action_dim):
super().__init__()
self.net = nn.Sequential(
nn.Linear(state_dim, mid_dim), nn.ReLU(),
nn.Linear(mid_dim, mid_dim), nn.ReLU(),
nn.Linear(mid_dim, mid_dim), nn.Hardswish(),
nn.Linear(mid_dim, action_dim))
def forward(self, state):
return self.net(state).tanh()
B.3 Environment Module
The environment module is primarily responsible for constructing the
operational condition of the VPP. First, the time range is set to one year.
Then, the various interaction methods and operational states of EVs,
MT, the power grid, etc., within this environment are defined, and the
operational data is stored. The core code for updating the interaction
methods and operational states is as follows (using EVs as an example):
Listing 12 Core code of environment construction.
class EV:
def __init__(self, parameters):
self.capacity = parameters[’capacity’]
self.max_charge = parameters[’max_charge’]
self.max_discharge = parameters[’max_discharge’]
self.efficiency = parameters[’efficiency’]
self.initial_capacity = parameters[’initial_capacity’]
self.min_soc = parameters[’min_soc’]
self.max_soc = parameters[’max_soc’]
self.current_capacity = self.initial_capacity
self.degradation = 0
self.energy_change = 0
def step(self, action_ev):
energy = action_ev - self.max_charge
min(self.max_soc, (self.current_capacity self.capacity + energy) / self.capacity))
self.energy_change = (updated_capacity
self.current_capacity) - self.capacity
self.current_capacity = updated_capacity
def _get_cost(self,
current_price, energy_change):
cost = current_price - energy_change
return cost
def SOC(self):
return self.current_capacity
def reset(self):
self.current_capacity = np.random.uniform(0.1, 0.9)
B.4 Function Module
The function module constructs the main parameters, testing logic,
and replay buffer functionality in the TD3 algorithm. The parameter
function defines various hyperparameters required during training and
evaluation and initializes the training environment. The testing function
is used to run a complete episode in the testing environment and records
information such as state, action, and reward at each step. The replay
buffer function implements the experience replay buffer for storing and
sampling training data. The core code for the testing logic section is as
follows:
Listing 13 Core code of functions.
def test_one_episode(env, act, device):
state = env.reset()
record_system_info = []
for i in range(24):
s_tensor = torch.as_tensor((state,),
device=device)
a_tensor = act(s_tensor)
action = a_tensor.detach().cpu().numpy()[0]
state, next_state, reward,
done = env.step(action)
record_system_info.append([state[0],
state[1], state[3], action,
env.ev.SOC(), env.unbalance])
state = next_state
return record_system_info
B.5 Train Module
The train module’s function is to call the components built in the modules
above, set up the algorithm training framework, save the model, and
finally perform visualization operations. The core code for the training
part is as follows:
Listing 14 Core code of train process.
if args.train:
collect_data = True
while collect_data:
print(f’buffer:buffer.now_len’)
with torch.no_grad():
trajectory = agent.explore_env(env, target_step)
steps, r_exp = update_buffer(trajectory)
buffer.update_now_len()
if buffer.now_len _>_ = 10000:
collect_data = False
for i_episode in range(num_episode):
buffer, batch_size, repeat_times,
soft_update_tau)
loss_record[’critic_loss’].append(critic_loss)
loss_record[’actor_loss’].append(actor_loss)
with torch.no_grad():
episode_reward, episode_unbalance =
get_episode_return(env,
agent.act, agent.device)
reward_record[
’mean_episode_reward’].append(
episode_reward)
reward_record[’unbalance’].append(
episode_unbalance)
if i_episode
target_step
with torch.no_grad():
trajectory = agent.explore_env(
env, target_step)
steps, r_exp =
update_buffer(trajectory)
[The whole code of TD3 and DQN above can be read in the Github (https://](https://github.com/shiepSure?tab=repositories)
github.com/shiepSure?tab=repositories).
섹션 본문
섹션 본문이 없습니다.
참고문헌 38건
- Development of energy management system based on a rule-based power distribution strategy for hybrid power sources Energy · Elsevier BV · 2019 10.1016/j.energy.2019.03.155
- Deep Reinforcement Learning for Smart Home Energy Management IEEE Internet of Things Journal · Institute of Electrical and Electronics Engineers · 2019 10.1109/jiot.2019.2957289
- Energy management strategy for electric vehicles based on deep Q-learning using Bayesian optimization Neural Computing and Applications · Springer Science+Business Media · 2019 10.1007/s00521-019-04556-4
- Reinforcement Learning for Real-Time Pricing and Scheduling Control in EV Charging Stations IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2019 10.1109/tii.2019.2950809
- Parametric study on reinforcement learning optimized energy management strategy for a hybrid electric vehicle Applied Energy · Elsevier BV · 2019 10.1016/j.apenergy.2019.114200
- Indoor air quality and energy management in buildings using combined moving horizon estimation and model predictive control Journal of Building Engineering · Elsevier BV · 2020 10.1016/j.jobe.2020.101552
- Bi-level Energy Management of Plug-in Hybrid Electric Vehicles for Fuel Economy and Battery Lifetime with Intelligent State-of-charge Reference Journal of Power Sources · Elsevier BV · 2020 10.1016/j.jpowsour.2020.228798
- Improved residential energy management system using priority double deep Q-learning Sustainable Cities and Society · Elsevier BV · 2021 10.1016/j.scs.2021.102812
- Optimal mesh discretization of the dynamic programming for hybrid electric vehicles Applied Energy · Elsevier BV · 2021 10.1016/j.apenergy.2021.116920
- Self-Tuning MPPT Scheme Based on Reinforcement Learning and Beta Parameter in Photovoltaic Power Systems IEEE Transactions on Power Electronics · Institute of Electrical and Electronics Engineers · 2021 10.1109/tpel.2021.3089707
- Distributed Deep Reinforcement Learning-Based Energy and Emission Management Strategy for Hybrid Electric Vehicles IEEE Transactions on Vehicular Technology · Institute of Electrical and Electronics Engineers · 2021 10.1109/tvt.2021.3107734
- Generation, Screening, and Optimization of Powertrain Configurations for Power-Split Hybrid Electric Vehicle: A Comprehensive Overview IEEE Transactions on Transportation Electrification · Institute of Electrical and Electronics Engineers · 2021 10.1109/tte.2021.3105244
- A Q-learning fuzzy inference system based online energy management strategy for off-road hybrid electric vehicles Energy · Elsevier BV · 2022 10.1016/j.energy.2022.123976
- A novel hierarchical predictive energy management strategy for plug-in hybrid electric bus combined with deep deterministic policy gradient Journal of Energy Storage · Elsevier BV · 2022 10.1016/j.est.2022.104787
- Battery health-aware and naturalistic data-driven energy management for hybrid electric bus based on TD3 deep reinforcement learning algorithm Applied Energy · Elsevier BV · 2022 10.1016/j.apenergy.2022.119353
- High robustness energy management strategy of hybrid electric vehicle based on improved soft actor-critic deep reinforcement learning Energy · Elsevier BV · 2022 10.1016/j.energy.2022.124806
- Distributed MPC-based energy scheduling for islanded multi-microgrid considering battery degradation and cyclic life deterioration Applied Energy · Elsevier BV · 2022 10.1016/j.apenergy.2022.120168
- Variable boundary reinforcement learning for maximum power point tracking of photovoltaic grid-connected systems Energy · Elsevier BV · 2022 10.1016/j.energy.2022.126278
- Two-stage distributionally robust optimization model of integrated energy system group considering energy sharing and carbon transfer Applied Energy · Elsevier BV · 2022 10.1016/j.apenergy.2022.120426
- A deep reinforcement learning approach to energy management control with connected information for hybrid electric vehicles Engineering Applications of Artificial Intelligence · Elsevier BV · 2023 10.1016/j.engappai.2023.106239
- Intelligent Learning Algorithm and Intelligent Transportation-Based Energy Management Strategies for Hybrid Electric Vehicles: A Review IEEE Transactions on Intelligent Transportation Systems · Institute of Electrical and Electronics Engineers · 2023 10.1109/tits.2023.3283010
- Aging-aware optimal power management control and component sizing of a fuel cell hybrid electric vehicle powertrain Energy Conversion and Management · Elsevier BV · 2023 10.1016/j.enconman.2023.117330
- A scheduling framework for VPP considering multiple uncertainties and flexible resources Energy · Elsevier BV · 2023 10.1016/j.energy.2023.128385
- Fused multi-model predictive control with adaptive compensation for proton exchange membrane fuel cell air supply system Energy · Elsevier BV · 2023 10.1016/j.energy.2023.128459
- A comparative study of deep reinforcement learning based energy management strategy for hybrid electric vehicle Energy Conversion and Management · Elsevier BV · 2023 10.1016/j.enconman.2023.117442
- Energy management optimization for connected hybrid electric vehicle using offline reinforcement learning Journal of Energy Storage · Elsevier BV · 2023 10.1016/j.est.2023.108517
- Two-stage robust optimal scheduling method for virtual power plants considering the controllability of electric vehicles Electric Power Systems Research · Elsevier BV · 2023 10.1016/j.epsr.2023.109785
- Predictive hierarchical eco-driving control involving speed planning and energy management for connected plug-in hybrid electric vehicles Energy · Elsevier BV · 2023 10.1016/j.energy.2023.129058
- Techno-economic and environmental assessment of renewable energy sources, virtual synchronous generators, and electric vehicle charging stations in microgrids Applied Energy · Elsevier BV · 2023 10.1016/j.apenergy.2023.122028
- Review of virtual power plant operations: Resource coordination and multidimensional interaction Applied Energy · Elsevier BV · 2023 10.1016/j.apenergy.2023.122284
- A critical look at efficient parameter estimation methodologies of electrochemical models for Lithium-Ion cells Journal of Energy Storage · Elsevier BV · 2024 10.1016/j.est.2023.110384
- Data-driven energy management of virtual power plants: A review Advances in Applied Energy · Elsevier BV · 2024 10.1016/j.adapen.2024.100170
- Weighted double Q-learning based eco-driving control for intelligent connected plug-in hybrid electric vehicle platoon with incorporation of driving style recognition Journal of Energy Storage · Elsevier BV · 2024 10.1016/j.est.2024.111282
- Reinforcement learning-based heuristic planning for optimized energy management in power-split hybrid electric heavy duty vehicles Energy · Elsevier BV · 2024 10.1016/j.energy.2024.131773
- Distributed electric bicycle batteries for subway station energy management as a virtual power plant Applied Energy · Elsevier BV · 2024 10.1016/j.apenergy.2024.123094
- Optimal power-split of hybrid energy storage system using Pontryagin’s minimum principle and deep reinforcement learning approach for electric vehicle application Engineering Applications of Artificial Intelligence · Elsevier BV · 2024 10.1016/j.engappai.2024.108769
- Dynamic Fuzzy Logic Energy Management System for a Multi-Energy Microgrid IEEE Access · Institute of Electrical and Electronics Engineers · 2024 10.1109/access.2024.3422009
- Energy and temperature management in buildings through Multi-Objective Model Predictive Control on a chip Computers & Chemical Engineering · Elsevier BV · 2024 10.1016/j.compchemeng.2024.108903