Peer-to-Peer Transactive Computation–Electricity Trading for Interconnected Virtual Power Plant Buildings

: Advancements of the virtual power plant (VPP) concept have aggregated buildings as their power plants and/or service providers. This paper proposes a peer-to-peer transactive computation– electricity trading framework for multiple-building virtual power plants (BVPPs). In this framework, the interconnected BVPPs can proactively trade their available computation–electricity with each other. Multiple BVPP trading is an intractable optimization problem due to its strong computation– electricity decision-making couplings. Thus, the original problem is described as a game theoretic problem and resolved into the sequential subproblems of social computation–electricity allocation and payoff allocation. By considering the local decision-making of heterogeneous BVPPs, a fully distributed algorithm is further designed to optimize the trading problem by sharing only limited trading information. Finally, a three-BVPP system is used to verify the merits of system resource utilization and operational economy.


Introduction
Approximately 33% of global greenhouse gas emissions and 40% of global energy consumption come from commercial buildings.To reduce energy consumption costs, facades and rooftops carry generated energy from photovoltaic thermal systems (PVT) and wind turbines (WT) as close to the consumer as possible [1].A potential pattern that has never been seen before, the virtual power plant (VPP), is opened by combining battery energy storage (BES) and renewable energy sources (RESs).By aggregating heterogeneous distributed RESs, cloud-based VPPs can achieve the aims of demand-side options for load reduction, trading or selling power on the electricity market, enhancing power generation, and so on.A few years ago, the complexity of doing this was seemingly impossible.However, advancements in the VPP concept have aggregated buildings as their own power plants and/or service providers [2].
By enabling buildings as their own power plants, building virtual power plants (BVPPs) can obtain potential benefits by transforming from a cost center to a profit center [3].In America, there are over 3000 utilities with 5.9M buildings that have the potential to install 145 GW of solar, which is sufficient to power 28M homes [4].The expectation of BVPPs originally made each building owner turn into its own power producer, producing unprecedented free-market competition in power markets in a way that was impossible to achieve previously.To provide a wide range of environmentally friendly and high-quality energy services to local end-users, multiple networked BVPPs are emerging as strategic efforts by leveraging the limited resources shared.
In recent years, many scholars have investigated the peer-to-peer trading of BVPPs.A large amount of work has been developed to consider the peer-to-peer market clearing problem.These methods can be mainly sorted into three types: game theory-based models, contract/auction-based models, and structure-based models.For game theory-based models, many methods are proposed in peer-to-peer trading problems among BVPPs to allot the trading quantity and price of each BVPP.In [5], a Nash bargaining game-theory-based peer-to-peer transactions model is proposed for EV charging stations and the distribution system operator.The role of individual prosumers is endogenously determined via a generalized game-theoretic model in [6].A non-cooperative peer-to-peer energy-sharing framework is proposed in [7] to realize an economical and sustainable building community.In [8], a stochastic leader-follower game is applied to a peer-to-peer energy-sharing framework.For the second category, in [9], the authors propose a multi-round double auction by considering the average pricing mechanism.To build the relationship of peer-to-peer trading between BVPPs, a bilateral contract is developed in [10].For the aim of determining efficient energy allocation and the uniform trading price for both the seller and the buyer, an iterative uniform-price auction mechanism is developed in [11].For structure-based models, some optimization techniques are used to study the peer-to-peer trading of BVPPs.Physical structures, such as energy-communication [12], distribution network [13], multigrade energy [14], etc., are introduced to accommodate practical applications.Advanced information technology, such as blockchain [15], the Internet of Things architecture [16], etc., are introduced to facilitate private and accurate management.However, existing methods have mainly studied the economical mechanism design of peer-to-peer electricity trading, and few works involve coordinated peer-to-peer multiple resources trading.
Centralized optimization approaches are adopted in [2,9] with a central entity to coordinate BVPP multi-resource trading.Indeed, the BVPP system is worked by self-interested entities/managers, which heterogeneously seek profit preferences.This centralized operation may generate many shortcomings, such as long distances to individual operators, inefficient energy management, high bandwidth required for exchanging geographic information, and so on.Meanwhile, centralized optimization may face some challenges for BVPP peer-to-peer trading, such as heavy computational complexity for large-scale problems, single-point fault, privacy disclosure, low computational efficiency, etc.It can be predicted that the BVPP system will be distributed in a manner that will fulfill the growing demands of geographically distributed end-users.
To meet the privacy demand of individual BVPPs, distributed optimization approaches are widely used in existing works.The alternating direction method of multiplier (ADMM), as a typical distributed optimization approach, has been widely utilized in peer-to-peer electricity trading.In recent years, many variants of ADMMs have been proposed to accommodate computational complexity.To achieve sharing energy balance in the building community, conventional ADMM is used in [8,12].Note that when implementing the distributed algorithm, the exchange of information is extremely important.To hedge against unreliable communications, a distributed robust algorithm is proposed in [13] based on relaxed-ADMM.To guarantee a satisfactory convergence performance, acceleration operator [17] and sequential second-order cone programming [18] are introduced.Other distributed optimization approaches, including enhanced benders decomposition [19], analytical target cascading [20], multi-agent deep deterministic policy gradient algorithm [21], etc., are also designed for peer-to-peer multi-resource trading.
A distributed transactive computation-electricity trading framework is proposed for multiple BVPPs.The key contributions in this paper can be featured as follows:

•
Different from [13,20], which only considers electricity trading, this paper aims to spread electricity trading to computation-electricity trading.A transactive peerto-peer computation-electricity trading framework is developed for interconnected BVPPs.Based on this framework, internal computation-electricity allocations within each BVPP and the external multilateral computation-electricity trading among networked BVPPs can be effectively coordinated.As a result of proactive computationelectricity trading, locally available resources of resource-rich BVPPs are encouraged to be traded to resource-deficient BVPPs, which enhances system resource utilization and operational economy.

•
The proactive peer-to-peer computation-electricity trading process among interconnected BVPPs is modeled as a theoretic game model.While only electricity is involved in [5][6][7][8], the electrical game is envisioned as the computation-electricity game and the fair sharing of trading benefits can be guaranteed.Then, by utilizing Nash's axioms, the model can be resolved into the subproblem of social computation-electricity allocation and payoff allocation.

•
Decomposed peer-to-peer computation-electricity trading subproblems are decentralized to the BVPP-based decision-making level and can then be solved iteratively using fully distributed approaches.As such, it can reduce the computational complexity of the coordinated peer-to-peer trading problem and requires only a limited number of trading information exchanged between neighboring BVPPs.

Distributed Computation-Electricity Trading Framework
With the advent of the cloud era and big data, multiple geographically distributed data centers are employed [2].Due to the geographically distributed characteristic, the computation resources of the geodistributed BVPP system may meet many challenges: computation-intensive end-user devices, limited computing resources, spatiotemporal distribution, and so on.In addition to obtaining data from BVPP components for global coordination, computation resources are required among BVPP operators to exchange vital boundary information.Abundant opportunities for proactive demand response programs are provided with the rapid development of advanced emergence and proliferation of advanced smart meters.This would bring enormous burdens of communication and computation on energy-intensive communication devices.It is necessary to co-optimize the computation and electricity resources of BVPPs since computation resources play important roles in system operation.In centralized, layered, and distributed frameworks, reliable communication is inherent for cost-efficient systems and resource-efficient operations.
The N interconnected BVPPs that are geographically distributed are shown in Figure 1.WT, PVT, and BES are equipped within each BVPP to condition local solar-wind renewables to fulfill electricity demands.The deployment of advanced metering infrastructures and smart meters allows BVPPs to enter the electricity market.Thus, BVPPs can be operated as price-takers and allow end-users flexible loads to take part in demand response programs.Based on the management of the control center (the interconnection layer between the data center and the geographically distributed BVPPs), locally available computation-electricity resources can be fully utilized by BVPPs, thus achieving efficient resource management.
networked BVPPs can be effectively coordinated.As a result of proactive computation-electricity trading, locally available resources of resource-rich BVPPs are encouraged to be traded to resource-deficient BVPPs, which enhances system resource utilization and operational economy.

•
The proactive peer-to-peer computation-electricity trading process among interconnected BVPPs is modeled as a theoretic game model.While only electricity is involved in [5][6][7][8], the electrical game is envisioned as the computation-electricity game and the fair sharing of trading benefits can be guaranteed.Then, by utilizing Nash's axioms, the model can be resolved into the subproblem of social computation-electricity allocation and payoff allocation.

•
Decomposed peer-to-peer computation-electricity trading subproblems are decentralized to the BVPP-based decision-making level and can then be solved iteratively using fully distributed approaches.As such, it can reduce the computational complexity of the coordinated peer-to-peer trading problem and requires only a limited number of trading information exchanged between neighboring BVPPs.

Distributed Computation-Electricity Trading Framework
With the advent of the cloud era and big data, multiple geographically distributed data centers are employed [2].Due to the geographically distributed characteristic, the computation resources of the geodistributed BVPP system may meet many challenges: computationintensive end-user devices, limited computing resources, spatiotemporal distribution, and so on.In addition to obtaining data from BVPP components for global coordination, computation resources are required among BVPP operators to exchange vital boundary information.Abundant opportunities for proactive demand response programs are provided with the rapid development of advanced emergence and proliferation of advanced smart meters.This would bring enormous burdens of communication and computation on energy-intensive communication devices.It is necessary to co-optimize the computation and electricity resources of BVPPs since computation resources play important roles in system operation.In centralized, layered, and distributed frameworks, reliable communication is inherent for cost-efficient systems and resource-efficient operations.
The N interconnected BVPPs that are geographically distributed are shown in Figure 1.WT, PVT, and BES are equipped within each BVPP to condition local solar-wind renewables to fulfill electricity demands.The deployment of advanced metering infrastructures and smart meters allows BVPPs to enter the electricity market.Thus, BVPPs can be operated as pricetakers and allow end-users flexible loads to take part in demand response programs.Based on the management of the control center (the interconnection layer between the data center and the geographically distributed BVPPs), locally available computation-electricity resources can be fully utilized by BVPPs, thus achieving efficient resource management.Using power lines and communication lines, distributed BVPPs can be cyberinterconnected.In this regard, networked BVPPs can compose a peer-to-peer trading group since the connected lines could be considered as the boundaries of the BVPPs.The mutual interactions of computation-electricity resources make these resources increasingly and intensively coupled.For example, during rush hours, a BVPP can receive many demand response requests, and its data center may seek computation resource assistance from surrounding data centers.In this paper, the main purpose is to optimize the computation-electricity trading behaviors among BVPPs cost-optimally, and locally available resources of resource-rich BVPPs are encouraged to be traded to resource-deficient BVPPs.The geo-distributed BVPPs here guarantee the supply-demand balance of the individual BVPP, and they can interact with each other BVPP through two-way communications over k time slots.

Computation-Electricity Allocations in Individual BVPPs
(1) Electricity procurement: BVPPs can buy electricity P buy,k,n from the electricity market with the electricity price µ buy,k , selling extra electricity P sell,k,n back to the distribution system operator with a feed-in tariff contract µ sell,k .The cost of electricity purchase C grid,k,n is presented as follows: where P buy,max and P sell,max are maximum power purchased and sold, ∆K is the time slot, and K is the overall scheduling period.
(2) Thermal Power Generation: As a traditional power generation system, thermal power units convert chemical energy into electricity by burning fossil fuels.The output of thermal power units requires us to guarantee the following constraints: where P Th i,k,n denotes the actual output of the thermal unit i at time k; P Th i,n,min and P Th i,n,max are the minimum and maximum output of the thermal unit i; u i,k,n is a binary variable, which presents the stop/start state of the thermal unit; R d i,n and R u i,n are the ramp-down and ramp-up power for the thermal unit i.Note that when P Th i,n,min is larger than R d i,n , (5) will make all the shutdown thermal power units fail to start.As such, (5) is rewritten as: where R u i,n,max and R d i,n,max , respectively, represent the maximum downhill and climbing speed of the thermal power i.To simplify, The startup and shutdown of the thermal power unit must be maintained for a period of time to prevent damage caused by frequent actions.Thus, k+TO−1 where TS and TO indicate the minimum shutdown and startup time of the unit; C D i,k,n and C U i,k,n , respectively, represent the cost of shutdown and startup of unit i at time k; J i and H i indicate the unit cost of shutdown and startup of unit i.The thermal power unit cost function is presented as a quadratic function C Th,i,k,n (P Th i,k,n ), which is related to the output electrical power of the power unit: where a Th,i , b Th,i , and c Th,i indicate the coefficients of the quadratic function.
(3) Power Flexible Loads: Electric fans with adjustable speed and LED lights with adjustable brightness are typical power flexible loads [22].With the advent of advanced information technology, these smart devices can be controlled via APP (iOS and Android) or remote control.In this case, the power consumption P p f ,k,n of these loads is adjustable within the rated power range.
where P p f ,n,min and P p f ,n,max indicate the minimum and maximum power.Additionally, to implement the expected work hours, the operational time of power flexible load P p f ,k,n is required.As such, the lowest working value P n,exp must be guaranteed by the following operational constraints: (4) Time-Flexible Loads: The wash and cleaning appliances in a BVPP (e.g., dryer, dishwashing machine, vacuum cleaner, and washing machine) are typical time-flexible loads.Nowadays, robotic vacuum cleaners have more contributions than others, which makes this popular appliance scheduled by demand-response programs.In this case, these appliances' working times can be arranged while the power consumption P t f ,k,n of these appliances is not adjustable.It means that they can operate on rated power P t f ,0,n , as presented in the following constraint: where u t f ,k,n is a binary variable, representing the state of the appliance.
A single time slot is not enough to fulfill the task.For example, to clean all dishes, washing machines need a long time.This type can be separated into two sub-types by considering the working/resting time sequences: time-continuous/discontinuous appliances.For the latter appliances, the operation state can be switched to ON/OFF while the overall running time guarantees the preset working value mm n : Different from the above appliance, the appliance which is time-continuous must continuously work to achieve the preset working value m n : (5) Temperature Flexible Loads: Heating load, including spacing heating, heating, ventilation, and air conditioning (HVAC), is a typical temperature flexible load.A common feature of these appliances is that the operational temperature can be adjusted according to the man-made setting.R-C thermodynamics have been extensively used to govern temperature changes, which are jointly decided via outside temperature, supply air temperature of HVAC, etc.The supply air temperature of HVAC directly determines the energy consumption of the temperature flexible loads.
Consider the single-area thermal network shown in Figure 2, where the red frames indicate the walls of the building.An R-C thermal network is developed to describe the thermal dynamic of the building climate by representing heat storage as thermal capacitance and heat transfer as thermal resistance.The thermal potential nodes are connected through thermal capacitors to the ground and thermal resistors to the contiguous nodes [23].The peripheral wall node is interconnected with the outside air node via two-series resistance R W,i /2 and R out,i .The internal wall nodes are interconnected with a zone node via two series resistors with resistances R W,i /2 and R in,i .As window mass is much less than wall mass, its thermal capacitance can be ignored.The window i can be modeled as pure resistance R win,i , which is parall with the thermal resistance of its wall.
where R W,i , R out,i , and R in,i represent the thermal resistance of wall i (i = 1, 2, 3, 4) for conduction heat transfer, external convective heat transfer, and internal convective heat transfer; R wall value and R glass value indicate the R-value of wall and glass window; R out value and R in value , respectively, indicate the R-value of external surface film and internal surface film; A i W and A i win , respectively, represent the total area of wall i and the total area of window i.
The state space expression of Figure 2 is expressed as: where C Z,1,n = c a m a,1 is the thermal capacitance of zone 1 and C W,i,n = c w m w,i is the thermal capacitance of wall i (c w and c a are the specific heat capacity of wall and air; m a,1 and m w,i are the air mass in zone 1 and the wall mass); T S,1,n is the supply air temperature of HVAC entering zone 1; T W,i,n and T Z,1,n are the temperature of wall i and zone 1; T out is the outside ambient temperature; . m Z,1,n is the mass flow rate of air entering zone 1 (airflow); . Q 1 rad is the internal heat gain (from electrical devices, etc.) in zone 1; . Q 1 rad is the solar radiative heat flux density that radiates into node 1; 1 win is the glass transmissivity of window in zone 1; α 1 W is the solar radiation absorption coefficient.BVPPs can achieve demand response by setting HVAC temperatures to ensure reliable and safe operation, while elastic temperature regulation can deviate from its optimal temperature, resulting in discomfort costs C HVAC,k,n that deviate from their preferred temperature level T exp,n : where µ HVAC is the unit discomfort cost of temperature deviation.
node via two-series resistance . The internal wall no interconnected with a zone node via two series resistors with resistances . As window mass is much less than wall mass, its thermal capacitance ignored.The window i can be modeled as pure resistance , which is par the thermal resistance of its wall.
, where  (6) Electric Vehicles: Electric vehicle (EV) AC slow/DC fast charging is implemented and are defined via its maximum charging power.BVPPs deal with the EV charging mode reasonably according to the charging urgency.Charging stations arrange DC fast charging for EVs with high urgency, and ensure the charging results meet the expected state of charge when they travel.The charging urgency is defined as the ratio of maximum charging time to the duration of stay: where α i,n denotes the charging urgency of EV i; when α i,n ≥ 0.1, the charging of EV i is urgent, and DC fast charging is chosen; otherwise, AC slow charging is chosen; T i,n,A denotes the duration of AC slow charging from maximum power to expected state of charge (SOC) of EV i; T i,n,w represents the duration of stay of EV i, which is defined by daily travel time and daily return time; P EV,AC n,ch,max indicates the maximum charging power of AC slow charging pile; S i,n,b is the SOC at the time of the return of EV i; S i,n,e presents the expected SOC of EV i; Q n,e is the battery capacity.
While the daily travel time and daily return time of EVs are assumed to follow the standard normal distribution, the daily mileage and the expected SOC are assumed to follow the lognormal distribution [1,24].The SOC at the time of the return of EV i is calculated: where d i,n is the daily mileage of EV i, and w 100 is the consume electricity for 100 km of EV.
Using the Monte Carlo sampling method, the travel model (expected SOC, the arrangements of AC slow/DC fast charging) of EVs can be obtained from ( 22) and (23), which can be used to help arrange AC slow/DC fast charging.
Each EV only charges or discharges at the same time.The constraints of charge/discharge are present as follows: where µ EV,AC i,k,n,ch and µ EV,AC i,k,n,dis represent the AC slow charging and discharging state of EV i, respectively; µ EV,DC i,k,n,ch and µ EV,DC i,k,n,dis represent the DC fast charging and discharging state of EV i, respectively; y AC i,n and y DC i,n denote the charging method of EV i, e.g., EV i is DC fast charging when y DC i,n = 1 and AC slow charging when y AC i,n = 1; T F is the set of free time of EV.The power constraint of EV is presented as follows: where P EV,AC n,ch,max and P EV,AC n,dis,max denote maximum AC slow charging and discharging; P EV,DC n,ch,max and P EV,DC n,dis,max denote maximum DC fast charging and discharging.The ramp constraint of DC fast charging is as follows: where P EV,DC n,sub is the ramp power.The constraints of SOC are presented as follows: where S i,k,n represents the actual SOC of EV i at time k; S i,n,max and S i,n,min indicate the upper and lower bound of SOC of EV i; P EV i,k,n is the actual power of EV i charging at time k, positive when charging and negative when discharging; S i,n,TS is the SOC at the travel time of EV i.
The battery degradation cost C EV,b,n is presented as follows: where λ EV is the unit degradation cost.(7) Battery Energy Storage: Frequent charging P BES n,k,ch and discharging P BES n,k,dis of BES leads to a certain degree of wear.The degradation cost of a battery, C BES,n , can be calculated as follows: where µ BES indicates the unit cost of average/amortized degradation.The constraints limiting the SOC and BES charging/discharging are presented as follows: represent the charging and discharging state of SOC.(8) Data Center: Different from the simple strategy of first-come, first-served queuing, the concurrent process of BVPP data centers is adopted for executing multiple tasks synchronously.The data center would decide whether to process the data load from the network requests in each time period.When the data load is to be executed, it is allocated to the server and sent back to end-users after completion.Otherwise, it will enter the waiting queue.Such proactive data center demand-response has remarkable strengths in the following aspects: (1) Flexible load balancing: BVPP supply-demand fluctuates, and the data load arriving time is centralized.By fully taking into account available resources and data load, data center buildings can perform flexible demand-response for renewable energy accommodation.
(2) Cost-effective responsiveness: At the expense of a certain degree of user satisfaction, the allocation of processing servers and resources can be quickly adjusted to accommodate the pricing/incentive signals.
The energy consumption of BVPP data centers is close to the ratio of the server's work/idle.Here, the number of servers is used to describe the resource capacity of BVPP data centers and quantify the corresponding energy consumption.
Constraints (33) limit the standby server for the data load.
where L i,k,n is the number of occupied serves; D n is the maximum number of serves in BVPP data centers; q n indicates the standby server ratio of BVPP data centers.Constraint (34) limits the resource allocation of computing in parallel.
where S DT,i,n,min and S DT,i,n,max are the minimum and maximum assigned serves; I i,k,n is the processing status of data load, i.e., 0 is not processed and 1 is processing.Constraint (35) indicates that when the ith data load can be accomplished without being delayed or within the present time, u i = 0.
where A DT,i,n is the data load; u i,n is the accomplishing status of data load by assigned servers, i.e., u i,n = 1 indicates that the data load i cannot be accomplished within the required time.u i,n = 0 means that the data load i can be accomplished without being delayed.Constraint (36) limits the data load i is handled timely under the present time and quits the queue to desert the server resources.
Constraint (37) indicates that no server would be assigned when the data load i has not arrived in the data center yet.
Constraint (38) limits the processing data load number that needs to be equated to the total data load number.
Obviously, when the number of assigned servers is larger, the corresponding IT energy consumption is larger simultaneously.The energy consumption of IT equipment P IT,k,n can be described as follows: where l n is the ratio of the idle to peak energy consumption, and c k,n can be calculated as the ratio of the assigned servers to the total number of serves: The data center energy consumption L DC,k,n in a BVPP includes IT energy consumption P IT,k,n and energy consumption of the ancillary equipment P A,k,n : Here, the definition of power usage effectiveness (PUE), which is reflected in the ratio of the total energy consumption to IT energy consumption, is introduced as follows:

Peer-to-Peer Computation-Electricity Trading among BVPPs
It is essential for multi-BVPPs to trade computation and electricity, which can improve the operational economy and resource utilization.Each BVPP here could consult with other networked BVPPs for the computation-electricity trading number T r,k,n,na and the corresponding payment C r,k,n,na .In the multi-BVPP system, electricity and data center servers are two types of trading resources and are simply defined as "p" and "u".The computation-electricity trading and the corresponding payment among BVPPs must guarantee the following constraints of market clearing: C r,k,n,na + C r,k,na,n = 0 r = p, u.
Each BVPP has its own balance constraints: where η HVAC is the electrical-thermal efficiency, and P PVT,k,n and P WT,k,n are outputs of PVT and WT.The amount of server D n includes the occupied server ∑ i L i,k,n , the idle server L f,k,n , and the used server T u,i,k,n,na for trading: The total energy consumption L DTtot,k,n of BVPP data centers includes the individual energy consumption L DT,k,n and the energy consumption T s,k,n,na incurred from trading: In this case, constraints (33), (35), and (38) are rewritten as follows: The purpose of each BVPP operator is to minimize the total operating cost of individual BVPPs' C non,n , including the power purchase cost C grid,k,n , generation cost ∑ N Th i=1 C Th,i,k,n , discomfort cost of users C HVAC,k,n , and battery degradation cost of EV C EV,b,n and BES C BES,n : (51)

Proposed Solution Methodology
The peer-to-peer computation-electricity trading ( 1)-( 11) of BVPPs cannot be solved easily via standard commercial solvers since there are computation-electricity couplings, conflicts of interests, etc. Technical parameters and multiparty operating states are required when performing coordinated peer-to-peer computation-electricity trading.Nevertheless, geodistributed BVPPs are generally not governed by only a single entity/manager.Therefore, this paper first develops a transactive bargaining framework to promote mutually beneficial trading among BVPPs.Then, the computation-electricity trading problem is decomposed into multiple BVPP-based decision-making level subproblems, which can be solved iteratively using a fully distributed algorithm with only limited information sharing.

Cooperative Bargaining
BVPPs can determine sharing amounts and methods, which is the original meaning of cooperative bargaining.A bargain problem between two-person includes: (1) A feasibility set F, a usually assumed convex closed subset of R 2 that is often assumed to be convex, the elements of which are explained as agreements.
(2) A disagreement, or threat, point d = (d 1 , d 2 ), where d 1 and d 2 are the payoffs to players 1 and 2. If these two players cannot reach a mutual agreement, they are guaranteed to receive the payoffs.
When the agreements in F are preferable for both parties to the disagreement point, the bargaining problem is nontrivial.For the bargaining problem, one solution is to select an agreement in F. For the properties desired for the final agreement point, there have been many solutions proposed based on slightly different assumptions.In [25,26], certain axioms that the solution should be satisfied were proposed by John Forbes Nash Jr.That is, invariant to equivalent utility representations, symmetry, independence of irrelevant alternatives, and Pareto optimality.It has been shown that the solutions satisfying the above axioms are just the points in F that maximize the expression: where u i and d i (i = 1, 2) are represented as the payoffs from the disagreement point of two players; U is a set, which is convex feasibility, and the elements of U can be explained as agreements; the product of the two excessive benefits (u 1 − d 1 )(u 2 − d 2 ) is usually called the Nash product.
Self-interested BVPP operators negotiate via mutually beneficial agreements with each other, which makes both players more advantageous than the disagreement points.Each BVPP would bargain with other BVPPs for the computation-electricity number and the corresponding payment.The extra defrayment C T,n to other BVPPs is calculated as follows: Then, the overall cost C tot,n of BVPP n can be calculated as follows: For each operator, it is rational to improve its computation-electricity utilization by implementing cost-optimal computation-electricity trading.It is certain that every BVPP will not cooperate if their cost cannot be reduced.
where C * wt,n is the disagreement point.It presents the minimum value of the C non,n , which is obtained for BVPP n without trading computation-electricity with other BVPPs.
The proposed computation-electricity trading problem can be presented as follows: For problem (55), the involved decision variables could be separated into two decoupled sets: computation-electricity allocation and trading payment.Therefore, the computation-electricity trading problem (55) is equally resolved into two subproblems: social computation-electricity allocation (56) and payoff allocation (57): where C * non,n is the optimal value obtained from the subproblem (56).
Proof: For the provided optimal computation-electricity allocation decisions, the optimal trading payment decisions from subproblem (57) are calculated as follows: By substituting (18) into problem (15), the optimal objective yields Thus, it is proved that the social cost of all BVPPs in subproblem (56) can be minimized via problem (55).By solving subproblems (56) and (57) sequentially, optimal computationelectricity trading solutions can be obtained.
The proof is completed.

Model Reformulation
For the aim of computation complexity reduction, the nonlinear building model ( 20) is linearized around this equilibrium point where the system is working most of the time.Due to the small temperature range, this linearization does not introduce significant errors [23].Then, the state-space-based linear building model is discretized: where x k,n is the state vector, representing the node temperature; y k,n is the system output vector; u k,n represents the controllable HVAC input.
For nonlinear constraints (36) and (49), the so-called big-M method is utilized by selecting the relatively large value M n and small value m n : where M n and m n represent the relatively large and small parameters.

Distributed Algorithm
The couplings of subproblems ( 56) and ( 57) are the computation-electricity trading constraint (43) and the corresponding payment constraint (44).To protect information privacy, a fully distributed algorithm is developed to solve the decomposed subproblems, which are shown in Algorithm 1.It can be found that distributed self-interested BVPPs optimally maximize their profit and share necessary trading information with surrounding BVPPs.
As binary variables are introduced, the convergence, existence, and uniqueness of the problem (55) can be guaranteed: (1) the bargaining problem has inherent Pareto efficiency and convexity properties in nature [25,26]; (2) some binary variables can be eliminated based on optimization techniques.For example, it was proved in [23] that charging/discharging variables would always be mutually exclusive since the product of charging/discharging efficiency is less than 1; (3) after several iterations, the binary variables will no longer change, coercing the minimum value of the problem gradually to approach the feasible region.The details of this proof can be found in [27].1: Set the parameters of energy generation, electricity demand response appliances, and storage of the multi-BVPP system 2: Provide iteration index it = 0 and tolerances δ 1 and δ 2 .Initialize Lagrangian multipliers y t , y c , and step size d y , d c 3: Combine local constraints (1)-( 42) and ( 45)-( 53) and the following Lagrangian function for objective (56); each BVPP solves the social electricity allocation subproblem in parallel.
4: Calculate and check whether the residual is less than the preset tolerance: Once it is satisfied, the iteration stops.Otherwise, each BVPP updates its y t : y it+1 t,r,k,n,na = y it t,r,k,n,na + T it+1,aver r,k,n,na .5: Set the iteration index to it = it + 1, and repeat steps 3 and 4 for each BVPP until the conditions for stopping are guaranteed.6: Combine with local constraints (54) and the following Lagrangian function for objective (57); each VPP parallelly solves the payment bargaining subproblem: 7: Calculate and check whether the residual is less than the preset tolerance: Once it is satisfied, the iteration stops.Otherwise, each BVPP updates its y c : Set the iteration index to it = it + 1, and repeat steps 6 and 7 for each BVPP until the conditions for stopping are guaranteed.

System Description
In this section, a three-BVPP system is used to prove the effectiveness of the proposed distributed transactive electricity trading methodology.The schematic diagram of the BVPP system is given in Figure 1.The feed-in price is given as 0.01 $/kWh, and the related electricity price is obtained from [28].The parameters of base energy consumptions, storages, and generations of three BVPPs are obtained from [1,2,22].
To verify the effective and superior performances of the proposed methodology, three comparative schemes with different trading schemes are given as follows: (1) Scheme 1 presents the proposed distributed transactive multi-resource trading in Sections 2 and 3; (2) Scheme 2 presents the distributed transactive multi-resource trading without considering the server trading; (3) Scheme 3 presents the multiple BVPP scheduling without considering the multiresource trading.
The computation-electricity trading is performed every 1 h over a 24 h period, which also can be directly applied to other time scales according to the actual requirements.

Performance Comparison
The daily computation-electricity trading curves among BVPPs in schemes 1 and 2 are shown in Figures 3 and 4, respectively.For schemes 1-3, the electricity purchase and server utilization of BVPPs in schemes 1-3 are drawn in Figures 5 and 6, respectively.From Figures 3 and 4, it can be found that all three BVPPs trade the computation-electricity resources interactively with each other across the 24 h operation horizon.The renewable outputs of BVPP 3 during hours 1-12 are relatively higher than BVPPs 1 and 2. Thus, BVPP 3 sells its excessive energy to BVPPs 1 and 2. Since the renewable power supply suddenly dropped in hours 11-24, BVPP 3 has to purchase electricity from the other two BVPPs.
Note that although extra payments are required for the electricity trading among BVPPs, the trading enables renewable accommodation instead of electricity selling back to the electricity market.Thus, BVPP 2 in scheme 1 purchases less electricity from the market than other schemes, decreasing its operating costs.
are shown in Figures 3 and 4, respectively.For schemes 1-3, the electricity purchase and server utilization of BVPPs in schemes 1-3 are drawn in Figures 5 and 6, respectively.From Figures 3 and 4, it can be found that all three BVPPs trade the computation-electricity resources interactively with each other across the 24 h operation horizon.The renewable outputs of BVPP 3 during hours 1-12 are relatively higher than BVPPs 1 and 2. Thus, BVPP 3 sells its excessive energy to BVPPs 1 and 2. Since the renewable power supply suddenly dropped in hours 11-24, BVPP 3 has to purchase electricity from the other two BVPPs.Note that although extra payments are required for the electricity trading among BVPPs, the trading enables renewable accommodation instead of electricity selling back to the electricity market.Thus, BVPP 2 in scheme 1 purchases less electricity from the market than other schemes, decreasing its operating costs.When the computation resource is shortage in some BVPPs, the computation resource-rich BVPP 1 can trade its server to surrounding computation resource-deficient BVPPs 2 and 3. Thus, the data processing capability of the BVPP system can be improved.As shown in Figure 6, in schemes 2 and 3 without computation trading, the computation in BVPP 2 stays at a high utilization in hours 12-16.In scheme 1, the average computation utilization of BVPPs 1 and 2 are reduced by offloading requests to the surroundings.When the computation resource is shortage in some BVPPs, the computation resource-rich BVPP 1 can trade its server to surrounding computation resource-deficient BVPPs 2 and 3. Thus, the data processing capability of the BVPP system can be improved.As shown in Figure 6, in schemes 2 and 3 without computation trading, the computation in BVPP 2 stays at a high utilization in hours 12-16.In scheme 1, the average computation utilization of BVPPs 1 and 2 are reduced by offloading requests to the surroundings.In schemes 1-3, the storage outputs of three BVPPs are shown in Figures 7 and 8 is not hard to find that, the proposed methodology in scheme 1 can achieve optimal sy ergies of internal computation-electricity allocations within each BVPPs and the exter multilateral computation-electricity trading among networked BVPPs.While BES and charging during morning and noon hours, abundant renewable generations are the m energy sources for energy supplies.There is a sharp decrease in renewable generatio during the hour 17-24, and the BES in scheme 1 rapidly increases to meet the rising mands.In scheme 3, batteries stay undercharged during hours 11-14 and provide an a ditional inverse discharging.When the computation resource is shortage in some BVPPs, the computation resourcerich BVPP 1 can trade its server to surrounding computation resource-deficient BVPPs 2 and 3. Thus, the data processing capability of the BVPP system can be improved.As shown in Figure 6, in schemes 2 and 3 without computation trading, the computation in BVPP 2 stays at a high utilization in hours 12-16.In scheme 1, the average computation utilization of BVPPs 1 and 2 are reduced by offloading requests to the surroundings.
In schemes 1-3, the storage outputs of three BVPPs are shown in Figures 7 and 8.It is not hard to find that, the proposed methodology in scheme 1 can achieve optimal synergies of internal computation-electricity allocations within each BVPPs and the external multilateral computation-electricity trading among networked BVPPs.While BES and EV charging during morning and noon hours, abundant renewable generations are the main energy sources for energy supplies.There is a sharp decrease in renewable generations during the hour 17-24, and the BES in scheme 1 rapidly increases to meet the rising demands.In scheme 3, batteries stay undercharged during hours 11-14 and provide an additional inverse discharging.In schemes 1-3, the storage outputs of three BVPPs are shown in Figures 7 and 8.It is not hard to find that, the proposed methodology in scheme 1 can achieve optimal synergies of internal computation-electricity allocations within each BVPPs and the external multilateral computation-electricity trading among networked BVPPs.While BES and EV charging during morning and noon hours, abundant renewable generations are the main energy sources for energy supplies.There is a sharp decrease in renewable generations during the hour 17-24, and the BES in scheme 1 rapidly increases to meet the rising demands.In scheme 3, batteries stay undercharged during hours 11-14 and provide an additional inverse discharging.the peak hours 11-20 is higher.It can be found that the elastic loads of all BVPPs are shifted from on-peak time periods to off-peak time periods.For instance, during morning hours, more renewable energy is consumed and during on-peak hours, less electricity is purchased.
ing hours, more renewable energy is consumed and during on-peak hours, less electr is purchased.
The operating costs and the corresponding payments obtained with and with trading are listed in Table 1 for comparison.It is not hard to find that, the system opera cost with the computation-electricity trading is decreased by up to 8.78%.In detail, e BVPP benefits through computation-electricity trading by considering the cost and ment influences.It is because that profit seeking BVPPs deliver their power to other BV rather than selling back to the electricity market.The operating costs of all BVPPs h been decreased by 8.98%, 2.25%, and 15.64% compared with scheme 3, which verifies effectiveness and superiority of the proposed scheme.The best values in these tables are highlighted in bold.
The detailed comparisons of the operating costs, electricity procurement, battery deg radation costs, thermal power unit cost, and discomfort costs in schemes 1-3 are provided in Table 2.It can be found that scheme 1 can satisfy daily electricity supply demand bal ance and data processing with less power purchase compared with schemes 2 and 3. Com The operating costs and the corresponding payments obtained with and without trading are listed in Table 1 for comparison.It is not hard to find that, the system operation cost with the computation-electricity trading is decreased by up to 8.78%.In detail, every BVPP benefits through computation-electricity trading by considering the cost and payment influences.It is because that profit seeking BVPPs deliver their power to other BVPPs rather than selling back to the electricity market.The operating costs of all BVPPs have been decreased by 8.98%, 2.25%, and 15.64% compared with scheme 3, which verifies the effectiveness and superiority of the proposed scheme.The best values in these tables are highlighted in bold.
The detailed comparisons of the operating costs, electricity procurement, battery degradation costs, thermal power unit cost, and discomfort costs in schemes 1-3 are provided in Table 2.It can be found that scheme 1 can satisfy daily electricity supply demand balance and data processing with less power purchase compared with schemes 2 and 3. Compared with scheme 2, the cost of system operation of scheme 1 is reduced by 1.52%.As for the discomfort cost, the three schemes keep the same value, which means that the temperature of the HVAC is not affected by the computation-electricity trading.The best values in these tables are highlighted in bold.
Based on the above analysis, the method proposed in this paper can provide diversified renewable energy utilization paths through the synergy between storages.As a result of the peer-to-peer computation-electricity trading, BVPPs in schemes 1 and 2 tend to share their available demand response resources and storage to maximize renewable utilization.In a word, case studies confirm that the merits of the developed methodology on cost-efficient computation-electricity management, particularly on the enhancements of computation resource utilization and operational economy.

Conclusions
In this paper, a distributed transactive computation-electricity trading framework for the optimal synergies of heterogeneous BVPPs is proposed.The multiple BVPP computationelectricity trading problem has been decomposed into social computation-electricity allocation and payoff allocation subproblems.It could be found from case studies that: (1) As a result of proactive computation-electricity trading, locally available resources of resource-rich BVPPs are encouraged to be traded to the resource-deficient BVPPs with satisfactory payoff.(2) The proposed methodology achieves fully distributed computation-electricity trading by sharing only necessary information, therefore preserving the resource-autonomy and information privacy.(3) The proposed distributed transactive trading scheme can outperform others on system resource utilization and operational economy, which has huge development and application potentialities in urban/community building system.
Energy storage from BVPP can facilitate power system operation by providing various market-remunerated and regulated services including ancillary services, energy services, and capacity services.Market mechanisms and regulatory frameworks are two powerful

Figure 2 .
Figure 2. Schematic of the building thermal network.

R
, and in , i R represent the thermal resistance of wall i ( 1,2 i  conduction heat transfer, external convective heat transfer, and internal convect transfer; wall value R and glass value R indicate the -value of wall and glass window; R in value R , respectively, indicate the R -value of external surface film and internal

Figure 2 .
Figure 2. Schematic of the building thermal network.

Figures 9
Figures 9 and 10 present the daily electricity supply demand balance and the optimized electricity load curve in schemes 1 and 3. Though during hours 11-15 (solar energy) and hours 1-10 (wind energy), renewable generations are abundant, the electricity price during the peak hours 11-20 is higher.It can be found that the elastic loads of all BVPPs are shifted from on-peak time periods to off-peak time periods.For instance, during morning hours, more renewable energy is consumed and during on-peak hours, less electricity is purchased.

Figures 9
Figures 9 and 10 present the daily electricity supply demand balance and the optimized electricity load curve in schemes 1 and 3. Though during hours 11-15 (solar energy) and hours 1-10 (wind energy), renewable generations are abundant, the electricity price during

Figure 9 .
Figure 9. Electricity supply demand balance of BVPPs in schemes 1 and 3.

Table 1 .
The results comparison of performance in schemes 1 and 3.

Table 1 .
The results comparison of performance in schemes 1 and 3.