INTEGRATED WITH SMART PHONES AND RFID DEVICES

High rise, complex and huge buildings in the cities are almost like a small city with their tens of floors, hundreds of corridors and rooms and passages. Due to size and complexity of these buildings, people need guidance to find their way to the destination in these buildings. In this study, a mobile application is developed to visualize pedestrian's indoor position as 3D in their smartphone and RFID Technology is used to detect the position of pedestrian. While the pedestrian is walking on his/her way on the route, smartphone will guide the pedestrian by displaying the photos of indoor environment on the route. Along the tour, an RFID (RadioFrequency Identification) device is integrated to the system. The pedestrian will carry the RFID device during his/her tour in the building. The RFID device will send the position data to the server directly in every two seconds periodically. On the other side, the pedestrian will just select the destination point in the mobile application on smartphone and sent the destination point to the server. The shortest path from the pedestrian position to the destination point is found out by the script on the server. This script also sends the environment photo of the first node on the acquired shortest path to the client as an indoor navigation module.


INTRODUCTION
High rise, complex and huge buildings in the cities are almost like a small city with their tens of floors, hundreds of corridors and rooms and passages.Due to size and complexity of these buildings, people need guidance to find their way to the destination in these buildings.Although there are a lot of studies about indoor navigation on 2D (two dimensional) maps, pedestrians need more realistic navigation system that routes pedestrians in buildings as 3D (three dimensional) (Musliman et al., 2009).
In this study, a mobile application is developed to visualize pedestrian's indoor position as 3D in their smartphone.User will select the destination point on smartphone.Indoor positioning of the pedestrian will be supplied by the RFID mobile device which the pedestrian holds during his/her tour.This mobile application uses client server architecture, the client side is represented by smartphone and RFID mobile device.The server side is represented by a web server, which holds a spatial database.Within the scope of this study, indoor environment is taken photo in three-meter intervals between all nodes and an environmental photo folder is established in the server.Every photo is processed one by one to decrease the storage size without losing much image quality due to making data transfer faster.The spatial database is designed by relating the nodes on 3D node networks with the photo folder in the server.Thus, this keeps the database information of indoor environmental photos of the building.Client (smartphone) connects to the web server on a wireless network connection and sends user defined route to the server.When the route information arrives to the server, a web service is activated to query database.The query is retrieving operation of environmental photos on the route.The result of the query consisting of a group of photos is sent back to application on the smartphone using the wireless network connection.While the pedestrian is walking on his/her way on the route, smartphone will guide the pedestrian by displaying the photos of indoor environment on the route.
There are many technologies and systems proposed for indoor positioning.RFID technology is a step ahead from other current technologies in terms of accuracy and other advantages.Today, there are some RFID readers and tags which are plug and play on smartphones.These portable RFID readers and tags which can be easily found in market are not widespread because of some disadvantages such as short read ranges, causing mobile devices run out of charge quickly and making attached mobile device grow in size.Beside, with the advancement of technology it is expected that RFID readers and tags are placed inside mobile devices in production just like integrated WIFI adapters and this advancement will provide a more effective use of RFID in the near future.Hence, mobile phones will be able to use RFID based indoor positioning systems and serve various personalized services.

RFID Technology
RFID is a term used to define wireless non-contact use of radio frequency electromagnetic fields to transfer identification data of an object for the purposes of identifying and tracking (Khong and White 2005).The data is stored in tags which is an electronic data storage device (Transponder tag) like smart cards.On the other hand, unlike smart card systems the power needed for both tags and transferring data between reader and tag is provided by use of non-contact electromagnetic field.A reader is required to receive data from a tag (Finkenzeller 2003).A reader loads energy to its antenna in order to make it transmit radio signals for activating tags and receiving data from tags.An activated tag transmits its data (Khong and White 2005).The antenna provides communication between reader and tag and some properties differ such as frequency range which affects the performance of the system depending on the shape and size of the antenna (Dziadak et al. 2009).
RFID tags can be either active or passive according to the power source.An active tag has its own power source generally obtained from a battery and this kind of tag transmits its ID periodically.A passive tag gets its power from the signal of the reader (Manish and Shahram 2005).
Two fundamental components of an RFID system are reader and tag.Beside this, antennas, computers and database systems are used in order to make system more effective.Components of an RFID system are shown in Figure 1.Another important issue is the frequency range of the reader.Available frequencies are LF (Low Frequency), HF (High Frequency) and UHF (Ultra High Frequency) (L.Wang et al. 2007).In addition, frequency ranges such as SHF (Super High frequency) or microwave can be used.

Developed Software that Running on RFID Device
In the study, a software for the mobile RFID devices has also been developed.Geographical proximity approach has been used in this program.In every two seconds, RFID reader receives data from the tags within the reading range.Receiving data period also can be set by the user in "Configuration" tab (Figure 1).At the end of every period, the tag which has the strongest signal is determined by the software based on collected data.
Then the predefined coordinates of this tag are sent to the user.

MOBILE APPLICATION
The application is aimed at Android Mobile Operating System that has a widespread user and developer groups on the world (Dimarzio, 2008) ) http://developer.android.com.Script on the web server to query on the database is coded in PHP (Hypertext Preprocessor) web based programming language.Oracle Database 11g Database is used on the web server as database management system to keep all information (nodes, links, the paths of photos, extra definition about points and so forth) about the mobile application.The results of query on the server is formatted as JSON (JavaScript Object Notation) to make a lightweight data transfer from the server to the smart phone www.json.org.

Figure 2. Architecture of the mobile application
This study is realized in three basic steps.In the first step, the database of the application is designed and provided a sample indoor environment's data.In the second step, the Android mobile application that works on client (smart phone) is developed.At the last step, a web based script is coded to connect to the database and to retrieve the photos on the route of pedestrian from the database on the server.

Database Design
In the database design, five tables was used to keep the data of the project (Figure 3).The first table is "INDOOR_NODE" table that keeps the information such as the name and the coordinate of each node in the building.The second table, "INDOOR_LINK" keeps the information of links between nodes in the building.In this table, every link has a specific identification number, a start node and an end node.Besides, the link table keeps geometric information about the link.

Figure 3. ER Diagram of Database
The first two table is also necessary for making spatial analysis such as finding shortest path.
The third table, "INDOOR_SUBNODE" keeps the name of some important point for navigation in the building.Nodes are intersection points of different link but subnodes are important points on the links.Each subnode has two photos in the database.One of them shows the environment while coming to subnode, another one shows the environment while leaving the subnode.The fourth table "INDOOR_PHOTO" keeps these photos for each node.
The last and fifth table, "INDOOR_TAG" keeps the coordinate of the responder RFID tags in the building.Each tag belongs to a subnode or a node.This table has two column subnodeid and nodeid that specify related subnode or node.So, while the user walking in the building RFID reader will read a tag and then the proposed indoor navigation system will detect the location of user.So the system will load the related environmental photo and route the user in the building.

Development of Mobile Application
In the development of mobile application step, a graphical user interface is designed for pedestrian on the smart phone.There are two drop down boxes on the screen, one is for specifying the start node and another is for specifying end node.In this way, the pedestrian will define and add all links on his/her way.The pedestrian clicks on the send button on the screen just before he/she starts the tour.Then the mobile application sends the list of nodes, which pedestrian will visit along the tour, to the server in order.The application connects to the server by using http protocol.The script on the server will run and send the photo frames back to the smart phone.Thus, the indoor photos will be loaded to the smart phone in every three seconds, periodically.The period for loading the indoor photos to smart phone is defined as three seconds why a normal pedestrian would probably walk three meters in three seconds.Therefore, every point in the pedestrian's route will be displayed on the smart phone.

Development of Web Script
In the last step of the study, a PHP script is developed running on an Apache web server.The script takes the departure and destination node as argument coming from Android application.The script finds the shortest path between departure and destination.Thus, the script reveals the links on the pedestrian's route and navigate the pedestrian according to the defined route.The script also sends the photo of indoor environment according to the position data supplied by RFID device.The navigation data and environmental photo is sent back to the client as JSON format using http protocol.

FUTURE PLAN
In this study, an RFID based indoor positioning system has been introduced.An RFID (Radio-Frequency Identification) device was integrated to the indoor navigation system for smartphones.The pedestrian need to carry an RFID device during his/her tour in the building.RFID device is used to determine the exact position of the pedestrian in indoor environments whose all floors, corridors, passages and rooms are equipped with RFID tags.The RFID device, handed by the pedestrian, reads the tags and find out pedestrian's 3D position in the building.The RFID device will send this position data to the server directly in every two seconds periodically.As soon as the script on the server gets the position data from RFID device and destination points from the smartphone, then it finds out the shortest path from departure point of the pedestrian to the destination point.The script sends visual navigation information to the client to inform the pedestrian on his/her way.
The success of the mobile RFID device in estimating positions is 76%.In the case that position estimation error has been considered ± 1 meter, 87 measurements out of 90 which approximately correspond to 97% of total has provided the criteria.In the worst case, position estimation error has been obtained 2 meters.In 3 measurements out of 90 which approximately correspond to 3% of total, position estimation error has been observed 2 meters.Each indoor environmental photo could be loaded to the smartphone in two seconds by the script on the server via WiFi internet connection.So the pedestrian will get a real-time working indoor navigation system that is running on smartphone.
Figure 5. RFID device integrated navigation module

ACKNOWLEDGEMENT
This study was supported by TUBITAK -The Scientific and Technological Research Council of Turkey (Project No: 112Y050) research grant.We are indebted for its financial support.

Figure
Figure 4. Mobile Application