Standardizing M17 BER Testing

It would be useful to have interoperable BER testing between conforming implementations, so that a transmitters, receivers, and test equipment from different vendors could be used for M17 equipment testing. This would be useful for end users – especially ham operators – in tuning their equipment.

As a strawman, I propose using the reserved sync word (now BER SYNC WORD) for this purpose, along with a custom frame type which uses the P2 puncture matrix. The frame would be 197 bits long (24 bytes + 5 bits). The first two bytes would be a frame number and would seed a LFSR PRNG. If we want to use more than one LFSR, we could use some of the reserved bits in the frame type word for this.

The LSF would be sent as-is, with the frame type set as STREAM and the stream type set to the reserved type “00”. This would be followed by BER frames using the BER SYNC WORD, containing a 16-bit frame number and 181 bits of pseudo-random data encoded similarly to the stream payload audio data (i.e. using the same puncture matrix).

197 bits gets extended to 201 bits with 4 bits of 0 used to flush the convolutional encoder. This is encoded into 402 bits. This is then punctured to 368 bits, which is a full frame.

Frame numbers would start at 1 in order to have at least on bit set in the LFSR.

Seeding the LFSR with a frame number allows for synchronization and recovery of the BER test.

We would use a 16-bit LFSR with the polynomial

The least significant 8 bits would be used, then shifted 8 bits, then the next 8 bits extracted and so on. On the final byte, only the most-significant 5 bits will be used.

I like the idea of using the unused sync word for this task, thereby avoiding confusion with normal traffic. Unfortunately that is where I diverge from your ideas. I am all in favour of a way to standardise BER measurements, but I feel that this scheme is too complex. Firstly you don’t need to build in any identification, since this will only be used for testing, a voice announcement can be made on frequency before the test if you feel the need. I also don’t understand the need to have any form of sequence number on the frames, this makes it very difficult to set up a system when the initial BER is very high, and then to gain synchronisation later. It would be far better to send the BER test frames with an unchanging pseudo random sequence so there is no uncertainty of synchronisation.

Indeed as part of trying to tame the MMDVM, I intend to implement something like this as soon as possible so that some serious testing can take place.

I am fine with dropping the LSF altogether. That makes sense. And I do agree that it is overly complex.

Is your proposal that every BER frame have the same payload? That is very little entropy. I have found errors in sync handling that only occurred after receiving a large number of frames. It was only triggered by certain bit patterns.

ITU recommends PRBS9 (511 bit sequence) as a minimum for low bitrate systems. I would be fine with that, as long as the sequence wrapped. That will provide enough unique frames. Each frame pulls 197 bits from the PRBS. The first wrap happens 117 bits into the third frame.

An LFSR is self-synchronizing. For PRBS9, synchronization occurs after some number of error-free bits are received. This example uses 2x the PRBS size as the decision point:

I still think that it’s too complex. A fixed frame content would be adequate I feel based on previous experience, with a few runs of 0s and 1s to test the DC characteristics of the system for good measure. You could theoretically have a number of selectable patterns which you could switch between, but in the case of the MMDVM we already have a wide range of test transmission types that will exercise a system very well indeed.

I’ll implement something next week, and of course being open source you’re free to copy it if you want. I need it pretty urgently in order to make my systems usable, considering that everything else is in place, even my M17 network gateway will talk to you now!

Here’s a working self-synchronizing PRBS9 implementation. (unit tests are in the repo as well).

PRBS are the de facto standard for BER testing of communications systems. Standard sequences are defined by ITU. I don’t see why we would want to do something different for M17.

PRBS9 was initially suggested by Wojciech.

I agree on using the PRBS. They are used everywhere for testing communications systems. We should leverage that.