Why downsample the signal before performing correlation?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am studying the following example in MATLAB site.
While examining the code to understand how it works,
I discovered that when performing autocorrelation on the reference signal, downsampling is carried out as follows.
code name : hSSBurstFrequencyCorret.m
(This code can be found at above URL.)
Why downsampling performed here?
% Frequency offset and PSS search
fshifts = (-searchBW:scs:searchBW) * 1e3/2; % Half subcarrier step
peak_value = zeros(numel(fshifts),3);
peak_index = zeros(numel(fshifts),3);
t = (0:size(rxWaveform,1)-1).' / rxSampleRate;
for fIdx = 1:numel(fshifts)
coarseFrequencyOffset = fshifts(fIdx);
rxWaveformFreqCorrected = rxWaveform .* exp(-1i*2*pi*coarseFrequencyOffset*t);
% Downsample to the minumum sampling rate to cover SSB bandwidth
% HERE
rxWaveformDS = resample(rxWaveformFreqCorrected,syncSR,rxSampleRate);
% HERE
for NID2 = [0 1 2]
refGrid(kPSS,2,NID2+1) = nrPSS(NID2);
nSlot = 0;
[~,corr] = nrTimingEstimate(rxWaveformDS,nrbSSB,scs,nSlot,refGrid(:,:,NID2+1),'SampleRate',syncSR,'Nfft',syncNfft);
corr = sum(abs(corr),2);
[peak_value(fIdx,NID2+1),peak_index(fIdx,NID2+1)] = max(corr);
peak_index(fIdx,NID2+1) = peak_index(fIdx,NID2+1) + syncOfdmInfo.SymbolLengths(1);
end
end
% Determine NID2 and coarse frequency offset by finding the strongest
% correlation
[fIdx,NID2] = find(peak_value==max(peak_value(:)));
coarseFrequencyOffset = fshifts(fIdx);
NID2 = NID2 - 1;
% Apply coarse frequency correction
rxWaveformFreqCorrected = rxWaveform .* exp(-1i*2*pi*coarseFrequencyOffset*t);
% Downsample received waveform after coarse frequency correction
rxWaveformDS = resample(rxWaveformFreqCorrected,syncSR,rxSampleRate);
0 comentarios
Respuestas (1)
Shantanu
el 17 de Sept. de 2025
Hi 지준
In the provided code PSS search is a correlation operation, which is performed by the “nrTimingEstimate” function. The received waveform (“rxWaveform”) when captured over a wide bandwidth, results in a high sampling rate (“rxSampleRate”). SSB Block occupies a fixed and much smaller bandwidth.
Downsampling the received signal drastically reduce the number of samples that the “nrTimingEstimate” function must process. This makes correlation search quicker. Furthermore, this process acts as a filter, removing out-of-band noise and interference, which improves the signal-to-noise ratio (SNR).
For more information, kindly refer to the following MATLAB documentation
0 comentarios
Ver también
Categorías
Más información sobre Multirate Signal Processing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!