フィルターのクリア

generating AWGN in matlab

2 ビュー (過去 30 日間)
michael
michael 2013 年 8 月 22 日
編集済み: Walter Roberson 2015 年 8 月 30 日
I'd like to have your overview if what I'm doing is OK.
I need to plot the BER vs Eb/No. So the noise power which I should generate should be related to Eb/No.
  1. bits are encoded into 1/2 rate encoder.
  2. the output of the encoder is converted to +1 and -1 symbols
  3. symbols are oversampled by OS ratio.
  4. the oversampled symbols are passed through Gaussian filter and this is the data which i send to the channel.
now i need to generate AWGN:
EbNo_dB_bit_list = -2:0.25:2;
EsNo_dB_no_code = EbNo_dB_bit_list - 10*log10(OS);
dec_EsNo_dB_no_code=10.^(-EsNo_dB_no_code/10);
sigma2 = 1/(2*Rate)*dec_EsNo_dB_no_code; % to include the code rate
ni = randn(1,length(modulated));
nq =randn(1,length(modulated));
noise=(ni+1j*nq)*sqrt(sigma2(k));

回答 (2 件)

Bhavik Doshi
Bhavik Doshi 2013 年 8 月 22 日
編集済み: Walter Roberson 2015 年 8 月 30 日
clc; close all; clear all; sym=1000; snr=30; M=2;
msg=randi(1, M-1,sym) mod=pskmod(msg,M); for i=0:snr yn=awgn(mod,i); msgbar=pskdemod(yn,M); [a(i+1) b(i+1)]=biterr(msgbar,msg); end semilogy(0:snr,b,'r'); grid on title('Simple AWGN'); xlabel('Eb/No'); ylabel('BER');
  2 件のコメント
Bhavik Doshi
Bhavik Doshi 2013 年 8 月 22 日
Separate lines after ;
michael
michael 2013 年 8 月 22 日
sorry, but i don't understand your answer. you have provided code for BER of BPSK. I need to have conformation that my steps in noise generation is OK

サインインしてコメントする。


Bhavik Doshi
Bhavik Doshi 2015 年 8 月 30 日
Let us consider that final signal this coded as x matrix. Assumption: x is a mxn matrix. x is already over sampled x is already modulated and coded as per requirement you need y = xh + n where h is complex channel and n is noise.
Now, as you mentioned, you do not need h, assuming wired transmission.
y= x+n.
Matlab implementation:
y = awgn(x, snr);
use x as your coded modulated signal matrix or vector. snr = choose value between 0 to 30 db only.

カテゴリ

Help Center および File ExchangePropagation and Channel Models についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by