X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=pdm_adaptiveCMA.m;h=a5abf737e6abeec00e2fc6664b5353888e1f0677;hb=HEAD;hp=6dca946720b16154a6891d944b48190f8b0fb687;hpb=5117fc5819545753d1c8ebbef03bf7deea0f3ae9;p=100GbE-PON.git diff --git a/pdm_adaptiveCMA.m b/pdm_adaptiveCMA.m index 6dca946..a5abf73 100644 --- a/pdm_adaptiveCMA.m +++ b/pdm_adaptiveCMA.m @@ -3,7 +3,7 @@ function [x, y] = pdm_adaptiveCMA(rx, ry) %% Input: rx, ry: Both polarizations of received signal %% Output: x, y: Equalizaed signal - taps = 19; % Number of taps. Should be odd. + taps = 15; % Number of taps. Should be odd. mu = 1e-3; % Convergence parameter for gradient descent. hxx = zeros(taps, 1); @@ -39,8 +39,10 @@ function [x, y] = pdm_adaptiveCMA(rx, ry) yp = [zeros((taps - 1) / 2 - it + 1, 1); ry(1:it + (taps - 1) / 2)]; elseif it + (taps - 1) / 2 > numSymbs %% If near the end, append zeros - xp = [rx(it - (taps - 1) / 2 : end); zeros(it + (taps - 1) / 2 - numSymbs, 1)]; - yp = [ry(it - (taps - 1) / 2 : end); zeros(it + (taps - 1) / 2 - numSymbs, 1)]; + xp = [rx(it - (taps - 1) / 2 : end); ... + zeros(it + (taps - 1) / 2 - numSymbs, 1)]; + yp = [ry(it - (taps - 1) / 2 : end); ... + zeros(it + (taps - 1) / 2 - numSymbs, 1)]; else %% Just slice the signal xp = rx(it - (taps - 1) / 2 : it + (taps - 1) / 2);