Determining the location of patients in remote rehabilitation by means of a wireless network

the modules for automatization of wireless devices for recovery of postinfarction, post-stroke patients in individual conditions of remote individual rehabilitation”


INTRODUCTION
This article addresses an explanation of indoor location identification method usage developed to be of practical use in medical facilities. It is worth noting the numerous indoor localization methods having limitations, such as complexity of use (the necessity of special equipment being one of the complexities). The method described in this paper does not require additional maintenance or special equipment other than Wi-Fi access points. The reason why the method is unique lies in the fact that the one not requires the mobile device to be in hotspot mode. But more importantly, Wi-Fi access points location the only required data. The current paper shows that the acceptable accuracy of the location can be achieved in the real environment exclusively by means of the method described, which relies on simple hardware and software requirements. This paper presents a non-standard innovative way of using Wi-Fi access points (routers) as measuring equipment to determine the coordinates of a patient's location within a medical institution. To be able to use the described method, the patient must have some device with a built-in Wi-Fi module (smartphone, smart watch, etc.) or, for example, based on a microcontroller with Wi-Fi capabilities (CC3200) for ECG monitoring [1]. The work does not set the task of improving the accuracy of the indicated coordinates, a satisfactory result for the staff is the determination of the room in which the patient is currently located. This is especially important when it is necessary to provide assistance to patients after serious illnesses (who are in rehabilitation), when, for example, they were given an alarm signal or its biomedical signals are unstable.
Modern scientists are also actively considering the possibility of transferring data from body sensors of patients to remote cloud servers through access points [2]. Determining the patient's location near certain telecommunications equipment will facilitate remote monitoring of the patient in the interests of telemedicine.

THE CURRENT STATE AND PROBLEMS OF DETERMINING THE LOCATION OF MOBILE NETWORK OBJECTS
Systems for determining the position of moving objects in space using a stationary network (for example, by means of parameters of telecommunications equipment) are effective for ABSTRACT This article discusses the indoor object's location identification method that had been developed to use in medical facilities. Differently from other similar methods, the one reported in this paper requires access to Wi-Fi access points only and, most importantly, it does not require the mobile device to be in hotspot mode. It is proposed to use Wi-Fi access points (routers) with non-standard firmware as measuring equipment to determine the coordinates of the patient's location within the medical institution. Thus, it can be claimed that using of the proposed method will help to achieve acceptable accuracy in real environments at real-time identification mobile devices using simple hardware and software requirements.
controlling patient movement over short distances. Such "moving objects" can include patients undergoing remote rehabilitation. In any case, such a mobile delivery network should be regarded as a corporate network with a single MAC address plan and the ability to listen in (sniffing) on nodes connected via wireless communication means. In the classic sense, a sniffing attack refers to intercepting data by capturing network traffic using a packet sniffer (a program designed to capture network packets). Sniffing is typically used by attackers to gain unauthorized access to confidential information, eventually leading to a network outage or damage, or to read messages circulating in the network. Therefore, information security measures are aimed at countering sniffing attacks in computer networks [3].
The aforementioned traffic sniffing technology can be applied to determine the location of people moving around within an area where a wireless local network is deployed, if they have a gadget with them (such as a smartphone, tablet, smartwatch, etc.) that has a Wi-Fi module enabled. Such an approach can also be useful for providing individualized conditions for the remote rehabilitation of post-stroke and post-heart attack patients. By using traffic sniffing technology, it is possible to determine the location of both the patient and the doctor, if necessary, to provide timely assistance to patients who are in remote rehabilitation and can move independently.
Currently, scientists and practitioners have conducted a significant amount of research on the problem of deploying a positioning system for moving objects that have a built-in wireless communication module. Analysis of such research indicates that the error of existing methods ranges from 1.78 to 10 meters. Scientists have considered various aspects of positioning and navigation methods [4], [5]. The most common technologies for positioning are satellite systems (such as GPS and Galileo) and terrestrial cellular networks.
The tasks of determining the ultimate limits of positioning system accuracy, which are defined by the presence of noise and obstacles, remain completely unsolved and relevant; describing the operation of a number of new methods (such as direct positioning) aimed at enabling GPS operation with very weak received radio signals (for example, in mountainous terrain); and methods of optimal combining of measurements based on radio signals and signals from various sensors, such as inertial platforms (including those with gyroscopes).
Research in new areas of cooperative positioning, where multiple nodes exchange signals and information to improve their positions, is also promising. In the last decade, one of the most popular solutions has been object localization based on Wi-Fi, which is considered the most promising for investigating open questions in both scientific and industrial communities.
The main concept of a wireless Wi-Fi network is the presence of an access point (AP) that connects to the Internet service provider and transmits a radio signal. Usually, an AP consists of a receiver, a transmitter, a wired network interface, and software for quick setup. A network is formed around the AP within a radius of 50-100 meters (called a hotspot or Wi-Fi zone) where the wireless network can be used. The transmission distance depends on the transmitter's power (programmable in some equipment models), the presence and characteristics of obstacles such as antennas. Today, the 802.11n standard is widely used, which provides a data transfer speed of up to 320 Mbps [6].
Methods of Wi-Fi positioning can be divided into two main groups. One is based on mapping and a map catalog compiled from data from satellite systems (SS) [4], and the other is based on modeling the propagation of radio waves (RF) [7]. The RF model determines the relationship between signal strength and distance. To determine the distance between known points and the patient, trilateration algorithms can be used [8].
However, currently, it takes several dozen measurements to determine the relationship between distance and signal strength. Therefore, this model is not entirely dynamic and requires further research and improvement, such as 1) Analyze the trends in the development of radio wavebased methods towards the implementation of projects for determining the position of moving objects. 2) Substantiate the feasibility and implement the development of a MAC-directed approach for monitoring numerous objects in a wireless corporate network. 3) Develop an algorithm for detecting the location of moving objects based on a comprehensive approach to determining their positioning and identification. Define the limits of using different methods for determining the location of moving objects in systems with a high level of information security.
Let us consider positioning based on radio wave propagation modeling (RF) [9]. The authors use RSSI with Bluetooth; however, this is not a suitable method for use at medical institution, because for this you need a separate device or turn on Bluetooth separately on the smartphone. The purpose of such modeling is to express the mathematical relationship between the distance from the transmitter to the receiver and the signal strength. The mathematical expression is obtained from a thirdorder polynomial regression. The main advantage of this technology is the speed of positioning. In addition, an important point is that access points (AP) have fixed coordinates (Figure 1).
The development of methods for determining a patient's location based on a combination of signal characteristics from APs is currently a relevant issue. However, regression requires a large amount of accurate information on signal strength over a fairly long period. This method provides positioning accuracy within 1-3 m. An integral quadratic quality criterion is used to evaluate the effectiveness of positioning technologies [10].
For tracking patient movement, the RADAR radio frequency system [11] is also used. RADAR works by recording and processing signal strength information at several base stations located in the area of interest to provide overlapping coverage. It is possible to eliminate unwanted noise in SONAR and RADAR systems by implementing the beamforming method proposed in Figure 1. Patient in a system with fixed access points APi. [12] and well proven in the building of separate infrastructure for medical telemetry applications.
Using RADAR technology [13], a mobile device uses a CCmap of the required location. The original CC-map is generated from the coordinates, CC measurements, and patient location. The signal strength from each AP is compared to the corresponding values in the database, and the appropriate location is predicted. The average error of this method is 1.78 m, but the maximum error can be up to 40 m [14].
Thus, if it is necessary to determine the location of a moving object with greater accuracy, then it is necessary to turn to other methods of positioning such an object.

THE METHOD OF ANALYZING THE POSITIONING OF MOVING OBJECTS BASED ON DETERMINING THE RELATIVE SIGNAL STRENGTH
Existing mobile positioning methods designed for stationary objects do not allow to track moving objects, and they will not be picked up by a Wi-Fi sniffer [15].
The proposed search method can be divided into three stages: data collection, propagation modeling, and location determination, which are presented in Figure 2. During the data collection stage, the server periodically requests (position 1 in Figure 2) each AP to scan for signals. During the search stage, the terminal investigates the Wi-Fi spectrum for available access points and determines the received signal strength indication (RSSI) that reaches the antenna of each AP (position 2 in Figure 2). Then this information is sent (position 3 in Figure 2) to the search server, which determines the point on the modeled signal propagation map from the device with a Wi-Fi module on the moving object (patient).
At the data collection stage, the search server queries each access point for RSSI survey results (Figure 3). The results, including the list of access points and their corresponding RSSI, are stored in a database (DB) on the server.
Each time the RSSI data is obtained from the access points for the current time, new location parameters are calculated. When calculating location parameters for a specific access point, a request is sent to the database to measure the signal received from this access point and detected by another access point. To calculate the distance from the transmitter to the receiver based on the IEEE 802.11 standard, RSSI is used to measure the relative signal strength, which is typically measured in decibelmilliwatts (dBm). However, there are no specific formulas for calculating accurate distances due to the influence of the real indoor environment and the implementation by manufacturers.
According to [9] and using a simple power loss propagation model, the RSSI distance measurement is given as: where PL represents the path loss at distance d (in m); PL0 (in dBm) is the total path loss at distance d0(m); is the exponent of path loss depending on the surrounding environment; d is the distance between the patient and the control access point; Δ is the variable that takes into account the change in the mean value, it is also often referred to as shadow fading [16]. Let us denote each record in the database using the notation , , where the subscript j denotes , on which the signal was measured, and the index i means , from which the measured signal came. When identifying a parameter for the propagation of the signal coming from , it is necessary to query the database for the measurements , and , , collected in the interval δ, where subscripts m, n represent a pair of APs that are not . The experimental assessment, as detailed in Figure 3, demonstrated that better accuracy could be achieved by excluding measurements from the access point (AP) situated on the same wall as APi. Specifically, the performance of the parameters for AP2 in Figure 1, computed based on measurements acquired at AP3 and AP4, outperformed those generated using measurements from AP1. The observed disparity in parameter estimation was attributed to the reflection of the wall on which the transmitting AP was mounted.
Knowing the spatial positions of access points, it is possible to obtain distances , і , , which are the distances between and or . Rewriting Equation (1) with the introduced subscripts, we obtain an equation that can be used to determine . At the same time, 0 is taken equal to 1. Thus, Equation (1)  ( Indicator loss of signal strength on the path for the access point can be calculated using the least-squares regression of Equation (2). To explain this phenomenon, it is advisable to extend the signal loss model with a parameter , which takes into account the effect of the angle difference between the direction of the direct path of the signal and the normal vector to the wall on which the AP is installed. The extended log distance path model can be written as: where the introduced additional symbol αi,j is defined as: Using (3), it is possible to use data from all surveyed access points as input data to determine the values and . It means that there is N×(N−1)/2×h measurement data points to infer signal strength parameters, where N is the number of access points within range . The indoor signal propagation model is developed and regularly updated by the International Telecommunication Union (ITU), which is a UN agency in the field of information and communication technologies. According to the ITU R.1238 standard, for the walls of hospital buildings, γi will always be equal to 20 [17].
The power of the signal strength depends on the AP manufacturer. In the example from part 4, for MikroTik hAP2 Lite was used, it has a Tx dBm of 27.
There is also no standard dBm power for mobile devices, in the example, a mobile phone with a Tx dBm of 22 antenna was used. Hence, from a good signal level of -35 dBm to a weaker signal level of -55 dBm, as shown in the Figure 3. As we see that signal strength of AP3 is good (-39 dBm), Patient signal is good enough (-43 dBm). AP2 and AP4 signal is weak.

SIGNAL PROPAGATION SIMULATION STAGE
Knowing the calculated signal propagation parameters, a model was chosen that was built to estimate the path loss inside the closed area to simulate the signal propagation. Therefore, it was decided to use the ITU model [17]. This ITU model attempts to account for reflection and diffraction caused by objects, energy collisions, movements within the room, multipath effects, etc. Their model provides guidance on indoor signal propagation in the 300 MHz to 100 GHz frequency range. The basic model can be expressed as [9]: , = 20 log 10 ( ) + log 10 ( , ) + ( ) − 28, where , is the total loss on the path of the signal arriving at the access point at point j, dB; f is the frequency, MHz; N is an indicator of power loss over distance; , is the distance between and point j,m; ( ) is a factor that takes into account the loss of signal power between floors (its influence is not taken into account in these studies).
In the propagation simulation step, the location server calculates the expected power loss in the room for each access point in the mesh pattern and creates a propagation map.
To eliminate the need for patient identification, the proposed method only requires the ability of access points to probe Wi-Fi channels and report the RSSI of neighboring access points. Most APs on the market today have this feature built in, as it is an integral part of automatically determining the most suitable channel for Wi-Fi communication. Usually, information about these readings is not available to the end user. This is one of the reasons, apart from its popularity, that one of the most common wireless routers, the MikroTik hAP2 Lite, was chosen for the study.
Scanning is a periodic event. If its frequency is too high, it leads to an additional load on the Wi-Fi network, which is undesirable because it affects the performance of data transmission in the wireless network. A scan rate that is too low means that changes to the Wi-Fi network that is decided to be used to locate moving objects (patients in remote rehabilitation) will take too long to become meaningful and effective. Choosing too many iterations will have the same consequences as choosing too long a listening period. Too few iterations will result in more influence on the RSSI variance than desired. After testing, one minute was chosen as the refresh rate, which ensures that changes due to long-term Wi-Fi instability and changes in indoor space will have a significant effect in less than 10 minutes, as they will be present in more than 50% of the data points used for calculation.
After all the calculations and drawing the map, the developed application will show the doctor in which ward/room of the building the selected patient is located. An example of such a map is shown in Figure 4.
In the given example, you can see that the patient is in Room 1.

CONCLUSIONS
The proposed method, based on listening to Wi-Fi signals, is a further development of the ITU-R Recommendations [17]. This method can be applied to a variety of wireless telecommunication equipment and requires only AP information. A map of the patient's location is built on the basis of the RSSI indicators. To track the location of patients, they (patients) only need to have a smartphone with the Wi-Fi transmitter turned on.
The disadvantages of the proposed method are that the RSSI indicator is poorly correlated with the signal quality, but it can be used to approximate the signal quality. A more accurate assessment can be obtained using the Link Quality Indicator (LQI). The expediency of using the specified parameter is justified by the fact that if there are numerous devices in the local network with enabled Wi-Fi modules in an open environment, such devices are also sources of interference. In this case, the power of the received signal may be high, but the ratio between the received signal and the noise level is lower than necessary to determine the location of the moving object. To use the LQI parameter, the Bluetooth module, which is also built into most popular gadgets, or other types of technologies according to the 802.15 standard, are more suitable. The implementation of the proposed algorithm does not require specialized antennas, which were used in previous studies [18]. Different from previous approaches that relied on specific antenna configurations to achieve optimal results, our algorithm uses built-in signal processing techniques to achieve reliable results using standard antennas commonly found in most devices. This eliminates the need for expensive and specialized antenna systems, making the algorithm affordable and practical for a wide range of applications.

ACKNOWLEDGEMENT
This study was funded and supported by Petro Mohyla Black Sea National University (PM BSNU) in Mykolaiv (Ukraine), and also financed in part of the PM BSNU Science-Research Work by the Ministry of Education and Science of Ukraine "Development of the modules for automatization of wireless devices for recovery of postinfarction, post-stroke patients in individual conditions of remote individual rehabilitation" (State Reg. No. 0121U109898). The author declares that there are no conflicts of interest regarding the publication of this article. Written & Oral informed consent was obtained from all individual participants included in the study but nothing identifying information is included in this paper.