Main Content

HRP UWB IEEE 802.15.4a/z Waveform Generation

This example shows how to generate standard-compliant high rate pulse repetition frequency (HRP) ultra wideband (UWB) waveforms of the IEEE® 802.15.4a/z standard ([ 1 ], [ 2 ]), using the Communications Toolbox™.

Background

The IEEE 802.15.4 standard specifies the PHY and MAC layers of Low-Rate Wireless Personal Area Networks (LR-WPANs) [ 1 ]. The IEEE 802.15.4 PHY and MAC layers are used by higher-layer standards, such as ZigBee®, WirelessHart®, 6LoWPAN and MiWi.

Multiple PHY schemes are specified in different amendments of the IEEE 802.15.4 standard:

  • IEEE 802.15.4a introduced a high rate pulse repetition frequency (HRP) UWB PHY used for ranging (i.e., localization) [ 1 ].

  • IEEE 802.15.4f introduced a low rate pulse repetition frequency (LRP) UWB PHY used for RFID, ranging, and reduced energy consumption [ 1 ].

  • IEEE 802.15.4z introduced new enhanced modes for both the HRP and LRP UWB IEEE 802.15.4a/f PHYs [ 2 ].

The HRP UWB PHY specifies a channel bandwidth of 0.5-1.3 GHz and a pulse duration of 2 ns. Since the calculations used for ranging techniques rely on the time duration of packet transmission, the extra short pulse duration makes UWB PHYs suitable for ranging applications. A finer granularity in the time domain translates to smaller errors in distance estimation.

This example generates standard-compliant HRP UWB 802.15.4a/z waveforms for three pulse repetition frequency (PRF) transmission modes (802.15.4a, and 802.15.4z BPRF and HPRF). For IEEE 802.15.4a, the valid mean PRF values are 3.9, 15.6 or 62.4 MHz. The IEEE 802.15.4z amendment defines these two PRF modes:

  • Base pulse repetition frequency (BPRF), where the mean PRF is 62.4 MHz and the payload data rate is 6.81 Mbps

  • Higher pulse repetition frequency (HPRF), where the mean PRF is either 124.8 or 249.6 MHz.

The scrambled timestamp sequence (STS) field is another key feature introduced by 802.15.4z to enhance data integrity. Transmission of the STS field is optional for the BRPF and HPRF modes.

Configuration for HRP Waveform Generation

The lrwpanHRPConfig object configures the waveform of each transmission mode. The lrwpanWaveformGenerator function generates HRP UWB IEEE 802.15.4a/z waveforms using lrwpanHRPConfig objects and the PHY service data unit (PSDU) as inputs.

HPRF Mode in IEEE 802.15.4z

In the higher pulse repetition frequency (HPRF) mode of IEEE 802.15.4z, the mean PRF is either 124.8 or 249.6 MHz. Since HPRF mode uses higher PRFs than BPRF or IEEE 802.15.4a, the HPRF mode can estimate range more accurately. The default mean PRF of the lrwpanHRPConfig object is 249.6 MHz.

msg = randi([0 1], 1000, 1);
cfgHPRF = lrwpanHRPConfig(Mode='HPRF', PSDULength=length(msg)/8) %#ok<NOPTS>
waveHPRF = lrwpanWaveformGenerator(msg, cfgHPRF);

lrwpanPlotFrame(waveHPRF, cfgHPRF);
cfgHPRF = 

  lrwpanHRPConfig with properties:

                   Channel: 0
                      Mode: 'HPRF'
                   MeanPRF: 249.6000
           SamplesPerPulse: 4
                 CodeIndex: 25
          PreambleDuration: 64
                 SFDNumber: 0
                   Ranging: 0
          ConstraintLength: 3
                PSDULength: 125

   STS:
    STSPacketConfiguration: 1
            NumSTSSegments: 1
          STSSegmentLength: 64

   Read-only properties:
                SampleRate: 1.9968e+09

The HPRF frame consists of the following fields:

Synchronization (SYNC) field: The SYNC field contains the specified number of repetitions (Nsync) of a 91-symbol long code spread according to the PreambleSpreadingFactor property. The CodeIndex property determines which code is used. (Nsync) is specified by the PreambleDuration property.

Start-of-frame delimiter (SFD) field: The SFD field is a 4-, 8-, 16- or 32-symbol sequence spread with the SYNC code corresponding to the CodeIndex property. The length of the starting SFD sequence is determined by the SFDNumber property.

Scrambled timestamp sequence (STS) field: The STS field is explained in the next section.

PHY Header (PHR) field: The PHR field is a 19 bit sequence that contains 6 parity bits generated by a single error correction, double error detection (SECDED) Hamming block code. The Ranging property determines one of the 13 systematic PHR bits. Subsequently, the PHR is convolutionally encoded with a rate 1/2 convolutional code. The ConstraintLength property (3 or 7) chooses between two rate 1/2 convolutional encoders.

For the HPRF modulation scheme (Sec. 15.3.4 in [ 2 ]), each PHR convolutional codeword is mapped to a sequence of 16 or 32 pulses (for mean PRF 249.6 and 124.8 MHz, respectively). Pulse sequences are separated by guard intervals. The first element of the ChipsPerSymbol property conveys the number of pulses in each PHR symbol.

Payload: The PSDU is encoded with a (63, 55) Reed-Solomon code. Subsequently, it is convolutionally encoded (together with the PHR) with a rate 1/2 convolutional code. The ConstraintLength property (3 or 7) chooses between two rate 1/2 convolutional encoders.

For the HPRF modulation scheme (Sec. 15.3.4 in [ 2 ]), each convolutional codeword of the payload is mapped to a sequence of 8 or 16 pulses (for mean PRF 249.6 and 124.8 MHz, respectively). Pulse sequences are separated by guard intervals. The last element of the ChipsPerSymbol property conveys the number of pulses in each payload symbol. This figure illustrates a single payload symbol at a 249.6 MHz Mean PRF.

fig = lrwpanPlotFrame(waveHPRF, cfgHPRF);
hZoomTo1stHPRFPayloadSymbol(fig, cfgHPRF)

The second and the fourth quarter of the symbol are guard intervals. The first and third quarter contain 4 chip transmissions each.

Scrambled Timestamp Sequence (STS)

The STS field can be used to ensure the authenticity of the ranging estimates. This field is optional for the HPRF and BPRF modes. The STSPacketConfiguration property specifies the initial configuration of the STS field. To omit the STS field, specify 0 for the STSPacketConfiguration property. The other values determine the STS and PHR/payload placement within the PHY frame.

The STS field consists of multiple segments separated by a gap. The NumSTSSegments property determines the number of segments (1 to 4) and the STSSegmentLength property determines the length of each segment (16, 32, 64, 128 or 256 in multiples of 512 chips).

This code configures, generates, and visualizes a waveform containing 2 STS segments with gaps before and after each segment. A portion of the preceding SFD field is included.

msg = randi([0 1], 2000, 1);
cfgSTS = lrwpanHRPConfig( ...
    Mode='HPRF', ...
    NumSTSSegments=2, ...
    STSSegmentLength=16, ...
    PSDULength=length(msg)/8);
waveSTS = lrwpanWaveformGenerator(msg,cfgSTS);

lrwpanPlotFrame(waveSTS, cfgSTS);
ind = lrwpanHRPFieldIndices(cfgSTS);
set(gca,'XLim',ind.STS - [5e3 0]) % portion of preceding field (SFD)
title('STS field with 2 segments')

The STS generation in this example creates the STS structure (including number of segments, gaps, segment length, STS spreading, and pulse polarity), but does not perform AES-128 encryption. Random bits are used in place of the AES-128 output. To implement AES-128, incorporate the aes128Placeholder subfunction of lrwpan.internal.lrwpanHRPWaveformGenerator. The aes128Placeholder subfunction includes the counter and the 128-bit V value.

BPRF Mode in IEEE 802.15.4a/z

In the base pulse repetition frequency (BPRF) mode, mean PRF is 62.4 MHz and data rate is 6.81 Mbps.

The key difference between the BPRF and the HPRF mode is that in BPRF the PHR and the payload are modulated with the burst position modulation (BPM) BPSK technique.

msg = randi([0 1],1016,1);
cfgBPRF = lrwpanHRPConfig(Mode='BPRF',CodeIndex=9, PSDULength=length(msg)/8) %#ok<NOPTS>
waveBPRF = lrwpanWaveformGenerator(msg,cfgBPRF);
lrwpanPlotFrame(waveBPRF,cfgBPRF);
cfgBPRF = 

  lrwpanHRPConfig with properties:

                   Channel: 0
                      Mode: 'BPRF'
               PHRDataRate: 0.8500
           SamplesPerPulse: 4
                 CodeIndex: 9
          PreambleDuration: 64
                 SFDNumber: 0
                   Ranging: 0
                PSDULength: 127

   STS:
    STSPacketConfiguration: 1

   Read-only properties:
                SampleRate: 1.9968e+09

BPRF frames include the SYNC and SFD fields and are BPM-BPSK modulated.

  • The SYNC field is constructed similar to HPRF mode, but the selected code can be 127 symbols long, so the CodeIndex property setting can be as low as 9.

  • The SFD field is always 8 symbols long.

  • Sec. 15.3 of [ 1 ] specifies the BPM-BPSK modulation scheme. As shown by this code, a single PHR and a single payload symbol appear together under BPM-BPSK modulation for the BPRF mode.

fig = lrwpanPlotFrame(waveBPRF,cfgBPRF);
hZoomToBPMBPSKSymbols(fig,cfgBPRF);

In the plot, a solid black vertical line separates the PHR and payload symbol durations, and dashed lines separate different candidate burst positions. In BPM-BPSK modulation, each symbol duration is divided in 4 quarters, and transmission can occur either in the 1st or the 3rd quarter. The systematic bit of the convolutional codeword determines when transmissions occur. Each quarter is divided into 2, 8, or 32 candidate bursts as specified by the NumHopBursts property and determined by the mean PRF. When the mean PRF is 62.4 MHz (BPRF), the number of candidate active bursts in a quarter symbol is 2, which corresponds to a total of 8 burst durations per symbol. In the plotted PHR and payload symbols, the active transmissions occupy 1/8 of their symbol durations. A PN sequence determines the location of the single burst transmissions in the quarter symbol determined by the systematic bit. Specifically, where the burst hopping occurs over time. Within the selected burst position, Ncpb chips are transmitted, as specified by the ChipsPerBurst property. The first element contains the PHR and the last element contains the payload. The number of chips per burst is determined by the mean PRF and data rate combination.

PHR: The PHR data rate is either 850 kbps or 6.81 Mbps, as determined by the PHRDataRate property. A PHR data rate of 850 kbps corresponds to 64 chips per burst and 512 chips per symbol. A PHR data rate of 6.81 Mbps corresponds to 8 chips per burst and 64 chips per symbol. The PHR field has the same length (19 bits) and encoding (SECDED and convolutional) as the HPRF mode.

Payload: As shown in Table 15-9a of [ 2 ], for BPRF mode the payload data rate is 6.81 Mbps, which corresponds to 8 chips per burst and 64 chips per symbol duration. Similar to HPRF mode, the payload field uses rate 1/2 convolutional encoding, but for BPRF the constraint length can only be 3.

IEEE 802.15.4a

Similar to BPRF mode, IEEE 802.15.4a uses the BPM-BPSK modulation scheme. These are the key differences between legacy 15.4a and the BPRF mode.

  • IEEE 802.15.4a has no STS field.

  • The mean PRF of the payload can be 3.9, 15.6, or 62.4 MHz. For mean PRF values of 3.9 or 15.6 MHz, the spreading factor of the SYNC codes (PreambleSpreadingFactor) is configurable by the PreambleMeanPRF property.

  • The payload data rate is dependent on the mean PRF and is not limited 6.81 Mbps. The data rate and mean PRF values can enable different values for the number of hop bursts (NumHopBursts can be 2, 8, or 32) and chips per burst (ChipsPerBurst can be 1, 2, 4, 8, 16, 32, 64, 128, or 512).

  • The data rate of the PHR equals the minimum of 850 kbps and the data rate of the payload. The data rate can be either 110 or 850 kbps.

  • Convolutional coding is disabled for the highest data rates (6.81 and 27.24 Mbps) of the 3.9 and 15.6 MHz mean PRF, respectively.

In an 802.15.4a configuration, you can set the mean PRF to 62.4 MHz only when the data rate is not 6.81 Mbps. A data rate of 6.82 MHz corresponds to BPRF mode. When the mean PRF is 3.9 or 15.6 MHz, the code index must be in the range [1, 6]. When the mean PRF is 62.4 MHz, the code index must be in the range [9, 16] or [21, 24].

msg = randi([0 1],800,1);
cfg4a = lrwpanHRPConfig( ...
    Mode='802.15.4a', ...
    MeanPRF=15.6, ...
    Channel=3, ...
    CodeIndex=6, ...
    PSDULength=length(msg)/8) %#ok<NOPTS>
wave4a = lrwpanWaveformGenerator(msg,cfg4a);

lrwpanPlotFrame(wave4a,cfg4a);
cfg4a = 

  lrwpanHRPConfig with properties:

             Channel: 3
                Mode: '802.15.4a'
             MeanPRF: 15.6000
            DataRate: 0.8500
     SamplesPerPulse: 4
           CodeIndex: 6
     PreambleMeanPRF: 16.1000
    PreambleDuration: 64
             Ranging: 0
          PSDULength: 100

   Read-only properties:
          SampleRate: 1.9968e+09

RF Conformance

All IEEE 802.15.4a/z waveforms generated in this example are repetitions of Butterworth pulses. Such pulses are obtained by passing a sequence of ternary symbols (-1, 0, or 1) to a Butterworth filter.

The IEEE 802.15.4a/z HRP standard specifies a compliance check for HRP pulses (see Sec. 15.4.4 in [ 1 ]). Specifically, the cross-correlation between the used pulse and a root raised cosine pulse with a roll-off factor of 0.5, must be higher than 0.8 for 0.5 ns in the main (central) lobe, and all other side lobes must have cross-correlation lower than 0.3.

The IEEE 802.15.4z amendment specifies that transmitted pulses conform to the time-domain mask shown in Fig. 15-13a of [ 2 ]. The Butterworth pulses used in this example comply with the transmit mask recommendation.

lrwpanHRPPulseConformance(cfgHPRF);

The IEEE 802.15.4 standard specifies a mask for the transmit power spectral density PSD (see Sec. 15.4.5 in [ 1 ]). The lrwpanHRPTxPSDMask helper function displays the spectral density of the generated waveform and examines the conformance to the spectral mask.

lrwpanHRPTxPSDMask(waveHPRF,cfgHPRF)

Similar results can be attained for the other generated waveforms, using these commands.

% lrwpanHRPTxPSDMask(waveBPRF,cfgBPRF)
% lrwpanHRPTxPSDMask(wave4a,cfg4a)

Further Exploration

The example uses these features, supporting file, and utility. The API and functionality of undocumented utilities may change in the future. To view the source code of the utilities, use the edit function.

References

  1. "IEEE Standard for Low-Rate Wireless Networks," in IEEE Std 802.15.4-2020 (Revision of IEEE Std 802.15.4-2015), pp.1-800, 23 July 2020, doi: 10.1109/IEEESTD.2020.9144691.

  2. "IEEE Standard for Low-Rate Wireless Networks--Amendment 1: Enhanced Ultra Wideband (UWB) Physical Layers (PHYs) and Associated Ranging Techniques," in IEEE Std 802.15.4z-2020 (Amendment to IEEE Std 802.15.4-2020), pp.1-174, 25 Aug. 2020, doi: 10.1109/IEEESTD.2020.9179124.

Related Topics