원시데이터 수집 시스템
선정목록으로

Non-Intrusive Load Monitoring for Energy Management in Smart Grids Incorporating EVs

관련 수소연료전지 · (6) PEM(고분자전해질막)

기본 정보

저자
  1. Nan Yang — School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW, Australia
  2. Yunqi Wang — School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW, Australia
  3. Yuning Zhang — School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW, Australia
  4. Ghulam Mohy‐ud‐din — School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW, Australia|||Energy Business Unit, Commonwealth Scientific and Industrial Research Organisation (CSIRO), Newcastle, NSW, Australia
  5. Dong Yuan — School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW, Australia
DOI
10.1109/tce.2024.3489580
저널
IEEE Transactions on Consumer Electronics
발행년도
2024
발행기관
Institute of Electrical and Electronics Engineers
피인용수
9
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1109/tce.2024.3489580
토픽
High voltage insulation and dielectric phenomena
OpenAlex ID
W4404036054

평가 내용

관련도
관련
사업분야
수소연료전지 · (6) PEM(고분자전해질막)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > PEM(고분자전해질막)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

초록이 없습니다.

본문 67,841자

본문 펼치기
## Non-Intrusive Load Monitoring for Energy Management in Smart Grids Incorporating EVs Nan Yang, _Member,_ _IEEE_, Yunqi Wang, _Member,_ _IEEE_, Yuning Zhang, and Dong Yuan, _Member,_ _IEEE_ _Abstract_ —In the current smart grid, managing high-energy consumption loads, particularly electric vehicles (EVs), become increasingly complex. This paper introduces a framework that employs non-intrusive load monitoring (NILM) techniques for enhanced energy management in smart grids. Our approach encompasses a broader range of common flexible loads and energy related to EV charging. The NILM technology enables the detailed analysis of individual appliance consumption patterns from aggregated smart meter data, addressing privacy concerns and technical limitations. In detail, we propose a new NILM algorithm, Serial Multi-task Transformer with Attention (SMTA), to address the problem of long-term household load disaggregation. SMTA uses a _Serial-Correlation_ mechanism with period-based dependencies and cyclical information aggregation for effective period time series analysis and utilizes the _Task-_ _Specific_ _Attention_ strategy to find the power influence between appliances. Afterwards, based on the NILM results, we develop an energy management model aiming to optimize the net operation cost in the smart grid, after all active customers participation in ancillary service programs. The proposed framework has been verified on a modified IEEE 57-bus radial distribution system based on real-world household data. The results show that the SMTA algorithm significantly improves load disaggregation accuracy. Furthermore, the proposed framework in comparison to basic energy management reduces the net operation costs by up to 26.9%, highlighting the substantial economic benefits of integrating NILM into smart grid operations. _Index_ _Terms_ —Non-intrusive load monitoring, energy management, EV, transformer, multi-task learning. NOMENCLATURE _H_ Set of tasks in the multi-task learning framework. _T_ Set of time periods. _N_ Set of buses in the smart grid. _τ_ Set of period lengths. _X_ Time series input data. _L_ Legend of the input dataset. _Xt, Xs_ Extracted personal-cyclical part and the seasonal part, respectively. Received 18 April 2024; revised 3 July 2024 and 12 September 2024; accepted 17 October 2024. Date of publication 4 November 2024; date of current version 12 June 2025. This work was supported in part by the ARC Linkage Project under Grant LP220200893. _(Corresponding_ _author:_ _Yunqi_ _Wang.)_ Nan Yang, Yuning Zhang, and Dong Yuan are with the School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW 2008, Australia (e-mail: n.yang@sydney.edu.au; yuning.zhang1@sydney.edu.au; dong.yuan@sydney.edu.au). Yunqi Wang is with the Energy Business Unit, Commonwealth Scientific and Industrial Research Organisation, Newcastle, NSW 2300, Australia, and also with the School of Electrical and Computer Engineering, The University of Sydney, Darlington, NSW 2008, Australia (e-mail: yunqi.wang@csiro.au). Digital Object Identifier 10.1109/TCE.2024.3489580 _N_ Number of encoder layers. _M_ Number of decoder layers. _H_ Number of multiple tasks. _Xl_ <sup>Enc</sup> _, Xl_ <sup>Dec</sup> Input of _l_ -th encoder and _P_ <sup>BESS</sup> _i,t_ _, P_ <sup>EV</sup> _i,t_ Operational power for BESS and EV, with extra subscript + _,_ - representing charging and discharging power at bus _i_ time _t_ . _SOCi_ <sup>EV</sup> _,t_ State of Charging of EV at bus _i_ time _t_ . _i_ <sup>EV</sup> _,t_ State of Charging of EV at bus _i_ time _t_ . _l_ <sup>Enc</sup> _, Xl_ <sup>Dec</sup> _Xl_ <sup>Enc</sup> _, Xl_ <sup>Dec</sup> Input of _l_ -th encoder and _l_ -th decoder layer, respectively. _Yl_ <sup>Enc</sup> _, Yl_ <sup>Dec</sup> Output of _l_ -th encoder and _l_ -th decoder layer, respectively. _WY_ Projection matrix. _T_ <sup>Dec</sup> Cyclical component. _Y_ ˆ Prediction of household electricity usage. _a_ Hyper-parameter in _Serial-Correlation_ mechanism. _A_ Attention mechanism. _α_ Attention weight assigned to each segment in the task-specific attention mechanism. _P_ Represents active power, with specific items indicated by superscripts. _Q_ Represents reactive power, with specific items indicated by superscripts. _Ti_ <sup>In</sup> _,t_ <sup>_, T_</sup> _i_ <sup>Out</sup> _,t_ Indoor and outdoor temperature of energy consumers at bus _i_ time _t_ . _γ_ Thermal resistance. _κ_ Heat ratio of air. _ξ_ Percent of heating, ventilating and air conditioning (HVAC) system in the total energy consumption profile. _�t_ Rewards for reserve capacity at time _t_ . _�t_ Interval between two temporal slices. _πt_ <sup>↓</sup> <sup>_, π_</sup> _t_ <sup>↑</sup> Payoff price for downstream, upstream reserve regulation power at time _t_, respectively. _P_ <sup>Res</sup> _i,t_ <sup>↓</sup> _, P_ <sup>Res</sup> _i,t_ <sup>↑</sup> Downstream, upstream reserve regulation power at bus _i_ time _t_ . _p_ <sup>Res</sup> _i,t_ <sup>↓</sup> _, p_ <sup>Res</sup> _i,t_ <sup>↑</sup> Reserve downstream, upstream capacity at bus _i_ time _t_ . _Vi,t, V_ 0 Voltage magnitude at bus _i_ at time _t_, voltage magnitude of reference bus. _ci,t_ Unit operation cost of distributed generation (DG) at bus _i_ time _t_ . _ri, xi_ Resistance and reactance of the branch following bus _i_ . _Ei_ <sup>BESS</sup> _, Ei_ <sup>EV</sup> Rated energy capacity of (BESS), EV at bus _i_ . _Ei_ <sup>BESS</sup> _,t_ _, Ei_ <sup>EV</sup> _,t_ Energy level of BESS at bus _i_ time _t_ . _l_ <sup>Enc</sup> _, Yl_ <sup>Dec</sup> _i_ <sup>In</sup> _,t_ <sup>_, T_</sup> _i_ <sup>Out</sup> _,t_ _t_ <sup>↓</sup> <sup>_, π_</sup> _t_ <sup>↑</sup> <sup>Res</sup> _i,t_ <sup>↓</sup> _, P_ <sup>Res</sup> _i,t_ <sup>↑</sup> <sup>Res</sup> _i,t_ <sup>↓</sup> _, p_ <sup>Res</sup> _i,t_ <sup>↑</sup> _i_ <sup>BESS</sup> _, Ei_ <sup>EV</sup> _i_ <sup>BESS</sup> _,t_ _, Ei_ <sup>EV</sup> _,t_ <sup>BESS</sup> _i,t_ _, P_ <sup>EV</sup> _i,t_ _Ei_ <sup>BESS</sup> _,t_ _, Ei_ <sup>EV</sup> _,t_ Energy level of BESS at bus _i_ time _t_ . _P_ <sup>BESS</sup> _i,t_ _, P_ <sup>EV</sup> _i,t_ Operational power for BESS and EV, ⃝c 2024 The Authors. This work is licensed under a Creative Commons Attribution 4.0 License. F i f ti htt // ti /li /b /4 0/ _SOCi_ <sup>EV</sup> _,_ _SOCi_ <sup>EV</sup> _,_ End State of Charging of EV at the end of period of parking at bus _i_ . _ηi_ <sup>EV</sup> _,t_ EV charging coefficient at bus _i_ time _t_ . _ηi_ <sup>EV</sup> _,t_ EV charging coefficient at bus _i_ time _t_ . _μ_ <sup>EV</sup> _i,t_ Binary variable to determine the status _μ_ <sup>EV</sup> _i,t_ Binary variable to determine the status of charging of EV. _βi_ Life cycle coefficient associated with the BESS energy at bus _i_ . _ti_ <sup>EV</sup> EV parking period between arrival and departure time at bus _i_ . _δi_ Degradation cost of BESS at bus _i_ . _λ_ <sup>DR</sup> _t_ Compensation price for participating DR program at time _t_ . _λt_ Purchase price from upper grid at time _t_ . _<u>(</u>_ <u>·</u> _<u>), (</u>_ - _)_ Lower and upper bound. SD _(_ - _)_ Series Decomposition operation. SC _(_ - _)_ Serial-Correlation operation. FF _(_ - _)_ Feed forward operation. P _(_ - _)_ Circular shift operation. management systems for microgrids to achieve flatter power demand and peak demand shaving. Reference [6] reviewed and investigated the integration of EVs, BESS, and solar photovoltaic (PV) arrays with flexible energy management systems to understand the energy interchange in the distribution network system while maintaining energy efficiency. Reference [7] highlighted the role of EVs, with vehicle-to-grid (V2G) abilities, in improving energy management efficiency in smart homes. Additionally, [8] focused on energy management in microgrids containing EVs and renewable energy sources, considering DR programs. Reference [9] utilized EVs and BESS in tandem for frequency regulation, addressing frequency fluctuations due to dynamic load behaviour and intermittent renewable sources, uncertainties were tackled by robust optimization. Authors in [10] introduced a valley-filling approach for centralized EVs on a large scale, offering a solution with reduced computational demands compared to existing methods. However, the above studies assume that the system operator has the full authority to access the detailed data on controllable loads. Due to privacy concerns, acquiring complete customer data poses a significant challenge for system operators [11]. The evolution of smart-meter technology has greatly enhanced the detail and accuracy of consumer load profiles, facilitating more effective demand management strategies. Recent focus has shifted to non-intrusive load monitoring (NILM), which identifies the energy usage of individual appliances in residential and commercial settings [12], [13]. Convolutional neural networks (CNNs), recurrent neural networks (RNNs), particularly long short-term memory (LSTM) networks, have demonstrated effectiveness in analyzing power usage data [14]. CNNs are efficient at extracting spatial features, whereas RNN and LSTM excel at recognizing temporal patterns in energy usage [15]. Yang et al. leveraged the CNNs to design an event-driven NILM [16]. Further, a deep CNN approach is utilized for NILM in [17]. Moreover, a dual-CNN architecture was proposed in [18], where one CNN outputs state distributions and the other predicts power for each state. Additionally, a conditional random field (CRF) is used to capture state transitions, significantly enhancing the model’s performance on NILM tasks. Reference [19] proposed gated recurrent unit (GRU) and CNN architectures for multitask learning, with the aim of transferability between data sets. Further, [20] focused on multi-appliance tasks, utilizing a hybrid of CNNs and RNNs to process the data. Reference [21] developed a subtask gated network (SGN) by combining state detection and energy disaggregation network outputs. Angelis et al. introduced the fundamental transformer architecture (i.e., EnergyFormer) into energy disaggregation and demonstrated the unique capabilities of transformers [22]. Further, Jiao et al. propose a context-aware identification method for the multi-event NILM [23]. Additionally, a scaleand context-aware convolutional network was designed for SGN in across-dataset transfer learning, sharing network components between subtasks [24]. Recently, [25] proposed an advanced hybrid architecture combining LSTM networks with Transformers to improve the real-time prediction of multiple tasks in engineering systems, including NILM. The model I. INTRODUCTION HE GROWING integration of electric vehicles (EVs) and distributed energy resources presents both challenges # T and opportunities for energy management in smart grids. This integration not only requires more developed management strategies but also facilitates a more flexible distribution of electricity. A key element in addressing these challenges is the active engagement of the demand side [1]. Thus, customer load profiles have become increasingly important in shaping demand management strategies. Meanwhile, with the development of control techniques, the Internet-of-Things (IoT) energy devices (e.g., smart meters) enable data collection and communication. When combined with big data analytics, these innovations are opening new pathways for effective energy management. Active customers can participate in demand-side management programs that encourage customers to improve energy efficiency, with demand response (DR) being a subset of these initiatives. This initiative, aimed at temporary energy demand reduction, is typically initiated by distribution system operators [2]. These programs can be triggered by price signals in the ancillary market. These activations, ranging from a few minutes to several hours, may involve measures like reducing lighting, adjusting washing machines (WM), dishwashers and heating, ventilating and air conditioning (HVAC) systems. In the literature, [3] discussed energy management systems in homes, controlling loads and HVAC systems, and various pricing strategies for smart grids. Authors in [4] compared the penitential revenue between different DR incentives in terms of real-time pricing, critical peak pricing, and time-oftariffs (TOU) via participating active demand-side programs. Reference [5] discussed household level for peak load management using differentiated prices and a demand control incentive payment. In addition, EVs and on-site battery storage energy system (BESS) also contribute to adjusting network loads, designed to maintain more flexible system functioning and balance electricity demand and supply. Studies have shown the effectiveness of using EVs and BESS in energy Fig. 1. Detailed structure and workflow of the proposed framework. effectively balances the need for capturing both sequential dependencies and long-range interactions in data, making it suitable for real-time applications. However, there are two issues with all these multi-task learning-based NILM methods. First, the characteristics of power data are relatively simple, and its ability to generalize to new environments or different types of electrical appliances may be limited. The second is that in multi-task learning, the importance of different tasks need to be balanced, which means that low-power and highenergy consumption applications are required to interact with each other in NILM. To address the gaps in the existing research, this study proposes an innovative algorithm for NILM, termed Serial Multi-task Transformer with Attention (SMTA). This algorithm is designed to enhance the performance and general applicability of NILM systems in diverse environments and across a wide range of electrical appliances. Moreover, research into NILM’s practical applications, especially for complex models with high-power loads such as EVs and BESS in energy management, is still in its early stages and requires further exploration. Therefore, we focused on the pivot towards the application of NILM in smart grids, particularly for efficient management with flexible loads such as HVAC systems and EVs. Compared with the existing research, the novel contributions of this paper can be summarized as follows: 1) To tackle the complex temporal patterns of the long-term multi-task future, we present serial multi-task transformer as a disaggregation architecture and design the _Serial-Correlation_ mechanism with period-based dependencies discovery and cyclical information aggregation, and the _Task-Specific_ _Attention_ strategy with the ability to share complementary features. 2) An energy management model incorporating an active demand side is developed, capitalizing on the flexibility potential identified through NILM. This model efficiently achieves economic objectives within smart grid management by optimizing energy usage and cost efficiency. 3) Experiment with real-world dataset demonstrates the ff i d i i f h d l i h for NILM. Moreover, energy management enhanced by NILM contributes to savings in net operational costs. Note that by leveraging NILM techniques, the proposed framework can disaggregate load data into individual appliance-level consumption patterns. This granularity enables explicit identification of high-energy-consuming appliances such as HVAC systems and EVs. With detailed load profiles, the framework can optimize the scheduling of flexible loads, and reduce peak load and operational costs. The rest of this paper is organized as follows. Section II introduces the overview of the proposed framework. Section III presents the proposed SMTA algorithm for NILM. Section IV gives the detailed _Serial-Correlation_ mechanism and multi-task attention of the proposed algorithm. Section V presents the energy management model based on NILM results. Section VI presents the experiment. Finally, Section VII concludes this paper. II. OVERVIEW OF THE PROPOSED FRAMEWORK The proposed framework begins with data collection from smart meters in the electricity network, utilizing NILM technology to disaggregate data for analyzing energy consumption behaviors. Our novel algorithm, SMTA, works in two stages: first, load decomposition in households using a _Serial-Correlation_ mechanism for time series analysis; and second, predicting appliance-specific electricity usage, combining multi-task learning with an attention mechanism for enhanced accuracy. The framework also evaluates load flexibility for ancillary service programs, with a focus on HVAC systems for DR programs with TOU incentives and EVs for reserve services, considering their charging schedules. BESS is managed by the distribution system operator as an additional reserve. The framework culminates in an energy management model optimizing load flexibility, distributed generation (DG) dispatching, and power purchases from the grid, ensuring efficient energy management. The detailed structure and workflow are illustrated in Fig. 1, with further algorithm d d l d il i b i III. SERIAL MULTI-TASK TRANSFORMER WITH ATTENTION FOR NILM SMTA encompasses several key components: an inner _Series_ _Decomposition_ _Block_ (encoder and decoder modules), a _Serial-Correlation_ mechanism, and an end-to-end _Multi-task_ _Learning_ _with_ _Attention_ . In detail, the _Series_ _Decomposition_ _Block_ helps in breaking down complex temporal patterns into manageable segments. The _Serial-Correlation_ mechanism aggregates similar subprocesses across different periods, effectively capturing period-based dependencies. The _Task-Specific_ _Attention_ strategy focuses on the most relevant features for each task, improving the precision of disaggregation. These components collectively enhance the NILM’s ability to accurately disaggregate long-term household loads by capturing intricate temporal patterns and dependencies. _A._ _Series_ _Decomposition_ _Block_ The study of predicting different household electricity usage is an intricate temporal pattern within a long-term forecasting framework. We adopt a decomposition approach capable of dissecting the series into segments representing user cyclic patterns and seasonal components. These distinct segments reflect the varied customer behaviors within the time series, as well as the overarching seasonal trends in the data. We draw inspiration from the Autoformer [26] and introduce a suite of internal operations within decomposition blocks (as depicted in Fig. 1). These operations enable the progressive extraction of long-term stable trends from predicted intermediate hidden variables and the modified moving average technique to mitigate the effects of periodic fluctuations while accentuating the underlying long-term trends. Given a length- _L_ input series _X_ ∈ R <sup>_L_</sup> <sup>×</sup> <sup>_D_</sup>, the process is defined as: _Xt_ = AvgPool _(_ Padding _(X)),_ (1) _Xs_ = _X_ - _Xt,_ (2) where _Xt, Xs_ ∈ R <sup>_L_</sup> <sup>×</sup> <sup>_D_</sup> denote the extracted personal-cyclical part and the seasonal part respectively. The AvgPool _(_ - _)_ function is used for moving average with padding operation to maintain the same series length. Equation _Xs, Xt_ = SD _(X)_ is used to summarize the above equations, representing a series decomposition block. _B._ _Encoder_ The encoder emphasizes trend analysis and particularly models the seasonal components. The output of the encoder contains past seasonal information, which is used as crossinformation to assist the decoder in refining the prediction results. Leveraging this periodicity, we designed a _Serial-_ _Correlation_ mechanism to aggregate similar subprocesses across different periods, achieving information aggregation: In this study, we consider a model comprising of _N_ encoder layers. The functional dynamics of the _l_ -th encoder layer are encapsulated by the following equation: The operational specifics of the encoder layer are further delineated as follows: _l,_ 1 _l_ <sup>Enc</sup> −1 <sup>_,_</sup> (4) _l_ <sup>Enc</sup> _,_ 1 <sup>_._</sup> (5) _Yl_ <sup>Enc</sup> _,_ 1 _Yl_ <sup>Enc</sup> _,_ 2 - SC - FF _l_ −1 _Yl_ <sup>Enc</sup> _,_ 1 _l_ <sup>Enc</sup> _,_ 1 <sup>=</sup> <sup>SD</sup> _l_ <sup>Enc</sup> _,_ 2 <sup>=</sup> <sup>SD</sup> _Xl_ <sup>Enc</sup> −1 _l_ −1 �� + _Xl_ <sup>Enc</sup> −1 �� + _Yl_ <sup>Enc</sup> _,_ 1 The notation _Xl_ <sup>Enc</sup>, where _l_ ranges from 1 to _N_, denotes the output of the _l_ -th encoder layer. The initial input _X_ 0 <sup>Enc</sup> is represented by _X_ <sup>Enc</sup> . The variable _Yl_ <sup>Enc</sup> _,i_ <sup>,</sup> <sup>with</sup> <sup>_i_</sup> <sup>taking</sup> <sup>values</sup> 1 or 2, refers to the seasonal component post the _i_ -th series decomposition block in the _l_ -th layer. The function SC _(_ - _)_ represents its capacity to seamlessly replace the self-attention mechanism and FF _(_ - _)_ refers to feed forward operation. _C._ _Decoder_ In the decoder, we model seasonal cycles and the distinct user habits separately. Regarding seasonal cycles, environmental temperature exhibits cyclical variations throughout the year, which significantly influences household electricity usage. A _Serial-Correlation_ mechanism leverages the periodic nature of the series, aggregating sub-sequences with similar processes across different cycles. For user habits, the system adopts a cumulative approach, progressively extracting individual usage patterns from predicted latent variables. For _M_ decoder layers and _XN_ <sup>Enc</sup> outputs from the encoder, the equations of the _l_ -th decoder layer can be summarized as follows: _N_ _Xl_ <sup>Dec</sup> SC _(Xl_ <sup>Dec</sup> −1 SC _(Yl_ <sup>Dec</sup> _,_ 1 FF _(Yl_ <sup>Dec</sup> _,_ 2 _Xl_ <sup>Dec</sup> −1 _,_ (7) _l_ <sup>Dec</sup> = Decoder _l_ <sup>Dec</sup> −1 <sup>_, X_</sup> _N_ <sup>Enc</sup> _,_ (6) _l,_ 2 _Yl_ <sup>Dec</sup> _,_ 1 _Yl_ <sup>Dec</sup> _,_ 2 _Yl_ <sup>Dec</sup> _,_ 3 _l_ <sup>Dec</sup> _,_ 1 <sup>_, T_</sup> _l_ <sup>Dec</sup> _,_ 1 _l_ <sup>Dec</sup> _,_ 2 <sup>_, T_</sup> _l_ <sup>Dec</sup> _,_ 2 _l_ <sup>Dec</sup> _,_ 3 <sup>_, T_</sup> _l_ <sup>Dec</sup> _,_ 3 _l_ <sup>Dec</sup> _,_ 1 = SD _l_ <sup>Dec</sup> _,_ 2 = SD _l_ <sup>Dec</sup> _,_ 3 = SD _l_ <sup>Dec</sup> −1 <sup>_)_</sup> <sup>+</sup> <sup>_X_</sup> _l_ <sup>Dec</sup> −1 _l_ <sup>Dec</sup> _,_ 2 <sup>_)_</sup> <sup>+</sup> <sup>_Y_</sup> _l_ <sup>Dec</sup> _,_ 2 _l_ <sup>Dec</sup> −1 _l_ <sup>Dec</sup> _,_ 1 <sup>_, X_</sup> _N_ <sup>Enc</sup> _N_ <sup>Enc</sup> <sup>_)_</sup> <sup>+</sup> <sup>_Y_</sup> _l_ <sup>Dec</sup> _,_ 1 _,_ (8) _l,_ 1 _l,_ 1 _,_ (9) _Tl_ <sup>Dec</sup> _l_ <sup>Dec</sup> = _Tl_ <sup>Dec</sup> −1 _l_ −1 <sup>+</sup> <sup>_Wl,_</sup> <sup>1 ×</sup> <sup>_T_</sup> _l,_ 1 + _Wl,_ 2 × _Tl_ <sup>Dec</sup> _,_ 2 <sup>+</sup> <sup>_W_</sup> _l_ <sup>Dec</sup> −1 <sup>+</sup> <sup>_Wl,_</sup> <sup>1 ×</sup> <sup>_T_</sup> _l_ <sup>Dec</sup> _,_ 1 _l_ <sup>Dec</sup> _,_ 3 <sup>_,_</sup> (10) _l_ <sup>Dec</sup> _,_ 2 <sup>+</sup> <sup>_Wl,_</sup> <sup>3 ×</sup> <sup>_T_</sup> _l_ <sup>Dec</sup> _,_ 3 where _Xl_ <sup>Dec</sup> _l_ <sup>Dec</sup> = _Yl_ <sup>Dec</sup> _,_ 3 _l_ <sup>Dec</sup> _,i_ and _Tl_ <sup>Dec</sup> _,i_ where _Xl_ <sup>Dec</sup> = _Yl_ <sup>Dec</sup> _,_ 3 <sup>,</sup> <sup>and</sup> <sup>_l_</sup> <sup>∈{1</sup> <sup>_, . . ., M_</sup> <sup>}</sup> <sup>denotes</sup> <sup>the</sup> <sup>output</sup> <sup>of</sup> the _l_ -th decoder layer. _Yl_ <sup>Dec</sup> _,i_ and _Tl_ <sup>Dec</sup> _,i_ <sup>,</sup> <sup>for</sup> <sup>_i_</sup> <sup>∈{1</sup> <sup>_,_</sup> <sup>2</sup> <sup>_,_</sup> <sup>3},</sup> <sup>repre-</sup> the _l_ -th decoder layer. _Yl_ <sup>Dec</sup> _,i_ and _Tl_ <sup>Dec</sup> _,i_ <sup>,</sup> <sup>for</sup> <sup>_i_</sup> <sup>∈{1</sup> <sup>_,_</sup> <sup>2</sup> <sup>_,_</sup> <sup>3},</sup> <sup>repre-</sup> sent the seasonal component and personal-cyclical component, respectively, after the _i_ -th series decomposition block in the _l_ -th layer. The projector for the _i_ -th extracted trend _Tl_ <sup>Dec</sup> _,i_ is denoted as _Wl,i_, where _i_ ∈{1 _,_ 2 _,_ 3}. _Remark_ _1:_ The total electricity prediction can be expressed as the sum of refined decomposed components given as: _Y_ ˆ = _WY_ × _XM_ <sup>Dec</sup> _M_ <sup>Dec</sup> <sup>_,_</sup> (11) _M_ <sup>Dec</sup> + _TM_ <sup>Dec</sup> where _Y_ <sup>ˆ</sup> represents the prediction of total household electricity usage. In this equation, _WY_ is a projection matrix used to transform the deep seasonal component _XM_ <sup>Dec</sup> to the target dimension, and _TM_ <sup>Dec</sup> is an additional cyclical component. _1)_ _End-to-End_ _Multi-Task_ _Learning_ _With_ _Attention:_ Our research addresses load disaggregation challenges through an end-to-end multi-task learning framework with attention mechanisms. This framework distinguishes electrical consumption patterns of different home appliances, which comprises a central shared network and several _Task-Specific_ _Attention_ networks. These networks are connected through attention modules that apply a soft-attention mask to the shared network. _._ (3) _Xl_ <sup>Enc</sup> = Encoder _Xl_ <sup>Enc</sup> −1 This mask selectively emphasizes features relevant to each task, enabling autonomous feature learning within the model. _Remark_ _2:_ Multi-task learning allows a more effective method of managing multiple prediction tasks simultaneously. In the context of multi-task loss computation, the most straightforward strategy is to calculate the average loss, which can be mathematically represented as follows: sub-sequences estimated to be within the same season. According to the estimated length of the seasonal period, we first align the information using specific operations and then aggregate the information. We then employ the format of query, key, and value, allowing for a seamless replacement of the self-attention mechanism. The _Serial-Correlation_ mechanism is Losstotal = <sup><u>1</u></sup> _H_ _h_ ∈ _H_ _RQ,K(τ)_ Loss _h,_ (12) - _τ_ 1 _, . . ., τk_ = arg Top _k_ _RQ,K(τ)_ _,_ (14) _R_ ˆ _Q,K(τ_ 1 _), . . .,_ _R_ ˆ _Q,K(τk)_ = Softmax _(RQ,K(τ_ 1 _),_ _τ_ 1 _, . . ., τk_ = arg Top _k_ where Losstotal represents the total loss for the multi-task system, _H_ is the number of tasks, and Loss _h_ denotes the loss associated with the _h_ -th task. This equation provides a simple yet an effective way of integrating the losses from multiple tasks, ensuring a balanced and comprehensive training process across the different tasks. IV. SERIAL-CORRELATION MECHANISM AND MULTI-TASK ATTENTION We introduce a novel _Serial-Correlation_ mechanism to enhance sequence-level connectivity, utilizing inherent periodicities in sequences to aggregate information effectively. This _Cyclical_ _Aggregation_ approach exploits similar subprocesses across analogous phases in different periods, allowing for period-based dependency incorporation and time-delayed information integration. Additionally, we employ attention masks for simultaneous learning of shared and specific task features, optimizing end-to-end load disaggregation prediction. _A._ _Period-Based_ _Dependencies_ It is evident that temperature exerts a periodic influence on household electricity consumption. The same phase positions across different periods provide similar subprocesses, as exemplified by the consistent recurrence of the four seasons each year. Inspired by the theory of stochastic processes [27], for a real discrete-time process { _Xt_ }, its _Serial-Correlation_ _R(τ)_ can be obtained using the following equation: _. . ., RQ,K(τk)),_ (15) P _(V, τi)R_ <sup>ˆ</sup> _Q,X(τi)._ (16) SC _(Q, K, V)_ = _i_ ∈ _T_ Given a series, the top _Serial-Correlation_ is obtained as Top _k(_ - _)_, where _k_ = [ _a_ ×log _L_ ], _a_ is a hyper-parameter, and _L_ is the length of the series. The _Serial-Correlation_ between series _Q_ and _K_ is denoted by _RQ,K_ . The operation P _(X, τ)_ represents the operation applied to _X_ with a time cycle _τ_ . During this operation, elements that are shifted beyond the first position are re-introduced at the last position for the encoder-decoder _Serial-Correlation_, where _K, V_ are from the encoder _XN_ <sup>Enc</sup> and are resized to length- _Q_, where _Q_ is from the decoder’s previous block. _C._ _Task-Specific_ _Attention_ The _Task-Specific_ _Attention_ (TSA) module employs a sophisticated machine learning technique, particularly adept in complex scenarios like house load disaggregation, which can be represented as: TSA = _f_ _(Tk_ 1 _, Tk_ 2 _, . . ., TkH_ ; _A),_ (17) where _Tk_ 1 _, Tk_ 2 _, . . ., TkH_ are the multiple related tasks (e.g., appliance-specific usage) on which the model is simultaneously trained, and _A_ represents the attention mechanism. The attention module, crucial in this framework, is formulated as: _t_ ∈ _T_ _h_ ∈ _H_ _αh_ - _S(xh),_ (18) _R(τ)_ = lim _L_ →∞ <u>1</u> _L_ _XtXt_ - _τ_ _,_ (13) _A(xh)_ = where _R(τ)_ quantitatively evaluates the temporal similarity between a time series { _Xt_ } and its lagged counterpart { _Xt_ - _τ_ }, considering the time delay _τ_ . In this context, the _Serial-_ _Correlation_ function _R(τ)_ is utilized as an unnormalized confidence index to determine the duration of the period length _τ_ . This metric helps to identify and select the most probable set of _k_ period lengths, denoted as _τ_ 1 _, τ_ 2 _, . . ., τk_ . The periodic similarity is subsequently deduced from these estimated periods, and this measure can be further refined by weighting it with the respective _Serial-Correlation_ values associated with each period length. _B._ _Cyclical_ _Aggregation_ To achieve sequence-level linkage, we need to aggregate similar subsequence information. The dependency relationships based on seasonal cycles can be utilized to connect where _xh_ is the input data segment from the decoder, _H_ is the total number of individual household electrical applications, _αh_ is the attention weights assigned to each segment, and _S(xh)_ is the representation of the segment in the model. In load disaggregation, TSA leverages the interconnected nature of household parameters, enabling a comprehensive understanding of energy dynamics. The attention mechanism enhances the model by dynamically adjusting weights: <u>exp</u> _<u>(</u>_ <u>score</u> _(xh))_ _αh_ = ~~�~~ _h_ ∈ _H_ <sup>exp</sup> <sup>_(_</sup> <sup>score</sup> <sup>_(xh)),_</sup> (19) where score _(xh)_ is a function evaluating tasks’ importance. The results focus on more critical features, such as highimpact appliances or peak consumption times. The complete pseudocode of SMTA is summarized in Algorithm 1. <u>Algorithm</u> <u>1</u> <u>SMTA</u> <u>for</u> <u>NILM</u> 1: Input: Past time series _X_ ; Encoder layers number _N_ ; Decoder layers number _M_ ; Projection matrix _WY_ 2: Output: Total Energy Consumption _Y_ <sup>ˆ</sup> and Electrical Appliances Usage _P_ <sup>Tk</sup> 1 <sup>_, . . ., P_</sup> _H_ <sup>Tk.</sup> that node. This approach assumes that the load demand from each user contributes directly to the total load at the node, thereby allowing us to treat the node’s load as an aggregated value. _B._ _Incentives_ _for_ _Ancillary_ _Service_ The implementation of TOU pricing schemes plays a pivotal role in incentivizing DR for common flexible loads. This pricing strategy encourages the shifting of energy consumption to off-peak hours, aligning with periods of lower electricity prices. The financial benefits of participating in TOU-based DR programs, _C_ <sup>DR</sup>, can be quantified as follows: <sup>Tk</sup> 1 <sup>_, . . ., P_</sup> _H_ <sup>Tk.</sup> 3: for _l_ in 1 _, . . . N_ do 4: Processing with _(_ 4 _)(_ 5 _)_ {Encoder} 5: end for 6: for _l_ in 1 _, . . . M_ do 7: Processing with _(_ 6 _)(_ 7 _)(_ 8 _)(_ 9 _)(_ 10 _)_ {Decoder} 8: end for 9: _Y_ <sup>ˆ</sup> = _WY_ × _XM_ <sup>Dec</sup> + _TM_ <sup>Dec</sup> {Total Energy Consumption } 10: for Each task _Tk_ 1 _, Tk_ 2 _, . . ., TD_ do 11: Processing with _(_ 17 _)(_ 18 _)(_ 19 _)_ {Multi-Task Learning} 12: _P_ <sup>Tk</sup> _h_ <sup>=</sup> <sup>_f_</sup> <sup>_(Th_</sup> <sup>;</sup> <sup>_A)_</sup> <sup>{Electrical</sup> <sup>Appliances</sup> <sup>Usage}</sup> 13: end for 14: Return _Y_ <sup>ˆ</sup> _, P_ <sup>Tk</sup> 1 <sup>_, . . ., P_</sup> _H_ <sup>Tk</sup> V. ENERGY MANAGEMENT IN THE SMART GRID _A._ _Flexible_ _Capacity_ _of_ _Active_ _Consumers_ _i_ ∈ _N_ _C_ <sup>DR</sup> = _t_ ∈ _T_ <sup>DR</sup> _t_ _P_ <sup>DR</sup> _i,t_ <sup>_,_</sup> _λ_ <sup>DR</sup> _t_ <sup>DR</sup> _i,t_ <sup>_,_</sup> (23) <sup>FL</sup> _i,t_ <sup>_,_</sup> <sup>_E_</sup> <sup>ˆ</sup> _i_ <sup>EV</sup> Based on NILM results, _Y_ <sup>ˆ</sup> = { _P_ <sup>ˆ</sup> <sup>FL</sup> _i,t_ Based on NILM results, _Y_ <sup>ˆ</sup> = { _P_ <sup>ˆ</sup> <sup>FL</sup> _i,t_ <sup>_,_</sup> <sup>_E_</sup> <sup>ˆ</sup> _i_ <sup>EV</sup> }. At first, common flexible loads like HVAC systems can be effectively managed to reduce peak demand loads by shifting their operation to offpeak hours. The capacity of these flexible loads to participate in DR programs can be mathematically evaluated by considering the range of their predicted operational boundaries at specific times, as (20): where _T_ denotes the set of operation time horizon, _N_ represents the set of buses in the smart grid, and _λ_ <sup>DR</sup> _t_ is the compensation price for participating DR program. Furthermore, considering the critical percentage of common flexible loads is from the HVAC system, it is important to explore and balance the energy consumed by HVAC system with indoor temperature control. The complex relationship between them can be effectively approximated through a simplified thermal dynamic model. This model is crucial for capturing the impact of load adjustments on indoor temperature, a key aspect in maintaining occupant comfort while participating in DR programs. The approximate relationship, reflecting this balance, is expressed as follows: _._ (24) _i,t_ <sup>FL</sup> _i,t_ <sup>−</sup> <sup>_ξ_</sup> <sup>_P_</sup> _i_ <sup>DR</sup> _,t_ _P_ <sup>~~D~~</sup> _i,t_ <sup>R</sup> <sup>FL</sup> _i,t_ <sup>−ˆ</sup> <sup>_P_</sup> _<u>i</u>_ <sup>FL</sup> _<u>,t</u>_ _<u>i</u>_ <sup>FL</sup> _<u>,t</u>_ <sup>_._</sup> (20) <sup>~~D~~</sup> _i,t_ <sup>R</sup> <sup>=</sup> <sup>_P_</sup> <sup>ˆ</sup> <sup>FL</sup> _i,t_ _Ti_ <sup>In</sup> _,t_ _i_ <sup>In</sup> _,t_ +1 <sup>=</sup> <sup>_T_</sup> _i_ <sup>In</sup> _,t_ _P_ ˆ <sup>FL</sup> _i,t_ _i_ <sup>In</sup> _,t_ <sup>_e_</sup> <u>−1</u> _<u>γiκi</u>_ + + _Ti_ <sup>Out</sup> _,t_ + _Ti_ <sup>Out</sup> _,t_ - <sup>�</sup> <u>1</u> 1 − _e_ <sup>−</sup> _<u>γiκi</u>_ _γi_ Herein, _P_ <sup>DR</sup> _i,t_ denotes the active power of common flexible loads participation in DR at bus _i_ time _t_ ; _P_ <sup>ˆ</sup> <sup>FL</sup> _i,t_ <sup>is</sup> <sup>the</sup> <sup>value</sup> <sup>of</sup> predicted common flexible loads. In addition, EVs stand out as high-energy consumption appliances, their energy storage capabilities enable them, alongside BESS, to effectively serve reserve capacity, adeptly adjusting to variations in grid demand. Mathematically, the reserve capacity of these systems is quantified through their charging and discharging potential, as follows: _i_ <sup>In</sup> _,t_ <sup>,</sup> <sup>_T_</sup> _i_ <sup>Out</sup> _,t_ Herein, _Ti_ <sup>In</sup> _,t_ _<u>p</u>_ <sup>~~R~~</sup> _i,t_ <sup>es↑</sup> _<u>p</u>_ <sup>~~R~~</sup> _i,t_ <sup>es↓</sup> _i_ <sup>BESS</sup> - _Ei_ <sup>BESS</sup> _,t_ _i,t_ <sup>~~R~~</sup> _i,t_ <sup>es↑</sup> _�t_ = _Ei_ <sup>BESS</sup> _,t_ _,_ (21) _<u>i</u>_ <sup>EV</sup> _<u>,t</u>_ <sup>_,_</sup> (22) _i,t_ - _i,t_ <sup>~~R~~</sup> _i,t_ <sup>es↓</sup> _�t_ = _Ei_ <sup>BESS</sup> _i_ <sup>EV</sup> _,t_ <sup>−ˆ</sup> <sup>_E_</sup> _<u>i</u>_ <sup>EV</sup> _<u>,t</u>_ Herein, _Ti_ <sup>In</sup> _,t_ <sup>,</sup> <sup>_T_</sup> _i_ <sup>Out</sup> _,t_ denote the indoor and outdoor temperature of energy consumers at bus _i_ time _t_, respectively, _ξ_ is the percent of the HVAC is the total energy consumption profile, _γi_ is the thermal resistance, and _κi_ refers the heat ratio of air. As for reserve service, financial incentives are comprised of two parts, including capacity reward and payoff for reserve regulation power. The former provides financial incentives to EVs and BESS for allocating their storage capacity to the grid, the latter involves compensation for the actual energy regulation services provided by EVs and BESS. The mathematical representation of the reserve capacity provided by these systems is as follows: + _E_ <sup>ˆ</sup> _i_ <sup>EV</sup> _,t_ where _p_ <sup>Res</sup> _i,t_ <sup>↑</sup> <sup>Res</sup> _i,t_ <sup>↑</sup> and _p_ <sup>Res</sup> _i,t_ <sup>↓</sup> where _p_ <sup>Res</sup> _i,t_ <sup>↑</sup> and _p_ <sup>Res</sup> _i,t_ <sup>↓</sup> denote the reserve upstream and downstream capacity respectively, _�t_ is the interval between two temporal slices, _Ei_ <sup>BESS</sup> refers to rated energy capacity of BESS, _Ei_ <sup>BESS</sup> _,t_ is the energy level of BESS at bus _i_ time _t_, and _E_ <sup>ˆ</sup> _i_ <sup>EV</sup> _,t_ <sup>represents the predicted energy level of EV. It should</sup> be noted that in this study, the spinning and non-spinning reserves typically provided by DG are not considered, due to the slower ramping capabilities, less flexibility, and extra costs to rapid grid demand changes compared to EVs and BESS. In addition, the relationship between nodes and users can be established by aggregating the load demand of all users connected to a specific node. This means that the total load at a given node is the sum of the loads of all users assigned to _i,t_ _�t_ _p_ <sup>Res</sup> _i,t_ <sup>↓</sup> <sup>Res</sup> _i,t_ <sup>↓</sup> + _p_ <sup>Res</sup> _i,t_ <sup>↓</sup> _C_ <sup>Res</sup> = _t_ ∈ _T_ + _i_ ∈ _N_ _t_ <sup>↑</sup> <sup>_P_</sup> <sup>Res</sup> _i,t_ <sup>↑</sup> _i_ ∈ _N_ _πt_ <sup>↑</sup> <sup>Res</sup> _i,t_ <sup>↑</sup> - _πt_ <sup>↓</sup> _t_ <sup>↓</sup> <sup>_P_</sup> <sup>Res</sup> _i,t_ <sup>↓</sup> _i,t_ _�t,_ (25) where _�t_ refers to rewards for reserve capacity, _πt_ <sup>↑</sup> where _�t_ refers to rewards for reserve capacity, _πt_ <sup>↑</sup> and _πt_ <sup>↓</sup> denote the payoff price for upstream and downstream reserve regulation power, and _P_ <sup>Res</sup> _i,t_ <sup>↓</sup> and _P_ <sup>Res</sup> _i,t_ <sup>↑</sup> represent the downstream and upstream reserve regulation power. In detail, this service includes energy discharge (for upward reserves) or charge (for downward reserves) in response to grid demand variation. The variables in (25) can be further <sup>Res</sup> _i,t_ <sup>↓</sup> and _P_ <sup>Res</sup> _i,t_ <sup>↑</sup> expressed by (26) and (27) with explicit charging and discharging power. _P_ <sup>Res</sup> _i,t_ <sup>↑</sup> _P_ <sup>Res</sup> _i,t_ <sup>↓</sup> <sup>BESS+</sup> _i,t_ <sup>Res</sup> _i,t_ <sup>↑</sup> = _P_ <sup>BESS</sup> _i,t_ <sup>−</sup> <sup>Res</sup> _i,t_ <sup>↓</sup> = _P_ <sup>BESS+</sup> _i,t_ <sup>BESS</sup> _i,t_ <sup>−</sup> + _P_ <sup>EV</sup> _i,t_ <sup>−</sup> <sup>EV</sup> _i,t_ <sup>−</sup> _,_ (26) from providing ancillary services from the total expenses incurred in purchasing power from the bulk grid, dispatching DG, and BESS degradation cost. Mathematically, it is presented as follows: <sup>EV+</sup> _i,t_ _,_ (27) _P_ <sup>BESS+</sup> _i,t_ <sup>BESS+</sup> _i,t_ + _P_ <sup>EV+</sup> _i,t_ _i,t_ (33) _i_ ∈ _N_ <sup>_δi_</sup> _i_ <sup>DG</sup> _i,t_ <sup>_�t_</sup> <sup>+ �</sup> _P_ <sup>BESS</sup> _i_ <sup>−</sup> <sup>BESS</sup> _i_ <sup>−</sup> + _βiEi_ <sup>BESS</sup> _,t_ - _C_ <sup>Res</sup> where subscript +, - represent the charging and discharging power of relevant devices, respectively, and _P_ <sup>BESS+</sup> _i,t_ denotes the power absorbed by the BESS excluding the portion associated with reserve regulation power. min �� _t_ ∈ _T_ _t_ ∈ + <sup>�</sup> _t_ ∈ _T_ <sup>_ci,tP_</sup> <sup>DG</sup> _i,t_ _t_ ∈ _T_ <sup>_λtP_</sup> _t_ <sup>Grid</sup> _t_ <sup>Grid</sup> _�t_ - _C_ <sup>DR</sup> To further optimize the operation of EVs within the reserve service, the State of Charge (SOC)-based model developed to explicitly define the relationship between charging and discharging power and the resultant energy changes for batteries is implemented. This model is fundamental and essential for regulating the charging and discharging cycles of batteries, facilitating their efficient integration into reserve services and ensuring battery health. The SOC model of EV can be formulated as follows: subject to _V_ 0 _Pi_ +1 _,t_ = _Pi,t_ + _P_ <sup>G</sup> _i_ + <sup>G</sup> _i_ +1 _,t_ <sup>−</sup> <sup>_P_</sup> _i_ <sup>Lat</sup> +1 _i_ <sup>Lat</sup> +1 _,t_ _P_ <sup>LD</sup> _i_ + <sup>DR</sup> _i_ +1 _,t_ <sup>−</sup> <sup>_P_</sup> <sup>Res</sup> _i_ +1 <sup>↑</sup> _,t_ _i_ +1 _,t_ <sup>Res</sup> _i_ +1 <sup>↑</sup> _,t_ <sup>+</sup> <sup>_P_</sup> _i_ <sup>Res</sup> +1 <sup>↓</sup> _,t_ <sup>LD</sup> _i_ +1 _,t_ <sup>−</sup> <sup>_P_</sup> <sup>DR</sup> _i_ +1 _,_ ∀ _i, t,_ (34) - _Qi_ +1 _,t_ = _Qi,t_ - _Q_ <sup>LD</sup> _i_ +1 _,t_ <sup>−</sup> <sup>_Q_</sup> _i_ <sup>DR</sup> +1 _,t_ - _Q_ <sup>Lat</sup> _i_ +1 _,t_ <sup>_,_</sup> ∀ _i, t,_ (35) _Q_ <sup>LD</sup> _i_ + _i_ <sup>DR</sup> +1 _,t_ <sup>LD</sup> _i_ +1 _,t_ <sup>−</sup> <sup>_Q_</sup> _i_ <sup>DR</sup> +1 - _Q_ <sup>Lat</sup> _i_ +1 <sup>Lat</sup> _i_ +1 _,t_ <sup>_,_</sup> ∀ _i, t,_ (35) _,_ ∀ _i, t,_ (36) _Vi_ +1 _,t_ = _Vi,t_ - <sup>_<u>riPi,t</u>_</sup> <sup>+</sup> <sup>_<u>xiQi,t</u>_</sup> _P_ <sup>EV</sup> _i,t_ <sup>+</sup> _i_ <sup>EV</sup> _�t_ _,_ (28) _P_ <sup>EV</sup> _<u>i,t</u>_ <sup>−</sup> _ηi_ <sup>EV</sup> - _P_ Grid _t_ + _P_ <sup>DG</sup> _i,t_ _P_ Grid _t_ + _P_ <sup>DG</sup> _i,t_ <sup>_,_</sup> ∀ _t, i_ = 1 _P_ <sup>DG</sup> _i,t_ <sup>_,_</sup> ∀ _t, i_ ̸ = _t_ (37) <sup>DG</sup> _i,t_ <sup>_,_</sup> ∀ _t, i_ ̸ = 1 _,_ _SOCi_ <sup>EV</sup> _,t_ _i_ <sup>EV</sup> _,t_ <sup>=</sup> <sup>_SOC_</sup> _i_ <sup>EV</sup> _,t_ _i_ <sup>EV</sup> _,t_ −1 <sup>+</sup> <sup>EV</sup> _i,t_ <sup>+</sup> _ηi_ <sup>EV</sup> _Ei_ <sup>EV</sup> _P_ <sup>G</sup> _i,t_ <sup>=</sup> <sup>DG</sup> _i,t_ <sup>≤</sup> <sup>_P_</sup> _i_ <sup>~~D~~</sup> <sup>G</sup> _i_ <sup>~~D~~</sup> <sup>G</sup> _,_ ∀ _i, t,_ (38) ~~E~~ V _<u>SOC</u>_ <sup>EV</sup> _~~i~~_ ≤ _SOCi_ <sup>EV</sup> _,t_ <sup>≤</sup> <sup>_SOC_</sup> _i_ _,_ (29) ~~�~~ 0 ≤ _P_ <sup>EV</sup> _i,t_ <sup>+</sup> ≤ _P_ <sup>~~E~~</sup> _i_ <sup>V</sup> _μ_ - <sup>EV</sup> _i,t_ - _,_ (30) _<u>P</u>_ <sup>DG</sup> _i_ <sup>DG</sup> _i_ ≤ _P_ <sup>DG</sup> _i,t_ _<u>SOC</u>_ <sup>EV</sup> _~~i~~_ <sup>EV</sup> _~~i~~_ ≤ _SOCi_ <sup>EV</sup> _,t_ _i_ <sup>EV</sup> _,t_ <sup>≤</sup> <sup>_SOC_</sup> _<u>V</u>_ _~~i~~_ ≤ _Vi,t_ ≤ _V_ _i,_ ∀ _i, t,_ (39) <sup>~~E~~</sup> _i_ <sup>V</sup> _μ_ - <sup>EV</sup> _i,t_ _i_ <sup>In</sup> _,t_ <sup>≤</sup> <sup>_T_</sup> <sup>~~I~~</sup> _i_ <sup>n</sup> <sup>~~I~~</sup> _i_ <sup>n</sup> <sup>_,_</sup> ∀ _i, t,_ (40) _i,t_ _i_ - _i,t_ 0 ≤ _P_ <sup>EV</sup> _i,t_ <sup>−</sup> ≤ _P_ <sup>~~E~~</sup> _i_ <sup>V</sup> 1 _<u>T</u>_ <sup>In</sup> _i_ <sup>In</sup> _i_ <sup>≤</sup> <sup>_T_</sup> _i_ <sup>In</sup> _,t_ - _,_ (30) _i_ - _i,t_ 1 − _μ_ <sup>EV</sup> _i,t_ _μ_ <sup>EV</sup> _i,t_ <sup>∈{0</sup> <sup>_,_</sup> <sup>1}</sup> <sup>_,_</sup> (31) 0 ≤ _P_ <sup>DR</sup> _i,t_ <sup>≤</sup> <sup>_P_</sup> <sup>~~D~~</sup> _i,t_ <sup>R</sup> <sup>_,_</sup> ∀ _i, t,_ (41) <sup>Res</sup> _i,t_ <sup>↓</sup> ≤ _<u>p</u>_ <sup>~~R~~</sup> _i,t_ <sup>es↓</sup> <sup>Res</sup> _i,t_ <sup>↓</sup> ≤ _<u>p</u>_ <sup>~~R~~</sup> _i,t_ <sup>es↓</sup> <sup>~~R~~</sup> _i,t_ <sup>es↓</sup> _,_ ∀ _i, t,_ (42) <sup>~~R~~</sup> _i,t_ <sup>es↓</sup> _,_ ∀ _i, t._ (43) _SOCi_ <sup>EV</sup> _,t_ _i_ <sup>EV</sup> _,t_ <sup>≤</sup> <sup>_SOC_</sup> _i_ <sup>EV</sup> _,_ _i_ <sup>EV</sup> _,_ End <sup>_,_</sup> _t_ = _<u>t</u>_ <sup>~~E~~</sup> _i_ <sup>V</sup> <sup>~~E~~</sup> _i_ <sup>V</sup> _._ (32) 0 ≤ _p_ <sup>Res</sup> _i,t_ <sup>↑</sup> ≤ _<u>p</u>_ <sup>~~R~~</sup> _i,t_ <sup>es↑</sup> 0 ≤ _P_ <sup>Res</sup> _i,t_ <sup>↑</sup> ≤ _<u>p</u>_ <sup>~~R~~</sup> _i,t_ <sup>es↑</sup> <sup>~~R~~</sup> _i,t_ <sup>es↑</sup> ; 0 ≤ _p_ <sup>Res</sup> _i,t_ <sup>↓</sup> <sup>~~R~~</sup> _i,t_ <sup>es↑</sup> ; 0 ≤ _P_ <sup>Res</sup> _i,t_ <sup>↓</sup> Herein, _SOCi_ <sup>EV</sup> _,t_ _i_ <sup>EV</sup> _,t_ <sup>denotes SOC of EV,</sup> <sup>_η_</sup> _i_ <sup>EV</sup> Herein, _SOCi_ <sup>EV</sup> _,t_ <sup>denotes SOC of EV,</sup> <sup>_η_</sup> _i_ <sup>EV</sup> denotes EV charg ing coefficient and _μ_ <sup>EV</sup> _i,t_ <sup>is the binary variable to determine the</sup> status of charging. In this model, (28) describes the energy balance of EV battery, (29) is utilized to prevent the EV from over charging or discharging, (30) ensures that the charging and discharging power are limited between the lower and upper bound, (31) prevents the EV from charging and discharging simultaneously, and (32) imposes the energy at departure time is no less than the expected value. In particular, the operation time _t_ must be limited within the parking period between arrival and departure time as _ti_ <sup>EV</sup> = [ _ti_ <sup>Arr</sup> _, ti_ <sup>Dep</sup> ]. It is worth mentioning that the SOC-based model is adaptable to BESS as well, by omitting the operation time limitation _ti_ <sup>EV</sup> of EV, explicit formulations of BESS can be obtained by replacing the relevant superscript with “BESS” while substituting the corresponding parameters. _Remark_ _3:_ For the DR program, we currently focus on the load curtailment, indicating _P_ <sup>DR</sup> _i,t_ is consistently positive. Besides, for the _πi_ <sup>↓</sup> _,t_ <sup>,</sup> <sup>it</sup> <sup>maintains</sup> <sup>a</sup> <sup>low</sup> <sup>value</sup> <sup>during</sup> <sup>off-peak</sup> hours and may occasionally become negative, which benefits the downstream reserve regulation. <sup>Lat</sup> _i,t_ <sup>,</sup> <sup>_Q_</sup> <sup>Lat</sup> _i,t_ <sup>LD</sup> _i,t_ <sup>,</sup> <sup>_Q_</sup> <sup>LD</sup> _i,t_ _i_ <sup>Arr</sup> _, ti_ <sup>Dep</sup> _i_ <sup>EV</sup> = [ _ti_ <sup>Arr</sup> _C._ _Energy_ _Management_ _Model_ _and_ _Optimization_ The energy management model is formulated as an optimization problem, with the primary objective of minimizing operational costs. This objective is achieved by calculating the net cost, which involves subtracting the revenue generated Here, (28)-(32) and the BESS constraints should also be binding. In the above formulations, _δi_ refers to the degradation cost of BESS, _ci_ denotes the unit operation cost of DG, _βi_ is the life cycle coefficient associated with the BESS energy, _Pi,t_, _Qi,t_ refer to active and reactive power through main branch following bus _i_, _P_ <sup>Lat</sup> _i,t_ <sup>,</sup> <sup>_Q_</sup> <sup>Lat</sup> _i,t_ <sup>refers</sup> <sup>to</sup> <sup>active</sup> <sup>and</sup> <sup>reactive</sup> <sup>power</sup> through lateral branch following bus _i_, _P_ <sup>LD</sup> _i,t_ <sup>,</sup> <sup>_Q_</sup> <sup>LD</sup> _i,t_ <sup>denote nodal</sup> active and reactive power of loads including both fixed loads and flexible loads excluding the part participating DR program, respectively; _P_ <sup>DG</sup> _i,t_ denotes the active power output from DG. Here, PV is considered installed with maximum power point tracking (MPPT) devices, and the output power of the PV systems can be forecasted based on historical weather conditions. Further, _Vi_ refers to the voltage magnitude, and _V_ 0 is the voltage of reference bus, _ri_ and _xi_ denote the resistance and reactance of the branch following bus _i_ . Equations (34)-(37) denotes the linearized Dist-flow, (34), (35) impose the active and reactive power balance, (36) describes the relationship between nodal voltage and branch power, (38)-(43) impose the upper and lower bound of variables. Specifically, (38) imposes the power output of DG, (39) guarantees the voltage keeping in the safety range, and (40) ensures that indoor being maintained in the comfortable range. The proposed model is a linear problem, and it is solved through mix-integer linear programming. VI. EXPERIMENT _A._ _Experiment_ _Setup_ The proposed framework has been validated using a modified IEEE 57-bus radial distribution system [28], where original loads are replaced with real-world profiles from the Pecan Street dataset [29]. This dataset encompasses data from 100 households in Austin, Texas, USA from January 2017 to December 2018. In detail, we monitor the energy consumption of individual households (e.g., NMI level) in onehour intervals, focusing on high-energy-consuming appliances such as HVAC systems, refrigerators, and WMs. Further, for EV, we capture data from charger focusing on charging times, durations, and energy consumption. Moreover, relevant energy market prices and operational costs were obtained from ISO [30]. The NILM training has been executed using Python and the deep learning framework Pytorch. Pre-trained models were obtained from Hugging face and fine-tuned with our dataset. The training phase was carried out on a GPU-based server equipped with an NVIDIA RTX A5000 GPU, operating on Ubuntu 20.04 OS. Following three cases are employed to test the energy management model: _Case_ 1: The smart grid operates without energy management consideration. _Case_ 2: The smart grid operates involving energy management without NILM. _Case_ 3: The smart grid operates under the proposed framework with NILM supporting energy management. _B._ _Numerical_ _Results_ Fig. 2 presents a detailed comparison of the actual and predicted energy consumption for a typical customer over the course of a year, using data averaged across different seasons of the year. The figure compares the performance of various NILM algorithms, including LSTM [31], temporal convolutional network (TCN) [32], and long short-term memory network fully convolutional network (LSTNet) [33], and SMTA, against the ground truth. In the spring (Fig. 2 (a)), the SMTA algorithm captures the relatively stable energy consumption patterns with high accuracy, showcasing its ability to model conditions where energy usage is moderate and less volatile. This indicates that SMTA is particularly effective in environments where consumption patterns do not fluctuate dramatically. As the seasons change to summer (Fig. 2 (b)), all algorithms, including SMTA, face challenges in accurately predicting the energy spikes associated with increased air conditioning use and shifts in daily routines. During this period, the algorithms tend to underestimate peak energy consumption, which can be attributed to the sudden and sharp increases in load that are more difficult to predict. Despite this, SMTA shows a smaller margin of error compared to the other algorithms, reflecting its robustness in dealing with complex consumption patterns, even if not perfectly. In autumn (Fig. 2 (c)), where the energy consumption begins to moderate again, the SMTA algorithm continues to perform well, though it slightly overestimates energy use in the mornings and underestimates it in the evenings. This behavior suggests that while SMTA adapts well to general seasonal transitions, there Fig. 2. Comparison between ground truth and prediction for total energy consumption of a typical customer in the year. TABLE I COMPARISON OF ALGORITHM METRICS may be nuances in the timing of consumption changes that pose challenges. The typical customer’s energy usage during autumn, characterized by gradual shifts rather than abrupt changes, requires algorithms to balance between adapting to new patterns and relying on historical data, which SMTA handles with relative success. Last, winter (Fig. 2 (d)) brings the highest energy demands, particularly in the mornings and evenings due to heating requirements. The SMTA continues to perform strongly in this season, with its predictions closely aligning with the ground truth. However, like the other algorithms, it slightly underestimates morning consumption spikes. This underestimation is likely due to the sharp increases in energy use as heating systems kick in, which even advanced algorithms like SMTA struggle to predict with complete accuracy. Nonetheless, SMTA’s overall performance remains the best among the compared algorithms, demonstrating its effectiveness across a variety of seasons. The performance of the SMTA algorithm in disaggregating energy consumption for EV, HVAC systems, ovens, refrigerators, heaters and WMs is depicted in Fig. 3. The Fig. 3 (a) illustrates the power usage patterns of an EV. The ground truth and the predicted values show high congruence, with distinct peaks indicating charging times, which are accurately forecasted by the algorithm. This Fig. 3 (b) demonstrates the electricity consumption of a HVAC system. The pattern of usage exhibits a cyclic nature with multiple peaks throughout the days. The predictive performance closely tracks the actual usage, albeit with minor deviations. The power consumption of the oven is depicted in Fig. 3 (c) with much smaller magnitudes compared to the previous appliances. The sporadic usage of the oven is reflected in the sharp, TABLE II ECONOMIC PERFORMANCE EVALUATION BETWEEN DIFFERENT CASES Fig. 3. Comparison between ground truth and prediction for 6 appliances (4 days). infrequent spikes of energy consumption, which the algorithm predicts with reasonable accuracy. The refrigerator’s consumption pattern shows a consistent series of peaks and troughs in Fig. 3 (d), indicative of the compressor’s start-stop cycles. The prediction closely aligns with the ground truth, capturing the regular rhythm of energy use. Similar to the HVAC, the heater’s energy profile in Fig. 3 (e) is characterized by repetitive peaks that correspond to the operational cycles. The predicted values exhibit a high degree of similarity to the actual consumption, demonstrating the algorithm’s effective performance. The usage pattern of the WMs in Fig. 3 (f) is highly periodic with clearly defined usage events. The algorithm effectively mirrors the ground truth, indicating precise predictions of operational cycles. Overall, as given in Fig. 3, the proposed SMTA can effectively disaggregate and predict the energy consumption of various household appliances with a high level of accuracy, as seen in the close matching of the predicted values to the ground truth across all subfigures. Table I delineates the comparative performance of four computational NILM algorithms across a spectrum of household appliances for energy consumption forecasting. The table is divided into columns representing each algorithm and rows for each appliance type, with mean absolute error (MAE) and mean squared error (MSE) as the chosen metrics for comparison. Lower values of MAE and MSE correspond to higher predictive accuracy. The SMTA outperforms the other algorithms in both metrics for all appliances, which Fig. 4. Major management strategy for EV, and BESS within 48 hours. include EV, HVAC system, Oven, Refrigerator, Heater, and WM, indicating its superior capability in forecasting energy consumption with greater precision. Table II presents an economic evaluation of a smart grid’s operation under three different scenarios over one year. When the grid operates without any energy management, the net operation cost is the highest, amounting to $70,874.5. Incorporating basic energy management strategies, such as demand response and reserve services, reduces the net operation cost to $57,131, which represents a 19.5% decrease. This reduction highlights the effectiveness of even simple energy management practices in lowering operational expenses. However, when the proposed NILM-supported framework, utilizing the SMTA algorithm, is applied, the net operation cost further decreases to $41,778.7. This represents a substantial 26.9% reduction compared to the basic energy management scenario, and an overall 41.1% reduction compared to the scenario without any energy management. As shown in Fig. 4, the energy management focusing on strategies for EV charging and BESS operation over 48 hours is given. The grid shows low power demand during offpeak hours, likely indicating minimal EV charging and BESS usage. Demand rises in the morning and evening, coinciding with peak EV charging times, with BESS deployment likely moderating the increased load. Throughout the two days, the grid demonstrates a responsive energy management approach, utilizing BESS to balance the load during high-demand periods, ensuring stable grid operation while accommodating the charging cycles of EVs. This suggests an effective integration of BESS to support dynamic energy needs and optimize overall grid performance. VII. CONCLUSION This paper presents an innovative framework utilizing NILM techniques, specifically designed for enhanced energy management in smart grids, with a particular focus on managing high-energy consumption flexible loads such as HVAC systems and EVs. The key part of this framework is the SMTA algorithm, a novel NILM algorithm devised to effectively disaggregate long-term household load data. In the experiment with real-world data, the application of the SMTA algorithm has demonstrated improvements in the accuracy of load disaggregation. This accuracy is crucial for potential adjustment of the flexible loads, both in terms of timing and amount, enabling more informed decisions in energy management, which in turn contributes to reducing the overall operational costs in smart grids. In future work, with the availability of a more comprehensive dataset, the framework will extend to include V2G technology. This expansion is expected to introduce additional complexities and offer more energy management scenarios. The potential effects of integrating V2G technology include increased grid flexibility, optimized energy usage, and new financial incentives for EV owners. However, this growth also presents several challenges including technical integration, mature regulatory and market structure. Our future work will focus on addressing these challenges and exploring the full potential of V2G in combination with NILM techniques to further optimize energy management in smart grids. REFERENCES [1] S. Sharda, M. Singh, and K. Sharma, “Demand side management through load shifting in IoT based hems: Overview, challenges and opportunities,” _Sustain._ _Cities_ _Soc._, vol. 65, Feb. 2021, Art. no. 102517. [2] D. Kanakadhurga and N. Prabaharan, “Demand side management in microgrid: A critical review of key issues and recent trends,” _Renew._ _Sustain._ _Energy_ _Rev._, vol. 156, Mar. 2022, Art. no. 111915. [3] A. C. Duman, H. S. Erden, Ö. Gönül, and Ö. Güler, “A home energy management system with an integrated smart thermostat for demand response in smart grids,” _Sustain._ _Cities_ _Soc._, vol. 65, Feb. 2021, Art. no. 102639. [4] M. Shafie-Khah et al., “Optimal behavior of electric vehicle parking lots as demand response aggregation agents,” _IEEE_ _Trans._ _Smart_ _Grid_, vol. 7, no. 6, pp. 2654–2665, Nov. 2016. [5] D. Setlhaolo and X. Xia, “Combined residential demand side manage ment strategies with coordination and economic analysis,” _Int._ _J._ _Electr._ _Power_ _Energy_ _Syst._, vol. 79, pp. 150–160, Jul. 2016. [6] J. Guerrero, D. Gebbran, S. Mhanna, A. C. Chapman, and G. Verbiˇc, “Towards a transactive energy system for integration of distributed energy resources: Home energy management, distributed optimal power flow, and peer-to-peer energy trading,” _Renew._ _Sustain._ _Energy_ _Rev._, vol. 132, Oct. 2020, Art. no. 110000. [7] A. Sangswang and M. Konghirun, “Optimal strategies in home energy management system integrating solar power, energy storage, and vehicleto-grid for grid support and energy efficiency,” _IEEE_ _Trans._ _Ind._ _Appl._, vol. 56, no. 5, pp. 5716–5728, Sep./Oct. 2020. [8] Z. Yang et al., “Energy management programming to reduce distribution network operating costs in the presence of electric vehicles and renewable energy sources,” _Energy_, vol. 263, Jan. 2023, Art. no. 125695. [9] S. Das, P. Acharjee, and A. Bhattacharya, “Coordinated charging scheduling for electric vehicles and optimal tuning of the controller for frequency regulation under uncertain environment,” in _Proc._ _IEEE_ _Ind._ _Appl._ _Soc._ _Annu._ _Meeting_, 2021, pp. 1–6. [10] L. Jian, Y. Zheng, and Z. Shao, “High efficient valley-filling strategy for centralized coordinated charging of large-scale electric vehicles,” _Appl._ _Energy_, vol. 186, pp. 46–55, Jan. 2017. [11] Y. Tao, J. Qiu, S. Lai, Y. Wang, and X. Sun, “Reserve evaluation and energy management of micro-grids in joint electricity markets based on non-intrusive load monitoring,” _IEEE_ _Trans._ _Ind._ _Appl._, vol. 59, no. 1, pp. 207–219, Jan./Feb. 2022. [12] G. W. Hart, “Nonintrusive appliance load monitoring,” _Proc._ _IEEE_, vol. 80, no. 12, pp. 1870–1891, Dec. 1992. [13] M. Zeifman and K. Roth, “Nonintrusive appliance load monitoring: Review and outlook,” _IEEE_ _Trans._ _Consum._ _Electron._, vol. 57, no. 1, pp. 76–84, Feb. 2011. [14] N. Kaneko et al., “Non-intrusive thermal load disaggregation and fore casting for effective HVAC systems,” _Appl. Energy_, vol. 367, Aug. 2024, Art. no. 123379. [15] J. Z. Kolter and M. J. Johnson, “REDD: A public data set for energy disaggregation research,” in _Proc._ _Workshop_ _Data_ _Min._ _Appl._ _Sustain._ _(SIGKDD)_, vol. 25, San Diego, CA, USA, 2011, pp. 59–62. [16] D. Yang, X. Gao, L. Kong, Y. Pang, and B. Zhou, “An event-driven convolutional neural architecture for non-intrusive load monitoring of residential appliance,” _IEEE_ _Trans._ _Consum._ _Electron._, vol. 66, no. 2, pp. 173–182, May 2020. [17] H. Yin, K. Zhou, and S. Yang, “Non-intrusive load monitoring by load trajectory and multi-feature based on DCNN,” _IEEE_ _Trans._ _Ind._ _Informat._, vol. 19, no. 10, pp. 10388–10400, Oct. 2023. [18] J. He et al., “MSDC: Exploiting multi-state power consumption in non intrusive load monitoring based on a dual-CNN model,” in _Proc._ _AAAI_ _Conf._ _Artif._ _Intell._, vol. 37, 2023, pp. 5078–5086. [19] D. Murray, L. Stankovic, V. Stankovic, S. Lulic, and S. Sladojevic, “Transferability of neural network approaches for low-rate energy disaggregation,” in _Proc._ _IEEE_ _Int._ _Conf._ _Acoust.,_ _Speech_ _Signal_ _Process._, Brighton, U.K, 2019, pp. 8330–8334. [20] J. Xiong, T. Hong, D. Zhao, and Y. Zhang, “MATNilm: Multi-appliance task non-intrusive load monitoring with limited labeled data,” _IEEE_ _Trans._ _Ind._ _Informat._, vol. 20, no. 3, pp. 3177–3187, Mar. 2024. [21] C. Shin, S. Joo, J. Yim, H. Lee, T. Moon, and W. Rhee, “Subtask gated networks for non-intrusive load monitoring,” in _Proc._ _33rd_ _AAAI_ _Conf._ _Artif._ _Intell._ _(AAAI)_, vol. 33, Honolulu, Hawaii, USA, 2019, pp. 1150–1157. [22] G. F. Angelis et al., “Energformer: A new transformer model for energy disaggregation,” _IEEE_ _Trans._ _Consum._ _Electron._, vol. 69, no. 3, pp. 308–320, Aug. 2023. [23] R. Jiao, C. Li, G. Xun, T. Zhang, B. B. Gupta, and G. Yan, “A context-aware multi-event identification method for nonintrusive load monitoring,” _IEEE_ _Trans._ _Consum._ _Electron._, vol. 69, no. 2, pp. 194–204, May 2023. [24] K. Chen, Y. Zhang, Q. Wang, J. Hu, H. Fan, and J. He, “Scale-and context-aware convolutional non-intrusive load monitoring,” _IEEE Trans._ _Power_ _Syst._, vol. 35, no. 3, pp. 2362–2373, May 2020. [25] K. Cao, T. Zhang, and J. Huang, “Advanced hybrid LSTM-transformer architecture for real-time multi-task prediction in engineering systems,” _Sci._ _Rep._, vol. 14, no. 1, p. 4890, 2024. [26] H. Wu, J. Xu, J. Wang, and M. Long, “Autoformer: Decomposition trans formers with auto-correlation for long-term series forecasting,” in _Proc._ _Adv._ _Neural_ _Inf._ _Process._ _Syst._, vol. 34, 2021, pp. 22419–22430. [27] F. Edition, A. Papoulis, and S. U. Pillai, _Probability, Random Variables,_ _and_ _Stochastic_ _Processes_ . New York, NY, USA: McGraw-Hill, 2002. [28] M. E. Baran and F. F. Wu, “Network reconfiguration in distribution systems for loss reduction and load balancing,” _IEEE Trans. Power Del._, vol. 4, no. 2, pp. 1401–1407, Apr. 1989. [29] (Pecan Street Inc., Austin, TX, USA). _Pecan Street Dataport_ . Accessed: Jan. 2024. [Online]. Available: http://www.pecanstreet.org [30] “AEMO national electricity market.” AEMO. Accessed: Dec. 2023. [Online]. Available: https://aemo.com.au/energy-systems/electricity/ national-electricity-market-nem/data-nem [31] A. Graves and A. Graves, “Long short-term memory,” in _Supervised_ _Sequence_ _Labelling_ _with_ _Recurrent_ _Neural_ _Networks_ . Berlin, Germany: Springer, 2012, pp. 37–45. [32] C. Lea, M. D. Flynn, R. Vidal, A. Reiter, and G. D. Hager, “Temporal convolutional networks for action segmentation and detection,” in _Proc._ _IEEE_ _Conf._ _Comput._ _Vis._ _Pattern_ _Recognit._ _(CVPR)_, Honolulu, Hawaii, USA, 2017, pp. 1003–1012. [33] G. Lai, W.-C. Chang, Y. Yang, and H. Liu, “Modeling long- and short term temporal patterns with deep neural networks,” in _Proc._ _41st_ _Int._ _ACM_ _SIGIR_ _Conf._ _Res._ _Develop._ _Inf._ _Retr._, 2018, pp. 95–104. Nan Yang (Member, IEEE) received the B.Eng. degree in software engineering from Huaqiao University, Quanzhou, China, in 2015, and the M.Eng. degree in electrical engineering and the Ph.D. degree in computer science from The University of Sydney, Sydney, Australia, in 2018 and 2024, respectively. She is a Postdoctoral Research Associate with the School of Electrical and Computer Engineering, The University of Sydney. Her research interests lie at the intersection of AI and power systems, focusing on cloud computing, federated learning, and semi-supervised learning. Yunqi Wang (Member, IEEE) received the Ph.D. degree in electrical and information engineering from The University of Sydney, Sydney, Australia, in 2022, and remains a research affiliate on ARC projects with the university. He is a CERC Fellow with the Power System Team, CSIRO Energy Business Unit. Prior to joining CSIRO, he was a Research Fellow with Monash University. His research interests include low-carbon energy transition, active demand-side management, and the application of machine learning in optimizing power systems. Yuning Zhang received the B.Eng. degree and the M.Phil. degree in electrical engineering from The University of Sydney, Sydney, Australia, in 2021 and 2023, respectively. He is currently pursuing the Ph.D. degree with the School of Computer and Electrical Engineering, The University of Sydney, with a research focus on systems for machine learning. Dong Yuan (Member, IEEE) received the B.Eng. and M.Eng. degrees in computer science from Shandong University, Jinan, China, in 2005 and 2008, respectively, and the Ph.D. degree in computer science from the Swinburne University of Technology, Melbourne, Australia, in 2012. He is an Associate Professor with the School of Electrical and Computer Engineering, The University of Sydney. His research interests include digital twin, wireless sensing, artificial intelligence, cloud and edge computing, and cybersecurity.

섹션 본문 82문단 · 40,058자

(제목 없음)

1Digital Object Identifier 10.1109/TCE.2024.3489580Nan Yang (Member, IEEE) received the B.Eng. degree in software engineering from Huaqiao University, Quanzhou, China, in 2015, and the M.Eng.degree in electrical engineering and the Ph.D. degree in computer science from

Non-Intrusive Load Monitoring for Energy Management in Smart Grids Incorporating EVs

2Nan Yang , Member, IEEE, Yunqi Wang , Member, IEEE, Yuning Zhang , and Dong Yuan , Member, IEEE Abstract-In the current smart grid, managing high-energy consumption loads, particularly electric vehicles (EVs), become increasingly complex.This paper introduces a framework that employs non-intrusive load monitoring (NILM) techniques for enhanced energy management in smart grids.Our approach encompasses a broader range of common flexible loads and energy related to EV charging.The NILM technology enables the detailed analysis of individual appliance consumption patterns from aggregated smart meter data, addressing privacy concerns and technical limitations.In detail, we propose a new NILM algorithm, Serial Multi-task Transformer with Attention (SMTA), to address the problem of long-term household load disaggregation.SMTA uses a Serial-Correlation mechanism with period-based dependencies and cyclical information aggregation for effective period time series analysis and utilizes the Task-Specific Attention strategy to find the power influence between appliances.Afterwards, based on the NILM results, we develop an energy management model aiming to optimize the net operation cost in the smart grid, after all active customers participation in ancillary service programs.The proposed framework has been verified on a modified IEEE 57-bus radial distribution system based on real-world household data.The results show that the SMTA algorithm significantly improves load disaggregation accuracy.Furthermore, the proposed framework in comparison to basic energy management reduces the net operation costs by up to 26.9%, highlighting the substantial economic benefits of integrating NILM into smart grid operations.Lower and upper bound.

SD(•)

3Series Decomposition operation.

SC(•)

4Serial-Correlation operation.

FF(•)

5Feed forward operation.

P(•)

6Circular shift operation.

I. INTRODUCTION

7T HE GROWING integration of electric vehicles (EVs) and distributed energy resources presents both challenges and opportunities for energy management in smart grids.This integration not only requires more developed management strategies but also facilitates a more flexible distribution of electricity.A key element in addressing these challenges is the active engagement of the demand side [1].Thus, customer load profiles have become increasingly important in shaping demand management strategies.Meanwhile, with the development of control techniques, the Internet-of-Things (IoT) energy devices (e.g., smart meters) enable data collection and communication.When combined with big data analytics, these innovations are opening new pathways for effective energy management.

8Active customers can participate in demand-side management programs that encourage customers to improve energy efficiency, with demand response (DR) being a subset of these initiatives.This initiative, aimed at temporary energy demand reduction, is typically initiated by distribution system operators [2].These programs can be triggered by price signals in the ancillary market.These activations, ranging from a few minutes to several hours, may involve measures like reducing lighting, adjusting washing machines (WM), dishwashers and heating, ventilating and air conditioning (HVAC) systems.In the literature, [3] discussed energy management systems in homes, controlling loads and HVAC systems, and various pricing strategies for smart grids.Authors in [4] compared the penitential revenue between different DR incentives in terms of real-time pricing, critical peak pricing, and time-oftariffs (TOU) via participating active demand-side programs.Reference [5] discussed household level for peak load management using differentiated prices and a demand control incentive payment.In addition, EVs and on-site battery storage energy system (BESS) also contribute to adjusting network loads, designed to maintain more flexible system functioning and balance electricity demand and supply.Studies have shown the effectiveness of using EVs and BESS in energy management systems for microgrids to achieve flatter power demand and peak demand shaving.Reference [6] reviewed and investigated the integration of EVs, BESS, and solar photovoltaic (PV) arrays with flexible energy management systems to understand the energy interchange in the distribution network system while maintaining energy efficiency.Reference [7] highlighted the role of EVs, with vehicle-to-grid (V2G) abilities, in improving energy management efficiency in smart homes.Additionally, [8] focused on energy management in microgrids containing EVs and renewable energy sources, considering DR programs.Reference [9] utilized EVs and BESS in tandem for frequency regulation, addressing frequency fluctuations due to dynamic load behaviour and intermittent renewable sources, uncertainties were tackled by robust optimization.Authors in [10] introduced a valley-filling approach for centralized EVs on a large scale, offering a solution with reduced computational demands compared to existing methods.However, the above studies assume that the system operator has the full authority to access the detailed data on controllable loads.Due to privacy concerns, acquiring complete customer data poses a significant challenge for system operators [11].

9The evolution of smart-meter technology has greatly enhanced the detail and accuracy of consumer load profiles, facilitating more effective demand management strategies.Recent focus has shifted to non-intrusive load monitoring (NILM), which identifies the energy usage of individual appliances in residential and commercial settings [12], [13].Convolutional neural networks (CNNs), recurrent neural networks (RNNs), particularly long short-term memory (LSTM) networks, have demonstrated effectiveness in analyzing power usage data [14].CNNs are efficient at extracting spatial features, whereas RNN and LSTM excel at recognizing temporal patterns in energy usage [15].Yang et al. leveraged the CNNs to design an event-driven NILM [16].Further, a deep CNN approach is utilized for NILM in [17].Moreover, a dual-CNN architecture was proposed in [18], where one CNN outputs state distributions and the other predicts power for each state.Additionally, a conditional random field (CRF) is used to capture state transitions, significantly enhancing the model's performance on NILM tasks.Reference [19] proposed gated recurrent unit (GRU) and CNN architectures for multitask learning, with the aim of transferability between data sets.Further, [20] focused on multi-appliance tasks, utilizing a hybrid of CNNs and RNNs to process the data.Reference [21] developed a subtask gated network (SGN) by combining state detection and energy disaggregation network outputs.Angelis et al. introduced the fundamental transformer architecture (i.e., EnergyFormer) into energy disaggregation and demonstrated the unique capabilities of transformers [22].Further, Jiao et al. propose a context-aware identification method for the multi-event NILM [23].Additionally, a scaleand context-aware convolutional network was designed for SGN in across-dataset transfer learning, sharing network components between subtasks [24].Recently, [25] proposed an advanced hybrid architecture combining LSTM networks with Transformers to improve the real-time prediction of multiple tasks in engineering systems, including NILM.The model effectively balances the need for capturing both sequential dependencies and long-range interactions in data, making it suitable for real-time applications.However, there are two issues with all these multi-task learning-based NILM methods.First, the characteristics of power data are relatively simple, and its ability to generalize to new environments or different types of electrical appliances may be limited.The second is that in multi-task learning, the importance of different tasks need to be balanced, which means that low-power and highenergy consumption applications are required to interact with each other in NILM.

10To address the gaps in the existing research, this study proposes an innovative algorithm for NILM, termed Serial Multi-task Transformer with Attention (SMTA).This algorithm is designed to enhance the performance and general applicability of NILM systems in diverse environments and across a wide range of electrical appliances.Moreover, research into NILM's practical applications, especially for complex models with high-power loads such as EVs and BESS in energy management, is still in its early stages and requires further exploration.Therefore, we focused on the pivot towards the application of NILM in smart grids, particularly for efficient management with flexible loads such as HVAC systems and EVs.Compared with the existing research, the novel contributions of this paper can be summarized as follows:

111) To tackle the complex temporal patterns of the long-term multi-task future, we present serial multi-task transformer as a disaggregation architecture and design the Serial-Correlation mechanism with period-based dependencies discovery and cyclical information aggregation, and the Task-Specific Attention strategy with the ability to share complementary features.2) An energy management model incorporating an active demand side is developed, capitalizing on the flexibility potential identified through NILM.This model efficiently achieves economic objectives within smart grid management by optimizing energy usage and cost efficiency.3) Experiment with real-world dataset demonstrates the effectiveness and superiority of the proposed algorithm for NILM.Moreover, energy management enhanced by NILM contributes to savings in net operational costs.Note that by leveraging NILM techniques, the proposed framework can disaggregate load data into individual appliance-level consumption patterns.This granularity enables explicit identification of high-energy-consuming appliances such as HVAC systems and EVs.With detailed load profiles, the framework can optimize the scheduling of flexible loads, and reduce peak load and operational costs.

12The rest of this paper is organized as follows.Section II introduces the overview of the proposed framework.Section III presents the proposed SMTA algorithm for NILM.Section IV gives the detailed Serial-Correlation mechanism and multi-task attention of the proposed algorithm.Section V presents the energy management model based on NILM results.Section VI presents the experiment.Finally, Section VII concludes this paper.

II. OVERVIEW OF THE PROPOSED FRAMEWORK

13The proposed framework begins with data collection from smart meters in the electricity network, utilizing NILM technology to disaggregate data for analyzing energy consumption behaviors.Our novel algorithm, SMTA, works in two stages: first, load decomposition in households using a Serial-Correlation mechanism for time series analysis; and second, predicting appliance-specific electricity usage, combining multi-task learning with an attention mechanism for enhanced accuracy.The framework also evaluates load flexibility for ancillary service programs, with a focus on HVAC systems for DR programs with TOU incentives and EVs for reserve services, considering their charging schedules.BESS is managed by the distribution system operator as an additional reserve.The framework culminates in an energy management model optimizing load flexibility, distributed generation (DG) dispatching, and power purchases from the grid, ensuring efficient energy management.The detailed structure and workflow are illustrated in Fig. 1, with further algorithm and model details in subsequent sections.

III. SERIAL MULTI-TASK TRANSFORMER WITH ATTENTION FOR NILM

14SMTA encompasses several key components: an inner Series Decomposition Block (encoder and decoder modules), a Serial-Correlation mechanism, and an end-to-end Multi-task Learning with Attention.In detail, the Series Decomposition Block helps in breaking down complex temporal patterns into manageable segments.The Serial-Correlation mechanism aggregates similar subprocesses across different periods, effectively capturing period-based dependencies.The Task-Specific Attention strategy focuses on the most relevant features for each task, improving the precision of disaggregation.These components collectively enhance the NILM's ability to accurately disaggregate long-term household loads by capturing intricate temporal patterns and dependencies.

A. Series Decomposition Block

15The study of predicting different household electricity usage is an intricate temporal pattern within a long-term forecasting framework.We adopt a decomposition approach capable of dissecting the series into segments representing user cyclic patterns and seasonal components.These distinct segments reflect the varied customer behaviors within the time series, as well as the overarching seasonal trends in the data.We draw inspiration from the Autoformer [26] and introduce a suite of internal operations within decomposition blocks (as depicted in Fig. 1).These operations enable the progressive extraction of long-term stable trends from predicted intermediate hidden variables and the modified moving average technique to mitigate the effects of periodic fluctuations while accentuating the underlying long-term trends.

16Given a length-L input series X ∈ R L×D , the process is defined as:

17where X t , X s ∈ R L×D denote the extracted personal-cyclical part and the seasonal part respectively.The AvgPool(•) function is used for moving average with padding operation to maintain the same series length.Equation X s , X t = SD(X) is used to summarize the above equations, representing a series decomposition block.

B. Encoder

18The encoder emphasizes trend analysis and particularly models the seasonal components.The output of the encoder contains past seasonal information, which is used as crossinformation to assist the decoder in refining the prediction results.Leveraging this periodicity, we designed a Serial-Correlation mechanism to aggregate similar subprocesses across different periods, achieving information aggregation:

19In this study, we consider a model comprising of N encoder layers.The functional dynamics of the l-th encoder layer are encapsulated by the following equation:

20The operational specifics of the encoder layer are further delineated as follows:

21The notation X Enc l , where l ranges from 1 to N, denotes the output of the l-th encoder layer.The initial input X Enc 0 is represented by X Enc .The variable Y Enc l,i , with i taking values 1 or 2, refers to the seasonal component post the i-th series decomposition block in the l-th layer.The function SC(•) represents its capacity to seamlessly replace the self-attention mechanism and FF(•) refers to feed forward operation.

C. Decoder

22In the decoder, we model seasonal cycles and the distinct user habits separately.Regarding seasonal cycles, environmental temperature exhibits cyclical variations throughout the year, which significantly influences household electricity usage.A Serial-Correlation mechanism leverages the periodic nature of the series, aggregating sub-sequences with similar processes across different cycles.For user habits, the system adopts a cumulative approach, progressively extracting individual usage patterns from predicted latent variables.For M decoder layers and X Enc N outputs from the encoder, the equations of the l-th decoder layer can be summarized as follows:

23where 3 , and l ∈ {1, . . ., M} denotes the output of the l-th decoder layer.Y Dec l,i and T Dec l,i , for i ∈ {1, 2, 3}, represent the seasonal component and personal-cyclical component, respectively, after the i-th series decomposition block in the l-th layer.The projector for the i-th extracted trend T Dec l,i is denoted as W l,i , where i ∈ {1, 2, 3}.

24Remark 1: The total electricity prediction can be expressed as the sum of refined decomposed components given as:

25where Ŷ represents the prediction of total household electricity usage.In this equation, W Y is a projection matrix used to transform the deep seasonal component X Dec

M

26to the target dimension, and T Dec M is an additional cyclical component.1) End-to-End Multi-Task Learning With Attention: Our research addresses load disaggregation challenges through an end-to-end multi-task learning framework with attention mechanisms.This framework distinguishes electrical consumption patterns of different home appliances, which comprises a central shared network and several Task-Specific Attention networks.These networks are connected through attention modules that apply a soft-attention mask to the shared network.

27Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

28This mask selectively emphasizes features relevant to each task, enabling autonomous feature learning within the model.

29Remark 2: Multi-task learning allows a more effective method of managing multiple prediction tasks simultaneously.In the context of multi-task loss computation, the most straightforward strategy is to calculate the average loss, which can be mathematically represented as follows:

30where Loss total represents the total loss for the multi-task system, H is the number of tasks, and Loss h denotes the loss associated with the h-th task.This equation provides a simple yet an effective way of integrating the losses from multiple tasks, ensuring a balanced and comprehensive training process across the different tasks.

IV. SERIAL-CORRELATION MECHANISM AND MULTI-TASK ATTENTION

31We introduce a novel Serial-Correlation mechanism to enhance sequence-level connectivity, utilizing inherent periodicities in sequences to aggregate information effectively.This Cyclical Aggregation approach exploits similar subprocesses across analogous phases in different periods, allowing for period-based dependency incorporation and time-delayed information integration.Additionally, we employ attention masks for simultaneous learning of shared and specific task features, optimizing end-to-end load disaggregation prediction.

A. Period-Based Dependencies

32It is evident that temperature exerts a periodic influence on household electricity consumption.The same phase positions across different periods provide similar subprocesses, as exemplified by the consistent recurrence of the four seasons each year.Inspired by the theory of stochastic processes [27], for a real discrete-time process {X t }, its Serial-Correlation R(τ ) can be obtained using the following equation:

33where R(τ ) quantitatively evaluates the temporal similarity between a time series {X t } and its lagged counterpart {X t−τ }, considering the time delay τ .In this context, the Serial-Correlation function R(τ ) is utilized as an unnormalized confidence index to determine the duration of the period length τ .This metric helps to identify and select the most probable set of k period lengths, denoted as τ 1 , τ 2 , . . ., τ k .The periodic similarity is subsequently deduced from these estimated periods, and this measure can be further refined by weighting it with the respective Serial-Correlation values associated with each period length.

B. Cyclical Aggregation

34To achieve sequence-level linkage, we need to aggregate similar subsequence information.The dependency relationships based on seasonal cycles can be utilized to connect sub-sequences estimated to be within the same season.According to the estimated length of the seasonal period, we first align the information using specific operations and then aggregate the information.We then employ the format of query, key, and value, allowing for a seamless replacement of the self-attention mechanism.The Serial-Correlation mechanism is

35Given a series, the top Serial-Correlation is obtained as Top k (•), where k = [a×log L], a is a hyper-parameter, and L is the length of the series.The Serial-Correlation between series Q and K is denoted by R Q,K .The operation P(X, τ ) represents the operation applied to X with a time cycle τ .During this operation, elements that are shifted beyond the first position are re-introduced at the last position for the encoder-decoder Serial-Correlation, where K, V are from the encoder X Enc N and are resized to length-Q, where Q is from the decoder's previous block.

C. Task-Specific Attention

36The Task-Specific Attention (TSA) module employs a sophisticated machine learning technique, particularly adept in complex scenarios like house load disaggregation, which can be represented as:

37where Tk 1 , Tk 2 , . . ., Tk H are the multiple related tasks (e.g., appliance-specific usage) on which the model is simultaneously trained, and A represents the attention mechanism.The attention module, crucial in this framework, is formulated as:

38where x h is the input data segment from the decoder, H is the total number of individual household electrical applications, α h is the attention weights assigned to each segment, and S(x h ) is the representation of the segment in the model.In load disaggregation, TSA leverages the interconnected nature of household parameters, enabling a comprehensive understanding of energy dynamics.

39The attention mechanism enhances the model by dynamically adjusting weights:

40where score(x h ) is a function evaluating tasks' importance.

41The results focus on more critical features, such as highimpact appliances or peak consumption times.The complete pseudocode of SMTA is summarized in Algorithm 1.

42Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

43Algorithm 1 SMTA for NILM

A. Flexible Capacity of Active Consumers

44Based on NILM results, Ŷ = { PFL i,t , ÊEV i }.At first, common flexible loads like HVAC systems can be effectively managed to reduce peak demand loads by shifting their operation to offpeak hours.The capacity of these flexible loads to participate in DR programs can be mathematically evaluated by considering the range of their predicted operational boundaries at specific times, as (20):

45Herein, P DR i,t denotes the active power of common flexible loads participation in DR at bus i time t; PFL i,t is the value of predicted common flexible loads.

46In addition, EVs stand out as high-energy consumption appliances, their energy storage capabilities enable them, alongside BESS, to effectively serve reserve capacity, adeptly adjusting to variations in grid demand.Mathematically, the reserve capacity of these systems is quantified through their charging and discharging potential, as follows:

47where p

Res↑ i,t and p

48Res↓ i,t denote the reserve upstream and downstream capacity respectively, t is the interval between two temporal slices, E BESS i refers to rated energy capacity of BESS, E BESS i,t is the energy level of BESS at bus i time t, and ÊEV i,t represents the predicted energy level of EV.It should be noted that in this study, the spinning and non-spinning reserves typically provided by DG are not considered, due to the slower ramping capabilities, less flexibility, and extra costs to rapid grid demand changes compared to EVs and BESS.In addition, the relationship between nodes and users can be established by aggregating the load demand of all users connected to a specific node.This means that the total load at a given node is the sum of the loads of all users assigned to that node.This approach assumes that the load demand from each user contributes directly to the total load at the node, thereby allowing us to treat the node's load as an aggregated value.

B. Incentives for Ancillary Service

49The implementation of TOU pricing schemes plays a pivotal role in incentivizing DR for common flexible loads.This pricing strategy encourages the shifting of energy consumption to off-peak hours, aligning with periods of lower electricity prices.The financial benefits of participating in TOU-based DR programs, C DR , can be quantified as follows:

50where T denotes the set of operation time horizon, N represents the set of buses in the smart grid, and λ DR t is the compensation price for participating DR program.

51Furthermore, considering the critical percentage of common flexible loads is from the HVAC system, it is important to explore and balance the energy consumed by HVAC system with indoor temperature control.The complex relationship between them can be effectively approximated through a simplified thermal dynamic model.This model is crucial for capturing the impact of load adjustments on indoor temperature, a key aspect in maintaining occupant comfort while participating in DR programs.The approximate relationship, reflecting this balance, is expressed as follows:

52Herein, T In i,t , T Out i,t denote the indoor and outdoor temperature of energy consumers at bus i time t, respectively, ξ is the percent of the HVAC is the total energy consumption profile, γ i is the thermal resistance, and κ i refers the heat ratio of air.

53As for reserve service, financial incentives are comprised of two parts, including capacity reward and payoff for reserve regulation power.The former provides financial incentives to EVs and BESS for allocating their storage capacity to the grid, the latter involves compensation for the actual energy regulation services provided by EVs and BESS.The mathematical representation of the reserve capacity provided by these systems is as follows:

54where t refers to rewards for reserve capacity, π In detail, this service includes energy discharge (for upward reserves) or charge (for downward reserves) in response to grid demand variation.The variables in ( 25) can be further expressed by (26) and (27) with explicit charging and discharging power.

55where subscript +, − represent the charging and discharging power of relevant devices, respectively, and

56denotes the power absorbed by the BESS excluding the portion associated with reserve regulation power.

57To further optimize the operation of EVs within the reserve service, the State of Charge (SOC)-based model developed to explicitly define the relationship between charging and discharging power and the resultant energy changes for batteries is implemented.This model is fundamental and essential for regulating the charging and discharging cycles of batteries, facilitating their efficient integration into reserve services and ensuring battery health.The SOC model of EV can be formulated as follows:

58Herein, SOC EV i,t denotes SOC of EV, η EV i denotes EV charging coefficient and μ EV i,t is the binary variable to determine the status of charging.In this model, (28) describes the energy balance of EV battery, ( 29) is utilized to prevent the EV from over charging or discharging, (30) ensures that the charging and discharging power are limited between the lower and upper bound, (31) prevents the EV from charging and discharging simultaneously, and (32) imposes the energy at departure time is no less than the expected value.In particular, the operation time t must be limited within the parking period between arrival and departure time as

59It is worth mentioning that the SOC-based model is adaptable to BESS as well, by omitting the operation time limitation t EV i of EV, explicit formulations of BESS can be obtained by replacing the relevant superscript with "BESS" while substituting the corresponding parameters.

60Remark 3: For the DR program, we currently focus on the load curtailment, indicating P DR i,t is consistently positive.Besides, for the π ↓ i,t , it maintains a low value during off-peak hours and may occasionally become negative, which benefits the downstream reserve regulation.

C. Energy Management Model and Optimization

61The energy management model is formulated as an optimization problem, with the primary objective of minimizing operational costs.This objective is achieved by calculating the net cost, which involves subtracting the revenue generated from providing ancillary services from the total expenses incurred in purchasing power from the bulk grid, dispatching DG, and BESS degradation cost.Mathematically, it is presented as follows:

62subject to

63Here, ( 28)- (32) and the BESS constraints should also be binding.

64In the above formulations, δ i refers to the degradation cost of BESS, c i denotes the unit operation cost of DG, β i is the life cycle coefficient associated with the BESS energy, P i,t , Q i,t refer to active and reactive power through main branch following bus i, P Lat i,t , Q Lat i,t refers to active and reactive power through lateral branch following bus i, P LD i,t , Q LD i,t denote nodal active and reactive power of loads including both fixed loads and flexible loads excluding the part participating DR program, respectively; P DG i,t denotes the active power output from DG.Here, PV is considered installed with maximum power point tracking (MPPT) devices, and the output power of the PV systems can be forecasted based on historical weather conditions.Further, V i refers to the voltage magnitude, and V 0 is the voltage of reference bus, r i and x i denote the resistance and reactance of the branch following bus i. Equations (34)-(37) denotes the linearized Dist-flow, (34), (35) impose the active and reactive power balance, (36) describes the relationship between nodal voltage and branch power, (38)-(43) impose the upper and lower bound of variables.Specifically, (38) imposes the power output of DG, (39) guarantees the voltage keeping in the safety range, and (40) ensures that indoor being maintained in the comfortable range.The proposed model is a linear problem, and it is solved through mix-integer linear programming.

A. Experiment Setup

65The proposed framework has been validated using a modified IEEE 57-bus radial distribution system [28], where original loads are replaced with real-world profiles from the Pecan Street dataset [29].This dataset encompasses data from 100 households in Austin, Texas, USA from January 2017 to December 2018.In detail, we monitor the energy consumption of individual households (e.g., NMI level) in onehour intervals, focusing on high-energy-consuming appliances such as HVAC systems, refrigerators, and WMs.Further, for EV, we capture data from charger focusing on charging times, durations, and energy consumption.Moreover, relevant energy market prices and operational costs were obtained from ISO [30].The NILM training has been executed using Python and the deep learning framework Pytorch.Pre-trained models were obtained from Hugging face and fine-tuned with our dataset.The training phase was carried out on a GPU-based server equipped with an NVIDIA RTX A5000 GPU, operating on Ubuntu 20.04 OS.Following three cases are employed to test the energy management model:

66Case 1: The smart grid operates without energy management consideration.

67Case 2: The smart grid operates involving energy management without NILM.

68Case 3: The smart grid operates under the proposed framework with NILM supporting energy management.

B. Numerical Results

69Fig. 2 presents a detailed comparison of the actual and predicted energy consumption for a typical customer over the course of a year, using data averaged across different seasons of the year.The figure compares the performance of various NILM algorithms, including LSTM [31], temporal convolutional network (TCN) [32], and long short-term memory network fully convolutional network (LSTNet) [33], and SMTA, against the ground truth.In the spring (Fig. 2 (a)), the SMTA algorithm captures the relatively stable energy consumption patterns with high accuracy, showcasing its ability to model conditions where energy usage is moderate and less volatile.This indicates that SMTA is particularly effective in environments where consumption patterns do not fluctuate dramatically.As the seasons change to summer (Fig. 2 (b)), all algorithms, including SMTA, face challenges in accurately predicting the energy spikes associated with increased air conditioning use and shifts in daily routines.During this period, the algorithms tend to underestimate peak energy consumption, which can be attributed to the sudden and sharp increases in load that are more difficult to predict.Despite this, SMTA shows a smaller margin of error compared to the other algorithms, reflecting its robustness in dealing with complex consumption patterns, even if not perfectly.In autumn (Fig. 2 (c)), where the energy consumption begins to moderate again, the SMTA algorithm continues to perform well, though it slightly overestimates energy use in the mornings and underestimates it in the evenings.This behavior suggests that while SMTA adapts well to general seasonal transitions, there Fig. 2. Comparison between ground truth and prediction for total energy consumption of a typical customer in the year.

TABLE I COMPARISON OF ALGORITHM METRICS

70may be nuances in the timing of consumption changes that pose challenges.The typical customer's energy usage during autumn, characterized by gradual shifts rather than abrupt changes, requires algorithms to balance between adapting to new patterns and relying on historical data, which SMTA handles with relative success.Last, winter (Fig. 2 (d)) brings the highest energy demands, particularly in the mornings and evenings due to heating requirements.The SMTA continues to perform strongly in this season, with its predictions closely aligning with the ground truth.However, like the other algorithms, it slightly underestimates morning consumption spikes.This underestimation is likely due to the sharp increases in energy use as heating systems kick in, which even advanced algorithms like SMTA struggle to predict with complete accuracy.Nonetheless, SMTA's overall performance remains the best among the compared algorithms, demonstrating its effectiveness across a variety of seasons.

71The performance of the SMTA algorithm in disaggregating energy consumption for EV, HVAC systems, ovens, refrigerators, heaters and WMs is depicted in Fig. 3.The Fig. 3 (a) illustrates the power usage patterns of an EV.The ground truth and the predicted values show high congruence, with distinct peaks indicating charging times, which are accurately forecasted by the algorithm.This Fig. 3 (b) demonstrates the electricity consumption of a HVAC system.The pattern of usage exhibits a cyclic nature with multiple peaks throughout the days.The predictive performance closely tracks the actual usage, albeit with minor deviations.The power consumption of the oven is depicted in Fig. 3 (c) with much smaller magnitudes compared to the previous appliances.The sporadic usage of the oven is reflected in the sharp, infrequent spikes of energy consumption, which the algorithm predicts with reasonable accuracy.The refrigerator's consumption pattern shows a consistent series of peaks and troughs in Fig. 3 (d), indicative of the compressor's start-stop cycles.The prediction closely aligns with the ground truth, capturing the regular rhythm of energy use.Similar to the HVAC, the heater's energy profile in Fig. 3 (e) is characterized by repetitive peaks that correspond to the operational cycles.The predicted values exhibit a high degree of similarity to the actual consumption, demonstrating the algorithm's effective performance.The usage pattern of the WMs in Fig. 3 (f) is highly periodic with clearly defined usage events.The algorithm effectively mirrors the ground truth, indicating precise predictions of operational cycles.Overall, as given in Fig. 3, the proposed SMTA can effectively disaggregate and predict the energy consumption of various household appliances with a high level of accuracy, as seen in the close matching of the predicted values to the ground truth across all subfigures.

72Table I delineates the comparative performance of four computational NILM algorithms across a spectrum of household appliances for energy consumption forecasting.The table is divided into columns representing each algorithm and rows for each appliance type, with mean absolute error (MAE) and mean squared error (MSE) as the chosen metrics for comparison.Lower values of MAE and MSE correspond to higher predictive accuracy.The SMTA outperforms the other algorithms in both metrics for all appliances, which include EV, HVAC system, Oven, Refrigerator, Heater, and WM, indicating its superior capability in forecasting energy consumption with greater precision.

73Table II presents an economic evaluation of a smart grid's operation under three different scenarios over one year.When the grid operates without any energy management, the net operation cost is the highest, amounting to $70,874.5.Incorporating basic energy management strategies, such as demand response and reserve services, reduces the net operation cost to $57,131, which represents a 19.5% decrease.This reduction highlights the effectiveness of even simple energy management practices in lowering operational expenses.However, when the proposed NILM-supported framework, utilizing the SMTA algorithm, is applied, the net operation cost further decreases to $41,778.7.This represents a substantial 26.9% reduction compared to the basic energy management scenario, and an overall 41.1% reduction compared to the scenario without any energy management.

74As shown in Fig. 4, the energy management focusing on strategies for EV charging and BESS operation over 48 hours is given.The grid shows low power demand during offpeak hours, likely indicating minimal EV charging and BESS usage.Demand rises in the morning and evening, coinciding with peak EV charging times, with BESS deployment likely moderating the increased load.Throughout the two days, the grid demonstrates a responsive energy management approach, utilizing BESS to balance the load during high-demand periods, ensuring stable grid operation while accommodating the charging cycles of EVs.This suggests an effective integration of BESS to support dynamic energy needs and optimize overall grid performance.

VII. CONCLUSION

75This paper presents an innovative framework utilizing NILM techniques, specifically designed for enhanced energy management in smart grids, with a particular focus on managing high-energy consumption flexible loads such as HVAC systems and EVs.The key part of this framework is the SMTA algorithm, a novel NILM algorithm devised to effectively disaggregate long-term household load data.In the experiment with real-world data, the application of the SMTA algorithm has demonstrated improvements in the accuracy of load disaggregation.This accuracy is crucial for potential adjustment of the flexible loads, both in terms of timing and amount, enabling more informed decisions in energy management, which in turn contributes to reducing Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

76the overall operational costs in smart grids.In future work, with the availability of a more comprehensive dataset, the framework will extend to include V2G technology.This expansion is expected to introduce additional complexities and offer more energy management scenarios.The potential effects of integrating V2G technology include increased grid flexibility, optimized energy usage, and new financial incentives for EV owners.However, this growth also presents several challenges including technical integration, mature regulatory and market structure.Our future work will focus on addressing these challenges and exploring the full potential of V2G in combination with NILM techniques to further optimize energy management in smart grids.

Fig. 1 .

77Fig. 1.Detailed structure and workflow of the proposed framework.

t

78denote the payoff price for upstream and downstream reserve regulation power, and P Res↓ i,t and P Res↑ i,t represent the downstream and upstream reserve regulation power.

Fig. 4 .

79Fig. 4. Major management strategy for EV, and BESS within 48 hours.

load monitoring, energy management, EV, transformer, multi-task learning.

80t Rewards for reserve capacity at time t.t Interval between two temporal slices.π State of Charging of EV at bus i time t.c 2024 The Authors.This work is licensed under a Creative Commons Attribution 4.0 License.For more information, see https://creativecommons.org/licenses/by/4.0/Authorized licensed use limited to the terms of the applicable license agreement with IEEE.Restrictions apply.

81Decoder layers number M; Projection matrix W Y 2: Output: Total Energy Consumption Ŷ and Electrical Appliances Usage P Tk 1 , . . ., P Tk H . 3: for l in 1, . . .N do Each task Tk 1 , Tk 2 , . . ., T D do

821: Input: Past time series X; Encoder layers number N;

참고문헌 28건

  1. Nonintrusive appliance load monitoring Proceedings of the IEEE · Institute of Electrical and Electronics Engineers · 1992 10.1109/5.192069
  2. Nonintrusive appliance load monitoring: Review and outlook IEEE Transactions on Consumer Electronics · Institute of Electrical and Electronics Engineers · 2011 10.1109/tce.2011.5735484
  3. Combined residential demand side management strategies with coordination and economic analysis International Journal of Electrical Power & Energy Systems · Elsevier BV · 2016 10.1016/j.ijepes.2016.01.016
  4. Long Short-Term Memory Studies in computational intelligence · Springer Nature · 2012 10.1007/978-3-642-24797-2_4
  5. Optimal Behavior of Electric Vehicle Parking Lots as Demand Response Aggregation Agents IEEE Transactions on Smart Grid · Institute of Electrical and Electronics Engineers · 2015 10.1109/tsg.2015.2496796
  6. High efficient valley-filling strategy for centralized coordinated charging of large-scale electric vehicles Applied Energy · Elsevier BV · 2016 10.1016/j.apenergy.2016.10.117
  7. Temporal Convolutional Networks for Action Segmentation and Detection 2017 10.1109/cvpr.2017.113
  8. Modeling Long- and Short-Term Temporal Patterns with Deep Neural Networks 2018 10.1145/3209978.3210006
  9. Transferability of Neural Network Approaches for Low-rate Energy Disaggregation ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) · 2019 10.1109/icassp.2019.8682486
  10. Subtask Gated Networks for Non-Intrusive Load Monitoring Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2019 10.1609/aaai.v33i01.33011150
  11. Scale- and Context-Aware Convolutional Non-Intrusive Load Monitoring IEEE Transactions on Power Systems · Institute of Electrical and Electronics Engineers · 2019 10.1109/tpwrs.2019.2953225
  12. An Event-Driven Convolutional Neural Architecture for Non-Intrusive Load Monitoring of Residential Appliance IEEE Transactions on Consumer Electronics · Institute of Electrical and Electronics Engineers · 2020 10.1109/tce.2020.2977964
  13. Optimal Strategies in Home Energy Management System Integrating Solar Power, Energy Storage, and Vehicle-to-Grid for Grid Support and Energy Efficiency IEEE Transactions on Industry Applications · Institute of Electrical and Electronics Engineers · 2020 10.1109/tia.2020.2991652
  14. Towards a transactive energy system for integration of distributed energy resources: Home energy management, distributed optimal power flow, and peer-to-peer energy trading Renewable and Sustainable Energy Reviews · Elsevier BV · 2020 10.1016/j.rser.2020.110000
  15. Demand side management through load shifting in IoT based HEMS: Overview, challenges and opportunities Sustainable Cities and Society · Elsevier BV · 2020 10.1016/j.scs.2020.102517
  16. A home energy management system with an integrated smart thermostat for demand response in smart grids Sustainable Cities and Society · Elsevier BV · 2020 10.1016/j.scs.2020.102639
  17. Demand side management in microgrid: A critical review of key issues and recent trends Renewable and Sustainable Energy Reviews · Elsevier BV · 2021 10.1016/j.rser.2021.111915
  18. Coordinated Charging Scheduling for Electric Vehicles and Optimal Tuning of the Controller for Frequency Regulation under Uncertain Environment 2022 IEEE Industry Applications Society Annual Meeting (IAS) · 2021 10.1109/ias48185.2021.9677300
  19. Network reconfiguration in distribution systems for loss reduction and load balancing IEEE Transactions on Power Delivery · Institute of Electrical and Electronics Engineers · 1989 10.1109/61.25627
  20. Energy management programming to reduce distribution network operating costs in the presence of electric vehicles and renewable energy sources Energy · Elsevier BV · 2022 10.1016/j.energy.2022.125695
  21. Reserve Evaluation and Energy Management of Micro-grids in Joint Electricity Markets Based on Non-Intrusive Load Monitoring IEEE Transactions on Industry Applications · Institute of Electrical and Electronics Engineers · 2022 10.1109/tia.2022.3217747
  22. A Context-Aware Multi-Event Identification Method for Nonintrusive Load Monitoring IEEE Transactions on Consumer Electronics · Institute of Electrical and Electronics Engineers · 2023 10.1109/tce.2023.3236452
  23. Energformer: A New Transformer Model for Energy Disaggregation IEEE Transactions on Consumer Electronics · Institute of Electrical and Electronics Engineers · 2023 10.1109/tce.2023.3237862
  24. Non-Intrusive Load Monitoring by Load Trajectory and Multi-Feature Based on DCNN IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2023 10.1109/tii.2023.3240924
  25. MSDC: Exploiting Multi-State Power Consumption in Non-intrusive Load Monitoring Based on a Dual-CNN Model Proceedings of the AAAI Conference on Artificial Intelligence · Association for the Advancement of Artificial Intelligence · 2023 10.1609/aaai.v37i4.25636
  26. MATNilm: Multi-Appliance-Task Non-Intrusive Load Monitoring With Limited Labeled Data IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2023 10.1109/tii.2023.3301026
  27. Advanced hybrid LSTM-transformer architecture for real-time multi-task prediction in engineering systems Scientific Reports · Nature Portfolio · 2024 10.1038/s41598-024-55483-x
  28. Non-intrusive thermal load disaggregation and forecasting for effective HVAC systems Applied Energy · Elsevier BV · 2024 10.1016/j.apenergy.2024.123379