## 1 Introduction  
In the prosumers' installations connected to low-voltage (LV) distribution networks, photovoltaic sources (PVs) are used most often. The PV power generation profile usually differs from the profile of power demand [1, 2, 3]. As a result, during times of high PV generation and low-power consumption, the power is fed to the supplying network [4, 5]. The impact on the network operation of randomly varying and non-dispatchable PV power is widely discussed in literature [6, 7, 8]. It may result in voltage variations, a reversed power flow, and an unacceptable voltage rise in the network nodes. These phenomena cause the deterioration of power quality in the network and may lead to the disconnection of PV inverters when the voltage limit at the point of common coupling (CCC) is exceeded. The mismatch between power generation and consumption is a challenge for both the distribution network operator (DSO) and a prosumer who must accept that some part of the generated energy might be lost if it is not immediately consumed. For example, there are law solutions where the prosumer can use the supplying network as a storage of 80% or 70% efficiency [9], depending on the rated power of the PV installation (80% in micro-installations up to 10 kWp, and 70% in small installations up to 50 kWp). Thus, the prosumer may recover only 70-80% energy transferred to the supplying network within one year. Stationary energy storage systems [ESSs], designed for residential applications, can help in more efficient energy management [3, 10]. However, due to relatively high prices, the ESS in the prosumer installation usually has a low capacity, rarely exceeding 10 kWh. Hence, its functionalities are limited. In recent years, a fast development of electromobility has been observed. Due to the decreasing prices of electric vehicles (EVs) and a constantly expanding number of available models, it can be anticipated that an EV will become a standard element of the prosumer installation in the near future. The EV considered as a large mobile storage system (between 50 kWh to 100 kWh) can be used for energy management during parking if it is connected to the prosumer installation. Thus, the prosumer gets a new tool for better use of their electrical energy resources. This is an interesting research topic, which raises the question of how to integrate three types of devices (PVs, ESSs, and EVs), not only to mitigate the potential problems of their impact on the supplying grid but also to obtain a synergy effect for the prosumer. In the most straightforward approach, one can assume that for the effective use of renewable energy generated in the prosumer installation, the EVs should be charged whenever there is excessive power available from renewables. Additionally, the local power consumption could be supported with the smart charging [11] functionality. This should eliminate or postpone the need for investment in the supplying network reinforcement required due to the increased power demand. This approach, although reasonable, rather concentrates on the mitigation of the negative effect of the high deployment of EVs and is mainly beneficial for the network operators. However, in the authors' opinion, the potential of electromobility could be better explored if EVs were used for ancillary services focused on the prosumer's benefits, assuming that these are equipped with bi-directional drive inverters that can also be used for charging and discharging the EV battery. There are numerous publications dedicated to the problem of self-consumption of locally generated power with the use of Vehicle-to-Building (V2B) or Vehicle-to-Home (V2H) services. In most cases, the authors assume high aggregation of EVs (a large number of EVs available for management). Other studies consider EV fleets at a city or region level. In a previous study [8], the V2B service is discussed as an element of the Internet of Energy [9; 10; 11]. EVs are used as a temporary storage for the surplus PV generation in the building installations.