Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Chapter 6, Single Pole LPF (Equation 6.4)
New Member
June 10, 2015 - 7:39 am
Member Since: June 9, 2015
Forum Posts: 2
sp_UserOfflineSmall Offline

Hi there,

Love the book but kind of stumped on this one. I hesitate to post here because I know it should be easy to figure out, but after scratching my head for far too long I've given up.

The implementation that I've coded yields what seems to be a different frequency response graph than the one posted in Figure 6.3. My frequency response bottoms out around -23dB at nyquist (22.5kHz) at 1kHZ corner frequency. The graph in Figure 6.3 seems to plummet much further however. Here's the code that I have in the process function:

float theta_c = 2.0 * pi * m_fCornerFreq / (float) m_fSampFreq;
float y = 2.0 - cos(theta_c);
float b1 = sqrt(y * y - 1.0) - y;
float a0 = 1.0 + b1;
float xn = pInputBuffer[0];
float yn = a0 * xn - b1 * m_f_Yz1[0];

pOutputBuffer[0] = yn;
m_f_Yz1[0] = yn;

Note that m_fCornerFreq is set to 1000.

Here's a quick screen grab of the graph that I'm getting:


W Pirkle
June 14, 2015 - 9:16 pm
Member Since: January 29, 2017
Forum Posts: 573
sp_UserOfflineSmall Offline

Hi Peej

Wow - you are the first to report this and you are indeed correct. The book figures are incorrect! Your response is the correct one for this filter.

I will add this to the list of stuff to fix or the second edition of the book (not coming out any time soon, but eventually will need to correct this).

Thanks for pointing this out to me!

All the best,


New Member
June 20, 2015 - 3:38 am
Member Since: June 9, 2015
Forum Posts: 2
sp_UserOfflineSmall Offline

Thanks for getting back to me Will. Good to know I was following the correct path at least! :-)

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Chaes: 51

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

jim: 34

JimmyM: 33

Gwen: 32

Member Stats:

Guest Posters: 1

Members: 696

Moderators: 1

Admins: 5

Forum Stats:

Groups: 13

Forums: 41

Topics: 757

Posts: 2894

Newest Members:

Jas, Rowan, sojourn, fabhenr, rg1, Niklas, Wutru, Tim Campbell, Danny Jonel, Valentin

Moderators: W Pirkle: 573

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 573, VariableCook: 3