Trends in Locally Balanced Energy Systems without the Use of Fossil Fuels: A Review

: In recent years, the idea of the operation of energy systems (power systems, heating systems) has changed signiﬁcantly. This paper is an overview of locally balanced energy systems without the use of fossil fuels. The paper justiﬁes the concept of local energy balancing in a new energy system that does not use fossil fuels (coal, natural gas, and crude oil), based on European Union guidelines and formal documents as well as the literature on the subject. In this context, the issue of local energy self-sufﬁciency, utilizing renewable energy sources, as well as the concept of local smart grids based on innovative market mechanisms are raised. Attention is also paid to technical issues with regard to locally balanced energy systems, in particular photovoltaic sources and energy storage. Challenges related to the use of electrical protection in networks with many sources of energy are described. In such networks, the power ﬂow is not in one direction only. Moreover, the selection of protections is problematic due to the distribution of short-circuit currents. Additionally, earth fault currents in such networks may be distorted, and this negatively affects the operation of residual current devices. The basic nomenclature describing locally balanced systems has been sorted out as well. Finally, possible future research paths in the ﬁeld of creating locally balanced systems without the use of fossil fuels are presented.


Introduction
In today's power systems, electricity is generated by large generation units that convert chemical energy stored in fossil fuels. The generated electricity is transmitted (extensive power transmission networks for the highest voltage are needed), which means that it has to be transformed many times. Then, the electricity is distributed and only at the end of this process is used by end users [1]. Heat is currently produced in local (decentralized) systems. In this case, chemical energy from fossil fuels is also most often used. Usually, the chemical energy of the fuel in the combustion process is converted into heat in small household stoves, housing estate boiler houses or small municipal heating plants. Large heat generating units that could supply large areas with heat are not implemented. Additionally, industrial plants usually produce heat in the form of process steam in their heating plants or buy this energy factor from local producers (combined heat and power plants-CHP) located nearby.
The use of fossil fuels is responsible for climate change and is considered one of the main threats [2,3]. The continuous growth of the human population, which has already exceeded 8 billion [4], as well as technological and social development, result in increasing energy consumption. Fossil fuels are still the dominant source of energy. It is expected that in the absence of changes in the energy mix of countries, especially the developing 1.
A net-zero (ecological) transformation, related to managing carbon dioxide emissions and gradually moving away from fossil fuels, building a circular economy, building a zero-emission supply chain, implementing carbon capture utilization and storage (CCUS) systems [1], and introducing carbon taxes; 2.
An energy transformation involving the diversification of energy generation systems using renewable energy sources (RES), improving energy efficiency while reducing energy losses and saving energy consumption, integrating smart energy grids and effective and competitive local energy markets; 3.
A digital transformation related to the development of strategies and management systems, the digital activation and creation of digital platforms enabling the collection, and the analysis and use of data for the development of business models.
In recent years, the idea of the operation of power distribution networks, especially low-voltage ones, has changed significantly. This is the result of the development of prosumer distributed generation-DG (enabling the connection of prosumer generating units).
In the context of changing this image, the concept of "microgrid" began to function, which, according to [9], is defined as a medium-or low-voltage distribution system consisting of a smart infrastructure balancing demand with supply, while ensuring security, reliability and energy supplies with the required parameter quality. The microgrid consists of decentralized (in terms of location, but also network operation management) generation units (usually RES), local power grids, energy storage facilities and energy receivers. In these power grids, apart from electricity consumers, there are electricity producers and prosumers. This has an impact on the operation management of this type of power grids [10]. In this context, we can talk about modern energy systems locally balanced without the using fossil fuels. Fossil fuels include hard coal, lignite, oil and gas.
It should be remembered that distributed generation, understood as a source of energy generation located close to the point of consumption, is not only used in microgrids (power of generation units of several MW [11]). Distributed generation can be used to power industrial plants and other facilities at different supply voltages. The most commonly used technologies in systems with distributed generation are the following [11,12]

1.
Justification of the concept of local energy balancing in new energy systems without the use of fossil fuels, based on the guidelines and trends contained in formal documents and the literature; 2.
Organizing the nomenclature related to the description of locally balanced energy systems without the use of fossil fuels; 3.
Presentation of the state of knowledge (based on a thorough literature review) in the field of theoretical/laboratory proposals/implementations in the field of locally balanced energy areas without the use of fossil fuels; 4.
Discussion of the issue of electrical protection in new energy systems; 5.
Critical assessment and indication of directions for future scientific and research work in the field of development of locally sustainable systems without the use of fossil fuels.
This article consists of seven sections. The Section 1 contains an introduction to the subject of work, which justifies, based on the guidelines and trends in formal EU documents and the literature on the subject, the need to create the concept of local energy balancing in a new energy system that does not use fossil fuels. In the Section 2, based on a thorough review of the literature, the nomenclature related to energy self-sufficiency and local energy balancing is organized. It also presents the main indicators describing self-sufficient systems. The Section 3 deals with issues related to the concept of local smart grids based on innovative market mechanisms, presenting the state and experience of various research centers around the world. The Section 4 shows the state of knowledge in the field of theoretical/laboratory proposals and implementations of locally balanced energy areas. The Section 5 describes the challenges in the field of electrical protection in locally balanced systems, without the use of fossil fuels. The Section 6 is a discussion of the literature review and suggestions for actions that may allow the development of locally balanced systems without the use of fossil fuels. Section 7 contains conclusions.

Energy Self-Sufficiency and Local Energy Balancing
In the context of stability and reliability of the operation of modern, independent, locally balanced energy systems, it is crucial to ensure energy self-sufficiency. The Cambridge dictionary [18] defines self-sufficiency as "the ability to meet one's own needs". More precisely, it is an attitude, a set of actions leading to ensuring full (or partial) independence related to ensuring access to goods for any length of time. Self-sufficiency can be considered in the economic, social or energy spheres. Therefore, energy self-sufficiency is defined as the ability of entities (individual consumers and groups of consumers) to meet their own energy needs (electricity and heat). It informs what part of one's own consumption is covered by local energy production [19].
Another definition of energy self-sufficiency describes it as the ability to cover energy needs using local sources to some extent, autonomously [20].
The concept of energy self-sufficiency is closely related to the area of the implementation of its postulates. According to [21,22], an energy self-sufficient area is defined as a separate association of administrative entities in which the demand for total energy is lower than local electricity and heat generation (including RES, although it is often believed that an energy self-sufficient area can only be created by using renewable sources [23]), with the proviso that the priority is to cover one's own energy needs. When creating an energy selfsufficient area, the current and future demand for electricity and energy resources should be taken into account [24]. The key aspects here are related to the selection of the location of the generating units, the selection of a technical solution related to energy generation that takes into account the location and supply conditions, the creation of a model of operation of the selected generating unit based on real data, and the determination of the possibility of financing and subsidizing the project, taking into account various economic aspects and socio-political [24]. Such self-sufficient areas can be created within energy communities, the concept of which was introduced by the EU legislation as part of the package "Clean energy for all Europeans" [25]. It enables citizens to participate in the management of Energies 2023, 16, 4551 5 of 31 energy systems, increasing economic, ecological and energy benefits for users. Creating energy communities can reduce the risk of blackouts [26].
The literature [27][28][29][30][31][32][33] also distinguishes the concept of self-consumption, defined according to the Cambridge dictionary [34] as the consumption of goods and services to meet needs (consumption), and the term "self" directs a given action (or its result) to the performer. Based on this, self-consumption means the use of one's own goods and services to satisfy needs. In the context of energy self-consumption, this concept is defined as the consumption of electricity produced by its recipient. Thus, there is an interpretation problem related to the difference between the concepts of self-consumption and self-sufficiency. An attempt to organize the nomenclature was described in [28,35]. The aspect that differs between the two concepts is the settlement period: self-consumption refers to the immediate consumption of energy produced locally (or within a classic 15 min measurement interval), while self-sufficiency is analyzed over a longer period of time (e.g., a day, a week, a month, or a year). This will be explained on the example of the plant's daily active power demand profile and the profile of electricity production from a local source (in this case, from a PV installation), which are shown in Figure 1. within energy communities, the concept of which was introduced by the EU legislation as part of the package "Clean energy for all Europeans" [25]. It enables citizens to participate in the management of energy systems, increasing economic, ecological and energy benefits for users. Creating energy communities can reduce the risk of blackouts [26]. The literature [27][28][29][30][31][32][33] also distinguishes the concept of self-consumption, defined according to the Cambridge dictionary [34] as the consumption of goods and services to meet needs (consumption), and the term "self" directs a given action (or its result) to the performer. Based on this, self-consumption means the use of one's own goods and services to satisfy needs. In the context of energy self-consumption, this concept is defined as the consumption of electricity produced by its recipient. Thus, there is an interpretation problem related to the difference between the concepts of self-consumption and self-sufficiency. An attempt to organize the nomenclature was described in [28,35]. The aspect that differs between the two concepts is the settlement period: self-consumption refers to the immediate consumption of energy produced locally (or within a classic 15 min measurement interval), while self-sufficiency is analyzed over a longer period of time (e.g., a day, a week, a month, or a year). This will be explained on the example of the plant's daily active power demand profile and the profile of electricity production from a local source (in this case, from a PV installation), which are shown in Figure 1. Daily load profile and electricity production profile from a local source with marked areas of self-consumption-C, surplus energy-B and load not covered by local sources-A, according to [28].
In order to define the coefficient of self-consumption and self-sufficiency, it is essential to define a function in the general form M(t), understood as a momentarily overlapping load profile, L(t), and electricity production, P(t). Assuming that the instantaneous power produced by the local generation used on site is limited by any load, and the production profiles are the smallest, and taking into account the possibility of energy storage, the function M(t) can be defined as follows [28]: where L(t) is the instantaneous power consumed by consumers in the analyzed area, P(t) is the instantaneous power generated by local energy sources, and S(t) is the instantaneous power of the energy storage, where S(t) < 0 during charging, and S(t) > 0 during discharging. Thus, the auto-consumption coefficient, , according to [28] is defined as follows: Daily load profile and electricity production profile from a local source with marked areas of self-consumption-C, surplus energy-B and load not covered by local sources-A, according to [28].
In order to define the coefficient of self-consumption and self-sufficiency, it is essential to define a function in the general form M(t), understood as a momentarily overlapping load profile, L(t), and electricity production, P(t). Assuming that the instantaneous power produced by the local generation used on site is limited by any load, and the production profiles are the smallest, and taking into account the possibility of energy storage, the function M(t) can be defined as follows [28]: where L(t) is the instantaneous power consumed by consumers in the analyzed area, P(t) is the instantaneous power generated by local energy sources, and S(t) is the instantaneous power of the energy storage, where S(t) < 0 during charging, and S(t) > 0 during discharging. Thus, the auto-consumption coefficient, σ sc , according to [28] is defined as follows: The coefficient of energy self-sufficiency, σ ss , is defined as the ratio of the consumed energy covered by the local energy source to the total demand [28]: Self-sufficiency and self-consumption can range from 0 to 1. When σ ss = 0, then we are talking about a lack of self-sufficiency, and when 0 < σ ss < 1, we are talking about partial self-sufficiency. Full self-sufficiency (σ ss = 1) means full coverage of the demand for energy from local sources, without the need to connect to the external grid, which may lead to the creation of off-grid ("island") systems [19]. At this point, it is worth noting that proposing locally balanced systems in the new, future energy system does not mean separating them ("islands") from a joint connection of a group of locally balanced systems. This would prevent the broadly understood operation of the energy market and energy exchange between locally balanced subsystems. That is, the basis is the pursuit of self-consumption and self-sufficiency of locally balanced systems, but with the possibility (if necessary and under certain conditions) of generating a surplus of energy that can be transferred to another subsystem. In the event of a shortage of energy in a specific subsystem, it is possible to redirect energy from subsystems capable of producing surplus energy in their energy area.
Energy self-sufficiency brings many benefits, such as reducing the transport distance of raw materials, increasing local added value, securing against higher energy prices in the future, and creating new jobs locally [23]. Currently, ensuring full energy self-sufficiency (in an autonomous system) is very difficult due to a number of technical, economic and legal limitations and entails certain risks, e.g., the lack of a stable energy system (no frequency standard), significant differences in energy in various regions of the country, and limitations to the regional energy potential of the region by changing the functioning of the current energy system [23]. The awareness of energy consumers, of how important it is to save energy, should also be changed. The most important way to increase self-sufficiency is to reduce energy consumption and use energy-efficient devices [36]. In order to maximize self-consumption and self-sufficiency, the literature suggests the integration of energy storage systems (hybrid systems) or the use of DSM/DSR (demand side management/demand side response) mechanisms [33]. However, the oversizing of RES-based installations and energy storage facilities in the context of achieving full self-sufficiency is not economically or environmentally justified, due to the excessive surplus capacity of energy generation and storage-self-sufficiency can only be achieved by optimizing activities [37].

The Concept of Local Smart Grids Based on Innovative Market Mechanisms
The concept that fits into the creation of locally balanced power systems without the use of fossil fuels is the smart grid, defined according to [38] as "a power grid that can effectively and cost-free interfere in the behavior and activities of all users connected to it, including to provide an economically efficient, sustainable, low-loss power system". These are mostly self-sufficient systems that can solve problems within the local network, ensuring the reliable, safe operation of the system with high-quality electricity for each user. The infrastructure of smart grids for the implementation of basic tasks includes systems [39] for energy management, and security and protection, as well as IT and communication systems. The creation of locally balanced energy systems without the use of fossil fuels based on a smart grid forces a change in the perception of current energy markets, and then their modernization and change in management algorithms. In this context, the important role of active monitoring of technologies and energy sources should be emphasized. Active monitoring is understood as a process of continuous supervision, diagnosis, control of the boundary zone, regulation of the environment and compensation of the tested system [40]. This monitoring is dedicated to energy management in technical systems with a higher level of ability to use information from observation (registration) to achieve energy management (balancing) goals and improve the environment [40]. Achieving these goals is possible thanks to, among others, the following factors: • Optimization, understood as the search for the best means, method, and technical activity through operations on mathematical models; • Modernization of the system through actions on models and searching for novelties; • Innovation, i.e., inventing and implementing a new measure, system or technical activity.
Active monitoring, as a superior element of energy management systems, can significantly increase the energy efficiency of the system and allow the obtention of economic benefits [40].
Increasingly, in the context of the operation of energy systems without the use of fossil fuels and the formation of energy communities, the term "Net Zero Energy" is introduced. This term may refer to individual buildings (net zero energy buildings-NZEB) [41] or communities (net zero energy communities-NZEC) [42]. These concepts are to be the main solution enabling the reduction in greenhouse gas emissions by 2050 [43]. Generally, it is a technical system in which, through optimization activities, an increase in efficiency and the balance of energy (heat, electricity, transport, etc.) is satisfied by the local production of energy from renewable sources [44,45]. Depending on the area (facility), the definition may be slightly different. A summary and comparison of definitions of net-zero areas is presented in publication [42].
The net zero smart energy system according to [8] consists of three subsystems:

•
The energy supply subsystem-a multi-energy, centralized system including wind, solar and water power plants, and pumped storage; • Energy use subsystem-an effectively managed distributed generation system (photovoltaic (PV) + heat pumps), low-emission transport, cooperation with the power grid (V2G-vehicle to grid), the introduction of heat recovery, CO 2 capture, and storage and utilization systems (CCUS) in industrial areas; • The energy transmission subsystem-the introduction of innovative market solutions.
In the last 10 years, many studies and research related to the subject of energy management and the development of local energy markets (LEM) have been conducted. It ought to be noted, however, that despite so many scientific and technical activities, no single strategy for the management and functioning of markets within such systems has been developed, which would allow for full local balancing and full self-sufficiency, without the use of fossil fuels. The proposed activities in the context of ensuring self-sufficiency mainly concern a limited number of facilities (buildings), and the proposed market solutions are related to a limited area.
According to [46], local energy markets are "market platforms targeted at electricity end users so that they can negotiate transactions with each other, becoming active market participants, which is a solution for balancing local systems". Market mechanisms are mainly based on community markets (centralized, where players are looking for the best solution in the context of energy trading) and peer-to-peer markets (decentralized platforms where consumers and prosumers make direct transactions with each other, reducing the role of an intermediary).
The concept of using local energy markets in energy management systems in microgrids is presented in [10,47,48]. In [10], local energy markets are used, where microgrids can trade with each other under the direction of the local energy market manager (LEMM), minimizing operating costs. A decentralized two-level model is used here, in which the microgrid decision-making problems are first-level problems, and the LEM billing problem is a second-level problem that is solved using an iterative algorithm.
Article [47] presents the concept of a smart energy supplier (SESP) acting as a local energy market operator and an aggregator of prosumers to participate in the day-ahead and balancing markets. Energy prices on local markets are settled by premiums in relation to the day-ahead market prices, which is supposed to be a form of incentive to exchange energy between users. Studies on a stochastic model that take into account the production of energy from PV and changes in market prices indicate that such a local market can increase the local use of renewable energy and reduces the amount of energy purchased from outside.
The implementation of local energy balancing systems in the low-voltage distribution network was dealt with by the authors of publication [48], using the rules of the competitive electricity market (including unbundling, i.e., separating the energy transmission/distribution process from its sale and generation), including auxiliary services (ASs), the economic disposition and optimization of ASs, and the compensation of reactive power and harmonics as well as asymmetry. According to the proposed concept, the local balancing operation is ensured by the so-called node area operator (NAO), and the installations involved in balancing, due to the extensive monitoring system, can be controlled via the Internet or any dedicated form of signal. The power demand of a given area is covered by the local distributed generation and the medium-voltage power grid. The work schedule of the generating units is prepared on the basis of balancing offers submitted by the generators to the operator of the local area. Management and support service offerings are used for optimization through non-linear programming with constraints (sequential quadratic programming (SQP) algorithm). The function of the optimization objective is the cost of local energy balancing and the cost of auxiliary services (reactive power compensation, harmonic leveling, etc.). Simulation studies have confirmed that the introduction of local energy balancing and energy production management gives the possibility of a wider use of energy sources connected to the low-voltage grid, while maintaining grid limitations [48].
The new concept is transactive systems (transactive energy (TE)), which, according to [49], are defined as "systems of economic and control mechanisms (energy management) that allow for a dynamic balance of supply and demand in the entire power infrastructure, using the value of as a key operational parameter". This approach promotes local energy systems, departing from the hierarchical structure, which introduces the legitimacy of dividing the network into microgrids. TE uses advanced agents and protocols to manage and coordinate energy in the market [50,51]. Several scientific activities/projects were created (USA, Europe, and India) in which the functioning and legitimacy of introducing transactive systems were examined [51,52].
The Pacific Northwest Smart Grid Demonstration (PNWSGD) project was created in the United States in the context of the development of regional power grids. The fiveyear project involved 11 utilities, 2 universities and a number of companies in 5 states (Washington, Oregon, Idaho, Montana, Wyoming) [51]. This area is extensive and strategic, as it includes the BPA (Bonneville Power Administration) transmission system and generation units (hydro, wind, gas and nuclear power plants) [52]. The main objectives of the project included improving the reliability and security of energy supplies, improving efficiency and responding to current demand [53]. As part of the activities, 55 technical solutions were tested that could contribute to reducing energy consumption and costs related to its use (including smart meters, batteries, and voltage control systems) and an innovative transactive system was implemented to coordinate many distributed generation units [53,54]. This system includes automatic, electronic transactions between suppliers and users. PNWSGD uses "hierarchical signal communication based on peer-to-peer along the paths followed by electrons through the power grid" [52]. Each element of the system, node, every 5 min, must predict the dynamic cost of energy at the node and the energy that would flow to/from each neighboring node. Based on the activities, it was found that such an approach is justified and enables the achievement of the set goals [53].
Another American project is the "GridSMART Demonstration Project" implemented in 2009-2013 [55]. Its main objective was to design, build and operate an innovative system for the participation of individual consumers and their resources for the operation of the power system in real time, using incentives to increase efficiency in the normal operation of the power system and flexible response in situations of increased system load [55]. The system adjusted electricity consumption by consumers in response to a 5 min price signal. The household software developed within the project uses price signals from the local wholesale market to obtain the price of energy and manages the HVAC (heating, ventilation, and air conditioning) system of the household [56]. The real-time tariff introduced in the draft describes the wholesale market price [56]. In addition to the development of market mechanisms, the project also included the creation of a monitoring and smart metering system, i.e., the design of a cooling/heating thermostat, aimed at balancing the consumer's willingness to reduce energy bills in return for his willingness to be flexible. Moreover, it included setting the energy price at which the load will be switched on (or off).Based on the performed activities, it was found that this solution makes it possible to reduce the system load by about 5% in a 3.5 h system [56]. In addition, consumer surveys confirmed satisfaction with the results of the project [56].
PowerMatcher Suite is a project of Flexiblepower Alliance Network. It consists of two open-source technologies: PowerMatcher and Energy Flexibility Platform and Interface (EF-Pi), which are complementary. PowerMatcher is a so-called intelligent network coordination and control mechanism based on TE to balance local energy resources and controllable, disposable loads (devices) in real time [57]. PowerMatcher provides market mechanisms in order to achieve market equilibrium, and devices "work" on the basis of the game of demand/supply-the main structure here is the technology of agents; each device (receiver) is represented by an agent, and each agent can strive for many purposes. Here, the bidding agent (auctioneer) is distinguished, being "at the top" of the hierarchy of agents-it is this entity that aggregates all offers received from "lower-rank" agents and returns the price to them as an incentive to start production or energy consumption by users. The price is intended to be system-equivalent and may be different for each device. The "lower" rank is the agent of the concentrator, which concentrates or aggregates the offers and places the offer higher in the hierarchy. Devices in the system are represented by a device agent that sends bids and receives prices from the system. Based on the price signal, it sends set values to the device and receives information about its current status. It is a fully scalable system that can be subjected to various modifications and individual settings [57].
In turn, EF-Pi is a platform that provides the ability for communication between devices and services within the intelligent network. It is a runtime environment in which it is possible to deploy applications related to smart grids and connect devices to it, providing appropriate interfaces for interaction between participants [57]. Within EF-Pi, there are four so-called control spaces, i.e., "ways to place the information contained in it so that the Application is able to understand this device" [57].
In recent years, several projects have been implemented (mainly in the Netherlands, but also in Denmark and Germany) that use PowerMatcher Suite, both in areas with only households, as well as in public facilities or islands (Bornholm) or energy communities with a high coefficient of self-sufficiency [57].
In the described solution of using TE [50], four villages in India were selected as a case study, two of which had photovoltaic installations and energy storage facilities, and the other two had no generation or energy storage systems. The TE architecture is used to re-represent the generation, energy storage and load subsystems involving the exchange of energy between the subsystems and uses a multi-objective genetic algorithm used to optimize energy consumption and increase the reliability and instability of power trading in the microgrid with minimal energy costs for each village. Studies of three different TE models were carried out, on the basis of which it was found that the most advantageous solution is to create energy sharing systems using RES, in an integrated mode, in which the community is able to exchange energy with each other based on local energy markets. The authors add that in the case of a transactive market, the local energy balance must be maintained [50].
Management of systems using RES is increasingly carried out by so-called virtual power plants. They are defined as a cluster of distributed generation units (mainly using RES), controlled loads, energy storage systems participating in the energy market as independent power plants supervised and controlled by the energy management system (EMS) [58]. Energy management systems can operate using a variety of objective functions, including the following: • Minimization of energy generation costs [59][60][61][62]; • Profit maximization [14,[63][64][65][66][67][68]; • multi-criteria objective function (a combination of the two above and, for example, the minimization of greenhouse gas production, minimization of power losses in the distribution network [69], or maximization of self-sufficiency and economic return [33]).
The key part of energy management in the implementation of the objective function is to define constraints, e.g., those related to ensuring the balance of power in each period, distributed generation, the operation of energy storage [61], the selection of advanced optimization methods [70] and forecasting.
There are many management techniques based on optimization [71,72]. In a review article [72], a division of optimization methods used to solve energy problems was presented in a very meticulous way. Basically, in [72], the following types of optimization are distinguished:

1.
Combinatorial, in which the following can be distinguished: • Exact optimization (branch and bound, and dynamic programming); • Approximation (including metaheuristic algorithms and random search).

2.
Continuous, including the following: • Linear programming (simplex method and interior-point method); • Non-linear programming (local and global search).
Another class of methods are methods based on artificial intelligence, fuzzy logic, machine learning and artificial neural networks [72,73].

Self-Sufficient Systems Based on PV and Energy Storage
Around the world, many research centers are trying to develop technical solutions aimed at meeting their own energy needs based on an earlier feasibility study consisting of assessing the technical, energy, economic and logistic potential related to ensuring the energy security of the region. Very often, however, in the context of ensuring self-sufficiency and self-consumption, solutions for one (several) technical facility are considered and most often they concern the use of photovoltaic installations cooperating with electricity storage, both in the on-grid system and those not connected to the power grid (off-grid). Many such solutions are described in the literature [27,31,33,[74][75][76][77][78][79]. Most of them are at the conceptual stage or at the stage of mathematical modeling. Researchers deal with issues related to the appropriate dimensioning of such systems and the selection of an appropriate control strategy based on advanced algorithms and control systems for such microgrids [80]. An extensive review of the control strategies for microgrids with energy storages is presented in [81].
An example of a photovoltaic installation cooperating with electricity storage (7.2 kWh) used to ensure the highest possible self-consumption rate was implemented and described by the authors in [27]. This solution applies to a single-family house in Sweden, where 14 PV modules were installed (installation power of 3.6 kWp). A ground-source heat pump coupled with a heat accumulator was used to heat the building and prepare domestic hot water. The system uses controlled electrical sockets, automatic controllable valves for taps and heating valves. Three different algorithms for the cooperation of the photovoltaic installation with the energy storage are proposed here-two of them are used to transfer load peaks, and the third is used to maximize the self-sufficiency of a single-family building. The first two are the so-called day-ahead and day-behind algorithms, which aim to reduce peak power demand as much as possible. In the approach of the so-called algorithms, on the next day, based on the data, a forecast of electricity production from PV and a forecast of demand for energy on the next day are assumed. In the day-behind approach, PV energy and load from the previous day are treated as if they were actual data from the current day. The third algorithm (target zero) is used to maximize self-sufficiency by prioritizing load coverage and charging the electricity storage with excess PV energy so that it is not fed back into the grid. The research found that the self-sufficiency for the last variant was 48%. In addition, the authors concluded that the increase in the capacity of the energy storage (a double increase, to 14.4 kWh), caused only a slight increase in self-sufficiency, not exceeding 51%-too large a storage will not be properly unloaded, which means that it will not be able to collect all surplus energy and it will be fed into the grid [27].
The use of energy storage in self-sufficient systems based on PV is justified, as it allows the improvement of quality parameters, including the elimination of voltage problems caused by distributed generation that is uncontrolled over time. The authors of publication [74] emphasize the important role of the grid operator in energy storage management. Grid operators can support prosumers owing to the possibility of connecting storage facilities with a larger capacity in order to achieve the highest possible self-consumption, in exchange for using batteries to solve the above-mentioned grid problems.
An improvement in the self-sufficiency of a nearly zero-energy building (nZEB) was proposed by the authors of [75] using the example of an academic building. The main source of energy is a photovoltaic installation cooperating with energy storage facilities. This energy is used to cover the demand for heat and electricity. The nZEB building has a number of sensors that are part of an intelligent system for monitoring and managing energy in the building. Based on the simulation tests, it was found that the building is fully self-sufficient for 7 months a year, and the lowest self-sufficiency in the winter month is over 50%.
The optimization of the capacity of batteries cooperating with photovoltaic systems in terms of achieving maximum self-sufficiency and self-consumption was dealt with by the authors of publications [31,76]. The authors analyzed such a system by developing a model of households (located in Baghdad, Iraq) with real profiles of load, energy generation and weather data. In order to ensure the highest possible self-sufficiency of the system, it was assumed that the battery cannot be charged from the mains [31]. A conclusion was obtained that such a system in the analyzed cases can achieve self-consumption of up to 90.19% and a self-sufficiency of 82.55%.
A similar issue was dealt with by the authors of [33], who studied the optimization of photovoltaic systems and electrochemical batteries in the context of maximizing the selfsufficiency and profitability of energy generation from local sources. A residential building in northern Italy with a PV installation and an electrotechnical warehouse was selected as a case study. They examined the correlation between the size of the PV installation, self-sufficiency, self-consumption and economic return on investment. The authors chose the SQP (sequential quadratic programming) iterative algorithm for optimization. For the tested case, the appropriate PV installation power and battery parameters were found, which allowed an annual self-sufficiency of 64% with an internal rate of return of over 6%.
Reducing the costs by about EUR 200/kWh (from 300 to 100) would make it possible to achieve self-sufficiency of 75%.
A decentralized control strategy of PV generating units with energy storages based on fuzzy logic (a fuzzy reasoning system, FIS) for balancing the charge level of energy storages and regulating the static coefficient is presented in publication [77]. Based on the tests performed in Matlab Simulink, it was found that such a solution ensures energy balance within the system, and is scalable and expandable. In addition, it reduces the depth of discharge of magazines with the lowest SoC (state of charge). Another example of increasing the self-sufficiency of a pilot Algerian home is described in [78]. The proposed hybrid system consists of a 3.2 kWp PV installation, a 1 kW wind turbine, batteries, and an inverter (on-grid system). The whole is controlled by a proprietary energy flow management system at home. First of all, meeting the energy needs of the house is covered by local energy production. If the production of energy exceeds the consumption, the surplus will be used to charge the batteries, and then any surplus will be fed into the grid. In the event that local production is not enough to meet the energy needs of the house, energy will first be taken from the batteries, and finally it will be taken from the grid to make up for the energy deficit. According to the authors, the system proposed by them allows the achievement of the value of the self-sufficiency coefficient of 81.83%, reducing the energy consumption from the network by about 40%. The authors in the work also reconfigured the mathematical model of self-sufficiency, which, according to them, does not take into account technical solutions using energy storage that actively exchange energy with the grid. Storage facilities significantly increase the area's self-sufficiency by storing the energy produced locally instead of returning it to the grid [78].
A multi-agent and multi-level model for analyzing the impact of collective selfconsumption of an energy community (group of households) in which contracted and centralized energy exchange between members of the community was analyzed in various energy storage configurations (individual energy storage for each member of the cooperative and collective energy storage) is presented in [79]. Based on the obtained results, it was found that individual energy storage has a negative impact on energy exchange and balancing. Based on the obtained simulation studies, it was found that the use of a storage tank in such a system can satisfy uncontrolled power demand peaks, increasing self-sufficiency from 28.1% (without storage) to 40.8% (with storage).
To ensure the highest possible self-sufficiency and auto-consumption in a household, a solution was proposed in [31] that uses a PV installation (six modules with a rated power of 0.5 kWp each), a supercapacitor tank (500 F, 2.7 V), which are connected to an inverter (7.5 kW) cooperating with the grid. The storage tank is only used for charging with PV energy. Very often, system solutions for ensuring energy self-sufficiency (mainly partial) concern photovoltaic installations operating with hybrid energy storage systems (HESS-hybrid energy storage system), i.e., systems using at least two energy storage technologies. Most often, it is the cooperation of classic lead-acid batteries or lithium-ion batteries with supercapacitor storage. One of such systems has been presented in [82]. The authors used a system based on an off-grid photovoltaic installation supported by supercapacitor storage in order to increase the durability of the energy storage. This solution was implemented at the University of Nottingham in Malaysia (UNMC). The main advantage of the supercapacitor, i.e., the high power density, allows the supercapacitor to be charged and discharged with high current in a dynamic manner, while increasing the durability of the main storage. In addition, this solution was used to support the system during increased power consumption and the effective use of recovered energy by increasing self-sufficiency and local energy security.
A similar solution was presented in [83], where a hybrid energy storage system (lithium-ion storage and supercapacitor) was used in photovoltaic installations of 93 households in a rural commune. Supercapacitors have also been found to improve system performance by increasing battery life while reducing peak battery current and peak power [79].
In order to increase the durability of lead-acid batteries used in hybrid PV systems, the authors conducted a thorough theoretical and numerical analysis in Matlab Simulink regarding the topology of energy storage systems in rural power systems [83]. Additionally, in this case, the authors concluded that the hybridization of energy storage devices with the use of supercapacitors increases the durability and efficiency of the system [84,85].
For energy management in systems using hybrid energy storage, a strategy of the socalled energy router (ER) [86], related to the concept of the so-called energy Internet, i.e., a system for converting and transmitting energy based on a smart energy grid, integrates various types of storage energy resources, while enabling energy supply in a peer-to-peer system on a large scale [87,88].
The concept of a low-voltage energy router, in which RES and the low-voltage distribution network are treated as energy sources and the storage systems are used to compensate the DC bus, so that the ER can manage all devices to which access has been obtained, is presented in [89]. The article proposes two network energy routing systems in serial and star topologies based on a so-called routing matrix describing the operating status of each ER in real time, giving access to power devices and allowing interactive network management, enabling local balancing.
The home energy router (HER) in the solution proposed in [89] is an element aimed at connecting the system of distributed generation, storage, load and cooperation with an external distribution network. Distributed generation, energy storage and DC receivers (electric vehicle (EV) chargers) are connected to the DC 360 V network, which cooperates with the 220 V distribution network through a bi-directional AC/DC converter, which is a key part of HER. In this concept, the authors also came to the conclusion that the appropriate control, optimization and use of super-capacitor energy storage supporting the storage system stabilizes the operation of the system, can slow down the rate of changes in the battery output power, and provides the possibility of a better use of local resources.
Increasingly, in order to increase self-sufficiency and ensure local balancing, hybrid systems based on distributed generation using more than one renewable energy source (PV, wind turbines and biogas plants) are proposed [90,91]. Such systems must coexist with energy storage and, increasingly, with fuel cells (FC). Such an example was presented in [92]. The tested object was a pilot residential building in Slovenia with a PV installation and energy storage (BT) facilities. The authors proposed expanding the system with fuel cells, the purpose of which was to use the surplus energy from a PV installation for the production of hydrogen by means of pyrolysis, and in the period of local energy deficit, electricity would be produced using cells. An important element of this system is battery warehouses, which are designed to optimize hydrogen consumption. The tests performed using 15 min data from smart meters suggest that the self-sufficiency of the analyzed prototype case is 63%. To ensure full self-sufficiency, the authors suggest optimizing the size of the installation and developing an energy management system.
The aforementioned optimization of hybrid PV/BT/FC systems in home applications was dealt with by the author of publication [93]. The building in question was located in Iraq. The main goal was to ensure that the demand for power from renewable energy generation was covered at the optimum power of the cell. A simulation experiment in MATLAB using real data on power profiles, PV energy generation and weather conditions showed that for the tested building (with an assumed daily energy consumption of 6.8 kWh), the optimal cell power is 2.25 kW with a photovoltaic installation of a power of 1.8 kW, and the addition of a fuel cell resulted in an increase in self-sufficiency from 31.82% to 95.82%.
Determining the optimal configuration of a home off-grid system consisting of a wind turbine, PEM fuel cell, alkaline electrolyzer, energy storage and supercapacitor storage was dealt with by the authors in publication [21]. The main source of electricity is the wind turbine, while the fuel cell, electrolyzer, storage and storage are treated as backup sources. To find the best configuration, an algorithm based on the non-dominated sorting algorithm (NSGAII) was used, and the influence of wind on the results and sensitivity of the system was also taken into account. Similar conclusions were reached by the authors of publication [94], who simulated the operation of a hybrid system consisting of a wind farm, fuel cells, electrolyzer and supercapacitor storage. The use of a supercapacitor tank improved the system's operation.
Based on the above examples, it can be seen that unstable sources using renewable energy force the development of energy storage systems. The energy storage potential in the northern German region of Osna-bruck-Steinfurt was analyzed in [95]. In the analyzed case study, the purpose of the achievement of the planned capacity from RES (PV, wind and water energy) by 2030 is to allow energy self-sufficiency to be at the level of 80%. The use of warehouses will allow an increase in self-sufficiency of 90%; however, full self-sufficiency cannot be achieved due to the significant oversizing of warehouses, which, as mentioned earlier, is economically and environmentally unjustified. Greater potential is seen in centralized common warehouses, but organizational and legal issues in this respect need to be addressed [95].
Biomass has great potential related to the development of locally balanced areas, mainly rural ones [96]. Simulation studies are being conducted more and more often, and finally, pilot projects related to the use of agricultural by-products to ensure the self-sufficiency of farms are being implemented. These products (animal excrement and solid municipal waste) have low economic value, but relatively high energy value, which justifies their use for energy purposes [96]. The use of biogas as a flexible energy source in conjunction with other sources of renewable energy (wind turbine irrigation pumps and the development of agrovoltaic systems) will enable the creation of more reliable systems [96]. Using optimization techniques related to the distribution and size of distributed generation, a significant reduction in power losses can be achieved [96].
There have been a number of studies on the assessment of the potential of using agricultural by-products to ensure self-sufficiency, especially in areas (countries) where energy is imported (e.g., Latin America and the Canary Archipelago [97,98]). In [97], researchers report that in the Canary Archipelago alone, the production of manure is almost 500,000 tons per year, which provides very large potential for biogas production. In turn, researchers in publication [98] describe a case study in which cow manure is used to produce biogas on a dairy farm (81 TWh/year), which covers 50% of the annual energy demand. The authors mention that similar biogas production is possible in all types of dairy cooperatives, which is also associated with positive environmental aspects: a reduction in methane and nitrogen oxide emissions and as much as a 60% reduction in CO 2 in Latin American countries.
The authors in [99] proposed a self-sufficient off-grid breeding farm with a hybrid system based on a biogas plant, PV and heat storage. Electricity and heat produced in the biogas plant are delivered to recipients: greenhouses, outbuildings and households, which are treated as an external load. Energy management in the system is carried out using an intelligent valve that allows autonomous operation. The valve is based on a negative-feedback three-way input regulator and is designed to balance the system and ensure self-sufficiency.
The proposal of an energy management system using biogas for energy purposes in a rural area was dealt with by researchers in publication [100]. Based on the analysis of energy potential (using a case study, a village in India, where electricity is supplied to the inhabitants only 6 h a day), a decentralized energy production system consisting of a gasification plant, a biogas plant and a distribution network was proposed. In the gasification plant, biomass is subjected to partial pyrolysis in sub-stoichiometric amounts of oxygen, which results in the production of a producer gas, which goes to the generator with a gas engine, and the generated electricity goes to consumers. In turn, the biogas plant consists of a fermentation chamber and a gas tank, and the produced gas is used for heating purposes. The proposed solution satisfies the energy needs of the village.
In the context of local energy balancing, self-sufficient areas (cities and communities) should be created. The authors of publication [101] proposed a method of assessing whether or not a city can become self-sufficient, which they used for the city of Seville. Based on the analysis, the authors came to the conclusion that in order for the city to be energy selfsufficient, electricity from RES should be used for transport and heat production (mainly photovoltaic installations on the roofs of buildings and unearthed surrounding plots, solar collectors and a small share of biogas plants from biogas generated from wastewater). The paper also states that seasonal storage is uneconomical. The issue of the thermal self-sufficiency of energy communities was dealt with by the authors in [102], who proposed joint heat storage. Photovoltaic installations of community members were used to generate heat. Two storage cases were analyzed: individual storage (dispersed), in which each house has PV installations and thermal layered TES (thermal energy storage) tanks with water as a storage medium for heating and air conditioning purposes, and "Community" storage, where everyone has a photovoltaic installation, but common heat storage is considered, and is analyzed in different sizes. Based on the research, it was found that the common energy storage (ES) in such systems approaches the classic definition of nZEB areas, while reducing investment costs, ensuring a shorter payback time. Similar conclusions were reached by the authors of publication [103], who examined a system of five households in Australia with photovoltaic installations. Creating central storage with a capacity of about 3 kWh/farm increased self-consumption by about 19% and building self-sufficiency by 12%.
A summary of the literature on locally balanced systems, based on PV and ES, is presented in Table 1.

Overview of Locally Balanced Systems without Fossil Fuels (Communities and Cooperatives)
In recent years, several pilot systems of self-balanced areas have been implemented in the European Union. The first of them is the COMPILE pilot system in Luče, Slovenia, developed under the EU research and innovation program "Horizon 2020" [104]. The power grid in this town is characterized by an emergency and unstable connection to the medium-voltage grid, which resulted in frequent electricity supplies. The aim of the actions taken was to create a local energy community in order to ensure the full self-sufficiency and security of the local energy system by improving the network conditions of the town. As part of the project, nine photovoltaic power plants were built with a total power of 102 kW, five household electricity storage facilities (total power 33.5 kW and total capacity 74.8 kWh) and one so-called communal storage (power 150 kW and capacity 330 kWh). The system also includes a community charging point for electric vehicles. The whole is integrated with home energy management systems and community microgrid control systems [105,106] based on predictive models and machine learning algorithms, which allow an appropriate response to network conditions. The key role of the municipal warehouse is emphasized, presenting the possibility of switching the system to off-grid operation. In addition, active grid elements and controlled production and consumption of energy enable the energy community to participate in a flexible, short-term energy market and in the market of additional services (replacement reserve and manual and automatic frequency restoration reserve-mFRR and aFRR). The challenge for users and operators is the cooperation of batteries with the grid and technical and legal regulations in this regard [106].
The concept of a self-sufficient, locally balanced system with a high level of energy self-sufficiency in order to become independent of imported energy resources was developed in 2012 for a small region of Austria with 21,000 inhabitants [23]. The work used an innovative modeling approach combining a local energy system model including photovoltaics and solar energy resources with a local land use optimization model due to the impact of increasing biomass production, which allowed the introduction of regional biomass supply. The model of the local energy system was aimed at finding the most economically advantageous solution for supplying the region with energy resources. On the basis of the obtained results, it was found that fossil fuels used for heating purposes can be completely replaced by increasing the production of forest and agricultural biomass (using pellet boilers and producing biogas for heating purposes). In the context of electricity supply, in addition to biomass (biogas plants and micro-cogeneration, based on the organic Rankine cycle), the full potential of PV installations mounted on the roofs of buildings should be used to the full extent. The authors cite high investment costs for users and a decline in local food and feed production as a challenge and threat [23].
In seven European countries (Spain, Austria, Cyprus, Romania, Switzerland, Turkey, and the Netherlands), the "Smart Urban Isle" (SUI) project was implemented, which consisted of developing a locally sustainable energy system for existing areas, minimizing energy imports from outside the "island" [107]. The aim of the project was to support the development of "urban energy islands" in the context of ensuring the self-sufficiency and energy security of the area. The project developed a five-element algorithm for creating locally sustainable energy systems [107]:
Examination of the energy state as a starting point; 3.
Inventory of the energy potential of the area; 4.
Actual generation of alternative solutions based on previous stages; 5.
Evaluation and selection of the best solution.
Article [107] describes one case study of SUI, a neighborhood in Haarlem, the Netherlands. Based on the algorithm, four concepts developed for the case study were identified: (1) the use of individual air-source heat pumps, (2) the creation of a low-temperature district heating network (ULT) connected to an aquifer thermal accumulator (ATES) with individual heat pumps and PVT, (3) the use of low-and medium-temperature district heating networks with a collective heat pump connected to an aquifer thermal storage tank (ATES) and several additional heat pumps, and the use of (4) high-temperature district heating networks with a collective heat pump connected to an aquifer thermal storage tank (ATES). Based on the energy and environmental assessment, it was found that the most favorable solutions are concepts 2 and 3.
The authors in [108] proposed locally balancing the power grid in a commune with a high degree of RES penetration. To achieve high self-sufficiency, load balancing should be decentralized at the level of over 90%, while improving the integration of RES. This action is possible through the following steps: • Flexible production of renewable energy (production of "on demand" biogas from anaerobic digestion and its storage at home to ensure supplies to generate balancing power [109] A Dutch commune was indicated as the research object, in which, using a deterministic model for simulation of electricity demand, "Power-Plan", a number of variants of grid operation with varying degrees of RES share their proportion in the energy mix together with scenarios of grid operation balancing technology and the optimization of its work. Based on the results, it was found that the self-consumption of the commune was about 95%, and the total production during the year satisfied more than 90% of the power demand, limiting the overproduction of energy and the related transmission losses and reducing the network load. The best solution was to combine all load balancing technologies, which also allowed the peak load of the municipality to be reduced to 60%, which enabled greater network integration in the context of the use of electric heat pumps and the development of electromobility. All of this allowed the formulation of the conclusion that local balancing can be effectively implemented, but not in its entirety. As challenges and obstacles, the authors of the publication propose the development of solutions at other scale levels to ensure the security of supply. The development of energy storage systems will also be a milestone [108]. Table 2 presents a list of local balanced systems without the use of fossil fuels. Increasingly, the development of smart energy grids uses blockchain technology, i.e., a distributed "system used to digitally record all purchases or sales of cryptocurrencies, which is constantly growing as more blocks are added" and is maintained on peer-to-peer -connected computers [110]. Increasingly, blockchain is used to account for the production, transmission, distribution and trade of electricity. An optimized and decentralized energy supply system for smart cities based on the smart grid idea and blockchain technology is presented in [111]. The model of the smart city energy system developed by the authors is based on prosumer communities built by connecting self-sufficient households that generate, consume and share energy generated from RES on a decentralized trading platform through the integration of blockchain and microgrids. The measurement and control infrastructure monitors the generation, transmission and consumption of energy in real time, while sending information to the blockchain via a so-called smart contract. A peer-to-peer energy trading model is proposed to encourage the use of RES in microgrids and promote sustainable energy consumption.
In [112], a project of a new approach toward integrating blockchain with the power grid is described. The project encourages participants to export energy in order to balance supply and demand in the system. The customer is reimbursed for each amount of energy introduced into the grid, which is consumed by another customer at that time, in accordance with the amount of energy introduced. The data is collected by smart meters on an ongoing basis and compared with the measurement data from the station. Blockchain is implemented on the IoT platform as an autonomous-agent market that has smart metering, flexible devices, and electric vehicles and allows you to distinguish the electricity generated by each device, while facilitating energy trading between individual devices. Autonomous agents are part of the whole system and can decide on the most advantageous energy trading bidding strategy on the proposed platform. The creators of the project chose the capital of Romania, Bucharest, as a case study. Blockchain technology in the analyzed case made it possible to solve problems related to balancing, as well as to improve the quality of electricity supply and increase energy efficiency [112].

Challenges in the Field of Electrical Protections in Networks with Local Energy Sources
Distributed generation, especially with energy sources connected to low-voltage (LV) networks, as well as the prosumer's energy systems, require a very careful analysis in terms of the selection and operation of electrical protections. Prosumer installations can operate in various modes [119,120], as presented in Figure 2.
supply and demand in the system. The customer is reimbursed for each amount of energy introduced into the grid, which is consumed by another customer at that time, in accordance with the amount of energy introduced. The data is collected by smart meters on an ongoing basis and compared with the measurement data from the station. Blockchain is implemented on the IoT platform as an autonomous-agent market that has smart metering, flexible devices, and electric vehicles and allows you to distinguish the electricity generated by each device, while facilitating energy trading between individual devices. Autonomous agents are part of the whole system and can decide on the most advantageous energy trading bidding strategy on the proposed platform. The creators of the project chose the capital of Romania, Bucharest, as a case study. Blockchain technology in the analyzed case made it possible to solve problems related to balancing, as well as to improve the quality of electricity supply and increase energy efficiency [112].

Challenges in the Field of Electrical Protections in Networks with Local Energy Sources
Distributed generation, especially with energy sources connected to low-voltage (LV) networks, as well as the prosumer's energy systems, require a very careful analysis in terms of the selection and operation of electrical protections. Prosumer installations can operate in various modes [119,120], as presented in Figure 2. In such installations, there is a two-way power flow-energy is both consumed and produced. The degree of complexity of the energy flow in networks is even greater when the local network is constructed as shown in Figure 3. There are consumers, separate local PV sources, energy storage, the operator's distribution system (DSO) and the distribution system within the prosumer's electrical installation. There can also be electric vehicles, operating in grid-to-vehicle or vehicle-to-grid mode. In accordance with the provisions of the standard [119], overload currents and short-circuit currents should be specified at each place of protection to be installed. All operating modes of prosumer installations should be considered and the situation with the highest short-circuit current and the lowest shortcircuit current should be determined. Determination of the highest short-circuit current is necessary to indicate the required breaking capacity of the devices. In turn, the lowest short-circuit current (earth fault current) is needed to verify the sensitivity of protections,  In such installations, there is a two-way power flow-energy is both consumed and produced. The degree of complexity of the energy flow in networks is even greater when the local network is constructed as shown in Figure 3. There are consumers, separate local PV sources, energy storage, the operator's distribution system (DSO) and the distribution system within the prosumer's electrical installation. There can also be electric vehicles, operating in grid-to-vehicle or vehicle-to-grid mode. In accordance with the provisions of the standard [119], overload currents and short-circuit currents should be specified at each place of protection to be installed. All operating modes of prosumer installations should be considered and the situation with the highest short-circuit current and the lowest short-circuit current should be determined. Determination of the highest short-circuit current is necessary to indicate the required breaking capacity of the devices. In turn, the lowest short-circuit current (earth fault current) is needed to verify the sensitivity of protections, i.e., to assess the effectiveness of protection against electric shock through the automatic disconnection of supply. The latter issue (the lowest short-circuit current) is all the more complicated as changing the operating mode of the local network may change the method of earthing the network's neutral point.
produced. The degree of complexity of the energy flow in networks is even greater when the local network is constructed as shown in Figure 3. There are consumers, separate local PV sources, energy storage, the operator's distribution system (DSO) and the distribution system within the prosumer's electrical installation. There can also be electric vehicles, operating in grid-to-vehicle or vehicle-to-grid mode. In accordance with the provisions of the standard [119], overload currents and short-circuit currents should be specified at each place of protection to be installed. All operating modes of prosumer installations should be considered and the situation with the highest short-circuit current and the lowest shortcircuit current should be determined. Determination of the highest short-circuit current is necessary to indicate the required breaking capacity of the devices. In turn, the lowest short-circuit current (earth fault current) is needed to verify the sensitivity of protections, i.e., to assess the effectiveness of protection against electric shock through the automatic disconnection of supply. The latter issue (the lowest short-circuit current) is all the more complicated as changing the operating mode of the local network may change the method of earthing the network's neutral point.   Figure 4 shows changes in short-circuit current distribution when changing the network configuration from the direct feeding mode (Figure 4a) to the island mode ( Figure  4b). Considering the case in Figure 4a, the short-circuit current, Ik, is composed of four components (IT + IES + IG + IPV). If the installation is operating in island mode (Figure 4b), there are only three components of short-circuit current (IES + IG + IPV). Thus, from the point of view of protection against electric shock from the automatic disconnection of supply, in the case from Figure 4b (only three components) the short-circuit current, Ik, may be too low to trip the protection (circuit breaker) in the time required by the standard [121].   Figure 4 shows changes in short-circuit current distribution when changing the network configuration from the direct feeding mode (Figure 4a) to the island mode (Figure 4b).
Considering the case in Figure 4a, the short-circuit current, I k , is composed of four components (I T + I ES + I G + I PV ). If the installation is operating in island mode (Figure 4b), there are only three components of short-circuit current (I ES + I G + I PV ). Thus, from the point of view of protection against electric shock from the automatic disconnection of supply, in the case from Figure 4b (only three components) the short-circuit current, I k , may be too low to trip the protection (circuit breaker) in the time required by the standard [121]. work configuration from the direct feeding mode (Figure 4a) to the island mode ( Figure  4b). Considering the case in Figure 4a, the short-circuit current, Ik, is composed of four components (IT + IES + IG + IPV). If the installation is operating in island mode (Figure 4b), there are only three components of short-circuit current (IES + IG + IPV). Thus, from the point of view of protection against electric shock from the automatic disconnection of supply, in the case from Figure 4b (only three components) the short-circuit current, Ik, may be too low to trip the protection (circuit breaker) in the time required by the standard [121].  In accordance with the rules for the use of overcurrent protections, they should be placed at the origin of the circuit. However, in the case of the ability to transfer power in a circuit in two directions, the beginning of the circuit is a relative term and depends on the operating mode. This also applies to considerations related to the flow of short-circuit currents. To properly protect the LV distribution line shown in Figure 5, overcurrent protection devices should be located at both ends of this line (OCPD1 and OCPD2). The earth fault indicated in Figure 5 is supplied from two sides and only the opening of both protections (OCPD1 and OCPD2) gives a definitive termination of the short-circuit/earth fault current flow.  In accordance with the rules for the use of overcurrent protections, they should be placed at the origin of the circuit. However, in the case of the ability to transfer power in a circuit in two directions, the beginning of the circuit is a relative term and depends on the operating mode. This also applies to considerations related to the flow of shortcircuit currents. To properly protect the LV distribution line shown in Figure 5, overcurrent protection devices should be located at both ends of this line (OCPD1 and OCPD2). The earth fault indicated in Figure 5 is supplied from two sides and only the opening of both protections (OCPD1 and OCPD2) gives a definitive termination of the short-circuit/earth fault current flow. An extremely important and difficult issue in the context of the use of protections i the selection of appropriate residual current devices (RCDs), which is carried out to pro tect against electric shock, as well as against fire. The selection of RCDs is difficult due t the use of many power sources in the network [122], and mainly due to the possibility o the appearance of a DC component [123] and higher harmonics [124,125] in the earth fau current. This applies in particular to PV installations [126,127] and electric vehicle charg ing installations [128,129]. Table 3 shows the types of RCDs in terms of their sensitivity t the shape of the residual current waveform. Table 3. Types of RCDs in terms of sensitivity to the shape of residual current waveforms; compile on the basis of [130][131][132][133][134].

RCD Type
Required Tripping on Residual Current Waveform AC  residual sinusoidal alternating currents (suddenly applied or slowly rising) of frequency 50/60 Hz A  waveform that is the same as that for the AC type;  residual pulsating direct currents (suddenly applied or slowly rising); the following current delay angles: 0°, 90° and 135°;  residual pulsating direct current (current delay angle: 0°) superimposed by smooth direct component of 6 mA F  waveforms that are the same as those for type A;  residual pulsating direct currents superimposed by smooth direct component of 10 mA;  mixed-frequency residual current (suddenly applied or slowly rising) intended for circuit supplied between phase and neutral or phase and earthed middle conductor B  waveforms that are the same as those for type F;  residual sinusoidal alternating currents up to 1 kHz;  residual alternating currents superimposed by a smooth direct current of 0.4 times the rated resid ual current; An extremely important and difficult issue in the context of the use of protections is the selection of appropriate residual current devices (RCDs), which is carried out to protect against electric shock, as well as against fire. The selection of RCDs is difficult due to the use of many power sources in the network [122], and mainly due to the possibility of the appearance of a DC component [123] and higher harmonics [124,125] in the earth fault current. This applies in particular to PV installations [126,127] and electric vehicle charging installations [128,129]. Table 3 shows the types of RCDs in terms of their sensitivity to the shape of the residual current waveform. Table 3. Types of RCDs in terms of sensitivity to the shape of residual current waveforms; compiled on the basis of [130][131][132][133][134].  The most common in home, office and even industrial installations are RCDs of type AC and type A. Compared to other RCDs, they are relatively inexpensive. However, when it comes to PV installations, in some cases technically advanced and expensive type B or B+ RCDs may be required. In accordance with the provisions of the standard [127], if an RCD is used in a PV installation (Figure 6a), its type shall be of B (B+), unless  residual pulsating direct currents superimposed by a smooth direct current of 0.4 times the rated residual current or 10 mA, whichever has a higher value;  residual direct currents obtained from rectifying circuits as a two-pulse bridge connection line-toline for 2-, 3-and 4-pole RCDs, a three-pulse star connection or six-pulse bridge connection for 3and 4-pole RCDs;  residual smooth direct current.

B+
 waveforms that are the same as those for type B;  residual sinusoidal alternating currents up to 20 kHz The most common in home, office and even industrial installations are RCDs of type AC and type A. Compared to other RCDs, they are relatively inexpensive. However, when it comes to PV installations, in some cases technically advanced and expensive type B or B+ RCDs may be required. In accordance with the provisions of the standard [127], if an RCD is used in a PV installation (Figure 6a), its type shall be of B (B+), unless  At least a simple separation between the AC side and the DC side of the PV circuit is provided by the inverter;  At least a simple separation between the RCD and the inverter (by a transformer) in the PV circuit is provided;  Or, the construction of the PV inverter ensures that the RCD of type B (B+) is not necessary-this condition should be provided by the manufacturer of the PV inverter.
(a) (b) The systems in which electric vehicles are charged are even more specific. Safety requirements for such systems are included mainly in the standards in [129,135]. In installations for EV charging (Figure 6b), RCDs are mandatory. The standard in [129] requires that, except for circuits where electrical separation is used as protection in case of fault, each charging point is protected by the individual RCD of at least type A. If the EV charging point is equipped with a socket outlet or vehicle connectors described by the multipart standard IEC 62196 [136][137][138]

•
At least a simple separation between the AC side and the DC side of the PV circuit is provided by the inverter; • At least a simple separation between the RCD and the inverter (by a transformer) in the PV circuit is provided; • Or, the construction of the PV inverter ensures that the RCD of type B (B+) is not necessary-this condition should be provided by the manufacturer of the PV inverter.
The systems in which electric vehicles are charged are even more specific. Safety requirements for such systems are included mainly in the standards in [129,135]. In installations for EV charging (Figure 6b), RCDs are mandatory. The standard in [129] requires that, except for circuits where electrical separation is used as protection in case of fault, each charging point is protected by the individual RCD of at least type A. If the EV charging point is equipped with a socket outlet or vehicle connectors described by the multipart  [136][137][138], protection against the DC component of the earth current of high value must be provided. For this purpose, one can use: Or, type A (type F) RCDs along with an additional device which detects a DC component higher than 6 mA-this is a residual direct current-directing device (RDC-DD) specified by the standard IEC 62955 [139].
Two types of RDC-DDs are distinguished by the standard IEC 62955 [139], as presented in Table 4. Table 4. Types of residual direct current-directing devices (RDC-DD), according to [139].   Or, type A (type F) RCDs along with an additional device which detects a DC component higher than 6 mA -this is a residual direct current-directing device (RDC-DD) specified by the standard IEC 62955 [139].

RDC-MD
Two types of RDC-DDs are distinguished by the standard IEC 62955 [139], as presented in Table 4. Table 4. Types of residual direct current-directing devices (RDC-DD), according to [139].    Figure 7. Normative time-current tripping characteristic of the RDC-DD for a smooth DC residual current, according to [139].

RDC-MD
In the case of charging systems for EVs, there is one more type of residual current protection. There is a protection device built into the EV charging cable, i.e., in-cable control, and a protection device (IC-CPD) used according to the standard [140]. Such a device enables a detection of DC waveforms that is similar to that of the RDC-DD and a distorted current with following components:  Figure 8. Normative time-current tripping characteristic of the 30 mA RCD for an AC residual current, according to [131].
In the case of charging systems for EVs, there is one more type of residual current protection. There is a protection device built into the EV charging cable, i.e., in-cable control, and a protection device (IC-CPD) used according to the standard [140]. Such a device enables a detection of DC waveforms that is similar to that of the RDC-DD and a distorted current with following components:  Fundamental: usually 50 Hz/60 Hz with 50% content;  High-frequency: 1000 Hz with 50% content.
The above analysis of the use of electrical protections in prosumer networks with distributed generation shows that the selection and application of protections is relatively difficult and requires special attention. Significant specificity is characterized by protection against electric shock. In modern networks, it is necessary to use more advanced and more expensive residual current protection. This includes, but is not limited to, PV installations and EV charging installations.

Discussion
Based on the literature review, it can be seen that the creation of locally balanced systems without the use of fossil fuels is necessary and that there are reasons (technical, environmental, and political) to implement such solutions. It can be noticed, however, that despite the fact that so many researchers deal with broadly understood energy systems, there are no implemented solutions that would directly enable local energy balancing without fossil fuels, ensuring the full self-sufficiency of an area. Many of the cited solutions are theoretical, conceptual, or limited to one/several objects. In the pilot implementations described in the article, after thorough analysis of them, it can be concluded that they do not ensure full self-sufficiency without the use of fossil fuels.
Basing such systems solely on the cooperation of photovoltaic installations with energy storage is economically and energetically unjustified, and they can only be implemented at latitudes where there is a lot of insolation. The works noted that installing common storage for a given energy community is more advantageous than installing dispersed storage for several members of the community, but despite this, the cost of building such a storage system that would ensure self-sufficiency is economically unjustified.
A better solution is to create hybrid systems (the cooperation of PV installations, wind farms and biogas plants) with energy storage. The presence of a biogas plant may AC residual current (mA) Figure 8. Normative time-current tripping characteristic of the 30 mA RCD for an AC residual current, according to [131].
The above analysis of the use of electrical protections in prosumer networks with distributed generation shows that the selection and application of protections is relatively difficult and requires special attention. Significant specificity is characterized by protection against electric shock. In modern networks, it is necessary to use more advanced and more expensive residual current protection. This includes, but is not limited to, PV installations and EV charging installations.

Discussion
Based on the literature review, it can be seen that the creation of locally balanced systems without the use of fossil fuels is necessary and that there are reasons (technical, environmental, and political) to implement such solutions. It can be noticed, however, that despite the fact that so many researchers deal with broadly understood energy systems, there are no implemented solutions that would directly enable local energy balancing without fossil fuels, ensuring the full self-sufficiency of an area. Many of the cited solutions are theoretical, conceptual, or limited to one/several objects. In the pilot implementations described in the article, after thorough analysis of them, it can be concluded that they do not ensure full self-sufficiency without the use of fossil fuels.
Basing such systems solely on the cooperation of photovoltaic installations with energy storage is economically and energetically unjustified, and they can only be implemented at latitudes where there is a lot of insolation. The works noted that installing common storage for a given energy community is more advantageous than installing dispersed storage for several members of the community, but despite this, the cost of building such a storage system that would ensure self-sufficiency is economically unjustified.
A better solution is to create hybrid systems (the cooperation of PV installations, wind farms and biogas plants) with energy storage. The presence of a biogas plant may turn out to be crucial due to the fact that it can be treated as a flexible source, which is extremely important for the balancing market.
The development of energy storage technology itself can contribute to the development of locally balanced systems through the use of innovative materials to increase the power and energy density of storage facilities, while increasing durability and the number of charging cycles.
Changing the location of generating units may be an opportunity for the development of self-sufficient systems. According to [141], connecting the generating units (e.g., PV installations) directly at the site of the transformer station eliminates the problem of voltage The concepts of smart grid, local energy markets (including transactive energy) and energy communities are part of the systems that are locally balanced without the use of fossil fuels. The energy management systems, market mechanisms and innovative technologies (including blockchain) used in them will allow the better use of local resources, while increasing energy efficiency and reducing energy consumption, especially during peak hours. These systems use advanced algorithms and optimization models, in which the most common function goal is cost minimization or profit maximization. In the context of locally balanced, self-sufficient systems, the objective function should be the minimum active and reactive power taken from the external network.

Conclusions
Creating locally balanced energy systems without the use of fossil fuels is a multifaceted undertaking that requires interdisciplinary knowledge in the field of power engineering, electrical engineering, ICT, automation and control, chemistry and economics. Currently, there are no ready-made solutions that are widely available and economically justified for implementation, which would ensure local balancing without the use of fossil fuels, while ensuring the full energy self-sufficiency of an area.
The analysis carried out by the authors concerning the technical and functional requirements for locally balanced systems without the use of fossil fuels and the identification of features and trends in the context of the possibility of creating such solutions allows the conclusion that the cognitive goal has been achieved. On the basis of the thorough literature review, highlighting the most important advantages and justifying the political and environmental premises, it can be concluded that there is a technical possibility of creating locally balanced systems without the use of fossil fuels.
In the context of further scientific research related to the possibility of creating locally balanced energy systems without the use of fossil fuels, it is recommended to integrate distributed generation hybrid systems (with flexible generation units) with energy storage facilities with high power and energy density, based on innovative market mechanisms and advanced algorithms ensuring the full self-sufficiency of the area, while minimizing energy costs and electricity losses, ensuring the reliability, security and quality of an energy supply.