Application of Sensor Networks for Measuring Insulin Levels

All WBANs are low-speed networks consisting of intelligent sensors and low-power actuators that can be placed on the body or implanted in humans. With the help of these networks, timely on-line data on unusual conditions of the human body can be provided, which leads to significant improvements in the quality of life. The implementation of these networks will save lives, reduce healthcare costs, and eliminate the need for costly monitoring of patients in the hospital. The paper analyzes the possibilities of the Internet of Things technology, communication standards, cloud technologies, and hardware components for developing a system for monitoring insulin levels in diabetic patients. A model and algorithm for design, construction, and management of a sensor network for monitoring insulin levels with simulation software based on the Internet of Things technology proposed. A system for monitoring insulin levels through a cloud structure has designed, which sends a message to a specialized health centre or the attending physician about the condition of diabetic patients. Simulation studies performed, and the operability of the system examined. The results give reason to believe that the considered model and the simulation project of a system for monitoring insulin levels in patients with diabetes is successful, gives realistic and reliable results for early diagnosis and prevention of various complications and can be implemented in practice. Keywords—Sensor networks, IoT, glucose sensor, monitoring, simulation


Introduction
The Internet of Things is a dynamic global network infrastructure with self-configurable capabilities. It uses a combination of Internet and mobile networks. The Internet of Things is a network of devices that connect through the Internet and can share information and perform tasks automatically from anywhere in the world. IoT devices can monitor, collect, exchange data with each other, analyze, and make intelligent decisions based on the information gathered. IoT is a technology that connects people, processes, data, and devices, establishing network connections more useful than ever [1]. The data from these links lead to decisions and actions that create new opportunities, richer experience, and unprecedented economic opportunities for people, companies, and countries.

2
Sensor Networks for Monitoring Glucose Index he Styles

Main characteristics
Modern technological advances in sensor technology, device miniaturization, and wireless networks have facilitated the design and distribution of wireless sensor networks. One of the essential applications of sensor networks is to monitor human health using small wireless sensors placed on the human body. Such wireless networks called WBAN wireless network networks. They can monitor important health indicators in real-time and provide real-time feedback between the patient and the controlling medical staff.
All traditional areas such as automation, wireless sensor networks, GPS, control systems, and others support the Internet of Things. IoT technology includes any device that has access to the Internet. These include medical devices, such as implants for heart rate monitoring, glucose index measurement, and heart valve function, etc., that can transmit data over the network.
Smart Body Area Networks (SBANs), which use data synthesis, machine learning, and sensor data retrieval, provide enhanced functionality and opportunities for more compelling healthcare. In the field of diabetes, networks developed for the monitoring, diagnosis, and treatment of glucose [4].
The main requirements for WBAN networks are energy efficiency, duration of operation, low latency, the security of transmitted and stored data, and more. Data traffic in networks can be planned or managed by events (emergency). A sleep-wake cycle used to save energy. However, this mechanism lacks functions for dealing with emergency traffic quickly and immediately. Delivering an emergency packet, the node sending the packet must wait until the receiver wakes up. In work [5], offers improvements to WBAN's overall performance over state-of-the-art protocols for power consumption, latency, and network life.
Improving the quality of health services is a great effort and made by introducing electronic patient health records and patient health monitoring systems. Health data provide information about the history of the disease and medical records of patients and thus should treat as highly sensitive. For this reason, national and international laws and regulations on the confidentiality, security, and protection of health data have established. Health data is required to store in encrypted form, and the patient must be able to control the extent to which his data disclosed, as well as consent to access and delete his data. The protection of health data must preserve the confidentiality of patients, and the disclosure of data must be carried out only with the consent of the patient. This requirement puts on the agenda the solution to some specific technical issues. Such as appropriate platform and infrastructure for storage, processing, and retrieval of health data, protection of data from cyber-attacks, authorized access, protection against unauthorized changes (data integrity), unique identification of each participant in the process management (authentication), data access authorization mode (Permission), reporting for all transactions, encryption using a different encryption key. It is also essential to create different rules for access policy. For example, the administration should have access to administrative data such as costs, patient address, and treatment billing information without having access to the contents of medical records. To implement these requirements in practice, SNIA has developed the Cloud Data Management Interface (CDMI) standard, which defines a protocol for self-provisioning, administration, and access to cloud storage, Figure 1 [4].  1. Cloud data sharing system in cloud structure [4].
In [5], the specific features studied in WBANs. Strict restrictions on WBAN from different points of view e analyzed. A classification of the various applications of WBAN in different sectors of medicine and non-medicine presented, a review of possible routing protocols made, and some security challenges in WBAN are considered. We can summarize that WBANs are low-speed networks consisting of intelligent sensors and low-power actuators, micro and nanotechnologies that can be placed on the body or implanted in humans. With the help of these networks, timely data on unusual conditions of the human body can be provided, which leads to significant improvements in the quality of life. The application of WBAN will save lives, reduce healthcare costs, and eliminate the need for costly hospital monitoring of patients.

WBAN communication standards
The IEEE 802.15.6 standard [3] has developed for the construction of WBANs, which provides low power, short-range (within the human body), and reliable wireless communication in the surrounding area of the human body. Another standard that meets the requirements for building medical WBANs is IEEE 802.15.4j. [6].
In 2012, the first version of the IEEE 802.15.6 standard was approved, which provides a communication standard for low-power devices and operation of, in or around the human body (but not only humans) to service various applications, including medical, consumer electronics, personal entertainment and others [6]. Some of the requirements for devices operating with this standard are data transfer rate in the range from 10 Kb/s to 10 Mb/s. The nodes must be able to remove and added to the network in less than 3 seconds. Each WBAN must be able to support 256 nodes; Nodes must have reliable communication, even when the person is on the move. Although it is acceptable to reduce the network capacity, the data should not be lost due to unstable channel conditions related to the actions and movements of the patients. The delay should be less than 125 ms in medical applications; all devices must be able to transmit at 0.1 mW (-10 dBm). The maximum setting data transmission power must be less than one mW (0 dBm), is in line with the Federal Communications Commission's specific absorption coefficient (SAR) of 1.6 W/kg in 1 g of body tissue 10. WBANs must be able to operate in a heterogeneous environment where networks of different standards cooperate in obtaining information.
These communication standards allow for three main WBAN applications: hospital patient monitoring, remote home monitoring, and emergencies, which are ambulance applications. Hospital and emergency applications usually require 1 ~ 3 m communication, home surveillance applications provide a more extended communication range (e.g., ~ 10 m), usually with a much shorter duty cycle. WBAN architecture shown in Fig. 2.

Fig. 2. WBAN architecture [7]
For consumer protection, the IEEE 802.15.4j standard divides the spectrum into two sub-bands. There are seven non-overlapping communication channels for work in healthcare facilities in the range of 2360-2390 MHz and three overlapping channels for work anywhere in the band 2390-2400 MHz. A mechanism for registration, coordination, and control of BAN is not required. The transmission power P must not exceed one mW in the 2360-2390 MHz band and not more than 20 mW in the 2390-2400 MHz band. WBANs can interact with the Internet and other existing wireless technologies such as ZigBee, WSN, Bluetooth, WLAN, WPAN, video surveillance systems, and cellular networks.
For sites with extremely low power requirements, there are several short-range wireless communication protocols for sending information over the network. In some cases, these protocols are not IP embedded, and data must be transmitted to a connected IP embedded device, such as a controller or gateway. For example, a device that does not use TCP / IP can still communicate with another device that uses a standard, such as IEEE 802.15.4, Bluetooth, ZigBee, NFC, 6LoWPAN. Modern smartphones and tablets use a combination of wireless communication methods to connect to different devices.
These challenges offer various possibilities for system design and implementation while achieving minimum latency, maximum throughput, maximum network life, and reducing the required communication related to energy consumption. WBAN's useroriented requirements are equally challenging and are defined as: ease of use, security, confidentiality, compatibility, value, and safety. WBAN expected to bring about a dramatic change in the way people manage and think about their health, similar to the way the Internet has changed the way people seek information and communicate with each other [5].

WBAN communication standards
Glucose sensors: Recent developments and technological advances in wireless communication, Micro Electro Mechanical Systems (MEMS) technology, and integrated circuits have enabled intelligent, miniaturized, invasive / non-invasive assemblies for micro and nanotechnology. Sensors strategically placed in or around the human body to use in applications, such as personal health monitoring.
Types of glucose sensors: Glucose sensors belong to the group of biosensors. With these sensors, they can take samples, monitor, process, and transmit various life processes, as well as provide real-time feedback to the user and medical staff without causing any discomfort. The IEEE 802.15.6 standard categorizes WBAN applications as medical and non-medical. One of the areas in the field of medicine is Wearable Health Monitoring. These are sensors and other devices worn by patients to monitor their health parameters in real-time. For example, a cell phone with a glucose module can be used for patients with diabetes. The mobile telephone receives data measured by the glucose module, which can then be stored or sent to a doctor for analysis. Biosensors can be implantable sensors that embedded under the skin and connect to a transmitter that sends data wirelessly-also called Wearable Sensors. They continuously check the glucose level in real-time. Another type is the non-implanted Wearable Sensors, which can be applied to the patient's skin [8].
Principle of operation of biosensors: Biosensors use immobilized biological material, which can be an enzyme, antibody, nucleic acid, or hormone in a stand-alone device [8]. They convert the biological activity that the sensor measures through a bio receptor into an electrical, optical signal, or a change in measurable specimens. The most commonly used conversion mechanisms are electrochemical, optical, piezoelectric, and thermometric.

Fig. 3. Biosensor device
The biosensor connects to the electronics and signal processors and is responsible for displaying the results. The biosensor integrates the biological elements with the physicochemical transducer to produce an electronic signal that is proportional to a single analyte that inserted into a detector. Fig.3 shows a diagram of the biosensor device.
The main stages in the operation of the biosensor include Fig. 4: • Selection of biological material (analyte): The preferred organic material (substance) to be tested called an analyte. For example, glucose is an "analyte" in a biosensor designed to detect glucose. • Bioreceptor: A molecule that recognizes the analyte explicitly. Enzymes, cells, aptamers, deoxyribonucleic acid (DNA), and antibodies are some examples of bio receptors. The interaction between them produces a signal called biorecognition (in the form of light, heat, pH, charge change, mass, etc), which can be measured. • Conversion of recognizable bio elements into a measurable signal: The transducer (physicochemical, optical, piezoelectric, electrochemical, etc) is an element that converts one form of energy into another. In the biosensor, the role of the transducer is to convert a biorecognition event into a measurable signal. This process of energy conversion known as signalling. Most transducers produce optical or electrical signals, which are usually proportional to the amount of interaction between the analyte and the bio receptors. • Signal processing system that converts the signal into an understandable form.
• Electronics: Processes the transduced signal and provides it to the user. Performs functions such as amplifying and converting signals from analogue to digital. The biosensor display quantifies the processed signals. • Display: The output signal of the display can be digital, graphic, tabular, or image.

Characteristics of biosensors:
Biosensors have a unique set of characteristics due to the use of bio receptors that distinguish them from other sensory approaches. They offer better sensitivity and specificity compared to different types of sensors; however, they lack stability due to the sensitivity to the working environment [9].
The main features that affect biosensors in most applications are: • Time-dependent stability, as biosensors rely on biological components, which means that enzymes or antibodies may lose activity over time. Storage conditions and production method can significantly affect service life. • Disposable: Suitable for a specific task, but are not currently suitable for long-term monitoring where continuous measurements are required.
• Biosensors often have a limited operating range in terms of factors such as temperature, pH or humidity, at which they work reliably. • Preparation of the biological sample before using the sensor is often necessary, which may increase the complexity of the sensor system, as well as the time for the execution of the sample. • Sensor contamination can be a significant problem, especially with biological samples, such as in the case of protein deposits. • Some compounds may interfere with the readings of sensors, such as in the case of paracetamol when measuring glucose. • Biosensors show very high sensitivity and specificity.
Today we offer various sensors with the principle of measuring the glucose index, intelligence, the ability to transmit data in a network, etc., we do not consider them due to the limited volume of the material. The sensor connected to the data network, most often wirelessly [8].
Actuators and controllers: The sensors can be programmed and perform measurements to transmit the received data in signals and then send this data to a master device called a controller. The controller is responsible for collecting data from the sensors and providing them to the Internet. Controllers can make immediate decisions based on their program code, or send data to a more powerful computer for analysis. This more powerful computer may be on the same network as the controller or accessed via an Internet connection.
The architecture of sensor networks for glucose index measurement: WBAN is a type of sensor network that includes different types of wearable sensors and devices and uses a specific kind of network with a particular use and scope. The physical topology of sensor networks depends on the location of user computers, the position of network equipment such as switches, routers and wireless access points, the position of controllers and servers, the position of sensors and actuators, the type of medical network -for hospital or inpatient care, the potential for the future growth of the network. Figure 5 shows how the sensors connected directly to the cloud or through a gateway. In this example, the gateway performs the function of a router to provide supporting Internet connectivity to IP embedded devices. The data generated by these devices can be transported to a regional or global server for analysis and further processing. Packets that pass over the Internet must be Internet Protocol Packets (IP). Each IP packet must contain a valid source and destination IP address. Without accurate address information, packets will not reach the recipient, and returned packages will not reach the source. Some sensors and actuators support TCP / IP; therefore, no controller is required.
Cloud structures and services: Cloud structures use a set of shared computing resources (e.g., networks, servers, storage, applications, and services) to provide access to the network on-demand, using virtualization in the middle of data centres. Cloud structures can quickly be expanded with minimal management and effort. They have the task of storing and analyzing the collected data. For biomedical purposes, it is most appropriate to use private clouds [10]. Cloud structures also enable organizations to streamline their IT operations by subscribing only to the services they need and reducing their equipment and energy costs. Cloud structures allow users to access their data anywhere, anytime.

Motivation
Internet of Things technology provides great opportunities for connectivity between devices and people. We would like to use this connection to improve the health of patients with diabetes. Why? Type 1 diabetes is a disease in which a person's body does not produce insulin, a hormone needed by the body's cells to be able to absorb glucose. [3]. Glucose used by cells for energy. Without enough insulin, glucose builds up in the blood, and cells starved for glucose, which known as hyperglycemia. With too much insulin, the body burns too much glucose, and this called hypoglycemia. Very high or very low glucose levels can lead to diabetic coma, in which the patient falls unconscious and may die if left untreated. Studies show that continuous monitoring of glucose (CGM) to maintain blood sugar levels can reduce the complications of diabetes and improve the quality of life.

A model of remote health care through diabetes monitoring based on IoT technology
To illustrate such a health model, we will consider an abstract case of a 45-year-old patient. He diagnosed with diabetes five years ago and had trouble maintaining stable glucose levels. He has instances of hospitalization and diabetic coma. The patient recently began using a health monitoring company (HMC) to help him avoid diabetic Internet Wearable Sensors Doctor,s office

Hospital center
Data Storidge Application coma and emergency hospital visits. It carries a device for continuous glucose monitoring (CGM) and a fitness tool to monitor the level of load and respiration. These devices provide the company's health monitoring data to determine when his health is out of his usual range. When a patient's health data shows unhealthy patterns involving deterioration in the glucose index, the health monitoring company will send the patient a signal on his smart device -a smartphone or tablet -to connect to the health centre. In cases where, after following the instructions given by the health monitoring company, there is no change or deterioration of the patient's condition, a mobile emergency team will send. When developing an IoT-based project, it is essential to create a model before creating a prototype. [11].
Modelling of the IoT prototype begins with an understanding of the potential interactions M2M, M2P, and P2P. Fig. 5 with arrows shows this interaction.
• M2M interaction involves the interaction of the hardware components that make up the prototype; the sensor network consists of Sensors, the transmission of signals, data to the Internet, cloud structure, data centre, and medical centre. • The M2P interaction in the health model we are considering includes the equipment used to monitor the patient's condition. When a patient's glucose is too low or too high, health will deteriorate rapidly. The company's health monitoring system collects all data from the patient's glucose monitor and sends an alert to the patient's smart devices, which he must use. If he fails to contact the health monitoring company, medical staff will be sent to the scene. This interaction with M2P helps prevent the patient from entering a diabetic coma [12], [13]. Another type of interaction involves sending a disposable code to a tablet carried staff at a mobile patient treatment centre for easy access to the patient's home. • P2P interactions in this health model include conducting conversations of health professionals with the patient. These include instructions for taking medication or other advice to improve your health. Without this essential P2P step, emergency personnel will send to treat the patient immediately. When an ambulance arrives, medical assistance will be provided to restore the patient's normal glucose levels. This critical P2P interaction can save the patient's life.

Algorithm for Designing A Model for A Sensor Network for Monitoring Insulin Levels Based on Iot With Simulation Software
The design of the sensor network for monitoring glucose levels in patients with diabetes are realized by using specialized network simulation software [14]. The simulator allows the creation of network topologies by mimicking modern computer networks, provides opportunities to integrate new components for networks, as well as additional mathematical objects to the program code. In this algorithm, we indicate the main steps that followed to create the project.
• First step: Configure basic network settings-IP addressing of sensors, security settings for gateway, and router. • Second step: Connecting devices to a computer (SBC). The devices connected to a home gateway and registered to the registration server (www.register.pka). The registration server acts as a healthcare monitoring company that also connected to the Internet and used cloud storage services. • Third step: Connect the devices to the home network and register with the registration server. IoT devices can register directly in the Home Gateway or to the server device configured with the IoT service. • Fourth step: Creating a network and connected to an Internet provider. • Fifth Step: Creating Servers. Created two servers: an IoT registration server and a DNS registration server. • Sixth step: Connecting the Cloud to the router. • Seven step: Build a home network for the patient. • Eighth step: Configure a gateway to connect devices to a network. • Ninth step: Connect the computer to the home gateway and make a wireless connection. • Tenth step: Connect IoT devices to the network. • Eleventh step: Check the connection of the Home Gateway to the registration server. • Twelfth step: Connecting the devices to the IoE Registration Server. • Thirteenth step: Creating mathematical objects to define blood glucose levels and integrate them into the application code.
The scheme of the designed network shown in Fig.6, and of the patient's home network in Fig.7.

System Testing
The designed system has intelligent devices, such as glucose monitor (CGM), which monitors glucose levels and a smartwatch that monitors the rate of respiration and load. Both devices wirelessly send information to the home gateway and then to a health care monitoring company that stores the data in their cloud-based data centre. The company will send medical help if the patient's condition becomes life-threatening. We are testing the system performed by controlling the glucose levels of a person with diabetes with an application developed by us. The app is implemented through JavaScript (computational part) and HTML (visual part), code built into the packet tracer simulator through the option Tools -> script project management. The created interface allows as seeing and manipulate the glucose levels. High glucose may be causing hypoglycemia, hyperglycemia, or restoration of normal glucose level aftercare.

Simulation of hyperglycemia
Increases the level of sugar and simulate hyperglycemia. The application sends a signal to smartphones, TVs, and tablets to the patient that indicates glucose levels. Send a message to the server in the medical centre, the data is analyzed, and if necessary, an ambulance receives a message for dispatching. The information received and visualized from the devices in hyperglycemia shown in Fig. 8. The company connected to the Internet and used cloud storage services to access persistent patient data. These data also allow them to see historical patterns and trends in the patient's condition. The mobile patient treatment centre has a wireless connection to the Internet and can use vital patient statistics as well as maintain constant contact with the health monitoring company.

Simulation of hypoglycemia
Decreases the blood sugar level, simulates a hypoglycemic condition. The application sends a signal to the patient's watch, TV, and tablet, which show glucose levels. Data obtained from the devices in hypoglycemia shown in Fig.9.

5.3
Simulation of normal levels Simulate a healthy blood sugar level observe its glucose level, respiratory rate, exercise level, etc., shown in Fig.10.

Conclusion
The possibilities for the use of IoT technology for the development of a health monitoring system analyzed. The health model that we used in this project modelled every aspect of monitoring the patient's basic vital signs to sending medical assistance to the patients needing help. In the project, the hardware and software characteristics of the proposed system used to determine and describe the approximate concentration of glucose in the blood. The results of the simulation studies show that the designed system can be monitored and controlled insulin levels, respiratory rate, the stress of the human body, etc. The proposed algorithm, the methodology for configuration and design of the proposed system, helps to form the overall picture of the patient's condition. The considered project is also the right solution for many doctors who can monitor the current health of their patients continuously, thus avoiding unforeseen situations.