Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Name of the experiment

Understanding the effect of AWGN in a message signal

AWGN Channel
Section Overview
An AWGN channel adds white Gaussian noise to the signal that passes through it. You can create
an AWGN channel in a model using the comm.AWGNChannel System object™,
the AWGN Channel block, or the awgn function.
The following examples use an AWGN Channel: QPSK Transmitter and Receiver and General
QAM Modulation in AWGN Channel.
AWGN Channel Noise Level
Typical quantities used to describe the relative power of noise in an AWGN channel include
● Signal-to-noise ratio (SNR) per sample. SNR is the actual input parameter to
the awgn function.
● Ratio of bit energy to noise power spectral density (EbN0). This quantity is used by BER
Analyzer Tool and performance evaluation functions in this toolbox.
● Ratio of symbol energy to noise power spectral density (EsN0)
Relationship Between EsN0 and EbN0
The relationship between EsN0 and EbN0, both expressed in dB, is as follows:

Es/N0 (dB)=Eb/N0 (dB)+10log10(k)

where k is the number of information bits per symbol.


In a communications system, k might be influenced by the size of the modulation alphabet or the
code rate of an error-control code. For example, in a system using a rate-1/2 code and 8-PSK
modulation, the number of information bits per symbol (k) is the product of the code rate and the
number of coded bits per modulated symbol. Specifically, (1/2) log (8) = 3/2. In such a system,
2

three information bits correspond to six coded bits, which in turn correspond to two 8-PSK
symbols.
Relationship Between EsN0 and SNR
The relationship between EsN0 and SNR, both expressed in dB, is as follows:
Es/N0 (dB)=10log10(Tsym/Tsamp)+SNR​ (dB)   for complex input signalsEs/N0 (dB)=10log10(0.5Tsym
/Tsamp)+SNR​ (dB) for real input signals
where T  is the symbol period of the signal and T  is the sampling period of the signal.
sym samp
For a complex baseband signal oversampled by a factor of 4, the EsN0 exceeds the
corresponding SNR by 10 log (4).
10

Derivation for Complex Input Signals.  You can derive the relationship between EsN0 and
SNR for complex input signals as follows:
Es/N0 (dB)=10log10((S⋅Tsym)/(N/Bn))=10log10((TsymFs)⋅(S/N))=10log10(Tsym/Tsamp)+SNR​ (dB)
where
● S = Input signal power, in watts
● N = Noise power, in watts
● B  = Noise bandwidth, in Hertz = F  = 1/T .
n s samp

● F  = Sampling frequency, in Hertz


s
awgn
Add white Gaussian noise to signal
collapse all in page

Syntax
out = awgn(in,snr)
out = awgn(in,snr,signalpower)
out = awgn(in,snr,signalpower,randobject)
out = awgn(in,snr,signalpower,seed)
out = awgn(___,powertype)

Description
out = awgn(in,snr) adds white Gaussian noise to the vector signal in. This syntax assumes that the
power of in is 0 dBW.
example
out = awgn(in,snr,signalpower) accepts an input signal power value in dBW. To have the function
measure the power of in before adding noise, specify signalpower as 'measured'.
example
out = awgn(in,snr,signalpower,randobject) accepts input combinations from prior syntaxes and a
random number stream object to generate normal random noise samples. For information about
producing repeatable noise samples, see Tips.
out = awgn(in,snr,signalpower,seed) specifies a seed value for initializing the normal random
number generator that is used when adding white Gaussian noise to the input signal. For information
about producing repeatable noise samples, see Tips.
out = awgn(___,powertype) specifies the signal and noise power type as 'dB' or 'linear' in addition
to the input arguments in any of the previous syntaxes.
For the relationships between SNR and other measures of the relative power of the noise, such as Es/N0,
and Eb/N0, see AWGN Channel Noise Level.
Examples
Create a sawtooth wave.
t = (0:0.1:10)';
x = sawtooth(t);
Apply white Gaussian noise and plot the results.
y = awgn(x,10,'measured');
plot(t,[x y])
legend('Original Signal','Signal with AWGN')
General QAM Modulation in AWGN Channel
Try This Example

Transmit and receive data using a nonrectangular 16-ary constellation in the presence of Gaussian noise.
Show the scatter plot of the noisy constellation and estimate the symbol error rate (SER) for two different
signal-to-noise ratios.
Create a 16-QAM constellation based on the V.29 standard for telephone-line modems.
c = [-5 -5i 5 5i -3 -3-3i -3i 3-3i 3 3+3i 3i -3+3i -1 -1i 1 1i];
M = length(c);
Generate random symbols.
data = randi([0 M-1],2000,1);
Modulate the data by using the genqammod function. General QAM modulation is necessary because the
custom constellation is not rectangular.
modData = genqammod(data,c);
Pass the signal through an AWGN channel having a 20 dB signal-to-noise ratio (SNR).
rxSig = awgn(modData,20,'measured');
Display a scatter plot of the received signal and the reference constellation, c.
h = scatterplot(rxSig);
hold on
scatterplot(c,[],[],'r*',h)
grid
hold off
Demodulate the received signal by using the genqamdemod function. Determine the number of symbol
errors and the symbol error ratio.
demodData = genqamdemod(rxSig,c);
[numErrors,ser] = symerr(data,demodData)
numErrors = 1
ser = 5.0000e-04
Repeat the transmission and demodulation process with an AWGN channel having a 10 dB SNR.
Determine the symbol error rate for the reduced SNR. As expected, the performance degrades when the
SNR is decreased.
rxSig = awgn(modData,10,'measured');
demodData = genqamdemod(rxSig,c);
[numErrors,ser] = symerr(data,demodData)
numErrors = 462
ser = 0.2310
Repeatable AWGN with RandStream
Try This Example

View MATLAB Command


Generate white Gaussian noise addition results using a RandStream object and the reset object
function.
Specify the power of X to be 0 dBW, add noise to produce an SNR of 10 dB, and utilize a local random
stream.
S = RandStream('mt19937ar','Seed',5489);
sigin = sqrt(2)*sin(0:pi/8:6*pi);
sigout1 = awgn(sigin,10,0,S);
Add AWGN to sigin. Use isequal to compare sigout1 to sigout2. The outputs are not equal when the
random stream was not reset.
sigout2 = awgn(sigin,10,0,S);
isequal(sigout1,sigout2)
ans = logical
0
Reset the random stream object, returning the object to its state prior to adding AWGN to sigout1. Add
AWGN to sigin and compare sigout1 to sigout3. The outputs are equal after the random stream was
reset.
reset(S);
sigout3 = awgn(sigin,10,0,S);
isequal(sigout1,sigout3)
ans = logical
1

AWGN Basic
Read it from any book or google search and write in your own words. You can copy
equations with references

To be included in the report

● Generate a sine wave


● Add noise with it for different SNR=5 10 15 20 25
● Draw the fig
● Consider a random sequence of 1000 and 1500 bits
● Generate 8/16-QAM and QPSK
● Add noise with it for different SNR=5 10 15 20 25
● Draw Constellation diagram
● Determine Symbol and bit error rate

Expt no

Expt Name

Theory

Matlab Simulation

Results

Discussion

References

You might also like