Skip to main content

ORIGINAL RESEARCH article

Front. Energy Res., 06 December 2022
Sec. Smart Grids
This article is part of the Research Topic Internet of Energy for Renewable Energy-Based Decarbonized Electrical Energy Systems View all 5 articles

Implementation of a smart energy meter using blockchain and Internet of Things: A step toward energy conservation

Muhammad Tahir
Muhammad Tahir1*Najma IsmatNajma Ismat2Huma Hasan RizviHuma Hasan Rizvi2Asma ZaffarAsma Zaffar3Syed Muhammad Nabeel MustafaSyed Muhammad Nabeel Mustafa4Affan Ahmed KhanAffan Ahmed Khan5
  • 1Department of Software Engineering, Sir Syed University of Engineering and Technology, Karachi, Pakistan
  • 2Department of Computer Engineering, Sir Syed University of Engineering and Technology, Karachi, Pakistan
  • 3Department of Mathematics and Sciences, Sir Syed University of Engineering and Technology, Karachi, Pakistan
  • 4Department of Computer Science and Information Technology, NED University of Engineering and Technology, Karachi, Pakistan
  • 5Department of Electrical Engineering Sir Syed University of Engineering and Technology, Karachi, Pakistan

The looming energy crisis is affecting every sector of the world. The dire need to conserve energy has compelled researchers to bring automation to the power sector. The conservation of energy is one of the biggest challenges Third-World countries are facing in general and in Europe due to the Russian–Ukrainian war. There is a need to introduce such systems that can prevent energy loss and let users buy and sell excessive electricity they have. In the field of power and electricity, the Internet of Things (IoT) plays an active role in the conservation of energy. The new concept of smart grids is widely used for efficient transmission. The technique of blockchain can further reduce the wastage of energy and efficient consumption if it is used with smart grids. This article proposes a smart energy meter based on smart grids and blockchain. The proposed implementation is a demonstration containing a few microgrids, each with its very own blockchain. The users will use energy by making transactions, following the smart contracts. The focus is on the peer-to-peer transactions in a microgrid controlled by blockchain. The architectural design outcomes are a smart energy meter, a smart contract on the Ethereum blockchain, and an android application to monitor and control transactions and energy trade via smart contracts with other consumers.

1 Introduction

The contemporary era has seen significant growth in the use of electrical appliances. The scientific community is becoming increasingly concerned about limiting the causes of environmental hazards and developing alternative energy resources. Rampant electricity consumption presents a difficult problem to solve. Due to limited power supply from utilities during peak hours, consumers in developing countries are significantly impacted, resulting in frequent, abrupt power cuts (Enam et al., 2022). To cope with the situation, a customer must invest in fuel generators and battery storage, putting further financial strain on the country’s economic growth. On the other hand, utility companies must spend a large amount of money to build infrastructure for generation plants to withstand peak hours, resulting in underutilization. The motivation behind writing this article is the serious shortage of energy. The world is moving toward renewable energy, and various methods are required to conserve electricity. The energy crisis is worsening in Third-World countries, which is giving rise to the need for efficient energy conservation systems. Also, European nations are currently facing an energy crisis due to the war between Russia and Ukraine, as approximately 40 percent of the gas supplied to EU nations is from Russia. The introduction of IoT in smart grids (SGs) has made them more robust in achieving the goal to develop a sustainable society. Blockchain has further enhanced the capacity of SGs with its promising features. The integration of IoT and blockchain has produced enormous benefits. Blockchain has greatly enhanced the security and interoperability of IoT systems. The automatic interactions of IoT systems have significantly increased. It is now possible to use IoT and blockchain to make smart energy meters to conserve electricity. It has been proved that a blockchain-based transactive energy management system is feasible on practical IoT devices and reduces the overall cost by 25%. Smart energy meters are useful as they eliminate manual monthly meter readings and monitor the electrical system in real time, encouraging a more efficient use of power resources. They also provide responsive data for balancing electric loads while reducing blackouts, enable dynamic pricing, and avoid the capital expense of building new power plants. The implementation of such systems will greatly enhance the power-saving capability and will prevent the loss of electricity, thus bringing sustainability to society.

The demand and supply of electrical power are increasing day by day. To keep up with supply and demand, various solutions have been presented. Also, from a management perspective, whether related to power consumption by consumers or to a systems perspective such as dealing with outages, fault management, and load management, a smart grid plays a vital role (Fallah et al., 2018; Barbour et al., 2018; Pawar, 2019). The world is facing a depletion in energy resources due to a number of factors including the political and economic situations in various regions, a decrease in gas and oil reserves, and climate change. With a SG, alternative renewable energy resources are available that not only reduce the cost but also maximize the available resources (Abir et al., 2021; Cetinkaya et al., 2021). Various SGs have been proposed by researchers, such as renewable energy systems (RESs), distributed energy resources (DERs), and distributed generation, which have diversified power generation systems (Rafique et al., 2020; Singh and Mahajan, 2021). The enhancement due to SGs is not only limited to generation, distribution, and management but also changes the mode of operations and the marketing of power resources from social, technological, economic, and environmental perspectives. A smart grid (SG) is a digital extension of traditional analog electrical power systems, with adds-on such as secure, efficient, reliable, and sustainable power generation, distribution, and management techniques. A SG can be further enhanced with a microgrid that allows distributed generation or sustainable energy to be combined with an energy storage system to improve the energy generation and consumption of the system (MBungu et al., 2019), generating a platform for future intelligent systems that allows cheaper and environmentally friendly electrical power provision to consumers (Tom et al., 2019; Ashraf et al., 2021).

The Internet of Things (IoT) is a new paradigm for smart energy systems. New IoT-connected devices give data that may be used to build new technologies, improve performance and productivity, address major challenges, improve real-time decision-making, and create unique and creative experiences (Tahir et al., 2020; Ahmad and Zhang, 2021). The monitoring of meters has been made easy by using a sensor. Smart meters (SMs) and the IoT have been widely used to replace traditional analog meters in today’s smart homes. It converts data collection and meter readings to a digital format and transfers these wirelessly, reducing the need for human interaction (Li et al., 2019; Inayat et al., 2022). However, as more devices connect, electrical utilities face greater challenges in terms of interoperability, fragmentation, and security. Smart metering utilizes software-based systems to measure and manage building utilities such as energy, water, and gas, among others (Andoni et al., 2019; Islam et al., 2021). A SM is a critical component of a SG’s communication infrastructure (Hasankhani et al., 2021) that monitors, controls, and analyses power usage by sending data to a central data server on a regular basis. Furthermore, unlike traditional meters, SMs can measure a wide range of electrical variables in addition to energy consumption, including current, voltage, frequency, power, and power factors (Arich et al., 2022). These electrical variables are crucial in load management, problem diagnosis, and load profiling (Saleem et al., 2021). The use of internet cloud services and SMs with the IoT opens a number of possibilities because this allows the SG to work on a larger scale rather than a local scale. The IoT has made P2P energy trading easier with the use of blockchain technology. Energy prosumers can swap surplus energy with their neighbors, as shown in Figure 1.

FIGURE 1
www.frontiersin.org

FIGURE 1. Smart energy meter with blockchain and IoT.

The objective of this work is to provide an energy conservation solution that promotes local energy production which may advance neighborhood energy generation and mitigate energy losses over long distances. To achieve this, a combination of IoT and blockchain is used. The proposed design measures grid energy through a smart meter. A smart contract made on Ethereum will transfer the number of tokens, according to the number of units bought or sold by the user. The meter will also record such P2P transactions. Through the application, users may set their selling price. Anyone who has this application installed will be able to read their electricity on their smartphones in real time. For any extra power that is sent from their system to the electrical grid, local energy producers who use renewable energy sources (RESs) can receive bill credits. Net energy metering, or NEM, is the name of this exchange of energy. In this work, a smart contract on the Ethereum blockchain is used to control this procedure. The block diagram is shown in Figure 2.

FIGURE 2
www.frontiersin.org

FIGURE 2. Blockchain module for smart energy meter with IoT.

The rest of the article is organized as follows: Section 2 covers the literature review. Section 3 discusses the role of blockchain in energy monitoring. The system design and implementation are discussed in Section 4. Results of the experimentation are discussed in Section 5 and Section 6 concludes the article.

2 Literature review

Barman et al. (2018) proposed a smart energy meter based on the Internet of Things. The suggested smart energy meter controls and calculates the energy used before uploading it to the cloud, where the consumer or producer can examine the reading. As a result, consumer energy analysis becomes far more straightforward and manageable. This device also assists in the identification of power theft.

Avancini et al. (2021) described and exhibited a new smart energy meter that uses an IoT technique, as well as the associated costs and benefits. The constructed gadget includes several communication interfaces. The meter has a multi-protocol connection that makes it simple to integrate with any monitoring software. Finally, the proposed solution has been validated and demonstrated in real-world circumstances, and is now being implemented.

Muralidhara et al. (2020) proposed the design and execution of an IoT-enabled, minimalistic, cost-effective, and efficient smart energy meter that will help consumers receive information on the energy consumption of any electrical appliance, bridging the data gap in device energy consumption data. This would not only help consumers ensure that their gadgets perform in accordance with the energy rating but it would also allow them to access historical energy usage patterns, promoting energy conservation awareness and conscientious conservation.

The design and implementation of an energy monitoring system that indicates the power wastage was expanded by Prathik et al. (2018), using an Arduino microcontroller and a GSM (Global System for Mobile communication) module. This technique is advantageous for enabling a user to understand how much energy is wasted by electrical appliances on a regular basis and to manage them further, therefore aiding in energy conservation. The electrical board section gives the consumer information on the total cost, how to pay it, and when the power will be turned off. The user is alerted if the consumer does not pay the bill on time.

Srivatchan and Rangarajan (2020) proposed a revolutionary low-cost smart energy meter (SEM) for online energy measurement and billing. The suggested SEM is based on the Internet of Things (IoT) and LoRa-Wi-Fi, which increases the connectivity range while reducing reliance on the internet. The consumer and the utility company can communicate in a friendly manner, owing to a dedicated Android application. Users can obtain real-time supply voltage, current, and power usage information immediately on their cell phones using the proposed measurement system. Energy companies can use the suggested SEM to detect potential thefts and malfunctions and provide consistent service to their customers.

Sovereign blockchain technology, which offers transparency and provenance, was used by Gao et al. (2018) to overcome numerous difficulties. A smart contract is created, which performs pre-defined tasks and provides a trust-based method for network participants. The technology is extremely efficient since it allows users to track how electricity is used while also providing a platform where neither side can falsify the data.

A Smart Environment pillar in the framework of smart cities, specifically the elements related to the deployment of smart energy grids for inhabitants in metropolitan areas, were examined (Pieroni et al., 2018). The suggested method is unique in that it connects to the grid, exchanges information, and buys and sells energy between the relevant nodes (energy providers and private citizens) via the blockchain digital ledger.

Bhalaji (2020) suggested El DApp, a power consumption tracking application solution that combines IoT and blockchain to build a decentralized and secure recording mechanism that improves the smart meter design. El DApp uses a Raspberry Pi-based Ethereum network to provide a secure and cost-effective decentralized real-time power usage record for users.

Suciu et al. (2019) explained how a smart grid system is protected and how implementing blockchain technology protects the system’s integrity and confidentiality. Since blockchain enables secure database application, it was shown to be a secure substitute for use in mining systems. This article demonstrates the usage of blockchain and its potential impact on a SealedGRID-based smart power management system. This platform was created with security and resistance to attacks in mind since it enables users to view power usage in a smart grid system in real time.

Rahman et al. (2015) introduced a new smart energy meter that might be used to establish a self-contained, improved metering and billing system. Owing to the Arduino and GSM short message service (SMS) interfaces, the meter reading system provides a wide range of predefined automatic capabilities. The suggested energy meter system may convey data such as utilized energy in kWh, generated invoices, and security services (line cut/on) through a GSM mobile network using an embedded controller and a GSM modem. The present energy management systems at power companies and other organizations can, then, be provided with this information and integration, enabling them to offer services to customers without requiring human participation.

Mukherjee et al. (2021) presented an eChain architecture for smart energy usage, employing smart contracts and the Ethereum blockchain. The authors investigated smart energy usage technologies that are now available. After that, the importance of combining blockchain with smart energy is highlighted. The article also discusses how combining blockchain technology with smart energy consumption techniques improves security and privacy.

In a decentralized smart home setting, a suggested privacy protection scheme for smart meters (Zhang et al., 2020) is built on a consortium blockchain. The certificateless, aggregated ring decryption technology uses an elliptic curve point multiplication operation to reduce processing and communication costs; distributed storage of users’ data using consortium blockchain is employed to overcome the problems of a single-point failure and data tampering. Theoretical research shows that the approach not only protects users’ privacy but also provides secrecy and unforgeability, and testing indicates that it saves money on computing and communication.

The framework for a secure private blockchain (SPB) is presented by Dorri et al. (2019). Producers and consumers of energy can speak with the SPB directly to discuss energy pricing. To reduce the related overheads, the authors provided a routing technique that routes packets depending on the destination public key (PK). The SPB eliminates the requirement for TTP to confirm that both energy producers and consumers fulfill their obligations, by offering atomic meta-transactions.

Tuyishime et al. (2021) created an IoT-based intelligent energy efficiency management system with a focus on smart industries to enhance energy efficiency in existing industries and Industry 4.0. The results show that temperature and humidity data are monitored directly on the NODE-RED platform, with an operator receiving a personal email notification, which helps them respond appropriately to changes in the data on the dashboard.

The literature work, and the related advantages and disadvantages are summarized in Table 1.

TABLE 1
www.frontiersin.org

TABLE 1. Literature review with associated advantages and disadvantages.

3 Blockchain in energy monitoring

Blockchain is a digital decentralized ledger that is maintained and shared by multiple parties through secure methods, P2P networks, and consensus. It ensures data reliability, transmission, and secrecy. Blockchain can play a vital role in smart grids for establishing a new trade infrastructure within a grid. As the supply and demand for electricity are increasing day by day, old analog electrical supply networks are being replaced with efficient smart grid solutions. Catering to consumer demands and allowing new methods of commercializing electrical energy are vital from an economic point of view; however, when used with existing infrastructure, operational challenges arise due to new laws and reforms that allow prosumers come and participate in the grid (Hassan et al., 2019; Aklilu and Ding, 2021). Traditional ways of monitoring grids and metering are fading rapidly due to their inefficiency in power distribution, cost, fault, and difficulty in handling. Blockchain can play a vital role in smart grids to establish a new trade infrastructure within a grid (Baidya et al., 2021; Tahir et al., 2022). In an ideal world, the use of blockchain would allow parties, consumers, and prosumers to exchange power with one another in a peer-to-peer manner without the need for any other party to ensure transparency. The use of a blockchain-powered trade system in the smart grid has several advantages (Hannan et al., 2020; Samy et al., 2021). Some of the benefits of establishing a real-time market are lower transaction costs due to a streamlined trading structure and more privacy for smart grid users. A consumer can utilize blockchain technology to validate the renewable energy generated by a prosumer. However, blockchain technology solutions (network, data, and consensus), that should converge to meet the requirements of these applications, are not immediately apparent. Blockchain technology also protects smart meters from cyber intrusion. Attacks such as Denial of Service (DoS) and Man-in-the Middle (MITM) can cause load fluctuation on the consumer side (Mugdal et al., 2022). The way in which a smart grid and blockchain works is shown in Figure 3.

FIGURE 3
www.frontiersin.org

FIGURE 3. Workflow of smart energy meter with blockchain and IoT.

In addition to using blockchain to create a trade infrastructure, computational capabilities might be added to create more sophisticated and complicated applications, such as building a decentralized computing platform that can be leveraged to provide a range of smart grid solutions (Rao and Clarke, 2020; Abir et al., 2021; Ahmed et al., 2022). For example, variable pricing might be used to enforce control inside the smart grid (Olivares-Rojas et al., 2021). Since blockchain has revolutionized monitoring systems, Table 2 summarizes the key differences between traditional meters and smart monitoring meters.

TABLE 2
www.frontiersin.org

TABLE 2. Differences between traditional meters and smart monitoring meters.

4 System design and implementation

In this section, the way in which the smart energy meter works is elaborated. The systems take readings of the current consumed by appliances. The voltage sensor block reads how much voltage appliances are using. In the Arduino block, work on understanding the signals from the sensors is carried out, and all processed data are transferred from here to ESP8266 to publish on Firebase. All network programming and Google Firebase programming are performed in an ESP8266 block. The architectural diagram of the smart energy meter is shown in Figure 4.

FIGURE 4
www.frontiersin.org

FIGURE 4. Architecture of smart energy meter.

4.1 Model setup

This section defines the model setup in terms of mathematical formation. Let nϵN1,2,3,.,N denote the number of sellers, mϵM1,2,3,.,M represent the number of buyers, and uϵU1,2,3,.,U the number of the unit feasible price, where a seller transfers energy to the buyer. Similarly, SnFU describes the number of sellers who sell in ideal situations, where energy is transferred with the feasible price unit to the buyer, and BmFU is the number of buyers in an ideal scenario where the buyer purchases the energy unit price with their own preferred price. The seller and buyer must satisfy the following constraint:

USnFU=UBmFU.(1)

It is to be noted that if just a single seller transfers energy to multiple buyers, then the equation must satisfy the following condition:

SPFU=B1FU+B2FU+B3FU++BMFU.(2)

Here, zero address is included in the aforementioned expression, which is defined as follows:

Zn,mFU=Tn,mFUSnFUBmFU,(3)

where the coefficient of Tn,mF represents the type of sellers and buyers. The procedure involves the user n to sell energy to the user m with a feasible exchange energy unit amount corresponding to En,mFU. It is to be noted that En,mFU > 0 if a seller transfers energy at a fixed unit price; otherwise, En,mFU < 0 if a buyer purchases energy at the feasible price unit. Since the seller and buyer are situated close to each other, we assume that the loss of energy during the transfer is negligible. The following constraint is thus satisfied:

En,mFU+En,mFU=0forallUu.(4)

The transfer energy prices are denoted by PTU, which is sent via a distribution system. The sellers who sell energy will receive payment from their counterparts at the price PTU. The buyers pay their counterparts if they purchase energy. The buyer ps reward in energy transferring is

RPF=U(PTUnNmMEn,mFU).(5)

4.2 System hardware

The components, their descriptions, the purpose of employing the component, stages, and problems encountered while working are presented in this section. The assembling of hardware is shown in Figure 5 and a smart energy meter circuit schematic is provided in Figure 6.

FIGURE 5
www.frontiersin.org

FIGURE 5. Hardware model of smart energy meter.

FIGURE 6
www.frontiersin.org

FIGURE 6. Circuit diagram of smart energy meter.

The hardware components utilized in our implementation are described as follows:

• Arduino Nano board: It is micro-sized, is of low cost, and has multiple analog pins; six analog inputs, six PWM pins, a 16 MHz clock, digital input/output pins, a power jack, an ICSP header, a reset button, and a USB connection. It contains everything expected to help the microcontroller. For this work, Arduino Nano is used because it has built-in libraries for all sensors, and communication with computers and other electronic circuits is quite easy and feasible with Arduino. Moreover, it is open source in terms of hardware and software. It is cheap as compared to other microcontrollers and requires less time for reading and writing applications (Gong et al., 2022).

• LCD : LCD (liquid crystal display) screens are electrical display modules that can be utilized in a range of applications. A 16 × 2 LCD is a simple module that can be found in a wide range of devices and circuits. These modules are preferred over seven-segment and other multi-segment LEDs. LCDs are inexpensive, simple to program, and allow for the display of unique and even original characters (unlike seven segments), animations, and other contents (Yue et al., 2022).

• Current sensor ACS712: The term “current sensor” refers to a device that measures both AC and DC current. The gadget is based on the Hall effect, and the integrated circuit comprises a Hall effect device. It generates an analog voltage that is proportionate to the AC or DC current to be measured. Based on the current sensing range, there are three different types of current sensors. Depending on the kind, the optimal ranges are ± 5A, ± 20A, and ± 30 A. The output sensitivity can also be varied. The advantage of utilizing a Hall effect sensor is that it is electrically isolated when the current is sensed and the circuit is read. This means that even though Arduino is powered by 5V, the detected circuit can be powered by 12 V (Gupta et al., 2022).

• Voltage sensor: This module is a tiny voltage transformer-based sensor. It has precise accuracy and excellent efficiency, and can measure up to 250 V in power and voltage. It is easy to use and comes with a potentiometer for adjusting the ADC output. The module’s working temperature is 40°C. It can measure up to 250 V and has good consistency and accuracy for power and voltage measurement. It is easy to use and has a trim potentiometer for fine-tuning the analog digital converter output. The regression analysis used in this study aims to identify a more accurate link between the input voltage and the ADC output (Barbosa and Borin, 2022).

• Wi-Fi module ESP8266: NodeMCU is one of the platforms available for IoT systems. Firmware is a type of software that allows for lower-level control of devices. The ESP8266 Wi-Fi SoC, whose circuitry is based on the ESP-12 module, is used to control these devices. The ESP8266 microchip is used in Wi-Fi communication systems. It communicates with the Internet via a router using the TCP/IP protocol. It communicates over Wi-Fi using the 802.11 b/g/n standard. It is a 32-bit RISC instruction unit microprocessor from Tensilica, featuring a 32 KB instruction RAM, 32 KB instruction cache RAM, and 80 KB data memory. Arduino Mega and ESP8266 (pin) (pin) GND TX (0)–3.3V and RX (0)–3.3 V are common pins. Installing the ESP8266 package in the Arduino IDE is required to operate ESP8266 on the Arduino platform.

4.3 Implementation of blockchain and a smart contract

For this work, a public Ethereum blockchain network is used for deploying the smart contract. Coding for smart contracts is performed using the Solidity programming language. When the condition of transferring the electricity is met, the smart contract transacts tokens to the seller’s wallet from the buyer’s. The algorithm is explained as follows:

The flow diagram for the blockchain and smart contracts is shown in Figure 7. The amount of tokens deducted from the buyer’s wallet is based on the electricity units supplied to it every 5 min (Song et al., 2021), as shown in Figure 8 and explained as follows:

FIGURE 7
www.frontiersin.org

FIGURE 7. Flow diagram of blockchain and smart contracts.

FIGURE 8
www.frontiersin.org

FIGURE 8. Process showing the deduction taken from the buyer’s wallet.

Smart contracts also keep check on the buyers’ wallets; if there is not enough balance, it will prevent a buyer from purchasing electricity (Wang et al., 2021), as shown in Figure 9. The algorithm is elaborated as follows:

FIGURE 9
www.frontiersin.org

FIGURE 9. Process keeping of the buyer’s wallet in case of insufficient funds.

4.4 Android application development

For this work, the Android application is developed in Flutter, using Dart as a back-end programming language. A registration form was created for the society members. Details such as residential proof documents are to be submitted by the residents. A login form is created to let the user see all the records (Mustafa et al., 2020). Users can easily trade and manage their payments. The flowchart for the Android application is shown in Figure 10.

FIGURE 10
www.frontiersin.org

FIGURE 10. Flow chart of the android application.

The dashboard is arranged in the following three sections:

• Trading panel: A buyer can view the list of sellers in the trading panel. The consumer can choose any vendor from the list of sellers to buy electricity from. Then, as long as the consumer has enough funds in their wallet, they can purchase electricity and use it. The application allows users to stop trading at any time and to begin trading with any other logical consumer.

• Wallet: The balance can be viewed in the wallet section. This also allows the user to deposit or withdraw tokens. This section records the deposits and withdrawals history, which is accessible to the consumers.

• Statistics: The consumption of electricity can be seen in the form of graphs.

5 Results

The 1 energy monitoring system underwent tests and experiments. The results produced were efficient and satisfying. The data collected by the sensors are displayed through an LCD, as shown in Figure 11.

FIGURE 11
www.frontiersin.org

FIGURE 11. Display of data collection by the sensors through LCD.

During testing of the proposed implementation, the energy generated by PV cells and other sources could be traded via blockchain smart contracts. The prosumer can use the electrical energy produced by the PV cell, and the excess energy can be traded with the consumer. Using the public Ethereum blockchain network, token transactions between prosumer and consumer are secured by a smart contract. The transaction currency used for the token is the Pakistani rupee (PKR), and one token is equal to one PKR. The result is shown in Figure 12, where all transactions are validated by the Bsc Test Network1. The results show that implementation of the proposed work encourages more efficient use of power resources and enables dynamic pricing, which raises or lowers the cost of electricity based on demands. The capital expense of building new power plants can also be reduced, and the utilization of blockchain technology provides decentralization, permanence, security, and transparency. Thus, the transactions that take place are transparent. The individuals who are provided authority can view the transaction. This work is compared with the existing state-of-the-art work in Table 3.

FIGURE 12
www.frontiersin.org

FIGURE 12. Display of the results.

TABLE 3
www.frontiersin.org

TABLE 3. Comparison of the proposed work with a state-of-the-art work.

6 Conclusion

This article discusses a metering system that makes effective use of renewable energy. An Android application, connected to the public Ethereum blockchain network, which is reachable from any location in the world, is used to access the complete system. This makes it feasible for users to check their energy bill at any time and also allows them to manage other energies from a remote location. The Android application for this system is quite easy to use. It has a straightforward dashboard with three sections, namely, trading, wallet, and statistics, making the entire system easy to use and comprehend. This system differs from conventional energy meters in terms of live monitoring, accurate results, and easy-to-use Android applications. The proposed design combines state-of-the-art energy market technology with blockchain technology, resulting in blockchain-based energy markets that can be utilized for a variety of applications. The design can be used in a variety of renewable energy systems that allow for the exchange of electrical energy. This strategy can be applied to a variety of situations in order to improve energy efficiency and reduce waste.

Data availability statement

The original contributions presented in the study are included in the article/supplementary material; further inquiries can be directed to the corresponding author.

Author contributions

MT and AK developed the methodology, AK worked on the blockchain module, SN and HR worked on the Android application, MT and NI worked on the smart meter and grid, NI and SN wrote the manuscript, and AZ completed mathematical modeling. All authors reviewed and approved the manuscript.

Conflict of interest

The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

Publisher’s note

All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors, and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, are not guaranteed or endorsed by the publisher.

Abbreviations

DERs, distributed energy resources; IoT, Internet of Things, LCD, liquid crystal display; PKR, Pakistani rupee; RESs, renewable energy systems; SG, smart grid; SM, smart meter; n, number of sellers; m, number of buyers; u, number of units feasible price; SnFU, number of sellers who sell in ideal situations, where energy is transferred with a feasible price unit to the buyer; BmFU, number of buyers, where, in an ideal scenario, the buyer purchases the energy unit price with their own preferred price; SPFU, single seller; Zn,mFU, zero address; Tn,mF, coefficient of the type of seller and buyer; En,mFU, unit amount; PTU, transfer energy price; RPF, ps reward in energy transfer.

Footnotes

1https://testnet.bscscan.com/

References

Abir, S. A. A., Anwar, A., Choi, J., and Kayes, A. S. M. (2021). Iot-enabled smart energy grid: Applications and challenges. IEEE access 9, 50961–50981. doi:10.1109/access.2021.3067331

CrossRef Full Text | Google Scholar

Ahmad, T., and Zhang, D. (2021). Using the internet of things in smart energy systems and networks. Sustain. Cities Soc. 68, 102783. doi:10.1016/j.scs.2021.102783

CrossRef Full Text | Google Scholar

Ahmed, F., Fattani, M. T., Ali, S. R., and Enam, R. N. (2022). Strengthening the bridge between academic and the industry through the academia-industry collaboration plan0 design model. Front. Psychol. 13, 875940. doi:10.3389/fpsyg.2022.875940

PubMed Abstract | CrossRef Full Text | Google Scholar

Aklilu, Y. T., and Ding, J. (2021). Survey on Blockchain for smart grid management, control, and operation. Energies 15 (1), 193. doi:10.3390/en15010193

CrossRef Full Text | Google Scholar

Andoni, M., Robu, V., Flynn, D., Abram, S., Geach, D., Jenkins, D., et al. (2019). Blockchain technology in the energy sector: A systematic review of challenges and opportunities. Renew. Sustain. energy Rev. 100, 143–174. doi:10.1016/j.rser.2018.10.014

CrossRef Full Text | Google Scholar

Arich, M., El Ougli, A., and Tidhaf, B. (2022). “IoT technologies in service of the home energy efficiency and smart grid,” in International conference on digital technologies and applications (Cham: Springer), 588–597.

CrossRef Full Text | Google Scholar

Ashraf, S., Shawon, M. H., Khalid, H. M., and Muyeen, S. M. (2021). Denial-of-service attack on iec 61850-based substation automation system: A crucial cyber threat towards smart substation pathways. Sensors 21 (19), 6415. doi:10.3390/s21196415

PubMed Abstract | CrossRef Full Text | Google Scholar

Avancini, D. B., Rodrigues, J. J., Rabêlo, R. A., Das, A. K., Kozlov, S., and Solic, P. (2021). A new IoT-based smart energy meter for smart grids. Int. J. Energy Res. 45 (1), 189–202. doi:10.1002/er.5177

CrossRef Full Text | Google Scholar

Baidya, S., Potdar, V., Ray, P. P., and Nandi, C. (2021). Reviewing the opportunities, challenges, and future directions for the digitalization of energy. Energy Res. Soc. Sci. 81, 102243. doi:10.1016/j.erss.2021.102243

CrossRef Full Text | Google Scholar

Barbosa, F. R., and Borin, F. (2022). “Optical sensor for high voltage applications,” in Optical components and materials XIX (Bellingham, WA: SPIE), 11997, 166–171.

Google Scholar

Barbour, E., Parra, D., Awwad, Z., and González, M. C. (2018). Community energy storage: A smart choice for the smart grid? Appl. energy 212, 489–497. doi:10.1016/j.apenergy.2017.12.056

CrossRef Full Text | Google Scholar

Barman, B. K., Yadav, S. N., Kumar, S., and Gope, S. (2018). “IOT based smart energy meter for efficient energy utilization in smart grid,” in 2018 2nd international conference on power, energy and environment: towards smart technology (ICEPE), Shillong, India, 01-02 June 2018 (IEEE), 1–5.

CrossRef Full Text | Google Scholar

Bhalaji, N., and Vinayak E, S. S. (2020). EL DAPP–an electrıcıty meter trackıng decentralızed applıcatıon. J. Electron. 2 (01), 49–71. doi:10.36548/jei.2020.1.006

CrossRef Full Text | Google Scholar

Cetinkaya, U., Bayindir, R., and Ayik, S. (2021). “Ancillary services using battery energy systems and demand response,” in 2021 9th International Conference on Smart Grid (icsmartgrid), Setubal, Portugal, 29 June 2021 - 01 July 2021 (IEEE), 212–215.

CrossRef Full Text | Google Scholar

Dorri, A., Luo, F., Kanhere, S. S., Jurdak, R., and Dong, Z. Y. (2019). SPB: A secure private blockchain-based solution for distributed energy trading. IEEE Commun. Mag. 57 (7), 120–126. doi:10.1109/mcom.2019.1800577

CrossRef Full Text | Google Scholar

Enam, R. N., Tahir, M., Rizvi, H. H., Rafique, A., and Mustafa, S. M. N. (2022). A sustainable way to generate energy through biomass flash pyrolysis in south asia: A green energy technology. Int. J. Energy Econ. Policy 12 (5), 274–279. doi:10.32479/ijeep.13335

CrossRef Full Text | Google Scholar

Esmat, A., de Vos, M., Ghiassi-Farrokhfal, Y., Palensky, P., and Epema, D. (2021). A novel decentralized platform for peer-to-peer energy trading market with Blockchain technology. Appl. Energy 282, 116123. doi:10.1016/j.apenergy.2020.116123

CrossRef Full Text | Google Scholar

Fallah, S. N., Deo, R. C., Shojafar, M., Conti, M., and Shamshirband, S. (2018). Computational intelligence approaches for energy load forecasting in smart energy management grids: State of the art, future challenges, and research directions. Energies 11 (3), 596. doi:10.3390/en11030596

CrossRef Full Text | Google Scholar

Gao, J., Asamoah, K. O., Sifah, E. B., Smahi, A., Xia, Q., Xia, H., et al. (2018). GridMonitoring: Secured sovereign blockchain based monitoring on smart grid. IEEE access 6, 9917–9925. doi:10.1109/access.2018.2806303

CrossRef Full Text | Google Scholar

Gong, Y., Huang, X., Liu, Z., Deng, F., Wu, Y., and He, C. (2022). Development of a cone-shaped pulsed eddy current sensor. IEEE Sens. J. 22 (4), 3129–3136. doi:10.1109/jsen.2022.3140390

CrossRef Full Text | Google Scholar

Gupta, K., Singh, R., Kumar, N., Sudha, K., Panjrath, S., and Tegwal, D. (2022). Smart temperature measurement for pharmaceutical industry. J. Inf. Optim. Sci. 43, 579–585. doi:10.1080/02522667.2022.2046331

CrossRef Full Text | Google Scholar

Hannan, M. A., Tan, S. Y., Al-Shetwi, A. Q., Jern, K. P., and Begum, R. A. (2020). Optimized controller for renewable energy sources integration into microgrid: Functions, constraints and suggestions. J. Clean. Prod. 256, 120419. doi:10.1016/j.jclepro.2020.120419

CrossRef Full Text | Google Scholar

Hasankhani, A., Hakimi, S. M., Bisheh-Niasar, M., Shafie-khah, M., and Asadolahi, H. (2021). Blockchain technology in the future smart grids: A comprehensive review and frameworks. Int. J. Electr. Power & Energy Syst. 129, 106811. doi:10.1016/j.ijepes.2021.106811

CrossRef Full Text | Google Scholar

Hassan, N. U., Yuen, C., and Niyato, D. (2019). Blockchain technologies for smart energy systems: Fundamentals, challenges, and solutions. EEE. Ind. Electron. Mag. 13 (4), 106–118. doi:10.1109/mie.2019.2940335

CrossRef Full Text | Google Scholar

Inayat, U., Zia, M. F., Mahmood, S., Khalid, H. M., and Benbouzid, M. (2022). Learning-based methods for cyber attacks detection in IoT systems: A survey on methods, analysis, and future prospects. Electronics 11 (9), 1502. doi:10.3390/electronics11091502

CrossRef Full Text | Google Scholar

Islam, M. H., Talukder, T. I., Saima, F. T. Z., Rimon, M. N. I., and Ali, J. (2021). “An IoT-based smart energy meter with real-time power tracking system: A review,” in 2021 6th International Conference on Smart and Sustainable Technologies (SpliTech), Bol and Split, Croatia, 08-11 September 2021 (IEEE), 01–05.

CrossRef Full Text | Google Scholar

Laayati, O., El Hadraoui, H., Bouzi, M., El-Alaoui, A., Kousta, A., and Chebak, A. (2022). “Smart energy management system: Blockchain-based smart meters in microgrids,” in 2022 4th Global Power, Energy and Communication Conference (GPECOM), Nevsehir, Turkey, June 14-17, 2022 (IEEE), 580–585.

CrossRef Full Text | Google Scholar

Li, W., Logenthiran, T., Phan, V. T., and Woo, W. L. (2019). A novel smart energy theft system (SETS) for IoT-based smart home. IEEE Internet Things J. 6 (3), 5531–5539. doi:10.1109/jiot.2019.2903281

CrossRef Full Text | Google Scholar

Mbungu, N. T., Naidoo, R. M., Bansal, R. C., and Vahidinasab, V. (2019). Overview of the optimal smart energy coordination for microgrid applications. IEEE Access 7, 163063–163084. doi:10.1109/access.2019.2951459

CrossRef Full Text | Google Scholar

Mukherjee, P., Barik, R. K., and Pradhan, C. (2021). “eChain: Leveraging toward blockchain technology for smart energy utilization,” in Applications of advanced computing in systems (Singapore: Springer), 73–81.

CrossRef Full Text | Google Scholar

Muralidhara, S., Hegde, N., and Rekha, P. M. (2020). An internet of things-based smart energy meter for monitoring device-level consumption of energy. Comput. Electr. Eng. 87, 106772. doi:10.1016/j.compeleceng.2020.106772

CrossRef Full Text | Google Scholar

Mustafa, S. M. N., Zaki, H., Alam, S., Khan, M. S., and Zafar, H. (2020). “Anti depression and anti suicidal application,” in 2020 International Conference on Information Science and Communication Technology (ICISCT), Karachi, Pakistan, 08-09 February 2020 (IEEE), 1–6.

CrossRef Full Text | Google Scholar

Olivares-Rojas, J. C., Reyes-Archundia, E., Gutiérrez-Gnecchi, J. A., Molina-Moreno, I., Cerda-Jacobo, J., and Méndez-Patiño, A. (2021). A transactive energy model for smart metering systems using Blockchain. CSEE J. Power Energy Syst. 7 (5), 943–953.

Google Scholar

Pawar, P., and Vittal K, P. (2019). Design and development of advanced smart energy management system integrated with IoT framework in smart grid environment. J. Energy Storage 25, 100846. doi:10.1016/j.est.2019.100846

CrossRef Full Text | Google Scholar

Pieroni, A., Scarpato, N., Di Nunzio, L., Fallucchi, F., and Raso, M. (2018). Smarter city: Smart energy grid based on blockchain technology. Int. J. Adv. Sci. Eng. Inf. Technol. 8 (1), 298–306. doi:10.18517/ijaseit.8.1.4954

CrossRef Full Text | Google Scholar

Pop, C., Cioara, T., Antal, M., Anghel, I., Salomie, I., and Bertoncini, M. (2018). Blockchain based decentralized management of demand response programs in smart energy grids. Sensors 18 (1), 162. doi:10.3390/s18010162

PubMed Abstract | CrossRef Full Text | Google Scholar

Pradhan, N. R., Singh, A. P., Verma, S., Wozniak, M., Shafi, J., Ijaz, M. F., et al. (2022). A Blockchain based lightweight peer-to-peer energy trading framework for secured high throughput micro-transactions. Sci. Rep. 12 (1). doi:10.1038/s41598-022-18603-z

PubMed Abstract | CrossRef Full Text | Google Scholar

Prathik, M., Anitha, K., and Anitha, V. (2018). “Smart energy meter surveillance using IoT,” in 2018 International conference on power, energy, control and transmission systems (ICPECTS), Chennai, India, 22-23 February 2018 (IEEE), 186–189.

CrossRef Full Text | Google Scholar

Rafique, Z., Khalid, H. M., and Muyeen, S. M. (2020). Communication systems in distributed generation: A bibliographical review and frameworks. IEEE Access 8, 207226–207239. doi:10.1109/access.2020.3037196

CrossRef Full Text | Google Scholar

Rahman, M. M., Islam, M. O., and Salakin, M. S. (2015). “Arduino and GSM based smart energy meter for advanced metering and billing system,” in 2015 International Conference on Electrical Engineering and Information Communication Technology (ICEEICT), Savar, Bangladesh, 21-23 May 2015 (IEEE), 1–6.

CrossRef Full Text | Google Scholar

Rao, A. R., and Clarke, D. (2020). Perspectives on emerging directions in using IoT devices in Blockchain applications. Internet Things 10, 100079. doi:10.1016/j.iot.2019.100079

CrossRef Full Text | Google Scholar

Saleem, M. U., Usman, M. R., and Shakir, M. (2021). Design, implementation, and deployment of an IoT based smart energy management system. IEEE Access 9, 59649–59664. doi:10.1109/access.2021.3070960

CrossRef Full Text | Google Scholar

Samy, S., Azab, M., and Rizk, M. (2021). “Towards a secured Blockchain-based smart grid,” in 2021 IEEE 11th Annual Computing and Communication Workshop and Conference (CCWC), NV, USA, 27-30 January 2021 (IEEE), 1066–1069.

CrossRef Full Text | Google Scholar

Singh, N. K., and Mahajan, V. (2021). End-user privacy protection scheme from cyber intrusion in smart grid advanced metering infrastructure. Int. J. Crit. Infrastructure Prot. 34, 100410. doi:10.1016/j.ijcip.2021.100410

CrossRef Full Text | Google Scholar

Song, J. G., Kang, E. S., Shin, H. W., and Jang, J. W. (2021). A smart contract-based p2p energy trading system with dynamic pricing on ethereum Blockchain. Sensors 21 (6), 1985. doi:10.3390/s21061985

PubMed Abstract | CrossRef Full Text | Google Scholar

Srivatchan, N. S., and Rangarajan, P. (2020). A novel low-cost smart energy meter based on IoT for developing countries' micro grids. Concurr. Comput. Pract. Exper. 32 (4), e5042. doi:10.1002/cpe.5042

CrossRef Full Text | Google Scholar

Suciu, G., Sachian, M. A., Dobrea, M., Istrate, C. I., Petrache, A. L., Vulpe, A., et al. (2019). “Securing the smart grid: A blockchain-based secure smart energy system,” in 2019 54th International Universities Power Engineering Conference (UPEC), Bucharest. Romania, September 03 - 06, 2019 (IEEE), 1–5.

CrossRef Full Text | Google Scholar

Tahir, M., Enam, R. N., Mustafa, S. M. N., and Javed, R. (2020). “Emas: Environment monitoring and smart alert system for internet of things (iot),” in 2020 Global Conference on Wireless and Optical Technologies (GCWOT), Malaga, Spain, 06-08 October 2020 (IEEE), 1–4.

CrossRef Full Text | Google Scholar

Tahir, M., Mustafa, S. M. N., Enam, R. N., Ismat, N., and Rizvi, H. H. (2022). Real time monitoring and control of electrical diesel generator through internet of things. PakJET. 5 (2), 112–118. doi:10.51846/vol5iss2pp112-118

CrossRef Full Text | Google Scholar

Tom, R. J., Sankaranarayanan, S., and Rodrigues, J. J. (2019). Smart energy management and demand reduction by consumers and utilities in an IoT-fog-based power distribution system. IEEE Internet Things J. 6 (5), 7386–7394. doi:10.1109/jiot.2019.2894326

CrossRef Full Text | Google Scholar

Tuyishime, C. R., Nzanywayingoma, F., and Gatera, O. (2021). “IoT-based intelligent energy efficiency management system for smart industries (IoT-IEEMS),” in 2021 IEEE International Conference on Industry 4.0, Artificial Intelligence, and Communications Technology (IAICT), Bandung, Indonesia, 27-28 July 2021 (IEEE), 248–254.

CrossRef Full Text | Google Scholar

Wang, Z., Jin, H., Dai, W., Choo, K. K. R., and Zou, D. (2021). Ethereum smart contract security research: Survey and future research opportunities. Front. Comput. Sci. 15 (2), 152802–152818. doi:10.1007/s11704-020-9284-9

CrossRef Full Text | Google Scholar

Yang, J., Dai, J., Gooi, H. B., Nguyen, H. D., and Wang, P. (2022). Hierarchical blockchain design for distributed control and energy trading within microgrids. IEEE Trans. Smart Grid 13, 3133–3144. doi:10.1109/tsg.2022.3153693

CrossRef Full Text | Google Scholar

Yue, X., Mu, D., Wang, C., Ren, H., and Ghadimi, P. (2022). Topological structure and COVID-19 related risk propagation in TFT-LCD supply networks. Int. J. Prod. Res., 1–21. doi:10.1080/00207543.2022.2027039

CrossRef Full Text | Google Scholar

Zhang, S., Rong, J., and Wang, B. (2020). A privacy protection scheme of smart meter for decentralized smart home environment based on consortium blockchain. Int. J. Electr. Power & Energy Syst. 121, 106140. doi:10.1016/j.ijepes.2020.106140

CrossRef Full Text | Google Scholar

Keywords: blockchain, energy, Internet of Things (IoT), smart grid, energy conservation

Citation: Tahir M, Ismat N, Rizvi HH, Zaffar A, Nabeel Mustafa SM and Khan AA (2022) Implementation of a smart energy meter using blockchain and Internet of Things: A step toward energy conservation. Front. Energy Res. 10:1029113. doi: 10.3389/fenrg.2022.1029113

Received: 26 August 2022; Accepted: 21 November 2022;
Published: 06 December 2022.

Edited by:

Haris M. Khalid, Higher Colleges of Technology, United Arab Emirates

Reviewed by:

Neeraj Kumar Singh, Larsen & Toubro, India
Ali Raza, Rochester Institute of Technology Dubai, United Arab Emirates

Copyright © 2022 Tahir, Ismat, Rizvi, Zaffar, Nabeel Mustafa and Khan. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

*Correspondence: Muhammad Tahir, dGFoaXJmYXR0YW5pQGdtYWlsLmNvbQ==

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.