Technical Article

Whitening Filters Help Low-Power Radios Tackle Issues Caused by Long Identical Bit Sequences

August 02, 2023 by Nthatisi Hlapisi

Learn how whitening filters solve problems in low-power radios when transmitting long identical bit sequences. Explore their significance in protocols like BLE and ZigBee.

In today's fast-paced, interconnected world, low-power wireless communication systems play an increasingly important role. They enable devices like wearables, IoT sensors, and smart home gadgets to transmit and receive data efficiently while conserving energy. However, a specific challenge can arise in these systems: transmitting long sequences of identical bits in a data stream.

When a radio sends a continuous stream of coherent bits through a communication channel, it can lead to various issues, including synchronization problems and intensified inter-symbol interference (ISI) effects. These issues can impair the accurate reception of the transmitted data, impacting the overall system performance.

To tackle this challenge, engineers often use a signal processing technique called "whitening." In the following sections, we'll delve into the fundamentals of whitening filters, their benefits, and their applications in various wireless communication protocols.


Whitening Filters: Basics

When we talk about 'whitening', we are basically talking about a process that makes a signal look more random. Imagine you're listening to a song. If you could see the sound waves of the song, they would look like a pattern that repeats over time. This repeating pattern is what we call correlation in the signal. 

In contrast, if you listen to static noise from an untuned radio, it sounds completely random, without any pattern—this is what we would call a white or whitened signal.

Why do we want to scramble the data into a more random-looking form before sending it? The thing is that real-world communication systems aren't perfect. The transmitted signal can be affected by various factors during its journey from the transmitter to the receiver. For example, it might bounce off buildings (a phenomenon called multipath propagation) or get distorted due to the characteristics of the transmission medium (like the presence of noise).

When a long string of identical symbols (for example, a long string of 1s or 0s) is sent through such a system, any distortion similarly affects all these symbols. As a result, the impact of the distortion is compounded.

On the other hand, if the data is more random (as is the case after whitening), the impact of any given distortion is less likely to affect multiple successive symbols in the same way. This can help reduce ISI's effects, making it easier for the receiver to correctly interpret each symbol.

Whitening also helps to spread the signal's power evenly across the frequency band, ensuring that no specific frequency carries too much power. This is important because regulatory bodies often have rules about how much power can be transmitted at any given frequency.


Performing the Whitening Operation

To produce whitened data, the payload data is XORed with a pseudo-random sequence that continuously changes (Figure 1). This pseudo-random sequence is typically generated via a Linear Feedback Shift Register (LFSR).

First, a bit of a background on LFSRs: 

An LFSR is a shift register with a linear function of the previous state as the input. At each step (or "clock cycle"), every bit in the register is shifted to the next position, and the new bit that is shifted in is the output of a linear function of the previous state of the register. This function is often simply the XOR (Exclusive OR) of several "tapped" positions in the register.

Let's dive into a practical example, where we generate whitened data by XORing the data with a PN9 sequence. 

A PN (Pseudo-Random Noise) sequence is a sequence of bits that appears random but is deterministically generated. It has a specified length, after which it repeats, and this length is defined as 2n-1

In the case of a PN9 sequence, it's 2- 1 = 511 states. When clocked, the PN9 sequence generates all the values between 1 through 511 in a pseudo-random order before repeating.

Data whitening circuitry.

Figure 1. Data whitening circuitry. Image used courtesy of Texas Instruments: Design Note DN509


The PN9 is represented by the polynomial x9+ x5+ x0. The polynomial determines the feedback or “tapped” points in the LFSR (the 9th and 5th bits). This means that at each clock pulse, the data in the nine registers will right shift once and one PN datum is output from register, and bit 0 (the LSB) and bit 5 are XOR’d to produce a new bit that is shifted into the MSB on the next clock.

Here’s the whole process in a step-by-step manner:

  1. Initial Setup: To begin, the 9-bit LFSR, is initialized with a non-zero seed value, for instance, all ones (111111111). This is because an all-zeros state in an LFSR leads to an unchanging output of zeros.
  2. Shifting Operation: The shifting operation occurs with every clock cycle. Essentially, the bit at each slot is moved to the slot on its right. For instance, the bit at the second slot moves to the first slot, the bit at the third slot moves to the second slot, and so forth. The bit at the ninth slot (the least significant bit) is shifted out of the register.
  3. Feedback Operation: At the same time as the shifting operation, a feedback operation is also performed to determine the leftmost (most significant) bit of the LFSR.This operation involves taking the bit at the ninth slot (bit 0 or LSB) and the bit at the fifth slot (as defined by our polynomial x9+ x5+ x0) and subjecting them to an XOR operation. The output of the XOR operation is fed back into the leftmost bit of the LFSR.
  4. Whitening Key Generation (PN9): After every 8 clock cycles, the current state of the LFSR (the sequence of bits in the register) is used as a whitening key.This means that every 9th clock cycle generates a new whitening key. Subsequent whitening keys are generated on the 17th, 25th, 33rd clock cycle, and so forth, continuing in increments of 8. 
  5. Whitening Operation: Then, eight LSBs of the 9-bit whitening key is then XORed with the data we want to transmit, transforming the data into whitened data. The whitened data sequence, which now appears more random and has a balanced number of 0s and 1s compared to the original data, is transmitted over the wireless communication system

You can see how data 0x0F, 0xF0, 0x80, 0x1F, 0x00, 0xE0 can be translated into whitened data in Table 1 below.



Whitening Key - Actual 

Input Data 

Whitened Data 


1  1111 1111  - (FF)




1  1110 0001  - (E1)




0001 1101 - (1D)




1001 1010 - (9A)




1  1110 1101 - (ED)




1  1000 0101 -(85)



Table 1. This is how data 0x0F, 0xF0, 0x80, 0x1F, 0x00, 0xE0 can be translated into whitened data.


Once the whitened data has been transmitted and received at the destination, the task of the receiver is to reverse the whitening operation and retrieve the original data. 

The receiver also contains a similar 9-bit LFSR that was used for whitening at the transmitter. This LFSR is synchronized with the transmitter's LFSR and generates the same whitening keys as the transmitter.

For each received whitened data symbol, the receiver performs an XOR operation with the corresponding whitening key. Importantly, XORing the whitened data with the same whitening key used during the transmission gives back the original data. This is due to the fact that the XOR operation is reversible. In other words: if A XOR B = C, then C XOR B = A.


Consequences of Long Identical Bit Sequences on Signal Reception

Optimal radio operation is achieved when the data bits being transmitted exhibit a random and DC-free pattern. Unfortunately, it is quite common for the transmitted data to contain extended sequences of consecutive 0s or 1s. This type of transmission can result in certain consequences for the receiver:

Synchronization Difficulties

The quality of a radio frequency (RF) link improves when random data is transmitted. This is closely tied to the workings of the receiver’s clock recovery circuitry.

Imagine two people trying to pass a ball back and forth with a consistent rhythm. If the rhythm changes suddenly, it's likely someone will miss the ball. Similarly, in data transmission, the sender (transmitter) and the receiver need to keep the same rhythm or "clock."

The receiver has to mimic the clock of the transmitter to correctly read the incoming data. This synchronization primarily happens at the beginning of each transmission when a series of alternating 1s and 0s (known as the preamble bytes) are sent. Recognizing this pattern, the receiver then tunes its clock to match the transmitter's.

Under ideal circumstances, both clocks stay stable during the communication. However, in reality, the clock on the transmitter side can vary slightly during transmission. To counter these variations, the receiver constantly adjusts or fine-tunes its clock to match the transmitter's. The more frequently 1s and 0s alternate in the data, the easier it is for the receiver to fine-tune its clock as there are more reference points.

And, if there are long strings of 1s or 0s, there are fewer transitions, which makes it harder for the receiver to keep its clock synchronized with the transmitter's.


Data Dependencies in Receiver Current Loops

In digital communication, when we talk about "data dependencies," we're referring to situations where the interpretation of current data depends on past data. This becomes problematic when an error occurs. For example, if the receiver misinterprets a single symbol, and the following symbols depend on this misinterpreted data, the error can propagate, causing a cascade of incorrect interpretations.

The transmission of long identical sequences makes it difficult for the receiver to know where one symbol starts and where one ends. Whereas, data that frequently alternates between 1s and 0s, provides clear delineations between bits, making it easier for the receiver to correctly interpret each bit independently, and so reducing the chance of error propagation.


Inter-Symbol Interference (ISI)

ISI is a signal distortion that occurs in digital communication systems when one symbol interferes with subsequent symbols. This interference can lead to difficulty in distinguishing the symbols, and hence, lead to errors in data interpretation at the receiver. 

Transmission of long sequences of identical bits such as “ /0000 1010 / 0000 0000/ 0000 0100/ 0000 0010…,” can exacerbate the issue of ISI and cause it to spread across multiple bit periods.


DC Bias 

When a transmitted signal has a DC bias, it implies that the average value of the signal is not zero.This can happen when there's an imbalance in the number of ones and zeros transmitted over a certain period.

A DC-biased signal, due to its lack of frequent transitions, can disrupt this synchronization process, leading to decoding errors. Also, it can increase the average power of the signal leading to higher power consumption. 

To solve these problems, digital communication systems often use whitening filters. These filters help balance the occurrence of ones and zeros in the transmitted data, even if the original data contains long strings of the same value.


Whitening Filters in Action: Protocol Examples

Let’s go over the practical application of these filters, using real-world protocol examples to showcase their potential and efficacy.


Bluetooth Low Energy

Bluetooth LE is a power-efficient version of the classic Bluetooth technology, designed for short-range communication between devices. Its whitening process uses a Linear Feedback Shift Register (LFSR) that produces a pseudo-random sequence which is XORed with the payload data to produce whitened data (Figure 2). 

The LFSR used for data whitening in BLE is specified as a 7-bit LFSR with the polynomial x7+x4+x0. This means it has 7 positions (or "bits") in the register, and the the feedback is taken from the 7th and 4th bits, or in other words, the new bit shifted in at each step is the XOR of the bit in the 7th position and the bit in the 4th position of the previous state.


The linear feedback shift register used to scramble (whiten) Bluetooth payload data.

Figure 2. The linear feedback shift register used to scramble (whiten) Bluetooth payload data. Image used courtesy of Benjamin Simmonds


The LFSR is initialized with a seed that is set to the current channel index on which the packet is transmitted or received.  And, the generated sequence from the LFSR is then bitwise XORed with the payload of the BLE packet to produce the whitened data.


IEEE 802.15.4

IEEE 802.15.4, which is a standard used in protocols like Zigbee and Thread, also uses a process of data whitening for its transmissions. The whitening process is implemented in the PHY (Physical) layer of the communication standard.


Diagram shows a 16-bit sequence LFSR.

Figure 3. Diagram shows a 16-bit sequence LFSR. Image used courtesy of Texas Instruments: C2480 datasheet


The whitening sequence for IEEE 802.15.4 is generated by a Linear Feedback Shift Register (LFSR), similar to Bluetooth Low Energy. However, the LFSR used in IEEE 802.15.4 uses a 16-bit sequence instead of the 7-bit sequence used in BLE (Figure 3). 


A Crucial Role in Low-power Radios

Whitening filters play a crucial role in managing the issues presented by extended identical bit sequences in low-power radios. These sequences commonly cause reception problems, leading to synchronization issues, data dependencies, and escalated inter-symbol interference (ISI).

Popular protocols such as Bluetooth Low Energy and IEEE 802.15.4 already use these filters to ensure smooth and optimal performance of their devices.