I have Implemented this detector in AWGN channel in Matlab but I am getting vague results. As its performance doesn't vary with change in SNR. Its a very strange result for me. I don't know what mistake I am doing in it. I am attaching my codes please have look and comment. Here I am finding cyclostationary feature of signal for its detection. Firstly I tried to Out FFT of a signal then shift its frequency by +alpha of tranform and -alpha to its conjugate. Then I multiplied both to taken sum of all. Thats how all theory explain about cyclostationary feature detection I will very grateful if somebody can help me in this.
function S=cyclio_stat_TestStatics(x,N)
lx=length(x);
X=zeros(2*N+1);
Y=zeros(2*N+1);
Ts=1/N;
for f=-N:N
d=exp(-j*2*pi*f*(0:lx-1)*Ts);
xf=x.*d;
n_r=lx:-1:1;
X(f+N+1)=sum(xf(n_r));
Y(f+N+1)=conj(sum(xf(n_r)));
end
alpha=10;
f=5;
f1=f+floor(alpha/2)+(floor(-((N-1)/2)):floor((N-1)/2));
f2=f-floor(alpha/2)+(floor(-((N-1)/2)):floor((N-1)/2));
S=sum(X(f1+N+1).*Y(f2+N+1))/N;
S=abs(S)/lx;