Skip to content

Commit

Permalink
Compute dMF and GTED interpolants when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
igorauad committed Sep 20, 2021
1 parent fb0510e commit 3e282cc
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions symbolTimingSync.m
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,14 @@
end
xI(k) = interpolate(interpChoice, ...
mfOut, m_k, mu(k), b_mtx, polyBranch);
xdotI = interpolate(interpChoice, ...
dMfOut, m_k, mu(k), b_mtx, polyBranch);

% Timing Error Detector:
a_hat_k = Ksym * slice(xI(k) / Ksym, M); % Data Symbol Estimate
switch (TED)
case 'MLTED' % Maximum Likelihood TED
% dMF interpolant
xdotI = interpolate(interpChoice, ...
dMfOut, m_k, mu(k), b_mtx, polyBranch);
% Decision-directed version of Eq. (8.98), i.e., Eq. (8.27)
% adapted to complex symbols:
e(n) = real(a_hat_k) * real(xdotI) + ...
Expand Down Expand Up @@ -229,12 +230,12 @@
e(n) = 0; % needs at least two symbols to start
end
case 'GTED' % Gardner TED
% Zero-crossing interpolant, same as used by the ZCTED
x_zc = interpolate(interpChoice, ...
if (k > 1)
% Zero-crossing interpolant, same as used by the ZCTED
x_zc = interpolate(interpChoice, ...
mfOut, m_k - L/2, mu(k), b_mtx, polyBranch);

% Equation (8.101):
if (k > 1)
% Equation (8.101):
e(n) = real(x_zc) * (real(xI(k - 1)) - real(xI(k))) ...
+ imag(x_zc) * (imag(xI(k - 1)) - imag(xI(k)));
else
Expand Down

0 comments on commit 3e282cc

Please sign in to comment.