|
DSPLib GUI Users Guide
v1.00.00.03
|
Filter design in DSPLib GUI is implemented using the Filter Structure and Design Specifications panels on the left-hand side side of the GUI. There are four primary components of the filter structure design:
The bottom design panel has options specific to the type of filter. For FIR functions, four types of filter are supported: bandpass, lowpass, highpass, and stopband. For each of these four types, five different windowing methods exist, each with their own windowing properties attached to a sinc function. For IIR filters, the GUI supports code generation given existing parameters for both Biquad DF1 and Biquad DF2 filter types.
FIR functions Lowpass and highpass FIR filters require only two design parameters: order and the normalized cutoff frequency Wc. The normalized frequency can target (0, 1) uninclusive, where 0 is 0 Hz and 1 is the Nyquist frequency. Bandpass and highpass functions have an additional Wc2 parameter, where 0 < Wc < Wc2 < 1. The filter will then generate Order + 1 coefficients, plus a zero padding coefficient at the end to create an even number of coefficients, Order + 2, for compatibility with LEA alignment on the MSP430 peripheral. It's important to note that the order of the filter must be between 8 and 500, inclusive.
The filter coefficients are generated in two parts: one, by creating a windowed sinc function with the target profile specified by the filter type. Next, the windowed sinc function's weights are elementwise multiplied by the windowing function specified by the method type. The windowed sinc functions exist in the following capacity:
Filter Order
Current impulse
if bandpass or stopband
![$Window_{LP}[n] = sin(2*pi*f_{t}(n-M/2))/(pi*(n-M/2)), n!= M/2$](form_4.png)
![$Window_{LP}[n] = 2*f_{t}, n=M/2$](form_5.png)
![$Window_{HP}[n] = -sin(2*pi*f_{t}(n-M/2))/(pi*(n-M/2)), n!= M/2$](form_6.png)
![$Window_{HP}[n] = 1-2*f_{t}, n= M/2$](form_7.png)
![$Window_{BP}[n] = sin(2*pi*f_{t2}(n-M/2))/(pi*(n-M/2)) $](form_8.png)

![$Window_{BP}[n] = 1-2*(f_{t} - f_{t2}), n= M/2$](form_10.png)
![$Window_{SB}[n] = sin(2*pi*f_{t1}(n-M/2))/(pi*(n-M/2)) $](form_11.png)

![$Window_{SB}[n] = 1-2*(f_{t2} - f_{t1}), n= M/2$](form_13.png)
Next, the type of windowing response is chosen by the users, and vary according to the following equations.
![$Rectangular[n] = 1$](form_14.png)
![$Bartlett[n] = 1 - 2|n-M/2|/M$](form_15.png)
![$Hanning[n] = .5 - .5cos(2*pi*n/M)$](form_16.png)
![$Hamming[n] = .54 - .46cos(2*pi*n/M)$](form_17.png)
![$Blackman[n] = .42 - .5cos(2*pi*n/M) + .08cos(4*pi*n/M)$](form_18.png)
The final coefficient generation is accomplished by elementwise multiplying the windowing response by the sinc function.
For IIR filters, the single biquad limitation only allows for user input, and the design tool is in place to allow easy generation of parameter structure and initialization; the GUI design tool will replicate the input coefficients into DSPLib code.