我正在尝试编写代码来将发送的信号与接收的信号进行互相关,以确定样本延迟的数量
互相关用于通过发送一个信号来测量到飞机的距离 已知的宽带信号并将传输信号与输入信号相关联 通过雷达接收盘接收
发射信号 x(n) 的长度为 N=512,而接收信号 y(n) 的长度为 N=2048。
y(n)=kx(nd)+w(n);其中“kx(nd)”是 x(n) 延迟 d 个样本并衰减系数 k,w(n) 是接收噪声。
我正在尝试编写一个 MATLAB 程序来将 x(n) 与 y(n) 交叉关联,以确定 d 的值,即样本延迟数。 如果到飞机的距离要确定,还要确定合适的采样频率 考虑到传输的信号,在 50 km 内确定,精度为 50 m 接收到的数据以光速传播。
Cross correlation is to be used to measure distance to an aircraft by transmitting a
known wide-band signal and correlating the transmitted signal with incoming signals
received via the radar reception dish
The transmitted signal x(n) is of length N=512 while the received signal y(n) is of length N=2048.
y(n)=kx(n-d)+w(n); where 'kx(n-d)' is x(n) delayed by d samples and attenuated by a factor k, and w(n) is reception noise.
i am trying to write a MATLAB program to cross correlate x(n) with the y(n) to determine the value of d, the number of samples delay.
And also Determine a suitable sampling frequency if the distance to the aircraft is to be
determined within 50 km to an accuracy of 50 m, given that the transmitted
and received data is travelling at the speed of light.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
最简单的方法是使用“xcorr”函数。这是 matlab 信号处理工具箱的一部分,但应该可用于 GNU Octave 此处。我还没有检查八度脚本是否完全兼容 MATLAB。
您可以将 xcorr 函数用作:
可以使用以下方法找到滞后值
在光速下,信号将以 3 x 10^8 m/s 的速度传播,因此要获得 50m 的分辨率,您应该在以下位置采样至少 (3e8/50m) = 6MHz。在此采样率下,每次延迟将为 1/6000000 秒。如果将延迟乘以该值,就可以得到信号传输和接收之间的总时间间隔。将此时间间隔乘以光速即可得出您的距离。
The easiest way to do this is with the "xcorr" function. This is part of the Signal Processing toolbox for matlab, but should be available for GNU Octave here. I have not checked if the octave script is completely MATLAB compatible.
You can use the xcorr function as:
The lag value can be found using
At the speed of light, the signal will be travelling at 3 x 10^8 m/s, so to have a resolution of 50m, you should be sampling at at least (3e8/50m) = 6MHz. At this sampling rate, each lag will be 1/6000000 second. If you multiply your delay by this value, you get your total time intervel between transmission and reception of the signal. Multiply this time intervel by the speed of light to get your distance.
您可以使用广义互相关 - 相变换 GCC PHAT
以下是它的 MATLAB 代码
You can use generalized Cross correlation -Phase transform GCC PHAT
The following is the MATLAB code for it
我们可以忽略matlab中的'find'函数,该命令可以更改为
'xcorr'适合长向量;
“gcc”更喜欢逐帧。
we can ignore the 'find' function in matlab, the command could be changed to
'xcorr' suits for vectors with long length;
'gcc' prefer frame by frame.
Aj463上面的评论很好,确实GCC-PHAT在估计宽带信号延迟方面比未加权相关更好。
我建议对上面发布的代码进行一个小改进:向分母添加一个小值 epsilon,epsilon -> 0,以避免最终被零除。
因此,我会将行更改
为
Aj463's comment above is good, indeed GCC-PHAT is better than unweighted correlation for estimating delay of wide-band signals.
I would suggest a small improvement to the code posted above: to add a small value epsilon to the denominator, epsilon -> 0, in order to avoid eventual division by zero.
Thus, I would change the line
to