Peer-to-peer electricity trading in an industrial site: Value of buildings flexibility on peak load reduction

https://doi.org/10.1016/j.enbuild.2021.110737 0378-7788/ 2021 The Author(s). Published by Elsevier B.V. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/). ⇑ Corresponding author at: Dept. of Industrial Economics and Technology Management, Norwegian University of Science and Technology, Trondheim, Norway. E-mail address: pedro@ntnu.no (P. Crespo del Granado). Guro Sæther , Pedro Crespo del Granado b,c,⇑, Salman Zaferanlouei a,b


Introduction
Local energy systems, such as rooftop solar photovoltaic (PV) systems, end-use energy storages, small-scale wind farms, and distributed energy resources (DERs) in general, are rapidly entering the power market [1]. This is being further accelerated by technology development of batteries, smart grid technologies, deregulation, and the raise of prosumers and energy communities [2][3][4]. Hence, as future power systems might move from producercentric to more consumer-centric, the adoption and management of DERs will require new market designs tailored to local energy systems and buildings. An emerging approach is to create smaller entities and gather them as communities, cells or microgrids [5]. There, using (and sharing) DERs at a local (building) level is more attractive than feeding into the grid, due to the differences in elec-tricity selling and buying prices, losses and the stress of the distribution grid [6].
To address some of these opportunities in local energy systems, an emerging alternative is to encourage the use of excess energy and manage peak demands within a neighborhood or community based on peer-to-peer (P2P) energy trading [4,6,7]. P2P entails a direct energy trading between consumers and prosumers. Local markets and P2P promote the effective utilization of DERs, local energy balance, improve self-consumption, strengthen the market position of prosumers, and provide flexibility to grid operations [1,6,8]. The P2P concept promotes energy trading based on local prices and flexibility energy sources (e.g. demand response or storage) availability [5,8]. In this regard, an important market based feature influencing P2P trading is the grid utility tariff. In Norway, for example, to incentive consumers to reduce their power demand for an efficient network utilization, a promising solution is to implement a peak demand charge [9]. Commercial and industrial customers are already subject to such a peak demand charge, and are billed for the highest peak drawn from the grid each month. These large customers make up the largest part of the power demand in the distribution grid, due to energy intensive production processes, heating and cooling systems, etc. [10,11]. As the peak demand cost may be substantial, there is an incentive for the costumer to reduce their power demand. Some increasingly employed solutions are the installation of distributed generation, load shifting, and the implementation of on-site flexibility [10][11][12]. In this setting, an interesting option for industrial buildings would be to engage in P2P energy trade to jointly shave their peaks and reduce the electricity bill. Industrial buildings of diverse areas of production and businesses are often located at an industrial site. There, a local P2P collaboration would be highly relevant.
Based on local market designs recently proposed for residential communities [7,13,14], this paper proposes a P2P electricity trading for an industrial site. The objective is to study the value and role of on-site flexibility under different industrial site configurations and P2P market trading rules. Namely, the value of decentralized and shared on-site flexibility in combination with P2P electricity trading for an industrial site. The paper contributes to related literature by addressing these research questions: What is the value of P2P trade in an industrial site? Can P2P collaboration provide a competitive advantage versus procuring from wholesale markets? How will an industrial site subject to peak power charge employ on-site flexibility and P2P trade?
To address these questions, we developed a P2P trading model to evaluate the benefits of different DERs configurations and market designs centered on the role of on-site flexibility. The model is a multi-period linear program that assumes perfect market competition (system cost minimization). The objective is to investigate the value of P2P electricity trading in combination with various on-site generation and flexibility resources. The on-site DERs consist of decentralized building energy features, such as load shifting, electric vehicle (EV) parking lot, PV systems and combined heat and power (CHP), and a shared community battery (see Fig. 1). The model minimizes the total cost of electricity for the whole industrial site, subject to a local supply-demand balance which determines the optimal procurement from the grid, grid feed-in, DER operation, shared storage usage and P2P trade. Historical demand, generation and grid prices (utility tariff and wholesale prices) are used to represent an industrial site located in central Norway, supplied by the local grid owner; NTE Nett AS. The paper provides new insights on the value of P2P trading for an industrial site. This is relevant as the novelty of P2P frameworks have received limited attention or applications for industrial buildings.
The next chapter highlights studies conducted in the literature on P2P trading in buildings. These are part of the paper's literature review in Section 2. Then, Section 3 describes the market rules and designs of the industrial site and the mathematical model formulations. Further, Section 4 outlines the Norwegian industrial site data scope, while the results and analysis are given in Section 5. Finally, Section 6 summarizes conclusions and perspectives for future work.

Related literature
Local based P2P electricity trade concepts are at an early stage and there is no consensus on what market designs and pricing schemes will support developing local electricity markets. Recent research in the field has focused on i) the role of aggregators in coordinating local flexibility sources for balancing (see [15,16]), ii) designing price and bidding mechanisms for local trade ( [17,18]), iii) digitalization and internet of things applications or methods ( [19]), and iv) coordination algorithms and computational properties needed for P2P frameworks [20], and others. For a comprehensive review on the field refer to [21,13].
Some of this existing research was partially inspired by real-life demonstration projects, such as the Brooklyn Microgrid [22], Enerchain [23] and others (Piclo in the UK, Vandebron in Netherlands, and sonnenCommunity in Germany [3]). For example, in the novel paper by Lüth et al. [7], the authors investigate the benefits of residential electricity storage in the presence of P2P trade in local electricity markets. The role of battery flexibility is assessed under different market designs based on the accessibility of storage. This is further expanded in [24] to examine possible frameworks and market designs for a community of prosumers and consumers to participate in the wholesale electricity market based on P2P balancing. In these and other papers, a recurrent view is that the proliferation of smart grid technologies will enable P2P energy trade and facilitate the establishment of local consumer-centric electricity markets that can eventually be linked to the existing wholesale power market. In this regard, a possible enabler of local markets is the use of blockchain technologies, as they will facilitate the creation of secured, affordable and automatized trading platforms [25]. Another central aspect for the realization of P2P energy sharing is to define new business models. That is, market mechanisms should promote business models that ensure a fair and sustainable source of revenues for consumers and prosumers. For instance, Morstyn et al. [26] proposes creating ''federated power plants" based on synergies of P2P and virtual power plants. The authors propose incentives to improve the efficient allocation of DERs in P2P trading platforms. Kang et al. [27] explores the viability of locally buying and selling electricity among EVs. The paper investigates demand response incentives to discharging EVs to balance local electricity demand. This case and similar work concludes that to facilitate the development of local electricity markets and foster the deployment of DERs, distributed flexibility options, virtual power plants, and microgrid based options are key catalyst to this endeavor [5,28,29]. This is highly relevant for a cluster of industrial buildings with high peak demands. P2P energy trade can provide savings from peak shaving operations and incentivize the value of flexibility assets (e.g. battery or demand response). In this regard, Yan et al. [30] proposes a real-time P2P market to enable surplus renewable electricity trading among different buildings in a Chinese industrial site. The case concludes that P2P collaboration incentivizes energy exchange and income for industrial buildings, but does not consider the role of flexibility assets.
In short, existing literature has focused on P2P applications for residential buildings. However, limited research has considered P2P market design applications for an industrial case. In other words, analyzing industrial buildings collaboration to jointly achieve peak demand reductions based on P2P trading is an important contribution of this paper. Specially if this is compared with related literature that does not consider the value of using a diversified portfolio of flexibility assets. For example, a join analysis of P2P interactions with DERs, battery, EVs and demand response is investigated in this paper. Moreover, although there are various studies about shared storage in communities (e.g. [31,1]), this paper presents storage interaction with multiple DER features to value P2P trading in a real-life based industrial site.

Modelling buildings in an industrial site
A local market entails a community of interconnected buildings in which certain DERs produce surplus (e.g. solar) or provide flexibility (e.g. batteries or demand response). Each industrial building has decentralized energy technologies, such as load shift, EV parking lot, solar PV and CHP. The model objective of the industrial site is to minimize the grid consumption by incentivizing local trade and consumption (self-sufficiency).

Local electricity market designs
A market design defines the rules and practical arrangements governing how the different entities (consumers and suppliers) operate. The main objective is to set a fair and efficient market. In such markets all participants usually have equal access to the market and to relevant information about prices and supply conditions [32]. To evaluate the value of P2P electricity trading in combination with on-site DERs in a local market, the market structure and rules must be defined. This includes local trading rules and how the DERs can be managed to achieve self-sufficiency for the community. For example, today's prosumers are allowed to both consume from and feed-into (up to a certain limit) the main grid [33]. Related to these interactions, we define the following cases for a local market: Reference Case: In this market setup the on-site flexibility resources are the DERs located at each industrial building, and is considered the reference market design. Assigned market rules determine the grid consumption and employment of the flexibility resources. Collaboration Case -P2P trade: The market design enables P2P trade within the industrial site, in addition to the utilization of the individual building DERs and grid consumption. The buildings can trade power from locally produced and stored power and procured grid power. Collaboration Case -P2P trade and shared storage: In addition to the previous market features, the market design consists of a shared energy storage. The shared storage is located centrally and is owned by the industrial site. Charging and discharging can originate from the same sources as the P2P trade, where charging is compensated in terms of benefits and discharging is priced individually and at a slightly higher rate. Further, the storage cannot act as an independent entity or agent and charge directly from the grid, due to interface difficulties of today ownership and market position.
To create a fair marketplace, the market designs require certain rules for prices. The essential market features are summarized in Table 1. To incentive self-consumption for the overall industrial site, price mechanisms for the P2P trading are designed to ensure power exchange on the local level. In terms of, favorable prices for peer electricity compared to the cost of procuring from the grid and feed-in revenues. Hence, all internal prices are bounded between the feed-in tariff and grid electricity prices, as in the work of Liu et al. [34].

Model formulation
To represent building-to-building interactions along with operational decisions of flexibility assets and DERs, we have formulated a linear optimization model 1 . As the storage level at any time step is dependent on the previous storage level, the model is a multi-period optimization. With hourly time steps t, these decisions are optimized over a time horizon T. The objective is to minimize the total cost of electricity for the community, while being subject to building DERs, storage, trade, and supply constraints. With this overall cost minimization, the operation strategy is centralized for the industrial site. The primarily scope is to determine the building b electricity usage and value of P2P trade and shared on-site storage for an industrial site, in terms of peak shaving, power flows and cost reductions. In the Appendix, Table 6 describes the sets, variables and parameters used in the mathematical model. All equations are true for all time t 2 T and building b 2 B, if not otherwise specified.

The total cost of grid electricity for a Norwegian industrial prosumer
Each end user of the power grid is charged for the consumed energy and the usage of the grid. The cost of the consumed energy is the cost of the total amount of energy delivered from the chosen energy supplier in each billing period, which is based on the market spot price. The grid rent is given by the utility tariff charged by the local network company [32,35]. With the widespread installation of Advanced Metering System (AMS), the Norwegian utility tariff system is moving from flat rate tariffs towards time-of-use pricing with a peak power demand charge [9,36]. In fact, industrial consumers are already subject to a peak demand charge.
The Norwegian industrial consumer utility tariff consists of a fixed term, energy term, and power term. The fixed term is a fixed yearly or monthly charged cost NOK=mo ½ , covering e.g. grid investments and government taxes. The energy term is given in NOK=kWh ½ and reflects the cost of grid usage, e.g. losses. Finally, the power term is a fixed or seasonal dependent cost charged for the highest peak power demanded during a month, given in NOK=kWp=mo ½ . In January 2017 the prosumer agreement was introduced, allowing prosumers to sell their surplus energy to the market without being subject to the same feed-in utility tariff as larger producers. The feed-in power limit is 100 kW and prosumers are usually paid the market spot price [33].
The total cost of grid electricity for the Norwegian industrial prosumer in each monthly billing period is presented in Eq. (1).
The peak power demand P m;b ð Þ peak of building b in month m is defined by Eq. (2): The power consumed from the grid by building b in time step t has to be a positive value, given by Eq. (3).
The prosumer agreement is met by applying Eq. (4), which limits the grid power feed-in from building b in time step t.
3.2.2. Peer-to-peer trading rules P2P trading within the industrial site allows for direct electricity trading among interconnected peers. Specific mechanisms secure that the trades between the buildings follows the defined local market rules. The P2P trade rules are based on the work of Lüth et al. [7]. The total exported P2P power of building b in each time step t, is defined by Eq. (5).
Further, Eq. (6) establishes the total imported P2P power of building b in time step t.
The imported power of building b from peer p is provided by Eq. (7). Moreover, the equation ensures that the imported power of a building from a peer equals the exported power from the peer to the building, including the local network losses (w P2P ).
The total sum of P2P power traded between the buildings is given by Eq. (8), where the total exported power equals the total imported power.

Shared battery storage decisions
Eq. (9) represents the storage balance, where the energy level, E, is either decreased or increased in each time step. E at time step t is a function of the energy stored at the previous time step t À 1. As the storage is shared, the energy level is subject to the sum of power charged and discharged by all the industrial site buildings in time step t.
The sum of all building power charge and discharge in time step t are given by Eq. (10) and (11). As the storage cannot charge directly from the grid, all storage power flows are local within the industrial site.
The conversion losses are taken into account by the charge and discharge efficiencies, of which the charge P t;h ð Þ ch and discharge P t;h ð Þ dch powers are subject to. The efficiencies depend on the current through the battery [37]. However, for simplicity the efficiencies are assumed constant and based on the round-trip efficiency, which has the relationship: In addition, the charge and discharge powers are subject to the storage inverter efficiency g inv .
The lower and upper capacity constraint in Eq. (12) limits the energy level in each time step. These limits keep the storage within secure capacity ranges, thus avoiding damaging deep discharging or overcharging.
The state of charge (SOC) is a variable 2 0; 1 ½ [p.u.] which defines the level of stored energy at any given time. The minimum and maximum SOC are decided based on the preferable operation region of the storage, which typically is in the SOC range 20-90% for a lithium-ion battery [37,38].
Further, the sum of all storage charging and discharging power in time step t are restricted by the nominal power of the storage inverter in Eq. (13) and (14). These limits are included to avoid high currents and over-voltages.

Building flexibility sources and constraints
Consumer flexibility is any energy asset at the consumer site that supports a net change in the energy consumed from the grid by the consumer. Large consumers, such as industrial buildings, often have extensive energy demand, high peak demand and production processes that may be rescheduled in order to provide flexibility [11]. There are different costs associated with the various flexibility resources, hence certain rules need to be defined.

Load shifting
Load shifting for an industrial building means that the building is willing to move demand to a period when the demand is generally lower, i.e. by running a production process at a later time. Load shifting usually induce rescheduling costs, such as labor rescheduling, overtime pay or productivity losses, which will be represented by a penalty in the objective function.
For simplicity, the load shifting feature is modeled as a storage unit without losses. The shiftable power for a building in time step t is limited to 10% of the monthly peak demand, and the same limit is defined for the hourly rescheduled load, presented in Eq. (15). The available hourly shiftable load is assumed to be high for the industrial buildings due to their power consuming processes.
Further, the energy level of a building b is limited to four time steps of maximum power shift in Eq. (17).
3.2.6. Electric vehicle parking lot Vehicle-to-grid (V2G) is the bi-directional use of electricity stored in EV batteries. If made possible, V2G holds the promise of flexible and fast-responding storage for several grid services, e.g. arbitrage, peak shaving and spinning reserve. Such dual use of EV batteries can serve as on-site storage for buildings. An industrial site usually holds many employees, hence typically large parking lots. With V2G technology installed at these parking lots, a storage representing the EVs parked is an alternative flexibility asset at an industrial site.
The building EV parking lot is modeled as a joint storage unit, where Eq. (18) balances the overall storage energy level in time step t.
Eq. (19) defines the upper and lower energy level limit, which are dependent on the average nominal EV battery capacity E nom ev , number of EVs parked during work hours EV num and SOC limits.
The charge and discharge power are limited by the nominal capacity of the installed charger P nom ev;charger and the number of EVs parked EV num in Eq. (20).
The binary parameter w t ð Þ in Eq. (21) states if the current time step t lies within working hours or not, i.e. if the joint EV storage unit is available.
Finally, an initial and final storage level limit are defined for each start and end of a workday, given by Eq. (22) and (23). These limits represents the arrival and leaving of EVs in the morning and the afternoon. E start and E end 2 0; 1 ½ represents the assumed average energy level in each EV battery when arriving and leaving work, respectively. Constraining the minimal amount of stored energy at the end of each day is recognized as the most common strategy in literature [39].
3.2.7. Modelling case specific market designs The industrial site case studies are presented below, in terms of objective function, power balance and decision constraints. For all considered market designs, the overall objective is to minimize the total cost of electricity for the whole industrial site.

Reference case
In the Reference Case market design, with grid connection and building DERs, costs arise at the event of grid consumption and load shifting. Benefits arise when prosumers sell their excess electricity to the grid. Thus, the objective function minimizes the total cost of grid electricity and load shifting, presented in Eq. (24). Where the total cost of grid electricity is based on Eq. (1).
The cost minimization is subject to the grid constraints, Eqs. (2)-(4), the load shifting decisions, Eqs. (15)-(17)), and the joint EV storage unit constraints, Eqs. (18)- (23). In addition, the total demand must be equal to the total supply at each node. The power balance equation ensures that this balance is met for each building b in each time step t, given in Eq. (25).

P2P case
In the first collaboration case, the industrial site buildings have the opportunity to trade electricity locally, in addition to the market features in the Reference Case. Costs arise when a prosumer consumes grid electricity, practice load shifting or imports power from an industrial site peer. Along with the benefits from grid feed-in, a building exporting power to a peer earns money. As the amount one peer pays another peer earns, the total industrial site money transition cancel out. However, these P2P trade costs affects the optimal solution of the individual buildings, thus included in the objective function in Eq. (26).
This cost minimization is subject to the same system constraints as the Reference Case objective, along with the P2P trade constraints, Eqs. (5)- (8). The P2P power flows will affect the power balance of building b in time step t, hence the related power balance constraint is presented in Eq. (27).
Where the P2P import P t;b ð Þ imp and export P t;b ð Þ exp are variables.

P2P + shared storage case
In the second collaboration market design, costs emerge at three events: grid consumption, discharging of the shared storage and P2P import. Benefits arise when prosumers export electricity to peers, receive compensation for charging the shared storage or feed-into the grid. The objective function with the additional onsite flexibility asset is presented in Eq. (28).
The operation of the shared storage is constrained by Eqs.

A Norwegian industrial site: model implementation and data
The case study is based on real-life industrial buildings located in central Norway that represent an industrial site (see Fig. 1). The data in the model includes characteristics and demand profile of each building, the attributes of the DER technologies, shared storage aspects and electricity prices. The historical time series of demand and production along with grid utility tariff prices are pro-vided by the local utility company NTE Nett AS 2 . The model horizon is one year with a resolution of one hour (i.e. it captures seasonal characteristics of the building demand, solar PV generations and prices). All data sets cover the year of 2017. The implementation of the linear optimization models is done in the General Algebraic Modeling System (GAMS) [40], and are solved in approximately 100 s on a regular laptop computer.

Building features and demand profiles
The building electricity demand is supplied by the grid or local DERs. In general, industrial buildings have higher electrical consumption than residential buildings and often the financial possibility to invest in DERs. The chosen industrial buildings are differentiated in terms of area of business and size, hence the demand profiles vary both in magnitude and pattern. Table 2 summarizes the characteristics of the five industrial buildings 3 . We consider the following features and assumptions: Building 1 (B1): The construction material production industry consists of a wide range of companies involved in the mining, quarrying and processing of construction raw materials. Due to high electricity consumption and a relative constant base load, the building is assumed to have roof top solar PV and electrical supply from a CHP. Further, it is assumed that some production process can be shifted during work hours, thus load shifting is included as an additional flexibility resource. Building 2 (B2): A mechanical workshop is a business within the iron-and metal-industry, performing services such as ship building, forging, welding, mechanical work, etc. To provide some flexibility to the building, EVs parked at a parking lot outside the building serves an ''aggregated" storage unit with V2G technology. Building 3 (B3): The food processing industry consist of businesses performing processing, conversion, preparation, preservation and packaging of food articles. Today, the industry has become highly diverse in terms of size and efficiency. With a steady demand for heat and power, many food-manufacturing sites are ideally suited for CHP. With high demand and somewhat constant base load, CHP and load shift are assumed DERs for the building. Building 4 (B4): This food processing building has a fairly even electrical demand throughout the year, even during the summer, in terms of base load and power peaks. As the summer moths have higher power peaks than the winter months, it is assumed to have a great need of cooling 4 . Based on this and the large roof top area, a relatively large solar PV roof top installation is assumed. Building 5 (B5): Forest industry is a common category for all industry employing lumber as raw material. The forest product industry uses much energy from woody biomass and is a leader in using CHP to produce electricity. According to the International Energy Agency (IEA) [41], CHP supplies 20-60% of the electricity requirements for the pulp and paper industry in several countries. Hence, a CHP covering the large base load and a solar PV system installed at the large roof top are assumed building DERs 4 .
2 Company information at: www.nte.no 3 Due to confidentiality reasons, more detailed information regarding the buildings were not available. 4

Distributed generation and flexibility assets
Here we detail the assumptions and modelling details of DERs and flexibility assets present in the industrial site. As mentioned earlier, industrial sites are particular keen on installing DERs to cover large electricity demands and handle peak power tariffs. We assume these DERs based on examples of commercial buildings (see ASKO [42] 4 and Powerhouse Brattørkaia [43] 5 ) in central Norway, which have periodical excess power due to large PV systems. These DERs are as follows 5 : Solar PV: Historical hourly solar PV production data is provided by NTE Nett AS for a PV system in central Norway. The solar system has an installed capacity of 45.7 kWp and total annual solar production of 29.6 MWh. The individual building PV systems are based on these historical data, PV system characteristics and building roof top areas. The total annual solar production calculated for B1, B4 and B5 are 118.3, 118.3 and 266.1 MWh, respectively. Combined heat and power: CHP systems recover and use heat which would otherwise be wasted when generating electrical or mechanical power. The size of the CHP plant can be based on several considerations, e.g. baseline electricity or thermal output. In this study, gas fired CHP units are used to supply the base electricity demand of some industrial buildings. The hourly electricity output of the CHP in B1, B3 and B5 are 45, 60 and 110 kWh, respectively. The CHPs are not operated during the summer holiday, when the production is lowered or stopped and the outdoor temperature is higher. Load shifting: Assuming demand elasticity, the load is shed based on costs and availability of loads as long it is recovered at a later point in time. Flexible loads and processes in industry are typically: heat and cooling processes, inert diffusion processes, mass transport and logistics [11,44]. Load shifting is enabled to provide flexibility to the buildings and is modeled as a lossless storage unit. As shifting a production process from the original production schedule is an inconvenience, the demand is shifted at a cost for the building: 0.4 and 1.2 NOK=kWh ½ for B1 and B3 6 . The available load reduction in a time step t is 10% of peak demand and the maximum amount of shifted load is four times the available load reduction. The period the loads can be shifted and recovered is during work hours for B1 and 24 h for B3. 6 Electric vehicle parking lot: A storage unit, representing EVs parked at an employee parking lot with V2G technology, is serving flexibility for B2. The parking lot is assumed available for all interested employees at the industrial site, and around 600 cars are parked during work hours. According to Statistics Norway, EVs constituted 5.1% of the Norwegian passenger car stock in 2018 [46]. Hence, the assumed number of EVs are 30 7 . The aggregated ''storage unit" of EVs is based on: Nissan Leaf, Volkswagen e-Golf and Tesla S [48]. These lithium-ion (Li-ion) batteries have capacities of 24-60, 24-36, and 60-100 kWh, respectively. As a result, the nominal storage capacity for all the EVs are set to 50 kWh, with a round-trip efficiency of 96%. The charging time and battery power rates are also dependent on the charger technology, which again is dependent on the available voltage level. The voltage level at the industrial buildings is 400 V, hence semi high-speed EV chargers of 20 kW with one hour charging are assumed for the parking lot. The storage unit of EVs is available during work hours, which are weekdays from 8 am to 4 pm. When the EVs arrive for work the average storage level is assumed to be 60% of nominal capacity. A survey of Norwegian households with EV, performed by Saele et al. [49] in 2018, states that 70% of the households normally charge their EV at home and only 21% daily at the office. For that reason, the average minimum amount of stored electricity in the EVs at the end of a workday is set to 70% of nominal capacity. Assuming the EV owners in average increases the storage level 10% during a workday and are willing to make their EV available for V2G services. However, human behavior and the value of end storage level are advantageous areas for further work regarding EVs and V2G, as they pose hard constraints on the model. Shared battery storage: The storage is modeled as a Li-ion battery. The nominal storage capacity is 1 MWh, with a roundtrip efficiency of 96% and a preferable SOC interval 20-90% (explained in Section 3.2.3). Further, the battery inverter size is typically matched to provide the nominal power of the battery, thus set to 333.33 kW with an efficiency of 98%. The initial storage level is set to the minimum SOC while the final storage value is not specified. For simplicity, some assumptions are made regarding the storage characteristics, such as no degradation, constant efficiencies and no stand-by-losses.

Electricity prices
A prominent part of the market designs and rules are defining the various electricity prices, both for exchange with the grid and local prices.

Grid electricity prices
As described in Section 3.2.1, the total cost of grid electricity for an industrial prosumer consist of three parts: Buying electricity: The market spot price is set by Nord Pool (Northern European electric power exchange market [50]). The hourly day-ahead spot prices for the area of Trondheim are employed 8 . Note that northern spot prices are trending towards higher and more fluctuating prices [51], which might contribute to increase the value of on-site flexibility and P2P electricity trading. Local grid utility tariff: The tariff for industrial consumers is set by the local network company, which in central Norway is NTE Nett AS. The buildings are subject to a large consumer utility tariff, where the related data are as follows; fixed term 1234.25 NOK=mo, energy term 0.0424 NOK=kWh and power term 70 NOK=kWp=mo [52]. Revenues from surplus power: Prosumers have the opportunity to sell excess power from DERs. With the prosumer agreement, described in Section 3.2.1, this revenue depends on the sales agreement between the prosumer and the chosen energy supplier. Prosumers usually receive the hourly area market spot price NOK=kWh ½ for feed-in electricity. Hence, the buildings receive the spot price for the electricity delivered 8 .

P2P prices
A reasonable price level for the P2P prices is between the grid consumption price and the grid feed-in price, to promote trading at local level [1,8]. Lüth et al. [7] argues that the P2P trade prices should reflect the willingness of each individual prosumer to pay for an extra unit of electricity, in other words the shadow prices of each prosumer. For that reason, the P2P trade prices are set to the willingness to pay for each building in the Reference Case, with no possibility to trade locally or use the shared storage. Which is analogues to the clearing price method of Abbaspourtorbati et al. [54], where the dual prices of the energy balance equations are the clearing prices.
The P2P trade prices are calculated by minimizing the cost of electricity for each building in the Reference Case. The optimal solution provides a dynamic willingness to pay, i.e. the shadow prices, for each individual building in each time step. The fixed utility tariff cost is not included in the shadow price calculation, as the buildings have to pay this cost regardless of the grid consumption in time step t. Hence, it does not affect the willingness to pay. In peak demand periods the willingness to pay is high as the cost of increasing the monthly peak power is extensive, due to the peak power charge in the utility tariff.

Shared storage prices
The charging of the shared battery storage should be compensated. The revenue a building receives when charging the shared storage should be equal to the price for electricity delivered to the grid. Thus, the charging price is set to the market spot price, where the buildings receive the price for the power leaving the building, i.e. before local network losses.
The discharging of the shared storage is priced according to the individual building willingness to pay, i.e. the individual building P2P prices, and an additional fee. This fee is added to avoid simulations charging and discharging by the same building, i.e. unfavorable price arbitrage, and to incentive P2P trade. The fee is set equal to the charging price. As a result, the discharging prices are dynamic individual prices for each building.

Reference case
The supply-demand decisions in the reference case are obtained at each individual building, without P2P collaboration or shared flexibility within the industrial site. In other words, the building DERs (PV, CHP, EV and load shift) are optimally scheduled to supply the individual building demands, with grid consumption covering the remaining electricity demand. At the event of excess power from DERs, the power is sold to the grid or curtailed (i.e. above 100 kW). The results are summarized in Table 3 and the following are observed: Each building maximizes the self-consumption of its DERs and minimizes the grid consumption. Excess power mainly occurs during the summer in times of high solar irradiation on the PV systems. The amount of power sold to the grid is 110,346 kWh, while 15,711 kWh are curtailed as it exceeds the prosumer limit. Load shifting brings some degree of demand elasticity to B1 and B3. The feature is employed to shave the peak power demand and the load is rescheduled according to the spot prices. The EV fleet (storage) operations at B2 performs peak shaving, as well as price arbitrage based on the spot prices. However, the total building demand for B2 experiences an increase due to the hard constraints on the initial and final storage level of a workday. Consequently, the EV storage brings some flexibility to B2, though the building demand increases.
Note that in this study, as these real-life industrial buildings are assembled to represent an industrial site, all the actual demanded electricity (without DERs) would come only from the grid. For some of these buildings, this is the present situation, hence the total cost of electricity is 3.3 mill NOK and the total grid consumption 5.9 mill kWh, which are 28.8% and 35.3% higher than for the reference case (with DERs), respectively.

P2P case
The P2P collaboration case allows local electricity trade, in addition to the features of the reference case. The prosumers sell their DERs surplus or stored electricity in the local industrial site market. Similarly, the system operation minimizes the total amount of electricity consumed from the grid. Each building consumes their own DER generation and then covers any remaining demand by buying the next cheapest electricity available in the market, thus from peers or the grid. Consequently, the day-to-day system operation and electricity source dynamics and procurement of each building varies. Fig. 2 presents the supply-demand decisions of a summer week in June 2017, illustrating how each building covers its demand, operates DERs and trades. Based on these figures and results, we highlight the following observations: 8 Nord Pool's historical data are open and available for all [53]. P2P trade reduces grid consumption and coordinates flexibility for the site. The EV storage of B2 is used more rapidly, due to price arbitrage operation by the whole industrial site based on the spot prices. The recharging power peaks at the end of the workday are covered by P2P trade, hence these grid power demand peaks are shaved. The industrial site performs price arbitrage in terms of buildings consuming extra power from the grid in low-price periods, up to the optimal peak power of the given month, and trades with peers. The traded power shaves the power peaks of peers, with the large peak demand charge in the grid utility tariff as the key driver, i.e. P2P trade covers a great share of the peaks.
The figures show how the industrial site collaborates using P2P trade to cover the building demand and shave power peaks during the summer. The buildings with times of generation surplus, thus buildings with installed PV systems: B1, B4 and B5, export the most P2P electricity. B2 and B3 imports most of the P2P trade, as mainly price takers with the highest willingness to pay. As this illustrative week has a good supply from the PV systems, the P2P trade primarily consist of surplus power from DERs. The generation varies across seasons, and the amount of grid consumption instead of P2P exchange are higher in periods of less local generation. Note that the model engages in social welfare maximization (linear optimization by minimizing total system costs) for the industrial site as whole, which affects the P2P power exchange. The reason is that the industrial site main goal is to keep the monthly peak power for each building as low as possible, due to the large cost of the peak demand charge. Making it optimal for a building to consume extra grid power, up to its monthly power peak, to help a peer shave its peak (e.g. B3 in Fig. 2). In short, based on Table 3 results, this case provides the following added value to the site: The grid consumption is reduced 1.9%, while the total cost of grid consumption is reduced 7.5%. As the industrial site is more flexible to act on price signals and to shave peaks. The cost of peak power is reduced 15% and the total highest peak is shaved 99 kWp due to P2P trade. No DER power is curtailed and the grid feed-in is reduced 67%. The total system savings by the introduction of P2P trade is 159,751 NOK (6.8%).

P2P + shared storage case
The second collaboration case includes a shared battery and P2P electricity trade. The market rules and prices are the same as for the P2P case, in addition the prosumers can utilize the shared storage according to local charging compensation and discharging prices. The storage charges from prosumers excess DER power and additional procurement from the grid. The results of the yearly system operation for each building are slightly different in this case. The individual supply-demand decisions of each building in the same summer week are presented in Fig. 3, with the following main observations: The shared storage covers the building demand mainly to shave peaks and reduces grid feed-in. P2P trade and the shared storage reduces the grid consumption and make the industrial site more flexible. The monthly grid consumption peaks are significantly reduced for each building throughout the year.
The figures illustrate how P2P trade and the shared storage cover building demand and shave power peaks in the industrial site. The supply-demand patterns changed, where B2 and B3 contribute with more P2P electricity export. This is viable for B3 in this week, where the building consumes extra grid power for trading to peers. Also, as part of system cost minimization approach, the building with the lowest discharging price tends to discharge a large amount in a time step and trade this power to peers. Hence, the overall system performs price arbitrage and shave peaks. Based on Table 3 results summary, this case provides the following added value to the site: The grid consumption and total grid cost are reduced 2.1% and 12.0%, respectively. Hence, the industrial site has become considerably more flexible to exploit dynamics of spot prices and to shave peaks. The cost of peak power and the total highest peak are reduced 25.6% and 275 kWp, respectively, due to the shared storage and P2P trade. The grid feed-in is now reduced 87.1% from the reference case, thus near all DER generation is employed locally. The amount of P2P trade is increased 54,331 kWh from the P2P Case.
The total system savings by introduction shared storage and P2P trade are 257,596 NOK (11%). Compared to the P2P Case, this represents additional savings of 97,845 NOK (4.2%).

Evaluation of the buildings benefits and cooperation
As the demand and DERs features vary among buildings, the total cost of electricity also varies for each building. The proposed local market cases define rules for the collaboration within the industrial site. With different degree of flexibility and production, the benefits of engaging in such a joint community differ among the buildings. For prosumers to cooperate in P2P trading there must be an incentive to join the community. As such, the benefits of each single prosumer counts, as well as the overall benefits of the industrial site. To evaluate the participation willingness and to see what provides the most benefit to whom, the total cost of electricity is evaluated per building in each case. Table 4 presents the total cost of electricity and savings compare to the reference case for each building. The total cost of electricity is decreased for all buildings in both cases, with distinctly  While for the P2P + Shared storage case, savings are more evenly distributed among the buildings, with a minimum of 7.0%. As primary a price taker, EV storage holder by day and consumer by night, B2 sees large savings in both collaboration cases. B4 has the most excess production and sees the largest savings, due to no curtailment, favorable local trade and peak shaving. Further, the PV owners, B1, B4 and B5, profits to a great extent from implementing the shared storage in the market. The buildings obtain benefits due to P2P import and export leading to price arbitrage, peak shaving and increased self-consumption, overall making the industrial site more flexible. Zhou et al. [8] and Long et al. [1] defines a participation willingness, which measures the percentage of the prosumers who obtain more benefits after participating in P2P collaboration. The participation willingness measures the proportion of the prosumers who have lower cost of electricity compared to only procuring from the wholesale market. Seeing that all buildings have lower costs in both cases, all buildings obtain benefits with P2P trade and have an incentive to participate in the industrial site collaboration. see Table 5.
The economic viability of the shared storage is an important aspect of the P2P + Shared Storage case. Compared to the P2P case, the industrial site only needs to invest in the shared storage to realize the proposed market design. In 2019 the cost of Li-ion batteries was estimated to approximately US$190 to $140 per kWh, with the market outlook of the cost falling below US$100 per kWh by 2024 [55][56][57]. Based on the results in Table 3 and net present value (NPV) calculations, the shared storage will cover its investment costs at the price of US$140 per kWh with an assumed interest rate at 5% and lifetime of 20 years [55]. Alternatively, a smaller battery with lower capital cost, would approximately achieve a break even point at 0,9 MW installed capacity at today's prices. Hence, even though batteries are still not affordable, this case shows that its value might already cover a significant part of the investments.

Sensitivity analyses
Compared to the reference case, the introduction of P2P trade leads to savings for the industrial site and each building in both cases. To investigate the main drivers for the results, the following sensitivity analyses are performed for the cost of electricity 9 : 9

Applying market spot prices from different Nord Pool price areas
The spot prices in the price-area Trondheim are relative flat compared to the prices in Sweden (SE1), Finland (FI) and Denmark (DK1) [53]. With more volatile RES penetrating the energy portfolio and increasingly linkage to the European power market, the Norwegian spot prices are expected to become more fluctuating in the near future. Therefore, in order to simulate the near future scenario and evaluate the spot prices effect on the optimal solution, system analysis have been carried out using DK1 market spot prices.
Simulation observations could be summarized as: (a) With higher and more volatile spot prices, the total system costs are increased for DK1 market price compared to the Trondheim results. (b) The total P2P export is increased for both collaboration cases, as more price arbitrage is performed with P2P trade. Hence, the buildings consume extra grid power in periods of low prices to trade to peers, exploiting the volatile spot prices. (c) The total amount saved by implementing P2P electricity trade and the shared storage are close to unchanged. Consequently, the system is already minimizing the grid usage by employing the available on-site flexibility with the Trondheim spot prices. (d) With the DK1 prices, the system operation is evidently changed in several time steps, namely the times of negative prices. When the spot prices are negative it is economically attractive to consume as much power from the grid as possible, without exceeding the buildings optimal highest peak of the given month, and sell it to peers, shared storage or back to the grid in the same time step. The first two events are not system efficient, while the third is not possible in real life as grid feed-in has to come from DERs. As a result, the total amount of P2P electricity trade and grid feed-in are considerably increased in both collaboration cases, along with the shared storage usage in the second case.

Increasing the peak power charge in the utility tariff
The peak power charge at today's level constitute an extensive cost for the industrial site. For this reason, the industrial site operates the DERs, shared storage and P2P trade to shave power peaks as much as possible in all cases. In order to evaluate the effect of the peak power charge on the system operation and total costs, simulations are carried out. Fig. 4 shows the system sensitivity in each case to a gradually percentage change in the peak power charge c g;peak , from the initial value to a 50% increase. Fig. 4a presents the yearly cost of the peak power and the peak power demand in February. Further, the total electricity cost and total P2P export for the whole year are shown in Fig. 4b.
The following insights can be extracted from Fig. 4: (a) The peak power demands in February are almost constant, which also were the result throughout the year. This confirms that the optimal system operations already shave the building peak powers as much as possible with today's peak power charge. Hence, all the on-site flexibility and collaboration are operated to shave the power peaks. (b) The total cost of peak power increases for each case. For a 50% increase in c g;peak , the total cost of peak power are increased 50.00%, 49.96% and 49.92% for the cases, respectively. Hence, the increases are close to directly correlated, which are expected due to the previous observation. (c) The total electricity cost is strongly affected by the peak power charge, where the total costs increase linearly. For a 50% increase in c g;peak the total system costs are increased 21.8%, 19.9% and 18.2%, respectively. (d) With an increase of 50% in the peak power charge, the total cost saving of a pure P2P electricity trade implementation is 236,214 (8.3%) compared to the reference case. In the P2P + Shared storage case the total cost saving is 387,871 (13.6%). (e) The amount of electricity exported to peers are increased 4.7% and 2.3% in the two collaboration cases with a 50% increase in the peak power charge.

Conclusions
In this paper, the value of P2P electricity trading in combination with various on-site generation and flexibility resources are investigated for a Norwegian industrial site. Two local market designs are proposed, with the objective to minimize the total cost of electricity for the industrial site. An additional scope has been the system operational impact of the utility tariff peak power charge in combination with P2P electricity trading.
The results reveal that P2P electricity trading is able to bring substantial economic benefits to the industrial site, as well as to the individual customers. With yearly net savings for the whole industrial site of 6.8% and 11.0% in the P2P case and P2P + Shared storage case compared to the reference case, respectively. As such, all buildings have a willingness to participate. The selfconsumption is considerably increased with the local P2P trading, with no DER power curtailment and a reduction in grid feed-in of 67.0% and 87.1%.
Further, it is demonstrated that using P2P electricity trading for peak shaving purposes are highly beneficial. The total cost of peak power is reduced 15.0% in the P2P case and 25.6% in the P2P + Shared storage case, with the substantial peak power charge as key driver. As a result, peak shaving is by far the largest contributor to the net cost savings. The shared storage enables a large further increase in peak shaving compared to the P2P case.
Note that in this study, as these real-life industrial buildings are assembled to represent an industrial site, all the actual demanded electricity (without DERs) would come only from the grid. For some of these buildings, this is the present situation, hence the total cost of electricity is 3.3 mill NOK and the total grid consumption 5.9 mill kWh, which are 28.8% and 35.3% higher than for the reference case (with DERs), respectively. These values signify the importance of potential future investments (in terms of either DER installation or participation in P2P market) toward the energy independence strategies for industrial consumers.
Further, the simulations reveal how the results are driven by the centralized solution method, in terms of minimizing the total cost of the whole industrial site. With the extensive peak power charge as the key driver, the centralized solution method incentives buildings to procure extra grid power for P2P trading, i.e. one building consuming extra power from the grid to trade to a peer in the same time step. Hence, the industrial site goes to great lengths to keep the monthly peak power of each building as low as possible. In addition, the buildings due not necessarily trade with the highest bidder, but with the peer that minimizes the cost for the whole industrial site. It should be noted, the participation willingness in Section 5.4 show, however, that all buildings obtain benefits and have a motivation to participate in the industrial site collaboration. The results and findings are also highly relevant for residential communities, as the utility tariff for residential buildings is currently moving towards an inclusion of a peak power charge.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.