**1. Introduction**

A structure of the current power systems is based on active transmission systems where centrally dispatched generating units (CDGUs) provide different services such as balancing, frequency regulation and operating reserves for maintaining proper power system operation. However, the existing distribution systems from the point of view of the transmission system operator (TSO) still remain passive with fixed demand profiles—the left side of Figure 1.

Distributed energy resources (DERs) located in distribution networks are developing rapidly at present. Many of them, such as gas and biogas power plants and energy storages (ESs), might be controllable in order to perform services similar to those provided by CDGUs. Furthermore, active loads (ALs) and curtailment of renewable energy resources (RESs) can be employed to support the managemen<sup>t</sup> of the power system.

The above-mentioned entities by being financially attractive or forced by legal obligation could be aggregated into the distributed resource aggregator (DRA) structure to be controlled by the DRA coordinator for the provision of ancillary services (ASs). The scope of those potentially provided ASs should be therefore identified for a given DRA.

**Figure 1.** The development of modern power systems and relations between their entities.

The small size of distributed assets is a problem causing a lack of ability to participate in wholesale markets such as balancing markets and AS markets; moreover, legal obligations constitute a barrier for some entities. Therefore, an additional agent, that is, an aggregator, is required [1–4]. Figure 1 depicts the DRA coordinator as an entity responsible for distributed asset coordination and control enabling active participation of DERs in the managemen<sup>t</sup> of power system operation. Nowadays, distribution system operators (DSOs) have passive operation profiles which in the near future could be modified by the DRA operation depending on the current system needs to provide different services—an active demand profile.

The concept of active distribution networks is widely discussed in the literature. For example, [5–8] propose the use of active distribution for the provision of services such as balancing and congestion management. Possible relations and details of cooperation between different markets and technical entities, including aggregators, are indicated, thus forming a good foundation for future research in the field of active distribution networks.

Other publications state that the development of power systems and increasing level of energy source diversification are mainly driven by the growth of renewables which are installed mostly in the distribution networks; hence, the electrical energy supply's security and the proper power system operation is harder to be maintained [9,10]. In order to keep the balance between demand and generation, the corresponding level of the power system's flexibility is required [11]. Subsequently, to ensure this appropriate level of flexibility, it is necessary to coordinate the operation of distributed resources [12]. Such an operation, provided by aggregators located inside distribution networks, creates an opportunity to reinforce the power system's ability to react to the rapid changes of the demand and supply [13,14]. In order to obtain the desired results, next to DERs and ESSs, the demand-side coordination was employed to provide chosen ASs at the point of common coupling (PCC). The provided ASs cover i.e., load profile shaping, load levelling and congestion managemen<sup>t</sup> [15–19].

The possibility for the participation of distributed resources coordinated by an aggregator in competitive energy markets and their positive impact on the power system's operation were also

considered. Small ESSs for household application, due to their growing number, can be aggregated for long-term cooperation in order to maximize aggregators' profit and the system welfare [3]. Another study describes demand-side resources utilized for load scheduling to minimize the total cost of electricity procurement [20]. The high potential of aggregated flexibility, especially loads located in the residential sector, should be developed as a replacement for fossil fuel power plants' contribution in the continuous demand and supply balancing [4,21]. The need for peak-to-average demand reduction is addressed in [22], where the authors by the use of demand-side response reduce electricity charges for end-users and improve the shape of the load profile.

Nevertheless, the majority of the above-presented studies contain an optimized aggregation of one type of a distributed resource, mainly the demand-side entities and storages. It should be underlined that in modern distribution networks, di fferent types of resources, including small generators and renewables, are installed and may be properly utilized—not only for cost reduction but also for AS provision. The described articles focused mostly on market aspects of the aggregation, analyzing the o ffering strategies and the competitiveness between di fferent agents modelled in particular by game theories.

In order to propose remedies for the challenges presented, the purpose of this article is to introduce a new DRA structure and its managemen<sup>t</sup> as a development of formerly proposed concepts of the active distribution system and aggregation approaches. The functions of the DRA coordinator in the modern power system and relations with other entities are also defined. The novel methodology proposes the modelling of the DRA structure with the use of the mixed-integer linear programming (MILP) which aims at the evaluation of the optimal operation pattern of di fferent types of participating resources, the desired shape of the load profile at the PCC and AS provision. The performed research examines whether the proposed solution could be a step toward improvements in power system operation, and by the use of its flexibility, whether it can facilitate load-generation balancing and maintain a system's proper operation during continuous RES development.

The article is organized as follows: The second section describes services which can be provided by assets located in distribution networks. Section 3 presents a proposed structure of a DRA and a way to implement its operation into the MILP optimization model. Section 4 shows the main assumptions. Section 5 discusses the results of simulations as examples of ASs provided by the DRA, while the last section concludes the article.

#### **2. Background: Ancillary Services Portfolio**

The AS portfolio comprises services which may be provided by the aggregated resources, taking into account their distinctive features and the composition of the DRA structure. These services are described thoroughly below.

#### *2.1. Peak Shaving and Valley Filling*

Peak shaving and valley filling, also known as load levelling, is an AS comprising increased consumption of electrical energy during periods of low demand, storing it and then returning it to the grid when high demand occurs. During the later periods, the energy injected back to the power system reduces peaks of demand to be covered by conventional power plants and therefore decreases overall system operation costs, as production from more expensive peak-generating power units may be limited. Therefore, it is clear that load levelling can be provided mainly by ESSs but also by ALs, as consumption, during peak demand, can be limited or shifted to lower consumption periods [23].

Load levelling may be desirable not only because the reduction of overall system operation costs but also due to an opportunity to limit investments in new power generating units and grid upgrades (load levelling can extend the set of tools for the congestion management) [5]. Units providing this type of services could be additionally remunerated; however, shifting from low demand to high demand periods is inherent in price arbitrage which generates a basic income. A visualization of peak shaving and valley filling services is presented in Figure 2.

**Figure 2.** Peak shaving and valley filling services.
