Bayes meets Fourier
Joseph Fourier never met Thomas Bayes—Fourier was born in 1768, seven years after Bayes died. But recently I have been exploring connections between the Bayes filter and the Fourier transform.
By "Bayes filter", I don't mean spam filtering using a Bayesian classifier, but rather recursive Bayesian estimation, which is used in robotics and other domains to estimate the state of a system that evolves over time, for example, the position of a moving robot. My interest in...
Constrained Integer Behavior
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 IntegersThe 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
IntroductionIn 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:
Polyphase Filters and Filterbanks
ALONG CAME POLY
Polyphase filtering is a computationally efficient structure for applying resampling and filtering to a signal. Most digital filters can be applied in a polyphase format, and it is also possible to create efficient resampling filterbanks using the same theories.
This post will walk through a reference implementation of both the downsampling polyphase filter and a downsampling polyphase filterbank using scipy, numpy, matplotlib, and python. It should also highlight some of...
Python scipy.signal IIR Filter Design Cont.
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 FilterThe following is a highpass filter design for the different filter...
Python scipy.signal IIR Filter Design
IntroductionThe 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 SpecificationBefore providing some examples lets review the specifications for a filter design. A filter...
Curse you, iPython Notebook!
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.
[Book Review] Numpy 1.5 Beginner's Guide
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.
IntroductionThe 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...
[Book Review] Numpy 1.5 Beginner's Guide
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.
IntroductionThe 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...
In Search of The Fourth Wave
Last year I participated in the first DSP Related online conference, where I presented a short talk called "In Search of The Fourth Wave". It's based on a small mystery I encountered when I was working on Think DSP. As you might know:
A sawtooth wave contains harmonics at integer multiples of the fundamental frequency, and their amplitudes drop off in proportion to 1/f. A square wave contains only odd multiples of the fundamental, but they also drop off...Curse you, iPython Notebook!
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.
Project update-1 : Digital Filter Blocks in MyHDL and their integration in pyFDA
This blog post presents the progress made up to week 5 in my GSoC project “Digital Filter blocks and their integration in PyFDA”. Progress was made in two areas of the project.
This post will primarily discuss filter block implementation. The interface will be discussed in a later post once further progress is made.
Direct form-I FIR filterThe equation specifies the direct form I...
Autocorrelation and the case of the missing fundamental
[UPDATED January 25, 2016: One of the examples was broken, also the IPython notebook links now point to nbviewer, where you can hear the examples.]
For sounds with simple harmonic structure, the pitch we perceive is usually the fundamental frequency, even if it is not dominant. For example, here's the spectrum of a half-second recording of a saxophone.
The first three peaks are at 464, 928, and 1392 Hz. The pitch we perceive is the fundamental, 464 Hz, which is close to...
Approximating the area of a chirp by fitting a polynomial
Once in a while we need to estimate the area of a dataset in which we are interested. This area could give us, for example, force (mass vs acceleration) or electric power (electric current vs charge).
Project update-2 : Digital Filter Blocks in MyHDL and their integration in pyFDA
This is an exciting update in the sense that it demonstrates a working model of one important aspect of the project: The integration or ‘glue’ between and Pyfda and MyHDL filter blocks.
So, why do we need to integrate and how do we go about it?
As discussed in earlier posts, the idea is to provide a workflow in Pyfda that automates the process of Implementing a fixpoint filter in VHDL / Verilog, and verify the correct performance in a digital design environment. MyHDL based...
Constrained Integer Behavior
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 IntegersThe 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)...
Autocorrelation and the case of the missing fundamental
[UPDATED January 25, 2016: One of the examples was broken, also the IPython notebook links now point to nbviewer, where you can hear the examples.]
For sounds with simple harmonic structure, the pitch we perceive is usually the fundamental frequency, even if it is not dominant. For example, here's the spectrum of a half-second recording of a saxophone.
The first three peaks are at 464, 928, and 1392 Hz. The pitch we perceive is the fundamental, 464 Hz, which is close to...
Constrained Integer Behavior
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 IntegersThe 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)...
Approximating the area of a chirp by fitting a polynomial
Once in a while we need to estimate the area of a dataset in which we are interested. This area could give us, for example, force (mass vs acceleration) or electric power (electric current vs charge).
Project Report : Digital Filter Blocks in MyHDL and their integration in pyFDA
The Google Summer of Code 2018 is now in its final stages, and I’d like to take a moment to look back at what goals were accomplished, what remains to be completed and what I have learnt.
The project overview was discussed in the previous blog posts. However this post serves as a guide to anyone who wishes to learn about the project or carry it forward. Hence I will go over the project details again.
Project overviewThe project “Digital Filter Blocks in MyHDL and PyFDA integration" aims...
In Search of The Fourth Wave
Last year I participated in the first DSP Related online conference, where I presented a short talk called "In Search of The Fourth Wave". It's based on a small mystery I encountered when I was working on Think DSP. As you might know:
A sawtooth wave contains harmonics at integer multiples of the fundamental frequency, and their amplitudes drop off in proportion to 1/f. A square wave contains only odd multiples of the fundamental, but they also drop off...[Book Review] Numpy 1.5 Beginner's Guide
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.
IntroductionThe 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...
Project update-1 : Digital Filter Blocks in MyHDL and their integration in pyFDA
This blog post presents the progress made up to week 5 in my GSoC project “Digital Filter blocks and their integration in PyFDA”. Progress was made in two areas of the project.
This post will primarily discuss filter block implementation. The interface will be discussed in a later post once further progress is made.
Direct form-I FIR filterThe equation specifies the direct form I...
Project update-2 : Digital Filter Blocks in MyHDL and their integration in pyFDA
This is an exciting update in the sense that it demonstrates a working model of one important aspect of the project: The integration or ‘glue’ between and Pyfda and MyHDL filter blocks.
So, why do we need to integrate and how do we go about it?
As discussed in earlier posts, the idea is to provide a workflow in Pyfda that automates the process of Implementing a fixpoint filter in VHDL / Verilog, and verify the correct performance in a digital design environment. MyHDL based...