Using Two-axes Three-points Policy and Bezier Curve to Build an Indoor Navigation System

In this study, we combine the received signal strength (RSS) signal of a wireless fidelity (WIFI) router and the signal of a gyroscope on a medical assistive device to propose an indoor automated navigation system for medical assistive devices. The system meets the needs of a home environment that has only one WIFI router and satisfies the low-bandwidth conditions. It also interacts with the environment to map out an evacuation route using the Bezier curve and takes the structure of a traditional medical assistive device into consideration. During the navigation process, the received signal strength indication (RSSI) signal of the WIFI router and the additional gyroscope information on the medical assistive device are detected to perform positioning. At the fastest, only two axes and three points (TATP) are needed for indoor positioning. Thanks to the lesser need of bandwidth, this method is useful for improving the efficiency of navigation and resolving the congestion problem. It also utilizes the Bezier curve to build proper navigation routes automatically and lessen the burden for humans as a result. Finally, in this study, we use ATMEL 328PU as the control center to design a navigation vehicle that simulates the medical assistive device. A personal computer (PC) is utilized as a recording center, and the bluetooth communication module and the navigation vehicle function as information-transmitting channels to construct a hardware testing platform. The software Matlab© is used for analysis and recording on the PC. Lastly, the final data result is used to prove the accuracy and feasibility of the theory.


Introduction
The worldwide population has begun to age more rapidly recently. The problem of an aging population brings about the need for medical treatment and exposes the severe shortage of caregivers. The development of automated technology can address the insufficiency of the labor force, increase the productivity of products, and improve the quality of life. Particularly in the aspect of medical treatment and caregiving, the movement requirement of the disabled can be satisfied with artificial intelligence and automated medical assistive devices. Medical assistive devices with an indoor emergency navigation and evacuation function can help patients escape from dangerous environments with which they interact, reducing the number of casualties and lessening the burden on the caregiver. A medical assistive device in an intelligent space can be used as a carrier for movement.
Medical assistive devices that can automatically navigate in indoor spaces must have a positioning function and be able to identify environmental features and interact with other indoor devices. Owing to barriers present in the indoor space, the global positioning system (GPS) signal positioning cannot be used and, thus, a special positioning method must be utilized. According to the literature, indoor positioning is usually realized by adopting infrared (IR), ultrasonic, radio frequency (RF), and received signal strength (RSS) signals and optical image sensing components. The system performs a multipoint algorithm to identify the location in an indoor space. (1)(2)(3)(4)(5)(6)(7)(8)(9)(10)(11) As Fig. 1(a) shows, a number of groups (1)(2)(3)(4)(5)(8)(9)(10)(11) have presented some methods using the wireless fidelity (WIFI) router as an access point (AP), wherein the distance between the communicating devices is determined using the RSS signal during the process of sensing communication. (1)(2)(3) For this purpose, multiple APs are needed and the minimum mean square error (MMSE) (1)(2)(3)10,11) is used to calculate the relative indoor location. These methods consume more computational resources and increase the network communication traffic because continuous calculation is needed when the medical device is moving. Hence, they are not suitable for positioning calculation in a space with navigation devices owing to the possibility of paralyzing the network communication system. Zheng et al. (1) proposed a single fixed LED lamp to transmit light and a camera to receive the light signal. The light strength that the optical camera receives and the reflection angle are used to determine the indoor location. Although the utilization of LED lamps can reduce the cost, it is easily disturbed by other lights in the same space and, thus, is limited to small-area positioning applications. Wu et al. (2) proposed an indoor map. Therefore, a map information server must be available and built into the indoor space first. However, communication with the map information system must be maintained continuously during navigation. Besides the problem of building an extra indoor map information system, Wu et al. (2) did not take the means of navigation during blackouts into consideration. The work of Xiao et al. (3) is different from that of Zheng et al. (1) They utilitized LED lamps and cameras and these LED lamps were turned on in sequence at fixed locations. The location is then calculated through the strength and phase of the LED light that the cameras receive. However, the LED lamps must be turned on continuously when tracking control is needed, and the positioning calculation cannot be conducted when there is a blackout or the LED lamps are otherwise unable to emit light. Zuo et al. (5) used multiple iBEACON communication sensor devices and the RSS signal to build a navigation map. They also used MMSE to calculate the indoor location. Their method also has the same problems as mentioned above. As we can see, their studies did not take into account the increasing need for data processing resources arising from the continuous communication navigation. Consequently, the cost of the hardware structure is increased and the number of medical assistive devices that can operate simultaneously is limited. Neither did Zuo et al. discuss the interaction with the environment during the navigation shown in Fig. 1(b), and this might lead the medical assistive device to dangerous places instead of avoiding them. Although Pu et al. (6) discussed the navigation interaction, their method involved the installation of an AP in each corner, leading to the need to install multiple APs in the same space and hence an increase in hardware costs. In fact, an ordinary family usually installs only one AP. Given that the methods described in the literature do not fit the actual need, the main direction of this study is to propose a system that can perform positioning identification by sensing the RSS signal of one AP. As Fig. 1(a) shows, the RRS signal can only determine the relative distance and cannot identify the relative location. Therefore, in this study, we added a gyroscope to the AP, and additional information on the orientation of the gyroscope was used to assist the medical assistive device in the positioning calculation. Finally, we used the concept of the Bezier curve to plan out the evacuation route and ensure that the medical assistive device can navigate by following the track and avoiding obstacles in an intelligent space. It not only cuts down the hardware building cost, but also prevents congestion during navigation. Besides simplifying the calculation, this method conforms to the environment of an ordinary family, constructs a platform that is equipped with the function of the Internet of Things (IoT), and expands the function of the corresponding space.

Principle
Traditional medical assistive devices are shown in Fig. 2. Figure 2(a) shows an electric wheelchair and Fig. 2(b) shows an electric bed. It does not have movement power and the motor that is controlled by a controller is mainly used to adjust the sleeping position. When accidents, such as a fire, occur at night, these medical assistive devices may become ineffective in the resulting adverse environment without manual guidance and cannot increase the survival rate. To resolve these problems, a gyroscope is added to the medical assistive device. The RSS signals of both the WIFI router and the gyroscope on the medical assistive device would aid in the positioning identification of the assistive device. Thanks to the interaction with the IoT system, in this study, we not only built an automated navigation and interaction system for medical carriers in an intelligent indoor space, but also indirectly built an IoT platform for the intelligent indoor space. The relative technical strategies are described next.

Indoor location measurement and tracking strategy
Defining an interactive and safe intelligent space requires not only the identification and elimination of hazardous and dangerous environments, but also the provision of comfortable and safe evacuation information for the users. As Zheng et al. showed, (1) recent studies of indoor navigation have focused on emergency lights and environmental monitoring functions. When a carrier requires indoor navigation, the system provides safe evacuation information for guidance along the evacuation route. However, it uses serial queries and needs to ask for the right routes along the way during the indoor navigation. Thus, an emergency light needs to be installed at every exit and corner. However, many emergency lights would be needed for evacuation, leading to an increase in the hardware costs when there are numerous corners, as well as an increase in the time needed to calculate the escape path. To resolve these issues, in this study, we installed an AP and a gyroscope on the emergency light. Since the emergency light with an AP only needs to be installed at the evacuation exit, navigating to the AP is, in effect, moving to a safe place.
In the study, an AP provides mobile devices, such as a cellphone or a tablet, with a WiFi connection; this is the most commonly used means of communication. The communication is accomplished with two end devices. If we define the mobile device as the receiving end, the strength of the electric wave shows a relationship of attenuation proportional to the distance from the AP when the mobile device receives the radio wave from the AP. Therefore, the RSS is the feature that can be used to identify the distance from the AP and one of the major points of focus in the technological developments of indoor positioning in recent years. The received signal strength indicator (RSSI) is an indicator corresponding to the RSS. It is used to calculate the relative relationship between the signal power P and 1 mW. The calculation formula is If ρ is the RSSI signal of an AP, the distance between the receiving end and the AP can be calculated as where d, A, and n represent the calculated distance, the signal strength at a distance of 1 m between the AP and the receiving end, and the transmission attenuation factor in the inner space, respectively. However, this only indicates the distance between the AP and a single receiving end and cannot identify the location of the receiving point in the space. Thus, in various studies, the distance information of multiple APs was used to calculate the location. Figure 3 shows, for example, three APs that are used as apexes in the triangulation method. The positioning calculation method in the literature is the Ranger-based technology. (1) It uses the mass information of the distance and orientation for the calculation. Other methods include the time of arrival (TOA), (4) angle of arrival (AOA), (4,10,11) and time difference of arrival (TDOA). (5,8,10,11) Most of them combine the RSS of the AP in the calculation of the location. During the process of navigation, constant location calculation or constant detection of the RSS signal from the AP is required. This brings about too much cost for the controller and greater electricity consumption during the track control calculation. It requires a higher level of hardware and higher cost. An AP can usually provide a communication radius of 300 m and, in practice, not many APs are needed in an indoor space. In the traditional calculation of the amount of electricity needed, the increased numbers of messages exchanged process between medical assistive devices and the AP will lead to communication congestion. The increase problem in building an escape route will also cause the misplacement of any obstacle not added to the navigation route in advance. To resolve these problems, in this study, we propose a navigation technology that does not require constant communication with the AP during the navigation process. It needs only access to the location of the AP twice to calculate the navigation route. The positioning concept is shown in Fig. 4. With reference to the RSS (/RSSI) signal, it is very easy to calculate the distance d between the medical assistive device and the AP using Eq. (1). However, it is difficult to determine the relative locations of the AP and the medical assistive device since any location on the circumference can satisfy the logical condition that the distance d is used as the radius and the AP as the center. Hence, we cannot determine the location accurately by using only the RSS (/RSSI) signal. For our purpose, we separate the navigation process into initialization and automated navigation. In case only one AP is used for navigation, we must first determine the relative location between the medical assistive device and the AP in the initialization step to provide the information necessary for driving the medical assistive device in the automated navigation step. To achieve this, a gyroscope is added to the medical assistive device to help calculate the location in the initialization step. To determine the location of the AP relative to the medical assistive device in this step, the z-axis value must be constant in the deduction process. Since in practice the AP is integrated in the emergency light and the latter is set up at the door to assist the navigation, the value of the z-axis representing the distance from the AP to the ground is unchangeable, and the real distance z that satisfies the requirements in the deduction is acquired easily. In the initialization steps, we first acquire the RSS (/RSSI) signal of the first AP, transmit the z-axis value to the medical assistive device, and transform it into the distance d a , as shown in Fig. 5(a). As Figs. 5(b) and 5(c) show, the RSSIs at the second and third points are taken after moving a known distance ΔR along the direction specified by the gyroscope on the medical assistive device, i.e., x-axis ΔX and y-axis ΔY with the medical assistive device as the origin point, and then are transformed into the distances d b and d c . The speed of the medical assistive device is controllable during the movement and only the calculation of the time gap is needed, so ΔR is easily acquired as a known value. Either the AP has an emergency lighting function with an installation height restricted by law, or a height test module can be added so that the value of the z-axis is known in the inner space. Thus, let θ be the angle of movement and = X Y . The relative distance component is (x ma and y ma ) according to the information on the X-Y axis of the gyroscope provided by the medical assistive device, and the distance component of the X and Y axes can be calculated as With reference to Figs. 5(b) and 5(c), E A and E B represent different APs and simulate the actual installation locations of these APs. We observe the changing distance relationship between the AP and the medical assistive device as it moves, as shown in Figs. 5(b) and 5(c). If the movement along the Y-axis of the medical assistive device is away from the actual location of the AP, d b will definitely be more than d a ; if the movement is toward the AP, d b will be equal to or less than d a. Therefore, we can use the two distances to determine whether the AP is actually located at the point at which the medical assistive device is moving. Table 1 shows the strategy for determining whether the relative location of the AP is in front of or behind the medical assistive device after determining the moving distance ΔY along the direction indicated by the gyroscope on the medical assistive device and obtaining the location information d b . Then, the medical assistive device moves a distance ΔX along the X-axis indicated by the gyroscope on the medical assistive device and we obtain the third location information d c . d c will definitely be more than d a , which is further from the actual location of the AP; if moving toward the AP, d c will be equal to or less than d a . Therefore, Table 2 indicates the strategy for determining whether the relative location of the AP is to the left or right of the medical assistive device. Therefore, let f be a variable and define the SIG symbol equation.
However, the distance relationship from the medical assistive device to AP is important in the implementation of automatic indoor navigation. The medical assistive device is defined as the center, and x y is the relative location between the AP and the medical assistive device.
Since the value of Z, which is the actual AP height, is known, as described in a previous manuscript, the distance R will be the only value that needs to be calculated in the space. In this study, we used the cosine theorem to calculate the angle ˆ α that d a and d b project onto the X-Y coordinate in Fig. 5(a). The element " " in the equations indicates a calculated value. As listed in Table 3, ˆ α can help determine the location of the AP relative to the medical assistive device.
After determining the relative location between the AP and the medical assistive device, we calculate the actual value of the distance to devise the navigation route. The relative locations x = x ap and y = y ap of the AP to the X-Y plane can be calculated as The navigation route is set up in the automatic navigation step after the medical assistive device receives the information from the AP, and the calculation of the location and the initialization are completed. The linear distance is geometrically the shortest distance. However, the route for the medical assistive device must be arranged in consideration of restrictions, such as those of the building, to prevent the occurrence of cases where the medical assistive device cannot move through the route owing to the presence of obstacles. IoT provides basic communication and mobility for devices and allows the transmission of information and automated positioning. During the automatic navigation for evacuation, the medical assistive device can plan the navigation route on its own after interacting with the environment.
After determining the relative location of the evacuation exit, the medical assistive device must plan the navigation route on its own. It has the fastest speed when moving along a linear route, but may be restricted by obstacles in the space. Even without any obstacles, corners may exist on the evacuation route, making planning of the navigation route more difficult. However, with the support of IoT, in a space with obstacles, the method mentioned above can be used to calculate the location relative to the medical assistive device. To avoid communication congestion, the centralized computation method should not be used in the navigation route plan because it will affect the efficiency and limit the number of medical assistive devices. A way to address this issue is to allow the medical assistive device to devise a plan on its own. However, we also take into account computational resource problems, such as obstacles present in the space, corners on the navigation route, and the reduced speed of the medical assistive device rounding corners. Therefore, in this study, we adopt the Bezier equation with a simpler structure to help devise the evacuation route. The Bezier equation can plan a navigation route that overcomes these problems with the final location being the exit. As Fig. 6 shows, P1 and P4 represent the locations of the AP relative to the X-Y plane with the medical assistive device as the center of the space. P2 and P3 represent the simulated locations of obstacles. When there is no obstacle, P2 and P3 are determined in accordance with the size of the medical assistive Table 3 The discriminant for determination of the AP location.

Discriminant
Location relative to medical assistive device ( ) Here, t is a number between 0 to 1. If the m checkpoints are set up along the evacuation route and n stands for the ordinal number of a checkpoint, assuming that n t m = , Eqs. (12) to (14) can be redesigned to acquire the following values. Figure 7 shows a positioning and navigation control flowchart.

Strategy of environmental interaction
In the literature, only a few studies on the interaction with the surroundings that are of electric use were found. As a result, the automatic navigation strategy that we propose in this study includes the interaction of the medical assistive device with the environment for the avoidance of dangerous places. One AP, gyroscope, and distance sensor are installed in each emergency light. In addition to providing a communication function, they are also responsible for interacting with the environment to trigger the signal to activate the emergency lights or the evacuation indicator lights. They can be installed in any other device as well. In this study, a large space with APs is also taken into consideration. We are proposing that every built-in AP, gyroscope, and distance sensor must also detect the status of the environment around the space. When one AP detects safety-threatening events such as a fire, it immediately provides a warning light and shuts down the AP function, leaving the APs in other safe positions available in the space. When the medical assistive device is moving, it chooses an arbitrary AP to automatically map out a navigation route for evacuation. Since every medical assistive device only sends a gyroscope itself after a random AP selection and then creates an evacuation route, the amount of communication during the process should be nominal and hence, communication congestion of the AP will not occur. Figure 8 shows a strategic flowchart of the interaction between the AP and the environment in the space.

Simulation and Experiment
To test and verify the feasibility of the strategy proposed in this study, Fig. 9 shows an electric vehicle equipped with a bluetooth device and a gyroscope, used to simulate the medical assistive device. It was also combined with a personal computer (PC) with bluetooth functions to track the process of the electric vehicle. Two APs (E A and E B ) were also used to construct a testing platform. Figure 9(b) shows their actual installation in the space. The two APs were both installed 200 cm (H 1 ) from the ground, and the electric vehicle (medical assistive device) was on the X-Y plane with the distance component being x 1 = H 2 = H 4 ≈ 40 cm and y 1 = H 3 ≈ 300 cm. Figure 8 shows the strategic flowchart of the interaction between the AP and the environment. The AP information accessed in different environments by the electric vehicle was indicated on the PC, as shown in Figs. 10(a) and 10(b). In the following experiment, the electric vehicle was first placed at the start point shown in Fig. 9(b). When E A is on and E B is off, safety-threatening events are simulated on the right side of the environment. In the initialization step, the electric vehicle calculated the location of the AP in relation to itself. Then, during automatic navigation, the gyroscope on the electric vehicle followed the Bezier curve route, which was in agreement with the positioning information planned in the initialization step. After the electric vehicle moved, it sent the location information through the bluetooth device to the PC at a fixed time. The PC then used Matlab © to draw the waveform. The electric vehicle moved automatically along the Bezier curve, and since the location of the AP was known in the initialization step, the electric vehicle could move on its own. However, to test and verify the accuracy of the proposed strategy in this study, the RSS/RSSI signal of one point could be accessed again to calculate the distance before sending the data to the PC. The direction information of the gyroscope on the electric vehicle and the Bezier curve information were then used to calculate the relative location of the AP, and this location was sent back to and displayed on the PC. Figure 11 shows the Bezier curves drawn with the electric vehicle as the center, when the distance was 300 cm and the number of checkpoints m was 10, 20, and 30. Considering that the navigation followed the Bezier curve, the final navigation times in the three cases were different. Thus, we designated the Y-axis as x 1 = 300 cm and the X-axis as the    normalized value of each implementation time in Fig. 11. Figures 12 to 14 show the positioning carried out by the electric vehicle when E A was on and E B was off in the initialization step. The graphs in Figs. 12-14 corresponded to the environmental space, the X-Y axis plane, in the experiment. They also adopted the simulation and actual information with m checkpoints sent back by the electric vehicle. The information was then displayed on the PC.

Conclusions
We proposed a new navigation technology for indoor space, using the RSS (RSSI) signal of only one AP and the direction information of the gyroscope on a medical assistive device to perform the navigation. Since only three sampling points are needed, instead of consecutive communication, the problem of communication congestion is effectively smoothed out and thus this method is suitable for the current user environment. The medical assistive device also interacts with the environment on the basis of the current status of an intelligent space, combining the emergency lights activated with safety-threatening events and automatically building a navigation route through a large area using the Bezier curve.
The aim of this study is to develop an automatic intelligence technology for medical assistive devices in an open space. The medical assistive devices are equipped with high mobility, and an automatic evacuation function is also available for times of danger. The experimental data indicated the feasibility of automatic indoor navigation.