digital filters - university of victoriadsp/help/usersguide.pdflatest edition digital filters,...

71
FILTERS DIGITAL ANDREAS ANTONIOU ANALYSIS, DESIGN, AND SIGNAL PROCESSING APPLICATIONS

Upload: others

Post on 25-Aug-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

FILTERSDIGITAL

ANDREASANTONIOU

ANALYSIS, DESIGN, AND SIGNAL PROCESSING APPLICATIONS

Page 2: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

USER’S GUIDE FOR D-FILTER

(Revision Date: 31 Jul, 2018)

Copyright c© 2018 Andreas Antoniou

Page 3: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 3

SUMMARY

D-Filter is a Windows-based DSP software package that can be used toanalyze, design, and realize digital filters, and also to analyze discrete-time signals. The program can analyze recursive (IIR) and nonrecursive(FIR) filters in the time and frequency domains. It implements mostof the classical design methods such as the Fourier series and Remezmethods for the design of nonrecursive filters and the bilinear transfor-mation method for the design of recursive filters, and it can obtain thestandard realizations such as the cascade and parallel direct canonic,state-space, and wave lattice realizations. The software also includesfunctions that can be used to obtain zero-pole plots for digital filters orto study the effects of coefficient quantization. D-Filter entails a mod-ular top-down architecture, includes a good graphical user interface,and saves data in terms of certain standard data structures at everystep of the design process. In consequence, specific processes can berepeated and checked any number of times until the D-Filter user ishappy with the results. The software would enable students to interac-tively learn the fundamentals of DSP and digital-filter design and it canalso be used by DSP practitioners and scientists to carry out designsfor real-life applications or for research purposes.

Page 4: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 4

1. INTRODUCTION

D-Filter is a Windows-based DSP software package for the analysis and design of digitalfilters and discrete-time signals. The software originally comprised a collection of individualUNIX programs that were written by the author to develop his books on digital filters [1]–[3]and also to facilitate his research in the areas of analog and digital filters, optimization, anddigital signal processing but in later years the individual programs were integrated into acohesive application with considerable help from his graduate students Nelson Ko and DavidGuindon. D-Filter has been used in the past to support Digital Signal Processing, Signals,Systems, and Filters [4] and it can also be used as a learning tool in support of the author’slatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. Theoriginal goal was to develop a software package that would enable students to interactivelylearn the fundamentals of DSP and digital-filter design but it can also be used by engineersand scientists to design digital filters and analyze discrete-time signals.

D-Filter implements many of the techniques, methods, and algorithms found in the au-thor’s textbooks on the subject in a highly modular architecture and it is, therefore, flexibleand easy to use. The modules of D-Filter are menu driven and interact among themselvesthrough a common data environment which will be referred to hereafter as the D-Filter databank. Alternatively, they can interact through a collection of standard unformatted textfiles that are entirely accessible to the user through the use of any one of the standard texteditors (e.g., Notepad). The output of D-Filter, e.g., graphs and numerical design data andparameters, is made available to the user through a graphical user interface and throughformatted text files. Complicated design procedures are broken down into individual stepsthat facilitate the user to plot and view the results achieved at the end of each step of thedesign.

Technology has moved a long way since the original design of D-Filter and it would berather difficult to add new options and features to D-Filter without a small team of softwaredevelopers. While writing his most recent edition [5], the author developed a good collectionof software for the analysis, design, and applications of digital filters that are implementedmostly in MATLAB and plans to make them available in the near future see

http://www.ece.uvic.ca/∼dsp/Software-ne

To facilitate the exposition of the User Guide, the components of D-Filter are color codedas follows:

• Button

• Dialog box

• Help description

• Pull-down menu

• Module

Page 5: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 5

• Option

• Check box

• Selection

2. D-FILTER STRUCTURE

D-Filter is organized in terms of a top-down architecture whereby its functions, modules,and utilities are laid out under six main pull-down menus labelled File, Analysis, Design,Realization, View and Help. Analysis, Design, and Realization serve as the main function-ality pull-down menus while File, View, and Help provide standard Windows functions likeopening files, activating the toolbar, or providing help descriptions on the use of the variousmodules. When needed, D-Filter spawns additional pull-down menus, for example, File isexpanded into File, Edit, and Character if a text file is opened (see Sec. 3. FILE) and Help isexpanded into Help, Color Options, and Preferences if the graphical user interface of D-Filteris activated (see Sec. 8.1 Graphical Output).

The three main functionality pull-down menus, i.e., Analysis, Design, and Realization,lead to new nested pull-down menus which may, in turn, lead to new nested pull-downmenus. Each series of pull-down menus leads to a dialog box which facilitates the entry ofinput data. Additional dialog boxes may pop-up as needed to supply data to the D-Filterfunctions. When needed the D-Filter functions save output as well as input data in textfiles and sometimes cause the graphical interface to spawn windows that display graphs.For example, to find the amplitude response of a nonrecursive filter of the general type,one would need to select Analysis, followed by Frequency Domain, followed by NonrecursiveFilter, followed by General, as depicted in Fig. 1a. This selection can be represented inshorthand form as

Analysis > Frequency Domain > Nonrecursive Filter > General

It will spawn a dialog box Select filter which will enable the user to select one of thefour options available, namely, Stored filter, Filter on file, Change Stored filter, and Newfilter. Option Stored filter will cause a filter in D-Filter’s data bank that has been designedby another D-Filter module during the current session; Filter on file will cause D-Filter toread the input data from a text data file accessible to D-Filter; Change Stored filter enablesD-Filter to change the data in a filter stored in the data bank; and New filter will spawn adialog box that will enable the user to enter the required input data manually through thekeyboard. See Sec. 7. Input Data for more information.

When the required input is supplied, a new dialog box will be spawned that provides theavailable options, namely,

• Gain > Log

• Gain > Linear

Page 6: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 6

• Phase

• Group Delay

Options Gain > Log or Gain > Linear, Phase, and Group Delay will cause D-Filter tocomputer the amplitude response with the gain in dB or as a ratio, the phase response, andthe group delay, respectively.

Clicking button Next will cause another dialog box Frequency Range to be spawnedthat will enable the user to supply the sampling frequency, initial frequency, final frequency,number of points, and minimum gain in dB which is used to limit the minimum gain toassure a well proportioned plot. One can also enabe or disable the Save output file option.This will cause the Save Formatted Output File dialog box to pop up which enables the userto supply the name of the preferred file name. A default file name, “untitled”, is providedwhich is expanded by D-Filter to “untitled.txt”. If there is a file with the name “untitled.txt”in the D-Filter Home folder, it will be overwritten without warning by design. To preservean output .txt file, the user would need to use a customized file name which prevents the filefrom being overwritten. The default name “untitled.txt” should probably be chosen mostof the time to prevent D-Filter from overcrowding the D-Filter working folder with output.txt files.

When the analysis is done, D-Filter produces a window that displays the desired compo-nent of the frequency response, namely, the amplitude response.

The pull-down menus for Design and Realization are illustrated in Fig. 1b and c.

Page 7: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 7

(a)

(b)

Figure 1 Structure of pull-down menus: (a) Analysis, (b) Design.

(c)

Figure 1 Cont’d Structure of pull-down menus: (c) Realization.

Page 8: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 8

2.1 Analysis

Several types of analysis can be carried out with D-Filter. Frequency-domain analysis isavailable for analog, recursive, and nonrecursive filters, as can be seen in Table 1.

Table 1 Analysis Pull-Down Menu

AnalysisCoefficient QuantizationDiscrete Fourier TransformFrequency Domain

Analog/Recursive FilterNonrecursive Filter

GeneralLinear Phase

Roundoff NoiseTime DomainZero-Pole Plot

Partial FractionsRoots of PolynomialsScaling

Sequence

Analysis > Frequency Domain > Analog/Recursive

can be used to obtain frequency responses for cascade or parallel analog or recursive digitalfilters. Linear and logarithmic amplitude responses, phase responses, and delay characteris-tics can be computed and graphed, and repeated runs can be carried out over any desiredfrequency range using any desired number of sample points.

Sequence

Analysis > Time Domain

can be used to obtain impulse, unit-step, sinusoidal responses as well as responses to arbitrarycustomized input waveforms.

Sequence

Analysis > Discrete Fourier Transform

Page 9: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 9

which employs a state-of-the art fast Fourier transform, can be used to obtain amplitudeand phase spectrums of discrete-time signals.

Under Analysis, D-Filter also provides some mathematical tools that are frequentlyneeded in the analysis and design of digital filters. Module Partial Fractions can expressa given transfer function as a sum of partial fractions or convert it from the product to thesum form (see Sec. 12.2, Exercise 2).

There are, in addition, facilities to find the roots of polynomials and construct zero-poleplots for discrete-time systems and to apply scaling to digital-filter structures using either afrequency- or a time-domain method.

2.2 Design

The modules under the Design pull-down menu can be used to obtain continuous-time trans-fer functions for analog filters or to design nonrecursive and recursive digital filters as wellas some specialized discrete-time systems such as digital differentiators and Hilbert trans-formers. The options available are listed in Table 2.

Under the first option, various types of nonrecursive filters can be designed with theWindow or Remez method.

The second option provides design techniques for recursive filters. The first module ofthis option is Analog Approximations. It computes the coefficients as well as the zerosand poles of continuous-time transfer functions for normalized lowpass Bessel, Butterworth,Chebyshev, inverse-Chebyshev, and elliptic filters.

Module Analog Transformations can convert a normalized continuous-time lowpass trans-fer function into a corresponding denormalized transfer function of one of the standard types,i.e., lowpass, highpass, bandpass, or bandstop.

Module Bilinear Transformation can be used to convert a continuous-time transfer func-tion into a corresponding discrete-time transfer function which would represent a recursivedigital filter.

The modules under Prescribed Specifications can be used to design filters that wouldsatisfy arbitrary prescribed specifications.

Other types of digital-filter designs can be obtained by using one of the invariant time-domain response methods or the matched-z transformation approach by selecting the appro-priate modules under Design. These modules always yield a realizable and stable discrete-time transfer function.

Page 10: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 10

Table 2 Design Pull-Down Menu

DesignNonrecursive

FiltersRemez MethodWindow Method

Fixed LengthPrescribed Specifications

Digital DifferentiatorsNumerical MethodRemez MethodWindow Method

Hilbert TransformersWindow Method

RecursiveAnalog ApproximationsAnalog TransformationsBilinear TransformationInvariant Time-Domain ResponseMatched-z TransformationPrescribed Specifications

Bilinear Transformation DesignInvariant Time-Domain Response DesignMatched-z Transformation Design

Partial Fractions

2.3 Realization

D-Filter can be used to obtain direct canonic, lattice, state-space, or wave lattice realizations,as depicted in Table 3. In the first four forms, the input is a discrete-time transfer function inproduct or sum form and the structure produced is either cascade or parallel. For the wavelattice realization, a continuous-time transfer function in product form is required. Thispull-down menu also links to module Partial Fractions which is often required to convert atransfer function from the product to the sum form (see Sec. 11.3).

Page 11: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 11

Table 3 Realization Pull-Down Menu

RealizationCascade or Parallel DirectCascade or Parallel CanonicCascade or Parallel LatticeState SpaceWave Lattice

Partial Fractions

3. FILE

Pull-down menu File provides standard Windows functions such as creating, opening, orprinting a file. When a text file is opened, D-Filter expands File into three pull-downmenus, namely, File, Edit, and Character. Menu Edit facilitates cutting, copying, pasting,or deleting text whereas menu Character enables the user to replace the font family or pointsize in an open text file, or to activate or cancel word wrap. Note that

1. font change can be applied to an open text file and cannot be used to change thedefault font of D-Filter, which is always fixed to a font of the courier family,

2. option Left which stands for left alignment is always preselected, and

3. options Right and Center which would stand for right or center alignment in certainapplications have not been implemented in D-Filter and, consequently, cannot be se-lected.

4. VIEW

Under View, the user can choose to display the Toolbar or Status Bar or select the arrange-ment of windows in the home window, e.g., vertical, horizontal, or cascade.

5. HELP

Under Help, a description of the available functions and modules as well as other usefulinformation can be found. By clicking on an item in the Table of Contents, the user can

Page 12: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 12

obtain information about the functionality of the chosen module and how to use it, the typeof input required, the type of output that would be produced, the structure of unformatteddata files, and other useful hints.

6. TOOLBAR

The toolbar whose functionality is illustrated in Fig. 2 provides quick access to frequentlyused functions. For example, clicking button TR or FR will initiate a time-domain or afrequency-domain analysis of a new or stored digital or analog filter while button DFT willinitiate a discrete Fourier transform analysis of new or stored discrete-time signals. Thetoolbar provides other facilities as well, such as selecting the desired arrangement of childwindows, clearing any open windows, accessing the Help module, and resetting the softwareto its starting state. The reset operation is activated by clicking the eraser icon but the useris well advised to exercise caution in the use of the eraser because in addition to resetting thedefault initial values of the software it also clears the D-Filter data bank. More informationabout the Toolbar can be found in the Application Layout description under Help.

Figure 2 Toolbar.

7. INPUT DATA

Input data can be supplied to a module in three different ways, as follows:

• By entering the data manually through the keyboard.

• By reading the data from an unformatted data file.

• By retrieving the data from the D-Filter data bank.

The different modes of inputting data are illustrated in Fig. 3. D-Filter prompts the user tochose the mode of data entry before the activation of the module through one or more pop-updialog boxes. The number of input options available depends on the type of the required

Page 13: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 13

D-Filter action. In analysis tasks, three to four options are provided. For example, modulesthat perform frequency-domain analysis of filters provide four input options, as follows:

UnformattedData File

UnformattedData File

Manual

Entry

Formatted

Output File

D-Filter

Data Bank

Graphical

InterfaceModule

Figure 3 Input and output data for modules.

• Stored filter

• Filter on file

• Change stored filter

• New filter

When a module designs a filter, the data produced by the module is in the form of awell-defined data structure which is stored in the D-Filter data bank and saved by defaultin an unformatted data file whose name can be chosen by the user. In this way, the filterdata can be accessed by other modules for further processing. The data in the D-Filterdata bank is temporary and it is immediately overwritten if another design is carried outthat produces the same data structure whereas the data in an unformatted data file can beretained indefinitely by selecting a unique name for the data file. For example, if a filterthat has just been designed is to be analyzed using the frequency-domain analysis module,the user can select input option Stored filter or Filter on file to direct D-Filter to retrievethe filter data from the D-Filter data bank in the first case or to read the data from theunformatted data file produced by the design module in the second case. Option Changestored filter enables the user to change the filter data currently stored in the D-Filter databank. This option would enable a designer to investigate the effects of changes in one ormore filter coefficients, for example. Option New filter enables the user to enter the filterdata manually through the keyboard in a pop-up dialog box. This option might be neededonce in a blue moon to check a digital filter that was not designed by D-Filter since D-Filter’sdesigns are normally readily available in the D-Filter data bank or in an unformatted datafile or can be easily generated.

Page 14: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 14

D-Filter uses a number of standard unformatted data files which are readable text filesthat comprise letters, fixed-point numbers, and floating-point numbers. Data are entered inthese files sequentially in a number of lines, without explanation, in an order that can beeasily read by a computer program. Unformatted data files could be constructed by using anyone of the usual text editors but the user would need to know the structure of the requiredfile. This is detailed in the Help description of the module of interest but manual data entryin the few circumstances where it might be needed can be more easily done through the useof the New filter option.

Different modules need different types of input and, consequently, D-Filter uses varioustypes of unformatted data files which are distinguished by unique 3-letter extensions such as.coe and .zps. D-Filter provides default names to unformatted data files such as untitled.coeand untitled.zps but the user can choose to overwrite the default file name by any othername that appears to be appropriate for the application at hand and is consistent with theWindows system. See Help description Unformatted Data Files for more information.

8. OUTPUT DATA

D-Filter writes the output data it produces in formatted output text files and, where ap-plicable, it displays the results obtained in graphical form in terms of graphs and plots.The default file name for formatted output text files is untitled.txt but, as for unformatteddata files, the user can choose to overwrite the default file name by any other name thatis consistent with the Windows system. See Formatted Data Files under Help for moreinformation.

The use of default file names untitled.coe, untitled.zps, untitled.txt, etc., implies thatinput and output data files are continuously overwritten by new input and output data filesand, as a consequence, once in a while useful data might be overwritten by accident. However,there is a great benefit as well in using these default file names: D-Filters Home folder willnot become overcrowded by numerous old input and output data files. The practical solutionto this problem is to accept the default file names until the desired analysis or design resultshave been achieved, and after that repeat the analysis or design one last time with user-defined file names for the input and output data files. Recall that any attempt to overwritea user-defined file name will produce a warning.

8.1 Graphical Output

Several types of plots can be produced by D-Filter, for example,

• time-response plots• amplitude-response plots• phase-response plots

Page 15: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 15

• delay characteristics• zero-pole plots• amplitude spectrum plots• phase spectrum plots

Module Time Response will produce plots of the time-domain response of a digital filterto a specified input such as an impulse, a unit-step, or a sinusoid. Module FrequencyResponse can be used to obtain plots of the amplitude and phase responses as well asthe delay characteristic of analog or digital filters. Zero-pole plots are produced by manydesign modules whose output is in the form of a new transfer function either in terms ofits coefficients or its zeros and poles. Amplitude and phase spectrums are produced by thediscrete Fourier transform.

When the graphical interface is active, i.e., when one or more windows are spawned in theform of graphs or plots, three new pull-down menus become available to the right of the Helpmenu, namely, Color Options, Preferences, and Axes Limits which would facilitate the userto customize the graphing functions. Through the Color Options menu, the user can choosethe color of the background, curve, grid, and other graph elements. Under Preferences, onecan zoom in or zoom out, or enable the cross cursor. Using the Axes Limits menu, one canchange the lower and upper limits of the bottom or left axes to obtain a more pleasing graph.A shortcut to this facility is to simply click on the bottom or left axis and then enter thedesired limits in the pop-up dialog box.

Note that whenever the parameters of the customization are changed, they usually over-write the previous set and become the new default parameters.

8.2 Printing

The user may need to print a formatted output text file, such as output.txt, or a graph.A formatted text file can be printed by associating it with a standard text editor such asNotepad or WordPad and then clicking Print under File as is usually done in Windowsapplications. To print a graph, it is first necessary to save the graph in a document of someform to start with. To save one or more graphs displayed, proceed as follows:

1. Using pull-down menu Color Options in D-Filter, customize the spawned window toobtain the desired colors for the various elements of the graphs. (If a black-and-whiteprinter is to be used, select black-on-white or white-on-black color options.)

2. To save one or more graphs in a Word document, start a Word document. Then selectSave as Word under File. Alternatively, one can save a graph using the Clipboard asdetailed in item (3) below. Once saved in a Word document, the graphs can be scaledor moved in the usual way.

3. To save graphs in a Word, WordPad, Adobe Illustrator, or Adobe Photoshop documentdo the following:

• Start a new document with one of the aforementioned applications.

Page 16: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 16

• Select the first graph of interest.• Select Copy to Clipboard under File.• Go to the opened document and select Paste under Edit.• Repeat the above procedure for each D-Filter graph that needs to be saved.

4. To obtain a PDF file for a graph, save the graph in a Word document as detailed aboveand then choose option Print to file using Adobe PDF as printer.Another way is to save the graph in a Word document as detailed above, and then chooseoption Print to file using any PostScript printer. After that convert the PostScript to aPDF file by running the Adobe Acrobat.Yet another way would be to paste the graph in an Adobe Illustrator or Photoshopdocument and then save the document using Save As with the PDF file format.

5. To obtain an EPS file for a graph, paste the graph in an Adobe Illustrator or Photoshopdocument and then save the document using Save As with the EPS file format.

If for some reason the entire D-Filter window along with the borders, menu bar, andtoolbar needs to be saved and printed as in Fig. 1a to c, proceed as follows:

1. Maximize both the graph and D-filter windows.2. Press key Print Screen on the keyboard.3. Restore the D-Filter window.4. Open a WordPad, Word, Illustrator, or Photoshop document and select Paste under

Edit.

Once one or more graphs have been saved in a document using one of the aforementionedsoftware, a hard copy can be readily printed in the usual way.

9. COMMUNICATION AMONG MODULES

The various modules communicate with each other through the D-Filter data bank as wellas through unformatted data files. Certain standardized well-defined file structures are usedfor the unformatted data files to ensure that a data file of a given type can be read by allmodules that might need this particular type of data as input, and to ensure that a datafile produced as output by one module can be read as input by another module. Groups ofmodules interact with one another through the architecture illustrated in Fig. 4 where thetwo-way arrows designate two-way data flows. In this arrangement, the output of Module1 is saved in the D-filter data bank as well as an unformatted data file and can be used asinput for Module 2. After processing, the output of Module 2 is saved in the D-Filter databank as an unformatted file, and can then be used as input for Module 3, and so on. In thisway, successive processing steps can be carried out one after another without the need formanual intervention.

D-Filter is also programmed to produce unformatted data files in situations where inputdata are entered manually through the keyboard, for example, when option New filter orCustomized input is chosen. This is done to enable the user to carry out future tests with thesame input data without the need for manual data entry which is ever so time-consuming.

Page 17: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 17

Manual Entry Manual Entry

Manual Entry Manual Entry

Unformatted Data Filesor

D-Filter Data Bank

Module 1 Module 2

Module 3 Module 4

Figure 4 Data flow between modules.

10. RUNNING D-FILTER

A user can start D-Filter in any one of the usual Windows methods, e.g., by clicking theD-Filter icon on the Desktop or through the “Start” menu. Upon installation, D-Filter willtreat folder “Projects” in its installation folder , typically, C:\Program Files (x86)\D-Filter,as its Home folder . However, the default “Home” folder can be changed to any other folderby simply opening a file or by saving data in the desired folder. D-filter will retain the newfolder as the new default Home folder until the user opens a file or saves data in yet anotherfolder which will automatically become the new default Home folder, and so on.

The typical usage of D-Filter is to run one or more of its modules through pull-downmenus. A module is selected through a series of nested pull-down menus which usually lead

Page 18: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 18

to a series of pop-up dialog boxes that enable the user to supply the required input data,options of interest, and the desired output. Once the input data is available to the module,it will request information about the required type of output and where to save it.

To facilitate exposition, the user actions needed to activate and use a module of D-Filterto achieve a specific design or analysis goal can be described in shorthand notation in termsof a sequence of actions such as

• select a pull-down menu

• choose a particular entry of a pop-up dialog box

• specify an unformatted input data file

• choose a module option

• enter a set of numbers

• select the type of plot required

• specify a formatted output file

separated by the “greater than” symbol “>” as was done in Sec. 2. D-Filter Structure..For example, a sequence of actions like the one that follows, which will be referred to as aselection hereafter:

Analysis > Frequency Domain > Analog/Recursive Filters > Filter on file> elliptic.coe > Log > Enter data > Next > output.txt

can be interpreted as follows:

• Select pull-down menu Analysis.

• Select nested pull-down menu Frequency domain.

• Select module Analog/Recursive filter.

• Specify unformatted data file as the source of the input.

• Select input file elliptic.coe

• Obtain the amplitude response using logarithmic scale in dB for the gain.

• Enter data in the pop-up dialog box.

• Plot the amplitude response.

• Specify formatted file output.txt as the output data file.

Page 19: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 19

After the above actions, the user can obtain any number of amplitude and/or phaseresponses and/or delay characteristics, one after the other, for arbitrary frequency rangesand arbitrary numbers of sample points by clicking the frequency response (FR) button onthe toolbar.

The above short-hand notation is used extensively in the tutorial exercises that follow aswell as in the module descriptions found under Help to explain the operation of the modules.

11. CHARACTERIZATION OF DIGITAL FILTERS

There are several mathematical ways of representing or characterizing a discrete-time systemor digital filter, e.g., by a difference equation, by a transfer function in product or sum form,or by a state-space matrix representation. See [4, 5] for the background theory for this andsubsequent sections.

11.1 Difference Equation

An Nth-order recursive digital filter, also known as infinite-duration impulse response (IIR)digital filter, can be represented by a difference equation of the form

y(nT ) =N∑i=0

aN−ix(nT − iT )−N∑i=1

bN−iy(nT − iT ) (1a)

If the coefficients bN−i for i = 1, 2, . . . , N are all zero, we obtain the simplified differenceequation

y(nT ) =N∑i=0

aN−ix(nT − iT ) (1b)

which represents an Nth-order nonrecursive filter, also known as finite-duration impulseresponse (FIR) digital filter.

11.2 Transfer Function

By applying the z transform to the difference equation of a discrete-time system, the discrete-time transfer function can be obtained, which can be expressed in one of the following forms

Page 20: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 20

Y (z)

X(z)= H(z) =

∑Ni=0 aN−iz

−i

1 +∑N

i=1 bN−iz−i

(2a)

=

∑Ni=0 aN−iz

N−i

zN +∑N

i=1 bN−izN−i

(2b)

=

∑Ni=0 aiz

i∑Ni=0 biz

i(2c)

= H0

∑Ni=0 ai

′zi∑Ni=0 biz

i(2d)

where H0 is a multiplier constant. We note that a digital filter is fully specified by thecoefficients of the difference equation or, equivalently, by the coefficients of the transferfunction and constant H0.

11.3 Cascade and Parallel Structures

D-Filter assumes a digital filter to be a cascade or parallel arrangement of filter sections ofarbitrary orders as depicted in Fig. 5a and b. In the cascade structure, the transfer functionis in the product form

H(z) = H0

K∏j=1

Hj(z) (3)

whereas in the parallel structure it assumes the sum form

H(z) = H0

(K∑j=1

Hj(z)

)(4)

where

Hj(z) =K∑j=1

a0j + a1jz + · · ·+ aMjzMj

b0j + b1jz + · · ·+ bNjzNj

In the above equations, K is the number of filter sections, and Mj and Nj are thenumerator and denominator orders of the jth filter section, respectively. A transfer functioncan be stored in terms of its coefficients in unformatted data files carrying the file extension.coe, e.g., input.coe, output.coe, filename.coe.

Alternatively, a discrete-time transfer function can be described in terms of its zeros andpoles as

H(z) = H0

∏Mi=1(z − zi)∏Ni=1(z − pi)

(5)

Page 21: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 21

H0

H1(z)

HK

(z)

H2(z)

H1(z)

HK

(z)

H2(z)

H0

(a) (b)

Figure 5 (a) Cascade structure. (b) Parallel structure.

where H0 is a multiplier constant as before, zi is the ith zero, pi is the ith pole, M is thenumber of zeros, and N is the number of poles. A transfer function is stored in terms of itszeros and poles in unformatted data files carrying the extension .zps, e.g., filename.zps.

Yet another form of the transfer function, which is sometimes used by D-Filter, is interms of its residues and poles, namely,

H(z) = K0 +N∑i=1

Ri

z − pi(6)

In this case, K0 is a constant, Ri is the residue of pole pi, and N is the order of the transferfunction, which happens to be the same as the number of poles. Data files containing atransfer function in term of its residues and poles carry the extension .rsd, e.g., filename.rsd.

A transfer function specified as a product of first- and second-order transfer functionseither in terms of its coefficients as in Eq. (2) or in terms of its zeros and poles as in Eq. (5)can be readily converted into the residue form of Eq. (6) by running module Partial Fractions.

D-Filter strongly prefers transfer functions in the product or the sum forms of Eqs. (3)and (4) and, therefore, the transfer function in Eq. (6) is often expressed in the standard sumform of Eq. (4). This is done by pairing partial fractions with complex conjugate coefficientsand then performing some straightforward algebra. For digital filters whose transfer-functioncoefficients are real, which is the underlying assumption for D-Filter, the poles of the transferfunction normally occur in complex conjugate pairs but there is at least one real pole in thecase where the order of the transfer function N is odd. It can be shown that the residues atcomplex conjugate pairs of poles are complex conjugate and, therefore, if we assume that in

Page 22: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 22

the case of an odd-order transfer function pN is real, Eq. (6) can be expressed as

H(z) = K0 +N∑i=1

Ri

z − pi

=

K0 +

N/2∑i=1

[Ri

z − pi+

R∗iz − p∗i

]if N is even

K0 +

(N−1)/2∑i=1

[Ri

z − pi+

R∗iz − p∗i

]+

RN

z − pNif N is odd

(7a)

=

K0 +

∑N/2j=1

a0j + a1jz

b0j + b1jz + b2jz2if N is even

K0 +∑(N−1)/2

j=1

a0j + a1jz

b0j + b1jz + b2jz2+

a0Nb0N + b1Nz

if N is odd(7b)

Evidently, a transfer function in the form of residues and poles can be put in the standardsum form

H(z) =J∑

j=1

a0j + a1jz + a2jz2

b0j + b1jz + b2jz2where J =

{N/2 if N is even

(N + 1)/2 if N is odd(8)

In this form, some of the coefficients may be zero. For example, if N is even and K0 happensto be zero, then all coefficients a2j for 1, 2, . . . , N/2 would be zero. If N is odd, then therewill be a partial transfer function with a1j = a2j = b2j = 0, and if K0 6= 0, then there will bea transfer function which is simply a constant and equal to K0, i.e., a1j = a2j = b1j = b2j = 0,b0j = 1, and a0j 6= 0. Fortunately, the user does not need to perform all the required algebra.Module Partial Fractions can give the output either in the residue-pole form of Eq. (6) orthe standard sum form of Eq. (9) as required.

A continuous-time transfer function H(s) is similarly represented except that z is replacedby s in Eqs. (2)–(8).

For causal nonrecursive filters, the transfer function can assume the general form

H(z) =N−1∑i=0

aiz−i =

N−1∑i=0

h(iT )z−i

where N is the filter length or N − 1 is the filter order. The transfer function coefficients aifor 0, 1, . . . , N − 1 happen to be numerically equal to the values of the impulse response,namely, h(iT ) for 0, 1, . . . , N − 1 (see [4, 5]). Transfer functions for nonrecursive digitalfilters are stored in unformatted data files carrying the extension .irg, e.g., filename.irg, wereirg is an acronym for impulse response, general.

Page 23: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 23

11.4 Nonrecursive Digital Filters

If a nonrecursive filter has linear phase, then the transfer function can assume four formsdepending on the type of symmetry of the impulse response and whether the filter length isodd or even. In D-Filter, the following noncausal versions of the transfer function are used:

Symmetrical impulse response, odd N :

H(z) = h(0) +

(N−1)/2∑i=1

h(iT )(zi + z−i)

Antisymmetrical impulse response, odd N :

H(z) =

(N−1)/2∑i=1

h(iT )(−zi + z−i)

Symmetrical impulse response, even N :

H(z) =

N/2∑i=0

h[(i+ 12)T ](zi+1/2 + z−(i+1)/2)

Antisymmetrical impulse response, even N :

H(z) =

N/2∑i=0

h[(i+ 12)T ](−zi+1/2 + z−(i+1/2))

These filters are described in terms of data files that carry the extension .irl, e.g., filename.irlwhere irl is an acronym for impulse response, linear phase response.

Other frequently encountered unformatted data files are filename.fft which is used toprovide input to the FFT module, filename.noi for use as input for roundoff noise analysis,and filename.tim which is used to store a customized discrete-time signal for time-domainanalysis.

12. Exercises

Below, several exercises are described that are designed to familiarize the user with themodules, options, and capabilities of D-Filter.

12.1 Exercise 1 – Time-Domain Response

A digital filter is characterized by the difference equation

y(nT ) = 12x(nT − 2T )− αy(nT − T )− βy(nT − 2T ) (9)

and the sampling frequency is 2π rad/s.

Page 24: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 24

(a) Assuming that α = −1.0 and β = 0.1, find the time-domain response of the filter for0 ≤ n ≤ 42 if the input signal is a sinusoid of the form

x(nT ) = sinωnT

where ω = 0.3 rad/s.

(b) Find the unit-step response of the filter for each of the following sets of coefficients:

(i) α = −1.0, β = 0.1

(ii) α = −1.0, β = 0.5

(iii) α = −1.0, β = 0.9

for 0 ≤ n ≤ 40. Then compare the unit-step responses obtained.

(c) Assuming the filter coefficients in item (ii) above, find the time-domain response of thefilter to the input signal

x(nT ) =

0 for 0 ≤ n ≤ 9

1 for 10 ≤ n ≤ 30

0 for 31 ≤ n ≤ 50

for 0 ≤ n ≤ 50.

(d) The transfer-function coefficients of a digital parallel elliptic highpass filter are givenin Table 4. The filter has a stopband edge frequency of 1.9 rad/s, a passband edgefrequency of 2.0 rad/s, and the sampling frequency is 2π rad/s. Plot the time-domainsinusoidal response of the filter if the frequency of the input sinusoid is 0.3 rad/s as inpart (a).

Table 4 Coefficients of a Digital Parallel Elliptic

Highpass Filter

-------------------------------------------------------

H(z)=H0*[H1(z)+H2(z)+...]

H1(z)=(A01+A11z+A21z^2)/(B01+B11z+B21z^2)

Section #: 1

-------------------------------------------------------

A[ 0 1]: 8.441627E-0003 B[ 0 1]: 1.000000E+0000

-------------------------------------------------------

Section #: 2

-------------------------------------------------------

A[ 0 2]: -2.989734E-0001 B[ 0 2]: 6.743668E-0001

B[ 1 2]: 1.000000E+0000

-------------------------------------------------------

Section #: 3

-------------------------------------------------------

Page 25: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 25

A[ 0 3]: 3.217894E-0001 B[ 0 3]: 5.970103E-0001

A[ 1 3]: 2.203021E-0001 B[ 1 3]: 1.093338E+0000

B[ 2 3]: 1.000000E+0000

-------------------------------------------------------

Section #: 4

-------------------------------------------------------

A[ 0 4]: -1.105230E-0001 B[ 0 4]: 8.602544E-0001

A[ 1 4]: 2.763276E-0002 B[ 1 4]: 7.814675E-0001

B[ 2 4]: 1.000000E+0000

-------------------------------------------------------

H0: 1.000000E+0000

-------------------------------------------------------

Theory: See Secs. 2.5 and 5.2 in [5].

Solution, Part (a): The first thing to do is to get the transfer function of the filter. FromEqs. (1a), (2c), and (9), we have

H(z) =1

2

(1

β + αz + z2

)The Time-Domain Response module can be run through the selection of actions

Analysis > Time Domain

which will cause the Select Filter dialog box to pop up. Since the filter to be analyzed is anew filter, we select New filter which will start the Filter Configuration dialog box.

As mentioned in Sec. 11.3, a transfer function in the product or sum form represents acascade or parallel arrangement of filter sections. Since we are dealing with a second-ordertransfer function which is normally realized as a single filter section, we can regard the filterconfiguration to be either a cascade or parallel one. Let’s choose Cascade configuration. Inthe data field for the number of sections we enter 1 and for the multiplier constant H0 weenter 0.5.

Upon clicking button Next, the Filter Coefficients dialog box will appear which requiresthe numerator and denominator orders as well as all the coefficients. We enter 0 for thenumerator order since the numerator is a constant equal to unity and 2 for the denominatororder in the top part of the Filter Coefficients dialog box. Upon entering the numerator anddenominator orders, a matrix of data fields of the correct size will appear in the bottom partof the Filter Coefficients dialog box in which the numerator and denominator coefficients ofthe transfer function can be entered. We enter 1.0 for A[0, 1], β = 0.1 for B[0, 1], α = −1.0for B[1, 1], and 1.0 for B[2, 1]. The data is typically typed in but the copy-and-paste methodcan also be used if the coefficient values are available in a text file.

At the bottom right-hand corner of the Filter Coefficients dialog box, a check box Saveunformatted input data file is provided which would enable a user to save a new filter that

Page 26: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 26

has been entered into D-Filter’s data bank, for example, if there is a possibility that thenew filter might need to be analyzed again. The default choice is to save the filter data butthe user can disable it by clicking on the check box. Assuming that the Save option is kept,the data will be stored in two input data files, namely, a .coe coefficient data file and a .zpszeros and poles data file. Note that the .zps data file is not needed for the present analysisbut it is generated on the fly just in case it might be needed later. It should be mentionedthat D-Filter will generate a .zps file only in the case where the transfer function is in theproduct form (see Exercises 9 and 10 for details).

Clicking the Next button will cause the Save Unformatted Data Files dialog box toappear. The default file name “untitled” with no extension is provided by D-Filter, whichcan be adopted unless the user wishes to select some other unique file name (see Sec. 8).There is no need to add the extension because the appropriate extension will be addedautomatically by D-Filter. Should the user enter an extension anyway, it will just be ignoredby D-Filter, which is quite all right particularly if the extension entered is wrong.

The digital filter for part (a) will also be used in part (b) of the solution below and,therefore, we need to save the filter coefficients in an unformatted data file with a uniquename. So let us choose, say, file name exe1a-i, and click Save to complete the input process.At this point, D-Filter saves the unformatted data in files exe1a-i.coe and exe1a-i.zps in thecurrent Home folder.

As stated earlier, unformatted data files are standard text files and can be viewed if needbe by associating them with a standard text editor and then opening them in the usual way.For example, to view file exe1a-i.coe, we can select

File > Open

which will cause the Open dialog box of the Windows system to appear. We then clickbutton Open on the Open dialog box and browse to file exe1a-i.coe to open it. Note thatthis action cannot be completed while a D-Filter pop-up dialog box is displayed. In such acase the dialog box should be closed before attempting to open a file. Also be sure to selectoption Files of type: “All files” to ensure that all the files in the Home folder are displayedin the window of the Open dialog box because D-Filter uses quite a variety of extensions inaddition to .txt and several types of files will normally populate the Home folder.

If a keying error is noticed in the entered input data, say, if the value of the multiplierconstant H0 entered in the Configuration dialog box is wrong, the user can click buttonCancel to terminate the input stage. Selecting

Analysis > Time-Domain > Change stored filter

will restart the process from the beginning except that the parameters entered before willbe retrieved from the D-Filter data bank and will appear as default values. This is quitehandy because the user can parse through the data fields and correct any erroneous entries.Whatever you do in this situation, do not click the Erase button as that will reset D-Filterto its initial state and thereby delete any data entered in the Configuration dialog box.

Page 27: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 27

When the filter data is successfully saved, a dialog box will appear with three differentinput options to select from, namely,

• Standard signals

• Input on file

• Customized input

Option Standard signals provides a collection of, well what else, standard signals such asthe unit impulse, unit step, sinusoid, or unit ramp. Option Input on file tells D-Filter toread the input signal from a data file stored in the Home or some other folder, and optionCustomized input instructs D-Filter to create a customized signal that could be used asinput in the current or a later session.

Since the input is a standard sinusoid, we select the Standard signals option and clickthe Next button.

The Standard signals dialog box will appear which will enable us to select option Sinusoidas input and to supply the number of samples, the sample index at the start of the sinusoid,the sampling frequency, and the frequency of the input sinusoid. Default values are suppliedby D-Filter but can be changed if they are not appropriate. In this example, we enter 42for the number of samples and 0.3 rad/s1 for the frequency of the input sinusoid but let thesinusoid start at the default sample value n = 0 and accept the default sampling frequency,2π, rad/s which happens to be of the correct value. On the same dialog box, D-Filterprovides an option that allows the user to save the input signal but the default is not to savethe input signal. In the present example, the input signal happens to be a standard sinusoidwhich can be readily generated by D-Filter and, consequently, there is no need to save it.This option would be useful when a customized input signal is entered manually through thekeyboard as in the solution of part (c) below.

Clicking Next causes D-Filter to present the Plot Options dialog box. The user can chooseto plot just the input signal, just the output signal, both input and output signals on separategraphs, or both input and output signals on one graph. The user can also select to save thetime-domain response produced in an unformatted as well as a formatted data file. Let uschoose the third option from the top, namely, Plot both on separate graphs. On the PlotOptions dialog box, the user can also choose to save the time-domain response produced inan output formatted and/or unformatted data file. The numerical values of the time-domainresponse are often needed for this or that purpose and, consequently, the default is to save itin an output formatted file. On the other hand, an unformatted version of the time-domainresponse would be needed only if this is going to be used as an input signal to another filterbut this situation would not arise very often and, therefore, the default is not to save anunformatted data file. Let us choose to save both a formatted as well as an unformatted datafile. Clicking button Next, the Save File As dialog box appears providing the usual default

1Note that D-Filter always assumes the frequency to be in radians per second or rad/s for short.

Page 28: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 28

file name, i.e., untitled. Changing the file name to sinusoid-resp-exe1a will cause the outputformatted and unformatted data files sinusoid-resp-exe1a.txt and sinusoid-resp-exe1a.tim tobe produced and immediately after that the required plots will be displayed.

At this point, we can review the data files saved. To see the output formatted data file,we perform the actions

File > Open > sinusoid-resp-exe1a.txt > Open

The file will show the filter coefficients, input signal, and time-domain response nicely orga-nized. On the other hand, if we select

File > Open > sinusoid-resp-exe1a.tim > Open

the unformatted output file will be opened which will show just two columns of numbers,the index n, and the time-domain response.

Solution, Part (b): It is always a good idea to reset D-Filter before the start of a newanalysis or design project. This will clear all graph windows and reset D-Filter to its start-upstate. So we click the Erase button. We note that the filter coefficients in item (i) are exactlythe same as in part (a) of Exercise 1. Therefore, the filter of interest can be loaded in theD-Filter data bank by simply reading unformatted data file exe1-i.coe. Hence we performthe sequence of actions

Analysis > Time Domain > Filter on file > exe1-i.coe > Standard signals

and select Unit step as input. We accept the default start of the signal, i.e., n = 0 and setthe number of samples to 40 as required. On the Plot options, we select Plot output only.We then do

Analysis > Time Domain > New filter

and enter the coefficients in item (ii) above and obtain the plot of the corresponding unit-step response as before. We then repeat this procedure for the coefficients in item (iii) andonce more we obtain the plot of the corresponding unit-step response. Be sure to save theunformatted input data files, say, as exe1b-ii.coe and exe1b-iii.coe, for future use.

At this point, three graph windows will be present in the Home window of D-filter and byclicking Vertical or Horizontal tiling on the toolbar, we will see the three unit-step responsesobtained one below the other or one next to the other. If the instructions were followedfaithfully and without error, the unit-step responses illustrated in Fig. 6 will be obtained.The three responses from top to bottom represent the classical overdamped, critically-damped,and underdamped system, respectively.

Manual entry of input data is obviously quite laborious but fortunately we do not needto use the keyboard or cut-and-paste the data very often. With few exceptions, the inputdata is usually available in the D-Filter data bank or in an unformatted data file which wasproduced previously by some other module of D-Filter.

Page 29: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 29

(a)

(b)

(c)

Figure 6 (a) Overdamped, (b) critically-damped,(c) underdamped system (Exercise 1, part (b)).

Solution, Part (c): Before we start part (c) of the solution, we click the Erase button toreset D-Filter. We then do

Analysis > Time Domain > Filter on file > exe1-ii.coe >

to load the filter coefficients in item (ii) above into the D-Filter data bank. On the Time-Domain Response dialog box, we select Customized input and click Next. The CustomizedInput dialog box appears which will enable us to enter the nonzero samples of the signal.We first enter the number of nonzero samples, namely, 21, and after that we enter the values

Page 30: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 30

n x(nT )10 111 1...

...30 1

in the matrix created by D-Filter; subsequently, we click Next. In the Save UnformattedInput File dialog box, we could accept the default file name untitled.tim but in this part ofthe exercise we choose a customized file name instead, say, pulse, which will cause D-Filterto produce an unformatted input data file pulse.tim for future use.

Should a file with the same name exist, D-Filter will display a warning that a file withthe chosen name already exists and will prompt the user to choose between replacing and notreplacing the existing file by the new file. If you have not noticed it already, D-Filter will notprovide a warning if a file with the default name “untitled” is about to replace an existingfile with the same name. It will simply overwrite the previous file. This is not a softwarebug: D-Filter was designed that way to minimize interruptions by warning messages and toprevent D-Filter from overcrowding the Home folder with unnecessary files. In other words,if the data needs to be saved for future use, the golden rule is to use a unique file name toensure that it cannot be overwritten by accident (see Sec. 8).

On the Plot Options dialog box, select Plot both on separate graphs to see the customizedinput and the response produced by this input. The oscillations noted at the start and endof the output pulse waveform are often referred to as ringing.

Solution, Part (d): This part is very similar to part (a) except that we now have a moresubstantial filter than in part (a). As in part (a), we select

Analysis > Time Domain > Select Filter > New filter

which will start the Filter Configuration dialog box. Table 4 shows that we now have aparallel filter comprising four sections. So we select Parallel and enter 4 sections but leavethe default value of the multiplier constant to stand. Clicking Next will cause the FilterCoefficients dialog box to appear. Since there are 4 sections in this filter, 8 slots appear for thenumerator and denominator orders at the top of the dialog box. The first section is actuallyjust a multiplier which will multiply its input by a constant equal to A[0,1]/B[0,1] but it needsto be entered as if it were a digital-filter section. It is actually a trivial sort of filter with azeroth-order transfer function, so we enter 0 and 0 for section 1 in the top part of the FilterCoefficients dialog box and immediately enter the values of coefficients A[0,1] and B[0,1].We could then key the coefficients of section 3, i.e., A[0, 3], A[1, 3], B[0, 3], B[1.3], B[2, 3] andthose of section 4, i.e., A[0, 4], A[1, 4], B[0, 4], B[1.4], B[2, 4] but it would be easier by far tocopy-and-paste them for this User’s Guide. I did.

We then click Next which will cause the Filter Coefficients dialog box to pop up. In thetop part of the dialog box, we enter the numerator and denominator orders of the first section,namely, 2 and 2, which will initialize the coefficients of the first section in the bottom part of

Page 31: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 31

the dialog box to zero values. The coefficients of the first section can be typed in or, betterstill, copied and pasted in the appropriate coefficient fields. The same procedure is repeatedfor the second section, that is, we enter the orders of the numerator and denominator forthe second section, i.e., 2 and 2, in the top part of the dialog box and immediately entercoefficients of the second section in the bottom part of the dialog box.

When Next is pressed on the Filter Coefficients dialog box, a window will pop up witha warning message to the effect that D-Filter will produce only a .coe unformatted datafile. This is because, D-Filter always produces a .coe as well as a .zps file when the transferfunction is product form2. This should be of no concern because, a time- or frequency-domain response can be carried out using either the coefficients or the zeros and poles of thefilter. See Exercises 9 and 10 for details.

Continuing as in part (a) to the plot options, we can select Plot both on separate graphswhich will cause D-Filter to plot the input and output graphs seen in Fig. 7b.

The input signal is seen to be a nice sinusoid but the output signal looks like anything buta sinusoid. From system theory, analog as well as digital systems start up with a transience,and this is what we see in Fig. 7b over the first 30 samples. What is observed after that perioddoes not look like anything but in fact it is a sinusoid. As we are filtering the input signalwith a highpass filter that has a stopband edge frequency of 1.9 rad/s and the frequency ofthe sinusoid is just 0.3 rad/s, the input sinusoid is seriously attenuated by the stopband ofthe filter actually by a factor of at least 10,000 in this particular example.

2It does so because it is an easy thing to do and the .zps file might be needed later on.

Page 32: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 32

(a)

(b)

Figure 7 (a) Input sinusoid, (b) output sinusoid (Exercise 1, part (d)).

12.2 Exercise 2 Partial Fractions

The coefficients contained in file cas dig el lpf.coe 3represent a cascade, digital, elliptic, low-pass filter with a passband 0 to 0.55 rad/s and a stopband 0.67 to π rad/s. The samplingfrequency is 2π rad/s.

(a) Obtain the coefficients of a corresponding parallel, digital, elliptic, lowpass filter, andsave the output data in files par dig el lpf.coe and par dig el lpf.txt.

(b) Find the order of the filter.

(c) Compare the time-domain responses of the cascade and parallel filters for the followinginput signals:

• unit impulse that occurs at n = 0

• unit step that starts at n = 10

3This file and a number of other unformatted data files used in these exercises can be found in theinstallation folder of D-Filter, i.e., C:\Program Files (x86)\D-Filter\Projects\Data Files.

Page 33: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 33

• unit ramp that starts at n = 20

• sinusoid sinωnT with ω = 0.185 rad/s that starts at n = 0

• sinusoid sinωnT with ω = 1.64 rad/s that starts at n = 0

Theory: See Sec. 4.8.2 in [5].

Solution, Part (a): Part (a) of the problem can be solved by using the Partial Fractionsmodule. The selection

Analysis > Partial Fractions

will cause the Select Filter dialog box to appear. Since the filter of interest is containedin the unformatted data file par dig el lpf.coe, we select Filter on file and click Next. TheOpen Input Data File dialog box will pop up. We browse to folder Projects/Data Files inthe installation folder of D-Filter, select the unformatted file of interest, and click the Openbutton to open the file.

The Partial Fractions dialog box will be displayed in which we can select options Coef-ficients, Save unformatted data file, and Save formatted output file. These options wouldnormally be preselected since they happen to be the correct options most of the time.

We click Next and enter the desired file name, i.e., par dig el lpf, on the Save OutputFiles As dialog box.

We click Save and with File > Open we can check to see whether the required formattedand unformatted files have been created.

Solution, Part (b): The order of the parallel filter can be determined by counting thenumber of poles of the transfer function. If we open par dig el lpf.txt, we note that thetransfer function has 3 complex-conjugate pairs of poles and, therefore, the filter order is 6.

Solution, Part (c): The best way to compare the two designs is to find the time-domainresponses of the two filters for each input signal and then arrange the output waveformseither side by side or one above the other. After each pair of time-domain responses hasbeen compared, the graphs can be cleared by clicking the Clear All Windows button4 andthe responses for the next input signal can be obtained.

The various time-domain responses will show that the two filters will produce exactlythe same response to the same excitation as expected and, therefore, the cascade and thederived parallel filter are said to be equivalent.

4That’s the button with the file icon with an X superimposed over it.

Page 34: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 34

12.3 Exercise 3 Sinusoidal Time-Domain Response of DigitalBandpass Filter

Unformatted data file cas dig bpf.coe5 contains the coefficients of a digital bandpass filter.The specifications of the filter are as follows:

• Lower stopband: 0 to 3.40 rad/s

• Passband: 4.40 to 6.20 rad/s

• Upper stopband: 7.12 to 10.0 rad/s

• Passband ripple, Ap: 1.0 dB

• Stopband loss, Aa: 57 dB

• Sampling frequency: 20 rad/s

Find the time-domain response of the bandpass filter to a sinusoidal input signal x(nT ) =sinωnT for three frequencies, one in the lower stopband, say, ω = 1.9 rad/s, one in thepassband, say, ω = 5.0 rad/s, and one in the upper stopband, say, ω = 8.4 rad/s. Thesinusoid starts at n = 0 and a suitable number of sample points is 301 for all cases. Whatconclusions can we draw from the three sinusoidal responses obtained?

Try other frequencies in the lower stopband, passband, and upper stopband.

Theory: See Secs. 2.5 and 5.5.1 in [5].

Solution: The solutions of this and subsequent examples assume that D-Filter is in itsstart-up state. If it is not, then the Erase button should be clicked to put D-Filter in itsstart-up state.

As in Exercise 2, we can open the unformatted data file of interest through the actions

Analysis > Time Domain > Filter on file > cas dig bpf.coe

In the Time-Domain Response dialog box, we select the Standard signal option and click theNext button. In the Standard Signals dialog box, we select the Sinusoid option and set thenumber of samples to 301, the start of the signal to 0, the sampling frequency to 20 rad/s,and the frequency of the sinusoid to 1.9 rad/s. There is no need to save the input signal inan unformatted file since the sinusoid is one of the standard signals that can be generatedby D-Filter. The default is not to save the input signal so we leave the Save input check-boxunchecked.

We click Next and select Plot both on separate graphs on the Plot Options dialog boxto plot both the input and output signals on separate graphs. We may need to check some

5See folder C:\Program Files (x86)\D-Filter\Projects\Data Files.

Page 35: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 35

numerical values of the sinusoidal response and thus a formatted output file may turn outto be useful. On the other hand, an unformatted output data file will not be needed inthe present example. So we can leave the Save unformatted output file and Save formattedoutput fie options in their default states.

At this point, we click Next to get the plots of the input signal and the sinusoidal responseproduced. Along with the plots, we get the ‘Save Sinusoid Data File dialog box which wouldenable us to choose a unique file name for the output data file. However, there is no need touse a unique file name since that would only slow the process down, so we accept the defaultfile name. As stated in Exercise 1, an output data file with the default file name would soonbe overwritten by another output data file produced by the same or another module butthis is not a serious problem. Should we find out later on that we need a previous sinusoidalresponse that has been overwritten, we could always regenerate the output data again. Itonly takes a second.

It is convenient to click Horizontal tiling on the toolbar to get the two graphs arrangedhorizontally. We note that after some initial transience which lasts 70 to 80 samples, theamplitude of the output signal is practically zero. This is to be expected because the fre-quency of the input signal is in the lower stopband range and it is, therefore, rejected by thebandpass filter.

The user may often enter wrong data by accident and, naturally, the graphs obtainedwould not be as expected. In such a situation, the user can click the Clear All Windowsbutton to clear all graph windows. One should be careful, however, NOT to click the Erasebutton because that would delete the current filter from the D-Filter data bank in additionto clearing all graph windows.

We can now repeat the experiment for another signal frequency. We note that imme-diately after the first time-domain response the Transient Response (TR) button on thetoolbar has become active, and by clicking the TR button, we can carry out any number ofthe time-domain responses one after the other for the filter in D-Filter’s data bank withoutthe need of entering the coefficients or zeros and poles of the filter. We parse through thesame dialog boxes as before but choose a sinusoid frequency of 5.0 rad/s in this case. We notethat after some initial transience, the amplitude of the output signal is of the same order ofmagnitude as that of the input signal. This is not surprising. After all the frequency of 5.0rad/s is approximately in the middle of the passband and it is, therefore, passed by the filter.We can at this point check the amplitudes of the input and output signals by reviewing theformatted output data file untitle.txt if need be.

We can now repeat the above procedure with the frequency of the sinusoid set to 8.4 rad/s.Once again, the amplitude of the output signal soon decays to zero since the frequency is inthe upper stopband.

Page 36: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 36

12.4 Exercise 4 Filter Stability

(a) A recursive digital filter is characterized by the transfer function

H(z) =N(z)

D(z)=

z5

6z5 + 5z4 + 4z3 + 3z2 + 2z + 1

Is the filter stable or unstable?

(b) Repeat part (a) for the transfer function

H(z) =N(z)

D(z)=

z5

z5 + 2z4 + 3z3 + 4z2 + 5z + 6

Theory: See Sec. 5.3.1 in [5].

Solution, Part (a): The stability of the filter can be ascertained by finding the poles ofthe transfer function. This is easily done by running module Roots of Polynomials with thedenominator polynomial of the transfer function, namely, D(z). This is achieved throughthe actions

Analysis > Roots of Polynomials

which will start the dialog box Roots of Polynomials. This will enable us to enter thepolynomial order as well as the coefficients. We enter 5 for the polynomial order and anarray of 5 fields will appear in which the coefficients can be entered. We enter the coefficientsof the polynomial starting with the coefficient of z0 and ending with the coefficient of zn,that is, we enter 1, 2, . . ., 6, in turn, and click Next. D-Filter will show the usual SaveFile As dialog box and after that it will finish the task with a zero plot for the denominatorpolynomial. As will be noted, the zeros of D(z), which are the poles of H(z), are inside theunit circle |z| = 1. We conclude, therefore, that the filter is stable.

Solution, Part (b): Proceeding as above, we will find that in this case the transferfunction represents an unstable filter. Actually, its poles are the reciprocals of the poles ofthe transfer function in part (a) as can be easily verified.

The stability of filters can be easily ascertained without the need to evaluate the polesof the transfer function by simply using the Jury-Marden stability criterion (see Sec. 5.3.3).

Page 37: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 37

12.5 Exercise 5 Steady-State Sinusoidal Response

The time-domain response of a digital filter to a sinusoidal input consists of two components,the transient component, yTR(nT ), and the steady-state component, y(nT ), i.e.,

y(nT ) = R[sinωnT ]

= yTR(nT ) + y(nT )

= M(ω) sin[ωnT + θ(ω)]

If the filter is stable, the transient component soon decays to zero and the output becomesa sinusoidal waveform of the form

y(nT ) = M(ω) sin[ωnT + θ(ω)]

In other words, the amplitude of the input sinusoid is multiplied by M(ω) and a phase angleof θ(ω) is introduced by the filter. M(ω) and θ(ω) are said to be the gain and phase shift ofthe filter for obvious reasons. As functions of ω, M(ω) and θ(ω) are said to be the amplitudeand phase responses.

(a) Unformatted data file cas dig el lpf.coe6 contains the coefficients of a cascade digitallowpass filter. Using D-Filter find the gain and phase shift of the filter at ω = 0.292rad/s assuming a sampling frequency ωs = 10 rad/s.

(b) Find the gain of the filter at ω = 1.68 rad/s assuming the same sampling frequency.

Theory: See Sec. 5.5.1 of [5].

Solution, Part (a): The problem can be solved by finding the time-domain responseproduced by a sinusoidal input of unity amplitude and zero phase angle, i.e., x(nT ) =sinωnT . The amplitude of the output sinusoid at steady state is the gain and its phasedisplacement relative to the input sinusoid is the phase shift of the filter.

To get the sinusoidal response, we do

Analysis > Time Domain > Filter on file > cas dig el lpf.coe >Standard Signals > Sinusoid

On the Standard Signals dialog box, we set the number of samples to 501, the initial n tozero, the sampling frequency to 10 rad/s, and the frequency of the sinusoid to ω = 0.292.We do not need to save the sinusoidal input signal in an unformatted data file, so we leavethe Save file check-box unchecked. We then click Next and select Plot both to plot the inputand output signals, and accept the default file name for the formatted output file. We clickNext to obtain the required plots and select horizontal tiling to facilitate comparison of thetwo plots. We note that the output starts as a distorted sinusoid but after some 230 samplesa good sinusoidal waveform is obtained as expected from the theory.

6See folder C:\Program Files (x86)\D-Filter\Projects\Data Files.

Page 38: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 38

The amplitude of the output sinusoid after sample 230 appears to be equal to unitywhich would make the gain of the filter at frequency ω = 0.292 rad/s approximately equal tounity. This is to be expected since this frequency is located inside the passband of the filter.A more accurate value of the gain can be obtained by opening and viewing the formattedoutput data file through the actions

File > Open > untitled.txt > Open

The amplitude of the output sinusoid after sample 230, which is numerically equal to thegain of the filter, can be obtained as 0.9998986.

The phase response can be evaluated by reading the phase displacement of the outputsinusoid relative to the input sinusoid. This measurement can be facilitated by changing thelimits of the bottom axis in both input and output plots. We select

Axes limits > Bottom axis

and set the lower and upper limits to, say, 240 and 280, respectively. We note that thevalue of the input sinusoid at sample 242 has moved to location n = 249 in the outputwaveform and thus the displacement of the output sinusoid is 7 sampling periods. Since thesampling frequency ωs is equal to 10 rad/s and the sampling period is given by T = 2π/ωs,the sampling period is 0.6283 s. In other words, the displacement of the output waveformis 7 × 0.6283 = 4.398 s. The period of the input sinusoid extends from sample 242 tosample 277, give or take a little, which yields a period of approximately 34 × 0.6283 =21.362 s. Since 21.362 s correspond to 360◦, the phase shift of the filter works out toapproximately 4.398 × 360/21.362 ≈ 74◦. Since the output waveform is displaced to theright by 74◦ relative to the input waveform, the phase shift is negative, i.e., θ(ω) ≈ −74◦ or−74× 2π/360 = −1.2915 in rads.

Solution, Part (b): Repeating the above experiment with ω = 1.68 rad/s the input andoutput waveforms can be plotted as before. Setting the limits of the bottom axis to 240 to280 and the limits of the left axis to −0.004 and 0.004, we note that the maximum positivevalue of the output sinusoid, i.e., the amplitude of the sinusoid, is 0.003 and it occurs atsample 242. This gives a gain of 0.003 or −50.5 dB. A more precise value of the amplitudeof the output sinusoid can be read in the formatted output file untitled.txt. At sample 242we read an amplitude of 2.709 × 10−3 which works out to a gain of −51.3 dB. The actualgain of the filter at ω = 1.68 rad/s is −52.8 dB and is equal to the negative of the minimumstopband attenuation as specified. The low value of the gain at ω = 1.68 rad/s is to beexpected since this frequency happens to be in the stopband of the filter.

Note that there is no need to find the phase shift of the filter at ω = 1.68 rad/s. This isbecause the phase response of a filter over stopband frequencies is of little practical interestas any stopband signals are deemed to be noise to be rejected.

Page 39: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 39

12.6 Exercise 6 Specifications of Filters

The passband of a lowpass or highpass filter can be deduced by drawing a horizontal linethough the minimum passband gain. The frequency where the horizontal line intersectsthe amplitude response curve, ωp, defines the passband edge. The frequency range 0 to ωp

defines the passband of a lowpass filter and ωp to ωs/2 defines the passband of a highpassfilter. Similarly, the stopband of a lowpass or highpass filter can be deduced by drawinga horizontal line through the maximum of the stopband gain. The frequency where thehorizontal line intersects the amplitude response curve, ωa, defines the stopband edge. Thefrequency range 0 to ωa defines the stopband (or attenuation band) of a highpass filter andωa to ωs/2 defines the stopband of a lowpass filter.

(a) By evaluating and plotting the amplitude response of the filter in Exercise 5(cas dig el lpf.coe) over the baseband, i.e., for the frequency range 0 to ωs/2, deducethe passband and stopband of the filter. The sampling frequency is ωs = 10 rad/s.

(b) Evaluate and plot the amplitude response with respect to the passband. Hence obtainthe gain at frequency ω = 0.292 rad/s in dB.

(c) Evaluate and plot the amplitude response with respect to the stopband. Hence obtainthe gain at frequency ω = 1.68 rad/s in dB.

(d) Compare the values obtained in (b) and (c) with those obtained from the time-domainresponse in Exercise 5.

(e) Evaluate and plot the phase response with respect to the passband. Hence find thephase shift at frequency ω = 0.292 rad/s in degrees. Compare the value obtained withthat obtained from the time-domain response in Exercise 5.

(f) Plot the delay characteristic with respect to the passband.

Theory: See Secs. 5.5.2, 5.8.3, and 11.2.1 in [5].

Solution, Part (a): Amplitude and phase responses as well as delay characteristics canbe obtained by using module Analog/Recursive Filter through the selection

Analysis > Frequency Domain > Analog/Recursive Filter> Filter on file> cas dig el lpf.coe

By selecting Log or Linear the amplitude response can be obtained using either a log orlinear scale for the gain. On the other hand Phase or Group Delay give the phase responseor delay characteristic.

Selecting Log on the Frequency Response dialog box, clicking Next, and entering 10 rad/sas the sampling frequency, 0 and 5 rad/s as the initial and final frequencies, respectively, and,

Page 40: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 40

say, 5017 as the number of frequency points would cause the required amplitude response tobe plotted.

Clicking Next will cause a Save formatted output file window to appear which wouldenable the user to select a customized name for the formatted output file. The typical userwould, as stated before, opt for the default file name, i.e., untitled which will result in aformatted output file untitled.txt.

When the required amplitude response is obtained, the user can redefine the minimumand maximum of the y axis, which would enable one to obtain a well proportioned plot. Thiscan be done by selecting menu Axes limits. For example, one could reset the minimum andmaximum y axes limits by selecting

Axes limits > Left Axis

and entering −90 and 10 in the Minimum and Maximum fields, respectively.

One could also change the minimum and maximum values of the x axis, for example, toview the passband of the filter, by choosing Bottom Axis in stead of Left Axis in the aboveselection. For more information on working with plots see the D-Filter Help system.

Solution, Part (b): To be done.

Solution, Part (c): To be done.

Solution, Part (d): To be done.

Solution, Part (e): To be done.

Solution, Part (f): To be done.

12.7 Exercise 7 Discrete- and Fast-Fourier Transforms

Under Analysis, D-Filter also includes a Fast Fourier Transform module that can be used toobtain the discrete Fourier transform (DFT) of a signal or the inverse DFT.

Once activated, the module can be executed by selecting Standard signals, Input on fileor New input. Input on file will allow the user to access an unformatted data file of the typefilename.fft. The data file should include the number of points N , which must be a powerof 2, in the first line followed by columns of the real and imaginary parts of the signal to beanalyzed (see the D-Filter Help System). A file filename.fft can be created by selecting Newinput. A large variety of standard examples can be accessed by selecting Standard signals.

In this exercise, we use the DFT module to obtain the DFT of a signal comprising a sumof two sinusoids, namely,

7The number of points should be large enough to get a smooth curve and 501 is large enough for mostcircumstances.

Page 41: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 41

x(nT ) = A1 sinω1nT + A2 sinω2nT

where A1 = 1.0, A2 = 2.0, ω1 = 1, and ω2 = 2 rad/s.

Theory: See Chap. 7 of [5].

Solution: A signal which is a sum of sinusoids can be generated by selecting

Analysis > Discrete Fourier Transform > Standard signals

Once we select the Standard signals option in the DFT Input dialog box, we click theNext button to start the DFT Standard Signals dialog box. Here we select Sum of sine wavesin the Sine Wave group. We enter 256 for the number of points, which is a power of 2.

When Next is clicked, a second dialog box requests the number of frequency componentsas well as the frequency and amplitude for each component. We enter 2 for the number offrequency components and then enter a frequency of 1 rad/s and amplitude 1 for the firstcomponent and a frequency of 2 rad/s and amplitude 2 for the second component.

Immediately after, the Transform Type dialog box appears where we select the DFToption. Clicking Next will bring up the Plot Options dialog box. Since we are interested indetermining the DFT of the input signal, we select the Input option in the options group.Input causes the input signal to be plotted, and the DFT/Inverse DFT module plots theDFT or the inverse DFT of the input.

In the Plot group one can select the Real Part, Imaginary Part, Amplitude, Amplitudein dB, or Phase. When we select Real Part and click the Next button, the output data isstored in D-Filter’s data bank and the plot in Fig. 8a is obtained which represents the sumof the two sinusoids. Also, note that the DFT toolbar button is now enabled which can allowus to access the Plot Options dialog box directly since the output data is stored locally inD-Filter’s data bank.

If we click the DFT button on the main toolbar and choose options Output and Ampli-tude, the amplitude spectrum of Fig. 8b is the outcome. The two frequency components andtheir mirror images are clearly evident.

An interesting exercise here would be to click the DFT button to bring up the PlotOptions dialog box again. This time, select the Output option and then check moduleDFT/IDFT. The outcome of this operation would, of course, be the original input signal!

Several other types of signals can be used in this exercise ranging from the usual windowfunctions to several frequently encountered discrete-time signals. In all these exercises, asampling frequency of 2π can be assumed.

Page 42: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 42

(a)

(b)

Figure 8 A signal comprising two sinusoids and its amplitude spectrum:(a) Sum of two sinusoids, (b) amplitude spectrum.

12.8 Exercise 8 Design of a Nonrecursive Filter

Design a bandpass nonrecursive filter with a low cutoff frequency ωc1 = 1.0 rad/s, a highcutoff frequency ωc2 = 2.0 rad/s, and filter length N = 41, assuming a sampling frequencyωs = 6.0 rad/s. Use a Kaiser window with α = 3.5.

Solution: This design is carried out by selecting

Design > Nonrecursive Filters > Filters >Window Method > Fixed Length

The Window Method dialog box will appear where we can choose

Page 43: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 43

• Filter Type: Bandpass

• Window Type: Kaiser

• Parameter Alpha: 3.5

• Input: Parameters of filter as specified.

• Check options to save unformatted and formatted output.

Theory: See Sec. 10.4 in [5].

Clicking Next will bring up the Frequency Response dialog box where we have the optionto plot the gain on a logarithmic or linear scale. Let’s plot the gain using the Log option.After clicking Next, enter 0 and 3 rad/s for the initial and final frequencies, respectively.

After clicking Next, we are prompted to save the output data files and the amplituderesponse plot is generated. Two data files are saved, untitled.txt and untitled.irl, unless wechanged the default filename.

Note that if we choose to generate another amplitude-response plot, this can be done bysimply clicking the sequence

Analysis > Frequency Domain > Nonrecursive Filter > Linear Phase> Stored Filter

and then continuing as before.

Option Nonrecursive Filter can also be used to design nonrecursive filters that wouldsatisfy prescribed specifications. In this mode, the user selects

Design > Nonrecursive Filter > Filters > Window Method> Prescribed Specs

The Window Method dialog is loaded as before but in this case with prescribed specificationsoptions which can be entered more or less in the same way as the parameters in the previousexercise. In this type of design, D-Filter determines the required filter length and appropriatevalue of parameter α for the Kaiser window on the basis of the specifications supplied.

Clicking Next will start the Frequency Response dialog box as before.

12.9 Exercise 9 Amplitude Response of a Cascade AnalogFilter

An analog filter can be represented by the transfer function

Page 44: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 44

H(s) = 0.07076(2.633 + s2)

(0.376 + s)(0.495 + 0.306s+ s2)

(a) Determine what type of filter it might be by obtaining the amplitude response.

(b) Find the passband ripple and minimum stopband attenuation in dB.

Theory: See Sec. 5.8 and Chap. 11 in [5].

Solution: (a) The amplitude response of the filter can be obtained through the sequenceof actions

Analysis > Frequency Domain > Analog/Recursive Filter

which will cause the Select Filter dialog box to pop up. As this is a new filter that is notstored in D-Filter’s data bank, we select the option New filter and click Next to proceedto the next step which will cause dialog box Filter Configuration to pop up. As this is acontinuous-time transfer function, we choose option Analog under Filter Type. We note thatthe transfer function can be expressed as

H(s) = 0.07076

(1

0.376 + s× 2.633 + s2

0.495 + 0.306s+ s2

)As the transfer function is in the product form, it would correspond to a cascade structureand so we select option Cascade under Filter Structure. We then enter 2 for the number offilter sections and H0 = 0.07076 for the multiplier constant.

When we click Next, the Filter Coefficients dialog box will pop up which will enableus to enter the coefficients of the transfer function under consideration. Proceeding as inExercise 1, part (d), we enter 0 and 1 for the numerator and denominator orders of thefirst section in the top part of the dialog box and immediately enter the correspondingcoefficients, i.e., A[0,1]=1.0, B[0,1]=0.376, and B[1,1]]=1.0 in the bottom part of the dialogbox. We then enter 2 and 2 for the numerator and denominator orders of the second sectionin the top part of the dialog box and immediately enter the coefficients of the second section,i.e., A[0,2]=2.633, A[1,2]=0, A[2,2]=1.0 and B[0,2]=0.495, B[1,2]= 0.306, B[2,2]=1.0 in thebottom part of the dialog box.

Clicking Next will cause the Save Unformatted Data Files dialog box to pop up in whichwe need to provide a file name. We can enter a customized file name, say, exe9, and clickbutton Save to save the unformatted data file for later use. No need to provide the extensions.D-Filter will do that automatically.

As mentioned earlier, D-Filter saves two unformatted files for transfer functions in prod-uct form, in the present exercise exe9.coe and exe9.zps. The first file will contain the transferfunction coefficients and the second the zeros and poles of the filter. Either of the two files issufficient to carry out a time- or frequency-domain response. The .zps file is obtained on the

Page 45: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 45

fly from the transfer function coefficients just in case it might be needed for some purposelater on.

Immediately after the Save button is clicked, the Frequency Response dialog box will popup as usual. To get the amplitude response in dB, we allow the default option Log to standand click Next. The Frequency Range dialog box will appear and we can enter, say, 0 for theinitial frequency, 5 for the final frequency, and 501 for the number of points. Clicking Nextwill cause the amplitude response to be plotted and also cause the Save Formatted OutputFile dialog box to appear. We let the default file name, i.e., untitled.txt, stand for reasonsstated earlier and click Save. This will conclude, the amplitude-response session.

We note that the filter under consideration is a lowpass filter of some sort.

(b) In order to examine the behavior of the filter over the passband, we need to obtainan amplitude response over the passband. We note that the frequency-response button, FR,on the toolbar has become active after the first frequency response, which means that wecan obtain new frequency responses without entering the filter coefficients again.

We click button FR and then button Next to get to dialog box Frequency Response.This time, we enter the frequency range 0 to 0.7, click Next and then Save on the SaveFormatted Output File dialog box to complete the frequency response. We note that thepassband amplitude response oscillates between 0 and 1.0 dB. In other words, the passbandripple which is the maximum minus the minimum passband amplitude response is 1.0 dB.

The minimum stopband attenuation is the negative of the maximum stopband gain whichcan be estimated using the Cross Hair option of D-Filter. Returning to the first amplituderesponse by clicking on its window, we note that the stopband amplitude response has amaximum between −40 and −30 dB at a frequency in the range 2.0 to 3.0 rad/s. We notealso that pull-down menus Color options, Preferences, and Axes limits have become activeon the toolbar.

Selecting Preferences > Cross Hair will cause the cross hair to appear on the frequency-response window and the X,Y coordinates of the intersection of the cross hair will be dis-played at the bottom right-hand corner of the D-Filter window. By placing the intersectionof the cross hair at the point of maximum stopband gain using the mouse, the frequencyof the maximum stopband gain as well as its value can be read as the X, Y coordinates ofthe intersection. These values can be obtained as 2.6 rad/s and −34.9 dB give or take alittle depending on where the cross-hair intersection is placed. In other words, the minimumstopband attenuation, is 34.9 dB.

There is another and perhaps more accurate way of estimating the maximum stopbandgain. This approach relies on a built-in feature of D-Filter. Typically, D-Filter fixes themaximum and minimum Y-axis limits as the maximum and minimum values of the amplituderesponse. However, when a transfer function has zeros on the unit circle of the z plane,evaluating the amplitude response at a frequency that corresponds to a point close to a zeroof the transfer function can cause the amplitude response to assume a value close to zerowhich would correspond to a very large negative value in dB, actually −∞ if the frequency

Page 46: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 46

corresponds to a zero on the unit circle exactly. Because of this fact of life, specifying a largenumber of frequency-response points could cause a poorly displayed amplitude response. Toensure that amplitude-response plots are well proportioned, D-Filter has default values forthe minimum and maximum Y-axis limits, namely, −100 dB for the minimum Y-axis limitand the maximum value of the amplitude response for the maximum Y-axis limit. There arealso default X axis limits, typically, the initial and final frequencies. However, the user canchange the default values both for the X as well as the Y axis. This can be done by usingpull-down menu Axes limits. See Help for details.

The above built-in features of D-Filter render the estimation of the minimum stopbandgain very easy. What we can do in the present exercise is to run yet another frequencyresponse over the frequency range 2.5 to 3.0 rad/s. This amplitude response has a welldefined maximum of −35.06 dB and the frequency of the maximum can be determinedaccurately as 2.72 rad/s by using the Cross Hair option. In other words, a more accurateestimate of the minimum stopband attenuation is 35.06 dB.

Summarizing, we have found out that the passband and stopband gains oscillate between0 and −1.0 dB and between −∞ and −35.06 dB, respectively. We conclude, therefore, thatthis appears to be an elliptic lowpass filter. It should be mentioned, that on the basis ofthese measurements the possibility that this is not an elliptic lowpass filter cannot be ruledout because filters whose amplitude responses resemble responses of elliptic filters can beobtained by using optimization methods. However, in the present exercise we know for surethat this is an elliptic lowpass filter because it was designed by D-Filter using the AnalogApproximations module to start with.

12.10 Exercise 10 Frequency Response of a Parallel Digital Filter

The transfer function of a digital filter is

H(z) =

(0.094541− 0.50469z − 0.55242z2

0.26664− 0.69327z + z2+−0.055075 + 0.54046z + 0.55759z2

0.16207− 0.77545z + z2

)(10)

and the sampling frequency is 20 rad/s.

(a) Deduce what type of filter it might be on the basis of the amplitude response.

(b) Obtain the phase response.

(c) Obtain the delay characteristic.

Theory: A parallel arrangement of K digital-filter sections can be represented by thetransfer function

H(z) = H0

(K∑j=1

Hj(z)

)(11)

Page 47: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 47

where

Hj(z) =K∑j=1

a0j + a1jz + · · ·+ aMjzMj

b0j + b1jz + · · ·+ bNjzNj

In the above equations, Mj and Nj are the numerator and denominator orders of the jthpartial transfer functions, respectively, and H0 is a multiplier constant.

Upon comparing Eqs. (10) and (11), we note that K = 2, i.e., the transfer functionunder consideration can be realized using 2 digital-filter sections in parallel, the numeratorand denominator orders of both partial transfer functions are all 2, and H0 = 1.0.

See Secs. 5.5.5 and 9.2.6 in [5] for details.

Solution: (a) This exercise is similar to Exercise 9 except that we now have a digital filterwhich is represented by a discrete-time transfer function in the sum form. As before weselect

Analysis > Frequency Domain > Analog/Recursive Filter

which will cause the Select Filter dialog box to pop up. We select option New filter as thisis a new filter and click Next to proceed to the next step which will cause dialog box FilterConfiguration to pop up. As this is a discrete-time transfer function, we choose Digital underFilter Type and as the transfer function is in the sum form, we select Parallel under FilterStructure. We then enter the number of filter sections, i.e., 2. We would normally enter themultiplier constant, H0, but as this happens to be unity in the present exercise, we allow thedefault value, H0 = 1, to stand.

Clicking Next will cause the Filter Coefficients dialog box to pop up. We enter thetransfer function coefficients as in Exercise 9, and click Next. This will cause a window topop up with the following warning:

“Only an unformatted coefficient data file was created and not an un-formatted zeros and poles data file since the data represents a transferfunction in the sum form. Sections must be in cascade to output data aszeros and poles.”

This is telling us, in effect, that D-Filter will save only a .coe unformatted data file in thepresent exercise. As mentioned in Exercise 9, D-Filter saves both a .coe as well as a .zps filein situations where the transfer function is in the product form just in case there might be aneed for the .zps file for some purpose later on. However, there is nothing to worry about inthe present exercise because either a .coe or a .zps file is entirely sufficient to carry out anytime- or frequency-domain analysis because each of these files contains complete informationabout a filter. If the zeros and poles are needed for some purpose in a situation where thetransfer function is in the sum form, for example, if one wants to obtain a cascade realization,the transfer function can be converted from the sum to the product form to start with using

Page 48: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 48

routine algebra8 and after that the roots of the numerator and denominator polynomials canbe evaluated by using module Roots of Polynomials, for example, but that’s another story.

Clicking OK on the warning window will close it and cause dialog box Save CoefficientFile to pop up on which a customized file name can be entered for the unformatted datafile. We can enter, say, exe10, which will be expanded by D-Filter into exe10.coe. When weclick button Save, the unformatted coefficient data file exe10.coe will be saved in the currentHome folder of D-Filter and the Frequency Response dialog box will immediately pop up.

To get the gain of the filter in dB, we select option Log and click Next which will cause theFrequency Range dialog box to pop up. On this dialog box, we enter the sampling frequencyin rad/s as given, i.e., 20, the initial frequency, say, 0, the final frequency, say, the Nyquistfrequency which is half the sampling frequency, i.e., 10, and the number of points for thefrequency response, say, 501. The default minimum gain of −100 dB which corresponds to anattenuation of +100 dB can be left unchanged. Option Save output file can be left checkedwhich will cause D-Filter to produce an output text file. If there are no issues, clicking Nextwill cause the amplitude response to be plotted with respect to the Nyquist frequency rangeand it will also cause dialog box Save Formatted Output File to pop up. This provides anopportunity to the user to change the default file name from, untitled.txt to a customizedname if need be. In this case, it is preferable to enter a customized name, say, exe10 whichwill be expanded into exe10.txt. Don’t forget, a file with a customized name cannot beoverwritten without the consent of the user whereas a file with the default name untitled.txtwill be overwritten every time without warning. Clicking Next will cause D-Filter to saveformatted file exe10.txt in the current Home folder of D-Filter and then finish the analysis.At this point, the Frequency Response (FR) button on the toolbar becomes active and canbe used to obtain any number of frequency responses one after the other.

From the amplitude response, we conclude that this is a lowpass filter with a monotonicdecreasing gain which could be either a Butterworth or a Bessel-Thomson filter.

(b) If this part of the exercise is carried out in one and the same D-Filter session aspart (a), all the user needs to do is to click the Frequency Response button FR which willcause the Frequency Response dialog box to pop up. Clicking the Next button will causethe Frequency Range dialog box to appear. The sampling frequency, initial frequency, andnumber of points can be entered as in part (a); however, for the final frequency, we entera frequency at the lower end of the Nyquist range, say, 4 rad/s, as we are dealing witha lowpass filter of some type. Clicking Next causes the phase response to be plotted andtriggers the Save Formatted Output File dialog box. Most of the time a formatted outputfile is not needed for any particular reason, so we accept the default file name untitled.txt.This will soon be overwritten by another untitled.txt file but if an unanticipated need for thefile should arise, we just run the session again. Computer time is pretty inexpensive thesedays. Clicking Save will save the output file and conclude the phase-response analysis. Thephase response obtained is illustrated in Fig. 9.

Evidently, the phase response is approximately linear over the frequency range 0 to 3.2

8Unfortunately, D-Filter is not very good with algebra.

Page 49: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 49

rad/s and this would suggest that we are dealing with a Bessel-Thomson filter.

Figure 9 Phase response for Exercise 10.

If part (b) of this exercise is carried out in a new D-Filter session, then we would needto select the sequence

Analysis > Frequency Domain > Analog/Recursive

which will cause the Select Filter dialog box to pop up. We then accept the default optionFilter on file and click Next to proceed to the next step. Dialog box Open Filter Coefficientor Zeros/Poles File will pop up which will enable us to select the file that contains the inputdata from the Home folder. We select file exe10.coe which was saved in part (a) of theexercise and then click button Open. This action will cause the Frequency Response dialogbox to pop up. From this point on, we proceed as in the case where the phase response wasobtained during one and the same session.

(c) A group-delay characteristic can be constructed by selecting Group Delay in theFrequency Response dialog box. Specifying the same frequency range as in part (b) willcause D-Filter to plot the delay characteristic shown in Fig. 10. As can be seen the groupdelay of the filter is approximately constant over the range 0 to 1.6 rad/s and, therefore, thisis almost certain to be a Bessel-Thomson filter. Actually, it is. It was designed by D-Filterin the first place.

Page 50: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 50

Figure 10 Phase response for Exercise 10.

Note that D-Filter uses a numerical method to calculate the group delay and if thefrequency range specified includes a zero on the imaginary axis of the s plane in an analogfilter or on the unit circle of the z plane in a digital filter, a discontinuity in the phaseresponse will be encountered which will cause D-Filter to compute an incorrect value for thegroup delay. This would, of course, occur only in a stopband where the group delay is of noparticular interest in practice. In such a case, D-Filter will display a warning message andspecify the frequency range to be avoided.

At this point, we may decide to save the amplitude- and phase-response plots in a Wordfile. To do that, we select

File > Save as Word

A Word document titled “Document1” will pop up containing the amplitude- and phase-response plots. Actually, D-Filter will export all the existing plots in the D-Filter windowto a Word file but if we need to export just one of them, we can delete those that are notneeded by clicking the x button on these windows.

The Word file can be saved in any one of the standard formats offered by Word, forexample, as a .docx or .pdf file. We can choose a file name, say, exe10.pdf.

Note that if a Word document titled “Document1” that contains some other material isalready open, a diagnostic window with the message

“The open graphs are being inserted into the Word document titled “Document1”.

will pop up when File > Save as Word is selected. Clicking button OK will cause any plotsin the D-Filter window to be inserted at the bottom of the existing material in Document1.

We can also export a plot into the Adobe Illustrator which would enable us to convertthe format of the plot file into any one of the available Illustrator formats. To obtain an .epsfile for the delay characteristic, for example, we can proceed as follows:

Page 51: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 51

1. Ensure that only the delay-characteristic window is displayed in the D-Filter window,i.e., delete any other windows if some are displayed.

2. Open a blank document in the Illustrator.

3. SelectFile > Copy to clipboard

in D-Filter.

4. Select Edit > Paste in the Illustrator to paste the delay characteristic in the Illustratordocument.

5. Select File > Save As which will cause the Save As dialog box of Windows to popup.

6. Click the Save as type button and select option Illustrator EPS.

7. Enter a file name, say, exe10.eps, in the File name field.

8. Browse to the desired folder, say, the Home folder of D-Filter, and click button Saveon the Save As window to save the delay characteristic.

Note that if there are more than one plot in the D-Filter window, only one plot will besaved in the Clipboard, the one that is active. In other words, it is important to click onthe plot that needs to be converted into an .eps file. If there is a need to obtain an .epsillustration containing more than one plot, then the user would need to transfer the plots tothe Illustrator one at a time.

Another way to export multiple plots from D-Filter to the Illustrator is to copy theminto a Word document using the selection

File > Save as Word

which will cause all the plots to be copied into Word document “Document1”. After that anew Illustrator document is opened and the plots can be copied from the Word documentand pasted into the Illustrator document one by one. After that, the file can be saved in oneof the available Illustrator formats, e.g., the .pdf or .eps format.

12.11 Exercise 11 Realization of a Recursive Filter

Obtain a parallel canonic realization of transfer function in Exercise 10.

Theory: See Chap. 9 in [5].

Solution: Since the transfer function coefficients reside in file filter2.coe from the previousexercise, the necessary actions are

Page 52: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 52

Realization > Cascade or Parallel Canonic > Filter on File > filter2.coe

and the Realization Methods dialog box will appear. Select the Cascade or Parallel Canonicoption and we click the Done button. When the data is read by D-Filter, we will be promptedto save the data to an output formatted file. After saving, D-Filter will automatically displaythe output text file in the built-in text editor.

Note that the realization obtained will be a cascade or parallel realization depending onwhether the transfer function is in the product or sum form. In this example, we will get aparallel realization since the transfer function in file filter2.coe is in the sum form.

The formatted file produced can also be read with one of the Windows editors such asNotepad or WordPad.

12.12 Exercise 12 Analog-Filter Approximations

A normalized, lowpass, elliptic, analog filter is required that would meet the following spec-ifications:

• Passband ripple Ap = 1.0 dB

• Minimum stopband attenuation Aa = 60.0 dB

• Passband edge ωp = 0.9 rad/s

Obtain the required continuous-time transfer function.

Theory: See Chap. 11 in [5].

Solution: The necessary actions are

Design > Recursive > Analog Approximations

Upon completion of these actions, a dialog box entitled Choose Analog Approximation isstarted which will allow us to enter the filter specifications, namely, Ap, Aa, and the filterselectivity k which is equal to the square of the passband edge. We select the option EllipticApproximation and enter 1 for Ap, 60 for Aa, and 0.92 = 0.81 for k. We also have the optionof saving both the unformatted and formatted output data files. Let’s go ahead and saveall the data files as exe12 with no file extension. D-Filter will save 3 data files, exe12.coe,exe12.zps, and exe12.txt and attach the required file extensions for us. The formatted datafile exe12.txt will contain the required continuous transfer function information.

When the filter specifications are entered we are prompted to save the output data filesand a zero-pole plot will be produced. The zero-pole plot shows that the poles are locatedon an elliptical pattern and the zeros are on the imaginary axis of the s plane. The solidcircle, which may often appear as an ellipse that depends on the aspect ratio of the window,is the unit-circle |z| = 1.

Page 53: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 53

12.13 Exercise 13 Analog-Filter Transformations

(a) Apply the analog-filter lowpass-to-bandpass transformation to the continuous-timetransfer function obtained in Exercise 12 using the transformation parameters ω0 = 1.5and B = 0.75.

(b) Check your design by plotting the amplitude response of the filter obtained.

Theory: See Sec. 11.8 in [5].

Solution, Part (a): We assume that Exercise 12 was completed just before the presentexercise to ensure that data file exe12.zps contains the zeros and poles of the required transferfunction. If this is not the case, Exercise 12 should be repeated at this point.

The necessary actions are

Design > Recursive > Analog Transformations > Filter on file > exe12.zps

and the Analog Approximations dialog box is started where we enter the transformationparameters. Select the Bandpass transformation type and the default values for ω0 and Bhappen to be the same as specified above and we accept them. As in the Analog Approx-imations module, we also have the option to save the unformatted and formatted outputdata files. Upon clicking the Next the zero-pole plot of the bandpass filter will be produced.

At this point, we can check the bandpass transfer function by obtaining the amplituderesponse of the filter. We can do this by simply clicking the Frequency Response button onthe main toolbar to bring up the Frequency Response dialog box. Another way is to select

Analysis > Frequency Domain > Analog/Recursive > Stored filter

In the Frequency Response dialog box, we choose Log > Next and enter a frequencyrange 0 to 4 rad/s. A better plot can be obtained by changing the minimum gain. We dothis by entering −80 in the Minimum gain text box. Finally, we click the Next button toobtain the plot. See Exercise 5 of this document or the D-Filter Help system for more detailson working with plots.

12.14 Exercise 14 Invariant Impulse-Response Method

Design a lowpass filter by applying the invariant impulse-response method to a 6th-orderBessel transfer function using a sampling frequency of ωs = 20.0 rad/s.

Theory: See Sec. 12.3 in [5].

Solution: This design can be performed in three steps as follows:

1. Obtain the Bessel transfer function using module Analog Approximations.

Page 54: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 54

2. Expand the transfer function into partial fractions using module Partial Fractions.

3. Apply the invariant-impulse-response method using module Invariant Time-DomainResponse.

Step 1 can be carried out as in Exercise 12 except that we now select the Bessel approx-imation as

Design > Recursive > Analog Approximations > Bessel-Thomson

and enter 6 for the Filter order. We then make sure the output data files are checked, clickthe ‘Next button and save the files as exe14step1. As mentioned in previous exercises, wedo not need to add a file extension because D-Filter will do it for us. Three files named,exe14step1.coe, exe14step1.zps, and exe14step1.txt will be saved.

Step 2 can be performed through the actions

Analysis > Partial Fractions > Stored Filter

or

Analysis > Partial Fractions > Filter on file > exe14step1.zps

which starts the Partial Fractions dialog box. The Invariant Time-Domain Response modulerequires the transfer function to be a partial fractions expansion where it is represented interms of its residues and poles, namely,

H(z) = K0 +N∑i=1

Ai

z − pi(12)

where in this case, K0 is a constant, Ai is the residue of the pole pi, and N is the orderof the transfer function, which happens to be the same as the number of poles. Data filescontaining a transfer function in terms of its residues and poles carry the file extension .rsd,e.g., filename.rsd.

Since the Invariant Time-Domain Response module requires the transfer function to bea partial fractions expansion as in 12, we select Residues/poles for the output. Name theoutput files as exe14step2 and D-Filter will save 2 data files named exe14step2.txt andexe14step2.rsd. After we save the data files, a residue-pole plot will appear, where the starsymbols (∗) represent the residue positions and the diagonal cross symbols (×) represent thepole positions.

In Step 3, we select

Design > Recursive > Invariant Time-Domain Responses > Stored filter

or

Page 55: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 55

Design > Recursive > Invariant Time-Domain Responses > Filter on file >exe14step2.rsd

and the Invariant Time-Domain Response Methods dialog box will appear. We select theImpulse method and enter the sampling frequency, 20 rad/s. Next we save the formattedand unformatted output data files as exe14step3 and the module concludes with a zero-poleplot of the designed filter.

The design obtained can be checked by obtaining the amplitude response of the filter asin Exercise 10. The phase response and delay characteristic are also important for this filter.If the design has been carried out correctly, the phase response should be approximatelylinear over the range 0 to 1.6 rad/s and the delay should be approximately constant over therange 0 to 2.4 rad/s.

12.15 Exercise 15 Matched-Z Transformation Method

Design a digital highpass filter through the matched-z transformation method using thefollowing procedure:

1. Obtain a 6th-order normalized lowpass inverse-Chebyshev continuous-time transferfunction assuming a minimum stopband attenuation Aa = 45 dB.

2. Apply the lowpass-to-highpass transformation to the transfer function obtained in Step1 assuming the transformation parameter λ = 1000.0.

3. Apply the matched-z transformation method to the highpass transfer function obtainedin Step 2 assuming a sampling frequency ωs = 2.0× 104 rad/s.

Theory: See Sec. 12.5 in [5].

Solution, Part (a): In Step 1, the continuous-time transfer function is obtained byrunning module Analog Approximations, as in Exercise 12. So we select

Design > Recursive > Analog Approximations

and in the Analog Approximations dialog box, we enter 6 for the filter order and 45 dB for theminimum stopband attenuation. If we choose to save the data files as exe15step1, D-Filterwill attach the file extensions automatically and save 3 data files, namely, exe15step1.coe,exe15step1.zps, and exe15step1.txt.

Clicking Next will cause D-Filter to plot the zero-pole plot of the transfer function.

In Step 2, module Analog Transformations can be selected as

Design > Recursive > Analog Transformations > Stored filter

or since this module requires the zero-poles data file we can select

Page 56: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 56

Design > Recursive > Analog Transformations > Filter on file > exe15step1.zps

When the data is loaded, the Analog Transformations dialog box will appear where weselect

Transformation Type > Highpass

and enter 1000 for the transformation parameter λ. If we save the output data files asexe15step2, the resulting zero-pole plot of the transformed transfer function will appear.

In Step 3, we select

Design > Recursive > Matched-Z Transformations > Stored filter

or

Design > Recursive > Matched-Z Transformations > Filter on file > exe15step2.zps

the Matched-Z Transformation dialog box will appear where we enter the specified samplingfrequency, namely, ωs = 2.0× 104 rad/s. The module terminates with the zero-pole plot ofthe required discrete-time transfer function.

Solution, Part (b): To check our design, we obtain the amplitude response of the digitalfilter for the frequency range 0 to 5000 rad/s.

12.16 Exercise 16 Bilinear Transformation Method

Design a Chebyshev bandstop digital filter through the bilinear transformation method usingthe following procedure:

1. Obtain a 6th-order normalized lowpass Chebyshev continuous-time transfer functionassuming a passband ripple Ap = 1.0 dB.

2. Apply the lowpass-to-bandstop transformation to the transfer function obtained inStep 1 assuming the transformation parameters ω0 = 1.5 and B = 0.75 rad/s.

3. Apply the bilinear transformation method to the bandstop transfer function obtainedin Step 2 assuming a sampling frequency ωs = 20.0 rad/s.

Theory: See Sec. 12.6 in [5].

Solution: This exercise proceeds very much like Exercise 15. For Steps 1 and 2, we runmodules Analog Approximations and ‘Analog Transformations, in turn.

In Step 3, we select

Design > Recursive > Bilinear Transformation > Stored filter

Page 57: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 57

or

Design > Recursive > Bilinear Transformation > Filter on file > ex12step2.coe

the Bilinear Transformation dialog box will appear where we enter the specified samplingfrequency, i.e., ωs = 20 rad/s. Module Bilinear Transformation concludes with the zero-poleplot of the discrete-time transfer function.

The bilinear transformation will yield a stable digital filter if the analog filter we use isstable. Therefore, the poles of the digital filter must be inside the unit circle |z| = 1. If thisis not the case, some error has been committed.

To check our design, we obtain the amplitude response of the digital filter for the fre-quency ranges 0 to 3.0 rad/s. If we selected to save the output data files in the BilinearTransformation dialog box, the transfer function of the filter obtained will reside in data fileuntitled.coe unless the default file names were changed in Step 3. Amplitude responses overthe low and high passbands, say, 0 to 1.16 and 1.86 to 3.0 rad/s, respectively, will revealthat we have an equiripple bandstop filter. See Exercise 5 of this document or the D-FilterHelp system for more details on working with plots.

12.17 Exercise 17 Design of a Recursive Bandpass Elliptic Filter

Design a bandpass recursive digital filter that would satisfy the following prescribed specifi-cations:

• Type of approximation: elliptic

• Passband ripple: 1.0 dB

• Minimum stopband attenuation: 50.0 dB

• Low stopband edge ωa1: 3.4 rad/s

• Low passband edge ωp1: 4.4 rad/s

• High passband edge ωp2: 6.2 rad/s

• High stopband edge ωa2: 7.2 rad/s

• Sampling frequency ωs: 20 rad/s

Once the desired filter is obtained, carry out analysis tests to check whether the filterdesigned works as it should and to verify that the prescribed specifications have been met.

Theory: See Chap. 13 in [5].

Solution: The design can be carried out through the following steps:

Page 58: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 58

1. Predict the order n and selectivity k for the normalized lowpass elliptic filter, andthe parameters of the analog-filter transformation. For bandpass filters, these are thecenter-frequency parameter ω0 and bandwidth parameter B.

2. Obtain the analog-filter elliptic approximation.

3. Apply the lowpass-to-bandpass analog-filter transformation.

4. Apply the bilinear transformation.

The computations needed for all the steps can be performed through the menu selections

Design > Recursive > Prescribed Specifications > Bilinear Transformation

Initially, a dialog box titled Design Using the Bilinear Transformation (or DUBT for short)displaying the next step will appear. Each design step can be initiated from this dialog boxby simply clicking Next. The dialog box will remain open until the design is completed orstopped.

So let’s start the design by clicking the Next button. The Prescribed Specifications dialogbox will appear where we can enter all the required specifications. we select Bandpass trans-formation and Elliptic Approximation, and enter all the specified parameters. By default, aformatted output data file will be produced, but that option could be cancelled by clickingthe check box at the bottom left-hand corner of the dialog box. Upon clicking Next on thePrescribed Specifications dialog box, the parameters n, k, ω0, and B, are calculated andstored in D-Filter’s data bank. These data will also be stored in a formatted output file ifthe default output option has not been changed.

We could check the amplitude response of the normalized elliptic lowpass filter at thispoint by clicking FR on the toolbar but let’s assume that D-Filter has done its job, and wemove on. To verify that the design is proceeding according to schedule, we can check thebandpass analog and digital filters later on. If anything suspicious should turn up at thattime, we can always retrace our steps to check intermediate results.

The second step of the design process is initiated by clicking Next on the DUBT dialogbox. As a result, the Analog Approximations dialog box will appear pre-loaded with theoutput data produced by the Prescribed Specifications module, which are the parameters ofthe required normalized lowpass filter. Therefore, all we need to do at this point is to decidewhether we want to save the output data. Saving formatted and unformatted data files isnot necessary because all D-Filter modules save their outputs in the D-Filter data bank.However, doing so would enable the user to save intermediate results for archiving purposes.Upon clicking Next, the zero-pole plot of the required normalized elliptic lowpass filter willbe generated as shown in Fig. 11.

Page 59: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 59

Figure 11 Zero-pole plot for Exercise 17.

Note that the design process can be stopped at any time by clicking the Cancel buttonon the DUBT dialog box. One would do this, of course, in the event where a wrong menuchoice has been made or an erroneous specification has been entered by accident.

The third step of the design process is initiated by clicking Next on the DUBT dialogbox to start the Analog Transformations dialog box. As in the case of the Analog Ap-proximations dialog box, the Analog Transformations dialog box opens with the outputs ofprevious modules pre-loaded. In other words, the Analog Transformations module inheritsthe parameters of the normalized elliptic filter from the Analog Approximations module, andthe type of transformation and the transformation design parameters, ω0 and B, from thePrescribed Specifications module.

At this point in the design, a check might be in order to see whether we have a band-pass elliptic analog filter. The filter should have the correct passband ripple and minimumstopband attenuation but the actual band edges should all be larger than the specified oneswith the difference between specified and actual band edge increasing with frequency due tothe warping effect (see Chap. 12 of [5]). We can perform a frequency-domain analysis on thestored filter data by clicking button FR on the main toolbar or by selecting

Analysis > Frequency Response > Analog/Recursive Filter > Stored filter

Of course the toolbar option is the easier of the two. Either of these actions will causethe Frequency Response dialog box to appear. Select the Log Gain type, click Next andenter 0 and 30 rad/s for the initial and final frequencies respectively as well as 301 for thenumber of points. The resulting plot should show the passband and stopbands clearly, as inFig. 12a. Improved resolution for the passband ripple can be achieved by obtaining anotheramplitude response for the frequency range 5.25 to 9.4 rad/s with 301 points, as illustratedin Fig. 12b. As can be seen in these plots, both the passband ripple and minimum stopbandattenuation satisfy the specifications.

Page 60: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 60

For the final step, we click Next on the DUBT dialog box one more time to bring upthe Bilinear Transformation dialog box. Again, the parameters of the analog prewarpedbandpass filter and the specified sampling frequency would be retrieved from the D-Filterdata bank. Clicking Next on the Bilinear Transformation dialog box, the design of therequired denormalized bandpass digital filter will be completed, and the zero-pole plot forthe design at hand will be generated. To close the DUBT dialog box, and store the outputdata into D-Filter’s data bank as well as in formatted and unformatted output data files ifneed be, simply click Next for the last time. D-Filter will end the design with a resoundingping.

In order to check the final design, we simply click on FR on the main toolbar, and choosethe Log option and then click Nex button. The sampling frequency in the dialog box shouldbe 20 rad/s. To look at the amplitude response over the entire baseband, we choose thefrequency range 0 to 10 rad/s, and 301 points should be sufficient; if a better resolution isnecessary, we could increase this value to 501 points. The plot of the amplitude responseshown in Fig. 13a should appear. We can check the passband by changing the initial andfinal frequencies to 4.4 and 6.2 rad/s, respectively. Recall that these are the passband edges.We should note that the ripple never exceeds 1 dB as in Fig. 13b. To check that the lowand high stopbands satisfy the prescribed specifications, amplitude responses can be plottedfor the frequency ranges 0 to 3.4 rad/s and 7.2 to 10 rad/s. We will see that in both casesthe minimum stopband attenuation is just over 56 dB, which exceeds the minimum valuespecified.

Page 61: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 61

(a)

(b)

Figure 12 Amplitude response of analog bandpass filter of Exercise 17:(a) Frequency range 0 to 30 rad/s, (b) frequency range 5.25 to 9.4 rad/s.

Page 62: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 62

(a)

(b)

Figure 13 Amplitude response of digital bandpass filter of Exercise 17:(a) Entire baseband, (b) passband.

A phase response for the entire baseband, i.e., 0 to 10 rad/s, is obtained by selectingthe Phase option in the Frequency Response dialog box and the resulting plot as shown inFig. 14a and one with respect to the passband, i.e., for frequencies in the range 4.4 and 6.2rad/s as shown in Fig. 14b will be obtained. The group-delay characteristic with respect tothe passband can be obtained by selecting Delay option as shown in Fig. 15.

Page 63: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 63

(a)

(b)

Figure 14 Phase response of digital bandpass filter of Exercise 17:(a) Entire baseband, (b) passband.

Figure 15 Group-delay characteristic for digital bandpass filter of Exercise 14.

We could also run a number of time-domain responses. The impulse response of thedesigned digital filter is obtained by clicking the Time-Domain Response button TR on themain toolbar or by running Time Response module through the actions

Page 64: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 64

Analysis > Time Domain > Stored filter

Either option would start the Time-Domain Response dialog box where we select the Stan-dard signals option and click Next. We choose the Unit impulse option, enter 101 and 0 forthe number of samples, and the location of the impulse, respectively. The impulse responseshould be as shown in Fig. 16.

Figure 16 Impulse response for digital bandpass filter of Exercise 17.

To demonstrate that our bandpass filter will pass frequency components in the passbandand reject frequency components in the stopbands, we can find the time-domain responsesproduced by sinusoidal waveforms. To do so, we click the TR button on the toolbar dialogbox, select the Standard signals option, and click Next. We choose the Sinusoid option, enter101 and 0 for the number of samples and starting point of the sinusoid, respectively. Nextwe set the sampling frequency to 20 rad/s and choose a frequency in the passband, say, 5.0rad/s and obtain the sinusoidal response by clicking Next.

In some rare situations, D-Filter has some difficulty coping with the numerical values ofthe left axis. To see the numerals, one sometimes would need to change the minimum andmaximum values of the left axis. This can be done by clicking on the Axes Limits pull-downmenu. Alternatively, one could click on the left axis to get a pop-up menu. Choosing -1.2for the minimum and 1.2 for the maximum will show that the amplitude of the signal isapproximately equal to unity, as depicted in Fig. 17a.

To show that a sinusoidal signal with a frequency in the lower stopband, try anothersinusoidal time-domain response with a frequency of, say, 0.5 rad/s, using 201 and 301sample points. The time-domain response shown in Fig. 17b is obtained in this case. As canbe seen, the amplitude of the sinusoid rapidly diminishes to a very low level soon after aninitial transience.

Page 65: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 65

(a)

(b)

Figure 17 Sinusoidal response of digital bandpass filter of Exercise 17:(a) Frequency = 5.0 rad/s, (b) frequency = 0.5 rad/s.

As a final step, we could go to Realization and select one of the standard realizationprocedures. This module will save the required structure in formatted file, untitled.txt,unless we enter a new file name.

12.18 Exercise 18 Design of Nonrecursive Bandstop Filter Usingthe Remez Algorithm

Design a nonrecursive bandstop digital filter that would satisfy the following specifications:

• Passband ripple of low passband Ap1: 1.0 dB

• Passband ripple of high passband Ap2: 0.5 dB

• Minimum stopband attenuation Aa: 45.0 dB

• Low passband edge ωp1: 1.0 rad/s

Page 66: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 66

• Low stopband edge ωa1: 1.2 rad/s

• High stopband edge ωa2: 2.0 rad/s

• High passband edge ωp2: 2.2 rad/s

• Sampling frequency: 2π rad/s

Theory: See Chap. 15 in [5].

Solution: Two methods are available for the design of filters that should satisfy prescribedspecifications, the Fourier series method in conjunction with the Kaiser window function andthe Remez method. We choose to use the Remez method which is known to yield equirippleoptimal designs.

Two options are available for the Remez method, namely,

• Fixed Length

• Prescribed Specifications

The first option is used when a filter of fixed length N is required and the second whenthe filter length is unknown but the specifications of the filter are given, as in the presentexercise. To run module Remez Method, we select

Design > Nonrecursive > Filters > Remez Method

After the selection, the Remez Optimization dialog box is started where we first need toselect

Design Type > Prescribed Specifications

and enter 3 for the Number of bands under Specifications. The default number of bands is3, so there is no need to change it, but if you decide to enter a different design, the stringgrid containing the band information will update dynamically.

Let’s go ahead and enter the information for each of the bands. Band #1 is a passbandwith a gain of unity and a passband ripple Ap1 = 1.0 dB with a left band edge of 0 and aright band edge of ωp1 = 1.0 rad/s. So we enter 1.0, 1.0, 0, and 1.0 in the four fields forBand #1.

Note that when entering the values in the bands string grid, we can use the arrow keyson our keyboard to navigate through the cells. This can save time as opposed to clickingthe cells and then typing the data.

Band #2 which is a stopband with a gain 0, minimum stopband attenuation Aa = 45.0dB with a left band edge of ωa1 = 1.2 and a right band edge of ωa2 = 2.0 rad/s. So we enter0, 45.0, 1.2, and 2.0 in the four fields.

Page 67: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 67

The specifications for Band #3 are 1.0 for gain, 0.5 for passband ripple, 2.2 for left bandedge, and π (Nyquist frequency) for right band edge.

Next, we need to select one of the three available search methods, namely,

• Exhaustive search

• Selective search

• Selective search with cubic interpolation

These methods decrease in efficiency and sophistication from the first to the third, andone would normally choose the first one which, by the way, is the default method. If for anyreason convergence difficulties are encountered, one of the other methods can be tried. Thedifferences among these methods are detailed in Chap. 15 of [5].

We also have the option to select the delay between iterations in milliseconds, let’s select250 ms for this example. This option can help the user observe the error behavior betweeniterations during the course of the optimization. The default maximum number of iterationsis 30 and sufficient for this design, in fact this design only requires 15 iterations to convergeto a solution.

When the desired search method is selected, clicking Run will start the design. D-Filterfirst predicts a filter length (N = 57 in the present exercise) and carries out designs asnecessary until the most economical design that meets the specifications is achieved (N = 61in the present exercise). While doing so, it displays the current filter length and iterationnumber at the top left-hand corner of the window and demonstrates the action of the Remezalgorithm by plotting the error function at the sample points at the end of each iteration.

As the iteration number is increased the magnitude of the error tends to become moreand more equiripple. When the required design is obtained, action stops and NonrecursiveAmplitude Response button, namely, button NR on the main toolbar is enabled. Thisindicates that the amplitude response of the filter obtained can be computed. Clicking theNR button on the main toolbar will start the Frequency Response dialog box. If we selectthe Log option, click Next, and enter a frequency range 0 to π rad/s with 301 points, theamplitude response with respect to the baseband will be obtained as shown in Fig. 18a.High resolution amplitude responses for the stopband and the two passbands can similarlybe plotted as shown in Fig. 18b, Fig. 19a, and Fig. 19b. Note that the required specificationshave been met.

Page 68: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 68

(a)

(b)

Figure 18 Amplitude response of digital bandstop filter of Exercise 18:(a) Entire baseband, (b) stopband.

Page 69: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 69

(a)

(b)

Figure 19 Amplitude response of digital bandstop filter of Exercise 18:(a) Low passband, (b) high passband.

It should be mentioned that the Remez algorithm has been designed on the basis ofa normalized sampling frequency of 2π rad/s. Consequently, for an arbitrary samplingfrequency ωs, the band edges must be scaled before a design is attempted, i.e., the actualband edges must be multiplied by 2π/ωs.

13. Conclusions

D-Filter is a flexible and user-friendly Windows-based software package that can be used toanalyze, design, and realize digital filters. The program is highly modular, includes a goodgraphical user interface, and saves data in terms of certain standard data structures at everystage of the design process. In consequence, specific processes can be repeated and checkedany number of times until the designer is happy with the results.

While the software package was initially developed as a laboratory tool, progress made sofar leads us to believe that D-Filter can also serve as an invaluable design tool for practicing

Page 70: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

User’s Guide for D-Filter 70

engineers and scientists involved with signal processing.

Page 71: DIGITAL FILTERS - University of Victoriadsp/help/usersguide.pdflatest edition Digital Filters, Analysis, Design, and Signal Processing Applications [5]. The original goal was to develop

Bibliography

[1] A. Antoniou, Digital Filters: Analysis and Design, New York: McGraw-Hill, 1978.

[2] Wu-Sheng Lu and A. Antoniou, Two-dimensional Digital Filters, New York: MarcelDekker, 1992.

[3] A. Antoniou, Digital Filters: Analysis, Design, and Applications, 2nd ed., New York:McGraw-Hill, 1993.

[4] A. Antoniou Digital Signal Processing: Signals, Systems, and Filters, New York:McGraw-Hill, 2006.

[5] A. Antoniou Digital Filters: Analysis, Design, and Signal Processing Applications, NewYork: McGraw-Hill, 2018.

71