Indoor Localization Using a Modern SmartphoneCarick WienkeAdvisor: Dr. Nicholas Kirsch Department of Electrical and Computer Engineering Sensor Systems Measurements Trilateration using WLAN Signals The wireless signals are attenuated as they travel from the transmitter to the receiver. The power of the signal at a given distance can be approximated using the log-distance path loss model: The distance can be calculated if the constants and are found. These are functions of the access point and building which are found through sampling the signal strength at known distances. This is shown in Figure 1. Once the distance from all the access points is known, the most probable position is found by using the least squares method of approximation. The best guess, , is found by minimizing the sum of the squares of the error, in the equation below. Because this is nonlinear, solving requires an iterative approach and it is determined by sampling the function . Problem Description Although indoor localization is an important tool for a wide range of applications, such as helping ﬁreﬁghters navigate through a burning building, or a business man trying to ﬁnd a room in a complex building, current localization systems are not able to provide precise positioning information. The most common system, Global Positioning System (GPS), is inaccurate indoors due to the delays caused by signals propagating through the structure. is the path loss exponent is the distance from the access point is the reference distance is the received power in dB is the received power at in dB Implemented Solution • Because the received signal strength (RSS) of wireless signals is a function of the distance between the transmitter and receiver, location can be approximated using trilateration if the location of transmitters and RSS are known for multiple signals. Wireless LAN (WLAN) signals were chosen due to the predominance of WLAN access points in buildings. • WLAN signals strength is far greater than those of satellites, however the location information gathered from WLAN signals suffers from the same problems as GPS signals: the noise caused by the infrastructure. To improve the position estimation, the result of trilateration will be complemented with knowledge about previous location, direction of movement, and the floorplan of the building. • Modern smartphones and handheld computers, such as the Dell Streak, have sensors and an interface that can be used to calculate additional metrics to increase the accuracy of the trilateration. The benefits of this method include: • Handheld devices that contain the required sensors are becoming more common • Uses the existing infrastructure, reducing cost • Minimal information about the building is required Figure 2 Sample accelerometer data while walking. Results is the number of access points with a received signal is the location of the access point is the approximate distance from the access point When using only WLAN information, the device is generally accurate to approximately 10 to 15 meters. There are exceptions, usually when the user is located towards the edges of the map where there are fewer access points. When direction of movement is added, the radius can be reduced depending on Direction of Movement Android devices contain three accelerometers that each measure along a different axis. These measurements can be used to determine if and, if so, in which direction, the user is moving relative to the orientation of the device. For simplicity, the device is assumed to the parallel to the ground. This assumption allows for using vertical acceleration, to determine if the user is moving by checking if the difference between two successive readings is greater than a threshold. The horizontal accelerations, and , are used for calculating direction of movement in the device’s coordinate system. The device has a compass, giving the orientation of the phone relative to the Earth. With this information and the known orientation of the building relative to the Earth, the orientation of the phone relative to the building is calculated. the amount of intersection of the consecutive guesses. This will give a location that is accurate to 8 meters or more, but never larger than either of the two approximations. When the direction of movement is compared to the floor plan, the area of interest is not reduced, but the best guess is updated to be in the area where the direction of movement matches predicted movement patterns. This can produce a wrong best guess when the user is close to an intersection and is not moving along the hallway. Algorithm Figure 1 Once WLAN RSS data is collected, to find and , the distance from the access point is converted to a logarithmic scale. is the y-intercept; is the slope Improvements Allowing a user to calibrate position: If the user could take a picture of a room number sign, the application could precisely locate the user and use this to help determine future locations. Localization inside of rooms: Because movements inside of rooms is more difficult to predict, it was not implemented and the application will try to snap to a location in a hallway. If the application knew about the entrances and exits of a room, once the user uses an entrance the application could keep the user in the room until he uses an exit. Smooth updating of location: The current implementation updates the location only when the scan completes and the location of the user will jump. The location could be updated as the Stage 1 The device scans for WLAN signals within range. When the scan is complete, it calculates the approximate radius from each access point, shown in red above. Using the Least Squares method described in Sensor Systems, the best guess and radius of area of interest are determined, shown in teal. While the device is scanning, it is continually updates direction of movement. Stage 2 The total movement between the two scans is accumulated and the previous guess, faint purple, is shifted by the total movement between the two scans to create the purple circle. At this point we expect to be inside both the shifted previous guess and the current guess. Stage 3 A new guess is calculated by determining the circle that is centered equidistant from both circles and contains the whole intersection of the two circles; this is the shaded blue circle above. The circle calculated in this stage is the circle that is shifted in the second stage of the next iteration. Stage 4 The circle from the previous stage can be narrowed down further using the direction of motion again. Indoors, it is typical for people to walk in a similar pattern, e.g. along the hall. Using this, the position of the user can be snapped to a location where the direction of motion most closely follows predicted movement patterns. The darker areas are more likely to contain the actual location of the user. user moves and uses filtering of the new locations so that they jump less. Path finding, augmented reality: Once the localization has been improved, the program could route a user to a different location. This could be complemented by allowing the camera to be used as a heads-up display with the path overlaid on image.