Creating a Multipass FIR Filter
The exercises that follow demonstrate the ease with which you can design, analyze, and generate outputs for a digital filter using Digital Filter Designer. Complete the exercises before you use Digital Filter Designer for your filter design tasks. Doing the exercises first will help you understand the basic features and conventions of the Digital Filter Designer and save you time later.
Feel free to go through the exercises at your own pace. Stop or digress at any time you wish, and pick up later where you left off. The exercises, like Digital Filter Designer, put you in control with an environment that is flexible enough to work the way you do.
This tutorial teaches you to design, implement, and generate outputs for a multipass FIR filter design using the following exercises:
- Exercise 1: Entering Design Specifications introduces you to the basics of entering the filter design specifications and the desired response and weighting specifications. After going through this exercise you should be able to create a filter design based upon your specifications.
- Exercise 2: Designing and Analyzing a Filter introduces you to the basics of analyzing a design. After going through this exercise you should be able to specify analysis options, design a digital filter, and generate analysis plots.
- Exercise 3: Implementing a Filter Design introduces you to the basics of implementing a filter design. After going through this exercise you should be able to specify implementation options, display filter coefficients, and generate a schematic from the filter design.
Response and Weighting Specifications
This exercise takes you through the design process for a 64-tap, symmetric, multipass FIR filter that uses the Frequency Weighted Least Squares design method. The specifications call for two passbands and three stopbands with a sampling frequency of 8 kHz. The desired magnitude response for this linear phase filter uses the following specifications:
| Frequency Band | Magnitude |
|---|---|
| 400 to 1200 Hz | 1.0 |
| 1600 to 2400 Hz | 1.0 |
| 0 to 400 Hz | 0 |
| 1200 to 1600 Hz | 0 |
| 2400 to 4000 Hz | 0 |
These specifications can be represented graphically as follows:

The desired weighting specifications for the magnitude response of this filter conform to the following specifications using the polynomial magnitude format:
| Frequency Band | Frequency | Weighting |
|---|---|---|
| 0 to 300 Hz | 2.5, 0.03125 | |
| 1 | 400 to 1200 Hz | 1 |
| 2 | 1300 to 1500 Hz | 5 |
| 3 | 1600 to 2400 Hz | 0.5, 0, 1.5625e-5 |
| 4 | 2500 to 4000 Hz | 1 |
The weighting specifications can be represented graphically as follows:

Keep in mind that weighting indicates the priority of desired magnitude response at the designated passband, stopband, or transition band.
Exercise 1: Entering Design Specifications
This exercise is made up of three sections. Each section takes you through the steps involved in a specific aspect of creating a digital filter design for a multipass FIR filter. The first section takes you through the process of launching Digital Filter Designer and creating a design file. The next two sections take you through the process of entering, saving, and printing the response and weighting specifications for the filter design.
Complete the following sections to create the filter design. At the end of this exercise, you will be familiar with the major features and ease-of-use advantages of using Digital Filter Designer to enter and verify specifications for a digital filter design.
- Create a filter design file
- Define the desired response
- Save and print specifications
Creating the Filter Design
Assume that your goal is to create a multipass FIR filter design using the Frequency Weighted Least Squares method. This section takes you through the process of launching Digital Filter Designer and creating a new design project. It ends with saving the design and printing a copy of your filter specifications.
| Note This exercise assumes that you have a working knowledge of Advanced Design System. For more information on the available features and functionality, refer to the Advanced Design System Schematic Capture and Layout manual. |
- Launch Advanced Design System.
Launch Advanced Design System, create a new signal processing design project, and open a Schematic window for a digital signal processing network design.

The Main window is used to create and manage projects and designs, while the Schematic window is used to actually create the design. - Launch Digital Filter Designer.
Choose Tools > Digital Filter > Start Digital Filter from the Schematic window menubar to launch Digital Filter Designer.

In addition to the Digital Filter Designer window, a Status window is displayed. Feedback messages on the progress of tasks you initiate are displayed in this window. - Verify that FIR is the currently selected filter type.

- Choose Multipass as the desired response type to create a multipass FIR filter design.
- Choose Least Squares as the desired design method.
When you choose Least Squares as the design method, you also need to specify the number of taps or filter order. Accept the default filter order of 64. - Specify the frequency unit of measure.
Use the drop-down list to choose Hz as the unit of measure for the response specifications. The frequency unit you specify is used automatically for any desired response values you enter subsequently.

- Enter 8 kHz as the sampling frequency for the filter. You can override a default unit of measure by entering a different unit of measure for a particular value.
- Enter the desired number of passbands.
Enter 2 as the desired number of passbands and press Tab to validate your choice. Doing so displays the Select Stopband Number dialog box, which you can use to specify the corresponding number of stopbands. Accept the default of 3 stopbands.

Defining the Desired Response
Now that you have defined a multipass FIR filter design using the Frequency Weighted Least Squares method, you can begin the process of entering the desired response specifications. This section takes you through the process of entering the desired response and weighting specifications using the Desired Response and Weighting Function tabs.

- Enter the desired response specifications.
Enter the following values for the low and high frequencies of the two passbands:Low Frequency High Frequency 400 Hz 1200 Hz 1600 Hz 2400 Hz The grayed-out low and high frequencies for the three stopbands should change to the following values:
Low Frequency High Frequency 0 Hz 400 Hz 1200 Hz 1600 Hz 2400 Hz 4000 Hz - Enter the weighting for the magnitude response specifications.
Click the Weighting Function tab. Enter 5 as the desired number of weightbands and press Tab to add the weightbands.

| Note To add weightbands when their specifications are similar to the desired response specifications, click Copy Desired Bands to copy the specifications from the desired response bands and create weightband specifications. You can then modify the specifications for each weightband, as desired. |
Enter the following values for the low and high frequencies and magnitudes of the five weightbands:
| Low Frequency | High Frequency | Magnitude |
|---|---|---|
| 0 Hz | 300 Hz | 2.5, 0.03125 |
| 400 Hz | 1200 Hz | 1 |
| 1300 Hz | 1500 Hz | 5 |
| 1600 Hz | 2400 Hz | 0.5, 0, 1.5625e-5 |
| 2500 Hz | 4000 Hz | 1 |
Saving and Printing the Specifications
Now that you have created a multipass FIR filter design using the Frequency Weighted Least Squares method and entered the desired response and weighting specifications, you can save your design specifications and verify their accuracy. This section takes you through the process of saving the design and printing a copy of your filter design specifications.
- Save the filter design.
Choose File > Save Filter Design and use the File Save As dialog box that is displayed to name and save the filter design specifications you have entered. - Print the specifications.
Choose File > Print Filter Design and use the Print dialog box that is displayed to print the filter design specifications you have just entered. Use the printout to verify the accuracy of what you have entered against the following specifications.Filter type : FIR Response type : Multipass Method type : Least_Squares Order : 64 Frequency unit: MHz Sampling frequency : 8 kHz Desired response specification: Amplitude format : Polynomial Number of passbands: 2 Number of stopbands: 3 Specification values: Stopband\[0\]: \(0.0 MHz, 400 Hz, \(0.0\), n/a, \(1, 0\)\) Passband\[0\]: \(400 Hz, 1200 Hz, \(1.0\), n/a, \(1, 0\)\) Stopband\[1\]: \(1200 Hz, 1600 Hz, \(0.0\), n/a, \(1, 0\)\) Passband\[1\]: \(1600 Hz, 2400 Hz, \(1.0\), n/a, \(1, 0\)\) Stopband\[2\]: \(2400 Hz, 4 kHz, \(0.0\), n/a, \(1, 0\)\) Weighting function specification: Amplitude format : Polynomial Number of weightbands: 5 Specification values: Weightband\[0\]: \(0.0 MHz, 300 Hz, \(2.5,0.03125\)\) Weightband\[1\]: \(400 Hz, 1200 Hz, \(1.0\)\) Weightband\[2\]: \(1300 Hz, 1500 Hz, \(5.0\)\) Weightband\[3\]: \(1600 Hz, 2400 Hz, \(0.5,0,1.5625e-5\)\) Weightband\[4\]: \(2400 Hz, 4 kHz, \(1.0\)\) Other parameters specifications: Compensation: unity Symmetricity: symmetric Conversion/Implementation data: Implementation structure: Direct Number of bits : 32 Implementation format : Floating_point Norm criterion : L_infinity
Exercise 2: Designing and Analyzing a Filter
This exercise is made up of two sections. Each section takes you through the steps involved in a specific aspect of designing and analyzing the multipass FIR digital filter. The first section takes you through the process of specifying the analysis options. The second section takes you through the process of designing the filter and displaying the analysis plots.
Complete the following sections to analyze the filter design. At the end of this exercise, you will be familiar with the major features and ease-of-use advantages of analyzing filter designs using Digital Filter Designer.
- Choose the analysis options
- Display the analysis plots
Choosing the Analysis Options
Assume that your goal is to set up the analysis options for the multipass FIR filter design that you created. This section takes you through the process of specifying the analysis options.
- Specify the analysis options.
Choose Design > Setup Analysis to display the Setup Analysis dialog box.

The Setup Analysis dialog box is used to define the three basic analysis options: the detail used to display results graphically, the plots to be displayed, and whether comparative data needs to be retained.
First enter 512 as the number of frequency points to be plotted. The higher the number of frequency points, the greater the response resolution.
Then select the option to plot the magnitude specifications within the frequency response plot. Choosing this option will enable you to see the specified shape and how closely the response adheres to it.
Click OK to specify the setup options and close the dialog box. - Disable the conversion options.
Choose Options > Disable/Enable Conversion to disable the implementation details for the filter design. When the implementation options are disabled, only the ideal filter analysis (using the full IEEE double precision or machine-defined standard) is performed.
Designing and Analyzing the Filter
Now that you have specified the analysis options, it is time to design the filter and see how closely it meets the desired response specifications. This section takes you through the process of designing the ideal filter and displaying the analysis plots.
- Design the filter and display the plots.
Choose Design > Design Filter to begin the process of designing the digital filter using the specifications and analysis options you have defined. Once the design process is complete, the analysis plots are displayed automatically in a Data Display window. In the example below, the Y-axis displays dB.

Exercise 3: Implementing a Filter Design
This exercise is made up of two sections. Each section takes you through the steps involved in a specific aspect of implementing the digital filter design for a multipass FIR filter. The first section provides an overview of the implementation options. The second section takes you through the process of generating a schematic from the filter design.
Complete the following sections to generate a practical filter design. At the end of this exercise, you will be familiar with the major features and ease-of-use advantages of implementing filter designs using Digital Filter Designer.
- Choose the implementation options
- Generate a Schematic
Choosing the Implementation Options
Assume that your goal is to set up the implementation options for the multipass FIR filter design that you created. This section takes you through the process of specifying the implementation options.
- Activate the implementation options.
Choose Options > Disable/Enable Conversion and select the implementation details for the filter design. Once the implementation options are activated, the ideal filter analysis (using the full IEEE double precision or machine-defined standard) can be compared to a scaled analysis using the specified numeric format and precision. - Choose the implementation structure.
Choose Direct Transpose as the implementation structure. A direct transpose structure can be used to implement symmetric FIR filters with half as many multipliers as there are coefficients.

- Define the desired numeric format and bitwidth.
Select Fixed Point as the numeric format. A fixed-point format scales (quantizes) the filter coefficients based upon the bitwidth you enter.
Once you select a fixed-point format, enter 16 as the desired bitwidth.

- Design the filter and display the plots.
Choose Design > Design Filter to begin the process of designing the digital filter using the implementation options you have specified. Once the design process is complete, the Data Display window is updated automatically to display both the ideal and the scaled plots.

As you can see, the performance of the scaled filter closely approximates the performance of the ideal filter.
Generating a Schematic
Now that you have designed a filter using the implementation options, you can generate a schematic from the filter design. This section takes you through the process of generating a schematic from a digital filter design.
- Save the filter design.
Choose File > Save Filter Design to save the filter design you have created. - Display the filter coefficients.
Choose View > Coefficients to display the coefficients for the filter you have designed. The coefficients are displayed in a new table within the Data Display window.
Click the table to select it and choose Edit > Item Options from the Data Display menubar to display the Insert Plot dialog box. Click the Plot Options tab and enter 15 in the # of Decimal Digits field.

Click OK to dismiss the dialog box and display the table of coefficients. The first column displays the coefficient number, the second column displays coefficients for an ideal or floating-point implementation, while the third column displays coefficients for a scaled or fixed-point implementation.

Note To display the rest of the coefficients, enlarge the window or use the scroll bars. For details on using the Data Display window, refer to the Data Display online help or the Schematic Capture and Layout manual. - Generate a schematic for the filter design.
Choose Design > Generate Schematic from the Digital Filter Designer menubar to display the Generate Schematic dialog box.

Enter a name for the scaled coefficient schematic to be generated and click OK to generate and display the schematic in a new Schematic window within Advanced Design System.

- Save the schematic.
Choose File > Save Design As from the Advanced Design System Schematic window menubar and use the dialog box that is displayed to save the schematic using the desired name and location. - Save the filter design and exit Digital Filter Designer.
Choose File > Save As from the Digital Filter Designer menubar and use the dialog box that is displayed to save the filter design file using the desired name and location.
Choose File > Exit from the Digital Filter Designer menubar to exit the application.
Choose File > Exit Advanced Design System from either the Schematic or the Main window menubar to exit Advanced Design System.
Congratulations. This marks the end of the tutorial exercises for Digital Filter Designer. The steps you have gone through in this tutorial make up a majority of the tasks you are likely to use in your day-to-day filter design tasks.
If you have completed all three exercises, you have created, analyzed, and implemented a multipass FIR filter that conforms to the given desired response specifications.
Please refer to the online documentation for details on the tasks you have completed in these exercises and the other features you can use to design a digital filter using Digital Filter Designer.
For more information on using either the Advanced Design System or Data Display, refer to their online documentation.
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()