Professional Documents
Culture Documents
September 2011
DECLARATION
This report is su
as part of the
course and is solely the original work of its author, except where clearly specified otherwise. It has not been
previously submitted to this or another university.
Student:
Signature:
Date:
Table of Contents
1. Abstract ......................................................................................................................... 3
2. Introduction ................................................................................................................... 5
3. Background & Literature Survey: ............................................................................ 12
4. Theoretical Development:......................................................................................... 27
4.1 System requirements: ............................................................................................ 27
4.2 RFID Global Standards: ......................................................................................... 30
4.2.1 The 900 MHz Class 0 UHF RFID tag specifications: ............................................. 30
4.2.2 The 13.56 MHz Class 1 standard: ............................................................................ 33
4.2.3 The 860MHz 930 MHz Class 1 RFID tags: .......................................................... 34
4.3 Design and theory:.......................................................................................................... 36
4.3.1 High accuracy positioning approach: ....................................................................... 39
4.3.2 Low accuracy positioning approach: ........................................................................ 46
2.
Scalability: ................................................................................................................. 52
3.
4.
References: ................................................................................................................... 62
Appendices: ......................................................................................................................... 66
2
1. Abstract
Radio Frequency identification - abbreviated RFID is a radio wave wireless
technology used to identify objects by reading date stored in an RFID tag attached
to them. This tag can be either an active or passive tag depending whether it has
its own source of power. The past decade has witnessed a vast spread of this
technology in many real life applications. The most widely spread use of these
applications is its role in supply chain management in factories, distribution
networks, Inventory, shops etc. However; it has many other applications in
access control (e.g: Oyster cards, vehicles parking etc), files archiving, animals
tracking, augmented Reality, and recently indoor positioning systems.
International RFID standards were defined earlier and helped a wider spread of
this technology.
RFID technology was introduced to indoor positioning field due to the lack of a
dedicated technology designed solely for this goal. RFID has many advantages
over other technologies used for this type of applications that made it the most
suitable for the field. Recently, many researchers have tried to provide a proof of
concept
through
experimental and
simulation
prototypes
using
different
This project will first investigate the theories and concepts associated with the
application field, and then will try to introduce two positioning approaches that can
be used in different types of environments. While the high accuracy approach uses
RFID reference tags and readers to estimate an accurate position of the target
item, the low accuracy approach is designed for usage when low accuracy
requirements are defined, especially when the targeted environment consists of a
number of rooms rather than one open space. The latter is a simplified general
positioning approach designed for a specific type of libraries as defined earlier.
Matlab simulation will be used to investigate the accuracy and reliability of the
introduced high accuracy approach. The simulation results have proven feasibility
and accuracy of this approach.
2. Introduction
RFID is an acronym for Radio Frequency Identification. Its a technology that
uses radio waves to automatically identify objects. This is achieved by storing the
required data (e.g.: an object ID number) within a microchip attached to the object
in concern, which allows a reader operating on a common wave frequency to
access this date once required [14].
AN RFID system consists of three components; the first is the RFID tag (simply a
tag or a transponder), which is a microchip that holds a small memory enough to
store a few kilobytes of identification data. There are two types of RFID tags: the
first is Active tags, while the second is Passive tags. On the first type, a battery is
attached to the tags chip to provide power to its radio communication and data
storage functions. This also allows higher range for signals but forces a shorter life
time. Tags of this type need to get their batteries replaced from time to time.
Otherwise; they might stop functioning. The second type uses the energy beamed
by the reader to reply to its request. This type of tags has the advantage of lower
cost and longer average lifetime. RFID tags are also classified to read only tags
and read/write tags. Table (1) bellow explains in details the differences between
active and passive tags [6] [8] [9] [14].
The Second component of an RFID system is the RFID reader (simply reader or
interrogator). It has the function of scanning for RFID tags upon request. This can
happen even with a situation of no line of sight as the radio waves can overcome
physical obstacles [9] [14].
5
The reader collects data and directs it to the third component of the RFID system;
which is a central computer with software dedicated to handle this data and control
its flow through the system and transforms it into meaningful information [9].
Power
Battery operated
No internal Pwer
Required Signal
Low
High
Small (128 b)
Strength
Communication
Range
Data Storage
Kb)
Tag cost
10-70)
Tag size
Various
Sticker
Fixed infrastructure
Higher (expensive
cost
readers)
cost
battery replacement)
Areas of use
point
Applications
Auto manufacturing
Supply chain
High volume
Construction
manufacturing
Mining
Laboratories
Pharmaceuticals
Remote monitoring
Passports
IT asset managemen
Electronic tolls
Item level tracking
Table 1: detailed comparison between active and passive RFID tags. [6] [8] [9] [14]
[20].
RFID is not a new technology, rather its origin dates back to World War Two.
Recently, RFID comes under the spotlight for its potential for changing the world
by replacing barcodes and providing many services that are unknown today [6].
The most common use of RFID technology is replacing traditional barcode
systems. It can do so due to the fact it has some advantages over barcode
systems. Those include the NLOS (non line of sight) property of RFID technology.
However, this is not the only advantage RFID has. Unlike traditional barcode
systems, RFID readers can read more than one tag at a time. And they can do so
under harsh conditions of heat, cold, and even chemical exposure. This due the
fact that The tag can be read through up to two inches of non metallic derbies
including paint, plastic, cloth and concrete [6].
Other advantages of RFID systems include but not limited to: placement flexibility,
speed of reading, and higher data capacity. Not to mention the fact that some
RFID tags are re-writable [6].
Due to the above mentioned pros, RFID systems are used nowadays in a wide
span of real life applications, including supply chain management (in factories,
distribution networks, Inventory, shops etc), access control (e.g: Oyster, vehicles
access etc), files archiving, animals tracking, augmented Reality, and recently
indoor positioning systems.
During the past decade, there has been a mass trend toward more research in the
field of indoor localization and positioning [3]. This field has recently gained more
interest to support applications such as item positioning in warehouses and
libraries, patient and equipment localization in hospitals, visitors guidance through
museums and large buildings, and autonomous robots guidance [14] [5] [1].
A few technologies have been tested to support this goal. Currently, many
wireless communication technologies are available or even designed for
positioning. Among them, Global Positioning System (GPS), WLAN (IEEE 802.11),
Bluetooth (IEEE 802.15) and RFID are most commonly used ones. GPS is a
satellite-based navigation system being widely used to track moving objects in
outdoor environment with great successes. However, poor coverage of satellite
signal for indoor and building intensive environments decreases its accuracy and
makes it ineffective for solving indoor positioning problems. The IEEE 802.11
standard () gains a growing favor in positioning applications. IEEE 802.11
WLAN is widely adopted in public hotspots. Therefore, positioning system based
The objectives of this research project is to study the suitability of using RFID
technology for items positioning within a library; the materials library within Kings
College London. Taking in consideration a few important conditions that usually
accompany working in such environments, such as the relatively large number of
items that might be targeted in the positioning process and the wide areas within
such library. Those conditions are reflected in the system requirements related to
performance, accuracy, cost and scalability.
Many studies took place trying to develop positioning systems using RFID
technology during the past decade. However most of those studies focused on
environments with a relatively small number of items [1], [13]. Others used RFID
for positioning of moving objects like robots [2] and cars [6]. But very few studies
have investigated the possibility of using RFID for positioning within a large
building like a library or a warehouse, with too many items leading to questioning
some performance and accuracy issues. (see the next section for more details).
9
Another great advantage that RFID technology also has is the wide adoption of
different RFID systems within libraries. The technology is already used as a base
for items management, borrowing systems, and security systems within libraries.
[14] Thus, the adoption of RFID based positioning systems might be of a relatively
lower cost comparing to other options. Such systems can use the infrastructure
already used by the available ones. This might also include the computer wired
and wireless networks for the communication between system components.
One of the research questions that are usually accompanied by positioning and
localization studies is defining accuracy requirements. Any study or design will try
to achieve perfect results with the highest possible level of accuracy. But
sometimes, tradeoffs need to be made between accuracy and performance. This
should not be seen as a shortcoming of the designed system as long as accuracy
requirements are fulfilled.
Another issue that is usually investigated is the need for acceptable accuracy level
even in dynamic environments. Environments in concern like warehouses and
libraries usually operate with some objects or people moving within. This
10
movement might affect the path of the radio waves take while trying to reach the
targeted item. Besides, it might make those waves take more than one unique
path; hence the positioning accuracy can be considerably reduced. Any designed
system shall consider this factor and enhance avoidance and reduction
mechanisms to deal with the noise caused by moving objects [10]. Hence, one can
clearly see how important is overcoming the issues like multi-path, obstacles
handling, and interference.
This study will first explore previous work on the field and investigate the current
state of art on the area. Then it will focus on designing two RFID positioning
approaches that can work in such environments. A mathematical simulation will be
built for the designed systems. Later, Matlab will be used to simulate the system
and investigate accuracy and performance issues.
11
SpotON (2000) is one of the earliest known RFID location system designs [13]. It
targeted creating an object tagging system that uses the radio waves strength
data, and focuses mostly on hardware and embedded systems. It used an
aggregation algorithm for three dimensional positioning. SponOn researchers have
designed a sample system to prove their approach which depends on independent
reader nodes without central control. They tried first to implement a positioning
system using commercial components, and then they described a custom
12
hardware design based on the experiments and lessons learnt on the first part
[13]. However, a complete system has not been made available as of yet [1].
Besides, as the cost of implementing so many independent sensors is expected to
be so high; cost issues were not taken in strong consideration. No detailed
estimation for cost issues was made [13].
Later on; a major enhancement in the field has been achieved as researchers
started using a new strategy to achieve more accurate positioning. This strategy
was based on the fact that older scopes depended mainly on signal strength as
received back to a few RFID readers. Thus, a location was determined referring to
the readers closest to the targeted RFID tag. However, the systems accuracy
depended mainly on the number of readers that can sense the target tag at the
time. Using more readers separated with shorter distances meant a higher
positioning accuracy. But this was on the account of cost. RFID readers are
expensive. Their cost was a major part of such system. An urgent need to
enhance another approach that achieves a higher accuracy with lower cost has
appeared [1].
A probable drawback of such design was the fact that the detected K nearest
reference tags might be different from the set of tags thats really surround it to
different factors, especially in the situation of having obstacles as shown in fig. (1).
Besides, it does not clearly provide a way to deal with dynamic environments. It
supposes that estimating position using a few reference tags will yield an accurate
value, which is not always the situation. However, LANDMARC is considered one
of the main enhancements - especially accuracy wise - on which many later
researchers focused and tried to build on while trying to enhance it and overcome
its drawbacks as will be shown later.
Fig (1): Showing how an obstacle (wall) will affect the estimated position on
LANDMARC [1].
14
Later on, more researchers tried to explore this field of study and use the
technology for different applications. One probably interesting application was the
experiment done for Samsung Electronics Ltd. by Hae Don Chon, Sibum Jun,
Heejae Jung, and Sang Won An (2004) [6]. The target of this study was to
enhance telematics and develop a safer car driving experience. The researchers
suggested that a GPS systems regular accuracy of ten to twenty meters can be
enhanced by combining it to RFID technology to allow a more detailed and
accurate navigation. Their approach was based on attaching an RFID reader to
each car enabling it to read special RFID tags attached uniformly on the roads as
shown in fig. (2)[6].
Fig. (2): The RFID based navigation system suggested by Hae Don Chon and
others (2004) [6].
Another reason might be that the fact that GPS systems were enhanced enough
using different approaches since 2004; when this paper was published.
One research paper that might be considered more relevant to this projects scope
is the one written by Chong Wang, Hongyi Wu, and Nian-Feng Tzeng (2007) [8].
In this paper, the work focused on 3D locating an item placed within an indoor 3D
space such as a warehouse or a storage container using a number of RFID
readers and tags proposing two schemes. The first scheme is the active scheme
that uses active RFID tags to locate a reader within the space in concern. This
approach was designed to locate a person or an important object or equipment
that can be provided with an RFID reader. The second scheme is the passive
scheme, which was designed to locate one or more objects that have RFID tags
attached to them. Both schemes tried to estimate a 3D position, and both used
Nelder-Mead nonlinear optimization to minimize the error of an objective function.
Another difference between the two schemes was the number of power levels
used by the reader. Whereas only one level is needed on the first one, a few
power levels emitted from a few RFID readers are required by the latter [8].
Analysis and simulations were carried out to evaluate the two suggested schemes
that came out with acceptable accuracy levels for both schemes. The first scheme
was considered to be more accurate and has lower hardware cost. On the other
hand, the second scheme works better when locating more than one object
simultaneously. All results were obtained using Matlab and some were proven
using a relatively small scale hardware experiment. As mentioned before, both
schemes have proven an acceptable accuracy level using some approaches that
were designed to enhance accuracy [8]; but neither simulation nor experiments
16
Another probably interesting work in the field is the one of Abdelmoula Bekkali,
Horacio Sanson and Mitsuji Matsumoto (2007) [12]. In this paper, a new
localization algorithm was introduced using only two mobile RFID readers and a
number of RFID landmarks with known positions but random distribution. The
presented algorithm is an analytical method to estimate the location of targeted tag
using multilateration with the reference tags and a probabilistic RFID map based
technique with Kalman filtering to enhance the location estimation process. This
approach used two mobile RFID readers for the process as shown in fig. (3).
17
Fig. (3): Abdelmoula Bekkali, and others (2007) approach using 2 mobile RFID
readers [12].
The researchers of this project have also defined an online database of the
probability distribution function (PDF) of the location error for each landmark. This
will help correcting the location estimation of the target, instead of using RF
fingerprinting which should be defined in offline mode. Therefore, it will be less
complex and immune to the time variations of the environment. [12].
The use of RFID technology for positioning purposes has expanded to different
areas of application. This includes position estimation and navigation of moving
18
This study aimed to estimate the position of an object carrying an RFID reader.
This system can be used to support a navigation system for robots or even
humans. But unlike conventional methods, this design claims being able to
determine a higher level of accuracy using only one passive RFID tag at a time,
even if a large number of tags is attached within the area. To achieve this it
proposed estimating the position using S-CRR (Swift Communication Range
Recognition) method. This method uses the communication area model of an
RFID reader at two communication boundary angles. The communication
boundary angle is defined that it is an angle where the RFID reader is able to
begin to communicate with an RFID tag. The communication area model shows
the envelope of the communication range corresponding to the relative angle
between the RFID reader antenna and the RFID tag. In S-CRR method, the RFID
reader antenna is rotated in a horizontal plane in one observation point. At this
time, the RFID reader antenna is radiating the signal to RFID tags at regular
intervals. By this operation, the RFID reader recognizes the communication
boundary angles. The position of the RFID tag is considered to be on the
circumferential line in the communication area model of an RFID reader at the
communication boundary angle. Moreover, the system detects two communication
boundary angles. Thus, the RFID tags position is estimated as the intersection of
two circumferential lines of the communication area model of an RFID reader at
the communication boundary angle [2]. See fig. (4) that shows the S-CRR
methodology.
19
This method has a few advantages as it only requires one reader and one tag on
its range to estimate a position accurately without moving the object itself. Only the
readers antenna has to move. This approach might be of great benefit in the field
of autonomous robots guidance but is not much suitable for the field of our study
where positioning is done on static, smaller scale objects having tags attached to
them.
Fig (4): S-CRR methodology and the concept of the communication area model
[2].
Later on, more studies have tried exploring the possibility of hybrid positioning
systems which combine RFID with other (mainly wireless) technologies to
enhance performance and/or accuracy. A good example of such research studies
is COCKTAIL (2010) [3] which is an RFID hybrid scheme for indoor positioning.
Instead of depending solely on the Radio Signal Strength Indicator (RSSI) which
might suffer problems of multi-path phenomenon and obstacles, and accuracy
options when deployed in large areas; COCKTAIL researchers suggested
combining the traditional approach with another concept, namely the dynamic of
20
RSSI, which is the variance of signal strength caused by the target object, and is
more robust to the environmental changes [3]. The combination of the two
approaches was proposed to enhance accuracy and scalability. To achieve this,
RFID was combined with Wireless Sensor Networks (WSNs) where sensors were
separately deployed [3].
This is not the first study that tried to use dynamic of RSSI for positioning. It was
used before but sometimes suffered some communications overhead and
interference [3]. However, COCKTAIL might be the first one that combines it with
another technology.
In COCKTAIL, positioning is done in two stages. First, sensors use the dynamic of
RSSI to figure out a cluster of RFID tags as a set of candidates. Then, a traditional
RSSI based positioning approach is carried out within the cluster found in the first
stage using a methodology similar to LANDMARC explained earlier. By defining
such cluster in the first stage, its almost guaranteed that no tags which are not
close enough to the target object are included in the next step. COCKTAIL
experiments have reached a good level of accuracy up to 0.45m which
outperforms many other approaches [3].
Another study that has tried to design a hybrid positioning system using RFID and
WSN was engaged by Zhoubing Xiong and others (2011) [4]. This study has
21
22
The proposed system integrates two systems to achieve its goal. The first is a set
of typical RFID readers that are used for people detection and location. The
second is a typical ZigBee wireless communication system that directs collected
data to the central computer or server through a simple and bandwidth-efficient
system. The first task is achieved by scanning for RFID tags that are provided to
the visitors upon their arrival. This system can be used to provide visitors with
some necessary info in typical conditions, or some emergency guidance and
instructions if an emergency situation takes place using a set of monitors
attached in selected places to show instructions on how to get to a specific point
such as the emergency exit [5].
Another big enhancement is proposed in the article prepared by Junhui Zhao and
others (2010) [10], where the researchers tried to enhance the old LANDMARC
scheme through a new algorithm which is expected to be more reliable and less
24
prone to errors caused by the NLOS (Non-Line of Sight) phenomena that might be
caused by the presence of obstacles between the RFID reader and the RFID tag.
In such situation, the reader - most probably - still has the ability to read the tag.
However, the distance estimated using the traditional RSS algorithm will suffer
distortion affecting the accuracy. To sort out this issue, the paper suggests
combining a geolocation algorithm with the traditional LANDMARC. The
geolocation algorithm locates RFID tags using three circles centered at the RFID
reader using the radio signal strength (RSS) [10]. k neighbors are located twice to
produce the corrections with which the estimated coordinates of the unknown
tracking tags are modified () algorithm based on the geolocation algorithm and
the LANDMARC algorithm is essentially a hybrid algorithm, but it overcomes some
shortcomings of other algorithms and acquires more accurate localization results
[10].
The hybrid algorithm was tested using numerical simulation. The acquired results
show an enhancement in the positioning accuracy. However, slight performance
degradation was recorded comparing to the traditional algorithms operating in LOS
environments [10]. This degradation might affect the total performance when
operated in larger environments like the one targeted in this project. Theres a
need to more testing experiments that take place under similar conditions test
performance issues. A too slow positioning process will not be feasible in most
cases.
Having a look at some of the major and most recent RFID based positioning
research projects; one can conclude that a relatively good number of research
projects have taken place in the field in the past 10-12 years. Researchers have
25
started with general schemes which were meant to provide a proof of concept for
using RFID technology in positioning and mapping systems. The earlier trials have
provided some basics for later work, especially LANDMARC which was used later
to develop advanced algorithms.
Later on, the field has witnessed more trials to enhance the work done before.
Those projects can be categorized into a few categories: The first includes
research projects that focused on the positioning of an object carrying a reader like
a car or a robot. Another category includes projects that focused on enhancing the
accuracy of previously suggested systems or proposing new algorithms for the
positioning process of an item carrying an RFID tag. A third category of papers
have tried proposing new positioning some advanced schemes by hybridizing
RFID with other technologies.
Generally, it can be concluded that no one research project has investigated the
probability of using RFID for positioning within a large area/space that contains a
large number of items considering issues like performance, accuracy and
scalability all together at a time. Theres still a need to design a system that takes
all those issues into consideration and prove its feasibility using theoretical and
experimental simulation.
26
4. Theoretical Development:
4.1 System requirements:
This section is dedicated to clarify the theoretical development of the proposed
design. It starts by defining the system requirements in this operating environment.
Then, a brief explanation of the global RFID technology standard will be explained.
Last but not least, a mathematical model will also be defined - on which simulation
and future evaluations are based.
Generally, five main requirements can be defined. First, the proposed system
should achieve an acceptable level of accuracy. Accurate positioning of the item
is the main goal of the system. If an acceptable level of accuracy has not been
achieved, then the whole systems feasibility will be questioned no matter how
much of the other requirements is achieved. The accuracy level is determined by
the specific description of the operation environment and the customer
requirements.
they might take multiple paths and even being reflected by obstacles leading to a
high level of inaccuracy. The situation can be even worse if the obstacles move.
Through this paper, the researcher will seek achieving the most possible ratio of
the above mentioned main requirements of accuracy, performance, scalability,
cost and reliability. Achieving 100% of each of the five requirements might be
impossible but a practical solution might be found that achieves reasonable
balance between the five.
29
31
the reader is not required to hop through frequencies, thereby overcoming the tag
power loss issues caused by moving to a different frequency [9].
According to the standard [17] three ID fields are associated with each tag.
Namely: ID0, ID1, and ID2. The latter is the one used to store the actual user data
like version and serial number is combined of 64 or 96 bits, followed by a 16-bit
CRC calculated using all the digit values. Singulation is done using the ID2
number is insecure and computationally and time expensive as it requires keeping
track of all the 96 bits. A number with a smaller number of digits can be efficiently
used instead and will be enough to keep track of a large number of tags without
continuously breaching the probably sensitive (security wise) ID2 data [16].
ID1 is a static 80 bit random number that is mainly generated based on the ID2s
CRC. It consists of 64 generated bits plus 16 parity bits, and remains unchanged
for each reader irrespective of any other factors; While ID0 is a random number
used whenever a high level of security is required [16]. Both ID0 and ID1 are
divided into blocks of 10 bits to save time, and to facilitate the singulation process
by reading only a few blocks enough to distinguish each tag in the system. The
reader starts by reading one block of each tag and increases the number of read
blocks one by one gradually until it reaches a point where all tags in the systems
range are differentiated. Hence, the reader ends reading only a part of ID0 and
ID1 instead of reading the all the bits depending mainly on the number of tags in
the system.
32
STAC protocol is based on the concept of rounds where RFID tags reply in
randomly distributed time intervals referred to as slots. Each group of such slots is
called a round. This protocol is a reader initiated protocol in which the reader
initiates the round by sending a begin round signal that contains a few parameters
like the number of slots in the round just started, a second parameter called the
selection parameter which is used to select the RFID tags participating in the
round using their own contents, and a hash parameter. The selection parameter
defines the number of bits to be compared during the selection process. If the
selection parameter is not sent then ALL the RFID tags receiving the message are
selected. Thus, the begin round message defines within tags - the round size,
selected tags, and the reply slot position. At the beginning of each round, the
counter of slot positions is set to zero and the RFID tag moves from READY state
to SLOTTED READ state. Occupation of random positions by the RFID tags in this
protocol minimizes the possibility of collisions[17]. The slot counter will increment
every time a reader indicates the end of the slot and the beginning of a new slot.
33
The tag replies with the remaining bits in its EPC omitting all or most of the bits
which were in the selection parameter [9] as they are already known for the
reader.
The reply messages of the RFID tag can be either: no tag reply present, one tag
reply present, and two or more replies present. In the first case, the reader issues
a Close slot sequence that causes all the tags in the SLOTTED READ state to
increment their slot number[9]. If the reader detects a replying RFID tag/tagd ti
tries to keep the slot open for data transfer. Then The reader checks for CRC
values before closing the slot if everything is right allowing the RFID tags to return
to the READY state. Otherwise it transmits a FIX SLOT signal which sets the RFID
tag to a FIXED SLOT state in which the tag keeps replying once per round in a
fixed slot [17].
As explained earlier, the used communication channel for this standard has a
frequency within 13.56 MHz 7 KHz. As in any other passive RFID system, the
reader provides power to the RFID tags and controls the communication process
with them with a baud rate of 26.48 kbit/sec in the reader to tag connection. Again,
the tag reply is also generated though amplitude modulation of the received wave
in the impeded circuit within the tag. The baud rate in the tag to reader connection
is 52.969 kbit/s [17].
back scatter only when they receive a command from a reader, which they can
properly decode and interpret. The intended free space communication of a tag is
more than 3m . It is 2m in worst case and 10m in best case. The tag contents of
the class 1 tags are slightly different from class 0 tags in that these tags have a
short password in addition to the EPC and CRC. Password is a 8 bit string used by
the kill command [9].
35
The designs are theoretically made to satisfy the main requirements discussed
earlier. Later on; a detailed analysis of the requirement satisfaction will be
provided. Matlab simulation results will be used for this purpose.
The first method is based on a relatively higher accuracy design that uses RFID
readers and passive RFID tags. RFID readers are attached to the ceiling in the
form of a grid of readers. The readers power levels will be used for distance
analysis as shown later.
In this method, passive RFID tags are used to tag the items to be tracked. They
are also used as reference tags. This will enhance the systems accuracy and
cost. As explained earlier, using reference tags helps minimizing the number of
RFID readers and thus minimizes systems total cost. The goal of the whole
system is locating any item within the pre-defined set of targeted items thats
located in a library.
This method can use a Nelder-Mead nonlinear simples optimization method, which
is a known method for minimizing nonlinear functions in many dimensional spaces
to minimize the estimated positions error objective functions - without using
probably time consuming derivatives.
36
To overcome the situation explained above, system requirements need to be redefined to suit the nature of the new environment. This will be discussed later in
details, but generally accuracy and cost requirements are the ones we are
interested in leading to a lower cost system that can be setup within an acceptable
cost probably less than the cost expected in the first approach. One reader will
be placed in the center of each room/block with only a few or none reference tags
to achieve an acceptable level of accuracy and minimize the interference caused
by RFID readers in adjacent cells.
37
38
The system structure for this approach is shown in fig. (5) bellow.
Figure [5]: system setup of the high accuracy positioning approach [8].
As illustrated in the figure above, reference RFID tags with known coordinates are
placed on the ceiling in the form of a mesh. Distance separating each RFID tag
from the other is fixed and predefined depending on a few factors including the
total covered area and the required accuracy level. Theoretically - as shown later decreasing this distance enhances the systems accuracy accordingly. However,
this might be questioned experimentally later on within this project as this direct
proportionality is not expected to survive on too small distances. Besides, such too
small equidistance might increase the systems load specifically on the RFID
39
readers scanning process without a justifying outcome. On the next section, the
role of this distance and its optimum value will be investigated.
Cost wise, the RFID readers are generally cheap and not expected to affect the
total system cost much. This applies to both passive and active RFID tags in
different degrees. Active RFID tags are generally preferred in positioning
applications within large areas due to their longer transmission range. However, in
our situation, theres a large number of items that need to be located by the
system and changing their tag batteries might cost much time and money not to
mention a probable difficulty in locating the items need new batteries as the RFID
tag will keep working for some time with lower power probably leading to
inaccurate estimations.
One might think of using active RFID tags for reference tags whereas passive
ones are used for the items themselves, but its to use only one standard type of
RFID tags wherever needed in the system either for reference tags or items
tagging. For this reason, and the above explained details well be using passive
RFID tags everywhere on our system.
40
on the limited computational power of the central computer holding the database.
This is expected to increase the systems performance.
As shown in fig. (5), a square shaped matrix of RFID reference tags and also the
RFID readers is used to clarify the concept. A hexagonal one can be used for
higher accuracy as shown in fig. (6). In this case, more reference tags (usually six
reference tags) will be surrounding the targeted item. With more reference tags
getting involved in the position estimation process, a higher accuracy is expected.
Besides, this helps overcoming the NLOS (non-line of sight) problem caused by
obstacles surrounding the target item as more reference tags help eliminate the
effect of this situation. More than one matrix of reference tags can be used,
installing an additional one at another level (like the rooms floor). This amendment
using either hexagonal or quadratic matrices can offer more help gaining more of
the above mentioned advantages (accuracy and eliminating NLOS). Again, in this
paper, a single quadratic matrix will be used.
41
RFID readers are also deployed on the rooms ceiling as shown in fig. (5). The
number of those readers is denoted as N (where N is always > 4). Next section will
discuss the optimum number of readers to be deployed within a sample
environment and the effect of the readers number on systems accuracy,
computing time, and systems total cost. But as explained earlier, RFID readers
are the main constrain in the systems cost as they are very expensive comparing
to the other components. An increased number of readers will dramatically affect
the systems cost. Besides, computing time is also affected by the number of RFID
readers deployed in the system. The more readers deployed, the more the time
needed to collect their data and analyze it. However, system accuracy is increased
when more readers are deployed. The next section will discuss all those factors
and try to achieve a balance between them using the simulation data.
Some RFID readers currently in the market operate within only one signal power
level, which is not feasible for this type of applications. However, some types of
readers can operate at many transmission power levels up to 38 levels [8].
These levels are tunable and can be calibrated. One can determine the required
number of power levels and their calues according to whats best to the
application. In our application, each reader has K transmission power levels
selected globally for the system in a way that creates linearly increasing reading
range for the increment of the power level (the range increases linearly when the
power level is increased, but the power value itself might increase in a non-linear
way).
42
- Position estimation:
The readers can start with the lowest power level and gradually increase the
power until the target tag is found. But alternatively, the search process can be
enhanced using binary search [8] within the power levels, where the reader and
the central computer start searching with a power level in the middle between the
minimum and the maximum level (eg.: if 12 power levels are used, it starts with
level 6) before deciding whether it has to keep searching within the higher or lower
levels and repeating the process. (Note that the methodology all over this paper
assumes that the radio waves emitted from the reader take the shape of a circle or
sphere, which is not the situation most of the time due to different propagation and
attenuation and different gains of the antenna in each direction. Other papers used
the concept of Degree of Irregularity (DIO) [8] to quantify this issue; which is
beyond the focus of this project).
While searching for the target tag, the readers scan for reference tags too, Let k
denote he set of tags the reader reads in the power level k, i denote the reader,
43
and j denote the target tag. If j k, and j k+1 then, the distance between i and j,
between the reader and all of reference tags that are activated in this power level
(K+1) but not on the previous on (k). The same process is repeated by each of the
N readers to calculate the average distance between each reader in range and the
target tag; denoted as L1j , L2j ,L3j Lij .LNj. Once all these distances are
estimated, they can be used for an estimation of the target tag location.
and send it to
The location of the target tag can be estimated by optimizing the error function to
the minimum expressed using the minimum mean square error formula [8]:
Where
.. (1)
denotes the real distance between the reader i and the target tag j.
Note that only the readers that do read the target tag are included in equation (1),
otherwise the readers term is eliminated from this equation.
If the target tags real position is denoted as (xj,yj,zj), and the readers position is
denoted as (xi,yi,zi), then the value of
................... (2)
44
An optimization method can be used to minimize the error function and obtain
the target tags coordinates (xj,yj,zj). An example of such methods is Nelder
Mead Simplex method which is a non-linear minimization method that uses
parameters adjustment until a certain convergence criterion is met. Some of these
methods including simplex have their built in modules in Matlab environment.
Besides, for a proof of concept, typical algebra can be used to calculate the exact
position of the target item using the estimated distances calculated by each
reader. This will be clarified in details later on the simulation section; where this
design will be simulated and tested. Positioning accuracy will be tested and
compared under different circumstances by varying either the number of RFID
reference tags and the distance separating adjacent ones, the number of
implemented readers, or the number of power levels used.
45
This system is based on installing only one RFID reader within each room or hall
in the librarys or warehouses building. This reader has a range only enough to
cover the whole room within which it is installed. The reader is installed on the
centre of the room.
get all its items tagged, usually using passive RFID tags. If this library wants a
user friendly system that be used by the library visitors to eliminate the hassle of
finding a real time position of the item without using complicated codes and maps.
A system that estimates the position even if the item is eventually moved between
the library rooms by the library visitors.
47
This section is dedicated to discuss the simulation methods used and analyzing its
output results. Firstly, a brief description of the Matlab code used is given (the
complete Matlab codes are attached in the appendices at the end of this report).
Next, detailed description of the output results is shown. Those results will be
analyzed in details to show how each of the above mentioned factors affects the
accuracy. The output results have shown a good level of accuracy; it also shows
that the four factors mentioned earlier affect the accuracy in a way thats totally
justified by the theoretical model explained earlier. A detailed plotting of all the
analyzed results will also be provided.
The simulation coded for this purpose reflects exactly the methodology of the
higher accuracy approach. The Matlab code starts with defining the operating
environment. This includes the dimensions of the operating area a square area
is defined, simulated by a square matrix with distance between each two nodes
representing 5cm. An area of 10x10 m was initially defined. Then the number of
RFID readers and reference tags is defined on using as nodes as needed from the
48
main matrix. Both RFID readers and tags can be defined per dimension instead
of determining their number in the whole area bearing in mind its a square area.
Another variable that needs to be defined is the power levels used by the readers.
This is a global value for all the readers and can be between 1 and 28 levels. A
standard global range of the RFID readers is also defined.
The next step represents the scanning process done by the readers. This is done
starting from the lowest power level, increasing one level a time, scanning for
target tag.
Once the target tag is read, the reader reads all the reference tags within the same
power level, and uses their known positions to calculate the distance separating
each one from the reader before calculating an average distance using all the
tags. This is repeated by an even number of readers (usually 4 or 6) which are
usually the closest to the target tag (the ones that read it in their lower power
levels).
That way, an estimation of the distance separating each reader from the target tag
is known and can be used to estimate the position of the target tag itself. This can
be achieved by minimizing the error function as explained in the previous section.
However, a simplified mathematical method is used in the simulation for a proof of
concept. This is achieved by solving for intersection points of each two circles and
finding the intersection point that is exactly repeated (or repeated by a very close
point). Accuracy is investigated using a mean square error of the real position of
the target tag and the estimated one.
49
For a deep investigation of the system, each of the above mentioned factors will
be varied (one a time) for a number of steps within a specific range. For each step,
the positioning process will be run for a min of 100 times, calculating a total mean
error function. Then, a curve plotting how accuracy changes versus the variables
of interest is plotted as shown later.
When the number of power levels is within the area 7-10, the system recorded a
good level of accuracy which remains stable around 50cm average error. This
ranges accuracy is within our systems requirements. Above 10 power levels, the
51
systems average error keeps converging to a minimum thats a little bit above
zero.
Clearly, using a number of power levels thats in the range of 7-10 levels is
expected to achieve the nest results balancing accuracy with performance. An
average error around 50cm remains acceptable according to our system
requirements. Using a higher number of power levels can slightly enhance the
accuracy but this will be on the account of performance. Using a high number of
power levels is expected to slow down the positioning process. Hence, a good
balance between accuracy and performance can be achieved using a min of 7 and
a max of 10 power levels.
2. Scalability:
Scalability has been one of the major interests of this project since the beginning.
The designed system was meant to work in large environments; hence, theres a
real need for a system that can operate in such environments effectively.
To test scalability, the simulation was run in different environments starting with
64m2 (8m * 8m) up to 2500m2 (50m * 50m) with an increment of 2 meters in each
dimension each time. The number of power levels was fixed at 8 power levels;
while the distance between reference tags was fixed at 0.5m. Fig. (9) bellow
shows the average error obtained for each change in the simulated area
dimensions. While fig.(10) shows how the number of readers increase vs. area.
This can be helpful in estimating the cost of this system.
52
53
From the figure above, we can see that the systems accuracy remains acceptable
even whenever the area is very large. Whenever the area is less than 900m 2, the
system achieves a good accuracy level with maximum error not exceeding 60cm
at 900m2. Above 900m2, the accuracy remain acceptable and suitable for many
users with average error not exceeding 90cm at large areas around 2500m 2.
As mentioned earlier, this accuracy level is suitable for many users. Otherwise, it
can be enhanced by clustering the system; i.e. dividing it into a few subsystems
to enhance performance and accuracy. This can be done by two stages
positioning, where the first one determines the subsystem that contains the target
item, while the second stage estimates the specific position of the item. This
approach needs further investigation which is out of the scope of this project.
54
a hundred random positioning processes took place for each variance of the
number of readers. Fig. (9) shows the results of the simulation.
It was also supposed that the readers reading range is enough to cover the
distance between each two readers; which is the situation in reality as most
commercial RFID readers have enough range.
Fig (9): Average error vs. the number of RFID readers in the system.
Fig. (8) shows that a satisfying level of accuracy is achieved in this environment
whenever four or more readers are used. The distance between each two readers
can be optimized in the range of 5-10 meters, which will reduce the system cost
considerably in such large areas. Besides, theres no serious enhancement on the
system accuracy when the number of readers is further increased. Slight ups and
55
downs were recorded but the average error kept varying only around the range of
40-50 cm; which is an acceptable average error. This conclusion is an important
one as it proves that the proposed designs accuracy is not too dependent on the
number of readers as long as the used readers do cover the entire environment in
concern, with each point within the environment covered with a few number of
readers enough for positioning (4 or more). Above this point, any added readers
become redundant will affect the system performance. Hence, installing readers
with the maximum possible range can help decreasing the number of readers
needed, maintaining the same level of accuracy.
to 1.8m allowing the number of reference tags to change accordingly. The number
of power levels was again fixed on 8 levels; whereas the number of readers was
fixed on 9, meaning that 5m separate each two adjacent readers on each side.
Fig. (10) below shows the simulation results.
It can be noticed from the previous figure that the average error varies only within
the range around 50cm whenever the number of reference tags is varied in the
range mentioned above; with an exception of using a very low number of
reference tags, like separating each two adjacent tags with 2 meters or more.
Reference tags separated by around 1-1.2m yield a satisfactory level of accuracy.
This is reasonable according to the theoretical design proposed earlier as a small
number of reference tags but enough to leave a few tags in each power level to
57
be used for position estimation can yield only an acceptable level of error. This
result is also assisted by the low width power levels used in this simulation.
Whenever a proper number of power levels is used, each power level wont be too
wide and hence wont allow a large average error as the maximum error is
theoretically less than the half of the power levels width.
58
To make sure such important requirements are met, two different positioning
schemes were proposed; namely, High Accuracy Positioning Scheme, and Low
Accuracy Positioning Scheme. The first scheme is designed to suit positioning in
large indoor areas that have too many items, while the second is more suitable for
environments that are divided into a relatively large number of smaller rooms
where the first scheme become ineffective, error brone, and considerably
expensive.
The first scheme, which was simulated using Matlab, has achieved satisfying
results. First, it has shown some degree dependency on the number of power
levels used. This relationship is important as it allows optimizing the number of
power levels to enhance cost, accuracy and performance.
59
Generally, the simulation has proven the feasibility of this scheme cost, accuracy,
and scalability wise.
The second scheme was not a part of the simulation section as its very simplified
with relatively low requirements. Simulation is not expected to explain much about
this method more than what theory does.
60
Despite this project has achieved its major goals, theres still a room for more
enhancements. Including:
7. References:
[1] Lionel M. Ni, Yunhao Liu, Yiu Cho Lau And Abhishek P. Patil, LANDMARC:
Indoor Location Sensing Using Active RFID. Wireless Networks 10, 701
710, 2004.
[2] Norie Uchitomi, Atsuki Inada, Manato Fujimoto, Tomotaka Wada, Kouichi
Mutsuura and Hiromi Okada, Accurate Indoor Position Estimation by SwiftCommunication Range Recognition (S-CRR) Method in Passive RFID
systems, International Conference on Indoor Positioning and Indoor
Navigation (IPIN), 15-17 September 2010, Zrich, Switzerland.
[3] Dian Zhang, Yanyan Yang, Dachao Cheng, Siyuan Liu, and Lionel M. Ni,
COCKTAIL: An RF-based Hybrid Approach for Indoor Localization, IEEE
2010. (Full text paper was peer reviewed at the direction of IEEE
Communications Society subject matter experts for publication in the IEEE
ICC 2010 proceedings).
[4] Zhoubing Xiong, Francesco Sottile, Maurizio A. Spirito and Roberto Garello,
Hybrid Indoor Positioning Approaches Based on WSN and RFID, IEEE,
2011.
[5] Bonifacio Castao and Maria Rodriguez-Moreno, A ZigBee and RFID
Hybrid System for People Monitoring and Helping inside Large Buildings,
2010 IEEE Symposium on Industrial Electronics and Applications (ISIEA
2010), October 3-5, 2010, Penang, Malaysia
[6] Hae Don Chon, Sibum Jun, Heejae Jung and Sang Won An, Using RFID
for Accurate Positioning, Journal of Global Positioning Systems (2004) Vol.
3, No. 1-2: 32-39.
62
[7] Hai-Lan Ding, Wing W. Y. NG, Patrick P. K.Chan, Dong-Liang Wu, XiaoLing Chen, Daniel S.Yeung, RFID INDOOR POSITIONING USING RBFNN
WITH L-GEM, The Ninth International Conference on Machine Learning
and Cybernetics, Qingdao, 11-14 July 2010.
[8] Chong Wang, Hongyi Wu, and Nian-Feng Tzeng, RFID-Based 3-D
Positioning Schemes, (Full text paper was peer reviewed at the direction of
IEEE Communications Society subject matter experts for publication in the
IEEE INFOCOM 2007 proceedings).
[9] Arini Balakrishnan, Swetha Krishnan, Simulation of RFID platform on NS-2,
University of Wisconsin, Madison December, 2005.
[10]
Diane Marie Ward, The Complete RFID Handbook, pages 1-3, 2004.
63
[15]
860 mhz - 930 mhz class 1 RFID tag radio frequency and logical
900
mhz
class
RFID
tag
specification.
Publishoing, 2009.
[20]
[21]
64
[23]
65
Appendices:
66
1516171819202122232425262728293031323334-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%
35%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%
36%%%%%%%%%%%start of calculations %%%%%%%%
373839404142434445-
%number of readers
N = N_d^2;
%Readers involved
%should be an even number
%N_inv = floor(N/2)*2;
if (N<6)
N_inv = 4;
67
4647484950515253545556575859606162636465-
else
N_inv = 6;
end
for in = 1:num_tags_d
for in2 = 1:num_tags_d
tags_MAT(d_in*(in-1)+1,d_in*(in2-1)+1) = (in21)*num_tags_d + in ;
66end
67end
68697071727374757677-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%distance between readres in terms of matrix index
d_readers = floor(d_space/((N_d -1)*res));
for in = 1:N_d
for in2 = 1:N_d
tags_MAT(d_readers*(in-1)+1,d_readers*(in2-1)+1) =
tags_MAT(d_readers*(in-1)+1,d_readers*(in2-1)+1) + i*((in2-1)*N_d +
in) ;
78end
79end
8081-
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%
82%tags indeces
83[a,b] = find(real(tags_MAT) > 0);
84tags_in = [a,b];
85%readers indeces
86[a,b] = find(imag(tags_MAT) > 0);
87readers_in = [a,b];
8889-
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%
90%Maximum distance
91max_d = d_space*sqrt(2);
68
9293949596979899100101102103104-
%level
L = max_d/R;
%levels
levels = [0:L:L*R];
%real distance
for in = 1:N
%[a,b] = find(real(tags_MAT) == 10^6);
a = real_target(1);
b = real_target(2);
d_real(in) = res*sqrt(((readers_in(in,1) a)^2)+((readers_in(in,2) - b)^2));
105end
106107108-
118119120121122123-
end
%L_reders has the level for each reader
%find tags in the target level for all readeres and find
avarage distance
124for in = 1:N
125d = kron(ones(length(tags_in(:,1)),1),readers_in(in,:)) tags_in;
126d = sqrt(d(:,1).^2 + d(:,2).^2);
127d = d*res;
128ind_d = find(d > L_readers(in) & d < L_readers(in)+L );
129d_avarage(in) = 0;
130131132133134135136137138139140-
if length(ind_d>0)
d_avarage(in) = sum(d(ind_d))/length(ind_d);
end
end
%find readers with min distances
for in = 1:N_inv
index = find(d_avarage == min(d_avarage));
if length(index) > 1
69
141142143144145146147148149150151-
index = index(1);
end
d_target(in) = d_avarage(index);
readers_target(in,:) = readers_in(index,:);
d_avarage(index) = 10^10;
end
%readers_target = readers_in(1:N_inv,:);
%d_target = d_avarage(1:N_inv);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%
152153154155156157158159160161162-
center
163-
169170171172173174175176177178179180-
intersect1 = [intersect_11;intersect_12];
%Do the second pair of readers
%Calculating position
A = readers_target(3,:); %# center of the first circle
B = readers_target(4,:); %# center of the second circle
a = d_target(4)/res; %# radius of the SECOND circle
b = d_target(3)/res; %# radius of the FIRST circle
c = norm(A-B); %# distance between circles
cosAlpha = (b^2+c^2-a^2)/(2*b*c);
u_AB = (B - A)/c; %# unit vector from first to second
center
181-
70
186-
187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216-
intersect2 = [intersect_21;intersect_22];
%find the point
%finding the pair
p1 = norm(intersect_11 p2 = norm(intersect_11 p3 = norm(intersect_12 p4 = norm(intersect_12 %Distances
D_p = [p1,p2,p3,p4];
index = find(abs(D_p) ==
intersect_21);
intersect_22);
intersect_21);
intersect_22);
min(abs(D_p)));
if length(index) >1
index = index(1);
end
intersect_MAT(1,:) = intersect1(round(index/2),:);
intersect_MAT(2,:) = intersect2(2-mod(index,2),:);
intersect1;
intersect2;
intersect = sum(intersect_MAT)/2;
for in = 5:2:N_inv-1
%Calculating position
A = readers_target(in,:); %# center of the first circle
B = readers_target(in+1,:); %# center of the second
circle
217218219220221222223-
center
224-
71
233234235236237238239240241242243244245246247248249250251252253254255256257-
p2 = norm(intersect_2 - intersect);
D_p = [p1,p2];
index = find(abs(D_p) == min(abs(D_p)));
if length(index) >1
index = index(1);
end
intersect_MAT(end+1,:) = intersect_iter(index,:);
end
intersect = sum(intersect_MAT)/(N_inv/2);
%error in cm
error(iter_main) = norm(real_target - intersect)*res*100;
end
error_avarage(main_index) = sum(error)/iter_main;
end
figure
plot(power_levels,error_avarage,'--*',
'Color','black','LineWidth',3)
258axis([-inf inf 0 inf])
259grid on
260title({'Accuracy vs. # of Power Levels'})
261xlabel('Number of Power Levels')
262ylabel('Average error in cm')
263grid on
72
readers_dimension = [2,3,4,5,6,7,8,9,10];
for main_index = 1:length(readers_dimension)
73
74
L_readers = zeros(1,N);
for in = 1:N
for in2 = 2:length(levels)
if (d_real(in) > levels(in2))
L_readers(in) = levels(in2);
end
end
end
%L_reders has the level for each reader
%find tags in the target level for all readeres and find avarage distance
for in = 1:N
d = kron(ones(length(tags_in(:,1)),1),readers_in(in,:)) - tags_in;
d = sqrt(d(:,1).^2 + d(:,2).^2);
d = d*res;
ind_d = find(d > L_readers(in) & d < L_readers(in)+L );
d_avarage(in) = 0;
if length(ind_d>0)
d_avarage(in) = sum(d(ind_d))/length(ind_d);
end
end
%find readers with min distances
for in = 1:N_inv
index = find(d_avarage == min(d_avarage));
if length(index) > 1
index = index(1);
end
d_target(in) = d_avarage(index);
readers_target(in,:) = readers_in(index,:);
d_avarage(index) = 10^10;
end
%readers_target = readers_in(1:N_inv,:);
%d_target = d_avarage(1:N_inv);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
75
intersect_21);
intersect_22);
intersect_21);
intersect_22);
min(abs(D_p)));
if length(index) >1
index = index(1);
end
intersect_MAT(1,:) = intersect1(round(index/2),:);
intersect_MAT(2,:) = intersect2(2-mod(index,2),:);
intersect1;
intersect2;
intersect = sum(intersect_MAT)/2;
for in = 5:2:N_inv-1
%Calculating position
A = readers_target(in,:); %# center of the first circle
B = readers_target(in+1,:); %# center of the second circle
a = d_target(in+1)/res; %# radius of the SECOND circle
b = d_target(in)/res; %# radius of the FIRST circle
c = norm(A-B); %# distance between circles
cosAlpha = (b^2+c^2-a^2)/(2*b*c);
76
77
tags_distance = [0.1:0.2:1.9];
for main_index = 1:length(tags_distance)
78
tags_MAT = zeros((d_space/res)+1,(d_space/res)+1);
%number of reference tags in each dimension
num_tags_d = floor((d_space/d)+1);
num_tags(main_index) = num_tags_d;
%distance between reference tags in terms of matrix index
d_in = floor(d/res);
for in = 1:num_tags_d
for in2 = 1:num_tags_d
tags_MAT(d_in*(in-1)+1,d_in*(in2-1)+1) = (in2-1)*num_tags_d + in
;
end
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%distance between readres in terms of matrix index
d_readers = floor(d_space/((N_d -1)*res));
for in = 1:N_d
for in2 = 1:N_d
tags_MAT(d_readers*(in-1)+1,d_readers*(in2-1)+1) =
tags_MAT(d_readers*(in-1)+1,d_readers*(in2-1)+1) + i*((in2-1)*N_d + in) ;
end
end
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%tags indeces
[a,b] = find(real(tags_MAT) > 0);
tags_in = [a,b];
%readers indeces
[a,b] = find(imag(tags_MAT) > 0);
readers_in = [a,b];
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Maximum distance
max_d = d_space*sqrt(2);
%level
L = max_d/R;
%levels
levels = [0:L:L*R];
%real distance
for in = 1:N
a = real_target(1);
b = real_target(2);
d_real(in) = res*sqrt(((readers_in(in,1) - a)^2)+((readers_in(in,2) b)^2));
end
%find level the target is in for each reader
%In reality, the readers do not know which level it is in from one shot,
79
80
cosAlpha = (b^2+c^2-a^2)/(2*b*c);
u_AB = (B - A)/c; %# unit vector from first to second center
pu_AB = [u_AB(2), -u_AB(1)]; %# perpendicular vector to unit vector
%# use the cosine of alpha to calculate the length of the
%# vector along and perpendicular to AB that leads to the
%# intersection point
intersect_11 = A + u_AB * (b*cosAlpha) + pu_AB * (b*sqrt(1cosAlpha^2));
intersect_12 = A + u_AB * (b*cosAlpha) - pu_AB * (b*sqrt(1cosAlpha^2));
intersect1 = [intersect_11;intersect_12];
intersect_21);
intersect_22);
intersect_21);
intersect_22);
min(abs(D_p)));
if length(index) >1
index = index(1);
end
intersect_MAT(1,:) = intersect1(round(index/2),:);
intersect_MAT(2,:) = intersect2(2-mod(index,2),:);
intersect1;
intersect2;
intersect = sum(intersect_MAT)/2;
for in = 5:2:N_inv-1
81
%Calculating position
A = readers_target(in,:); %# center of the first circle
B = readers_target(in+1,:); %# center of the second circle
a = d_target(in+1)/res; %# radius of the SECOND circle
b = d_target(in)/res; %# radius of the FIRST circle
c = norm(A-B); %# distance between circles
cosAlpha = (b^2+c^2-a^2)/(2*b*c);
u_AB = (B - A)/c; %# unit vector from first to second center
pu_AB = [u_AB(2), -u_AB(1)]; %# perpendicular vector to unit vector
%# use the cosine of alpha to calculate the length of the
%# vector along and perpendicular to AB that leads to the
%# intersection point
intersect_1 = A + u_AB * (b*cosAlpha) + pu_AB * (b*sqrt(1cosAlpha^2));
intersect_2 = A + u_AB * (b*cosAlpha) - pu_AB * (b*sqrt(1cosAlpha^2));
intersect_iter = [intersect_1;intersect_2];
%finding the pair
p1 = norm(intersect_1 - intersect);
p2 = norm(intersect_2 - intersect);
D_p = [p1,p2];
index = find(abs(D_p) == min(abs(D_p)));
if length(index) >1
index = index(1);
end
intersect_MAT(end+1,:) = intersect_iter(index,:);
end
intersect = sum(intersect_MAT)/(N_inv/2);
%error in cm
error(iter_main) = norm(real_target - intersect)*res*100;
end
error_avarage(main_index) = sum(error)/iter_main;
end
figure
plot(num_tags,error_avarage,'--*','Color','black','LineWidth',3)
axis([-inf inf 0 100])
title({'Accuracy vs. Number of tags'})
xlabel('Number of tags per dimention')
ylabel('Error in cm')
grid on
82
dimension = [8:2:50];
for main_index = 1:length(dimension)
83
84
%find tags in the target level for all readeres and find avarage distance
for in = 1:N
d = kron(ones(length(tags_in(:,1)),1),readers_in(in,:)) - tags_in;
d = sqrt(d(:,1).^2 + d(:,2).^2);
d = d*res;
ind_d = find(d > L_readers(in) & d < L_readers(in)+L );
d_avarage(in) = 0;
if length(ind_d>0)
d_avarage(in) = sum(d(ind_d))/length(ind_d);
end
end
%find readers with min distances
for in = 1:N_inv
index = find(d_avarage == min(d_avarage));
if length(index) > 1
index = index(1);
end
d_target(in) = d_avarage(index);
readers_target(in,:) = readers_in(index,:);
d_avarage(index) = 10^10;
end
%readers_target = readers_in(1:N_inv,:);
%d_target = d_avarage(1:N_inv);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
85
intersect_21);
intersect_22);
intersect_21);
intersect_22);
min(abs(D_p)));
if length(index) >1
index = index(1);
end
intersect_MAT(1,:) = intersect1(round(index/2),:);
intersect_MAT(2,:) = intersect2(2-mod(index,2),:);
intersect1;
intersect2;
intersect = sum(intersect_MAT)/2;
for in = 5:2:N_inv-1
%Calculating position
A = readers_target(in,:); %# center of the first circle
B = readers_target(in+1,:); %# center of the second circle
a = d_target(in+1)/res; %# radius of the SECOND circle
86
87
5/17/2011
6/6/2011
6/26/2011
7/16/2011
8/5/2011
8/25/2011
9/14/2011
Literature Review
specification
Simulation
Start date
Duration (days)
First Draft
Final Draft
88