A Study of LoRa Performance in Monitoring of Patient’s SPO2 and Heart Rate based IoT

In this research, a sensor that will be equipped with blood oxygen saturation function (SPO2) blood and Heart Rate is MH-ET Live max30102 Sensor with Library Max30105. The advantage of this sensor is compatible with ATmega 328P, which is the Arduino board, the first experiment using Arduino Uno. Therefore, MH-ET Sensor data is integrated with Wireless Sensor Network (WSN) devices, e.g, LoRa (Long Range) 915 MHz and calculate WSN path loss when sending sensor data in mountainous areas, the model used to represent signal analysis and measurements in this study is the Ground Reflection (2-ray) model. therefore, the conditions that can be explained are patients who will send their data over hilly areas and hospitals or medical treatments called receiving nodes or coordinator nodes in much lower areas, in the same situation adding routers is expected to be a comparison of whether the data sent faster or even no impact. Furthermore, in this study, it is expected to provide clear results on the function of the router as the sender of pulse sensor data. The point is patients who are in a higher area with the level of impossibility in bringing the patient due to the condition of the patient so that the SPO2 data transmission and heart rate of the patient are expected to be known quickly by the medical authorities through the sensor node device attached to the patient's body. The use of the Adaptive Data Rate (ADR) Algorithm is used to optimize data rate, time on air (ToA) or airtime and energy consumption in the network. Therefore, the End Device (ED) in the ADR algorithm must be static (nonmobile). In the process of measuring the ADR algorithm in the position of sending data (uplink) n-bits to n-gateway. Next, the application server used is ThingsSpeak or The Things Network (TTN). Keywords—Pulse; heart rate; adaptive; data rate; long range; bitrate


I. INTRODUCTION
The development of the medical world continues to grow rapidly, medical devices are sophisticated and light, flexible increasingly widespread and Speed in getting health data. Today's technology, known as the industrial revolution 4.0, can bring to a fast-paced, fast-paced world, one of which is the existence of the Internet of Things (IoT). IoT has become a mainstay in various fields of life e.g., health, education (Virtual Reality (VR), Automation, Robotic [1], [2]), industry, Search and Resque (SAR) application [3]. Especially for industries, for example, Programmable Logic Controller (PLC) now uses the term PLC-IoT. specifications in the Wireless Sensor Network, in the process of communication between nodes, between TX and RX, involve several components i.e., Tx Power or Power Consumption for transmitters, each wireless technology device is different. To create an efficient sensor node for power consumption, an algorithm, e.g. Adaptive Data Rate (ADR), Automatic Sleep mode, and other algorithms are needed for efficiency [4]. therefore, Cellular devices have the largest Tx Power (mW) which is ~ 500 mW. Then Tx Power WIFI ~ 80 mW, while LoRa ~ 20 mW and Bluetooth ~ 2.5 Mw [5]. Bluetooth has the smallest Tx Power Consumption of all Wireless devices, but the disadvantage is that the short distance is only ~ 10 m. while LoRa reaches 13 km in Free Space Path Loss (FSPL). Therefore, WiFi and Cellular require a large Power Consumption but also limited by the distance that can be up to ~ 5 km on WiFi. The next advantage of LoRa is a small data rate (bps) when sending data.
In this research, the Wireless Sensor Network that is built is based on LoRa (Long Range) Radio Frequency, according to LoRa, has a different type of frequency based on ISM (Industrial, Scientific, and Medical) Band, this frequency distribution is based on the location of the continent or region of each country. e.g., Europe 867-869 MHz, North America 902-928 MHz, China 470-510 MHz, Korea, and Japan 920-928 MHz, and India 865-867 MHz. This is an example of the region's division of the Frequency value in the ISM Band [6], furthermore, the details as in the regional document parameters of the LoRa Alliance. As in research [7], LoRa and LoRaWAN are Wireless devices that have the farthest data transfer capability of ~ 13 km [8].
Therefore, the Low Power Wide Area (LPWA) technology or Low Power Wide Area Network (LPWAN) [9], it has the farthest data sending capability with low power consumption, e.g, in FSPL with the smallest data bit rate and low power consumption. therefore, Three characteristics of Wireless Sensor Network or End-node are Range (m), the speed of data transmission (data rate or bit rate (bps)), and Power Consumption (mW) [10], under conditions of the number of small nodes or nodes in large numbers, e.g, Bluetooth, ZigBee [11] [12], WiFi, and LoRa. When compared to the Long Range capability, LoRa is preferable than Bluetooth, ZigBee or WiFi. However, LoRa cannot transmit large data or LoRa bit rates of only ± 250 bps, but the LoRa Power Consumption is low when compared to other radio devices. When compared with ZigBee (250 kbps), Bluetooth (± 3 Mbps) or WiFi (± 11 Mbps), however, Zigbee, Bluetooth, and WiFi are only for close distances and require a large Power Consumption. Therefore, it is difficult to transmit Long Range data at high data rates. It was concluded that the best performance of the characteristics of Wireless Sensor Network devices is seen from 3 sides, i.e, Power Consumption, Range and Speed of Table I shows a comparison of i.e radio technology, Bluetooth, WiFi, 3G / 4G and LoRa with reliability ranges. LoRa and LoRaWAN [14] are Wireless Sensor Network technologies that are specifically used for long distances because in addition to being able to send data up to ~ 15 km in FSPL (Free Space Path Loss) or Line of Sight (LOS) conditions and Tx Power reaches low ~ 20 mW [15].
From the data Table I, LoRa is excellent in the data transmission range and is small in Tx Power, but the smallest in terms of transmission speed data (bps). as Fig. 1 almost impossible, which is almost close to LoRa, but LoRa cannot send large data up to Mbps in size. Therefore, this research will use LoRa at Frequency 915 MHz to send SPO 2 and Heart Rate data for monitoring the health of patients in mountainous locations. accordingly, the theory that will be used in this research is the Two Ray Ground theory using Matlab software. it is used mountainous locations as research locations so it uses the transmitter height parameter (Ht). therefore, the Radio Signal Path Loss LoRa in mountainous locations. Transmitter height factor (Ht), receiver or Base Station (Hr). and the distance between the two or turnover distance. When the position of the transmitter (H t ) is above the mountains it means that it is possible for transmitting data to run well or at least reduce the large Path Loss (dB) due to Diffraction, reflection, and Scattering. furthermore, when discussing the diffraction factor, reflection and scattering will go deeper into the type of material, whether buildings or buildings, trees, and material forms that cause the scattering process.
Accordingly, this research will be focused on the SPO 2 and Heart-beat sensor data from RF96 Chip LoRa communication. furthermore, the LoRa Communication can get the result of the Receive Signal Strength Indicator (-dBm) and the Signal Noise Ratio (SNR) (dB). Furthermore, this research will be developed with the Communication system topologies and the Transmission methods of the node sensor and the Gateway with Uplink and Downlink data (bps).   [16], conducted a LoRa performance test to obtain the path loss value of LoRa PHY at a distance of 630 -1344 m with a variety of Spreading Factor values. This research also uses a dynamic back-off Algorithm to improve LoRa MAC performance. And the Multi Gateway approach is also carried out so that redundant communication of data can be studied, this is an interesting research topic about LoRa and LoRaWAN in the future. At another researcher give the conclusion of a LoRa gateway supports up to 6000 nodes with PRR requirement of >70% [17], In other studies sensor nodes were added up to 1000 nodes per gateway and the losess will be up to 32% [18].  [19].

A. The Sensor used Type
The type sensor used is MH-ET Live MAX30102, this is a sensor used to detect the Pulse Oximetry and Heart rate monitor transmission the module of the sensor. The type of microscope used is the Keyence VHX Digital Microscope. Furthermore, this sensor has dimensions x and y of x = 11,964 mm and y = 10.16 mm. The way this sensor works is to read pulse and Blood Oxigen saturation using different transmittance when the blood vessel beats.
x 100 % (1) 240 | P a g e www.ijacsa.thesai.org The light source, a specific wavelength of light-emitting diode selective for oxyhemoglobin (HbO 2 ) and hemoglobin (Hb) in arterial blood.
Light transmittance is converted into an electrical signal, the change in the volume of the arterial pulsation causes the light transmittance of the light to change. At this time the light reflected by the human tissue is received by the photoelectric transducer, converted into an electrical signal, and amplified and output. The equation to measurement the SaO 2 is represented at equation 1.  Table II. The plot of the heart rate display is shown in Fig. 21. There are three different conditions shown, Fig. 21 is a condition where the Finger is not placed on the sensor so there is no detection of arterial blood. Fig. 22 is when the Finger is detected by the sensor precisely, in this condition the IR value increases. Although using objects other than fingers, will not be detected normally, only InfraRed detects the movement of objects near the sensor, so the Hearth rate data is not accurate, as shown in Fig. 23.

B. The Shannon-Hartley Theorem
Shannon-Hartley Theorem concluded that the magnitude of Channel Capacity (C) in units of bits per second (bps) is determined by bandwidth (B), signals received (S) at a certain bandwidth and noise (N) or interference over the bandwidth.

GND GND
So Shannon-Hartley Theorem can be written with equation 2 .This means that the signal strength is influenced by the Signal Noise Ratio (SNR). Furthermore, SNR becomes a parameter in determining the radio frequency level of a Long Range (LoRa) radio frequency.

C. The Chirp Spread Spectrum (CSS)
According to the theory, modulation is the process of carrying analog information or digital information through a carrier signal, as the research [7] discussed about the Chirp Spread Spectrum (CSS), it was applied to Radar technology [24], There are 3 types of modulation types in signal modulation in i.e analog information, Amplitude Modulation, Frequency Modulation and Phase modulation and in digital information, i.e., Amplitude Shift Keying (ASK), Frequency Shift Keying (FSK), and Phase Shift Keying (PSK). According to research [7], there are 2 types of chirp, namely up-chirp and down-chirp. It can also be up-chirp and downchirp referred to as part of the preamble which shows the nature or shape change of the chirp signal in the encoded (data) or up and down condition of the chirp. Furthermore, this CSS will be seen in the different Spreading Factor values. Furthermore, Chirp is stated in Real Spectogram in Fig. 3. To detect LoRa signal or Chirp signal, this research uses Tektronix RSA 34088. Span 5 MHz to produce the appropriate Chirp signal form, in the trials in this research, LoRa signal type up -chirp and down-chirp containing CRC preamble, payload and Payload.

D. Spreading Factor (SF)
Spreading Factor (SF) is a factor that affects the strength of Radio Frequency Long Range Signal Frequency. The value of the Spreading Factor is 7,8,9,10,11 and 12 [7]. Spreading Factor determines the value of the symbol rate and chirp rate. In Program 1, for example, Bandwidth 500 kHz with Spreading Factor 7, produces a spectrogram different from other bandwidths (125 kHz, 250 kHz). furthermore, the Comparison can be made by comparing the spectrogram with the Spreading Factor 7,8,9,10,11 and 12.
With the combination of Bandwidth (BW). The red lines are called Preambles. The height of the preamble or amplitude of each preamble differs based on the value of the Bandwidth (BW) while the time difference is seen from the Spreading Factor (SF), the greater the Spreading Factor, the longer the time needed for one preamble. From the data taken from the calculation of the results of the comparison of characteristics between Bandwidth, Time on-air, Bitrate and SF obtained 2 graphs in Fig. 11 and Fig. 12. www.ijacsa.thesai.org

E. Sensitivity of LoRa
To calculate the power level or sensitivity of the Receiver, 3 parameters need to be known, i.e., Bandwidth (BW), Noise  Table III. (3) The greater the Spreading Factor (SF) causes the data speed to be smaller, the greater the range of distance (indicated by ToA), and the greater the sensitivity (S), complete information can be seen in Table III.
Furthermore, the Sensitivity of LoRa is also influenced by SNR limit , the greater the Spreading Factor causes the value of SNR Limit is also greater, in SF 7, the SNR Limit value is -7.5 dB, and in SF 12, the SNR Limit value reaches -20 dB.
Where CR is a code rate of 1 to 4, and LoRa has bandwidth specifications ranging from 125 kHz, 250 kHz and 500 kHz. Based on from Libelium, LoRa or LoRaWAN has a configuration on Spreading Factor, Bandwidth and BitRate which can be seen in Table IV and Fig. 11.
With T preamble = Nb Preamble (8)+symbols added by radio (4.25 ) x T symbol , T payload = NbPayloadSymbol x T symbol .

I. LoRa Symbol Symbol Duration (Ts) or T sym
LoRa Symbol is the time used by LoRa within 1 second to transmit data or signals, this signal is a Chirp signal consisting of Preamble, Payload and Payload CRC. Furthermore, LoRa Symbol can be avowed as in equation 8 [25].

J. Signal to Interference Ratio (SIR)
Signal Noise Ratio or Signal to interference ratio (SIR) is transmit Power (P i ) or (P t ) multiply with Direct Channel or Gain on the transmitter (G ii ) divide by Power receiver (P j ) or (P r ) multiply with Direct Channel or Gain on receiver (Gij) plus noise on the transmitter (ni), which is affected by interference or noise.accordingly, equation 9 shows the value of Signal to Interference Ration (SIR) when transferring LoRa 915 MHz data. Furthermore, the percentage of SIR1 and SIR2 can be showed by equation 10.

K. Bit ErrorRate (BER)
Bit error rate or bit error ratio is the number of digital bits in the transmission network, in this case, LoRa 915 MHz where the total number of error bits is divided by the number of bits sent in a certain time (t), e.g, Bits sent 0110001011, while those received are 0010101001, from 10 data bits sent, there are 3 error bits, so the percentage is 3/10 or 0.3 or 30% BER, BER can be showed by equation 11 [23].

L. Packet ErrorRate (PER)
Packet Error Rate (PER)% is the total number of Packets Error divided by the total packet received at a certain time during the Uplink process, i.e, the transmission sensor data from End Devices to the Gateway (GWs). Packet Error Rate (PER)% can be stated in equation 12. furthermore, Packets sent from EDs to GWs will be recorded by GWs and will be compared between Packets sent and Packets that Error, so that the percentage or amount of error arises from the transmitting data process [20].
Where, C / N is Carrier to noise ratio (dB), Eb / N_O (dB) is the ratio of energy per bit (Eb) to the spectral noise density (N_O), Fb is bit rate (bps) and B_W is the receiver noise bandwidth (bps).
Noise Power is computed using Boltzmann's equation: , where, ; T = is effective temperature in Kelvin, and B is the receiver bandwidth. Furthermore, the equation of . and, Where is the symbol rate; is the number of information bits per symbol; is code rate; and is the noise Bandwidth.

N. Coding Rate (CR)
Code Rate or Coding Rate (CR) is used to handle Packet Error Rate (PER) due to interference, with a formula as shown in equation 18. where n is {1, 2, 3, 4}.

O. Symbol Rate (R s )
In digital communication Symbol Rate (R s ) also called Boudrate, the value of R s is shown in equation (r). the relationship between R s , SF, R c is shown in equation 19.

( )
Where is symbol rate, symbol rate ( ) equal which showed by equation 20.

P. Bandwidth or Chip Rate (Rc)
Chip Rate (Rc) is the number of chips / second. And the value of Chip rate (Rc) equal by Bandwidth (BW) value. e.g, Bandwidth is 125 kHz, then Rc is 125000 chips / second, or in other words, the same as the Chirps Spread Spectrum (CSS) reaches 125000 chips / second. The relationship between Chip rate (R c ) and Bit rate (R b ) showed on equation 22.  1,2,3,4) and SF is Spreading Factor (6,7,8,9,10,11,12). Code or Coding rate (CR) equal to 4 / (4 + n), with n ∈ {1,2,3,4}. Furthermore, if the bandwidth is 125 kHz, and SF 7, the bit rate result is 5.46 kbps or 5460 bps.

Q. RSSI (dBm)
The RSSI (Receive Signal Strength Indicator) is the amount of Power Signal in units (dBm), accordingly the theory, RSSI can be generated from equation 25 Fig. 7.
Where, LoRa 915 MHz Wavelength (λ) = 0.30327642030 m, c = Speed of light (299,792.458 m/s), d is distance (m), frequency is Hertz (Hz) and π = 3.14159265358979. In several studies, the calculation and design of circuit and Power efficiency using LTSpice Software [21]. From the comparison of the specifications of the LoRa module and the distances, the FSPL of LoRa 915 Module data is obtained as in Fig. 20

S. A Type of Obstacle Materials During Radio Propagation
At the time of propagation of the signal through the obstacle, the signal attains attenuation due to the material in its path [22]. Table VII shows the material type and thickness and PathLoss value. Furthermore, the equation used is the n PathLoss Exponent which shows the value of n based on the material conditions that are passed by Tx and Rx.

T. Two-Ray Ground Reflection (2-ray) Model
The Ground Reflection (2-ray) model is a model that predicts Path Loss when sending data from the Transmitter Antenna (Tx) to the Receiver (Rx) Antenna with Line of Sight (LOS) or facing each other. in general, both antennas have different heights (ht and hr). ht is the height of the transmitter antenna in meters (m) and Hr is the height of the receiving antenna in meters (m). consequently, a signal has reflected the ground before the signal is received by the receiving antenna (Rx), while the d (distance) is the distance between the sending and receiving antennas in meters (m). at the mountains area, the Signal transmitting from Tx antenna is far above the hill, therefore, the theory of ground signal reflection can occur so that the Ground Reflection (2-ray) of this model is used. on the 2-Ray ground reflection propagation have two wave components that arrive at the Receiver (Rx), i.e. Line of Sight (LOS) and reflected from the ground and the reflection coefficient or Fresnel Coefficient (Γ = −1). The Reflection Coefficient for i-wave can be stated in the equation 28.
is the complex Permittivity of the ground, is the incident angle with the normal to the ground, q is a polarization-dependent factor, which is q = 1 for horizontal polarization and q = 1 / for vertical polarization. a ZigBee has a frequency of 2.4 GHz so that the ZigBee wavelength (λ) is obtained is 0.124913 meters, and LoRa 915 MHz Wavelength (λ) is 0.30.327642030 meters, this value from λ = c / f. therefore, to get the Path loss (PL (dBm) value), it is necessary to find the strength of the transmitter (Pt) and receiver (Pr), in general, the calculation formula for the Power Receiver (Pr) is as the equation 29. (29) While the model of 2-ray ground reflection propagation formula from Pr added the ht and hr parameters due to the relationship with the height of the ht transmitter antenna and different hr receiving antenna which Affects the signal strength level the added angle formed from the reflected process the distance from x to x' therefore, the Pr formula becomes as the equation 30.
Overall the variables used in the calculation are described as below: Referring to equation 26 and 27, the comparison of the PathLoss (-dBm) results can be seen in the graph Fig. 20, the path loss value is influenced by the transmitter location, in the experiment on the hill, the transmitter is placed in different positions, which affects the signal reception power from the Fig. 14 it can be seen that the higher the transmitter is the greater the strength of the P rx Signal. The first analysis is on 2ray ground propagation models using the Matlab software, by looking at equation 30, wavelength (λ) value is 0.125 m, with 3 sender height (Ht) different that is H t1 is 5m, H t2 is 20 m and Ht3 is 40 m with Receiver height (Hr) is 0.5 m and 50 m. This analysis functions to find out PathLoss if it is based on the sender height (Ht) and Receiver Height (Hr). from the analysis it was found that if the height of Ht and Hr is almost comparable, the sinusoidal wave will dock, meaning the signal can be received properly or there is still a response from the receiver even though the power or consequently, Pr (Power Receiver ) has been decreasing, from the Hr = 0.5 m, the simulation it appears that the biggest Power Receiver is -54.3 dBm on Ht 5m.

U. Block Diagram
The method used in this research is the Adaptive Data Rate (ADR) Algorithm to Sensor Node 1 (ED 1 ) to Sensor Node End Device (ED n ). Adaptive Data Rate (ADR) is proven by looking at the indicators on the ToA (Time on Air), the effectiveness of the Bit Rate (bps) and the remaining energy (mW) of the Battery at the sensor node or EDs. Adaptive Data Rate (ADR) flowchart can be seen in the Research reference [7], [26].  Fig. 8 is a blog diagram showing this research, this blog diagram explains how the research works from start to finish and how sensors work on EDs, furthermore, EDs transmit sensor data (transmitting) MH-ET Live Max30102 data to LoRa Gateway (GW). Furthermore, Gateway will store sensor data bits from n EDs and calculate Uplink and downlink values on the Application Server (TTN or Thingspeak) or Cloud Server LoRa. Furthermore, the MH-ET Live Max30102 sensor data provides an IP Address that can be accessed by internet-connected devices.  (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 2, 2020 246 | P a g e www.ijacsa.thesai.org

B. Testing uses a Serial Monitor and LoRa Library
The first trial is sending the MH-ET Live sensor data max30102 sensor, point to point from the LoRa transmitter (Tx) to the LoRa receiver (Rx), from this step, it will be known that LoRa can communicate well, furthermore, the GW, Lora Tx and LoRa Rx can be showed on Fig. 15. Furthermore, Fig. 16

C. Sensor Output
There are three examples of sensor output, on Fig. 21 is a graph from Arduino Serial Plotter, when Finger is not in the position of the sensor properly, so that the signal is irregular and does not show a precise value. Furthermore, Fig. 22 is when the finger is in the right position on the sensor, thus producing a precise HeartBeat value and the sensor detects Arterial Blood, while Fig. 23, the signal shows an inaccurate and changing value because the object used is not Finger, but the object, in other words, cannot detect Arterial Blood.   (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 2, 2020 248 | P a g e www.ijacsa.thesai.org   In Fig. 24, it shows the Power Receiver (-dB) output in the Free Space Path Loss condition at the LoRa 915 MHz Frequency. At a test distance of 1 to 5000 m, the Power Receiver experiences attenuation from ~ 30 dB to ~ 105 dB at a distance of 5 km. furthermore, Fig. 25 is using a different frequency, resulting in the conclusion that with a Frequency of 433 MHz at the same distance can experience attenuation (-dB) which is smaller than other frequencies. Whereas in Fig. 26, that the types of material on the obstacle affect the attenuation signal, the smallest is shown with glass material 6 mm and 13 mm, and the greatest influence on the attenuation signal is Stone Wall and Concrete.

D. Observations using the Signal Analyzer
The MH-ET Live max30102 sensor data is sent using the 915 MHz Dragino LoRa board. 2 output displays are using the Arduino IDE Microcontroller serial monitor and using the LoRa Output with the command. LoRa.beginPacket, furthermore, in this case, the delay must be disabled so that the MH-ET Live max30102 sensor data is sent continuously and Chirp Signal data can be obtained. Fig. 27 and Fig. 28 are an example of a 915 MHz LoRa Spectrum using the Textronix Signal Analyzer. Fig. 28 is accompanied by a process signal demodulation. Furthermore, Fig. 29 is the LoRa Chirp signal in a position with the 10 MHz Span. Chirp shows the different ToA (ms) based on the value of Tpayload and preamble.         (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 11, No. 2, 2020 250 | P a g e www.ijacsa.thesai.org

E. Consumption Node and ToA Analysis
In this chapter, an analysis of the Consumption sensor node and Time on Air (ToA), with parameters 1. In other research, Power Consumption requires a method or model for efficiency, such as the use of the ARSy Framework Model to protect resources on CPU, Battery, and memory [27].    V. CONCLUSIONS The MH-ET Live sensor can produce several outputs, eg, IR Value, SPO 2 , and Heart Rate (BPM), this sensor is compatible with ATmega 328p MCU with various types e.g., Arduino mini, therefore, right to create light-sized sensor nodes making it easier for users in SPO 2 and Heart Rate (BPM) testing. Spreading Factor affects the amount of bitrate (bps) and Time on Air (ms), the greater the bandwidth, the faster the process of transmitting data (ms). Attenuation when the process of transmitting sensor data (Signal propagation) is influenced by the type of material that becomes the obstacle signal T x to Rx at a certain distance. The farther the distance, the greater attenuation (dB), e.g. FSPL LoRa at 3 km without obstacle is ~ 80 dB. Whereas with an obstacle at the same distance, attenuation occurs to ~ 130 dB. furthermore, The Two Ray Ground Reflection model is only used if the position of the Antenna LoRa transmitter (T x ) is at a certain height (H T ) which affects the reflection signal which causes attenuation which affects the signal strength at the receiver (R x ).