matlab/matlab-agentic-toolkit / skills-catalog/wireless-communications/matlab-generate-wlan-waveform
matlab-generate-wlan-waveform
VerifiedGenerate standard-compliant IEEE 802.11 waveforms using MATLAB WLAN Toolbox. Use when creating WLAN waveforms, PPDU packets, or the transmit side of a link-level simulation. Covers all formats: Non-HT (802.11a/g), HT (802.11n), VHT (802.11ac), HE-SU/HE-MU/HE-TB (802.11ax), EHT-MU/EHT-TB (802.11be), UHR-MU/UHR-TB/UHR-ELR (802.11bn). Handles single-user, MU-MIMO, OFDMA, trigger-based uplink, extended range, preamble puncturing, UEQM, and DRU. Use when asked to generate test waveforms, create packets with MAC frames, configure OFDMA resource units, build trigger-based uplink transmissions, target a specific transmit duration, or build multi-packet waveforms.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 20.9 KB |
| manifest.yaml | config | 431 B |
| references/documentation-links.md | markdown | 2.2 KB |
| references/eht-allocation-indices.md | markdown | 9.1 KB |
| references/he-allocation-indices.md | markdown | 4.5 KB |
| references/mac-frame-properties.md | markdown | 5.2 KB |
| references/multi-packet-waveforms.md | markdown | 2.5 KB |
| references/trigger-based-uplink.md | markdown | 2.9 KB |
| references/uhr-waveform-generation.md | markdown | 5.7 KB |
references/trigger-based-uplink.md
View on GitHub# Trigger-Based (TB) Uplink Waveform
TB waveforms represent a single STA's uplink transmission on its assigned RU.
Use `RUSize` and `RUIndex` properties (not allocation indices). For MRU, pass
vectors.
## HE TB
```matlab
cfg = wlanHETBConfig;
cfg.ChannelBandwidth = 'CBW80';
cfg.RUSize = 242;
cfg.RUIndex = 1; % Must match ruInfo(cfgMU).RUIndices
cfg.NumTransmitAntennas = 1;
cfg.NumSpaceTimeStreams = 1;
cfg.MCS = 7;
cfg.ChannelCoding = 'LDPC';
psdu = getPSDULength(cfg);
bits = randi([0 1], psdu * 8, 1);
waveform = wlanWaveformGenerator(bits, cfg);
```
## EHT TB
```matlab
% EHT TB: single user on a 242+484 MRU
cfg = wlanEHTTBConfig;
cfg.ChannelBandwidth = 'CBW80';
cfg.RUSize = [242 484]; % MRU: vector of component RU sizes
cfg.RUIndex = [1 2]; % Must match ruInfo(cfgMU).RUIndices
cfg.MCS = 7;
cfg.NumSpaceTimeStreams = 1;
cfg.ChannelCoding = 'LDPC';
psdu = psduLength(cfg);
bits = randi([0 1], psdu * 8, 1);
waveform = wlanWaveformGenerator(bits, cfg, 'OversamplingFactor', 1.5);
fs = wlanSampleRate(cfg) * 1.5;
```
## UHR TB (with DRU)
UHR TB requires example helpers on the path (see
[uhr-waveform-generation.md](uhr-waveform-generation.md)).
Distributed Resource Units (DRU) spread subcarriers across a wider bandwidth
for frequency diversity. New in UHR.
```matlab
cfgMU = uhrMUConfig([64 64 64 64]);
info = ruInfo(cfgMU);
cfgTB = uhrTBConfig;
cfgTB.ChannelBandwidth = 'CBW80';
cfgTB.RUSize = 106;
cfgTB.RUIndex = info.RUIndices{1};
cfgTB.NumTransmitAntennas = 2;
cfgTB.NumSpaceTimeStreams = 2;
cfgTB.NumUHRLTFSymbols = 2; % Must be >= NumSpaceTimeStreams
cfgTB.MCS = 7;
cfgTB.ChannelCoding = 'ldpc';
cfgTB.DRU = true;
cfgTB.DistributionBandwidth = 'DBW20';
psduLen = psduLength(cfgTB);
txData = randi([0 1], psduLen * 8, 1);
waveform = uhrWaveformGenerator(txData, cfgTB);
```
### DRU Rules
| ChannelBandwidth | DistributionBandwidth | Valid RU sizes |
|-----------------|----------------------|----------------|
| CBW20 | DBW20 (only option) | 26, 52, 106 |
| CBW40 | DBW40 (only option) | 26, 52, 106, 242 |
| CBW80/160/320 | DBW20 | 26, 52, 106 |
| CBW80/160/320 | DBW40 | 26, 52, 106, 242 |
| CBW80/160/320 | DBW80 | 52, 106, 242, 484 |
Max 2 spatial streams for DRU.
## Important TB Rules
- **`RUIndex` must match `ruInfo` indices from the corresponding MU config.**
Query `ruInfo(cfgMU).RUIndices` — sequential numbering may overlap subcarriers.
- **LTF symbols >= total STS** across all users sharing the RU:
- HE: `NumHELTFSymbols`
- EHT: `NumEHTLTFSymbols`
- UHR: `NumUHRLTFSymbols`
- **PSDU length method matches the format:** HE uses `getPSDULength(cfg)`,
EHT/UHR use `psduLength(cfg)`.
- **Oversampling:** Pass `'OversamplingFactor'` to `wlanWaveformGenerator` and `wlanSampleRate(cfg)`.
- To simulate combined AP-receive, generate each STA's TB waveform independently,
zero-pad to equal length, and sum.
- **UHR DRU property is `DRU`**, not `DistributedRU`.
----
Copyright 2026 The MathWorks, Inc.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |