Monday, June 25, 2018

Issue with the Massberg Analog-Matched Low Pass Filter


Implemented the filter mentioned in title using Octave and couple sources Vicanek and Zeitlin (LPF.cpp). Got filter working otherwise but, ... when tested the responses against 'analog model' of the LP filter I noticed there an issue with range of Q values starting from >sqrt(0.5) to close ~2.0. Here are few plots showing the issue:


enter image description here


enter image description here


enter image description here


What/where is the problem?


EDIT:


Looks like the issue is in Omega_s calculation where Vicanek and Zeitlin uses


Q > sqrt(0.5)


as condition value when it should be


Q > sqrt(5)

instead. At least after making this change responses looks more OK:


enter image description here


(various Q values used with various cutoff frequencies, (500hz/0.4, 1k/0.707, 4k/4, 7k/6 and 12k/12))


... but, is it OK, because of this change I did (and more) has been corrected already once by Will Pirkle in Designing Audio Effect Plug-Ins in C++, With Digital Audio Signal Processing Theory (errata):



There is an error in the calculation of the g1, gz and gp coefficients for the Massberg LPF, second order only. There is also an error in the check for Q, it should reference the square root of 0.5, not 5.0. See the Bonus Projects on the Projects Page for the complete code for this LPF with corrections. Thanks to astute readers Christian Floisand and Ernst Oosterveld for finding and reporting this! The fully corrected equations are here .




Any suggestions which is the issue there?


Has anyone got implemented this filter with success by just following either those two sources I mention or the W. Prikle book (with or without the corrected code)?




No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...