1.问题描述
随着全球导航卫星系统的高速发展,导航系统的数量也越来越多,比如使用最广泛的GPS导航系统,以及越来越备受关注的中国北斗导航系统等.因此导航频段变得越来越拥挤,且各个频段内的信号相互干扰,在如此情况下,一种二进制偏移载波(Binary Offset Carrier,BOC)调制信号被成功提出,用来解决该问题.而伴随着对BOC信号的深入研究,一系列BOC衍生信号也被提出来应用于各个导航系统中.此外,实际环境中存在着许多干扰因素,给BOC及其衍生信号的捕获带来了困难,因此也成为了国内外学者研究的热点与难点.本文在详细研究了BOC及其衍生信号结构和特性的基础上,着重研究了低信噪比下BOC信号,高动态环境下BOC和高阶双二进制偏移载波(Double Binary Offset Carrier,DBOC)调制信号的捕获问题,以及使用改进的方法实现BOC及其衍生信号的通用无模糊捕获.论文的主要工作如下:(1)针对低信噪比条件下BOC信号的捕获问题,研究了一种基于批处理和Teager-Kaiser(TK)算子的联合捕获算法.该方法首先对接收信号和组合扩频码进行批处理和平均处理,并且将接收信号转换到频域进行多次循环移位,达到多普勒频偏补偿的效果;然后将多个频偏补偿序列与组合扩频码进行圆周相关运算;最后将其中的最大相关值序列经过TK算子处理.研究表明,在同一条件下,本文方法有效提升了检测性能,
2.部分程序
longSignal = data;
%% Initialization =========================================================
% Find number of samples per spreading boc code period
samplesPerCode = round(settings.samplingFreq * (settings.BOCcodeLength/ ...
settings.BOCcodeFreq)); %每个伪码周期的采样点数
% Create two 1msec vectors of data to correlate with and one with zero DC
signal1 = longSignal(1 : samplesPerCode); %第一个伪码周期对应的采样数据
signal2 = longSignal(samplesPerCode+1 : 2*samplesPerCode); %第二个伪码周期对应的采样数据
signal0DC = longSignal - mean(longSignal); %去直流
% Find sampling period
ts = 1 / settings.samplingFreq; %采样周期
% Find phase points of the local carrier wave in one spreading code period
phasePoints = (0 : (samplesPerCode-1)) * 2 * pi * ts; %对应的采样相位
% Number of the frequency bins for the given acquisition band (500Hz steps)
numberOfFrqBins = round(settings.acqSearchBand * 2) + 1; %每次搜索步长为500hz,总搜索次数
% Generate all C/A & BOC codes and sample them according to the sampling freq.
[caCodesTable,bocCodesTable] = makeCaTable(settings); %%改caCodesTable = makeCaTable(settings);
%使用makeCaTable函数产生所有
%的BOC序列矩阵与C/A码矩阵
%--- Initialize arrays to speed up the code -------------------------------
% Search results of all frequency bins and code shifts (for one satellite)
results = zeros(numberOfFrqBins, samplesPerCode); %结果为多普勒频率和码序列二维搜索过程
% Carrier frequencies of the frequency bins
frqBins = zeros(1, numberOfFrqBins); %载波频率初始化
%--- Initialize acqResults ------------------------------------------------
% Carrier frequencies of detected signals
acqResults.carrFreq = zeros(1, 32);
% C/A code phases of detected signals
acqResults.codePhase = zeros(1, 32);
% Correlation peak ratios of the detected signals
acqResults.peakMetric = zeros(1, 32); %初始化捕获结果
fprintf('(');
tic;
%%
% Perform search for all listed PRN numbers ...
%for PRN = settings.acqSatelliteList %图6.8的并行码相位空间捕获过程(双通道比较?)
%% Correlate signals ======================================================
%--- Perform DFT of C/A code ------------------------------------------
PRN=1;
bocCodeFreqDom1 = conj(fft(bocCodesTable(PRN, :))); %%改caCodeFreqDom = conj(fft(caCodesTable(PRN, :)));
bocCodeFreqDom2 = conj(fft(caCodesTable(PRN, :))); %本地接收码
%PRN码发生器经傅里叶变换再经共轭
% Raspect=(abs(Rboc)).^2-(abs(Rboc_ca)).^2 ;
%--- Make the correlation for whole frequency band (for all freq. bins)
for frqBinIndex = 1:numberOfFrqBins
%--- Generate carrier wave frequency grid (0.5kHz step) -----------
frqBins(frqBinIndex) = settings.IF - ...
(settings.acqSearchBand/2) * 1000 + ...
0.5e3 * (frqBinIndex - 1); %不同多普勒频移下的载波频率
%--- Generate local sine and cosine -------------------------------
sinCarr = sin(frqBins(frqBinIndex) * phasePoints);
cosCarr = cos(frqBins(frqBinIndex) * phasePoints); %本地振荡器
%--- "Remove carrier" from the signal -----------------------------
I1 = sinCarr .* signal1;
Q1 = cosCarr .* signal1;
I2 = sinCarr .* signal2;
Q2 = cosCarr .* signal2; %去载波
%--- Convert the baseband signal to frequency domain --------------
IQfreqDom1 = fft(I1 + j*Q1);
IQfreqDom2 = fft(I2 + j*Q2); %fft
%--- Multiplication in the frequency domain (correlation in time
%domain)
convCodeIQ11 = IQfreqDom1 .* bocCodeFreqDom1;%%改caCodeFreqDom;
convCodeIQ12 = IQfreqDom1 .* bocCodeFreqDom2;
% convCodeIQ1=(abs( convCodeIQ11)).^2-(abs( convCodeIQ12)).^2 ;
convCodeIQ21 = IQfreqDom2 .* bocCodeFreqDom1;%%caCodeFreqDom;
convCodeIQ22 = IQfreqDom2 .* bocCodeFreqDom2;
% convCodeIQ2=(abs( convCodeIQ21)).^2-(abs( convCodeIQ22)).^2 ;
%--- Perform inverse DFT and store correlation results ------------
acqRes1 = abs(ifft(convCodeIQ11)) .^ 2-abs(ifft(convCodeIQ12)) .^ 2;
acqRes2 = abs(ifft(convCodeIQ21)) .^ 2-abs(ifft(convCodeIQ22)) .^ 2; %逆fft取平方
%--- Check which msec had the greater power and save that, will
%"blend" 1st and 2nd msec but will correct data bit issues
if (max(acqRes1) > max(acqRes2))
results(frqBinIndex, :) = acqRes1;
else
results(frqBinIndex, :) = acqRes2;
end %1.比较大小经过循环可以找到多普勒频率
% results(frqBinIndex, :) = acqRes1; %以及含最大的自相关的输出结果
%2.此时只循环了一个PRN码即只对一个可见
%星的不同频率进行了搜索
%3.生成每个频率所对应的结果矩阵
end % frqBinIndex = 1:numberOfFrqBins
toc;
figure(18);
clf(18)
phase=0 : (samplesPerCode-1);
[X,Y]=meshgrid(phase*settings.BOCcodeLength/samplesPerCode,frqBins);
surf(X,Y, results);
title (['第(' int2str(PRN) ')颗可见星的ASPeCT算法捕获结果']);
ylabel('载波频率 (MHz)'); xlabel('相位(码片)');zlabel('幅度');
axis tight;
3.仿真结论
D-48
标签:基于,settings,%---,捕获,PRN,frqBinIndex,abs,BOC From: https://www.cnblogs.com/matlabfpga/p/16943032.html