0
0
Simulinkdata~10 mins

DSP System Toolbox blocks in Simulink - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - DSP System Toolbox blocks
Input Signal
DSP Block Selection
Block Processing
Output Signal
Visualization or Further Processing
The flow shows how an input signal passes through a selected DSP System Toolbox block for processing, then outputs the processed signal for visualization or further use.
Execution Sample
Simulink
% Simulink model snippet
% Input signal -> FIR Filter block -> Output
inputSignal = sin(2*pi*0.1*(0:99));
filteredSignal = dsp.FIRFilter('Numerator',ones(1,5)/5).step(inputSignal);
This code applies a simple FIR filter block from DSP System Toolbox to smooth an input sine wave signal.
Execution Table
StepActionInput Signal SampleBlock UsedOutput Signal Sample
1Input signal generatedsin(0)=0NoneN/A
2Input signal generatedsin(0.2*pi)=0.5878NoneN/A
3FIR Filter block initializedN/AFIR Filter (5 taps)N/A
4Filter applied to first 5 samples[0, 0.5878, 0.9511, 0.9511, 0.5878]FIR Filter0.6156 (average)
5Filter applied to next samples[0.5878, 0.9511, 0.9511, 0.5878, 0]FIR Filter0.6156 (average)
6Filter applied to last samples[0.9511, 0.9511, 0.5878, 0, 0]FIR Filter0.4980 (average)
7Output signal readyN/AFIR FilterFiltered signal array
8End of processingN/AN/AN/A
💡 All input samples processed through FIR Filter block, output signal produced.
Variable Tracker
VariableStartAfter Step 4After Step 5After Step 6Final
inputSignalempty[0, 0.5878, 0.9511, 0.9511, 0.5878][0.5878, 0.9511, 0.9511, 0.5878, 0][0.9511, 0.9511, 0.5878, 0, 0]full sine wave array
filteredSignalempty0.61560.61560.4980full filtered array
Key Moments - 2 Insights
Why does the output signal start producing values only after the first few input samples?
Because the FIR filter uses a window of 5 samples, it needs enough input data to compute the first output value, as shown in execution_table steps 4-6.
What happens if the input signal length is shorter than the filter length?
The filter cannot fully apply because it requires enough samples equal to its tap length; output will be incomplete or zero until enough samples arrive.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the output signal sample at step 4?
A0.6156
B0.5878
C0.9511
D0.4980
💡 Hint
Check the 'Output Signal Sample' column at step 4 in the execution_table.
At which step does the FIR Filter block get initialized?
AStep 1
BStep 5
CStep 3
DStep 7
💡 Hint
Look at the 'Action' column for block initialization in the execution_table.
If the filter length changed from 5 to 3 taps, how would the output at step 4 change?
AOutput would remain the same
BOutput would be average of 3 samples instead of 5
COutput would be zero
DFilter would not work
💡 Hint
Consider how FIR filter output depends on the number of taps as shown in variable_tracker.
Concept Snapshot
DSP System Toolbox blocks process signals step-by-step.
Input signal flows into a block (e.g., FIR Filter).
Block applies its algorithm using internal parameters.
Output signal is produced after processing.
Filter length affects how soon output appears.
Blocks can be chained for complex processing.
Full Transcript
This visual execution shows how DSP System Toolbox blocks in Simulink process signals. The input signal is generated as a sine wave. The FIR Filter block is initialized with 5 taps. The filter processes the input signal in windows of 5 samples, producing output values starting after enough samples are available. Variables track input and output signal values step-by-step. Key moments clarify why output starts after initial samples and what happens if input is too short. The quiz tests understanding of output values, block initialization, and effect of filter length changes.