Rules | Recent posts | topic RSS | Search | Register  | Log in

matlab question

 
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital communication
Author Message
lincolndsp



Joined: 13 Aug 2005
Posts: 209
Helped: 3
Location: Ukraine


Post25 Mar 2006 7:20   matlab question

How can I accurately add to my signal white
gaussian noise of exact SNR in dB (in POWER not
voltage terms)?
when I use awgn(...) function it seems
to me the noise has more power than I
set in its SNR parameter.
Back to top
Sal



Joined: 29 Nov 2005
Posts: 291
Helped: 36


Post27 Mar 2006 22:51   matlab question

Added after 24 seconds:

Hi

That is not really true, after adding the awgn to your signal by the awgn() function, you can substract your original signal and then calculate the energy of both signals, this will clear your doubts. Mind the dB conversion.

Sal
Back to top
carpa



Joined: 12 Nov 2004
Posts: 82
Helped: 5


Post28 Mar 2006 6:28   matlab question

Y = AWGN(X,SNR) adds white Gaussian noise to X. The SNR is in dB.
The power of X is assumed to be 0 dBW. If X is complex, then
AWGN adds complex noise.

Y = AWGN(X,SNR,SIGPOWER) when SIGPOWER is numeric, it represents
the signal power in dBW. When SIGPOWER is 'measured', AWGN measures
the signal power before adding noise.
Back to top
Naveed Alam



Joined: 06 Jan 2006
Posts: 280
Helped: 16


Post29 Mar 2006 12:05   Re: matlab question

hi...
i m giving u somepart of Eric Cosby's program, u can use it to calculate it...

%suppose u have Tx_data, and now u want add awgn noise
SNR=13; % in dB
Tx_signal_power = var(Tx_data);
%
linear_SNR = 10^(SNR/10);
noise_sigma = Tx_signal_power/linear_SNR;
noise_scale_factor = sqrt(noise_sigma);
%
noise = randn(1, length(Tx_data))*noise_scale_factor;



REGARDS
Back to top
Post new topic  Reply to topic    EDAboard.com Forum Index -> Digital communication
Page 1 of 1 All times are GMT + 2 Hours


Abuse
Administrator
Moderators
topic RSS 
sitemap