BER from SNR in Decider802154Narrow.cc

223 views
Skip to first unread message

LuisTH

unread,
Jan 24, 2012, 11:08:55 AM1/24/12
to omnetpp
Hello everybody,

in the function "processSignalEnd(...)" a formula according to the
book Digital Communication (Proakis) is used to obtain BER from SNR.
The implementation of this formula is the function "getBERFromSNR" for
the case of OQPSK with M=16. What I don't understand is how the
argument "k" of the exponential in the formula, which corresponds to
k=log2(M)=4 becomes a 20.

The mentioned formula in the comments of "processSignalEnd" is:
// Pm = sum(n=1,n=M-1){(-1)^(n+1)choose(M-1,n) 1/(n+1) exp(-nkgamma/(n
+1))}
where the arguments of the exp are the index "n", the "k" (which is
log2(16)=4), and "gamma" is the SNR per bit.
This formula can be transformed to:
Pm = 1/M * sum(i=2, i=M){ (-1)^i * choose(M,i) * exp((1/i -1)*k*snr) }
as the implementation of the function "getBERFromSNR" shows. (MiXiM
v2.1). The issue is that instead of k=4, the function uses a 20. Or
instead snr, the function uses a 5*snr. In Mixim 2.2.1 the nchoosek
function was optimized but the same factor 20 stays.

I thank any help on this respect.

BR,
LuisT

Michael

unread,
Jan 25, 2012, 4:59:14 AM1/25/12
to omnetpp, jerome.r...@csem.ch
Hi,

the OQPSK BER claculation was introduced by Jerome Rousselot
(jerome.r...@csem.ch). As you sayed I only optimized the nchoosek
function and the OQPSK-BER calculation. I did not change the parameter
for the calculation, so I do not know why Jerome picked a 20 for k,
but I think you are right we should change it to 4.

Michael

João

unread,
Jan 25, 2012, 6:25:10 AM1/25/12
to omnetpp
Hi Luis

The BER is defined in the IEEE 802.15.4 standard, please check the
2006 standard, page 268, section E.4.1.8 Bit error rate (BER)
calculations, formula 7).

Best regards

João

Michael

unread,
Jan 25, 2012, 6:44:01 AM1/25/12
to omnetpp
thanks,

I will add the formula location in a source-code-comment ;)

Michael

Michael

unread,
Jan 25, 2012, 7:17:45 AM1/25/12
to omnetpp
One question again :(

The IEEE standard formula uses a SNIR value but we have a SNR (or the
function names are wrong) value! Should we not use the formula (E.13)
on page 277 in our case? Here we have a factor of 10.

On Jan 25, 12:25 pm, João <joaomfe...@gmail.com> wrote:

Laura Marie Feeney

unread,
Jan 25, 2012, 10:50:46 AM1/25/12
to omn...@googlegroups.com
My understanding is that the equation 13 (section E.5.5.2, p277) applies
to the 868MHz band O-QPSK and equation 7 (section E.5.5.1, p275) applies
to the 868MHz band BPSK.

Equation 7 (section E.4.1, p268) applies to the 2.4GHz case, but in this
case the BER calculation is not derived.

The code in Mixim 2.1 get BERfromSNR seems to correctly implement the
formula above for the 2.4GHz case (coefficient = 20). However, I don't
myself know enough signal processing to say whether these formulas have
been appropriately selected.

I don't think the SNR/SNIR name is significant. As I see, what is
passed to getBERfromSNR are the chunks associated with each distinct
interference, so this is incorporated correctly.

Regards,
Laura

cirom

unread,
Jan 25, 2012, 11:08:23 AM1/25/12
to omn...@googlegroups.com, lmfe...@sics.se
Hello, could you tell me what are the models of interference implemented and in which files are? I know that SNR (signal to noise ratio) while SINR ( Signal Interference to Noise Ratio)0

 thanks

LuisTH

unread,
Jan 25, 2012, 12:00:25 PM1/25/12
to omn...@googlegroups.com, lmfe...@sics.se
Thanks for your prompt replies!

I agree with Laura and having went over the standards, I perhaps can give some clarification on the factor "20" that is puzzling me. Take a look to section E.5.5.2.1 "BER as function of SIR" (p. 276), formulas E.9 and E.10, which are, as Laura pointed out, for 868MHz. The case is that the computation of E.9 is:

Eb/N0 = 0.625 * Rc / Rb * SNR,

where the 0.625 is due to the half-sine pulse shaping and the use of matched filtering. Well, that is the case for 2.4GHz! (see section 6.5.2.4 OQPSK modulation, p.48). We could as well take the value of chip rate Rc and bit rate Rb for he case of 2.4GHz, namely, Rc=2x10^6 and Rb=250x10^3 and we get:

Eb/N0= 0.625 * 8 *SNR = 5*SNR

this value of 5 together with formula E.10  (M=16):

Es/N0 = log2(M)*Eb/N0 = 4 Eb/N0

leads to  Es/N0 = 20 * SNR.

Please correct me if I have misunderstood something.

Regards,
Luis

Jerome Rousselot

unread,
Jan 25, 2012, 2:49:00 PM1/25/12
to omn...@googlegroups.com
Hello,

Luis and Laura are correct. That is how I obtained the formula.
I wanted to enhance the code and provide formulas for all PHYs in a
more readable form, but never had the time to do it.

Regards

Jerome

2012/1/25 LuisTH <luistorr...@googlemail.com>:

> --
> Sent from the OMNeT++ mailing list. To configure your membership,
> visit http://groups.google.com/group/omnetpp

Laura Marie Feeney

unread,
Jan 31, 2012, 10:44:47 AM1/31/12
to omn...@googlegroups.com, Jerome Rousselot, Michael Lindig, luistorr...@googlemail.com
I think it would be a useful exercise to try to polish this area a
little bit. Ideally, we should check and document these formulas,
especially their applicability to the given scenarios and limitations.
It would also be nice to have some characterization data to include.

This would considerably increase the confidence researchers have in
MiXiM based results, especially if there were some referenced document.

It might eventually be helpful to take this discussion off the main
omnet mailing list, to avoid spamming the community. I am willing to
coordinate this.
Laura

Reply all
Reply to author
Forward
0 new messages