Hello,
i am trying to do some simulation of AWGN channel. matlab has a function awgn(x,snr). what kind of snr does it use here? is it Eb/No (average bit energy/power spectral density)? If so, then i know the awgn has a PSD equal to No/2. does that psd in the snr term implies No/2?
-OBLI

 채택된 답변

Darel
Darel 2021년 8월 4일

0 개 추천

The function awgn does not use EbNo. It uses SNR, defined in the same manner as the snr() function from the Signal Processing Toolbox: sum of the squared samples of the signal over sum of the squared samples of the noise, where that ratio is converted to dB. Thus, if you created noisy data according to
y = awgn(x, SNR);
you should be able to check that
mySNR = snr(x, y-x)
is about the same as SNR in the first call.

추가 답변 (2개)

Wayne King
Wayne King 2012년 6월 10일

3 개 추천

With the syntax
y = awgn(x,snr);
You generate a white noise vector with a variance of
variance = 10^(-snr/10);
noise = sqrt(variance)*randn(size(x));
If you use 'measured', then awgn actually measures the signal power.
For example:
x = cos(pi/4*(0:99));
y = awgn(x,5,'measured');
In this case the variance of the additive white noise is:
sigp = 10*log10(norm(x,2)^2/numel(x));
snr = sigp-5;
noisep = 10^(snr/10);
noise = sqrt(noisep)*randn(size(x));

댓글 수: 5

Gautam Sreekumar
Gautam Sreekumar 2017년 6월 10일
편집: Gautam Sreekumar 2017년 6월 10일
Is snr in dB or in linear scale?
shaunaksinha
shaunaksinha 2017년 6월 29일
편집: shaunaksinha 2017년 6월 29일
Going by the official MATLAB documentation for awgn, I think snr is in dB. [https://www.mathworks.com/help/comm/ref/awgn.html?searchHighlight=awgn&s_tid=doc_srchtitle]
shaunaksinha
shaunaksinha 2017년 6월 29일
Why do we have this:
snr = sigp-5;
in the code. Seems like we are subtracting the given snr from the signal power. Not sure why this makes sense. Could somebody kindly explain this please?
Mustafa qays
Mustafa qays 2017년 11월 14일
The calculation is correct but the variable names need to be corrected
Signal to noise ratio SNR = sigp/noise_p (in ratio)
or
SNR = sigp - noise_p (in dB)
=>
noise_p(dB) = sigp - SNR , SNR = 5 dB
noise_p(db) = sigp - 5
noise_p = 10^(noise_p(db)/10)
So , (snr) in his equation should be written as noise power in the last section of code
Mrutyunjaya Hiremath
Mrutyunjaya Hiremath 2020년 9월 13일
Meaningful Explanation

댓글을 달려면 로그인하십시오.

philip
philip 2023년 10월 11일

0 개 추천

x = cos(pi/4*(0:99));
y = awgn(x,5,'measured');

카테고리

도움말 센터File Exchange에서 Propagation and Channel Models에 대해 자세히 알아보기

질문:

2012년 6월 10일

답변:

2023년 10월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by