Re: [問題] 可以幫我看看BPSK嗎?(over Rayleigh Ch …已回收
我想我的問題可能出在沒有channel estimate
請問一下
當做以下步驟
ch1=rayleighchan(1/1000,100);
faded_s=filter(ch1,data_s);
再加上高斯白雜訊AWGN後
要如何demodulate訊號呢?
※ 引述《ronnie1138 (專心讀書不忘休閒)》之銘言:
: 請問一下
: 如果我要將這個信號在Rayleigh Channel下模擬
: 我是將原程式加了以下的rayleigh fading程式碼進去
: ch1=rayleighchan(1/1000,100);
: faded_s=filter(ch1,data_s);
: 可是跑出來的值跟理論值相差很多
: 可以請幫我看一下嗎
: ※ 引述《ck901004 (ck901004)》之銘言:
: : 您好,我稍微看了一下。
: : 不太愛用 function,改成整份code,
: : SNR_dB1=0:2:20;
: : SNR_dB2=0:0.1:20;
: : bit_err_prb=zeros(1,length(SNR_dB1));
: : theo_err_prb=zeros(1,length(SNR_dB2));
: : for i=1:length(SNR_dB1),
: : N=50000;
: : E=1; % energy per symbol
: : snr=10^(SNR_dB1(i)/10);
: : vari=sqrt(E/snr/2); % 修正一
: : % generate of the random data sourses between 0 & 1
: data_s=sign(randint(1,N)-0.5);
: : % dection and the probability of error calculation
: : numofbiterror=0;
: ch1=rayleighchan(1/10000,100);
: faded_s=filter(ch1,data_s);
: : for j=1:N,
: n=vari*(randn(1,N) + 1i*randn(1,N));
: r=faded_s+n;
: : % correlation metrics
: : c00=dot(real(r),1); % 1
: : c01=dot(real(r),-1); % 0
: : c_max=max([c00,c01]);
: : if (c00==c_max),
: : decis=1;
: : elseif (c01==c_max),
: : decis=-1;
: : end
: : % increment the error counter, if the decision is not correct
: : if(decis~=data_s(j)),
: : numofbiterror=numofbiterror+1;
: : end
: : end
: : pb=numofbiterror/N;
: : bit_err_prb(i)=pb;
: : end
: : for i=1:length(SNR_dB2),
: : SNR=exp(SNR_dB2(i)*log(10)/10);
: theo_err_prb(i)=0.5*(1-sqrt(SNR/(SNR+1)));
: : end
: : semilogy(SNR_dB2,theo_err_prb,SNR_dB1,bit_err_prb,'r*');
: : 其實問題出在你的 noise ,其他並無重大錯誤。
: : 希望有幫助~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 222.228.171.110
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):