SkillAgentSearch skills...

matlab-generate-5g-waveform

Generate 3GPP-compliant 5G NR downlink and uplink baseband waveforms. Use to create NR signals, test model (TM) waveforms, fixed reference channels (FRC), test and measurement (T&M) signals, or test vectors for conformance testing.

Install / Use

npx skills add matlab/matlab-agentic-toolkit --skill matlab-generate-5g-waveform

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

93/100

Supported Platforms

Universal

Our assessment of matlab-generate-5g-waveform

matlab-generate-5g-waveform scores 93/100 on our quality scale, 817th of 4,646 Development & Engineering skills we index (top 18%).

Its SKILL.md is 20 KB long, well organised into 28 sections with 21 code examples: a thorough specification that gives an agent plenty to work with.

With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 18 days ago, so matlab-generate-5g-waveform is actively maintained.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

matlab-generate-5g-waveform compared with similar skills

All 4 of these similar skills score higher than matlab-generate-5g-waveform; compare them before choosing.

SkillScoreStarsUpdatedFormat
matlab-generate-5g-waveform (this skill)by matlab931.1k18d agoSKILL.md
ai-job-searchby MadsLorentzen10044.9ktodayCLAUDE.md
claude-howtoby luongnv8910041.7k3d agoCLAUDE.md
algorithmic-artby anthropics100177.9k11d agoSKILL.md
pptxby anthropics100177.9k11d agoSKILL.md

Frequently asked questions

How do I install matlab-generate-5g-waveform?
Run npx skills add matlab/matlab-agentic-toolkit --skill matlab-generate-5g-waveform. The install tabs above show the steps for each supported agent.
Which AI agents does matlab-generate-5g-waveform work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is matlab-generate-5g-waveform safe to use?
It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is matlab-generate-5g-waveform still maintained?
The repository was last updated 18 days ago, so matlab-generate-5g-waveform is actively maintained.

name: matlab-generate-5g-waveform description: > Generate 3GPP-compliant 5G NR downlink and uplink baseband waveforms. Use to create NR signals, test model (TM) waveforms, fixed reference channels (FRC), test and measurement (T&M) signals, or test vectors for conformance testing. Covers configuring data, control, and broadcast channels and signals: PDSCH, PUSCH, PDCCH, PUCCH, SRS, SSBurst, CSI-RS, DM-RS, PT-RS, CORESET, and BWP parameters including bandwidth, subcarrier spacing (SCS), modulation (QPSK, QAM), numerology, FR1, FR2, TDD, FDD, and multi-bandwidth-part setups. Use for signal generation, RF instrument playback, or IQ baseband synthesis. Requires 5G Toolbox. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "1.1"

Generate 5G NR Waveforms

Generate standard-compliant 5G NR downlink and uplink waveforms for test and measurement, simulation, and verification using nrWaveformGenerator.

When to Use

  • Generate a 5G, NR, or New Radio waveform
  • Create DL waveforms with PDSCH, PDCCH, SSBurst, CSI-RS
  • Create UL waveforms with PUSCH, PUCCH, SRS
  • Generate NR test model (TM) or fixed reference channel (FRC) waveforms
  • Configure waveform parameters: bandwidth, SCS, modulation, power levels
  • Create multi-bandwidth-part waveforms

When Not to Use

  • Channel modeling or propagation — use nrCDLChannel, nrTDLChannel
  • Receiver processing or decoding — use nrPDSCHDecode, nrDLSCHDecoder
  • Link-level simulation end-to-end

API Choice

| Need | API | Notes | |------|-----|-------| | Standard test model (TM) | hNRReferenceWaveformGenerator | Predefined 3GPP configs. See test-models-and-frc.md | | Fixed reference channel (FRC) | hNRReferenceWaveformGenerator | DL and UL FRCs | | Custom DL waveform | nrDLCarrierConfig + nrWaveformGenerator | Full control over all DL channels | | Custom UL waveform | nrULCarrierConfig + nrWaveformGenerator | Full control over all UL channels |

Do not use primitive-level functions (nrCarrierConfig + nrPDSCH + nrOFDMModulate) for waveform generation. These are for individual channel signal processing, not waveform construction. nrWaveformGenerator handles channel multiplexing, power scaling, and OFDM modulation correctly.

Workflow

Custom DL or UL Waveform

  1. Create carrier config using the simplified constructor (R2026a+):
cfg = nrDLCarrierConfig('FR1', 20, 30);  % DL: FR1, 20 MHz, 30 kHz SCS
cfg = nrULCarrierConfig('FR1', 20, 15);  % UL: FR1, 20 MHz, 15 kHz SCS

This auto-populates SCSCarriers, BandwidthParts, SSBurst/CORESET (DL only), and a default PDSCH or PUSCH with valid parameters sized to the bandwidth.

Requires R2026a or later. On earlier releases, use the manual approach shown in the Narrow Bandwidth DL pattern — create nrDLCarrierConfig with no arguments and set SCSCarriers, BandwidthParts, and channels explicitly.

Constructor side effect: For DL, the constructor adds a dedicated SCS carrier for SSBurst if the requested SCS doesn't match the default SSB numerology. For example, nrDLCarrierConfig('FR1', 5, 30) creates a hidden 15 kHz carrier (20 RBs) for SSBurst Case A. Use manual config instead when you need exact control over the number of SCS carriers.

  1. Customize channels — set only the properties the task requires; never restate a default (NumSubframes = 10, Modulation = 'QPSK', Enable = true, RNTI = 1). Worse, never overwrite a constructor-placed value with a different one (e.g. forcing a BWP's NStartBWP to 0 when the constructor centered it at 1) — that breaks the validated layout. Exception: a value the user asked for — write it with a comment.
cfg.PDSCH{1}.Modulation = '64QAM';       % non-default (the default is QPSK)
cfg.NumSubframes = 20;                    % 20 subframes = 20 ms; the default is 10

Power and DMRSPower (dB) are optional. DMRSPower is DM-RS power relative to data REs; per TS 38.214 Table 4.1-1 it is boosted 0, 3, or 4.77 dB for 1, 2, or 3 CDM groups without data. On R2026b+, DMRSPower = [] applies this automatically.

  1. Oversample (optional) — set sample rate before generation for DAC playback:
cfg.SampleRate = 245.76e6;  % Oversampled rate (default: minimum for the BW)
  1. Validate — check the critical rules in the next section before generating.

  2. Generate and verify — validateConfig checks structural rules but does not detect channel conflicts (e.g., overlapping PDSCH/CSI-RS, CSI-RS/SSBurst). Always call nrWaveformGenerator to catch these:

[waveform, info] = nrWaveformGenerator(cfg);
  1. Visualize — open the config in the 5G Waveform Generator app:
openInGenerator(cfg);
  1. Inspect output:
sr = info.ResourceGrids(1).Info.SampleRate;
grid = info.ResourceGrids(1).ResourceGridBWP;

Test Model or FRC

hNRReferenceWaveformGenerator is an example helper — set up a working directory with setupExample before use (no path modification needed):

[exDir, ~] = setupExample('5g/NRTestModelWaveformGenerationExample', fullfile(tempdir, 'tmfrc'));
workDir = fullfile(tempdir, 'myTMWaveform');
mkdir(workDir);
copyfile(fullfile(exDir, '*'), workDir);
cd(workDir);

Then generate. Pass only the arguments the task specifies — trailing arguments (duplex mode, cell identity) default to 'FDD' and 1; omit them unless the task requires a specific value:

% Model, bandwidth, and SCS only — duplex mode defaults to 'FDD', ncellid to 1
wavegen = hNRReferenceWaveformGenerator('NR-FR1-TM1.1', '10MHz', '15kHz');
[waveform, waveinfo] = generateWaveform(wavegen);
displayResourceGrid(wavegen);

See references/test-models-and-frc.md for all valid model names and options.

Key Functions

| Function / Class | Purpose | |-----------------|---------| | nrWaveformGenerator | Generate time-domain waveform from carrier config | | nrDLCarrierConfig | DL carrier config (wraps all DL channels) | | nrULCarrierConfig | UL carrier config (wraps all UL channels) | | nrSCSCarrierConfig | SCS carrier: SubcarrierSpacing, NSizeGrid, NStartGrid | | nrWavegenBWPConfig | BWP: SubcarrierSpacing, NSizeBWP, NStartBWP | | nrWavegenPDSCHConfig | PDSCH: Modulation, Power, DMRSPower (see DM-RS power note), PRBSet | | nrWavegenPUSCHConfig | PUSCH: Modulation, Power, DMRSPower (see DM-RS power note) | | nrWavegenPUCCH0Config .. nrWavegenPUCCH4Config | PUCCH formats 0–4 | | nrWavegenSRSConfig | SRS config | | nrWavegenPDCCHConfig | PDCCH config (links via SearchSpaceID) | | nrCORESETConfig | CORESET: FrequencyResources, Duration | | nrSearchSpaceConfig | Links PDCCH to CORESET via IDs | | nrWavegenSSBurstConfig | SS burst: BlockPattern, TransmittedBlocks | | nrWavegenCSIRSConfig | CSI-RS config | | hNRReferenceWaveformGenerator | Standard TMs and FRCs (example helper) | | validateConfig | Check structural rules (method on carrier config) | | openInGenerator | Open config in 5G Waveform Generator app |

If you need to verify property names, check valid values for a config object, or look up parameters not covered in this skill, consult the online documentation links in references/documentation-links.md.

Do not mix API levels. These primitive objects are incompatible with nrWaveformGenerator:

| Use with nrWaveformGenerator | Do not use with nrWaveformGenerator | |-------------------------------|--------------------------------------| | nrDLCarrierConfig / nrULCarrierConfig | nrCarrierConfig | | nrWavegenPDSCHConfig | nrPDSCHConfig | | nrWavegenPUSCHConfig | nrPUSCHConfig |

Critical Rules

These parameter constraints cause the most errors. Check all of them before calling nrWaveformGenerator.

Set Only What the Task Requires

Configure the minimum set of properties. Do not restate a value the constructor or object already holds (RNTI = 1, NumLayers = 1, CyclicPrefix = 'normal', BlockPattern = 'Case A', a BandwidthPartID or RBOffset equal to its default, an NStartGrid/NStartBWP the constructor set). Do not set cosmetic or auto fields (Label, NCellID, WindowingPercent, an explicit SampleRate = []). Do not set Modulation, DM-RS, or NumLayers unless the prompt names them. Enabling a component the prompt asks for (CSIRS.Enable = true, SSBurst.Enable = true) is required — that is not over-config. A comment explaining a default is fine; assigning it is not.

NSizeGrid Must Match Channel Bandwidth

Look up NSizeGrid from the bandwidth tables. The simplified constructor (R2026a+) handles this automatically. To look up values programmatically:

nrDLCarrierConfig.FR1BandwidthTable
nrDLCarrierConfig.FR2BandwidthTable

BWP Must Fit Within SCS Carrier

NStartBWP >= NStartGrid
NStartBWP + NSizeBWP <= NStartGrid + NSizeGrid

The BWP SubcarrierSpacing must exactly match one SCS carrier's SubcarrierSpacing.

CORESET Must Fit Within BWP

Each bit set to 1 in FrequencyResources allocates 6 RBs. Total must not exceed NSizeBWP:

6 * sum(FrequencyResources) <= NSizeBWP

Max bits to set: floor(NSizeBWP / 6). For narrow bandwidths:

| NSizeBWP | Max bits | Example FrequencyResources | |----------|----------|---------------------------| | 11 | 1 | [1 zeros(1,44)] | | 24 | 4 | [1 1 1 1 zeros(1,41)] | | 51 | 8 | [ones(1,8) zeros(1,37)] |

SSB Carrier Must Be at Least 20 RBs

The SCS carrier at the SSB numerology must have NSizeGrid >= 20.

| BlockPattern | SSB SCS | |-------------|---------| | Case A | 15 kHz | | Case B | 30 kHz | | Case C | 30 kHz | | Case D | 120 kHz | | Case E | 240 kHz |

When the user does not specify SSB parameters, choose a BlockPattern that matches the user's SCS carrier so no extra carrier is needed: 15 kHz → Case A, 30 kHz → Case B, 60 kHz → Case B (FR1; add a 30 kHz carrier if none exists), 120 kHz → Case D.

When the user explicitly requests SSB parameters that require a different SCS than the main carrier, add a dedicated SCS carrier for the SSB:

% Example: user wants Case A (15 kHz SSB) on a 30 kHz carrier
scsSSB = nrSCSCarrierConfig;
scsSSB.SubcarrierSpacing = 15;
scsSSB.NSizeGrid = 20;        % Minimum for SSB
cfg.SCSCarriers{end+1} = scsSSB;
cfg.SSBurst.BlockPattern = 'Case A';

Disable SSBurst (cfg.SSBurst.Enable = false) only when the carrier is too narrow to support any SSB (e.g., 5 MHz / 30 kHz → 11 RBs at 30 kHz, no room for a 20-RB carrier at any SSB numerology).

Point A Centering Constrains Multi-Carrier Layouts

When multiple SCS carriers coexist, Point A is positioned so the highest-SCS carrier is centered within the channel bandwidth, so the lower-SCS carrier may need fewer RBs than the bandwidth table maximum (e.g. 40 MHz with a full 30 kHz carrier of 106 RBs fits only 214 RBs at 15 kHz, not the table's 216). Call validateConfig(cfg) and reduce NSizeGrid if needed.

CSI-RS Must Not Conflict With Other Channels

Within the same BWP, nrWaveformGenerator automatically reserves REs for CSI-RS — conflicts only arise between DM-RS and CSI-RS. Across different BWPs that overlap in frequency, CSI-RS defaults span the full BWP and can collide with PDSCH, PDCCH, or SSBurst. Fix with NumRB and RBOffset:

csirs1 = nrWavegenCSIRSConfig;   % targets BWP 1 (BandwidthPartID default 1 — don't restate it)
csirs1.NumRB = 106;       % Match PDSCH1 frequency region
csirs1.RBOffset = 0;
csirs1.SymbolLocations = 6;  % Avoid PDCCH symbols 0-2

csirs2 = nrWavegenCSIRSConfig;
csirs2.BandwidthPartID = 2;  % Set BandwidthPartID only where it differs from 

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryDevelopment
Updated18d ago
Forks134

Languages

MATLAB

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium