DSPRelated.com

Christopher Felton (@cfelton)

Christopher Felton building DSP digital circuits with MyHDL.

Constrained Integer Behavior

Christopher FeltonChristopher Felton May 26, 2014

Overflow and underflow are not always bugs, they can be useful in DSP when fixed-width integers wrap during processing. Christopher Felton demonstrates with moving-average (recursive-windowed-averager) and CIC filter examples how 2's complement wraparound in MyHDL's modbv cancels between an integrator and a comb via pole-zero cancellation. He also covers fixed-point resizing choices, saturation versus wrap, and how rounding error can accumulate.


Python scipy.signal IIR Filtering: An Example

Christopher FeltonChristopher Felton May 19, 2013

Christopher Felton walks through using scipy.signal IIR filters to demodulate PWM signals, using spectrum and spectrogram analysis to show what works and what does not. He demonstrates using filtfilt to avoid phase delay, compares a single narrow IIR to a very high order FIR, and shows how staged IIR filtering and multirate ideas give much better attenuation. Includes an FPGA-ready MyHDL PWM model.


Python scipy.signal IIR Filter Design Cont.

Christopher FeltonChristopher Felton June 19, 20127 comments

Christopher Felton continues his practical tour of SciPy's iirdesign, moving beyond lowpass examples to show highpass, bandpass, and stopband designs with concise, code-focused explanations. He highlights how ellip and cheby2 let you tighten specifications for sharper transitions, and shows that the iirdesign workflow is consistent across filter types. Read for clear, reusable examples to produce IIR filter coefficients with scipy.signal.


Python scipy.signal IIR Filter Design

Christopher FeltonChristopher Felton May 13, 20124 comments

Christopher Felton walks through designing infinite impulse response filters using scipy.signal in Python, focusing on practical specs and functions rather than theoretical derivations. He explains normalized passband and stopband definitions, gpass and gstop, and shows how iirdesign and iirfilter differ. Plots compare elliptic, Chebyshev, Butterworth and Bessel responses, highlighting steep transitions versus near-linear phase tradeoffs.


Curse you, iPython Notebook!

Christopher FeltonChristopher Felton May 1, 20124 comments

Christopher Felton shares a cautionary tale about losing an ipython 0.12 notebook session after assuming the browser would save his interactive edits. He explains that notebooks at the time required clicking the top Save button to persist sessions, and autosave was not yet available. He recommends basing interactive work on scripts, saving often, and testing export behavior to avoid redoing text, LaTeX, and plots.


scipy.signal calling all developers

Christopher FeltonChristopher 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 FeltonChristopher Felton January 7, 2012

Christopher Felton's review gives a pragmatic take on Ivan Idris's Numpy 1.5 Beginner's Guide, praising its hands-on, exercise-driven approach while flagging several shortcomings. He finds the book a useful starting point for newcomers to Python numerical computing thanks to practical examples and a chapter on testing, but warns the title, incomplete installation guidance, and some factual errors may mislead readers.


Python number crunching faster? Part I

Christopher FeltonChristopher Felton September 17, 20114 comments

Christopher Felton walks through simple benchmarks comparing raw Python, numpy, and PyPy for numeric workloads, and shares what surprised him about performance. He shows that idiomatic Python optimizations such as list comprehensions and built-ins plus the PyPy JIT can sometimes beat a numpy approach for small tests, and explains why native PyPy numpy progress matters for scientific users.


Impulse Response Approximation

Christopher FeltonChristopher Felton August 5, 20113 comments

A stepped-triangular impulse approximation represents an FIR low-pass using a cascade of recursive running-sum filters, offering big savings in computation. Christopher Felton outlines the quantization step that maps a true impulse into three stepped-triangular types and shows how the approximation is built from recursive running-sum and sparse-sum blocks. Inspect the frequency tradeoffs and decide if the efficiency gain is worth the approximation error.


A Fixed-Point Introduction by Example

Christopher FeltonChristopher Felton April 25, 201122 comments

Christopher Felton walks through binary fixed-point representation with clear examples and a simple W=(wl,iwl,fwl) notation. He argues for designing to range and resolution rather than bit counts, then shows how multiplication and addition affect bit growth and alignment. These concrete examples make it easy to see why rounding, resizing, and radix-point bookkeeping are essential in DSP implementations.


Matlab Programming Contest

Christopher FeltonChristopher Felton November 10, 2010

Love puzzles or want to sharpen your MATLAB skills? Christopher Felton highlights MathWorks' biannual MATLAB programming contest, a week-long set of clever algorithm challenges that require only base MATLAB. Whether you're experienced or new, you can compete, compare solutions, or simply study others' code when later phases disclose submissions. No toolboxes or mex files allowed, so it's a pure programming playground for learning and bragging rights.


Re: Frame based audio features for machine learning?

Reply posted 9 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 9 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 9 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 9 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 9 years ago (04/21/2017)
@dszabo the tides might be changing :)

Re: Back to back CIC filters

Reply posted 9 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 9 years ago (04/21/2017)
Wowzers, I cannot get the inline math to work :(

Re: Back to back CIC filters

Reply posted 9 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 9 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 9 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 9 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 10 years ago (08/29/2016)
@Rick your code is available here: https://www.dsprelated.com/showcode/269.php 

Re: Coherent Sampling (Very Brief and Simple)

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

Re: Learning DSP with Python

Reply posted 10 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 10 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 10 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 10 years ago (03/21/2016)
You shouldn't have a problem finding C/C++ DSP examples.

Re: LabView and DSP

Reply posted 10 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 10 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