Transition towards a full self-suf ﬁ ciency through PV systems integration for sub-Saharan Africa: a technical approach for a smart blockchain-based mini-grid

.


Introduction
The access to electricity is a significant factor in human development. Nevertheless, there is an extreme undersupply of electricity in sub-Saharan Africa, where around 580 million people have no access to electricity [1]. In addition, electricity systems in this region often cannot provide a stable and reliable electricity supply and face problems like low efficiency and high costs. To provide electricity to smaller or remote communities, off-grid options such as mini-grids are required. Without such solutions, the commitment of universal access to electricity stated in the Sustainable Development Goals (SDGs) is unlikely to be reached [2].
Mini-grids are a stand-alone network of several electrical energy generators, storage devices and loads. Due to the mostly decentralized generation of electricity from renewable energy sources, decentralized network structures are often appropriate. Chemical energy storage devices in the form of accumulators are normally used due to the volatility of renewable resources. While a mini-grid typically has the capability of operating independently, a connection to the main national grid is possible. This connection can be switched on or off, following economic or technical reasons. Mini-grids are a proven way to reduce the costs of energy generation compared stand-alone generators. Investment as well as operation and management costs can be reduced by using available components more efficiently. Operational and management costs can be reduced due to the bundled installation and maintenance of components [3]. Current mini-grids as well as the main electricity grid are usually controlled by a central instance, responsible for metering and billing of the consumed electricity. This hinders the connections of existing solar home systems to mini-grids, particularly in the case when the solar systems belong to different persons or institutions. There are some approaches in the sub-Sahara Africa seeking to overcome these issues. However, none of them are tackling all of the abovementioned issues in one approach [4]. This paper proposes a novel technical solution for a smart decentralized mini grid to overcome the shortfalls of conventional mini-grids.

Case study: the don bosco solar training center in tema, ghana
On the premises of the Don Bosco Solar and Renewable Energy Training Center in Tema, Ghana, the power distribution connects thirteen buildings, forming the Don Bosco Ashaiman mini-grid. Eight of these building are consumers connected to the mini-grid. Five buildings have a total of 114 kWp photovoltaic (PV) generator power installed and are considered prosumers, a combination of producers and consumers. Three of these prosumers are equipped with a battery storage of 248 kWh in total. All the produced electricity is fed into the local mini-grid. A connection to the utility grid exists to ensure the operation of the mini-grid in times of low solar irradiance. The power storage is dimensioned for an autonomy of one night. A diesel generator is available as an additional safety measure, to provide electricity in case of grid outages during times of low solar irradiance. Currently the campus has an electricity self-supply rate of 85%. The operator's long-term goal is to be 100% self-sufficient. Possible measures to achieve self-sufficiency are an increased battery storage to raise autonomy time as well as the implementation of a smart mini-grid with an intelligent and fully automatic demand side management system. Figure 1 shows a campus map and the current mini-grid layout. 2 Towards a smart mini-grid The first step towards a smart mini grid is the collection of all relevant data within the network. In order to collect the relevant data one smart meter per building is required. Additionally, the installation of smart meters is necessary at all the six national grid connection points and at the available diesel generator, respectively. Due to the size of the campus, the data transmission from the smart meters to a data collection gateway must use wireless connections. Devices implementing the Zigbee protocol [5] are currently being tested for data communication. Direct transmission to a cloud computing service is a possible but not preferred option as prolonged outrages of the mobile phone network could affect the proper functioning of the mini-grid and its load management. It is required to have a secured local internet connection to run the blockchain nodes, the Application Programming Interface (API) servers and the Artificial Intelligence (AI) neural network. Therefore, controllers with deployed applications will be installed in three buildings: The Church, the Provincial House and the Power Room where a local network connection through WI-FI or GSM modem is possible.
The following section describes the conversion of the existing Don Bosco mini grid into a decentralised smart mini-grid.

Decentralized controllers
The controller is the key component of the smart mini-grid. It stores and executes all data, smart contracts and algorithms. The system architecture around the mini-grid controller including the API and the database is depicted in Figure 2.
The functionality of the mini-grid controller must be considered in two different cases. The functionality depends on whether it has an internet connection to communicate with cloud servers or not. The smart minigrid must be operational regardless of the internet availability.

Offline mode
In the offline mode, the connection to the cloud service depicted in Figure 2 is interrupted. In case of an unstable internet connection, all data must be securely stored locally. Furthermore, the controller must be able to maintain all functions of the mini-grid in the offline mode. Hence, it is the system's default mode. To provide the possibility to operate the network offline locally, each controller is running a blockchain node. Controllers store the data collected from the mini-grid and data related to energy management, sending it directly into the blockchain node with indexing. Indexing will help to query the data quickly and to have a real-time overview of the status of the network. As all controllers create a copy of blockchain ledger, the reliability of the blockchain algorithm is ensured.

Online mode
The online mode is an extra layer on top of the developed system architecture. In addition to the offline mode, it provides external access to the smart mini-grid network for users through the client application. Hence, a cloud gateway, API and database are required to run the system online. After the data has been evaluated on the blockchain node locally, the data is transmitted to the cloud database. The API server will synchronise the databases regularly in order to avoid too many calls to the internet.

Blockchain
Blockchain sees more and more use cases as a backbone technology for peer-to-peer (P2P) energy trading projects nowadays [6]. The goal of these is the creation of a decentralized, secured system with a highly scalable network as shown in Figure 3, to provide reliable and sustainable power [7]. With the smart mini-grid solution proposed in this paper, it is possible to track energy production and consumption precisely and transparently using an automated P2P energy sharing management tool. Blockchains combine concepts of P2P networks, asymmetric cryptography, decentralized computing, and smart contracts into a new technology platform [8]. The immutability and transparency of blockchain transactions play a critical role in the decentralized ecosystem architecture.

Decentralized governance
The here described smart mini-grid solution differs from a general mini-grid model in terms of its decentralization. All data created and used for energy sharing management will be stored in a distributed way, meaning that the network will contain several nodes and each node participating in the network receives and maintains a copy of the database, the blockchain ledger, synchronously.
An increased number of nodes participating in the network enhances data distribution as each node receives each transaction information. This pattern decreases the risk of data loss, which is critical for P2P energy network.

Immutability
One of the specific advantages of the blockchain is that the data can only be added, updated into the storage, but not deleted [9]. Every data update or change results in a new data production event which combines previous and new data into a block on the blockchain. Hence, existing data cannot be altered or deleted. Furthermore, historical data can be fully traced. By using this pattern, the data regarding power generation and consumption of each unit on the mini-grid can be verified, resulting in a high tamper resistance and trust between operators and users.

Smart contracts
Smart contracts are agreements in the form of executable programmes in the blockchain which provide a high degree of trust, due to their self-enforcing nature [10]. Smart contracts can replace the trusted third parties in an agreement [11] and thereby reduce transaction costs [12]. The utilisation of smart contracts can enact agreements for energy transfer processes, where important actors are usually located within different organisations [10]. With the smart contracts, the energy management platform can provide total automation of all business flows for users, such as buying power based on some conditions and stop buying if the conditions are not met.
Because all recorded transactions on the blockchain are time stamped, it is elementary to track changes and modifications on the blockchain in the past. The traceability of all records that exist on a ledger provide assurance and authenticity to all the participants on the network.

Artificial Intelligence
Artificial intelligence is one of the leading digital disruption technologies [13]. Together with blockchain and the Internet of Things (IoT) it is touted to innovate almost every industry [13]. Blockchain and AI are used e.g., to upgrade the traceability of logistics [14].
Blockchain combined with AI is playing a crucial role for creating much more efficient solutions. Both, energy providers and consumers can thus predict energy production and portfolio consumption inside the network. Artificial intelligence digital solutions play an integral role in predicting the aforementioned. Enabling a level of forecasting offers a solution that increases the accuracy of supply, demand and prices which is a prerequisite to improve energy infrastructure and automate consumption workflow.

Load management
An important pillar of a smart mini-grid is the load management, as the automatic control of appropriate electrical loads in a power network.
In a PV power system there is a shift between the power production at daytime and the consumption, distributed over the entire day and night. A battery storage is used to store excess solar energy produced during the day and to make it available to serve the loads during night time or when the power provided by the solar generator is not sufficient [15].
Through load management, the power consumption is shifted as much as possible into times of power production. The goal is to smooth the consumption curve, making the power production and consumption synchroneous as far as possible. Hence, there is a reduced need in storage capacity decreasing the overall system cost and the environmental impact.
The purposes of load management are: -Shaving of peak loads.
-Stabilization of the network frequency.
-Optimal use of fluctuating decentralized energy sources.
The prerequisites for this on the technical side are: -The presence of communication-capable and controllable loads. -A network of measuring devices that adequately describes the state of the mini-grid. -A fast and reliable network that distributes the information.
In order to optimise the system, the load management must be automated and relegated by a mini-grid controller that uses an appropriate algorithm to identify the loads to be started or shut down. A manual operation is possible; however, it is unlikely that a mini-grid user will be either willing or capable of continuously manually controlling the loads. With an automated load management, the user or the mini-grid administrator provides the necessary parameters described below once and the mini-grid controller operates the loads by using a defined load management algorithm.
The load management algorithm is triggered by the minigrid controller following the detection of a shift between power production and consumption in the mini-grid. Figure 4 depicts the developed algorithm: The two necessary parameters to start the algorithm are "Grid Status" and "Amount of Energy". The first differentiation the algorithm makes is between different mini-grid statuses. These describe the status the mini-grid is operating in. Table 1 lists the possible mini-grid statuses: Different actions are undertaken by the algorithm in dependence of the specific grid status at the time the algorithm is triggered.
The second parameter "Amount of Energy" represents the mismatch between production and consumption and can be positive or negative, depending on whether more energy is produced than consumed and vice versa.
Internally, the algorithm uses a list of flexible loads À loads that can be operated automatically À together with a set of parameters that describe each load. These parameters are listed in Table 2. Based on this inputs, the load management algorithm selects a list of loads that can be switched on or off, depending on the original mini-grid controller detection and sends this list back to the mini-grid controller. The mini grid controller sends a message to the loads in the returned list in order to switch the loads on or off.

Conclusion
The result of the paper is the above decribed technical layout of a smart mini-grid. The proposed solution makes it possible to achieve a major leap regarding the cost and energy efficiency of solar-powered mini-grids in sub-Saharan Africa. The holistic approach contributes to the transition to an affordable, clean and reliable energy supply by optimising decentralised PV mini-grids towards fullscale self-sufficiency. The first prototype based on the findings in this paper is being installed at the Don Bosco Solar & Renewable Energy Center campus mini-grid in Tema, Ghana and will be operational by the end of 2021.
After one year of testing, data collection and improvement it is plann to scale the developed smart mini-grid system to other sites.s. Table 1. Mini-grid status parameters.

Grid Connection
The mini-grid is connected to the utility grid and uses power from the grid.

PV Power Usage
Loads are served directly from PV power production. Battery Usage Battery power is being used to serve the loads. Emergency Zone Battery power is being used and the remaining usable batter capacity is low.