0093-9994 (c) 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI 10.1109/TIA.2019.2909496, IEEE Transactions on Industry Applications Ancillary Services in the Energy Blockchain for Microgrids M.L. Di Silvestre 1 , P. Gallo 1,2 , M.G. Ippolito 1 , R. Musca 1 , E. Riva Sanseverino 1 , Q.T.T. Tran 1,3 , and G. Zizzo 1 1 Engineering Department - University of Palermo, Italy 2 CNIT - Italy 3 IES - Institute of Energy Science, Vietnam Academy of Science and Technology Abstract—The energy blockchain is a distributed Internet protocol for energy transactions between nodes of a power sys- tem. Recent applications of the energy blockchain in microgrids only consider the energy transactions between peers without considering the technical issues that can arise, especially when the system is islanded. One contribution of the paper is, thus, to depict a comprehensive framework of the technical and economic management of microgrids in the blockchain era, considering, for the first time, the provision of ancillary services and, in particular, of the voltage regulation service. When more PV nodes are operating in the grid, large reactive power flows may appear in the branches. In order to limit such flows, a reactive optimal power flow (R-OPF) is solved, setting the voltage at the PV buses as variables within prescribed limits. Each PV generator will thus contribute to voltage regulation, receiving a remuneration included in the transaction and certified by the blockchain technology. For showing how this system can work, a test microgrid, where some energy transactions take place, has been considered. For each transaction, the R-OPF assigns the reactive power to the PV buses. The R-OPF is solved by a Glow-worm Swarm Optimizer. Finally, the paper proposes a method for remuneration of reactive power provision; this method, integrated into the blockchain, allows evaluating the contribution to voltage regulation and increases the transparency and cost traceability in the transactions. The application section shows the implementation of a Tendermint-based Energy trans- action platform integrating R-OPF and the above cited technical assessments. Index Terms—Transactive energy; energy blockchain; dis- tributed generation; P2P; Optimal reactive power flow; Glow- worm Swarm Optimization. I. I NTRODUCTION T HE advent of transactive energy as one of the most relevant technologies in the Gartner Hypecycle [1] and the birth of several startups around the bitcoin technology [2] for crypto-currency show that the interest around the possibility of managing certified transactions on the Internet, without the need of a trusted third-party entity, is raising more and more. Some recent microgrid projects in New York city in the Brooklyn district, based on the blockchain technology for managing energy transactions, are setting the prerequisites of a new energy system [3]. This new energy system is based on distributed generation (DG), energy trading between neighbours, and a different role of distribution utilities as we have known them up to now. What appears to be disruptive in the energy sector is the strong reduction of time for managing the economic transactions and the possibility to set free from central authorities. Although this movement is currently largely being triggered by startups, utilities are catching up in these energy blockchain applications and are starting joint ventures and cooperations [4], [5]. The basic value that new companies show to potential customers and investors is quite similar to that of initiatives in the bank sector. Any need for an intermediary between two parties disappears: switching to a decentralized energy system, detaching the related financial transactions from a centralized control unit, is undoubtedly another important step towards a full decentralization of the electricity sector. For now, however and still in this paper, the authors are envisaging an evolutionary role for the Distribution System Operator (DSO), the end users and the energy vendors. Many companies have recently set up energy exchange platforms between buyers and sellers. As an example, the Dutch company Vandebron [6] gives the possibility to buy directly from producers. In this example, there is still a central party that manages the network, does the billing and makes sure production and consumption stay balanced. In principle, in microgrids, decentralized regulation could offer the oppor- tunity to manage effectively the blockchain technology for en- ergy transactions. However, the strong physical limitations and constraints (voltage limits, cables ampacity, etc.) reduce the realistic possibility of energy exchanges between prosumers. The main contribution of this paper is, thus, to depict a clear and comprehensive framework of the technical and financial management of energy distribution networks in the blockchain era, considering, for the first time, the provision of ancillary services and, in particular, of the voltage regulation service. Two features of the blockchain that distinguish it from other technologies, such as databases, are transparency to users and immutability. As every transaction is added to the ledger, every end-user taking part to the platform can monitor and trace back all transactions. No other market provides such transparency about its transactions without further information-sharing costs for participants in almost real time. In the paper, the blockchain is considered as enabling technology for providing shared voltage regulation services to a microgrid. In the problem for- mulation, reactive power support, essential for reducing energy losses and eventually flattening voltage profiles, is carried out acting on P-V buses. Active power injections, instead, being the object of the energy transactions, are assumed as fixed at the generation buses according to the transactions running in