这篇笔记主要是基于CC2431 Location Engine 这篇文档。这篇文档主要提供一些定位的基本概念,同时给出了一种在开发定位系统过程中的小技巧。

(支持原创,如需转载,请注明地址:http://blog.sina.com.cn/litianping0709 作者:叶雨荫城(阿雨))http://blog.sina.com.cn/s/blog_61500ed60100mwgd.html

定位引擎

The  location  algorithm used in the CC2431  Location Engine is based on Received Signal
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  node does not need to implement the hardware
needed for location detection, it will not perform any calculation at all. A “Blind node” is a node built with CC2431.  This  node will  collect signals from all reference nodes responding to a request, read out the respective RSSI values, feed the collected values into the  hardware
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  represent
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  this node  is not using the hardware location engine at all, it is not necessary to use a
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  of these nodes, and calculate its position based on the parameter input using the
location engine hardware. Afterwards the calculated position should be sent to a  control
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 hardware
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  RECEIVED SIGNAL STRENGTH INDICATOR (RSSI)

When CC2430/31 receives a packet it will automatically add an RSSI value  to  the  received
packet. The RSSI value is always averaged  over  the 8 first symbol periods (128 µs). This
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  is
captured  at  the  same time as the data packet  is received, the RSSI value will reflect the
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  at  the same time as the RSSI value is
captured.

当cc2431/cc2430收到一个数据包的时候他将会自动在数据包中加上相应的RSSI值。RSSI的值是收到开始八个符号周期(128us)的平均值。虽然这个RSSI的值是在接收到数据包的同时捕获的,但是RSSI值只反映当时接收到的信号强度,而不一定是接收到的数据包的信号强度。当一个信道中有多个节点在通信时,捕获的RSSI值就有可能存在误差。

CC2430/31 contains a register termed RSSI. This  register  holds the same values as
described above, but it is not locked when a packet  is  received, hence the register value
should not be used for further calculations. Only  the  locked RSSI value attached to the
received  data  can  be  interpreted as the RSSI value measured exactly when the data is
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,  furthermore this offset will depend on the actual
antenna configuration.

4.2 Linearity
Measurements performed in TI’s laboratory shows that the RSSI values measured by  the
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  Theoretical signal propagation
The received signal strength is a function of the transmitted power and the distance betw
the sender and the receiver.  
The received signal strength will  decrease with increased distance as the equation b
shows.

•  n:  signal propagation constant, also named propagation exponent.
•  d:  distance from sender.
•  A:  received signal strength at a distance of one meter.
 
A wider discussion of A and n can be found in chapter 5.

4.4  RSSI – Practical considerations
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  real world. When
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  the
accuracy. The methods presented in this section have one main goal: obtain an RSSI value
that correlate to the distance in the best possible way.
4.4.1  Simple ways to filter the RSSI values
Various filters can be used to smooth the RSSI  value. Two common filters are simple
averaging and feedback filters. Averaging  is  the most basic filter type, but it requires more
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  equation
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  in RSSI
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  A – RSSI value measured one meter from the sender
A, which is an empirical parameter can be  determined  by measuring the RSSI value one
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  averaged value is approximately  -46.  These
measurements were done with RSSI_OFFSET equal to -45.

5.1.2  A versus calculated position (A对位置计算的影响)
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  blue  dot  shows that the blind node calculates its own position differently by using
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  between 45 and 49 were  approximately  (22,  28), while the real position was (22, 26).
 

5.2  N – Signal propagation coefficient (信号传播系数)
The parameter named N is a parameter that  describe how the signal strength decreases
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  the  distance  is given in meters. N should be fitted to the actual environment as
accurate as possible.
 
5.2.1 Measuring n
It is challenging, if not impossible, to find  a default value that is optimum n_index for all
environments. The easiest way will probably be  to install all reference nodes in the
environment where the system should be  used  and  thereafter test with different values of
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  Number of reference nodes
As a rule of thumb; as many  reference nodes as possible should be used. At least three is
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,  e.g.  due  to multipath or if the signal is blocked by walls or
similar.
 
If  the blind node is located outside the grid of reference nodes, it is highly probable that the
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  Selection of “best” reference nodes
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  Extension of the covered area
The hardware location engine can handle X and Y values up to 64 meters, or more precisely
up to 63,75 meters  in  both  directions.  This is too small an area for many practical
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.  On the figure the light green node
is the blind node, all other nodes are reference nodes.  
算法工作流程: 
•  Step one is to locate the one node with the highest RSSI value and  calculate  an
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的正方形的中央需要的补偿值。
•  The  next  step  is to locate the other reference nodes to be used in addition to the
“strongest” one. In the figure the nodes coloured in dark blue are used. All nodes are
offset with the value found in step 1.

第二步:确定其他用于定位的参考节点。所有节点都由第一步计算的值经过补偿。
•  All values found are fed into the location engine hardware and the resulting position is
read out.

第三步:计算出位置值。
•  The last step is to add the same offset to the position calculated. After  these
calculations are done, the location of the blind node is known in the global grid.

第四步:在计算出来的坐标值上加上补偿值。
 

6.3  Level/ floor indication
The hardware location engine is designed for calculating of positions in two dimensions. This
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  in the same floor. This implies that
the density of reference nodes will be pretty high.  It  is not assumed that all reference nodes
on the same floor as the blind node are stronger than all reference nodes at all other floors.

Figure  13  shows  a simplified network used for  position tracking between levels. The three
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  locate the nearest reference node and read out the
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  that only nodes  in the same level are fed
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)  Find the closest node, this node is labeled B in this case
(2)  Node B will tell the blind node that it is located on floor 2 
(3)  The blind node will then assume (know) that it also is located at floor 2
(4)  All other reference nodes used for the  calculation must also be located at floor 2
(colored in green in the figure), this most be sorted out by the blind node
(5)  The  blind node calculates its position  in the normal way, only by using X and Y
directions
(6) The calculated X and Y coordinates, together with the decided  Z-coordinate,  is
reported as the three dimensional position



zigbee定位的概念相关推荐

  1. zigbee 定位

    我一直都提醒  zigbee  RSSI定位不靠谱,但是既然非要这样,先mark一下简单的两点定位. 特别是在隧道里,还会有多径干扰, 模型也不是标准的.所以zigbee定位应该只适用实验室研究吧.要 ...

  2. 基于ZigBee定位技术下的隧道人员定位,隧道人员考勤定位--新导智能

    说到隧道定位,我们最早想到的一定是RFID射频技能(刷卡定位)以及ZigBee技能(强度定位).实际上,现在大多数隧道项目的定位识别体系也是依托这两种技能的相关设备施行搭建的.但是说到高精度隧道定位, ...

  3. ZigBee 定位解决方案

    ZigBee 定位解决方案 [日期:2008-7-15] 来源:21IC中国电子网  作者:Jarle Boe,德州仪器 [字体:大 中 小] <script src="http:// ...

  4. zigbee定位_基于RFID室内定位技术的解决方案,能满足高精度室内定位吗?

    跟着物联网的研讨和无线传感网络技能迅速发展,ZigBee技能作为一种新式的低成本.低功耗.低速率短间隔的无线传感网络技能,它是根据IEEE802.15.4规范开发的无线协议.IEEE802.15.4担 ...

  5. UWB+ZigBee定位技术开创井下空间里的“GPS”导航

    由于煤矿井下空间内卫星信号几近于无,井下人员定位系统的建设需要依赖高精度定位技术UWB.UWB作为一个目前来说,定位精度高.功耗低.覆盖距离远.多径分辨能力强等优势的室内定位技术,被很多煤矿企业明确要 ...

  6. 基于ZigBee定位技术下的室内人员定位-室内定位-新导智能

    1. 系统概述 新导智能基于企业/工厂的室内人员定位系统整体解决方案采用国内当今最先进的ZigBee无线技术.整个解决方案是由以下几部分组成: 1)硬件:包含有监控服务器.网络交换机.控制单元.读写器 ...

  7. ZigBee定位技术下的隧道人员定位系统,保障施工人员安全-新导智能

    1.系统概述 新导ZigBee隧道人员定位系统采用目前最先进的Zigbee 无线识别技术,结合高速公路隧道.铁路隧道.地铁隧道安全施工企业的技术要求和安全标准而设计,人员定位精度高达3米.该系统利用同 ...

  8. 常见的室内人员定位及时之一,ZigBee定位-新导智能

    室内人员定位技能在未来应该会是很有远景.现在看来,iBeacon好像在消费级商场占得先机,UWB虽然现已研讨多年,但短期内还很难步入商用,但其高精度是极有吸引力的,我看好UWB室内定位会先在物流领域使 ...

  9. Zigbee定位技术下的隧道人员定位--隧道定位--新导智能

    隧道人员定位系统是在Zigbee技术的基础上,结合先进的通信.计算机及网络技术研制的归纳办理平台.隧道人员定位系统的使用,使办理人员能够实时掌握施工现场人员.设备的分布状况和运动轨道,便于日常进行合理 ...

最新文章

  1. python面相对象编程指南_Python面向对象编程指南
  2. vue 可合并表格组件_merge-table
  3. spring18-3: 工厂bean代理-半自动
  4. jstl核心标签使用
  5. 《面向对象分析与设计》一3.2 参与者
  6. matlab 列表 剪切,利用Matlab进行文件批量复制、剪切和修改文件名
  7. [知识整理]Linux系统WIFI知识的一些整理
  8. linux pgpgin pgpgout pswpin pswpout 说明
  9. altas(ajax)控件(二):悬浮面板控件AlwaysVisibleControl
  10. 计算机算法分析与设计心得体会,算法设计与分析课程的心得体会
  11. wps打印错误未定义书签怎么解决_word文档打印时候目录出现错:未定义书签,在wps里怎么修改?...
  12. Arm开发板上使用ldd命令
  13. C语言 栈的应用 :火车的调度(软硬座)
  14. 【数据库系统】数据库系统概论====第十三章 数据库技术发展
  15. https://jingyan.baidu.com/article/c45ad29cd06453051753e2e9.html
  16. [Jule CTF 2022] 部分WP
  17. java 方法互斥_Java中的互斥方法执行
  18. dataframe之按时间筛选数据
  19. 2023上海理工大学计算机考研信息汇总
  20. 如何用python进行建模_用 Python 进行贝叶斯模型建模(1)

热门文章

  1. ai怎么让图片任意变形_AI入门基础教程-图形绘制变形及路径查找器
  2. ios android 一键换机,‎App Store 上的“手机搬家 - 一键换机助手”
  3. python opencv PIL 视频分割成图片 图片合成为视频 修改图片大小(抗锯齿)
  4. Mac安装mysql忘记初始的默认密码!!
  5. laravel 链接多库方案
  6. 传导发射(CE)测试概述
  7. 理论力学知识要点(七)
  8. 用python获取新浪历史分时数据
  9. 真正可用win10 x64位twain协议虚拟扫描仪.net C#Twain连接打印机扫描仪winform测试demo
  10. sql列转行逗号连接_SQL行转列,逗号隔开