Christopher Felton building DSP digital circuits with MyHDL.

Constrained Integer Behavior

Christopher Felton May 26, 2014
The wheels go round and round, round and round ...

Integer arithmetic is ubiquitous in digital hardware implementations, it's prolific in the control and data-paths.  When using fixed width (constrained) integers, overflow and underflow is business as usual.

Building with Integers

The subtitle of this post mentions a wheel - before I get to the wheel I want to look at an example.  The recursive-windowed-averager (rwa, a.k.a moving average)...

Python scipy.signal IIR Filtering: An Example

Christopher Felton May 19, 2013

In the last posts I reviewed how to use the Python scipy.signal package to design digital infinite impulse response (IIR) filters, specifically, using the iirdesign function (IIR design I and IIR design II ).  In this post I am going to conclude the IIR filter design review with an example.

Previous posts:

Python scipy.signal IIR Filter Design Cont.

Christopher Felton June 19, 20127 comments

In the previous post the Python scipy.signal iirdesign function was disected.  We reviewed the basics of filter specification and reviewed how to use the iirdesign function to design IIR filters.  The previous post I only demonstrated low pass filter designs.  The following are examples how to use the iirdesign function for highpass, bandpass, and stopband filters designs.

Highpass Filter

The following is a highpass filter design for the different filter...

Python scipy.signal IIR Filter Design

Christopher Felton May 13, 20124 comments

The following is an introduction on how to design an infinite impulse response (IIR) filters using the Python scipy.signal package.  This post, mainly, covers how to use the scipy.signal package and is not a thorough introduction to IIR filter design.  For complete coverage of IIR filter design and structure see one of the references.

Filter Specification

Before providing some examples lets review the specifications for a filter design.  A filter...

Curse you, iPython Notebook!

Christopher Felton May 1, 20124 comments


First, I think ipython is great. I use it daily and always have an ipython terminal open.  But just recently, I was showing off the ipython 0.12 notebook and in the process created a lengthy example while demonstrating the cool features of the ipython notebook.  The example included LaTeX equations, plots, etc.  Since the notebook session was on something of relevance I decided to clean up the session and use it for the beginning of a report.

scipy.signal calling all developers

Christopher Felton January 19, 20122 comments

There has been some chatter on the scipy-dev mailing list lately about enhancing the scipy.signal package.  Unfortunately, there seems to be a split.  Some are going off and starting a new package scikit-signal.  The original developer, Travis Oliphant, appears to have strong interest in seeing the scipy.signal evovle.  If you are interested in signal processing you should check out the mailing lists (

[Book Review] Numpy 1.5 Beginner's Guide

Christopher Felton January 7, 2012

Full Disclosure: The publisher of this book, PACKT, was soliciting reviewers.  I volunteered to review the book and the publisher sent me an e-version of the book.


The following is a review of "Numpy 1.5 Beginner's Guide", "Learn by doing: less theory, more results" by Ivan Idris.  As the title suggests this book is for a beginner.  Either someone who is new to numerical computing with high-level languages (HLL) or someone who is new to the Python...

Python number crunching faster? Part I

Christopher Felton September 17, 20114 comments

Everyone has their favorite computing platform, regardless if it is Matlab, Octave, Scilab, Mathematica, Mathcad, etc.  I have been using Python and the common numerical and scientific packages available.  Personally, I have found this to be very useful in my work.  Lately there has been some chatter on speeding up Python.

From another project I follow, MyHDL, I was introduced to the Python JIT compiler,

Impulse Response Approximation

Christopher Felton August 5, 20113 comments

Recently, I stumbled upon a stepped-triangular (ST) approximation that can be implemented as a cascade of recursive running sum (RRS) filters.  The following is a short introduction to the stepped-triangular approximation.The stepped-triangular approximation was introduced by Jovanovic-Dolecek and Mitra [1] as a quantized approximation of a low-pass filter (LPF).  Figure 1 shows an example of the approximation.


[Figure 1: Stepped Approximation of a LPF...

A Fixed-Point Introduction by Example

Christopher Felton April 25, 201121 comments

The finite-word representation of fractional numbers is known as fixed-point.  Fixed-point is an interpretation of a 2's compliment number usually signed but not limited to sign representation.  It extends our finite-word length from a finite set of integers to a finite set of rational real numbers [1].  A fixed-point representation of a number consists of integer and fractional components.  The bit length is defined...

Matlab Programming Contest

Christopher Felton November 10, 2010

Every 6 months Mathworks hosts an online Matlab programming contest.  If you love or hate Matlab check out the contest.  The group does a really good job putting together the puzzles.  The contest runs for a week and starts today at noon EST (10 Nov 2010).  

If you are an experienced Matlab programmer or new to Matlab it is worth checking out.  Even if you do not intend on submitting solutions.  Also, the problems / puzzles only require the base Matlab...

Re: Frame based audio features for machine learning?

Reply posted 5 years ago (05/21/2017)
Yes, simply concat them together to a flat input to the "machine", it doesn't know what the data is other than it is a collection of features of something.  You...

Re: Need Help In Interpreting Curves in a Chart

Reply posted 5 years ago (05/13/2017)
Rick,That is a good point, I did not look at the full analysis in the article or the previous articles just looked up the plots after you posted the question.  In...

Re: Need Help In Interpreting Curves in a Chart

Reply posted 5 years ago (05/13/2017)
It is time, in the paper they note that the "calibrated" requires more computation time but it increases performance (i.e. decreases MSE error - "significantly minimize...

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
Thanks, that probably occurred because I went to the tips post and "copied" the inlined example instead of just typing it.  Good tip for the future, if I am having...

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
@dszabo the tides might be changing :)

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
Yes, I concede you should be able to do the cancelling (seems the OP proved this via simulation, this thread needs time tags since it gets reordered by thumbs up)....

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
Wowzers, I cannot get the inline math to work :(

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
The OP did try and simulate (stated "conceptually it seems fine, I am not able to prove it right in Matlab").  I think the OP would like a step-by-step proof...

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
@flutekickNo, you are mixing your understanding of the structure of the filter and the math, you are trying to take a short cut with the math.  Start with the equations...

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
No, your math is incomplete (prematurely simplified) you either needto include the multirate polyphase decomposition or use thenon-multirate equations, which would...

Re: Back to back CIC filters

Reply posted 5 years ago (04/21/2017)
No the integrator (accumulators) and the comb sections do not "cancel" each other.  The pole in the integrator is cancel by the zero in the comb so you don't have...

Re: CIC Filter

Reply posted 6 years ago (08/29/2016)
@Rick your code is available here: 

Re: Coherent Sampling (Very Brief and Simple)

Reply posted 6 years ago (06/22/2016)
@chipmuenk nice to see you on here!

Re: Learning DSP with Python

Reply posted 6 years ago (04/08/2016)
@macsdev, I agree pandas is a very useful package.  I don't know if it is just me or if it is a general trend that data folks seem to use column-data whereas signal...

Re: Learning DSP with Python

Reply posted 6 years ago (04/06/2016)
Here is a list of dsprelated posts that have used Python: Pade delay is okay today Autocorrelation and the case of the missing fundamental Generating pink noise Amplitude...

Re: Learning DSP with Python

Reply posted 6 years ago (04/04/2016)
I can provide a little feedback on my experience.  Personally, I have found Python to be a great tool for signal processing (DSP) design and analysis.  It should...

Re: DSP Tutorial with C/C++ code snippets

Reply posted 6 years ago (03/21/2016)
You shouldn't have a problem finding C/C++ DSP examples.

Re: LabView and DSP

Reply posted 6 years ago (02/29/2016)
It has been awhile since I have had a serious look at LabView but my take is that it is useful for some tasks but when you start doing serious development it gets...

Re: Exploring adders: carry select adder any benefits?

Reply posted 6 years ago (02/19/2016)
@jt_eaton, the above was an experiment with FPGA technologies only, and not an all encompassing experiment (e.g. only a subset of vendors).  Not sure I agree with...
At some point in the past I had used a carry-select-adder to meet timing for a larger adder.  I did a little experiment to see how often this is true.  The following...

Use this form to contact cfelton

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address