eb n0 matlab,BER Vs Eb/N0 for BPSK modulation over AWGN | GaussianWaves

In the previous article we saw about how Passband BPSK modulation and demodulation can be done. This concept is extended further to simulate the performance of BPSK modulation technique over an AWGN. Note that this is a baseband simulation of BPSK modulation and demodulation. Baseband simulation are faster and yields performace results same as that of pass band simulation.

Transmitter:

For the BPSK modulation , a series of binary input message bits are generated of which ’1′s are represented by 1v and ’0′s are translated as ‘-1′ v (equivalent to NRZ coding as discussed in the previous post).

AWGN channel:

For BPSK modulation the channel can be modeled as

39385483_1

where y is the received signal at the input of the BPSK receiver, x is the modulated signal transmitted through the channel , a is a channel amplitude scaling factor for the transmitted signal usually 1. ‘n’ is the Additive Gaussian White Noise random random variable with zero mean and variance σ2.

For AWGN the noise variance in terms of noise power spectral density (N0) is given by,

39385483_2

For M-ARY modulation schemes like M-PSK including BPSK, the symbol energy is given by,

39385483_3

where Es =Symbol energy per modulated bit (x), Rm = log2(M) , (for BPSK M=2, QPSK M=4, 16 QAM M=16 etc..,). Rc is the code rate of the system if a coding scheme is used. In our case since no coding scheme is used Rc = 1. Eb is the Energy per information bit.

Assuming Es=1 for BPSK (Symbol energy normalized to 1) Eb/N0 can be represented as (using above equations),

39385483_4

39385483_5

From the above equation the noise variance for the given Eb/N0 can be calculated as

39385483_6

For the channel model randn function in Matlab is used to generate the noise term. This function generates noise with unit variance and zero mean. In order to generate a noise with sigma σ for the given Eb/N0 ratio , use the above equation , find σ, multiply the ‘randn’ generated noise with this sigma , add this final noise term with the transmitted signal to get the received signal.

Receiver:

BPSK receiver can be a simple threshold detector which categorizes the received signal as ’0′ or ’1′ depending on the threshold that is being set. Calculation of Theoretical BER for BPSK over AWGN is discussed here.

Matlab code:

Simulation Result:

39385483_7.jpg

BER Vs Eb/N0 for BPSK

See Also:

Recommended Books

39385483_8

39385483_9

39385483_10

39385483_11

39385483_12

39385483_13

39385483_14

39385483_15

39385483_16

39385483_17

39385483_18.png

39385483_19.jpg

Mathuranathan

Mathuranathan Viswanathan – Founder and Author @ gaussianwaves.com which has garnered worldwide readership. He is a masters in communication engineering and has 7 years of technical expertise in channel modeling and has worked in various technologies ranging from read channel design for hard drives, GSM/EDGE/GPRS, OFDM, MIMO, 3GPP PHY layer and DSL.

He also specializes in tutoring on various subjects like signal processing, random process, digital communication etc..,He can be contacted at support@gaussianwaves.com

Your Thoughts ?

1 comments

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是BPSK和QPSK调制在AWGN信道下的SNR-BER误码率性能评估的Matlab代码,其中SNR范围设置为-5到15 dB,步长为1dB: ``` %% BPSK and QPSK Modulation in AWGN Channel with SNR-BER Performance Evaluation clear all; close all; clc; %% Generating message signal msg_length = 10^4; % Message signal length msg = randi([0 1],msg_length,1); % Random binary message signal %% BPSK Modulation bpsk = 1 - 2*msg; % BPSK modulation bpsk_noise = zeros(msg_length, 21); % Pre-allocating memory for noise signal bpsk_ber = zeros(1,21); % Pre-allocating memory for BER values %% QPSK Modulation qpsk = zeros(msg_length/2,2); % Pre-allocating memory for QPSK modulated signal qpsk_noise = zeros(msg_length/2,21); % Pre-allocating memory for noise signal qpsk_ber = zeros(1,21); % Pre-allocating memory for BER values for i = 1:21 % SNR range EbN0dB(i) = -5 + (i-1); % Eb/N0 in dB EbN0(i) = 10^(EbN0dB(i)/10); % Eb/N0 in linear scale sigma(i) = sqrt(1/(2*EbN0(i))); % Standard deviation of noise %% BPSK Modulation with AWGN bpsk_noise(:,i) = bpsk + sigma(i)*randn(msg_length,1); % BPSK signal with AWGN bpsk_demod = sign(bpsk_noise(:,i)); % BPSK demodulation bpsk_error = find(bpsk ~= bpsk_demod); % Finding the errors bpsk_ber(i) = length(bpsk_error)/msg_length; % Calculating the BER %% QPSK Modulation with AWGN for j = 1:2:msg_length % QPSK modulation if msg(j) == 0 && msg(j+1) == 0 qpsk((j+1)/2,:) = [1 1]; elseif msg(j) == 0 && msg(j+1) == 1 qpsk((j+1)/2,:) = [-1 1]; elseif msg(j) == 1 && msg(j+1) == 0 qpsk((j+1)/2,:) = [-1 -1]; else qpsk((j+1)/2,:) = [1 -1]; end end qpsk_noise(:,i) = qpsk + sigma(i)*randn(msg_length/2,2); % QPSK signal with AWGN qpsk_demod = zeros(msg_length,1); % Pre-allocating memory for QPSK demodulated signal for k = 1:2:msg_length % QPSK demodulation if qpsk_noise((k+1)/2,1) >= 0 qpsk_demod(k) = 0; else qpsk_demod(k) = 1; end if qpsk_noise((k+1)/2,2) >= 0 qpsk_demod(k+1) = 0; else qpsk_demod(k+1) = 1; end end qpsk_error = find(msg ~= qpsk_demod); % Finding the errors qpsk_ber(i) = length(qpsk_error)/msg_length; % Calculating the BER end %% Plotting the BER vs SNR figure(1) semilogy(EbN0dB,bpsk_ber,'-o','LineWidth',2); hold on semilogy(EbN0dB,qpsk_ber,'-s','LineWidth',2); grid on axis([-5 15 10^-5 1]) xlabel('Eb/N0 (dB)'); ylabel('Bit Error Rate (BER)'); legend('BPSK','QPSK'); title('SNR-BER Performance of BPSK and QPSK Modulation in AWGN Channel'); ``` 注意:这段代码仅供参考,实际应用中需要根据具体情况进行更改。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值