lrwpanHRPConfig
Description
Creation
Description
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
sets properties using one or more name-value arguments. For example,
cfgHRP
= lrwpanHRPConfig(Name=Value
)lrwpanHRPConfig(Channel=3)
specifies an HRP transmission assigned on
channel 3
.
Properties
Channel
— Channel number
0
(default) | scalar in the set [0:3 5:6 8:10 12:14]
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
Mode
— Operation mode
'HPRF'
(default) | 'BPRF'
| '802.15.4a'
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
MeanPRF
— Mean pulse repetition frequency
249.6
(default) | 3.9
| 15.6
| 62.4
| 124.8
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
DataRate
— Payload data rate
0.85
(default) | 0.11
| 1.7
| 6.81
| 27.24
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 is6.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
PHRDataRate
— PHR data rate
0.85
(default) | 6.81
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 to0.85
or6.81
Mbps.'HPRF'
— If you setConstraintLength
to7
, the PHR data rate equals the payload data rate. For other constraint lengths, the PHR data rate is approximatelyDataRate
/2
, as specified by Table 15.10b in [1].'802.15.4a'
— If you setDataRate
to0.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
SamplesPerPulse
— Number of samples per Butterworth pulse
4
(default) | scalar value greater than 1
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
STSPacketConfiguration
— Control STS placement within packet
1
(default) | 0
| 2
| 3
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
NumSTSSegments
— Number of contiguous STS segments
1
(default) | 2
| 3
| 4
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 to1
,2
,3
, or4
.'BPRF'
— The number of contiguous STS segments is1
.'802.15.4a'
— The packet has no STS.
Dependencies
This property applies when you set Mode
to
'HPRF'
.
Data Types: double
| single
STSSegmentLength
— Length of active STS segments
64
(default) | 16
| 32
| 128
| 256
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 to16
,32
,64
,128
, or256
.'BPRF'
— The length of active STS segments is64
.'802.15.4a'
— The packet has no STS.
Dependencies
This property applies when you set Mode
to
'HPRF'
.
Data Types: double
| single
ExtraSTSGapLength
— Length of extra STS gap
0
(default) | integer the range [0, 127]
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
ExtraSTSGapIndex
— Index of extra STS gap
0
(default) | 1
| 2
| 3
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
CodeIndex
— SYNC code index
25
(default) | scalar from set of [1:6 9:16 21:32]
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
PreambleMeanPRF
— Mean PRF of preamble
16.1
(default) | 4.03
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 to4.03
or16.1
.When
PreambleCodeLength
is127
, the preamble mean PRF is 62.89 MHz.When
PreambleCodeLength
is91
, 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
PreambleDuration
— Number of repetitions of spread preamble SYNC codes
64
(default) | 16
| 24
| 32
| 48
| ...
Number of repetitions of spread preamble SYNC codes, specified as
16
, 24
, 32
,
48
, 64
96
,
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 to16
,24
,32
,48
,64
,96
,128
, or256
.'BPRF'
or'802.15.4a'
— You can set the preamble duration to16
,64
,1024
, or4096
. The preamble duration cannot be set to 4096 when you setPreambleMeanPRF
to4.03
MHz.
Data Types: double
| single
SFDNumber
— Index of SFD choice
0
(default) | 1
| 2
| 3
| 4
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 to0
,1
,2
,3
, or4
.'BPRF'
— You can set the preamble duration to0
or2
.'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
Ranging
— PHY frame to be used for ranging
0
or false
(default) | 1
or true
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
ConstraintLength
— Constraint length of convolutional coding
3
(default) | 7
PSDULength
— Length of PSDU
127
(default) | positive integer in the range [0, 4095]
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'
andExtraSTSGapLength
to0
— The PSDU length must be in the range [0, 4095].'HPRF'
andExtraSTSGapLength
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
SampleRate
— Sample rate of output waveform
1.9968e9
(default) | positive scalar
This property is read-only.
Sample rate of the output waveform in Hz, specified as a positive scalar.
Data Types: double
| single
Output Arguments
cfghrp
— Configuration object for HRP IEEE 802.15.4 a/z UWB waveform
structure
Configuration object for HRP IEEE 802.15.4 a/z UWB waveform, returned as a structure.
Data Types: struct
Object Functions
info | Characteristic information about WPAN high-rate pulse configuration object |
Examples
Create HPRF IEEE 802.15.4z Waveform
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);
Create BPRF IEEE 802.15.4z Waveform
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);
Create IEEE 802.15.4a Waveform
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
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
This function supports C/C++ code generation with the limitations:
See System Objects in MATLAB Code Generation (MATLAB Coder).
Version History
Introduced in R2023aR2023b: lrwpanHRPConfig
moved into Communications Toolbox
Communications Toolbox™ Library for ZigBee® and UWB add-on features are now accessed from your Communications Toolbox software. In previous releases you needed to download the Communications Toolbox Library for ZigBee and UWB add-on to use lrwpanHRPConfig
.
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)