**1. Introduction**

Electrical energy demand has significantly increased in the last decades. This has led to huge peak of greenhouse gas emissions in order to provide and supply the required demand [1]. In the past decades, fossil fuels were the raw materials for electricity production [2]. However, nowadays several low carbon technologies and renewable energy resources (RERs) have been utilized to produce electricity [3]. Smart grids and microgrids are new some new concepts for the future distribution networks to eliminate the hierarchical structure of the grid and convert them to a fully decentralized and transactive energy system [4]. To do this, the process of energy production should be also placed in the demand side, among all electricity consumers. Therefore, the concept of prosumer (a consumer who also produces electricity) has been raised [5]. However, this makes the network instabilities more tangible than before, as a significant number of small and medium scale consumers and producers will be involved in the network management scenarios [6].

Distributed generation (DG) and RERs are considered as one of the bases of smart grids and microgrids implementation [7]. However, these paradigms would be fully addressed while they have been integrated with demand response (DR) programs [8].

In fact, the DR program is a feature in the upcoming distribution network to connect low carbon technologies without the need for reinforcement [9]. There are various definitions in the literature for DR program. While each definition has its own strengths and weak points, the most completed one is defined by Federal Energy Regulatory Commission (FERC) [10] as:

"Changes in electric use by demand-side resources from their normal consumption patterns in response to changes in the price of electricity, or to incentive payments designed to induce lower electricity use at times of high wholesale market prices or when system reliability is jeopardized."

According to the definition mentioned above, in a simple word, DR can be described as the reaction of electricity consumers to the price signals considered as incentives to reduce/modify the electricity use pattern. There are several types of DR programs: price-based and incentive-based [11]. In Price-based category, there are several programs such as real-time pricing (RTP), time-of-use (TOU), critical peak pricing (CPP), etc. [12]. Also, in the incentive-based DR programs, various strategies are proposed, namely direct load control (DLC), emergency demand response service (EDRS) capacity market programs (CMP), interruptible demand response program (IDRP), etc. [13]. Each program has its own specifications that are applicable depending on technical or economic reasons of the electricity network. As an example, the ERCOT market in Texas utilizes EDRS to maintain network stability in emergency conditions to reduce power outages. In this market, EDRS participants can provide DR reduction within a 10 to 30 min ramp period in advance to the event [14]. However, there is a minimum reduction capacity for the DR event and its participants in order to directly participate in the electricity markets. According to the surveyed references [15–17], this minimum reduction capacity for a consumer who intends to have an active role in the electricity market negotiations, is various depending on the DR type, typically from a few kilowatts to megawatts. In other words, this makes small scale consumers almost incapable to directly participate in electricity markets [18]. To overcome this barrier, an aggregator can be considered as a third-party entity between the upstream and downstream sides of the network [19,20]. In fact, this entity aggregates all small and medium scales DR participants and contribute them as a unique DR resource in the electricity market negotiations [21].

By a simple look on the current trends, a lot of papers and research projects can be found that are focused on the concepts of aggregator, as the role of the aggregator is being legalized in several European countries (e.g., France, Finland, Austria, Denmark, etc.) [22]. However, one of the aspects of aggregator that has not been discussed widely in the literature is the way that aggregator deals with ramp period before the DR event is started. Incentive calculations and payments between aggregator and DR participants during the ramp period, required information exchange between aggregator and network operators (e.g., independent system operator–ISO) during the ramp period, and several other issues need to be discussed before the models move from theoretical phase towards implementation level. Besides this, both scientific and practical features of any model should be scrutinized, learning from past experiences to estimate and prevent probable future issues. To do this, adequate real models and laboratory tools are essential to test and verify the functionalities of any developed model under practical challenges.

To address these issues, this paper proposes an aggregator model with a precise vision of DR timeline and ramp period. The model includes introducing the roles of aggregator in the electricity system as a third party, and how it deals with DR programs implementation and remuneration payments. Furthermore, a case study is developed in this paper to validate the model under practical challenges and technical issues. This has been done by a real-time simulator machine (OP5600) and a set of laboratory equipment as hardware-in-the-loop (HIL). In this way, the behavior of aggregator is surveyed in each moment of DR implementation, especially in the ramp period before the event being started. In the end, the remuneration costs are compared using both experimental and numerical results to reveal the importance of experimental tests and validations.

The rest of the paper is organized as follows: A literature review is presented in Section 2 to identify the challenges and gaps in the current trend of aggregator and DR programs. Section 3 presents the proposed methodology in four different subsections including the role of the aggregator in the power system, DR timeline, and ramp period evaluation, key points of aggregator to define DR programs, and a linear programming optimization for the aggregator to minimize DR remuneration costs. Subsequently, Section 4 proposes a case study and real-time simulation model developed for the aggregator to validate it using practical challenges, and its results are shown in Section 5. Finally, the main conclusions of the work are presented in Section 6.

#### **2. Literature Review and Paper Contributions**

There are plenty of research works focused on the context of the aggregator model and DR implementation. In [8], a methodology has been described to use multitype DR programs to smooth the uncertainty of RERs. The method utilizes a multi-objective scheduling algorithm for smoothing the fluctuations in RERs. Several constraints for DR programs have been considered in the same paper in order to maximize the user of RERs and maintain the balance in the network.

A real-time simulation model has been proposed in [12] for an aggregator entity, which uses several real hardware resources to emulate the consumption and generation profiles. Also, an optimization problem has been developed in the same work to optimally schedule the DR resources and RERs aiming at minimizing the aggregator operational costs. Although an actual infrastructure has been proposed in [12] for testing aggregator's concepts, there is no discussion about the ramping of DR programs prior to the event, and how aggregator deals with remunerations in this period. A realistic model of an aggregator in the scope of curtailment service provider has been presented in [17]. The authors proposed a real-time simulation model that supports decision making for DR validation in real-time. Also, a preliminary discussion has been proposed in the paper regarding the ramp period before DR events proposing the use of RERs and DR programs. The presented results proved the performance of the curtailment service provider using real measured data from the laboratory equipment. However, there is no discussion about how curtailment service provider behaves with incentive payments, and also a precise vision to the DR program information received from system operator, such as notification deadline, program duration, etc.

In [23], the authors proposed an assessment of a DR program for consumers who are equipped with a smart meter. A load-serving entity plays the role of the aggregator to offer incentives to the participant relying on near real-time information. Moreover, a timeline has been proposed in the same work regarding the information exchange between the load-serving entity and ISO regarding DR programs. Although the paper presented an interesting model, the authors validated their model through a numerical case study, and there is a lack of an experimental test and validation.

A bottom-up model has been proposed in [24] for an aggregator dealing with DR programs. Load shifting, load recovery, and load curtailment are considered as three types of DR programs available in the aggregator network. Also, through this model, the aggregator participates in the day-ahead markets by trading these DR flexibilities. In the end, the authors validated their model by a numerical case study using Nordic electricity market.

In [25], the authors discussed a short-term decision-making model for an electricity retailer that included RERs. Also, short-term DR trading methodology has been proposed somehow the retailer submits this flexibility to the markets in each hour. Through the simulation performed in the case study, the authors validated that the financial profits of the retailer will be increased if it participates in both real-time market and short-term DR trading mechanism. A short-term self-scheduling model has been developed in [26], which is used by the DR aggregators. It also addressed the uncertainties of the electricity customers participating in the market. Two types of DR programs have been used in this model, which are reward-based DR and time-of-use. The proposed approach has been validated through a case study with realistic data from electricity markets.

Focusing on communication infrastructures in the aggregator network, the work presented in [27] focused on an energy quality aware bandwidth aggregation scheme. The authors firstly modelled the delay-constrained energy quality tradeoff for multipath video communications using wireless networks, and then, they present an approach to merge the rate adaptation. They surveyed the performance of the system using real wireless networks and emulations test beds. In addition to this work, in [28], the authors provided an energy efficient and quality guaranteed video transmission solution. In fact, they proposed an approach to characterize energy distortion tradeoff for video transmission in wireless networks. Furthermore, the authors of the same work developed an algorithm to optimize the energy consumption to achieve video quality target. Their experimental results demonstrated that the developed solution has performance advantages comparing to the schemes in term of energy conversion and video quality.

The main contribution of the present paper, according to the reviews presented above, where only a few of them were focused on the behavior of aggregator during ramp period of DR implementation, is the development of a model that considers short and real-time DR programs ramping, using real-time simulator and laboratory equipment. In fact, most of the previous works considered a simple period prior to the event showing and mainly focusing on the aggregator scheduling process or DR programs itself. Furthermore, a lot of interesting models and research works are available in the literature focusing on the concepts of aggregator under short and real-time DR programs. However, those lack adequate testing on real infrastructures under practical challenges and technical issues.

The following topics are addressed, supporting the main contribution of the paper:

