*3.2.2 Software*

#### *3.2.2.1 Network simulator*

To have a first approximation to the network architecture, the modeling of the IoT sensor network was carried out, in which the power supply elements of the university campus are located using an appropriate network simulator for the case [14, 15], that is, the simulator with the required characteristics and specifications. In addition, a port-based virtual local area network (VLAN) was developed to have easy control of network traffic and better security of the data that are sent from the IoT sensor to the database server. **Figure 3** illustrates the scope that can be given to the project, the possible installation of 12 electrical network analyzers, each with its network interface that allows connection through the IEEE802.3 or IEEE802.11 communication protocol, and with capacity for greater installation, interconnected with each other in a campus-type unit. The yellow box represents the database server interconnected to a computer for viewing the data recorded by the IoT sensors from the energy distribution sites. The blue box shows the routing of one of the devices using the IEEE802.3 network, and the green box shows the routing of one of the devices using the IEEE802.11 network. The user can determine what type of connection to the communication network he wants. **Figure 4** shows the data collection from the server sent by the IoT sensor, thus giving the user the possibility to review the energy parameter collected separately and in real time. This information is being extracted from each of the points where the energy network analyzers are located and is subsequently being stored in a database dedicated solely to this information [21, 22].

#### *3.2.2.2 IoT sensor communication mechanism*

1.Communication with typical systems currently applied for online electrical measurements using the RS485 interface, two-wire full duplex (with Modbus protocol).

#### **Figure 3.**

*Visualization of the final model of the network of electrical network analyzers of the university campus. Source: prepared by the authors.*


#### **Figure 4.**

*Visualization of energy parameters distributed individually in a dashboard and previously stored in a database. Source: prepared by the authors.*

*Management Methods of Energy Consumption Parameters Using IoT and Big Data DOI: http://dx.doi.org/10.5772/intechopen.105522*


Source: Adapted from [4].

All IoT sensors communicated through a virtual local area network (VLAN) to increase productivity and data security and did not interact with other devices on another network and vice versa [21–23].

#### *3.2.2.3 Data reception*

Three-phase meters with RS-485 communication, also known as EIA/TIA-485, were used to receive data of all the energy parameters that are directed to the database server, each one connected to its respective voltage and current signals from of electrical distribution cabinets. The information that is obtained, is passed to an information system, that uses TCP/IP transmission protocol like mechanism of network, and using the Node-RED programming tool, that converts data from character to numeric format, as well as it connects all devices at same time, and manages the messages received [21–23]. The information storage was based on a time-series model, making use of the TSDB database, a database focused on IoT solutions, Big Data, and other technologies that collect a lot of information over time. The general architecture of the measurement system that outlines the communication of the sensor network is shown in **Figure 5**.

#### **3.3 Materials and procedures for development**

Using the data obtained from each meter as information, it is necessary to consider other electrical characteristics to help complement the information captured to give a correct interpretation. The following formula was used.

#### *3.3.1 Offset angle*

The phase angle is the representation of the power factor angle; it is obtained by finding the arc cosine of the power factor, as represented the following Equation [4]:

$$\varphi = \cos^{-1}\left(Pf\right). \tag{1}$$

**Figure 5.** *General architecture of the sensor network. Source: prepared by the authors.*

## **4. Results and discussion**

As the main goal for the development of the project, it is proposed to carry out a network of sensors of a telemetry system through the acquisition and analysis of energy parameters based on IoT and Big Data concepts with a proposed solution, which was the electrical distribution cabinets or the power transformers of the university campus, which was determined using the concepts allusive to the management of power and electrical loads focusing on consumption. This section presents the results obtained once the operation process was carried out, together with the results obtained in the field tests, starting from the creation of a network of sensors integrating two electrical distribution panels to which the network analyzer was adapted to them, and through this, they become an intelligent object or smart object.

To make measurements in systems that reflect aspects, such as electrical power and what it represents, it is necessary to look for methodologies and models that, using technology and additional mechanisms, carry out such actions directly or indirectly. It is not uncommon that, today, millions of devices already bring with them a form of data extraction making use of protocol concepts with industrial-type determinations, which makes access to their information very limited, and it is not allowed to manage and analyze them. Likewise, it is not possible to connect a large number of said devices and make them converge between them, omitting the possibility of creating a sensor data collection network. Based on the above, we start from the search or creation of a mechanism that is capable of converting devices that do not have a form of data extraction to a device that does, making use of noninvasive external devices and determining it, as well as an IoT object, looking for the possibility of measuring variables or reference data of its operation in order to store and process said information in the future. On the other hand, it is also important to emphasize that using these mechanisms, it is possible to form an information network making use of telemetry processes collecting a large amount of data and making the devices converge in a database, and subsequently, the analysis can be carried out in this case of the fluctuations of the electrical network.

#### *Management Methods of Energy Consumption Parameters Using IoT and Big Data DOI: http://dx.doi.org/10.5772/intechopen.105522*

As already mentioned, the implementation characteristics used in this development are determined using simple concepts applied in the power measurement process, initially defined in two of the electrical distribution boards, which are derived from the campus transformers. For this, a network analyzer is used, which adapts to the necessary conditions for the collection of information. This device allows one to manage the data collected by making use of the network interface; it complements the network, which makes it an intelligent object.

The IoT sensor network in conjunction with the data acquisition system was used to monitor two electrical distribution cabinets on the university campus. The correct operation of this gives the possibility of collecting 31 energy parameters; likewise, validation tests of the different parameters obtained were carried out. The measurement network is fully functional, and each IoT sensor has a different topic as a unique identification for each energy parameter. The data collected are available on the university campus database server, where the different data generated by the sensors can be analyzed and visualized in real time. The visualization of these energy parameters is done using a free-to-use dashboard (open source) called Grafana. Abbreviations for the energy parameters are presented in **Table 4**

**Table 5** presents the data obtained from the voltage of the three phases A, B, and C of the two measurement points located on the university campus during a period of



#### **Table 4.**

*Abbreviation of energy parameters.*


*Source: prepared by the authors.*

#### **Table 5.**

*Values of the voltages obtained by the sensors installed in the distribution boards.*

4 days; however, the measurement system can work constantly until it is determined that the information obtained is relevant. The acronyms of VA1, VB1, and VC1 represent the first measurement point, which is in block 6, floor 3 of the university campus. On the other hand, the initials VA12, VB12, and VC12 represent the second measurement point, which is in the basement of block 6. The values contained in **Table 5** are the maximum, minimum, and average value. Likewise, **Figure 6** shows the data collected and displayed on the graphical interface (dashboard) in a section of time of 5 minutes.

**Figure 6** shows an interactive graph of three-phase voltage measurements on a university campus network at the installation site, where each line and its respective color have their specific abbreviation at the top right of the figure. Likewise, network fluctuations are observed in the measurements of both the sensors.

Similarly, **Table 6** shows the values of maximum, minimum, and the average of the normalized currents from 0 to 5 A of phases A, B, and C of the two measurement *Management Methods of Energy Consumption Parameters Using IoT and Big Data DOI: http://dx.doi.org/10.5772/intechopen.105522*

#### **Figure 6.**

*Graphic interface of the visualization of the voltage energy parameters of both the sensors. Source: prepared by the authors.*


#### **Table 6.**

*Electric current values obtained by the measurement sensors.*

points; **Figure 7** shows an interaction graph of the three-phase current measurements recorded by the sensors during a time window of 5 minutes, where each color of the signal is associated with an abbreviation located in the upper right part of the image. The IoT sensor located in the basement counts current transformers with a ratio of 1000 A to 5 A. In addition, the IoT sensor located on floor 3 of the same block has current transformers with a 600 A to 5 A ratio.

On the other hand, **Table 7** shows the active powers with their maximum, minimum, and average value of phases A, B, and C of the two measurement points. **Figure 8** shows the three-phase active power consumption levels recorded by the sensors in a time section of 5 minutes; in addition, during the measurements, it was observed that the active power consumption is high when the university campus is in academic activities.

On the other hand, when reviewing the results presented in **Tables 6** and **7**, it can be seen that the energy consumption in some buildings and in a place like in the basement of block 6 is higher than the consumption in floor 3 of the same block. Likewise, it can be seen that consumption on floor 3 is constant; therefore, its average is higher compared to that of the basement. This information can also be seen in **Figures 7** and **8**, which correspond to the currents and active powers of the sensors in a 5-minute time section.

Likewise, **Table 8** shows the reactive powers with their maximum, minimum, and average values of phases A, B, and C of the two measurement points. **Figure 9** presents a 5-minute section of the reactive power obtained by the three-phase measurement IoT

#### **Figure 7.**

*Graphical interface for the visualization of the current variations of both the sensors. Source: prepared by the authors.*


#### **Table 7.**

*Values of the active powers obtained by the IoT sensors.*

**Figure 8.**

*Graphic interface for displaying the active power variations registered by each sensor. Source: prepared by the authors.*

sensors during the entire measurement period; this power is related to the existence of coils or capacitors in the electrical installation associated with the distribution boards of the university campus.

*Management Methods of Energy Consumption Parameters Using IoT and Big Data DOI: http://dx.doi.org/10.5772/intechopen.105522*


#### **Table 8.**

*Values of the reactive powers obtained by the IoT sensors.*

#### **Figure 9.**

*Graphic interface for displaying the active power variations registered by each sensor. Source: prepared by the authors.*

Similarly, **Table 9** shows the apparent powers with their maximum, minimum, and average values of phases A, B, and C of the two measurement points. **Figure 10** shows in a 5-minute section the interactions of the three-phase measurements of apparent power obtained by the sensors during the entire measurement period; this power is the sum of the energy that transforms these circuits in the form of heat.


#### **Table 9.**

*Apparent power values obtained by the IoT sensors.*

#### **Figure 10.**

*Graphic interface for displaying the active power variations registered by each sensor. Source: prepared by the authors.*

**Table 8** corresponds to reactive power indicating that the sensor located on floor 3 of block 6 obtained higher reactance values compared to the meter located in the basement of the same block. In addition, **Table 9** shows the apparent power values where there was likewise greater apparent power in the electrical cabinet located on floor 3 of block 6.

Equally important, **Table 10** shows the power factors with their maximum, minimum, and average values of phases A, B, and C and the total of the two measurement points. Likewise, **Table 11** shows the phase angle of each meter.

**Table 10** presents the power factor values for both the sensors; in the IoT sensor located in the basement of block 6 of the university campus, a maximum power factor value equal to one was presented; this is related to the time in which there was no electricity consumption. In the same way, from **Table 11**, it is possible to observe the values of the lag angles, giving an answer from another perspective that relates the apparent power and the active power, in other words, the lag in degrees existing between the intensity of the current and the voltage or voltage in the alternating current circuit.

The processing of energy indicators refers mainly to the support received from energy providers and the support and management of these parameters for the generation and transformation of electrical energy, as is the case of electrical powers,


#### **Table 10.**

*Values of the power factors obtained by the IoT sensors.*
