Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

AWGN CHANNEL Gaussian noice

Status
Not open for further replies.

mariuszprus

Newbie level 6
Joined
Dec 12, 2009
Messages
11
Helped
0
Reputation
0
Reaction score
1
Trophy points
1,281
Location
poznan
Activity points
1,376
hi

On start I Wont say that I don Know good english so sorry for my error ;)

I have a problem :

I must simulate a channel awgn .
I have encoder at rate 2/3 2 bits = 3 bits and modulators 8 PSK 3 bits = one of the oint of the constelation for example

cos(alfa)+jsin(alfa) (real and imaginary value )

next I must send this signal by the awgn channel ...
in the program i must descript SNR (writing SNR)

1.what is the power of this signal and why that?

2.how i Can add noisse gaussian to this signal and how can i generate number of wounds gausian.??(pleace translate step by step i writting this program in visual 2008 c++) i dont know how can i generate this number so pleace give mu formula step by step translate this generation

generate number must by depent by SNR

I have some code but I dont understand
http://the-art-of-ecc.com/9_Coded_Mod/PTCM/tc-8psk-iq.c

pleace help!!!
 

your transmitted waveform is juat a sum of a sine and cosine, and so the signal power = 1 (A sine 's/cosine's power is 1/2, and they can added since they are orthogonal)

to be more exact
signal power = 1/T ∫ (from -T/2 to T/2) (sin (2*pi *t /T) + cos (2*pi *t /T) )^2 dt = 1

Since all possible symbols have same power (all constellation points at same distance from origin), the average power is same as above.

Noise sample generation is in your code itself! See these

do
{
randmum = (double)(random())/MAX_RANDOM;
u1 = randmum*2.0 - 1.0;
randmum = (double)(random())/MAX_RANDOM;
u2 = randmum*2.0 - 1.0;
s = u1*u1 + u2*u2;
} while( s >= 1);
noise = u1 * sqrt( (-2.0*log(s))/s ) / amp; /* */

this is the box-muller method of generating gaussian numbers from uniformly distributed numbers that the C function "random" gives you. see this:

**broken link removed**

The above noise generation scheme gives unit power samples (same power as signal), so you can divide that by "amp" to get your required SNR, according to the defn of SNR (with signal power = 1)

SNR_in_db = 10 * log10 (1/(amp^2))

- b
 

thank you very much ..!!!

i have one more question ...

so suppose we have

As -amplitude of signal
An- amplitude of noise

what power of signal we have if we use o modulation 16 psk ??

SNR=10log(As/An)^2 // As=1
SNR=10log(1/An)^2

An=sqrt(pow(10,(-SNR/10))



in program which i found in google we have simulation awgn channel but i dont understand some formula

void awgn()
{
/* Add AWGN to transmitted sequence */
double u1,u2,s,noise,randmum;
int i;

#ifdef PRINT
printf("Received = ");
#endif

#ifdef NO_NOISE
received_I = psk_I[transmitted];
received_Q = psk_Q[transmitted];
return;
}
#else
do
{
randmum = (double)(random())/MAX_RANDOM;
u1 = randmum*2.0 - 1.0;
randmum = (double)(random())/MAX_RANDOM;
u2 = randmum*2.0 - 1.0;
s = u1*u1 + u2*u2;
} while( s >= 1);

noise = u1 * sqrt( (-2.0*log(s))/s )/amp;



//************************************************

RATE = (2.0 / (double) n2)*3.0; // 2 bits per symbol if encoder is rate 1/2

what is this n2 and why we calculate rate using this formula ?? and why that fomula ...??




amp = sqrt(2.0*RATE*pow(10.0,(snr/10.0)));

what is this (2.0*Rate) ???????



if i have encoder is rate 2/3 so how i can calculate amp=???????


thank You ;));));));))


if somebody lokk some infomartion about trelllis coding i have good website from university of technology in Poznan Poland
http://www.invocom.et.put.poznan.pl/~invocom/C/P1-7/en/P1-7/p1-7_6_7.htm
 

> what power of signal we have if we use o modulation 16 psk ??

the power of the signal remains the same from 16 PSK to 8 PSK, if all the constellation points are at the same distance from the centre in both cases.

However, there is a "hidden factor" in that if you have the same source rate (rate at which (possibly encoded) bits are coming into the modulator), then for your 16-PSK case each symbol can be transmitted for a longer duration of time in comparison to 8-PSK. say you have 1.2bps, symbol rate for 8PSK = 1.2/3 = 0.4 Symbols/s => one symbol duration = 2.5 s, for 16-PSK, symbol duration =3.3 s, thus energy (not power) per symbol is different in the two cases, though energy per bit is the same.

Another version of the same argument applies to the 'C' example. It looks like they will always use 8-PSK, but you can choose different encoders, the rate of the encoder is the 'n2' variable. Another thing to note is that when you want to comapre two ECC schemes, you want to keep the unencoded bit rate and the transmitted power per bit the same. Only then you could say one scheme is better or worse than the other. Thus here we come to the question: if we are restrained to use only 8-PSK how do you keep the nergy per bit the same, when you shift from rate =1/2 encoder to rate =1/3 encoder? Obviously, the r =1/3 encoder needs to send symbols faster (and thus at lower energy pert unencoded bit) to keep the same unencoded data rate as r =1/2 encoder.

For example,
r =1/2 encoder can send 6 unencoded bits in 4 8PSK symbols
r =1/3 encoder can send 4 unencoded bits in 4 8PSK symbols
r =1/4 encoder can send 3 unencoded bits in 4 8PSK symbols

Thus the signal amplitude must be scaled to keep the energy per unencoded bit the same, and thats bein attempted by the RATE variable (by scling up noise instead). This is my understanding of the code.
-b
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top