ΣSigmaStudio Ask AI Русский Log in

A high-pass with problems!

SigmaDSP & SigmaStudio jimwoodElectrojim Mar 11, 2011 00:00 14 replies Original on forum ↗
Subscribe
jimwoodElectrojim Question
Mar 11, 2011 00:00

Here’s an interesting situation that’s giving me fits, and I’m wondering if what I see is typical of the default Sigma second-order high-pass filter, or do I just not understand something basic here.

I need a fairly aggressive high-pass function to get rid of subaudible noise in a project. I cascaded a pair of second-order, 15Hz HPFs, fixing the Q of one at the default 1.41, and the Q of the other at 0.53. According to the Stimulus/Probe utility, this gives me ruler-flat response down to 20Hz and the expected 24dB/octave below.

Once this was loaded onto the Eval Board, the first thing I noticed was that the filter didn’t clip symmetrically. Sure enough, there’s a negative DC component in the output. What’s worse, though, is that there is quite a bit of low-frequency bumping and rumbling coming out of this high-pass. That certainly doesn’t seem right... it's a HIGH-pass, right?

The first test I made was to connect a 0V DC source to the filter input. This killed the DC offset and LF noise. So the offset and noise are in the filter output only when its input is connected to the eval board’s A/D converter. Putting a Sigma DC Blocking filter in the input of the HPF does nothing, however.

I thought that maybe the filter had a mysterious low-end tip-up, which was just boosting the noise from the A/D. But actually sweeping the filter with a function generator did not show up any huge peaks in the response down at 1-5Hz.

The project is attached, and if you load it you can see the problem even without external test gear. The DC offset at the output can be verified from the Readback module, and the LF noise shows up on the AC-coupled meter. With the filter set to 1000Hz, there’s no problem. But take it down to 10Hz and the offset and noise are there... and killing me!

If this can’t be fixed easily, what other options are available in Sigma for a steep high-pass function with a low turnover frequency?

jimwoodElectrojim Reply
Mar 11, 2011 00:00

Hey, never mind. I found another posting (should have looked first!) on this same subject. Evidently there's a performance difference between single- and double-precision filters in Sigma. I've often wondered what the difference actually is; I don't think it's addressed in the Help files. Anyhow, popping-in a double-precision filter seems to have done the trick.

MagicRuB Reply
Mar 11, 2011 00:00

Can you post the link to the other post?

ADIApproved Reply
Mar 11, 2011 00:00

Single precision uses 28-bit fixed-point math. At low frequencies (1/10 of the sample rate or below), the quantization error in calculation can cause minor imperfections in the response of the filter and some noise. Double precision uses 56-bit fixed point math, which increases the instructions required, but has better performance at low frequencies.

I think for anything about 1/10 of the sample rate, the difference between single- and double-precision diminishes pretty rapidly.

jimwoodElectrojim Reply
Mar 12, 2011 00:00

Sure enough, Rub; should have done that. Thanks.

https://ez.analog.com/message/9719#9719

ADIApproved Reply
Mar 15, 2011 00:00

Here is a good blog that explains the mathematical reasoning behind why filters are more susceptible to coefficient quantization error at lower frequency settings.

http://www.earlevel.com/main/2003/02/28/biquads/

In summary, lack of coefficient resolution makes precise positioning of the poles difficult. You can play around with a biquad calculator and see how the coefficients become more and more dependent upon the fractional resolution of the numbers as the Fc value decreases.

jimwoodElectrojim Reply
Mar 15, 2011 00:00

That link leads to an informative write-up; thanks. I'm wondering about the implication for Sigma's DC Block module,which does not exhibit output noise. Is it a special high-pass with a very low corner frequency, or does it utilize some form of servo technique to keep its output centered at 'zero volts'?

ADIApproved Reply
Mar 21, 2011 00:00

The DC blocking filter is a specially coded cell that works kind of like a first-order filter but with some other tricks to remove the DC component. It's coded in a way so that the coefficients are not small enough to create quantization error issues.

MagicRuB Reply
Apr 28, 2011 00:00

I have a silly question:

Alright, so this is a a known 2nd order Biquad limitation hence the double-precision modules. Out of curiosity would this noise issue (or any other isue) still apply to a 1st order "General" filters at ultra low frequencies like 0.5 Hz but when using LOW pass? The reason I ask is I don't see a double precision general 1st order module which made me nervous considering the frequency I'm wanting to use. Hopefully there's no double-precision module because there is no issue?

ADIApproved Reply
Apr 28, 2011 00:00

MagicRub,

At those low frequencies, the coefficients get quite small. For 48 kHz sample rate, a 1st order LPF is giving me coefficients of 0.00006496906 and 0.999935. Those two numbers are so close to zero and one that I expect the lack of precision would lead to the same problems we described before.

Therefore I expect that it's best to use the double-precision 2nd order filters in this case (although I don't know exactly what your application is...).

MagicRuB Reply
Apr 28, 2011 00:00

Brett,

If I told you what my application was, I'd have to kill you. That would be a pitty for the forums!

While working with a filter so low I noticed the same thing with the tiny coef's which means lower resolution which is what made me think of it (and thus come to the experts here!). Thank you for your (always) prompt and precise response.

jimwoodElectrojim Reply
Apr 28, 2011 00:00

Brett: I note your reply to MagicRuB about a first-order 0.5Hz LPF. My original posting, at the top of this thread, was to get to the root of LF noise present in the output of a HPF with a low turnover frequency. You and Adam explained this nicely, thanks very much.

Like MagicRuB, I have used some very low frequency first-order LPFs, but not in the (audible) signal path. Thus any noise they might introduce has not surfaced as a problem. My need was for a simple R/C integrator to do some filtering in what would correspond to a DC control line in an analog design... just a bit of smoothing in the control path of an externally-controlled volume control used as a gain cell in a project. As I discovered and posted in another thread (https://ez.analog.com/thread/3942), the internal and programmable slew utility of these controls is not symmetrical, so to get equal up-and-down action I've set the control's slew rate very high and put a first-order LPF in the contol lead. If there's a more 'civilized' way to get simple integration in Sigma, I'd like to know.

ADIApproved Reply
Apr 29, 2011 00:00

Hi electrojim,

I think one possibility for DC smoothing is the Running Average cell, found in Dynamics Processors - Envelopes. With a slow RC time constant, these should track a DC level quite nicely (in theory), but you might want to try them out rather than taking my word for it! I haven't used that cell for that specific application, but judging from the way it works, I think it would be a nice fit.

Sorry that the symmetrical slew doesn't exist yet for the external controlled slew volume.

We have new volume cells in the library for Gen3 cores (ADAU144x, ADAU1761, ADAU1781) that use linear slew and constant dB slew. These cells do have symmetrical slew times. They just don't have versions with external control inputs yet. I think it would be really easy to port these algorithms to externally controlled versions, so I'll push for that!

BerndH Reply
Oct 3, 2012 00:00

Hi,

searching for a solution for symmetrical slew in volume control I found this thread. I'm using ADAU1442 in my recent project. Is there Volume Control with symmetrical slewrate that has an adjustable slew? I need to change volume pretty slowly (slew arround 18). Up as well as down. Have I overlooked something or am I right that the Volume Controls with adjustable slew are not symmetrical?!?!

Kind regards

Bernd

KJBob Reply
Oct 5, 2012 00:00

Brett and all,

The Running Average dynamics processor will definitely track a DC level, as I have used it that way. In fact, switching the output of a Running Average back into itself (using a feedback and a mux) produces a useful Track-Hold.

Bob