<< Chapter < Page | Chapter >> Page > |
%% Frequency Synchronization (RECEIVER)
% ------------------------------------------------------------------------% Description: This module attempts to correct the frequency/phase offset
% in the recovered signal by estimating it as a static phase% offset. Though there may be a frequency offset or even a
% frequency drift, for BPSK, estimating this as a fixed phase% offset is sufficient in recovering the bits. More often
% than not this corrects the recovered bits when they're% inverted (estimated as a pi phase offset). This uses the
% same metric as the timing recovery to find the phase.%
% Inputs: train - Received training symbol% train_expected - Expected training symbol via a priori knowledge
% Outputs: phi - Estimated phase offsetfunction phi = fsync(train, train_expected)%%
L = size(train,2); % Size of window for algorithmP = 0; % Initialize the metricfor n=1:L
P = P + conj(train(n))*train_expected(n);% Sample by sample multiplication of the complex conjugate of the
% received training symbol with the expected training symbol. If% both of them are in phase, the imaginary components would
% annhiliate each other. However, if there's a phase offset% between the two, it will be represented in the angle of the
% resulting product.end
phi = angle(P);end
Notification Switch
Would you like to follow the 'Fully configurable ofdm sdr transceiver in labview' conversation and receive update notifications?