Main Content

lrwpanHRPConfig

Configure HRP transmission

Since R2023a

Description

The lrwpanHRPConfig object is a configuration object for the WPAN high-rate pulse (HRP) ultra-wideband (UWB) physical layer (PHY) format of IEEE® 802.15.4™ a/z. For a detailed description of the HRP UWB format, see [1] and for HRP in general, see [2].

Creation

Description

cfgHRP = lrwpanHRPConfig creates a configuration object that initializes transmit parameters for an HRP IEEE 802.15.4 a/z UWB waveform. This object parameterizes the higher pulse repetition frequency (HPRF), base pulse repetition frequency (BPRF), and the traditional 802.15.4a™ modes. The PHY service data unit (PSDU) rate-dependent parameters and timing-related parameters for BPRF and 802.15.4a modes are summarized in Table 15-3 of [2].

cfgHRP = lrwpanHRPConfig(Name=Value) sets properties using one or more name-value arguments. For example, lrwpanHRPConfig(Channel=3) specifies an HRP transmission assigned on channel 3.

example

Properties

expand all

Channel number, specified as a scalar in the set of [0:3 5:6 8:10 12:14] values.

This property constrains the allowed CodeIndex values for the BPRF and 802.15.4a modes. For transmission over the air, you must upconvert the baseband waveform generated by lrwpanWaveformGenerator to a carrier frequency. Table 15-11 of [2] specifies carrier frequencies and HRP UWB PHY band allocations.

Data Types: double | single

Operation mode, specified as 'HPRF', 'BPRF', or '802.15.4a'. The BPRF and 802.15.4a modes use burst position modulation with BPSK (BPM-BPSK) modulation scheme. HPRF mode uses the HRP-ERDEV modulation scheme, which has more regular chip transmissions.

When you set this property to:

  • 'HPRF' — The mean PRF is either 124.8 or 249.6 MHz.

  • 'BPRF' — The mean PRF is 62.4 MHz and the data rate is 6.81 Mbps.

  • '802.15.4a' — The mean PRF is either 3.9 or 15.6 MHz, or 62.4 MHz with a data rate different than 6.81 Mbps.

Data Types: string | char

Mean pulse repetition frequency in MHz, specified as 3.9, 15.6, 62.4, 124.8, or 249.6.

When you set Mode to:

  • 'HPRF' — The mean PRF is either 124.8 or 249.6 MHz.

  • 'BPRF' — The mean PRF is 62.4 MHz.

  • '802.15.4a' — The mean PRF is either 3.9, 15.6, or 62.4 MHz.

For the 802.15.4a and BPRF modes, the mean PRF equals the ratio of peak PRF and bursts per symbol (499.2/BustsPerSymbol). To return characteristic information about the configuration object, use the info object function.

Data Types: double | single

Payload data rate in Mbps, specified as 0.11, 0.85, 1.7, 6.81, or 27.24.

This property specifies the number of payload information bits (not including parity bits) that are conveyed in a unit of time, specifically, the number of chips per burst for the payload. When you set Mode to:

  • '802.15.4a' — You can set the data rate as specified in Table 15.3 of [2].

    • For mean PRF data rates 3.9, 15.6, and 62.4 Mbps, you can set the payload data rate to 0.11, 0.85, or 6.81 Mbps.

    • When the mean PRF data rate is 3.9 Mbps, you also can set the payload data rate to 1.7 Mbps.

    • When the mean PRF data rate is 15.6 or 62.4 Mbps, you also can set the payload data rate to 27.24 Mbps.

  • 'BPRF' — The payload data rate is 6.81 Mbps.

  • 'HPRF' — The payload data rate is set as specified by Table 15.10b in [1].

Dependencies

This property applies when you set Mode to '802.15.4a'.

Data Types: double | single

PHY header (PHR) data rate in Mbps, specified as 0.85 or 6.81.

This property determines the number of chips per burst for the PHR. When you set Mode to:

  • 'BPRF' — You can set the PHR data rate to 0.85 or 6.81 Mbps.

  • 'HPRF' — If you set ConstraintLength to 7, the PHR data rate equals the payload data rate. For other constraint lengths, the PHR data rate is approximately DataRate/2, as specified by Table 15.10b in [1].

  • '802.15.4a' — If you set DataRate to 0.11, the PHR data rate is 0.11 Mbps. For other data rates, the PHR data rate is 0.85 Mbps.

Dependencies

This property applies when you set Mode to 'BPRF'.

Data Types: double | single

Number of samples per Butterworth pulse, specified as a scalar value greater than 1.

This property determines how many samples are used to construct an 8th-order Butterworth pulse. The sample rate of the HRP waveform equals the product of SamplesPerPulse and the peak PRF value of 499.2 MHz.

Data Types: double | single

Control the scrambled timestamp sequence (STS) placement within the packet, specified as 0, 1, 2, or 3.

When you set this property to:

  • 0 — The packet contains the PHR and payload, but no STS.

  • 1 — The STS is placed before the PHR.

  • 2 — The STS is placed after the payload union.

  • 3 — The packet contains the STS, but no PHR or payload.

When the STS field is enabled, it is created with STS key = "4a5572bc90798c8e518d2449092f1b55" and STS counter ([upper96 lower32]) = ["68debd3a599939dd57fdbb0e" "2a10fac0"]. Test vectors specified by IEEE widely use these STS key and counter values.

Data Types: double | single

Number of contiguous STS segments, specified as 1, 2, 3, or 4.

When you set Mode to:

  • 'HPRF' — You can set the number of contiguous STS segments to 1, 2, 3, or 4.

  • 'BPRF' — The number of contiguous STS segments is 1.

  • '802.15.4a' — The packet has no STS.

Dependencies

This property applies when you set Mode to 'HPRF'.

Data Types: double | single

Length of active STS segments as a multiple of 512 chips, specified as 16, 32, 64, 128, or 256.

This property specifies the number of 512 chip chunks in the active STS. For example, setting this property to 64, corresponds to 32768 chips total in the STS. When you set Mode to:

  • 'HPRF' — You can set the length of active STS segments to 16, 32, 64, 128, or 256.

  • 'BPRF' — The length of active STS segments is 64.

  • '802.15.4a' — The packet has no STS.

Dependencies

This property applies when you set Mode to 'HPRF'.

Data Types: double | single

Length of extra STS gap as a multiple of 4 chips, specified as an integer in the range [0, 127]. This property specifies the length of an optional additional gap between the payload and the STS. For example, setting this property to 5 corresponds to a gap of 20 chips between the payload and the STS.

Dependencies

This property applies when you set Mode to 'HPRF' and STSPacketConfiguration to 2.

Data Types: double | single

Index of extra STS gap, specified as 0, 1, 2, or 3. This property determines which attribute conveys the ExtraSTSGapLength value and is used to construct the first two bits (A0, A1) of the PHR.

Dependencies

This property applies when you set Mode to 'HPRF' and STSPacketConfiguration to 2.

Data Types: double | single

SYNC code index, specified as a scalar from the set of [1:6 9:16 21:32]. The SYNC field of the PPDU contains the ternary codes associated with the SYNC code index specified by this property. The codes are comprised of ternary symbols (-1, 0, 1). For details, see Section 15.2.6.2 and Tables 15-6, 15-7, and 15-7a in [2].

  • Values in the range [1, 8] correspond to a code that is 31 symbols long (Table 15-6) and apply only when you set Mode to '802.15.4a' and the mean PRF is less than 62.4 MHz.

  • Values in the range [9, 24] correspond to a code that is 127 symbols long (Table 15-7) and apply only when the mean PRF is 62.4 MHz.

  • Values in the range [25, 32] correspond to a code that is 91 symbols long (Table 15-7a) and apply only when you set Mode to 'HPRF' or 'BPRF' and the mean PRF is less than 62.4 MHz.

Data Types: double | single

Mean pulse repetition frequency (PRF) of the preamble in MHz, specified as 4.03 or 16.1.

  • When you set Mode to '802.15.4', you can set the preamble code length to 4.03 or 16.1.

  • When PreambleCodeLength is 127, the preamble mean PRF is 62.89 MHz.

  • When PreambleCodeLength is 91, the preamble mean PRF is 111.09 MHz.

To return characteristic information about the configuration object, use the info object function.

Dependencies

This property applies when you set Mode to '802.15.4', which corresponds to a code index value less than 8 and preamble code length of 31.

Data Types: double | single

Number of repetitions of spread preamble SYNC codes, specified as 16, 24, 32, 48, 6496, 128, 256, 1024, or 4096.

This property determines how many times the code indexed by CodeIndex is repeated, after it is spread according to the PreambleSpreadingFactor. To return characteristic information about the configuration object, use the info object function. When you set Mode to:

  • 'HPRF' — You can set the preamble duration to 16, 24, 32, 48, 64, 96, 128, or 256.

  • 'BPRF' or '802.15.4a'— You can set the preamble duration to 16, 64, 1024, or 4096. The preamble duration cannot be set to 4096 when you set PreambleMeanPRF to 4.03 MHz.

Data Types: double | single

Index of the start-of-frame delimiter (SFD) choice from Table 15-7c in [1], specified as 0, 1, 2, 3, or 4.

This property determines the length and value of the SFD in the synchronization header (SHR). Setting the SFD number to 0 or 2 enables an 8-symbol SFD. Setting the SFD number to 1, 3 or 4 enables a 4-, 16-, or 32-symbol SFD, respectively. When you set Mode to:

  • 'HPRF' — You can set the SFD number to 0, 1, 2, 3, or 4.

  • 'BPRF' — You can set the preamble duration to 0 or 2.

  • '802.15.4a' — When you set the payload data rate to 0.11 Mbps, the SFD is 64 symbols. For all other payload data rates, the SFD is 8 symbols.

Dependencies

This property applies when you set Mode to 'BPRF' or 'HPRF'.

Data Types: double | single

PHY frame to be used for ranging, specified as a numeric or logical 0 (false) or 1 (true). When you set this property to:

  • false — The ranging value is not encoded in the PHY header (PHR).

  • true — The ranging value is encoded in the PHY header (PHR).

Data Types: logical

Constraint length of convolutional coding, specified as 3 or 7.

The chosen constraint length selects between the two rate ½ convolutional encoders defined in Section 15.3.3.3 of [1].

Dependencies

This property applies when you set Mode to 'HPRF'.

Data Types: double | single

Length of PHY service data unit (PSDU) payload in bytes, specified as a positive integer in the range [0, 4095].

When you set Mode to:

  • 'HPRF' and ExtraSTSGapLength to 0 — The PSDU length must be in the range [0, 4095].

  • 'HPRF' and ExtraSTSGapLength to a nonzero value — The PSDU length must be in the range [0, 1023].

  • 'BPRF' or '802.15.4a' — The PSDU length must be in the range [0, 127].

Data Types: double | single

This property is read-only.

Sample rate of the output waveform in Hz, specified as a positive scalar.

Data Types: double | single

Output Arguments

expand all

Configuration object for HRP IEEE 802.15.4 a/z UWB waveform, returned as a structure.

Data Types: struct

Object Functions

infoCharacteristic information about WPAN high-rate pulse configuration object

Examples

collapse all

Generate random data for a PHY Service Data Unit (PSDU) payload. Create an HPRF IEEE 802.15.4z lrwpanHRPConfig object.

psdu = randi([0,1],8*200,1);
cfgHPRF = lrwpanHRPConfig(Mode='HPRF', ...
    Channel=3, ...                % Mandatory low-band channel
    MeanPRF=124.8, ...            % 16 chips per payload symbol
    STSPacketConfiguration=1, ... % Enable STS before payload
    NumSTSSegments=2, ...         % 2 STS segments
    CodeIndex=27, ...             % One 91-symbols long SYNC code
    PreambleDuration=32, ...      % Repetitions for spread SYNC code
    SFDNumber=1, ...              % Choose a 4-symbol long SFD
    ConstraintLength=7, ...       % Convolutional encoder, no RS coding
    PSDULength=100);              % PSDU length in bytes

Generate an HPRF IEEE 802.15.4z waveform by using the lrwpanWaveformGenerator function and cfgHPRF configuration object. The waveform generator loops PSDU length as needed to use all input PSDU payload bits. Display the waveform by using a spectrumAnalyzer object.

waveHPRF = lrwpanWaveformGenerator(psdu,cfgHPRF);
sa = spectrumAnalyzer(SampleRate=cfgHPRF.SampleRate);
sa(waveHPRF);

Generate random data for a PHY Service Data Unit (PSDU) payload. Create a BPRF IEEE 802.15.4z lrwpanHRPConfig object. BPRF payload data rate is always at 6.81 Mbps.

psdu = randi([0,1],8*100,1);
cfgBPRF = lrwpanHRPConfig(Mode='BPRF', ...
    STSPacketConfiguration=0, ... % Turn off STS
    PHRDataRate=6.81, ...         % PSDU header data rate in Mbps
    CodeIndex=9, ...              % A 127-symbols long SYNC code
    PSDULength=length(psdu)/8);   % PSDU length in bytes

Generate an BPRF IEEE 802.15.4z waveform by using the lrwpanWaveformGenerator function and cfgBPRF configuration object. The waveform generator loops PSDU length as needed to use all input PSDU payload bits. Display the waveform by using a spectrumAnalyzer object.

waveBPRF = lrwpanWaveformGenerator(psdu,cfgBPRF);
sa = spectrumAnalyzer(SampleRate=cfgBPRF.SampleRate);
sa(waveBPRF);

Generate random data for a PHY Service Data Unit (PSDU) payload. Create an IEEE 802.15.4a lrwpanHRPConfig object.

psdu = randi([0,1],50,1);
cfg4a = lrwpanHRPConfig(Mode='802.15.4a', ...
    Channel=9, ...            % High-band mandatory chan for code index 3
    MeanPRF=15.6, ...         % 8 candidate bursts
    DataRate=27.24, ...       % 1 chip per burst (PHR at 850 kbps max)
    CodeIndex=3, ...          % 3rd code with length 31 
    PreambleMeanPRF=4.03, ... % PreambleSpreadingFactor = 64
    PSDULength=100);          % PSDU length in bytes

Generate an 4a IEEE 802.15.4z waveform by using the lrwpanWaveformGenerator function and cfg4a configuration object. The waveform generator loops input PSDU payload bits as needed to fill PSDU length. Display the waveform by using a spectrumAnalyzer object.

wave4a = lrwpanWaveformGenerator(psdu,cfg4a);
sa = spectrumAnalyzer(SampleRate=cfg4a.SampleRate);
sa(wave4a);

References

[1] IEEE STD 802.15.4z-2020. "IEEE Standard for Low-Rate Wireless Networks." Amendment 1: Enhanced Ultra Wideband (UWB) Physical Layers (PHYs) and Associated Ranging Techniques. June 2020.

[2] IEEE STD 802.15.4-2020. "IEEE Standard for Low-Rate Wireless Networks." May 2020.

Extended Capabilities

Version History

Introduced in R2023a

expand all