[問題] PSK over Rayleigh Channel simulation已回收

看板MATLAB作者 (專心讀書不忘休閒)時間14年前 (2009/11/28 21:12), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
請問一下 我修改了help說明中的範例 將dpsk改成psk去模擬高斯白雜訊加Rayleigh Channel下的信號 但是跑出來的結果實驗值與理論值不一致 有人可以幫我看看嗎? 我將程式碼付在下面 clear all; close all; M=2; % bpsk modulator order N=500000; % number of signal h=modem.pskmod('M',M); % create bpsk modulator g=modem.pskdemod(h); % create bpsk demodulator % Create Rayleigh fading channel object %ch1=rayleighchan(1/10^6,100); % fade.m is a fading-channel generating function ch1=(fade(1,N,1,100,1,1/10^6))'; % Rayleigh fading channel % data_s=randint(N,1,M); % generate random signal 0 and 1 psk_s=modulate(h,data_s); % modulate faded_s=psk_s.*ch1; % apply fading on signals % SNR=0:2:20; % SNR in dB ber=zeros(length(SNR),1); % initialize the size of ber for n=1:length(SNR), rx_s=awgn(faded_s,SNR(n)); % Add gaussian white noise rx_s=rx_s./ch1; % equalization rx=demodulate(g,rx_s); % demodulate reset(h); [n_err,ber(n)]=biterr(data_s,rx); % ber computation end % ber_theo=berfading(SNR,'psk',M,1); % semilogy(SNR,ber,'b*-') hold on semilogy(SNR,ber_theo,'r-'); legend('Empirical BER','Theoretical BER'); xlabel('SNR(dB)'); ylabel('BER'); title('dpsk in Rayleigh Channel'); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 222.228.171.110 ※ 編輯: ronnie1138 來自: 222.228.171.110 (11/30 23:40)
文章代碼(AID): #1B4I6g1F (MATLAB)