Neuro-Fuzzy based IoT Assisted Power Monitoring System for Smart Grid

The Internet of Things (IoT) is commonly utilized for intelligent energy control, industrial automation, and a host of other applications. IoT sensors are installed in various stages of the smart grid (SG) to track and manage network statistics for safe and efficient power delivery. The challenges in the integration of IoT-SG must be overcome for the network to function efficiently. An IoT-based smart grid energy monitoring system depending on neuro-fuzzy is proposed in this paper. At the core of the operator, a wireless sensor network (WSN) is employed to calculate and transfer the necessary parameters for the prediction model. This project revolves around an IoT-based energy monitor, which can track and analyze electrical parameters, including current, voltage, active power, and load power consumption. For the collection of real-time electrical data from users, the IoT-based program is used. Based on this data, consumers and electric power companies in the SG model can better control their usage to minimize billing costs. The results obtained show that the performance of hybridized solar/wind power plants will be improved with the help of ANFIS controller to a great extent. Results indicate efficiency of 99.74% in the proposed ANFIS control system.


I. INTRODUCTION
The Internet of Things (IoT), which can trade and share information [1], is a significant arrangement related to the communication system. Sensors, programming, and other devices are all part of the system. IoT provides protection and data processing [2]. The IoT will connect objects and people from all over the world. Smart cities, rapid emergency services, vehicle response to vehicles, acute stress, and smart buildings are examples of IoT applications [3]. The internet is now a massive network capable of connecting various devices all over the world [4]. Many sensors have been used for a long time to electrical power machines for domestic automation in recent days [5]. Many sensors have been used in home automation to control electrical equipment for a long time [6]. As a result of the use of large sensors, it is not costeffective. The power consumption and cost of each device that needs a sensor will rise as the number of devices grows [4]. Many sensors can be replaced by a small number of sensors in current IoT systems [7]. IoT devices can be connected to a single network and consume energy and power [8]. Sensor networks play an important role in many applications, except in the most extreme cases.
IoT has become an enabling technology for delivering innovative solutions in the power grid environment [9]. The development in electrical system technologies brings the internet of things (IoT), cloud and big data to be used in smart electrical grids. These technologies paved the way to explore load forecasting in electrical systems [10]. With minimal human interference, the IoT and the convergence of information and communication technologies (ICTs) ensure intelligent features, cost-effectiveness, and reliability in smart grids [11]. The major necessity in the IoT paradigm between smart devices and components is two-way communication. Smart homes are created by integrating smart electric meters with the IoT [12]. A real-time Zigbee mesh assisted by IoT has been created for deploying it in smart cities. Several studies used communication modules and power sensing to forward load consumption data to the utility at periodic intervals [13]. Control systems, communications, and sensors would be necessary [14]. The established method, on the other hand, is not suitable for large-scale implementation. A Neuro-Fuzzy design-based IoT-supported power monitoring system for SG and their performance in power grids has been validated in this paper. It helps both customers and energy providers in terms of resource analysis and management. The contributions to this paper are as follows:  To hybridize power generators such as solar-based and wind based power plants for demand satisfaction. The power generated is transmitted through the transmission line, thereby monitoring the power.  To get information from these units, a wireless sensor network is implemented in the overall framework.  To control the power, an adaptive neuro-fuzzy inference system (ANFIS) is used in the smart grid.  An implementation of IoT based Neuro-Fuzzy concept for power monitoring using Matlab/Simulink software. The remaining sections will be organized as follows, The upcoming section gives the recent related works, and proposed methodology is presented in section 3, which includes solar/wind energy system modelling and designing, adaptive network-based fuzzy inference system, and proposed IoT assisted monitoring and section 4 presents the performance analysis of proposed model and finally conclusion section.

ABBREVIATIONS
IoT

II. RELATED WORK
Bagdadee et al. [15] introduced a WSN-based communication system in the electric grid for smart monitoring. Grid sharing had been enhanced to preserve power efficiency. A dynamic controller was used to monitor the power quality and voltage rise issues. To control the output of the monitoring system, the required controllers and systems were examined and demonstrated in the smart grid.
Swastika et al. [16] designed a smart grid framework for smart homes based on the Internet of Things. They focused on the Internet of Things (IoT), which supported smart home and smart grid technologies. In general, the service existed between the grid server and the customer. Furthermore, IoT implementation in the smart grid could reduce energy consumption. The grid server and cloud server were managed using two operations. The grid server was in charge of supervisory control and data collection, while the cloud server was in charge of the cloud infrastructure.
Anpalagan et al. [17] suggested a scheme for IoT-assisted energy management. The IoT had many applications for smart cities, and it had also been established as the energy demand for IoT applications had been increased. The energy management paradigm was considered the primary paradigm for complex systems. Wireless power transfer for IoT devices and smart home energy management scheduling were the two case studies. The case study simulation results showed that wireless power transfer and energy-efficient scheduling optimization had a significant effect on IoT performance.
Liu et al. [18] used deep reinforcement learning on edge computing infrastructure to incorporate an IoT-based energy management system. Initially, an overview of IoT-based energy management was presented in smart cities. Edge computing was used to incorporate an IoT-based software model and architecture. Finally, they implemented an energy-efficient scheduling method by using the deep reinforcement learning method.
Agelidis et al. [19] presented a control strategy with distributed energy storage (DES) system for microgrids (MG). The addition of DES to power networks added long time-scale dynamics correlated with storage systems' state of charge levels, which increased the dimensionality of the network control issue. Managing MG with a large number of small DES systems necessitated the development of new scalable control strategies that were resistant to communication and power network disturbances.
Pawar et al. [20] proposed an energy management strategy based on IoT assisted system for renewable generation. They handled the energy demand with deep penetration. The proposed regression model of PSO based SVM outperformed in terms of accuracy of performance over other models. The priority features and user comfort were considered for different configuration evaluation on the basis of information's predicted. At the user end, the monitoring was performed by the implementation of the IoT environment.
Ali and Alam [21] studied the challenges, limitations, and classification of energy management in the distribution system. To conserve energy, lower energy costs, and meet global emission goals, electricity production and consumption must be coordinated. With the advancement of technology (IoT sensors), consumers may obtain up-to-date energy consumption information from the device and maximize energy savings by rescheduling energyconsuming devices or, in certain instances, upgrading obsolete devices. Wise choices in energy management assisted the utility and customers in reducing energy demand while maintaining the power network's effectiveness.
Su et al. [22] studied the application, prototype, and architecture of the IoT aided SG. Power generation, distribution, transmission, and utilization systems are all part of SGs, which was allowed for bi-directional energy flow between consumers and service providers. SGs used a variety of devices for grid tracking, analysis, and control, which were widely installed at distribution centres, power plants, and consumers' homes. As a result, an SG needed automation, networking, and system monitoring. The IoT was used to do that. By integrating IoT devices, SG systems will support different network functions during the generation, distribution, transmission, and consumption of energy.
Bhattacharjee et al. [23] employed the real-time flow control system MPPT based PV system. Usually the leadacid and Li-ion batteries were used but the vanadium Redox flow battery was utilized to charge current and also to maintain the charging efficiency. The MPPT controller used had inhibited perturb and observe algorithm having constant current-constant voltage charging topology.
Dubey [24] introduced the neural network-based MPPT system for the generation of high power from the PV system. For the improvement in the quality of the power hysteresis current controller-based inverter with 3 levels were employed. The model aimed to reduce the harmonics that were found in the power generated from the PV.
After that, for the same issues in PV, Yilmaz et al. [25] made the fuzzy logic to have a control on maximum generated power. The battery charging was performed by using the constant current and constant voltage with low loss. The PV was maintained at different environmental conditions of environment. The power generated at varying temperature profile and irradiation.
Sivagami and Jothiswaroopan [26] employed the IoT in electrical system to improve the performance of PV system. The parameters like soiling, efficiency, hotspot, defects, shadow, orientation, insulation etc, were analyzed using the IoT devices, which will be redirected to the generation system to improve the quality of the power by degrading the fourth parameters.

III. PROPOSED METHODOLOGY
The proposed system consists of controlling and monitoring units. The controlling units comprised of an ANFIS, which controls the power from both the solar-based power plant and wind power plant for consumer and communication with distributed generation in the smart grid. The monitoring system consists of a wireless sensor network, which is implemented in the overall framework. Figure 1 depicts the work flow of the proposed system.   Because of its simplicity and controllability, the dc bus architecture is chosen. A DC-DC converter and an AC-DC converter are used to link the PV and wind systems to the common dc bus, respectively. The dc power is transformed to ac power and fed into the grid when the system is connected to the grid. The block diagram of the designed structure is depicted in Fig. 1.

1) SYSTEM MODELLING
There are mainly three layers are present in SG namely application layer, control layer, and physical power layer. The dynamic simulation model for a PV/wind turbine generation system is defined in this section. The designed system consists of an AC/DC double-bridge rectifier with thyristor control, induction generator, wind turbine, DC/DC converter having isolated transformer, and a photovoltaic array.

2) PHOTOVOLTAIC MODULE MODELLING AND DESIGNING
FIGURE 2 depicts the solar cell model's circuit, which includes a series resistor, parallel resistor (leakage current), diode, and photocurrent. With the use of Kirchhoff's circuit laws and PV cell circuit shown in Figure 2, the photovoltaic current can be given as follows: where, the current generated due to light is IGC, the dark saturation current is I0 which depends on the temperature of the cell. The EC represents electric charge which is equal to 1.6 × 10 -19 Coulombs, the Boltzmann's constant (=1.38 × 10 -23 J/K) is K, f is the idealizing factor of cell, TA is the absolute temperature of the cell, VD is the voltage of diode, and RP is the parallel resistance respectively. Ta

FIGURE 2. Equivalent circuit of single diode solar cell
The photocurrent (IG) is primarily influenced by cell temperature and solar irradiation and is represented in (2).
The cell's temperature coefficient is represented using SC  . The reference temperature and short circuit current of the cell are represented using Tref and ISC respectively. GS is the solar irradiation and its unit is kW/m 2 . The cell's temperature will vary the I0 and is described in (3).
where I0 is the reverse saturation current of the cell at a reference temperature and solar radiation, VG is the s bandgap energy of semiconductor, and VOC is the open-circuit voltage of cell. To check the nonlinear performance characteristics of the PV module, a normal PV model is developed and executed using SIMULINK in this analysis. The photovoltaic voltage and current are the outputs of this model, with cell temperature and solar irradiation as inputs.

3) WIND TURBINE (WT) AND INDUCTION GENERATOR MODELLING AND DESIGN
The proposed WT model in this study is focused on wind speed versus power characteristics of WT output. The wind turbine's output power is defined by (5).
where, the wind turbine's mechanical output power can be represented as PW. The performance coefficient of the turbine is CP,  is the rotor blade's tip speed ratio.  and  are the pitch and of blade and air density respectively.
The turbine swept area and wind speed can be represented as A and VWIND respectively. The performance coefficient model can be represented by (6).
The parameters that depend on WT's blade design and rotor structure can be represented as C1 to C6. The parameter i  can be expressed by (7).
Furthermore, for unique values of  and A , (5) can be simplified and normalized, as in (8).

B. ADAPTIVE NEURO-FUZZY INFERENCE SYSTEM
The ANFIS is a hybrid model that combines ANN with fuzzy systems to achieve the advantages of both systems. It implements using a Takagi-Sugeno based fuzzy method. A typical model of ANFIs structure is shown in FIGURE 4, in which each layer of the structure has its own functions while getting output by processing the inputs. A set of output and input membership functions are used to control the outputs and inputs. The process of creating an ANFIS system begins with the user selecting the initial input and membership functions using the system's prior knowledge. Even if prior knowledge is not accessible, the user will spontaneously choose the membership functions. Then a list of if-then rules is produced that may or may not match the data. To avoid trapping into local minima and to improve the performance, the fuzzy rules are tuned with diverse learning algorithms. The hybrid model incorporates the least-squares method and the gradient descent method. Sugeno-type systems can be utilized in designing any inference system with linear or constant output membership functions.  For handling the HRES, appropriate training data is needed for the proposed ANFIS technique. The appropriate energy management training dataset was created based on the load demand and available generation at a given time. The reference power available from storage devices and renewable energy sources is calculated by the training dataset. The source power is described by (9).
where the total power produced by the available RES at time t is the   Gen P t . ( ) Source P t is the total power of the available sources in the energy system at the time t. The generated power can be described by (10).

( ) ( ) ( )
Gen PV W P t P t P t   (10) where the generated power from the PV for a time t can be represented as PPV(t); at time t, the generated power from the wind turbine can be given as PW (t). are the PV's and wind turbines MPPT powers for a time t respectively. Table I gives reference calculation of PV and wind power plants. The prediction of the reference powers of the sources can be done by considering the load variations. The generated power of previous instant and current load demands are also required for the prediction.  (9) and (13), the ANFIS's training data set can be developed as given by (14).
The developed dataset is used to train the ANFIS, which then manages the energy during testing.
The ANFIS comprises of mainly five functional nodes namely defuzzification, fuzzification, normalization, product, and input nodes. The fixed nodes are indicated as circle nodes and adaptive nodes are indicated as square nodes. The previous instant power generation is represented as PGen(t-1). The load demand is represented as PL (t) and reference power as Pr(t).It only has one output, which is the reference power.
In (15) and (16), two fuzzy layers implementing a common rule list for first-order Takagi-Sugeno inference is defined.
Rule 1: if PGen(t-1) is A1 and PL(t) is B1 then     1 Gen L f p P t q P t k     (16) where p1, p2, q1, q2, k1 and k2 represents the linear parameters, A1, A2, B1, and B2 represents non-linear parameters. The input variables of ANFIS is shown in Table II.

High Low
Load demand PL (t) High Low The expression given by (17) provides the outcome of each rule, which is a linear blend of the parameters of the forerunner of each rule.
By multiplying the standard activation degrees of fuzzy rules with the individual output of each rule, the output f can be computed by (18).
where, Wi indicates the normalized value, which includes the sum of both the energy sources. The framework of the ANFIS structure is described below.

1) FUZZIFICATION LAYER
Each input layer in the fuzzification layer defines an input variable that is given to that layer. The power generated at the previous instant PGen(t-1) and the load demand at the current instant PL (t) of nodes are expressed by A1, A2, B1, and B2 respectively, where A1, A2, B1, and B2 are the fuzzy theory linguistic labels for dividing the membership functions. The expressions given in (19) and (20) provide the contribution of the fuzzy layer.

2) PRODUCT LAYER
The input membership function's logical "and" or product is completed by the product layer. The product layer output represents the next node's input weight function. This output can be defined using (20) and (21).
The outputs of the product layers are represented as W1 and W2, respectively.

3) NORMALIZATION LAYER
The normalized layer is the third layer, with each node representing a permanent node. It is capable of performing the fuzzy "and" process as well as efficiently normalizing the input weights. The output of the Normalization layer can be found by (23) and (24).
where, 1 W  and 2 W  are the output of normalized layers.

4) DEFUZZIFICATION LAYER
The role of this layer is to run an adaptive function that generates membership functions as output based on predefined fuzzy rules. The expressions given by (25) and (26) are used to provide the defuzzification layer's performance.
where, the defuzzy layer outputs are represented as 1 i W f  and 2 j W f  respectively.

5) TOTAL OUTPUT LAYER
The input signal's sum can be calculated as The expression given by (27) provides the total output of this layer. (27) where, the total output can be represented as f . After completing the ANFIS training, it is ready to provide the reference power Pr(t) that aids in system management. Using the proposed system, PV and wind will make decisions and power is shared between the source and load sides. The fuzzy rules for reference power can be illustrated in Table III.

C. WIRELESS SENSOR NETWORKS
The use of WSN in a variety of applications is growing rapidly, and several factors are needed to be considered like the design goals of an application, system and hardware constraints, environment, power consumption and cost to meet the requirements of the applications before there are published in the market. In comparison to conventional sensors, these sensors are lightweight, have limited computing and processing resources and are cost-efficient. These sensors can calculate, detect, and collect data from the environment, and then encrypt the data with the aid of a local decision-making method. There are mainly three subunits in each sensor node, namely communication unit, processing unit, and sensing unit. The goal events or interesting data are acquired using a sensing device, to control the acquired data, a limited-memory processing unit is utilized, and information is exchanged between nodes using a communication unit, typically a radio transceiver. Monitoring WT and solar-based resources, the fastestgrowing power production sources in the world in recent times, is one of the most critical WSN applications, and predicting the output power is a constant requirement. WSN is a distributed system that incorporates sensor technology, automatic control technology, data transmission network, storage, processing, and analysis technology. In comparison to conventional monitoring strategies, WSN is cost-efficient, low-power, easy to deploy, and requires no on-site maintenance. WSN is typically employed in IoT for solving complex data storage and transfer problems. Figure 4 shows the monitoring and controlling the structure of the proposed system.

IV. RESULTS
A hybrid solar-wind generation system was proposed. This hybrid generation system is capable of generating the maximum power from solar and wind energy sources. ANFIS controller is used to extract maximum power from both the generation systems in order to meet the power demand. Two inputs and one output have been fed into the ANFIS. Every two inputs and outputs is partitioned into four membership functions. The FIS block created after the training has been used for energy management purposes. The hybrid device depicted in FIGURE 6 was created using the Simulink platform. The ANFIS controller is examined using real-world data. The proposed controller also had other benefits, such as being simple to understand, adaptable, and not requiring a mathematical model or control system. To run the controller in real-time, the input data can be changed continuously. Depending on the load demand, the proposed method will estimate the output power of the sources. The required load demand is met by using the wind and solar output powers.
Dependent on ambient temperature and solar irradiation, the PV generator has non-linear voltage and current characteristics. The irradiation and temperature level taken for the simulation purpose are 1000 W/m 2 and 25 0 C, respectively. FIGURE (7) (a) depicts the power produced by the PV plant without controller and (b) depicts the output power of the PV with controller. By examining both statistics, we can see that using ANFIS controllers can significantly increase the output or efficiency of the PV power plant. During the time of 0.8 to 0.9 seconds, the PV generates the most electricity. The Simulink results of the output power from the wind is illustrated in FIGURE 8. From the FIGURE 8, (a) depicts the output power from the wind system without a controller and (b) depicts the output power with controller. For the simulation analysis, the wind speed can be taken as 12 m/s. By using ANFIS controller the output power extracted from the wind system is improved.  The frequency of the power generated by the hybrid RES after controlling is represented in FIGURE 9. FIGURE 10 illustrates the total output capacity from the available sources with the planned energy management. By correctly measuring the reference values for the sources, the proposed ANFIS technique handles the load demand efficiently. The results show that the proposed control strategy will successfully improves the output power generated. The DC bus voltage of the system is given in FIGURE 11.  To evaluate its performance, the loads are connected to an IoT-based setup. LCD is used for local display to show the load's real-time results. Load data is communicated to the web server through the WiFi module. This setup allows for the monitoring of various loads in terms of current, voltage, and power. Our setup collects data from the Message Queuing Telemetry Transport (MQTT) protocol after the simulation software is completed. This lightweight protocol collects data from devices and communicates it to servers.
The load's electrical measurements are given below as current, voltage, active and reactive power. The IoT devices will monitor or manage the data through the Thingspeak to validate in the MatLab/Simulink platform. This enables the storing of large amount of load data from the IoT sensor and develops the usefulness of IoT application. The analytics of the data collected in IoT is processed by the Thingspeak. Here the analytic is set in the way that the low efficiency data between the demand and generation immediately sent the alert signal to monitor and fed back to the controller to generate the highly efficient signal.      Table IV shows the comparative analysis of efficiencies.

V. DISCUSSION
The power delivered from the RES based system is improved using the controller along with its power generating efficiency. This is a major concern in the PV system where the efficiency of power production is low. The existing real-world power monitoring system uses the wireless sensor network or on any Ethernet-based systems which supports for limited distance for monitoring, while the efficient SCADA power monitoring model have the problem of high installation cost due to the indulgent of remote monitoring system [27]. These limitations were reduced in the proposed power monitoring system design. The problem of observing and metering process of the hybrid RES system design is reduced here with the IoT based high bandwidth sharing system design. The utilized intelligent power monitoring controller have brought about 99.74% efficiency with the reactive power of approximately ~0, which is enough to prove the effectiveness of the proposed model. Due to the use of intelligent process the data sharing is secure, if further security-related things are added then the model is very much efficient for the real-time applications.

VI. CONCLUSION
Modern grid systems need an intelligent operation in power system infrastructure. SG is a more efficient and reliable grid that addresses several issues that trouble conventional grids. The implementation of a Neuro-Fuzzybased IoT-assisted power monitoring setup is described in this paper. In the smart grid, a controller called ANFIS is used to control hybrid solar and wind power plants. The ANFIS based power management will improve the power outcome of the wind and solar power plants to a great extent. The implementation of IoT based Neuro-Fuzzy concept for power monitoring using Simulink software and the parameters is taken in terms of power, current, and voltage of the load. The proposed design would help in the production of low-cost power monitoring and sensing devices that are easy to incorporate into user environments.