Distributed ADMM Using Private Blockchain for Power Flow Optimization in Distribution Network With Coupled and Mixed-Integer Constraints

The optimization problem for scheduling distributed energy resources (DERs) and battery energy storage systems (BESS) integrated with the power grid is important to minimize energy consumption from conventional sources in response to demand. Conventionally this optimization problem is solved in a centralized manner, limiting the size of the problem that can be solved and creating a high communication overhead because all the data is transferred to the central controller. These limitations are addressed by the proposed distributed consensus-based alternating direction method of multiplier (DC-ADMM) optimization algorithm, which decomposes the optimization problem into subproblems with private cost function and constraints. The distribution feeder is partitioned into low coupling subnetworks/regions, which solves the private subproblem locally and exchanges information with the neighboring regions to reach consensus. The relaxation strategy is employed for mixed-integer and coupled constraints introduced in the optimal power flow (OPF) problem by stationary and transportable BESS because DC-ADMM convergence is only guaranteed for strict convex problems. The information exchange and synchronization between subnetworks/regions are vital for distributed optimization. In this work, both of these aspects are addressed by the blockchain. The smart contract deployed on the blockchain network acts as a mediator for secure data exchange and synchronization in distributed computation. The blockchain-based distributed optimization problem’s effectiveness is tested for a 0.5-MW laboratory microgrid for one hour ahead and day-ahead for the IEEE 123-bus and EPRI J1 test feeders, and results are compared with a centralized solution.


I. INTRODUCTION
Power distribution networks are being reshaped by the integration of distributed energy resources (DERs) and battery energy storage systems (BESS) [1]. These DERs, when used intelligently, can reduce our dependence on conventional energy resources and thereby decrease the generation cost to meet the demand [2]. The optimal power flow (OPF)economic dispatch problem [3] seeks to optimize the objec-The associate editor coordinating the review of this manuscript and approving it for publication was Dipankar Deb . tive of minimizing the total generation cost while satisfying the constraints imposed by the distribution network and device operating limits.
The OPF problem is challenging to solve because of the nonconvex feasible set and, hence, convex relaxation would ease the computation complexity [4]. The second-order cone program (SOCP) relaxation for the power distribution network is proposed in [5]- [9]. The SOCP relaxed OPF problem can be solved using any convex optimization solver. The authors of [10]- [12] have proposed algorithms for optimal power flow in power distribution networks with integrated BESS which are solved centrally. A centralized approach to solve the OPF problem in power distribution networks with a large number of integrated DERs and BESS is computationally challenging and exhibits poor scalability. A distributed optimization algorithm can address this challenge.
Several distributed optimization algorithms have been adapted and/or developed in recent years to solve the OPF problem, which decomposes the central problem into local subproblems. The algorithm in [13] is based on a dual decomposition method and in [14], [15] on the auxiliary variable method. The alternating direction method of multiplier (ADMM) [16], which is simultaneously general and scalable, is exploited in most of the recent research work to solve the OPF problem in a distributed fashion. The ADMM algorithm in [17], [18] solves the OPF problem, exchanging voltage information between the neighboring regions; however, DERs and BESS are not integrated into the test network. A full-scale distributed OPF is implemented using ADMM in [4], [19]- [23] in which participating nodes/controllers exchange information with the system or virtual aggregator to solve for the global update. The OPF problem with nonconvex feasible sets in [24]- [28] is solved using a decentralized algorithm in which a specific node communicates only with its adjacent nodes with no central or virtual aggregator. The authors in [26] discuss about the computation time and convergence of the algorithm and have not addressed the impacts and uncertainties of DER and energy storage integration, which is resolved in [27]. The algorithm proposed in [28] exchanges voltage and phase angle information with the neighboring microgrids to reach consensus and does not consider the impact of energy storage integration or consensus on active and reactive power flow between the interconnected microgrids.
In all the published work mentioned above, the microgrids or the distribution network partitions are considered static. In this work, the power distribution network is partitioned dynamically based on our previous work presented in [29]. The OPF problem for the distribution network partitioned into subnetworks is separable in which each subnetwork has a private cost function and private constraints. The need for a central/virtual aggregator to solve the separable distributed OPF problem is eliminated by implementing a distributed consensus based alternating direction method of multipliers (DC-ADMM) proposed in [30]- [32]. The DC-ADMM converges only for strictly convex problems. The mutually exclusive charging and discharging status of BESS introduces mixed-integer constraints to the OPF problem. The relaxand-fix (RF) heuristic algorithm discussed in [33]- [36] is employed for mixed-integer constraints that can be handled by DC-ADMM. The issue of DER and load curtailment is tackled by transportable BESS. The constraints for transportable BESS are coupled, which are decomposed, relaxed, and augmented into the objective function. The optimal route scheduling and connection stations for transportable BESS are already discussed in [37] and [38] respectively and not in the scope of this work. The blockchain-based technology is employed for direct and reliable exchange of information between the participating nodes or assets by establishing a secure and tamper-proof digital platform [39], [40]. The blockchain has been used in [22] to store the optimal schedule and to make automatic and secure payments.
The information exchange between the neighboring regions/nodes is essential to solve the distributed optimization problem as shown in Fig. 1. As discussed in [41], there are two kinds of communications infrastructure for information exchange: 1) centralized infrastructure and 2) distributed infrastructure. The supervisory control and data acquisition (SCADA) system is an example of centralized infrastructure, where local devices or remote terminal units (RTUs) send the data to the central controller and cannot exchange information among each other. The limitation of centralized infrastructure is that the fault in the central controller can halt the entire network. With the recent developments in internet of things (IoT) technology, the local controllers and RTUs can communicate with each other [42] and are an example of distributed communication infrastructure.
The main objective of this research is to implement an offline DC-ADMM OPF problem on a blockchain platform. The main contributions of this research work are as follows: 1) Presenting a day ahead dispatch strategy for a dynamically partitioned power distribution network using a DC-ADMM OPF algorithm. 2) A DC-ADMM and RF heuristic algorithm to solve the OPF problem with mixed-integer and coupled BESS constraints is proposed.
3) The proposed DC-ADMM-based OPF algorithm utilizes the blockchain network and smart contract to broadcast information to the neighboring subnetworks, enable synchronization between the local controllers of the subnetworks, and schedule transportable BESS to curb DER and load curtailment. The system/virtual aggregator or the global update is not needed in the proposed approach. Advanced distribution management systems could deploy smart contracts in existing utility grids. 4) The proposed DC-ADMM-based OPF algorithm is tested for the Alaska Center for Energy and Power (ACEP) 0.5-MW Power System Integration (PSI) VOLUME 9, 2021 Laboratory Microgrid [59] and IEEE 123-bus and EPRI J1 test feeders for scalability. The rest of the paper is organized as follows: Section II describes the formulation of the OPF problem, BESS model, blockchain, and smart contract. The DC-ADMM and RF heuristic algorithm implemented on the blockchain network are explained in Section III, followed by the test feeder network formulation in Section IV. The simulation results are presented in Section V. Section VI concludes the paper and discusses future work, followed by acknowledgments.

II. PROBLEM FORMULATION
In this section, we define an OPF problem for the power distribution network. The distribution network includes a substation node, renewable energy resources, customer-owned BESS, ISO-owned BESS, mobile BESS, fixed loads, and electric vehicles (EVs) as shapeable loads.

A. DISTRIBUTION NETWORK MODEL
The radial graph distributed network model := (N , ε) where N := {0, 1, 2 . . . , n} represents the set of nodes, and ε represents the set of distribution lines connecting these nodes in the network. N = 0 represents the root node, and the other nodes in N represent the branch nodes. For each node i, it has a unique parent node A i and a set of children nodes [4]. For each line that connects node i to its parent node A i , let z i = r i + jx i be the impedance of the line.
For each node i ∈ N , let V i be the complex voltage, v i = |V i | 2 , and s i = p i + jq i be the net complex power injection. Let I i be the complex current flowing from node i to parent node A i , l i = |I i | 2 , and S i = P i + jQ i be the complex power flowing from node i to child node C i . The branch flow model for this radial network is given by: where t = 1, 2, 3, . . . , T , and T = 24 h.

B. NETWORK CONSTRAINTS
The set of network components at a particular node i for time t is denoted as: The net active and reactive power injection at a particular node i is given by: The practical constraints for the DSG, including spinning reserve and prohibited operating zones, are defined in this subsection [43]. The power output and ramp rate constraints are: where p g i and p g i are the minimum and maximum generation limits of DSG at bus i, respectively, and DR i and UR I are down-ramp-rate and up-ramp-rate limits of all online DSG units, respectively. The spinning reserve constraints for DSG units on (N − ω) buses are: where p S R (t) is the distribution network spinning reserve requirement, η S R is the required percentage of spinning reserve, p S i is the spinning reserve contribution of the DSG unit on bus i, and p S i is the maximum spinning reserve contribution of the DSG unit on bus i.

2) CUSTOMER-OWNED BESS
The customer-owned BESS model considered in this research work is based on the dispatch strategy that maximizes battery utilization. The mixed-integer linear BESS model, which is dependent on charge and discharge cycle efficiencies and ignores losses as well as the degradation defined in [44], has the following constraints: are the minimum and maximum capacities of the BESS.

3) ISO-OWNED BESS
The ISO-integrated BESS is a viable and cost-effective solution to account for the variability and uncertainty of loads and renewable energy resources in the power distribution network. But the degradation and ohmic power losses in BESS are inevitable. The BESS model incorporating ohmic power losses is defined as, i + r cvt i is the sum of battery energy storage and associated converter resistance and, s cvt i is the maximum apparent output power of the converter. The degradation cost function of BESS in [45] is incorporated into the optimal power flow objective function and is given by: where a 1 , a 2 , a 3 ∈ R n p X 1 are plane parameters of n p triangles from the convex hull, E ISOb i (t) is the state of energy of ISO-owned BESS at time t, and c d is the degradation cost of the BESS whose optimal value is tabulated in [46].

4) WIND POWER GENERATION
The operational constraint for wind power is given by, where p wind i (t) is the actual utilization of the wind power and p wind i (t) is the available wind power at time t based on the forecast.

5) PV POWER GENERATION
The operational constraint for the PV power generating unit is given by, where p PV i (t) is the actual utilization of the wind power and p PV i (t) is the available wind power at time t based on the forecast.

6) TRANSPORTABLE BESS
The transportable BESS can be used as a nonspinning reserve, and its sizing is based on the criteria defined in [47] and [48]. The transportable BESS is also scheduled to minimize the curtailment of renewable energy resources and load shedding. The mixed-integer linear model of transportable BESS is considered in this research with the following operation and scheduling constraints.
i and E tb i are minimum and maximum capacities of the BESS.

7) ELECTRIC VEHICLE LOAD
The EVs with the energy demand E evl i have the following constraints, where the electric vehicle must be charged between t i,start and t i,stop . The EV batteries are only considered as load while charging and are not considered for grid operations in this research work because of degradation and reduction in their life cycle.

8) CENTRALIZED OPF AND SOCP RELAXATION OF NETWORK CONSTRAINTS
The thermal generator cost at the substation node is typically represented by a quadratic fuel cost function given by: where α, β, γ are the fuel cost parameter. The OPF problem aims at minimizing the thermal generation and battery degradation cost subject to branch flow equations and local DER constraints and is formulated as, The quadratic equality constraint in (1d) makes the above OPF problem nonconvex. The OPF problem can be relaxed to a convex problem by SOCP relaxation of (1d) given by, The binary variables in constraints (4c)-(4d) and (5g)-(5h) make OPF a mixed-integer problem and its relaxation is explained in the next section.

C. BLOCKCHAIN AND SMART CONTRACT
Blockchain is a prominent technology that provides a secure and distributed database that contains the log of transactions in chronological order. The digital users/nodes on this blockchain network communicate through the peer-to-peer (P2P) system to reach a consensus on the ledger's valid state. This is contrary to centralized systems, which need the central authority to act as the intermediary to maintain the database and transactions and guard its authenticity. Furthermore, the blockchain network's security is enhanced by hash functions and public-key cryptography and depends on the type of network (i.e., public or private network) [49]. Users can either join the public blockchain network or the private blockchain network. The trust among the users emerges from game-theoretical incentives in the public network with the permissionless ledger. The public network provides a tamperproof and censorship-resistant system. On the contrary, the private network with the permissioned ledger has reduced security but is fast, easy to scale, and energy-efficient [50].
The full potential of blockchain technology can only be utilized using smart contracts. The smart contract is a user-defined executable program that can alter the ledger and perform specific tasks when called upon by the users. The Ethereum is an open-source programmable distributed computing platform with smart contract functionality [51]. The distributed OPF algorithm proposed in this paper is developed on the private Ethereum network in which the smart contract is deployed to act as a mediator for secure communication between the local controllers and a scheduler. The workflow showing the interaction between the smart contract, local microgrid controllers, and distribution network components while solving the distributed OPF problem is explained in this work. The following two subsections explain in brief how blockchain can be implemented on IoT networks or traditional SCADA systems.

D. BLOCKCHAIN AND INTERNET OF ENERGY (IoE)
The integration of distributed energy resources and energy storage has made the power distribution network decentralized and bidirectional. Hence, the distribution network requires a distributed communication architecture where network components can exchange electricity among themselves so that the distribution is effective, autonomous, and without the central authority's involvement. This bidirectional and distributed communication can be achieved by the Internet of Energy (IoE). The IoE coordinates various network components with the help of the internet. However, the IoE technology faces many privacy and security issues that can be overcome by blockchain [52], [53].

E. BLOCKCHAIN AND SCADA
SCADA systems are an integral part of the power distribution network for automatic generation control and economic dispatch [54], [55]. A SCADA system comprises a centralized control center and associated field devices, local control modules, and RTUs. The central control center solves the optimization problem and dispatches the control signal to the network's field devices. As a result, the power distribution network with the existing conventional SCADA makes the entire network vulnerable to cyberattacks and control center faults. The blockchain-based end-to-end secure prototype for SCADA with smart RTUs linked with each other and the central control center by IoT cloud services is developed in [55], [56] for practical implementation.

III. DISTRIBUTED OPF PROBLEM FORMULATION
In this section, the distributed optimization algorithm based on consensus ADMM is presented to solve the OPF problem. First, the power distribution network is partitioned into several subnetworks/regions. After that, the general form DC-ADMM is described and then applied to solve the OPF problem. Once the solution method is established, the algorithm is implemented on the blockchain network.

A. POWER DISTRIBUTION NETWORK PARTITION
The power distribution network is initially partitioned by unnormalized spectral clustering analysis. Once the initial partitions are formed, the power distribution network is 46564 VOLUME 9, 2021 re-partitioned by the algorithm described in our previous work [29]. After the optimal partitions are achieved, the OPF problem is decomposed as explained in the next subsection.

B. DISTRIBUTED CONSENSUS-BASED ADMM (DC-ADMM)
A unidirected network denoted by := (N , ε), where N := {0, 1, 2 . . . , n} represents the set of nodes, and ε represents the set of edges connecting these nodes. The node i and j can communicate information only if (i, j) ∈ ε (i.e., node j is the neighbor to node i). Each node i ∈ N has a local objective function which is given by where x i ∈ R N is a local variable that is related to the local problem, and Ax = 0 implies that x i = x j for nodes i and j connected by an edge (i, j). The augmented Lagrangian function for the problem in (14) is given by where the dual variable u T i ∈ R N , and ρ > 0 is the penalty parameter. The iterations to solve the general form consensus ADMM problem mentioned in (15) is given by where ρ 1 and ρ 2 are penalty parameters, u ij is the dual variable with the constraints x i = x j on the edge (i, j) ∈ ε. Each node i keeps a local copy of decision variable x i ∈ R N and a vector of a dual variable u ji with j ∈ A i . The algorithm will stop when the following condition is met: where tol is the tolerance value of the residual.

C. DC-ADMM MODIFICATION FOR MIXED-INTEGER PROBLEMS
The optimization problems with integer or binary variables are nonconvex, and the convergence of those problems when solved using ADMM is not guaranteed. The mixed-integer problem (MIP) in this work is solved by the RF heuristic algorithm. The local subproblem for node i defined in (16) is an MIP for x z ∈ {0, 1} ⊂ x i . Initially to solve the MIP using RF, all the binary variables are relaxed (i.e., they can take any value between 0 and 1) defined as 0 ≤ x z ≤ 1. This makes the problem in (16) a convex quadratic problem for which the ADMM converges. Once the initial solution is obtained, a few variables are enforced to be binary variables, with the remaining ones relaxed. After finding the solution, the binary variables are fixed and another set of relaxed variables are enforced to be a binary variable. The process iterates until all the binary variables are fixed and a feasible solution is obtained. Once all the binary variables are fixed, the ADMM will converge because all the subproblems are convex.

D. APPLICATION OF DC-ADMM AND RF TO OPF
To solve the distributed OPF problem, the distribution network is partitioned into several subnetworks/regions, as explained in III-A. Now the OPF problem for the entire distribution network is reformulated to solve using the DC-ADMM based method so that each region needs to solve its local subproblem in each iteration. The local subproblem has its own objective function and set of constraints and is formulated for a particular region i as The local variables to solve the subproblem presented in (18b) for a particular region i is denoted by i ] and is not shared over the network. All the variables and constraints defined above are local except the constraints (1a)-(1c), (9a), and (9b). The equation in (9a) and (9b) is decomposed for a particular region i as where p tb−ch i (t) and p tb−dch i (t) are the local representation of the global variables p tb−ch (t) and p tb−dch (t), respectively, for a region i. The constraints (1a)-(1c), (19a), and (19b) are augmented in the objective function of the problem in (18b) and solved iteratively as The local coupling variable , ∀j ∈ C i will be shared with the neighboring subnetworks/regions as shown in Fig. 2.
The subproblem for region i defined in (20c) contains four binary variables , and χ ISOb−dch i for charging and discharging status, respectively, of the customer-owned and ISO-owned BESS. Initially, all four variables are relaxed and allowed to take any value between 0 and 1. This converts the subproblems in the convex quadratic problem and is solved until the acceptable tolerance of is achieved. After that, the variables for charging mode χ cob−ch i , χ ISOb−ch i are enforced to be the binary variables, and the OPF problem is solved until the tolerance is achieved or reaches the iteration limit. If the algorithm reaches the iteration limit with no feasible binary solution, the values of ρ 1 and ρ 2 are updated by 5% and warm start the OPF subproblem. In the last step, all the binary variables are fixed based on the condition in (21b), and the OPF problem is solved until it converges. The algorithm flowchart is shown in Fig. 3.

E. IMPLEMENTING THE ALGORITHM ON BLOCKCHAIN NETWORK
The private Ethereum blockchain network is used to implement the distributed OPF algorithm for the distribution network in this research work, and the block diagram is shown in Fig. 4. The go-ethereum client (geth) is used to run a full Ethereum node. Each node/user on the Ethereum network is assigned a personal account defined by a private and public key. Their address indexes these accounts derived from the public key. There are two types of Ethereum accounts: 1) externally owned accounts (EOAs) and 2) contracts accounts. The EOA is controlled by a private key and can transfer ether or trigger a contract code. The contract account has its own code and is controlled by that code. The  users/nodes interact with the Ethereum network by sending a transaction from an account using a web3 object that connects to a JSON-RPC server [57]. Upon establishing the Ethereum network to implement the DC-ADMM + RF for the OPF problem, an externally owned account indexed by address i is set up for every region i in the distribution network. The contracts account indexed by address is set up for the control center that deploys the smart contract (modeled in Solidity [58]) to the network. The address is shared with all subnetwork/regions i in the network to communicate with the smart contract.

IV. CASE STUDY
In this section, we discuss validating the centralized and proposed DC-ADMM + RF OPF algorithms using results from a 0.5-MW laboratory microgrid at the ACEP PSI laboratory with four control nodes and implementing the same for the IEEE 123-bus and EPRI J1 test feeder system.

A. ACEP PSI LABORATORY MICROGRID
The ACEP PSI lab operates on the same scale as one of Alaska's village power systems and can be modified for individual test scenarios. The PSI lab infrastructure includes a 320-kW diesel generator, a 100-kW wind emulator, a 540-VDC/1000 A-hr lead-acid battery, a 312-kVA inverter, and two 250-kW programmable load banks. The one-line diagram of the ACEP PSI lab is available in [59].

B. IEEE 123-BUS TEST NETWORK
The IEEE 123-bus test feeder used in this study consists of 114 branch buses and is partitioned into four regions, as shown in Fig. 5. The test feeder is also modified to a balanced network [60]. The nominal operating voltage of the test feeder is 4.16 kV. The DC-ADMM + RF optimization algorithm in (20c) and Fig. 3 is implemented for the partitioned IEEE 123-bus test feeder, where each region solves its local subproblem and exchanges information with the neighboring regions.
Region 1 is a root/reference bus, either a substation or thermal/diesel generator with a quadratic fuel cost function. Other regions consist of branch nodes with a deterministic load profile, rooftop PV, wind farm, electric vehicle load, customer-owned BESS, ISO-owned BESS, and transportable BESS. The shapeable loads and customer-owned BESS at each node are half the peak residential load. The storage capacity of customer-owned BESS is 6 hours. The ISO-owned BESS has a peak power of 150-kW with a storage capacity of 4 hours. The ISO-owned BESS are considered on bus 39 and 85. The transportable BESS has a peak power rating of 1,000-kW with a storage capacity of 2 hours.
The PECAN STREET project residential load data set from January 1 to June 30, 2017, is used in this research work [61]. The capacity of the rooftop PV installed at each house on branch nodes is 6-kW. The hourly 2017 NSRDB solar data [62] from January 1 to June 30, 2017, is used for the rooftop PV. The wind farm is integrated with the network at bus 85. The wind farm consists of 6 wind turbines rated at 235-kW, each with a pole height of 35 m. The hourly NREL Flatirons Campus data for a wind turbine from January 1 to January 30, 2017, is used for this work [63].

C. EPRI J1 FEEDER
The EPRI J1 test feeder has 3,434 buses, which serves approximately 1,300 residential, commercial, and light industrial customers via 58 miles of 12.47 kV primary line [64]. The feeder is modified to a balanced three phase network and is partitioned into seven regions as shown in Fig. 6 for this work. Region 1 is a substation, whereas other regions consist of branch nodes with residential, commercial, and light industrial load, residential rooftop PV, customer-owned large PV system, wind farms, electric vehicle loads, customer-owned BESS, ISO-owned BESS, and transportable BESS. The peak load of the entire feeder is approximately 6 MW. The shapeable load at each node with residential load is half the peak load. The 1.7-MW customer-owned PV system already exists on the feeder. Additionally, rooftop PV and customer-owned BESS rated 50% of each residential load's daily consumption are also considered in this research work. The storage capacity of customer-owned BESS is 6 hours. The hourly June 2012 solar data from EPRI [64] is used for PV. Two wind farms are integrated with the network, each consisting of 9 wind turbines. Each wind turbine is rated at 235-kW with a pole height of 35 m as in the IEEE 123-bus test feeder system. The hourly NREL Flatirons Campus data for a wind turbine from June 1 to June 30, 2012, is used for this work [63]. Four ISO-owned BESS rated with peak power 1,000-kW and storage capacity of 2 hours is also integrated with the network. The transportable BESS has a peak power rating of 1,000-kW with a storage capacity of 2 hours.

D. IMPLEMENTING THE TEST SYSTEM ON ETHEREUM NETWORK
The go-ethereum/Geth client is installed for running the ethereum node on the computer and is used to connect to the private ethereum network. Upon setting up the network, the smart contract to securely exchange the data with the neighboring regions for the DC-ADMM + RF OPF problem for the ACEP PSI lab, IEEE 123-bus, and EPRI J1 test feeder is developed and compiled in Solidity. The local subproblems are executed using Python and CVXPY. After solving the local subproblems, each region in the ACEP PSI lab, IEEE VOLUME 9, 2021  123-bus, and EPRI J1 test feeder communicates with the Ethereum network using web3.py.

A. ACEP PSI LAB
An hour-ahead centralized OPF algorithm was tested in the 0.5-MW ACEP PSI laboratory. The lab's real-time control strategy is based on spinning reserve control (SRC). The SRC maintains the loading on the diesel-electric generator between the minimum and maximum set points using the inverter to compensate for over or under loading conditions. The OPF algorithms were simulated for 1 hour with a time step of 2.5 minutes. The dispatch plan for the diesel generator and BESS and wind and load profile used for testing is shown in Fig. 7. The constraints for BESS to simulate the OPF problem for ACEP PSI lab are based on ISO-owned BESS defined in (5a) to (5i).
The comparison of centralized and DC-ADMM + RF OPF dispatch plan for the ACEP PSI lab model with the lab test results is presented in Table 1 and Table 2.
We can observe from Fig. 7, Table 1, and Table 2 the minimum generation from the diesel electric generator is 100 kW which was set to prevent wet stacking in the  diesel engine. The BESS discharges to the net load and charges from the excessive wind power. Also, there is a vast difference in the energy discharge from BESS between the OPF algorithms dispatch plan and lab test results. This difference is because, for the first half, the lab test was intentionally performed without employing any optimization strategy and only the diesel electric generator fed the loads while BESS remained idle. The dispatch plan generated for diesel generators and BESS is similar for DC-ADMM + RF with and without blockchain. The Table 2 also shows the difference in wind energy forecast and actual generation.

B. IEEE 123-BUS AND EPRI J1 TEST FEEDER
The centralized algorithm was tested using the IEEE 123-bus test feeder and the results are published in [44]. The comparison between the dispatch plan for the IEEE 123-bus test feeder generated using the centralized algorithm and DC-ADMM + RF with and without blockchain network is shown in Fig. 8 and Table 3.
We can observe from the results in Fig. 8 and Table 3 for IEEE 123-bus test feeder that the dispatch plan generated by DC-ADMM + RF with and without the communication over the blockchain network coincides with each other. The dispatch plan generated by the centralized algorithm is offset from the distributed algorithm, but the net generation/consumption over the 24-hour period is approximately similar. Hence, it is safe to assume that the proposed DC-ADMM + RF's performance quality is comparable to the standard centralized OPF algorithm. Fig. 8(c) shows that the customer-owned BESS responds to the demand and charges from the excessive solar and wind power generation. The ISO-owned BESS remains idle during certain hours and only responds when necessary to reduce the charge-discharge cycle and minimize the degradation cost. From Fig. 8(a), we can observe that there is a sudden rise in the wind power generation at hour 5, which charges the customer-owned and ISO-owned BESS. As a result, there is not enough energy storage available during the peak solar hours. The transportable BESS is scheduled to charge from excessive solar and wind generation, which reduces its curtailment. Also, the electric vehicles' charging schedule is generated for the peak solar and wind power generation hours.
The charge and discharge cycles for BESS are mutually exclusive, which makes the OPF problem mixed-integer. The proposed DC-ADMM + RF method in this paper solves the mixed-integer OPF problem, and the mutually exclusive charge and discharge cycles of the customer-owned and ISO-owned BESS for IEEE 123-bus test system are shown in Fig. 9. The negative values of active power represent the discharge cycle.
The algorithms are also tested for the EPRI J1 test feeder, and similar results were obtained. The comparison between the DC-ADMM + RF and centralized OPF results for the EPRI J1 test feeder is shown in Table 4.

C. COMPUTATION DETAILS
For the ACEP PSI lab, IEEE 123-bus, and EPRI J1 test feeder, the centralized OPF problem is simulated in a Python-based, open-source optimization modeling language, Pyomo, and the proposed distributed optimization algorithm is simulated using CVXPY.
The simulations are run on a Windows 10 PC with a 3.40-GHz Intel Core i7 processor and 16-GB RAM. The solver used and computation time for each OPF algorithm simulation are listed in Table 5. For the DC-ADMM + RF OPF, the subproblem for each region is computed sequentially. As seen from Table 5, the computation time to solve the DC-ADMM + RF OPF problem is reduced compared to the centralized one for the IEEE 123-bus and the EPRI J1 test feeder. Hence, the algorithm is scalable and will be able to handle much larger systems where centralized OPF will be computationally intensive.
For the DC-ADMM + RF on a blockchain network, the time taken to validate the transactions is approximately 125 seconds for the ACEP PSI lab model, 625.2 seconds for the IEEE 123-bus, and 1,560 seconds for the EPRI J1 test system. The validation time is significantly high because each node transacts with the network sequentially. In practice on edge computing devices, these transactions would be performed in parallel, providing speed up by the factor equivalent to the number of regions the power distribution network is partitioned and will be demonstrated in future work by setting up a node1 for each region on the blockchain network using Docker.
The penalty parameters ρ 1 and ρ 2 were initialized to a value of 3. The penalty parameters are updated by 5% if no feasible binary solution is obtained. The iteration limit to obtain the feasible binary solution to fix the binary variables is set to 30 and tolerance value tol = 1e − 4. The convergence results of DC-ADMM + RF for the IEEE 123-bus and the VOLUME 9, 2021 EPRI J1 test feeder are shown in Fig. 10. We can observe that the DC-ADMM OPF converges in 18 and 30 iterations for the IEEE 123-bus and the EPRI J1 test feeder, respectively, after the binary variables are fixed.
The algorithm is part of a resiliency application for fault-tolerant energy system (RAFTES), which is being developed to integrate with the open-source ADMS platform GridAPPS-D [65]. The GridAPPS-D will act as a contracts account and deploy and manage the smart contract on the private Ethereum network. The algorithm will subscribe to the GridAPPS-D topic to receive the forecast data for the DERs integrated with the power grid. A practical demonstration on the GridAPPS-D platform will be presented in future work.

VI. CONCLUSION
A DC-ADMM + RF algorithm was proposed for the OPF problem with mixed-integer and coupled constraints for an adaptive partitioned power distribution network. The proposed algorithm successfully fixes the mixed-integer/binary variable, and the DC-ADMM converges for the OPF problem. We demonstrate that the proposed algorithm results are comparable by testing it for the 0.5-MW ACEP PSI laboratory microgrid. We can also conclude that the results obtained for the IEEE 123-bus and EPRI J1 test feeder for the proposed algorithm are similar to the standard centralized algorithm and hence scalable. The computation time of DC-ADMM + RF is also reduced compared to the centralized OPF, and hence it can be concluded that the algorithm converged faster with reliable results. When implemented on the blockchain network, the proposed algorithm takes more time to validate the nodes, but it provides secure communication and synchronization between the subnetwork local controllers.
The proposed distributed algorithm in this research work is offline; therefore, its solution is applied to the physical grid only after it converges. In the future, we need to explore ways to reduce the computation time for distributed algorithms implemented on the blockchain network to be applied to realtime/online optimization and control.

ACKNOWLEDGMENT
The contributions to this research work were achieved in part through the Grid Modernization Laboratory Consortium (GMLC), a strategic partnership between the U.S. Department of Energy and the National Laboratories. The GMLC was established as part of the U.S. Department of Energy's Grid Modernization Initiative (GMI) to accelerate the modernization of the U.S. electricity infrastructure. This work was also authored [in part] by the National Renewable Energy Laboratory, operated by Alliance for Sustainable Energy, LLC, for the U.S. Department of Energy (DOE) under Contract No. DE-AC36-08GO28308. The views expressed in the article do not necessarily represent the views of the DOE or the U.S. Government. The U.S. Government retains and the publisher, by accepting the article for publication, acknowledges that the U.S. Government retains a nonexclusive, paidup, irrevocable, worldwide license to publish or reproduce the published form of this work, or allow others to do so, for U.S. Government purposes.