Added adaptive CMA equalizer, "fixed" CD and phase noise
[4yp.git] / phaseNoiseCorr.m
index 1f4ed45..6d27f74 100644 (file)
@@ -6,7 +6,10 @@ function [rPhaseEq, phiests] = phaseNoiseCorr(r, M, blocksize)
     block = r(l : min(l + blocksize - 1, length(r)));
 
     sum_M = sum(block .^ M);
-    phi_est = angle(sum_M) / M; % assume phase of 0 symbol is 0.
+    %% if phase of 0 symbol is 0, use:
+    phi_est = angle(sum_M) / M;
+    %% if phase of 0 symbol is pi/M, use:
+    %% phi_est = angle(-sum_M) / M;
 
     if l > 1
       %% phase unwrapping