## 1 Introduction  
The energy transition and the related increase in the share of renewables in the energy mix are leading to increasing discussions about abandoning the current energy model, in which the electricity source has sufficient power to cover the needs of all consumers. This model assumed that the power grid would always have the capacity to meet the needs of all customers at any given time. This was easy to implement because energy was supplied to the grid only from stable and predictable sources processing fossil fuels. The increase in the share of renewable power on the grid has resulted in either a surplus or a shortage of energy at constant load. A deficit of generated electricity causes temporary shortages in some areas. However, a surplus of energy has the effect of raising the voltage in the electricity grid, which can cause damage to electrical appliances. Temporary deficits in the availability of energy are now compensated via cross-border exchanges. Similarly, this occurs in the case of surpluses [1, 2]. However, increasing the share of renewable sources in the energy grid also in neighbouring countries generates the risk that these countries will not be able to receive the surplus energy [3, 4]. With a large percentage of energy coming from photovoltaics and wind farms, where these sources are highly dependent on weather conditions, this situation can occur quite often. This results in the need to switch off part of the energy sources connected to the grid. Renewable energy sources are the most frequently shut down [5; 6; 7]. This is due to the impossibility of rapidly shutting down large fossil fuel-based power units. It is important to note that frequent shutdowns of large power units involve a significant reduction in their operating time [8; 9]. Fluctuations in the output of renewable sources driven by changes in the weather destabilise the electricity grid. A solution to this is the use of local energy storage units to receive surplus energy and compensate for deficits. This is a proven solution but requires a relatively significant investment for their implementation [10; 11; 12; 13]. Another way to handle the problems related to changing energy availability is to reverse the role of supplier-consumer. With this solution, the energy supplier does not guarantee immediate availability but, depending on the situation distributes the energy in such a way as to make optimal use of the available power at a given time [14; 15; 16; 17]. In this model, the energy consumer makes a request for power, while the electricity grid manager decides when it will be supplied. The simplest form of this type of communication between power source and receiver is implemented in the USB-C link protocol, where the receiver communicates with the source to agree on how much power it expects and how much power can be delivered to it from the power source [18; 19]. With the rapidly evolving infrastructure of the Internet of Things, a standard can be established at which each device that is plugged into the network negotiates its needs and limitations with the network manager. The way in which the master controller shapes the total power supply will depend on the type and availability of the power sources connected to the network [20; 21; 22]. A comprehensive review of control and estimation techniques used in smart microgrids, such as linear, non-linear, robust, predictive, intelligent and adaptive, can be found in [23].  
In this paper, the problem of reducing power peaks occurring in a microgrid with many loads is considered. A new load distribution method is proposed based on introducing a buffer between the temperature controller output and the heater and filtering the load using a master PI controller. The quality of the developed algorithm was tested on a model of the Creep Test Laboratory with 389 heaters simulated in MATLAB Simulink R2023b.