Link-Level Bluetooth LE HDT PHY Simulation with AWGN, RF Impairments, and Corrections
R2026bThis example shows how to evaluate the bit error rate (BER) and packet error rate (PER) of Bluetooth® low energy (LE) high data throughput (HDT) physical layer (PHY) modes using a link-level simulation. The simulation generates HDT PHY waveforms, applies radio frequency (RF) impairments and additive white Gaussian noise (AWGN), and recovers the transmitted data using a practical receiver. The results show how noise and RF impairments affect PHY-layer performance for a selected HDT mode.
In this example, you:
Generate Bluetooth LE HDT waveforms in the HDT2, HDT3, HDT4, HDT6, and HDT7.5 PHY modes.
Model RF impairments and channel noise by applying a DC offset, timing drift, carrier frequency offset (CFO), and AWGN to the transmitted waveform.
Process and decode HDT bursts using a practical receiver, including synchronization, carrier recovery, and decoding stages.
Interpret BER and PER performance as a function of Eb/No under RF impairments.
Link-Level Simulation Workflow:
This figure illustrates the link-level simulation, from waveform generation at the transmitter to data recovery at the receiver in the presence of RF impairments and channel noise.


At the transmitter, the simulation generates Bluetooth LE HDT PHY waveforms based on the selected PHY mode and packet format. RF impairments and additive white Gaussian noise (AWGN) then distort the transmitted waveform, modeling imperfections in the transmitter, receiver, and channel.
In this example, the simulation applies the following RF impairments to each transmitted packet:
DC offset
Carrier frequency offset
Carrier phase offset
Timing drift
After applying these impairments and channel noise, the simulation passes the distorted waveform to a practical receiver, which recovers the transmitted data. The receiver prepares the waveform for further processing by mitigating front-end impairments.
Correct DC offset.
Estimate coarse carrier frequency offset (CFO) using STS lag-4 autocorrelation on a polyphase downsampled signal.
Compensate for coarse CFO at the oversampled rate.
Apply matched filtering and recover symbol timing using
comm.SymbolSynchronizerwith a Gardner timing error detector.
The receiver then refines synchronization and corrects residual carrier impairments. Specifically, the receiver:
Performs fine preamble detection using a full 74-symbol preamble correlator.
Estimates fine CFO using a weighted Kay estimator over the full preamble.
Compensates for residual CFO.
Corrects bulk phase offset using the Kay intercept, refined by LTS cross-correlation.
Finally, the receiver recovers the transmitted data bits from the synchronized and corrected waveform by performing these operations:
Extracts the PDU.
Performs warm-started block-wise phase tracking with a mode-specific phase error detector.
Demodulates the signal and performs Viterbi decoding.
De-whitens the data and removes the header.
Simulation Configuration
Configure the link-level simulation by specifying the HDT PHY mode, packet format, sampling parameters, and Eb/No range for performance evaluation.
hdtMode ="HDT6"; % HDT PHY mode packetFormat =
"format1"; % HDT packet format sps = 8; % Samples per symbol dataLength =
511; % Data length in octets EbNo = 2:2:20;
For packet format 1, specify the length of each payload block used for block-based transmission. For other formats, do not specify this value.
if strcmp(packetFormat,"format1") payloadBlockLength =128; % Length of each payload block in symbols for format1 else % For short and format0 payloadBlockLength = []; end
Specify the number of packets to simulate at each Eb/No point. To obtain statistically meaningful results, you can increase maxNumPackets.
maxNumPackets = 1000;
Bluetooth LE Channel Selection
Configure Bluetooth LE channel selection to model frequency hopping across packets in the simulation. Set frequencyHopping to 1 to enable hopping or 0 to disable it. Specify the channel selection algorithm as 1 for algorithm #1 and 2 for algorithm #2.
frequencyHopping =0; csa =
1;
Create and configure a bleChannelSelection System object™ by specifying the channel selection algorithm and the set of used channels.
if frequencyHopping frequencyHop = bleChannelSelection(Algorithm=csa); frequencyHop.UsedChannels = [0 5 9 13 24]; if(csa == 1) frequencyHop.HopIncrement = 8; end end
To ensure repeatable results, initialize the random number generator with a fixed seed. To improve statistical accuracy, you can run the simulation with different seeds and average the results.
rng(0)
Initialize the transmitter and receiver parameters. The selected HDT mode determines the modulation order and coding rate, which the example extracts through helperBLEHDTInit.
[hdtParams,fecParams,filterParams] = helperBLEHDTInit(hdtMode,packetFormat,payloadBlockLength,sps);
Specify the symbol rate (in symbols/second) and channel bandwidth (in Hz) for the selected HDT PHY mode.
symbolRate = 2e6; channelBW = 2e6;
Extract the modulation and coding parameters.
codeRate = hdtParams.codeRate; % FEC coding rate M = hdtParams.M; % Modulation order k = log2(M); % Bits per symbol
Compute the effective data rate and number of transmitted bits.
dataRate = symbolRate*k*codeRate; % In bits/second nb = dataLength * 8; % Length of data in bits
Convert Eb/No values to SNR values for waveform-level simulation.
snr = convertSNR(EbNo,"ebno",BitsPerSymbol=k,CodingRate=codeRate,SamplesPerSymbol=sps);Preallocate space to store the BER and PER results.
ber = zeros(1,length(snr)); per = zeros(1,length(snr));
Precompute channel indices for all packets. The bleChannelSelection object is sequential and you must not use it inside parfor. When you enable frequency hopping, the simulation allocates channel indices by using the selected channel selection algorithm. When you disable frequency hopping, the central device selects a random channel index in the range [0 39].
channelIndices = zeros(1,maxNumPackets); if frequencyHopping for iPkt = 1:maxNumPackets channelIndices(iPkt) = frequencyHop(); end else channelIndices = mod((0:maxNumPackets-1),40); end
Precompute Bluetooth LE HDT Waveforms
The transmitter and RF impairment stages described in the link-level workflow are independent of the Eb/No values. To avoid redundant computation, precompute the impaired transmit waveforms for all packets before adding channel noise.
This reduces the number of times the transmitter pipeline runs from once for every Eb/No value and packet combination to just once per packet.
fprintf(' MODE: %s (M=%d, Rate=%.2f)\n', hdtMode, M, codeRate);MODE: HDT6 (M=16, Rate=0.75)
fprintf('Pre-computing %d TX waveforms...',maxNumPackets); Pre-computing 1000 TX waveforms...
txDataAll = cell(1,maxNumPackets);
txImpairedAll = cell(1,maxNumPackets);
parfor iPkt = 1:maxNumPackets
channelIndex = channelIndices(iPkt);
txDataAll{iPkt} = randi([0 1],nb,1);
txWaveform = helperBLEHDTWaveform(txDataAll{iPkt},channelIndex,hdtParams,fecParams,filterParams);Configure RF Impairments
Configure the RF impairments by using the helperBLEHDTImpairmentsInit helper function.
initImp = helperBLEHDTImpairmentsInit(sps);
initImp.pfo.FrequencyOffset = randsrc(1,1,-30e3:10:30e3); % Frequency offset in Hz
initImp.pfo.PhaseOffset = randsrc(1,1,-10:5:10); % Phase offset in degrees
initImp.dc = 20;
initoff = 0.1*sps; % Static timing offset
stepsize = 20*1e-6; % Timing drift in ppm
initImp.vdelay = (initoff:stepsize:initoff+stepsize*(length(txWaveform)-1))';
txImpairedAll{iPkt} = helperBLEHDTImpairmentsAddition(txWaveform,initImp);
endRun Simulation
Run the link-level simulation to evaluate BER and PER performance across the specified Eb/No range. At each Eb/No point, the simulation adds AWGN to the precomputed impaired waveforms, and the practical receiver processes the resulting signals to recover the transmitted bits. The simulation uses parfor to process packets in parallel and improve efficiency. Early stopping terminates the simulation after two consecutive zero-BER points, avoiding unnecessary computations at high Eb/No values.
fprintf('Running simulation...\n');Running simulation...
zeroCount = 0; for countSNR = 1:length(snr) bitErrors = zeros(1,maxNumPackets); pktErrors = zeros(1,maxNumPackets); % for iPkt = 1:maxNumPackets parfor iPkt = 1:maxNumPackets txData = txDataAll{iPkt}; channelIndex = channelIndices(iPkt); % Add AWGN to the pre-computed impaired waveform. [rxWaveform,nVar] = awgn(txImpairedAll{iPkt},snr(countSNR),"measured"); % Recover data bits using the practical receiver. rxBits = helperBLEHDTPracticalReceiver(rxWaveform,channelIndex,hdtParams,fecParams,filterParams,nVar); % BER and PER calculation nCompare = min(nb,length(rxBits)); if nCompare > 0 bitErrors(iPkt) = sum(txData(1:nCompare)~=rxBits(1:nCompare)); pktErrors(iPkt) = bitErrors(iPkt) > 0; else bitErrors(iPkt) = nb; pktErrors(iPkt) = 1; end end ber(countSNR) = sum(bitErrors) / (nb*maxNumPackets); per(countSNR) = sum(pktErrors) / maxNumPackets; fprintf('Eb/No=%2d dB: BER=%.4e, PER=%.4f\n',EbNo(countSNR),ber(countSNR),per(countSNR));
Simulation stops after two consecutive zero-BER Eb/No points, skipping unnecessary high-SNR iterations.
% Early stopping: 2 consecutive zero-BER points if ber(countSNR) == 0 zeroCount = zeroCount + 1; if zeroCount >= 2 fprintf(' Early stop: 2 consecutive zero-BER points reached.\n'); break; end else zeroCount = 0; end end
Eb/No= 2 dB: BER=4.8482e-01, PER=1.0000 Eb/No= 4 dB: BER=4.0401e-01, PER=1.0000 Eb/No= 6 dB: BER=1.7582e-01, PER=1.0000 Eb/No= 8 dB: BER=5.1553e-02, PER=0.8760 Eb/No=10 dB: BER=9.4080e-03, PER=0.1410 Eb/No=12 dB: BER=1.9856e-03, PER=0.0140 Eb/No=14 dB: BER=5.1810e-04, PER=0.0020 Eb/No=16 dB: BER=0.0000e+00, PER=0.0000 Eb/No=18 dB: BER=0.0000e+00, PER=0.0000
Early stop: 2 consecutive zero-BER points reached.
Trim results to the number of SNR points actually simulated (accounts for early stopping).
EbNoPlot = EbNo(1:countSNR); berPlot = ber(1:countSNR); perPlot = per(1:countSNR);
Plot the BER results to observe how bit error performance improves with increasing Eb/No values.
fig1 = figure('Name',sprintf('BLE HDT %s Practical RX - BER',hdtMode)); semilogy(EbNoPlot,berPlot,'r-*','LineWidth',1.5,'MarkerSize',7); grid on; xlabel('Eb/No (dB)'); ylabel('BER'); legend(hdtMode); title("BER for Bluetooth " + hdtMode + " with RF Impairments");

The BER curve shows how the bit error rate decreases with increasing Eb/No values. The steep waterfall region marks the transition from unreliable to error-free reception.
Plot the PER results to analyze packet-level reliability under the same conditions.
fig2 = figure('Name',sprintf('BLE HDT %s Practical RX - PER',hdtMode)); semilogy(EbNoPlot,perPlot,'b-*','LineWidth',1.5,'MarkerSize',7); grid on; xlabel('Eb/No (dB)'); ylabel('PER'); legend(hdtMode); title("PER for Bluetooth HDT " + hdtMode + " with RF Impairments");

The PER curve shows the fraction of packets containing at least one bit error. Since a single bit error corrupts an entire packet, PER reaches zero only at slightly higher Eb/No values than BER.
Appendix
The example uses these helper functions to generate and process HDT PHY waveforms.
helperBLEHDTImpairmentsInit— Initialize Bluetooth LE HDT RF impairments.helperBLEHDTImpairmentsAddition— Add Bluetooth LE HDT RF impairments to the generated waveform.helperBLEHDTInit— Initialize Bluetooth LE HDT transmitter and receiver parameters.helperBLEHDTPreamble— Generate Bluetooth LE HDT PHY preamble.helperBLEHDTPracticalReceiver— Demodulate and decode the Bluetooth LE HDT waveform.helperBLEHDTWaveform— Generate Bluetooth LE HDT waveform.helperBLEHDTWhiten— Perform Bluetooth LE HDT data whitening and dewhitening.
References
[1] Bluetooth Technology Website. "Bluetooth Technology Website | The Official Website of Bluetooth Technology." Accessed May 05, 2026. https://www.bluetooth.com/.
[2] LE High Data Throughput (HDT) - Physical Layer | "Bluetooth Technology Website." Accessed June 30, 2026. https://www.bluetooth.com/specifications/specs/high-data-throughput/.
See Also
Functions
Objects
bleChannelSelection|spectrumAnalyzer(DSP System Toolbox) |timescope(DSP System Toolbox)





