zigbee定位的概念
来源:互联网 发布:常熟淘宝招聘信息 编辑:程序博客网 时间:2024/06/02 13:12
这篇笔记主要是基于CC2431 Location Engine 这篇文档。这篇文档主要提供一些定位的基本概念,同时给出了一种在开发定位系统过程中的小技巧。
(支持原创,如需转载,请注明地址:http://blog.sina.com.cn/litianping0709 作者:叶雨荫城(阿雨))http://blog.sina.com.cn/s/blog_61500ed60100mwgd.html
定位引擎
The
Strength Indicator (RSSI) values. The RSSI value will decrease when the distance increases.
在cc2431定位引擎里使用的定位算法主要是基于接收信号强度值(RSSI)。这个值随着距离的增加而递减。
Figure 1 shows a simplified system for location detection. “Reference node” is a static node
placed at a known position. For simplicity this node knows its own position and can tell other
nodes where it is on request. A reference
needed for location detection, it will not perform any calculation at all. A “Blind node” is a node built with CC2431.
engine, and afterwards it reads out the calculated position and sends the position information
to a control application.
参考节点知道自身位置,并且硬件本身不带定位引擎。盲节点收集参考节点的信号,读出相应的RSSI值,并将这些值送入硬件定位引擎,然后读出计算出的具体位置信息。
The minimum data contained in a packet sent from a reference node to a blind node shall be
the reference nodes’ X and Y parameters. The RSSI value is calculated by the receiver, i.e.
the blind node.
从参考节点发送到盲节点的数据包应该包括参考节点的“x”和“y”坐标信息。RSSI值由盲节点自身计算得到。
The main feature of the location engine is that the location calculation can be performed at
each blind node, hence the algorithm is decentralised. This property reduces the amount of
data transferred in the network, since only the calculated position is transferred, not the data
used to perform the calculation.
定位引擎的主要特征就是位置计算是分布在各个盲节点中的,因此这种算法是分布式的。这就减少了网络中的数据传输量。
To map each location to a distinct place in the natural environment, a two dimensional grid is
used. The directions will, in the following, be denoted X and Y. In all the figures X is defined to be the horizontal direction and Y the vertical. The CC2431 Location Engine can only handle
two dimensions, but it’s possible to handle a third dimension in software (i.e. to
floors in a building). The point named (X, Y) = (0, 0) is located in the upper left corner of the
grid.
cc2431只能进行二维定位的计算,实现三维定位需要软件的辅助。
3.1 Node types
3.1.1 Reference node
A node which has a static location is called a reference node. This node must be configured
with X and Y value that correspond to the physical location.
The main task for a reference node is to provide a “reference” packet that contains X and Y
coordinates to the blind node, also referred to as an anchor node.
Since
CC2431 for the purpose. This means that a reference node can be run on either a CC2430 or
a CC2431. Since CC2430/31 is based on the same transceiver as CC2420, even a CC2420
together with a suitable microcontroller can be used as reference node.
参考节点不需要定位引擎,cc2430或者cc2431,甚至带有cc2420芯片的模块都可以作为参考节点。
3.1.2 Blind Node
A blind node will communicate with the closest reference nodes, collecting X, Y and RSSI for
each
location engine hardware. Afterwards the calculated position should be sent to a
station. This control station could be a PC or another node in the system.
盲节点将与最近的参考节点通信,收集对应参考节点的x,y和RSSI值,定位引擎利用这些值计算出盲节点的坐标。
A blind node must be using CC2431.
盲节点必须配置cc2431.
3.2
The location engine utilizes an extremely simple interface seen from the software layer; write
parameters in, wait for the calculation to performed, and read out the calculated position out.
This chapter will discuss the different parameters and how the shall be interpreted.
定位引擎提供了一个在软件层上非常简单的接口。用户只要写入相关的参数,等待计算结束,读出计算值。
接下来将讨论不同的参数及其代表的意义。
3.2.1 Input
Table 1 shows all necessary input to the location hardware. All the values will be described in
details later in this document. The following is a brief introduction.
3.2.2 Output
4
When CC2430/31 receives a packet it will automatically add an RSSI value
packet. The RSSI value is always averaged
RSSI value is represented as a one byte value, as a signed 2’s complement value. When a
packet is read from the FIFO on the CC2431 the second last byte will contain the RSSI value
that was measured after receiving 8 symbols of the actual packet. Even if the RSSI value
captured
intensity of received signal strength at that time, not necessarily the signal power belonging to
the received data. This gives the opportunity for the RSSI value to be erroneous when a large
number of nodes are talking on the same channel
captured.
当cc2431/cc2430收到一个数据包的时候他将会自动在数据包中加上相应的RSSI值。RSSI的值是收到开始八个符号周期(128us)的平均值。虽然这个RSSI的值是在接收到数据包的同时捕获的,但是RSSI值只反映当时接收到的信号强度,而不一定是接收到的数据包的信号强度。当一个信道中有多个节点在通信时,捕获的RSSI值就有可能存在误差。
CC2430/31 contains a register termed RSSI. This
described above, but it is not locked when a packet
should not be used for further calculations. Only
received
received.
4.1 Offset
The RSSI value described above is represented as signed 2’s complement. The value can
not be read and interpreted as the received signal strength as it is. To convert the actual read
out value to the received signal strength an offset must be added. This offset, which is given
by the data sheet is approximately -45,
antenna configuration.
4.2 Linearity
Measurements performed in TI’s laboratory shows that the RSSI values measured by
chips fit nicely with the signal input power. The linearity curve can be found in the CC2430
data sheet plotted as input power versus RSSI value.
4.3
the sender and the receiver.
The received signal strength will
shows.
•
•
•
A wider discussion of A and n can be found in chapter 5.
4.4
Section 4.3 described the theoretical RSSI value as a function of the distance. This section
will discuss how the RSSI value can be expected to be measured in the
using the ideal formula for signal strength it’s pretty straightforward to do the calculation, but when using real values uncertainty must be taken into account.Most of this uncertainty is
handled by the hardware, but some software handling should be added to increase
accuracy.
that correlate to the distance in the best possible way.
4.4.1
averaging and feedback filters. Averaging
data packets to be sent. Feedback filters uses only a small part of the most recent RSSI value
for each calculation. This requires less data, but increases the latency when calculating a new
position.
有两种常用的滤波方法用来平滑RSSI值:均值滤波和反馈滤波。
The average RSSI value is simply calculated by requiring a few packets from each reference
node each time the RSSI value are measured and calculated according to the
below.
If a filter approximation shall be used, this can be done as shown below. In this equation the
variable a is typically 0.75 or above. This approach ensures that a large difference
values will be smoothed. Therefore it is not advisable if the assets that should be tracked can
move long distance between each calculation. (这种方法不知道可行度如何)
5.1
meter from the transmitting unit.
Figure 9 shows typical RSSI values measured one meter from sender. The figure shows
values measured at position P0, P1, P2 and P3 from Figure 8. The conclusion from this figure
is that the antenna is not isotropic, so an averaged value should be used as the parameter A.
For the devices used in this test, the
measurements were done with RSSI_OFFSET equal to -45.
5.1.2
The figure below shows how an erroneous value for the parameter A will affect the calculation
of a blind node’s position. The figure is not showing which A value that is most correct to use.
The
different values for A, relatively big differences in X and Y can be obtained. Generally an A
value between 45 and 49 gives most accurate answer for an indoor office environment.
室内环境下选择45到49的值一般都比较精确。
In this example the calculated positions with A
5.2
when the distance from the transmitter increases. N is highly dependent of the environment.(N和环境有很大的关系) N描述了当距离增加的时候信号的衰减的程度。
E.g. the thickness of walls will influent a lot. This value can only be determined empirically.
N值只能通过经验获取。
The location engine implemented in CC2431 is not using N directly, instead it is using a value
termed n_index. The relation between N and n_index can be seen in the table below. This
conversion table is used to reduce the complexity for the actual hardware implementation.
Figure 11 shows how the choice of N affects the theoretical RSSI value at a given distance,
where
accurate as possible.
5.2.1 Measuring n
It is challenging, if not impossible, to find
environments. The easiest way will probably be
environment where the system should be
n_index to find the value that fit the best with the actual environment.
根据实际需要得到n值。
Experiments have shown that an n_index value between 15 and 25 gives good results.
实验表明取15到25结果良好。
5.3
necessary to give a reliable result. If too few nodes are used, then the influence from each of
the nodes is higher, and one erroneous RSSI value can change the calculated position in a
significant way. Erroneous RSSI values in this context means an RSSI value that does not fit
well with the theoretical value,
similar.
If
result will differ too much from the real position to be usable. It’s not advisable to track objects that are located outside the grid.
6 SOFTWARE ALGORITHMS
Some general algorithms can be implemented in software, they are described on a high level
in the following. Please notice that this application note not describes any thing specific to the network topology in use.
6.1
The nearest nodes should be used for calculation. This means that the eight reference nodes
with highest RSSI value should be used, all other nodes should be discarded. If eight nodes
not can be reached, as many nodes as possible should be used.
6.2
The hardware location engine can handle X and Y values up to 64 meters, or more precisely
up to 63,75 meters
applications. Therefore it will be necessary to extend the area. This can easily be archived by
a simple software pre-processor algorithm.
Each node represents X and Y with 2 bytes. With an accuracy of 0.25 meters, this gives a
maximum range of 16 384 m.
Figure 12 shows an example of how the algorithm works. The figure shows reference nodes
placed at each 30th meters in both the X and Y directions.
is the blind node, all other nodes are reference nodes.
算法工作流程:
•
offset that “move” this node to the centre of a 64x64 meters square. Because of the
known RSSI value for the signal from this node, the distance to that node can easily
be estimated. In Figure 12 the position must be in the white circle.
第一步:确定具有最高RSSI值的节点,并计算将这个节点移到一个 64x64m的正方形的中央需要的补偿值。
•
“strongest” one. In the figure the nodes coloured in dark blue are used. All nodes are
offset with the value found in step 1.
第二步:确定其他用于定位的参考节点。所有节点都由第一步计算的值经过补偿。
•
read out.
第三步:计算出位置值。
•
calculations are done, the location of the blind node is known in the global grid.
第四步:在计算出来的坐标值上加上补偿值。
6.3
chapter gives some hint and ideas on how this can be extended in software to handle a third
direction, e.g. floors in building.
To indicate levels one coordinate must be added in addition to X and Y. In the following this
coordinate is denoted Z. For most purposes it will be enough to represent Z with a one byte
value, this gives 256 different levels.
It is assumed that the received signal strength from a node placed on another floor than the
blind node is lower than the signal strength from a node
the density of reference nodes will be pretty high.
on the same floor as the blind node are stronger than all reference nodes at all other floors.
Figure
nodes marked with an ‘A’ all have the same X and Y values, but different Z. All nodes colored
with the same color have the same Z, but different X and Y coordinates.
An algorithm that can be used is to first
level indication reported from this node. This level is assumed to be the level the blind node is
located. The blind node then needs to make sure
into the location engine. Anyway, an algorithm most be used to select which reference nodes
that should be used, level indication will only add one criteria to this algorithm. The main key
in this algorithm is to decide which level the blind node is on. This can be achieved in different
ways. If the mentioned assumption is not valid, some other algorithm most be implemented.
In this example it is assumed that the closest reference node will provide the blind node with
the strongest signal. Figure 13 shows a network distributed over three floors. The red node on
floor 2 is assumed to be a blind node. The algorithm described above would in this case do
the following:
(1)
(2)
(3)
(4)
(colored in green in the figure), this most be sorted out by the blind node
(5)
directions
(6) The calculated X and Y coordinates, together with the decided
reported as the three dimensional position
- zigbee定位的概念
- zigbee 定位
- zigbee定位
- zigbee 定位
- zigbee概念
- ZigBee中Cluster和Attribute的概念
- ZigBee中Cluster和Attribute的概念
- ZigBee中Cluster和Attribute的概念
- ZigBee中Cluster和Attribute的概念
- Zigbee Smart Energy的概念和应用
- ZigBee 定位解决方案
- zigbee RSSI 定位
- DIV的概念和定位
- 大连高端 最先进的ZIGBEE 井下人员跟踪定位
- ZigBee室内定位设备的天线与射频接口电路设计
- 基于zigbee技术室内定位解决方案的探索(一)
- Zigbee 概念理解
- ZigBee Router 概念
- IOS崩溃 异常处理(NSSetUncaughtExceptionHandler)
- MySQL 删除数据库中重复数据(以部分数据为准)
- java去除List中重复的元素
- APMServ5.2.6 升级PHP版本 到高版本 5.3,5.4
- php 数组转化成json格式工具
- zigbee定位的概念
- C++中的抽象类以及接口的区别联系
- HDUACM 1002
- 动画
- Android 防止多次点击,Toast重复显示
- Linux中inittab文件语法及作用
- unix 环境高级编程 线程取消点
- 构建基于Jenkins + Github的持续集成环境
- 设计模式 装饰者模式 带你重回传奇世界