Notch Filters

Notch filters have always played an important role in measurements. In fact, before higher performance ADC and DACs were available, distortion measurements were made using very high quality oscillators pushed through very narrow and deep notches post-DUT. What remained was the residual, and you then used an appropriate bandwidth limiting filter and an AC voltmeter to measure what remained. That all changed, of course, when high-performance converters arrived as the flexibility of digital combined with "good enough" performance met 99% of measurement needs. But curiously (or not), the forward march of this topology--the high quality oscillator pushed through a notch filter--has continued to be refined. Roughly, the state of the art today for THD+N is around -110 dB measured via converters on analyzers costing $10K or more. That can be pushed another 10 dB (to about  -120 dB) when using analog oscillators and notches. 

An occasional question is "What equipment do you use to measure the performance of the QA401?" and the answer is: A discrete oscillator and a notch.  Those two elements together make it easy to untangle the ADC and DAC performance. While several homegrown boards have come and gone over the years, a picture of the current oscillator/notch board used is below: Region A is the split rail isolated supply. Region B is the oscillator, Region C is the notch, and Region D is an 8-step push-button attenuator. The nominal output is about +2 (adjusted via pot inside region B), and the atten offers 0, 6, 12, 18, 24, 30 or 36 dB of attenuation. 

The oscillator has its roots in Jim Williams' CdS-stabilized Wien bridge oscillator (HERE). A modern take on the Williams' design is located HERE. The oscillator on the board shown below uses OPA1656 opamps, which have more bandwidth, a staggering 150 dB of open loop gain (more bandwidth and more gain means lower distortion) and the FET inputs means the noise from the higher-valued resistors in the loop won't be an issue.

For the notch, what started as an active notch was later converted to a passive notch via component changes. It's appealing to think of adjusting an active 1 kHz notch so that you don't have any degradation at 2 kHz, but in practice, it's probably better to dial back on the hocus-pocus and do the corrections in software--the fewer active devices you have being asked to deliver at their limits the better.

Release 1.82 of the QA401 software makes it easier to use a passive notch. The release includes a menu to export your notch, and the ability to correct what is being displayed automatically based on your notch performance. 

It's not perfect, and there are more areas to study and some improvements that are needed from the oscillator and notch hardware. But for now, let's take a look at how to use this.

Characterizing the Oscillator

First, let's take a look at the oscillator measurement. For all of the measurements below, we're going to pick an FFT size and stick with it. You need to be careful with using an FFT that is too large and/or when using too much averaging. Free-running oscillators aren't perfect--there's a war going on deep inside the oscillator with regards to loop gain. If the gain is just a hair under 1.0 then the amplitude dies. If the gain is just a hair above 1.0 then the output hits the rails and distorts badly. Thus, you need to understand a loop is hard at work striving to keep the gain at precisely at 1.000000 to ensure the amplitude is constant. Of course, this isn't possible over very small time scales, but an average gain of 1.000000 can be managed over longer time scales (seconds). 

The upshot is that the amplitude will slosh around like water in a bucket, eventually stabilizing and then wandering slowly. You want to make sure that for very small FFT sizes (2K) where less averaging is occurring, the amplitude is steady--maybe +/- 0.02 dB from reading to reading and equally steady over 10's of seconds. If your oscillator cannot manage that, then longer FFTs will simply mask these errors. 

Let's first take a look at the oscillator output with a 2K FFT, with none of the oscillator's attenuators active. From this plot we can see the peak is 2.15 dBV, and that is steady over long intervals (minutes).

Next, let's bump the FFT up to 128K. As you can see there's a slight change in amplitude (about 0.15 dB). From here on out, it's important to keep the same FFT size. We can see the 2H and 3H are about -93 and -103 dBC respectively. This isn't the oscillator, this is the ADC in the QA401 beginning to overload as it's just 4 dB away from it's clipping point. This is a common phenom in all ADCs to varying degrees. And this is why we're interested in notches. 

The final point to draw from the plot above is the center frequency, which the marker shows is 1003 Hz. Unlike digitally generated oscillators, analog oscillators can be several hertz from their design target unless you hand-tweak and tune. But even if you hand tune, a different day (temperature, humidity) will result in a new frequency. So, rather than chasing the last 10th of a Hz via hand tuning, we'll let software do the work for us. 

Characterizing the Notch

Above we looked at the oscillator, and now let's look at the notch. Your notch needn't be perfect: Stable and 50 dB of rejection is probably better than a twitchy notch with 70 or 80 dB of rejection. You'll get most of the goodness that comes from a notch if you can just knock down what the ADC sees by 50 dB or so. 

As a first task, let's sweep the frequency response of the passive notch with the QA401 using the Freq Response mode and again a 128K FFT. We'll use the following settings to sweep the notch:

The sweep results are shown below. Note we can see that the ultimate notch depth is approaching 60 dB. We don't need to be too concerned with any information from the plot, as when it's exported below the crucial details will be handled for us automatically. 

The File->Export Data Menu offers a new option, which is Export Notch User Weighting. Here, we want to specify the frequency of your oscillator (which we measured as 1003 Hz above) and also the file name for the user weighting file. When you press export, the harmonics and gains at each will be automatically computed for you. Below, we can see the notch delivered 58.3 dB of attenuation at 1006.3 Hz (which is its center frequency). But at our oscillator frequency of 1003 Hz, the actual attenuation was measured at 54.29 dB. And at the second harmonic of 2006 Hz, the attenuation is -9.15 dB.

With the notch exported, now we can load that exported data into our User Weighting. Nothing extra needs to be done.

Now, with the User Weighting (aka the notch we just exported) loaded and indicated on the upper left of the screen take a look at how the frequency response appears during another frequency sweep of the notch: We can see the fundamental is boosted to show 0 dBr, and the harmonics are too. But more importantly, the harmonics fall in the correct locations given the slight error of the oscillator we measured in the first step.

An appropriate question to ask at this time is "Why aren't you boosting the noise by the amount of attenuation found in the notch?" It's a reasonable question. But if that were done, the noise of the DUT would mimic that of the notch which would be wrong in most all cases.

OK, so now we can go back and make a measurement of the oscillator running through the notch. Here we can see the second harmonic is now around -128 dBC.

But it can be improved further. The noise floor of the notch output is below that of the QA401. So, we'll take the the notch output and run it through the low-noise +30 dB amp on the QA470. We'll also note the +30 dB gain in the dBV context menu on the QA401 so that the reported gains are correct. As you can see below, getting things pulled up out of the mud on the QA401 brings big wins to the THD+N: it's now about -118 dB.

What does it look like if we take this precise setup and run a well-measured DAC into it? The plot below is a Topping D50S, generating a -1 dBFS sine generated by Audacity (F = 1003 Hz, Fs=48K, WASAPI, native Windows drivers). This plot has reasonably good agreement with other measurements on this DAC (see Amir's measurements at ASR here). Amir measures THD+N around -111 dB, with 2H at -120 dBc and 3H at -135 dBc. All are pretty close to the measured -110.3 dB THD+N with 2H at -119 and 3H @ -129.

Notice the drop in noise around the fundamental--this indicates the noise of the source (the DAC) is high enough that it's getting pushed down by the notch. The effect here is pretty modest because the DAC noise floor is good. But with a poorer source it will become more pronounced. The analog oscillator didn't exhibit any of this, however, indicating the oscillator's noise was well below that of the notch. 

Summary

Analog oscillators combined with notches have been the go-to topology for test equipment for many decades. And they still are very useful today for extending the capability of digital equipment. If you don't have a notch in your arsenal, you should build one. They are cheap and easy to make. And very useful.

Comments? Add yours here.