Demand for distributed generation (DG) systems has increased in recent years as costs have decreased,
policies pursuing zero carbon emission objectives have been implemented, and energy demand has
increased, in addition to technological advancements in renewable energy systems. With this increase
in the number of DGs, a concept known as Peer-to-Peer (P2P) energy trading has been emerging,
which offers innovative solutions in which new generation users take an active role in the market.
This concept enables further efficient and optimal resource utilization by providing buying and selling
via the P2P market together with the grid. With optimal resource sizing in the proposed structure,
maximum self-sufficiency, shorter payback periods, and economical use of energy resources are
supplied. This study maximizes the net profit by deducting the gain to customers from the use of
Photovoltaic (PV) and Battery Energy Storage Systems (BESS) from their costs. Moreover, an optimal
PV/BESS sizing for prosumers is attained through the use of a mixed-integer linear programming (MILP)
based algorithm structure. Consumers offer energy with the most economical price in this proposed
system through the P2P energy market. On the other hand, capital, replacement, and maintenance costs
are all taken into account for a further realistic approach. The case studies of prosumers and consumers
trading energy in Peer-to-Grid (P2G) and P2P are contrasted, as is the return on investment and the
economic benefit of PV/BESS sizing during the operational time.