Skip to content

robertgj/DesignOfIIRFilters

Repository files navigation

DesignOfIIRFilters

This repository contains the files required to build the document DesignOfIIRFilters.pdf that reports my experiments in the design of IIR filters with integer coefficients.

Comments and contributions are welcome!

Repository contents

  • Makefile
  • DesignOfIIRFilters.tex and DesignOfIIRFilters.bib are the TeX source files.
  • build-octave.sh builds a patched local version of Octave and the required numerical libraries and installs the SeDuMi, SDPT3 and YALMIP solvers from their GitHub repositories and forks of the gloptipoly3 and SparsePOP solvers from my repository.
  • patch contains the patch files that have been applied to create forks SparsePOP and
  • batchtest.sh runs the regression tests. It can be run standalone but is intended to be used by the aegis software configuration management system and the output of the script is in aegis format.
  • fig contains the dia files for the line drawings included in DesignOfIIRFilters.tex.
  • src contains the Octave m-files and C++ source required to create the figures and results included in DesignOfIIRFilters.tex.
  • test contains regression test shell scripts for the Octave scripts in src.
  • benchmark contains the shell scripts used to run the benchmarks referred to in DesignOfIIRFilters.pdf.
  • docs contains the source for the web page.

Building DesignOfIIRFilters.pdf

To build DesignOfIIRFilters.pdf, run make in the root directory. The Makefile includes a .mk fragment from the src directory for each Octave m-file test script required to create the figures and results included in DesignOfIIRFilters.tex.

Useful Makefile targets are octfiles, batchtest, cleanall, backup, gitignore, jekyll. If src/name_of_script_test.mk exists, then make name_of_script_test.diary builds any oct- and mex-file dependencies and then runs the corresponding Octave script.

Reproducing my results

The Octave scripts included in this repository generate long sequences of floating point operations. The results shown in DesignOfIIRFilters.pdf were obtained on my system running Octave with a particular combination of CPU architecture, operating system, library versions, compiler version and Octave version. Your system will almost certainly be different to mine. The Octave on-line FAQ discusses this. You may need to modify an Octave script to run on your system. Try relaxing the constraints on the filter design, relaxing the tolerance on the optimised result or changing the relative weights on the filter bands. I endeavour to build the DesignOfIIRFilters.pdf document with user-mode virtual machine QEMU emulation of an Intel Nehalem CPU.

External source code and licensing

Read the licences!

  • Octave, SeDuMi, SparsePOP and SDPT3 have a GPL licence.

  • The YALMIP licence is MIT-style for non-commercial use with an attribution clause.

The src directory contains the following files included from external sources as-is or with modifications:

  • faffine.m, local_max.m, cl2lp.m and cl2bp.m by Selesnick et al.
  • minphase.m by Orchard and Willson from "On the Computation of a Minimum-Phase Spectral Factor", IEEE Transactions on Circuits and Systems-I:Fundamental Theory and Applications, Vol. 50, No. 3, March 2003, pp. 365-375.
  • labudde.m from the Ph.D. thesis of Rehman
  • atog.m and gtor.m from the book "Statistical Digital Signal Processing and Modeling", John Wiley & Sons, 1996, by Hayes

The src directory contains C++ files that use the Octave octfile interface. The Octave on-line FAQ states:

Code written using Octave's native plug-in interface (also known as a .oct file) necessarily links with Octave internals and is considered a derivative work of Octave and therefore must be released under terms that are compatible with the GPL.

The docs directory contains a fork of the Poole theme for the Jekyll static web page generator.

All other code is licensed under the MIT licence.