Application Center - Maplesoft

App Preview:

Digital Filter Design

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application



Digital Filter Design 

? Maplesoft, a division of Waterloo Maple Inc., 2008 

This application demonstrates the design and analysis of a discrete filter.  

A Finite Impulse Response (FIR) filter is designed and applied to an input signal stored in a file. Four different types of filters are illustrated: low pass, high pass, band pass, and band stop. The effect of the filter is displayed in a frequency domain. 



Input Signal 


Finite Impulse Response (FIR) Filter Design 


Filtered Output 


A FIR filter is derived from the impulse response of the desired filter and then sampled to convert it to a discrete time filter. The infinitely long impulse response must be truncated to be implemented. If the impulse response is nonzero for negative time (the filter is anti-causal) the response must also be shifted to the right until all of the impulse response coefficients are located in the positive time region. 

For example, consider the low pass filter. An ideal filter has the impulse response defined by the sinc function: 

`/`(`*`(sin(x)), `*`(x)) 

The diagram indicates the impulse response in blue. After the impulse response has been truncated, shifted, and sampled, the FIR filter coefficients are shown in red. 

Input Signal 

To load a WAV file as the input signal, click the Load File button, which will open a file dialog box. The sampling frequency is extracted from the file, and once the file is loaded, the time and frequency responses are plotted. 


Frequency Spectrum of the Input Signal 

Load File 

Embedded component 


Sampling frequency (kHz): 22.05 kHz 

File name: none 

Duration: 0.91 seconds 

Number of samples: 20000 samples 


The Input Signal in Time Domain 

Embedded component 

Finite Impulse Response (FIR) Filter 

This section allows you to design different types of filters. Select the number of filter elements, the cut-off frequencies, and the filter type. Then, click the Make Filter button to create the filter, using the specified parameters, and to plot the frequency response of the filter. 


To view the filter coefficients, click the Table or Plot buttons. 


Frequency Spectrum of the Filter 


Embedded component 

Number of elements:  

Embedded component 

Cut-off frequencies: 

lower Embedded component 

upper Embedded component 

Filter type: Embedded component 


View Filter Coefficients 



Filter the Input Signal 

Use the two dials below to select a subsection of the signal to filter. 



Duration: 0.73 seconds 

Number of samples: 15999 

Embedded component 

0.09 seconds 

Selected Signal 

Embedded component 


Embedded component 

0.82 seconds 


Click the Execute Filter button to apply the designed filter to the selected signal segment. The frequency response of the input and output are shown. 


To analyze the frequency response over time, the input signal segment is divided into frames of a specified length. The frequency spectrum is calculated for each frame, and displayed as a surface plot with time and frequency as the axes.  


Frame length (seconds): Embedded component 

Frequency Response of the Input and Output Signals 

Embedded component 



Number of frames: 36 

Frequency-Time Response for the Input Signal 


Frequency-Time Response for the Output Signal 

Embedded component 


Embedded component