Test on Digital Signal Processing with MATLAB and Python

Digital Signal Processing with MATLAB and Python Guide

Question 1 of 50%

The MATLAB 'filter' function or Python 'lfilter' function can be directly used for online physical filter implementation.

Test: Digital filter design, Digital signal processing libraries

20 questions

Question 1: The MATLAB 'filter' function or Python 'lfilter' function can be directly used for online physical filter implementation.

A. Ano

B. Ne

Explanation: The study materials state that the MATLAB 'filter' function and Python 'lfilter' function are used to obtain the output signal offline. For online implementation, a suitable form like Canonical form I and a set of difference equations are needed, or code generated by Filter Designer may require slight modifications for physical implementation.

Question 2: The provided figures illustrating the frequency response of a second-order filter demonstrate a low-pass filter characteristic.

A. Ano

B. Ne

Explanation: The magnitude plots on slide 7, titled 'Frequency response of second order LPF', and slide 9, titled 'Frequency Response of 2nd order filter', both show that the filter allows low frequencies to pass while attenuating higher frequencies, which is characteristic of a low-pass filter.

Question 3: Which of the following functions from the `scipy.signal` library in Python are used for digital filter design?

A. iirdesign

B. lfilter

C. firwin

D. freqz

Explanation: The study materials list `iirdesign` for analog and IIR digital filter design based on pass/stop limits, and `firwin` for FIR filter design using a window. `lfilter` is used for filter implementation (applying a filter to data), and `freqz` is used for reviewing filter response (frequency response).

Question 4: Which parameters are essential when designing an IIR filter using the `scipy.signal.iirdesign` function in Python, according to the provided study materials?

A. Pass-band edge frequency (`fpass`)

B. Filter order (`N`)

C. Maximum loss in pass-band (`Apass`)

D. Window type (`window`)

Explanation: The `scipy.signal.iirdesign` function requires the pass-band edge frequency (`fpass`), stop-band edge frequency (`fstop`), maximum loss in pass-band (`Apass`), and minimum attenuation in stop-band (`Astop`). Filter order is typically an output or derived, not an input, for this function, and window type is relevant for FIR filter design, not IIR design using limits.

Question 5: When using the `freqs` function to calculate the frequency response of an analog filter, the vector of numerator coefficients should start with the lowest order term.

A. Ano

B. Ne

Explanation: The study materials state that the `freqs` function takes a "vector of numerator coefficients (starting the highest order)", not the lowest.