Main Content

Bluetooth LE Modulation Characteristics, Carrier Frequency Offset and Drift Tests

This example shows how to perform Bluetooth® low energy (LE) radio frequency (RF) physical layer (PHY) transmitter tests specific to modulation characteristics, carrier frequency offset, and drift using Bluetooth® Toolbox. The test measurements compute frequency deviation, carrier frequency offset, and drift values. This example also verifies whether these test measurement values are within the limits specified by the Bluetooth RF-PHY Test Specifications [ 1 ].

Objectives of LE RF-PHY Tests

The Bluetooth RF-PHY Test Specifications [ 1 ] defined by Bluetooth Special Interest Group (SIG) includes RF-PHY tests for both transmitter and receiver. The objectives of these RF-PHY tests are to:

  • Ensure interoperability between all Bluetooth devices.

  • Ensure a basic level of system performance for all Bluetooth products.

Each test case has a specified test procedure and an expected outcome, which must be met by the implementation under test (IUT).

RF-PHY Transmitter Tests

The main aim of transmitter test measurements is to ensure that the transmitter characteristics are within the specified limits as specified in the test specifications [ 1 ]. This example includes transmitter tests relevant to modulation characteristics, carrier frequency offset, and drift. This table shows various RF-PHY transmitter tests performed in this example.

Transmitter Test Procedure

This block diagram summarizes the test procedure for transmitter tests relevant to modulation characteristics, carrier frequency offset, and drift.

Generate Bluetooth LE test packets by using the bluetoothTestWaveform function. The test waveforms required for different test IDs are:

Configure the Test Parameters

Specify the RF-PHY test configuration parameters by using the bluetoothRFPHYTestConfig object. The function,helperBLEModulationTestConfig.m, can be configured to generate test parameters.

testConfig = bluetoothRFPHYTestConfig;
testConfig.Test = "Modulation characteristics";
testConfig.Mode = "LE1M";
testConfig.PayloadLength =240;  % Payload length in bytes, must be in the range [37,255]

% The CTE information field position is same for LE test packet and data packet.
% For CTE-based RF-PHY tests, set the packet type to 'ConnectionCTE'.
testConfig.PacketType = "Disabled"; 
if strcmp(testConfig.PacketType,'ConnectionCTE')
    testConfig.CTELength =13;  % CTE length in 8 microseconds units,
end                                                   % must be in the range [13,20]
testConfig.SamplesPerSymbol = 32;   % Number of samples per symbol, minimum of 32 samples
                                    % per symbol as per the test specifications
testConfig.InitialFrequencyOffset =23000;  % In Hz, must be in the range [-100e3,100e3]
testConfig.CarrierDrift =0;  % In Hz, must be in the range [-50e3,50e3]

% Generate test parameters
[testParams,wgParams] = helperBLEModulationTestConfig(testConfig); 

Simulate Transmitter Tests

To simulate the transmitter tests, perform these steps:

  1. Generate Bluetooth LE test packet waveform by using the bluetoothTestWaveform function.

  2. Add frequency offset, which includes initial frequency offset, and drift to the waveform by using the comm.PhaseFrequencyOffset System object.

  3. Add thermal noise by using the comm.ThermalNoise System object.

  4. Perform filtering on the noisy waveform by using helperModulationTestFilterDesign helper function.

  5. Perform FM demodulation on the filtered waveform.

  6. Perform test measurement and display the pass verdict.

if strcmp(testConfig.PacketType,'ConnectionCTE')
  [~,testWfmSymLen] = bluetoothPacketDuration(testConfig.Mode,testConfig.PacketType,...
      testConfig.PayloadLength,testConfig.CTELength);
else
  [~,testWfmSymLen] = bluetoothPacketDuration(testConfig.Mode,testConfig.PacketType,...
      testConfig.PayloadLength);
end
testWfmLen = testWfmSymLen*testConfig.SamplesPerSymbol;
driftRate = testConfig.CarrierDrift/testWfmLen;% Drift rate
freqDrift = driftRate*(0:1:(testWfmLen-1))';% Frequency drift

% Frequency offset and frequency drift
freqOffset = testConfig.InitialFrequencyOffset + freqDrift; 

% Create a phase frequency offset System object
pfo = comm.PhaseFrequencyOffset('FrequencyOffset',freqOffset,...
    'SampleRate',testParams.sampleRate);
% Create a thermal noise System object

NF = 12; % Noise figure in dB
thNoise = comm.ThermalNoise('NoiseMethod','Noise figure',...
                            'SampleRate',testParams.sampleRate,...
                            'NoiseFigure',NF);
filtDesign = helperModulationTestFilterDesign(testParams.phyMode,testParams.sps);
filtTestWfm = zeros(testWfmLen,testParams.numOfTestSeqs);
for wfmIdx = 1:testParams.numOfTestSeqs
    % Generate Bluetooth LE test waveforms
    wgParams.PayloadType = testParams.testSeqIds(wfmIdx);
    testWfm = bluetoothTestWaveform(wgParams);
    wfmFreqOffset = pfo(testWfm);
    wfmChannel = thNoise(wfmFreqOffset);
    % Perform filtering
    filtTestWfm(:,wfmIdx) =  conv(wfmChannel,filtDesign.Coefficients.','same'); 
end

Perform frequency modulation by using the helperBLEModulationTestMeasurements.m helper function. Based on the test, the helperBLEModulationTestMeasurements.m helper function computes either frequency deviation, or frequency drift and initial frequency offset.

[waveformDiffFreq,fOut1,fOut2,fOut3] = helperBLEModulationTestMeasurements(filtTestWfm,...
    testConfig.TestID,testParams);

The helperBLEModulationTestVerdict.m helper function verifies whether the measurements are within the specified limits, and displays the verdict on the command window.

helperBLEModulationTestVerdict(waveformDiffFreq,testConfig.TestID,testParams,fOut1,...
    fOut2,fOut3)

Figure contains 2 axes objects. Axes object 1 with title Frequency Demodulated Waveform for Sequence: 11110000 contains 3 objects of type line. These objects represent FM Demodulated Waveform, Average Frequency Deviation, Sequence Center Frequency. Axes object 2 with title Frequency Demodulated Waveform for Sequence: 10101010 contains 3 objects of type line. These objects represent FM Demodulated Waveform, Average Frequency Deviation, Sequence Center Frequency.

Test sequence: 11110000
    Measured average frequency deviation = 250 kHz
    Expected average frequency deviation = 247.5 kHz to 252.5 kHz
    Result: Pass
Test sequence: 10101010
    Expected 99.9% of all maximum frequency deviation > 185000 kHz
    Result: Pass
Ratio of frequency deviations between two test sequences = 1.163
Expected Ratio > 0.8 
    Result: Pass

This example demonstrated the Bluetooth LE transmitter test measurements specific to modulation characteristics, carrier frequency offset and, drift. The simulation results verify that these computed test measurement values are within the limits specified by Bluetooth RF-PHY Test Specifications [ 1 ].

Appendix

The helpers used in this example are:

Selected Bibliography

  1. Bluetooth Special Interest Group (SIG). “Bluetooth RF-PHY Test Specification”, Revision: RF-PHY.TS.5.1.0, Section 4.4. 2018. https://www.bluetooth.com.

  2. Bluetooth Special Interest Group (SIG). "Bluetooth Core Specification". Version 5.3. https://www.bluetooth.com.

See Also

Functions

Objects

Related Topics