I'm looking at the first order lowpass filter as described in the book "DSP Filters," by John Lane, Jayant Datta, Brent Karley, and Jay Norwood (sadly, I think this book is out of print).
I'm trying to understand this filter as thoroughly as I can.
The difference equation is as follows:
The formulas for determining the coefficients are:
Given the above equations, b runs from 1 to -1. It's 1 when the cutoff frequency is 0, and 0 when the cutoff frequency is a fourth of the sample rate, and finally -1 when the cutoff frequency is half of the sample rate.
Some observations:
The coefficient 'a' seems to be used for normalizing gain as it is the inverse of 'b' and further divided in half since it's attenuating the sum of x[n] and x[n - 1].
x[n] + x[n - 1] serves as a zero on the unit circle and by[n - 1] is a pole, hence it is a one zero, one pole lowpass filter (I think).
x[n] + x[n - 1] by itself would be a lowpass filter with an amplitude of 2 at 0Hz and and 0 at half the sample rate (think of a sine wave at half the sample rate summed with the previous sample, the samples would be out of phase with each other cancelling each other out).
Below a fourth of the sample rate 'b' is positive hence by[n - 1] is adding the previous output to a(x[n] + x[n - 1]). This would cause the filter to filter out more of the input giving it a lower cutoff frequency.
At a fourth of the sample rate 'b' is zero and so by[n - 1] makes no contribution. So all we're hearing is a(x[n] + x[n - 1]).
Above a fourth of the sample rate 'b' is negative hence by[n - 1] is subtracting the previous output from a(x[n] + x[n - 1]). This seems like it's adding a highpass filter component to force the cutoff frequency higher than it could be acheived with x[n] + x[n - 1] alone.
Does the above characterization seem on track?
P.S. I'm also trying to understand how they arrived at cos(2pifc/fs) / (1 + sin(2pifc/fs)). It's described in the book, but the math is currently beyond me, but I'm slowly getting there (any thoughts here are welcome as well).
I'm trying to understand this filter as thoroughly as I can.
The difference equation is as follows:
Code:
y[n] = a(x[n] + x[n - 1]) + by[n - 1]
Code:
b = cos(2pifc/fs) / (1 + sin(2pifc/fs))a = (1 - b) / 2
Some observations:
The coefficient 'a' seems to be used for normalizing gain as it is the inverse of 'b' and further divided in half since it's attenuating the sum of x[n] and x[n - 1].
x[n] + x[n - 1] serves as a zero on the unit circle and by[n - 1] is a pole, hence it is a one zero, one pole lowpass filter (I think).
x[n] + x[n - 1] by itself would be a lowpass filter with an amplitude of 2 at 0Hz and and 0 at half the sample rate (think of a sine wave at half the sample rate summed with the previous sample, the samples would be out of phase with each other cancelling each other out).
Below a fourth of the sample rate 'b' is positive hence by[n - 1] is adding the previous output to a(x[n] + x[n - 1]). This would cause the filter to filter out more of the input giving it a lower cutoff frequency.
At a fourth of the sample rate 'b' is zero and so by[n - 1] makes no contribution. So all we're hearing is a(x[n] + x[n - 1]).
Above a fourth of the sample rate 'b' is negative hence by[n - 1] is subtracting the previous output from a(x[n] + x[n - 1]). This seems like it's adding a highpass filter component to force the cutoff frequency higher than it could be acheived with x[n] + x[n - 1] alone.
Does the above characterization seem on track?
P.S. I'm also trying to understand how they arrived at cos(2pifc/fs) / (1 + sin(2pifc/fs)). It's described in the book, but the math is currently beyond me, but I'm slowly getting there (any thoughts here are welcome as well).
Statistics: Posted by Leslie Sanford — Sun Oct 20, 2024 3:09 am — Replies 0 — Views 36