0
0
Simulinkdata~10 mins

DSP System Toolbox blocks in Simulink - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a lowpass FIR filter block using DSP System Toolbox.

Simulink
lpFilt = dsp.FIRFilter('Numerator', [1]);
Drag options to blanks, or click blank then click option'
A[0 1 0 1 0]
B[0.2 0.2 0.2 0.2 0.2]
C[1 2 3 2 1]
D[1 0 0 0 1]
Attempts:
3 left
💡 Hint
Common Mistakes
Using coefficients that do not sum to 1.
Using coefficients that create a highpass filter instead.
2fill in blank
medium

Complete the code to create a spectrum analyzer block with a sample rate of 1000 Hz.

Simulink
specAnalyzer = dsp.SpectrumAnalyzer('SampleRate', [1]);
Drag options to blanks, or click blank then click option'
A1000
B500
C2000
D50
Attempts:
3 left
💡 Hint
Common Mistakes
Using a sample rate different from the signal's actual rate.
Confusing sample rate with frequency resolution.
3fill in blank
hard

Fix the error in the code to create a decimator block with a decimation factor of 4.

Simulink
decim = dsp.Decimator('DecimationFactor', [1]);
Drag options to blanks, or click blank then click option'
A4
B3
C2
D5
Attempts:
3 left
💡 Hint
Common Mistakes
Using a decimation factor that does not match the desired downsampling.
Using a non-integer decimation factor.
4fill in blank
hard

Fill both blanks to create a bandpass filter with lower cutoff 100 Hz and upper cutoff 300 Hz.

Simulink
bpFilt = dsp.BandpassFilter('LowerCutoffFrequency', [1], 'UpperCutoffFrequency', [2]);
Drag options to blanks, or click blank then click option'
A100
B200
C300
D400
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping lower and upper cutoff frequencies.
Using frequencies outside the signal bandwidth.
5fill in blank
hard

Fill all three blanks to create a variable bandwidth filter with center frequency 500 Hz, bandwidth 200 Hz, and sample rate 2000 Hz.

Simulink
varFilt = dsp.VariableBandwidthFilter('CenterFrequency', [1], 'Bandwidth', [2], 'SampleRate', [3]);
Drag options to blanks, or click blank then click option'
A400
B500
C2000
D200
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up bandwidth and center frequency values.
Using incorrect sample rate.