simulink-streaming-dsp

Build frame-based streaming DSP models in Simulink using DSP System Toolbox blocks.

1.0k|98|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-streaming-dsp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: simulink-streaming-dsp
Source: https://github.com/matlab/simulink-agentic-toolkit/tree/main/skills-catalog/signal-processing/simulink-streaming-dsp
Command: npx skills add https://github.com/matlab/simulink-agentic-toolkit --skill simulink-streaming-dsp

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Building streaming signal processing models in Simulink often produces silent numerical errors: the model compiles and runs, but outputs wrong values due to sample-vs-frame mismatches, wrong block choices, or missing anti-aliasing filters. This Skill encodes the block selection rules, frame-based configuration checklist, and timing math needed to build correct streaming DSP models.

Core Features & Use Cases

  • Correct Block Selection: Chooses DSP System Toolbox blocks (From Multimedia File, Time Scope, Spectrum Analyzer, dsparch4 Discrete FIR Filter) over generic Simulink equivalents that silently corrupt framed signals.
  • Frame-Based Configuration: Enforces InputProcessing settings, column-vector signal dimensions, and fixed-step discrete solver configuration on every model.
  • Task References: Provides on-demand references for buffering/multirate timing, rate conversion (FIR Decimation vs Downsample), tunable filtering with the two-block Design-to-Implementation pattern, variable-size signals, and visualization.
  • Use Case: Build an audio processing model that reads a multimedia file, applies a runtime-tunable lowpass FIR filter with a Parameter Smoother, and displays before/after spectra on a Spectrum Analyzer.

Quick Start

Build a Simulink model that reads an audio file, applies a frame-based FIR lowpass filter, and shows the result on a Spectrum Analyzer.

Frequently Asked Questions about simulink-streaming-dsp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a frame-based streaming DSP model in Simulink?

Use DSP System Toolbox blocks: a source like From Multimedia File or Sine Wave with SamplesPerFrame set, the dsparch4 Discrete FIR Filter for processing, and Time Scope or Spectrum Analyzer as sinks. Set the solver to Fixed-step Discrete and enable ShowLineDimensions to verify signal sizes.

What is the difference between the DSP and Simulink Discrete FIR Filter blocks?

The dsparch4 Discrete FIR Filter defaults InputProcessing to frame-based, which is correct for streaming. The simulink/Discrete version defaults to sample-based, treating each frame element as a separate channel and silently producing wrong output.

Should I use Downsample or FIR Decimation for sample rate conversion?

Use FIR Decimation, which lowpass-filters before dropping samples to prevent aliasing. Downsample just discards every Kth sample, causing aliasing. For fractional rate changes like 44.1 to 48 kHz, use the Sample-Rate Converter block.

Why does my Simulink model run but produce wrong output values?

The most common cause is a sample-based InputProcessing default on a filter block, which treats a 256-sample frame as 256 independent channels. Set InputProcessing to Columns as channels (frame based) or use the DSP library version of the block.

Can the Buffer block convert variable-size signals to fixed-size frames?

No, the Buffer block requires a compile-time fixed input frame size and rejects variable-size input. Use dsp.AsyncBuffer inside a MATLAB Function block to accumulate variable-length chunks and emit fixed-size frames.

How do I build a runtime-tunable filter in Simulink?

Use the two-block pattern: a Filter Design block (e.g., Lowpass FIR Filter Design) feeding coefficients into a Discrete FIR Filter or Second-Order Section Filter. Add a Parameter Smoother on the cutoff input to prevent audio clicks during parameter changes.