51uwb.cn

 找回密码
 立即注册
查看: 874|回复: 3
打印 上一主题 下一主题

关于AOA相位差读取求教

[复制链接]

1

主题

10

帖子

26

积分

新手上路

Rank: 1

积分
26
跳转到指定楼层
楼主
发表于 2023-9-15 18:20:44 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
请问有没有人能提供一下DW1000的AOA的代码,我按照手册计算相位差波动太大,一直弄不对,请问哪里有相关的代码,谢谢大佬
回复

使用道具 举报

35

主题

1053

帖子

4523

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4523
沙发
发表于 2023-9-15 20:34:44 | 只看该作者
我们目前还没有AOA产品。
是否可以将代码发出来一起看下
回复

使用道具 举报

1

主题

10

帖子

26

积分

新手上路

Rank: 1

积分
26
板凳
 楼主| 发表于 2023-9-18 09:52:42 | 只看该作者
Decawave have patent pending a method of estimating AOA using phase difference of
arrival. This method can be implemented using 2 x DW1000 ICs (anchor master and slave)
clocked from the same 38.4 MHz reference clock input. Each DW1000 is connected to an
antenna and the antennas are optimally separated by approximately λ/2. Using this hardware
set up the phase difference (and hence angle of arrival) between the signals received at
each antenna can be calculated.
The Phase difference (PD) is calculated as follows:
1. When a frame is received, read the first path index from each DW1000 (A and B) and
the complex sample from accumulator at FP index.
- read register 0x15, offset 5, two bytes (The 10 most significant bits of
FP_INDEX represent the integer portion of the number and the 6 least
significant bits represent the fractional part)
- convert to float value (e.g. 745.67) and then add 0.5
- then truncate the resultant value (e.g. 746)
- get the accumulator index i.e. location in the accumulator at which to
calculate phase difference, (e.g. 2984) (=746 x 4 because they are 16-bit
complex numbers)
- read accumulator value at this index (reading 5 bytes to get 2 byte real and 2
byte imaginary value)
- treating the accumulator value as a complex number
- get arctan of the complex number to get (accangleA, accangleB)
2. Then read SFD angle (register 0x14, offset 3, one byte) from each (sfdangleA,
sfdangleB). The SFD angle (in radians) is obtained by multiplying by π/64
3. Next calculate the Phase Difference, PDx we use following formula:
PDx = ((accangleA - sfdangleA) – (accangleB - sfdangleB)) + π;
4. Then modulo 2π as the range should be 0 to 2π, and finally subtract π, to get PD.
5. The angle is then obtained by formula:
AOA (in radians) = PD/2 (Derived using a straight-line formula from Figure 3)
回复

使用道具 举报

1

主题

10

帖子

26

积分

新手上路

Rank: 1

积分
26
地板
 楼主| 发表于 2023-9-18 09:56:55 | 只看该作者
我是照着这个文档写的,感觉写得不太对,一个第1条的复数怎么计算arctan   我是直接虚部除以实部,当有符号数算的,,自己也不太清楚是实部和虚部是有符号还是无符号数
另一个不太清楚的地方是第2条0x14寄存器偏置3,我看着手册这段描述的像是0x14寄存器偏置4的位置数据,搞不明白
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

bphero Inc.  

GMT+8, 2024-11-22 16:48 , Processed in 0.011969 second(s), 4 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】

快速回复 返回顶部 返回列表