我正在尝试编写代码以使发射信号与接收信号互相关以确定采样数延迟 [英] i am trying to write a code to cross correlate a transmitted signal with a received signal to determine the number of samples delay

查看:121
本文介绍了我正在尝试编写代码以使发射信号与接收信号互相关以确定采样数延迟的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

交叉相关将用于通过传输一个距离来测量到飞机的距离 已知的宽带信号,并将发送的信号与进入的信号相关 通过雷达接收盘接收到

发射信号x(n)的长度为N = 512,而接收信号y(n)的长度为N = 2048.

y(n)= kx(n-d)+ w(n);其中,"kx(n-d)"是延迟了d个样本并衰减了系数k的x(n),而w(n)是接收噪声.

我正在尝试编写一个MATLAB程序,以将x(n)与y(n)互相关,以确定d的值,即采样延迟的数量. 如果要确定与飞机的距离,还应确定合适的采样频率 在50 km内确定精度为50 m, 并且接收到的数据正以光速传播.

解决方案

最简单的方法是使用"xcorr"函数.这是Matlab信号处理工具箱的一部分,但应可用于GNU Octave 解决方案

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:

[correlation,lags] = xcorr(x,y);

The lag value can be found using

delay = lags(find(correlation==max(correlation)))

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.

这篇关于我正在尝试编写代码以使发射信号与接收信号互相关以确定采样数延迟的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆