Rx sencitivity test for nRF52832 module using radio_test functionalities

Hi Nordic,

I have learned about both the DTM and radio_test example source code. For our prototype tests, I think the latter may be better for us. 

I have tried to wirte the test application software  (run on nrf52832) based on the functionalities which radio_test.c provides. 

For the BER test,  I tested following the below steps:

1. transmitter sends out  1000 pre-defined packets (no crc)

2. receiver tries to receive the packets, and calculate the BER and output the result to the computer.

My questions are:

1.  At my application software, I use (NRF_RADIO->EVENTS_END == 1U) to check if a packet is received, is that right?

2. If the application software didn't get all the 1000 packets, how to calculate the BER?  I mean  should bits of the lost packets be included as the error bits while calculating BER ,  which calculation method is right?

(1). BER = (# of error bits included in the received packets) / (# of bits of received packets)  

(2). BER = ( (# of error bits included in the received packets) + (# of bits of lost packets)) / (# of bits of 1000 packets)

(3). BER =  ( (# of error bits included in the received packets) / (# of bits of 1000 packets)

3. If the bit error happens in the length field, such as the received value of the length is smaller than the actual value, so the number of bytes

of the received packet is smaller than the actual value. On this situation, the lost bits of the packet should be included as the error bits while calculating the BER? 

4. I want to know the reasons that the receiver lost the packets (no crc). My understanding is that if the receiver lost the preamble,

the packet will be lost. Also if the receiver dismatched the address, the packet will be discarded and will not be delivered to the easyDMA.

My understanding is right?

5. How to test the PER? just calculate it from the BER using the formular  per=1-(1-ber)^bits ?

OR transmitter sends out the packets together with CRC and the receiver check if the received crc is right and count the good packets?

Thanks in advance!

  • Hi,

     

    1.  At my application software, I use (NRF_RADIO->EVENTS_END == 1U) to check if a packet is received, is that right?

    Yes, this indicates packet either sent (if radio in TX mode) or packet received (if radio in RX mode)

     

    2. If the application software didn't get all the 1000 packets, how to calculate the BER?  I mean  should bits of the lost packets be included as the error bits while calculating BER ,  which calculation method is right?

    (1). BER = (# of error bits included in the received packets) / (# of bits of received packets)  

    (2). BER = ( (# of error bits included in the received packets) + (# of bits of lost packets)) / (# of bits of 1000 packets)

    (3). BER =  ( (# of error bits included in the received packets) / (# of bits of 1000 packets)

    PER = 1 - (1-BER) ^ num_of_bits_in_packet

    Where "0.001" (0.1%) is a common limit for BER.

     

    if you have a 46 byte payload, the calculation looks like this:

    PER = 1 - (1 - 0.001)^(46*8) = 30.8%

     

    In order to achieve a BER of 0.1% with a 46 byte payload, the packet error must be equal or less than 30.8%.

    3. If the bit error happens in the length field, such as the received value of the length is smaller than the actual value, so the number of bytes

    of the received packet is smaller than the actual value. On this situation, the lost bits of the packet should be included as the error bits while calculating the BER? 

    you calculate based on statistics. If you send 1000 packets of 46 bytes, the receiver shall receive 308 of these successfully.

    4. I want to know the reasons that the receiver lost the packets (no crc). My understanding is that if the receiver lost the preamble,

    the packet will be lost. Also if the receiver dismatched the address, the packet will be discarded and will not be delivered to the easyDMA.

    My understanding is right?

    Your understanding is correct, however: you will not be able to know the reasons for the packet being lost, as you will focus on packet error rate rather than bit error rate.

    5. How to test the PER? just calculate it from the BER using the formular  per=1-(1-ber)^bits ?

    Correct.

     

    I have learned about both the DTM and radio_test example source code.

    I would recommend that you use DTM for this purpose with a dedicated bluetooth tester.

    You can technically use two nRF kits, and the Direct Test mode application in nRF connect for desktop, but it will not give you a full detailed report as a dedicated bluetooth tester can do.

     

    Kind regards,

    Håkon

  • Hi Håkon,
    Thanks for your quick reply.

    5. How to test the PER? just calculate it from the BER using the formular per=1-(1-ber)^bits ?
    Correct.
    However, from the DTM, I learned that it just counts the received correct packets(with CRC) not the received error bits, and sends out the count result to the computer. And then how to calculate the BER?
    Is it that calculate the PER firstly according to the count result, and then get the BER from the PER based on the formular
    per=1-(1-ber)^bits ? If not, HOW to firstly calculate the BER according to the test?

    We are trying to get the rx sensitivity for our custom board. As we know, to get the rx sensitivity, we should get the BER (common limit 0.1%), so we do the tests for the BER. If I USE the radio_test, how to get the BER? This is my question 2. Which one is correct or Is there another calculation method? By the way, which fields of the packets are inclued in the 46 bytes when calculate the BER?
    a: the number of error bits included in the received packets (since no crc, the error bits can be received.)
    b: the number of total bits of received packets (including error bits and correct bits)
    c: the number of bits of lost packets (coutn of sent packets- count of received packets)
    d: the number of bits of 1000 packets (transmitter sends out 1000 packets)
    (1). BER = (a) / (b)
    (2). BER = ( (a) + (c) ) / (d)
    (3). BER = ( (a) / (d)

  • Hi,

     

    Young said:
    Is it that calculate the PER firstly according to the count result, and then get the BER from the PER based on the formular
    per=1-(1-ber)^bits ? If not, HOW to firstly calculate the BER according to the test?

    You do not use BER directly, but you use the statistical formula for PER. 

    As previously mentioned, the amount of bits that are incorrect in a packet isn't tested directly (nor can you without proper equipment), but you rather test the amount of packets that you successfully receive.

    Young said:
    We are trying to get the rx sensitivity for our custom board. As we know, to get the rx sensitivity, we should get the BER (common limit 0.1%), so we do the tests for the BER. If I USE the radio_test, how to get the BER?

    You cannot test PER directly in radio_test, but you can set up one device as a TX and one as a RX and use the command "start_tx_modulated_carrier" with a packet amount, then manually calculate the BER based on the PER:

    https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf_radio_test_example.html?cp=8_1_4_6_31

    As mentioned, you'll get more detailed information (RF PHY related parameters, drift etc.) if you use a dedicated bluetooth tester + direct_test_mode firmware.

    Young said:
    By the way, which fields of the packets are inclued in the 46 bytes when calculate the BER?

    All fields of a packet is used, so its important that you know things like the preamble length, address length, etc.

     

    Young said:
    when calculate the BER?
    a: the number of error bits included in the received packets (since no crc, the error bits can be received.)
    b: the number of total bits of received packets (including error bits and correct bits)
    c: the number of bits of lost packets (coutn of sent packets- count of received packets)
    d: the number of bits of 1000 packets (transmitter sends out 1000 packets)
    (1). BER = (a) / (b)
    (2). BER = ( (a) + (c) ) / (d)
    (3). BER = ( (a) / (d)

    As mentioned, you use PER, ie. the amount of packets received vs. the amount of packets you were originally sent, to calculate BER. See this page for detailed information:

    https://en.wikipedia.org/wiki/Bit_error_rate

     

    Kind regards,

    Håkon

  • Hi Håkon,

    Thanks a lot for your patience for my questions.

    Maybe I didn't understand the concept about the ber test before. Based on the radio_test example or dtm, we use the statistical method to get the per, and then get the ber indirectly. 

    Let me assume that the transmitter sent out 1000 packets and the receiver received  700 packet, and then per=308/1000=30.8%, which means the ratio of the loss of a packet is 30%. And also we know the number of the total bits of a packet, then we can use the per=1-(1-ber)^bits to get the ratio of the loss of one bit included in the packet is 0.1% which is the ber.  

  • Hi,

     

    Young said:
    Let me assume that the transmitter sent out 1000 packets and the receiver received  700 packet, and then per=308/1000=30.8%, which means the ratio of the loss of a packet is 30%. And also we know the number of the total bits of a packet, then we can use the per=1-(1-ber)^bits to get the ratio of the loss of one bit included in the packet is 0.1% which is the ber.  

    You could flip the formula, but what you really want to know if where your breaking-point is for the receiver sensitivity as a function of your total payload length to achieve a given bit-error-rate.

    So, let's assume you're sending and receiving 100 bytes for instance:

    PER = 1-(1-BER)^(100*8)

    where we choose BER = 0.1%, which we then get:

    PER= ~55.09%

     

    Kind regards,

    Håkon

Related