我已經在Matlab中的AWGN通道中實現了用於頻譜感測的循環平穩檢測器,但是我得到了模糊的結果。因爲它的性能不隨SNR的變化而變化。它對我來說非常奇怪。我不知道我在做什麼錯誤。我附上我的代碼,請看看和評論。在這裏,我發現信號的循環平穩特徵用於檢測。首先,我嘗試對信號進行FFT處理,然後將其頻率由變換的+α和-α轉換爲其共軛。然後我把兩者都乘以所有的總和。這就是所有理論如何解釋循環平穩特徵檢測如果有人能幫助我,我將非常感激。Cyclostationary特徵檢測器:性能不隨SNR的變化而變化
function Pd=Cyclo_AWGN(Pf,snr_avg,n,N,Sim_Times)
% Pf= Probablity of false alarm
% n= length of data
% N= length of fft
% Sim_Times= Iteration
ln=0:n-1;
Over_Num = 0;
Th_awgn= sqrt(-2*log(Pf)/n); % threshold
for kk = 1:Sim_Times
phi= randi([-180,180],1,n);
phi=phi*2*pi/360;
x=sin(0.32*pi*ln+phi);
Recv_Signal = x; % Recived Signal
Noise_awgn = randn(1,n)+1i*randn(1,n);
AvgPower_Noise_awgn=sum(abs(Recv_Signal).^2)/snr_avg; %average power of noise
std_Noise_awgn = sqrt(AvgPower_Noise_awgn);
Noise_awgn = std_Noise_awgn*Noise_awgn;
norm_signal_awgn = Recv_Signal/std_Noise_awgn; %Normalized signal sample
norm_noise_awgn = Noise_awgn/std_Noise_awgn; %Normalized Noise sample
Recv_sig_awgn = norm_signal_awgn + norm_noise_awgn; % Normalized received signal for detection
X=zeros(2*N+1);
Y=zeros(2*N+1);
Ts=1/N;
for f=-N:N
d=exp(-j*2*pi*f*ln*Ts);
xf= Recv_sig_awgn.*d;
n_r=n:-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(kk)=sum(X(f1+N+1).*Y(f2+N+1))/N;
S(kk)=abs(S(kk))/n;
if S(kk)>Th_awgn
Over_Num = Over_Num +1; %decide 1 or 0, present or absent
end
end
Pd = Over_Num/Sim_Times; % Simulated Pd}
嗨,謝謝你的回覆。我在我的代碼中熟悉你的分析。根據您的支票,我在代碼中進行了更改。但仍然有一件事讓我困惑,如何確定確切的alpha值檢測值或者我們必須運行一個循環的所有可能的阿爾法alpha值,並在最後取平均值。 – Marcus 2015-03-26 13:25:51