**3. Object localization using only RSSI**

#### **3.1. Object localization method**

While RSSI has a dependence on the distance between the nodes, the RSSI values do not change linearly with the distance. Although the RSSI is sensitive to some types of environ‐ mental noise, an RSSI from a fixed location almost always indicates the same value, regard‐ less of the time. Therefore, our main idea is to reduce the environmental effects on the RSSI by not using just a single RSSI, but by using a pattern extracted from several RSSIs. To real‐ ize this idea, we must introduce three kinds of pattern recognition method.

The three kinds of pattern recognition method used in our work are the k-nearest neighbor (KNN), the distance-weighted k-nearest neighbor (DKNN) [10], and the three-layered neu‐ ral network (NN) algorithms. KNN is a method for classification of objects based on the closest training examples in the feature space. The nearest neighbor algorithm, which means that K equals 1, has strong consistency results. As the amount of data approaches infinity, the algorithm is guaranteed to yield an error rate that is no worse than twice the Bayes error rate, which is the minimum achievable error rate given the distribution of the data. KNN is guaranteed to approach the Bayes error rate, for some value of K. DKNN is an extension of KNN, which weights the contributions of the neighbors, so that the nearer neighbors con‐ tribute more to the average than the more distant neighbors. We use the inverse of the squared Euclidean distance as a weight function. NN is a kind of classification technique. It is known that NN can demonstrate high discrimination ability for data that has multiple di‐ mensions and is linearly inseparable. We therefore adopted these three methods in our work for object location estimation with RSSIs.

**Figure 3.** Communication protocol overview.

#### **3.2. Experimental conditions**

**2.2. Reference nodes**

228 Radio Frequency Identification from System to Applications

because they do not move.

**2.3. Communication protocol**

**3. Object localization using only RSSI**

**3.1. Object localization method**

A reference node is used for communication with the target nodes and for collection of the environmental sensor data. The node consists of an Arduino and an XBee. The node is capa‐ ble of connecting to various sensors for environmental data collection. In our experiment, the node contains the same sensors as the target nodes and switch sensors to detect human behavior such as sitting and sleeping. Because the reference nodes cannot move if they are to provide localization reference data, the nodes are attached to fixed objects such as furni‐ ture and electrical appliances. The electric power is supplied to these nodes by a power line,

The computer for object and human localization collects and controls all the sensor data and the RSSI values. For synchronization and simultaneous data collection, the computer con‐ trols the targets and the reference nodes separately with two gateway nodes, which are called client nodes. A typical communication example is shown in Fig. 3. In the figure case, the target nodes and reference nodes transmit sensor data periodically. The reference nodes also regularly gather RSSI values between the reference nodes to estimate human presence and human location based on the algorithm given in section 5 of this paper. When the target node detects object handling using the acceleration sensor, the node transmits a signal to in‐ dicate the handling of the object by the occupant. After transmission, the node sends the state of the target node periodically. When the node detects that the object has been put down somewhere, the node broadcasts the putting down action to all reference nodes. Final‐ ly, the target node receives each reference node's data with RSSI values and transmits all da‐ ta to the client node. The computer calculates the object location from the collected RSSIs.

While RSSI has a dependence on the distance between the nodes, the RSSI values do not change linearly with the distance. Although the RSSI is sensitive to some types of environ‐ mental noise, an RSSI from a fixed location almost always indicates the same value, regard‐ less of the time. Therefore, our main idea is to reduce the environmental effects on the RSSI by not using just a single RSSI, but by using a pattern extracted from several RSSIs. To real‐

The three kinds of pattern recognition method used in our work are the k-nearest neighbor (KNN), the distance-weighted k-nearest neighbor (DKNN) [10], and the three-layered neu‐ ral network (NN) algorithms. KNN is a method for classification of objects based on the closest training examples in the feature space. The nearest neighbor algorithm, which means that K equals 1, has strong consistency results. As the amount of data approaches infinity, the algorithm is guaranteed to yield an error rate that is no worse than twice the Bayes error

ize this idea, we must introduce three kinds of pattern recognition method.

To investigate the basic object localization performance of the ZigBee-based RFID sys‐ tem, we conducted three experiments. Generally speaking, the classification performance depends heavily on the parameters used in the pattern recognition algorithm. For exam‐ ple, the performance of KNN or DKNN is dependent on the parameters such as the val‐ ue of k, whereas the performance of the NN depends on parameters such as the number of nodes in the hidden layer. In our experiments, we tried various cases by varying the parameter values and chose the best combination of the parameters according to the esti‐ mation performance.

The experimental environment and conditions are shown in Fig. 4. The room contains various articles of furniture. Generally speaking, the largest contributors to reduced local‐ ization accuracy are environmental obstacles such as furniture made of metal. This envi‐ ronment provides extreme conditions for localization. However, the difficulty in localization using RSSIs in this environment helps to show that our proposed method is valid in actual living spaces.

learning database that contains 50 data sets per location. The other is that as long as the sys‐ tem uses KNN or DKNN as the pattern recognition method, the estimation accuracy is not so heavily dependent on the number of learning data. However, 3-layered NN has increas‐ ing difficulty in estimating the object location as the number of learning data increases.

Object and Human Localization with ZigBee-Based Sensor Devices in a Living Environment

http://dx.doi.org/10.5772/53366

231

The estimation accuracy at each location with the 3-layered NN is shown in Fig. 5b). The graph demonstrated that the "Table" seems difficult to estimate with the NN. This is because the table is located right in the middle of all of the reference nodes, which means that the

We conducted another experiment to investigate how well our proposed method can ac‐ commodate an increase in the number of locations. In this experiment, we added 5 new loca‐ tions, shown in Fig. 4, to the existing 12 locations. We used a learning database consisting of 50 training data sets for each location and 5 reference nodes to measure the RSSIs with the

Figure 6a) shows that our proposed method can estimate object location effectively even when the number of locations increases. In particular, it has been proved that estimation with KNN and DKNN is hardly affected by an increase in the number of locations, whereas estimation with the 3-layered NN becomes worse when the variety of locations increases. In Fig. 6b), we can see a similar tendency to that which appears in Fig. 5b). However, in this case, the estimation accuracy of the "InCabinet" state also drops seriously along with that of the "Table" state. The reason for this phenomenon is thought to be that it is becoming in‐

creasingly difficult to distinguish the "OnCabinet" state from the "InCabinet" state.

table is far from every reference node.

**Figure 5.** Experimental results with regard to the number of learning data.

*3.3.2. Estimation with different numbers and types of locations*

target node.

To evaluate our estimation algorithm based on pattern recognition methods, we conduct‐ ed experiments under different conditions: 1) estimation with different numbers of learn‐ ing data; 2) estimation of different numbers and types of locations; and 3) estimation using different numbers of reference nodes. We collected the same number of RSSI data sets (about 50 to 150) from each of the 17 labeled locations as data sets. The parameters for each of the pattern recognition methods were tuned in advance with the data sets. For performance evaluation, we calculated the estimation accuracy, which is the rate of true positives among the total number of data sets. Ten-fold cross-validation was per‐ formed to eliminate any data bias.

**Figure 4.** Experimental conditions for object localization using only RSSI.

#### **3.3. Experimental results**

#### *3.3.1. Estimation with different numbers of learning data*

As mentioned above, we collected RSSI data at each location in the environment and used these data sets to classify objects into particular locations. In Fig. 5a), "n" indicates the num‐ ber of RSSI data sets collected at each location.

The graph of the results suggests two things to us. The first is that 50 learning data sets per location are sufficient for localization. Therefore, in the following experiments, we used a learning database that contains 50 data sets per location. The other is that as long as the sys‐ tem uses KNN or DKNN as the pattern recognition method, the estimation accuracy is not so heavily dependent on the number of learning data. However, 3-layered NN has increas‐ ing difficulty in estimating the object location as the number of learning data increases.

The estimation accuracy at each location with the 3-layered NN is shown in Fig. 5b). The graph demonstrated that the "Table" seems difficult to estimate with the NN. This is because the table is located right in the middle of all of the reference nodes, which means that the table is far from every reference node.

**Figure 5.** Experimental results with regard to the number of learning data.

localization using RSSIs in this environment helps to show that our proposed method is

To evaluate our estimation algorithm based on pattern recognition methods, we conduct‐ ed experiments under different conditions: 1) estimation with different numbers of learn‐ ing data; 2) estimation of different numbers and types of locations; and 3) estimation using different numbers of reference nodes. We collected the same number of RSSI data sets (about 50 to 150) from each of the 17 labeled locations as data sets. The parameters for each of the pattern recognition methods were tuned in advance with the data sets. For performance evaluation, we calculated the estimation accuracy, which is the rate of true positives among the total number of data sets. Ten-fold cross-validation was per‐

valid in actual living spaces.

230 Radio Frequency Identification from System to Applications

formed to eliminate any data bias.

**Figure 4.** Experimental conditions for object localization using only RSSI.

*3.3.1. Estimation with different numbers of learning data*

ber of RSSI data sets collected at each location.

As mentioned above, we collected RSSI data at each location in the environment and used these data sets to classify objects into particular locations. In Fig. 5a), "n" indicates the num‐

The graph of the results suggests two things to us. The first is that 50 learning data sets per location are sufficient for localization. Therefore, in the following experiments, we used a

**3.3. Experimental results**

#### *3.3.2. Estimation with different numbers and types of locations*

We conducted another experiment to investigate how well our proposed method can ac‐ commodate an increase in the number of locations. In this experiment, we added 5 new loca‐ tions, shown in Fig. 4, to the existing 12 locations. We used a learning database consisting of 50 training data sets for each location and 5 reference nodes to measure the RSSIs with the target node.

Figure 6a) shows that our proposed method can estimate object location effectively even when the number of locations increases. In particular, it has been proved that estimation with KNN and DKNN is hardly affected by an increase in the number of locations, whereas estimation with the 3-layered NN becomes worse when the variety of locations increases. In Fig. 6b), we can see a similar tendency to that which appears in Fig. 5b). However, in this case, the estimation accuracy of the "InCabinet" state also drops seriously along with that of the "Table" state. The reason for this phenomenon is thought to be that it is becoming in‐ creasingly difficult to distinguish the "OnCabinet" state from the "InCabinet" state.

ence nodes, although it demonstrates better ability than KNN and DKNN when the number

Object and Human Localization with ZigBee-Based Sensor Devices in a Living Environment

http://dx.doi.org/10.5772/53366

233

These results indicate that the ZigBee-based RFID system has the capability for object locali‐

The conditions for previous experiments are far from realistic. In a living environment, hu‐ mans are present and handle the tagged objects. The existence of a human degrades the lo‐ calization performance because the human body disturbs the radio waves. Our system can measure not only the environmental sensor data but also the sensor data on the target no‐ des. We extended our previous method [7] to be able to handle the sensor data on the target nodes. Because the previous method limits the location candidates based on estimated hu‐ man behavior, location candidates are also limited in the new method based on sensor data

In the following algorithm, we use DKNN for RSSI-based localization. Because the sensor data on the target nodes indicates the node location well, the algorithm merges the sensor data on the target nodes into the RSSI-based localization results before combination of the

In our system, each target node contains a humidity sensor, a temperature sensor, and a lu‐ minous intensity sensor. The humidity and temperature sensors show changes only at spe‐ cific locations, whereas the luminous intensity sensor is highly sensitive to the environment. This is why the system changes the estimation priority relative to the sensors that have re‐ acted. First, the system integrates the estimation based on humidity or temperature sensors into the RSSI-based estimation. Then, the system integrates the estimation based on the lu‐

Because both the humidity sensor and the temperature sensor change dramatically only at specific locations, the system gives top priority to estimations based on these sensors. For example, because the system can detect object motion through the acceleration sensor, if the humidity rises around the time when an object is set down, it probably indicates that the object has been placed near the sink, because the sink is the only place that can cause a dra‐ matic change in humidity. In the same way, if the temperature drops around the time when an object is set down, it suggests that the object has probably been placed inside the refriger‐ ator, because the preliminary experiments indicate that the temperature only changes dra‐ matically in the refrigerator. The system places its highest level of trust in these sensor

zation using pattern recognition methods under human-absent conditions.

**4. Object localization under human presence conditions**

*4.1.1. Integration of target-attached sensor data and rssi-based estimation results*

**4.1. Object localization using sensor data on target node**

of reference nodes increases.

on target nodes.

sensor data on the reference nodes.

minous intensity sensor into the results.

**•** Integration of Humidity and Temperature Sensor Data

**Figure 6.** Experimental results with regard to the number of estimation locations.

#### *3.3.3. Estimation by different numbers of reference nodes*

We conducted another experiment to investigate the influence of the number of reference nodes on the estimation accuracy. All the experiments above used the 5 reference nodes il‐ lustrated in Fig. 4. In this experiment, however, we changed the total number of reference nodes in two ways: one was to subtract two reference nodes from the existing nodes, and the other was to add three nodes to the existing nodes. In the former case, we only used the reference nodes installed at the kitchen cabinet, the TV shelf, and the sofa, while in the latter case we attached reference nodes to the bed, the shoebox, and the desk.

**Figure 7.** Experimental results with regard to the number of reference nodes.

The graph of the results shown in Fig. 7 suggests two things to us in particular. The first is that there is little difference in the best estimation accuracy with the different numbers of reference nodes. The other is that KNN and DKNN perform strongly with fewer reference nodes, whereas the 3-layered NN has trouble in estimating object locations with fewer refer‐ ence nodes, although it demonstrates better ability than KNN and DKNN when the number of reference nodes increases.

These results indicate that the ZigBee-based RFID system has the capability for object locali‐ zation using pattern recognition methods under human-absent conditions.
