Sensing/Conditioning
Which filters are noisier – analog or digital? part 2
The Filter Wizard takes a look at some fundamental noise mechanisms in filters and poses the question: Can we make useful noise level predictions if our filters are implemented digitally?
Can we make useful noise level predictions if our filters are implemented digitally? In modern electronic product design, one can often make a choice between analog and digital signal processing. With analog processing, the filtering and other signal manipulation is done before converting the signal to digital (if it's indeed ever converted). The digital model involves converting as early as possible in the signal chain, doing the processing in the digital domain, and then perhaps converting back to analog.
The device I spend most time solving people's problems with, Cypress's PSoC3, has op amps for constructing analog active filters, and also a fast digital filter engine that can implement a wide range of filters in the digital domain. To help make the choice, systems engineers need a reliable method for directly comparing the noise performance of analog and digital filtering approaches.
We're taught that “going digital” creates quantization noise, which is the per-sample error involved in fitting a value of arbitrarily high precision into a lower-resolution number system, usually an N-bit binary system with 2^N available states. For any real-world signal, this error is completely uncorrelated with the actual signal and therefore can be treated as random noise, whose value is uniformly distributed between -0.5 LSB and +0.5 LSB. Textbooks demonstrate both that this noise is 'white’, i.e. has a frequency-independent spectral density, and also that the rms value is {LSB}/sqrt(12), when integrated from DC to Nyquist.
Quantization noise is different from analog noise in one particular way: it’s deterministic. Process an identical signal a second time in your system and you’ll get the same error again. In an analog system, the noise is different every time.
To level the playing field in our comparison between analog and digital filters, let’s assume that input signals are converted to digital, either after the analog filter or before the digital filter, using enough bits of resolution that this input quantization noise can be neglected. I’ll use 20 bits of input resolution in the examples here. Also that our signal processing is done to at least this resolution, if not higher, so that there’s no internal reduction of resolution in the digital case that might affect the results. I’ll use 24-bit internal arithmetic, which is the signal path width of PSoC3’s filter block.
With all this, you might be thinking that I’m setting up a false dilemma. Digital filters contain neither noisy op amps nor noisy passive components. So, if we’ve taken the input quantization noise and signal levels into account, aren’t our digital filters going to be essentially perfect and noise-free, running with 24-bit arithmetic on 20-bit data?
It’s a fair question. If the only noise that a digital filter implementation suffered from was the basic quantization noise associated with the resolution of its processing path, we’d have little to worry about. But – and here’s the 'kicker’ – this isn’t the case, at least, not for the filter topology that you’re most likely to use because it’s the one given in all the textbooks and filter design packages. That topology is the Direct Form filter, the most common form of which is shown in Figure 1. We’ll soon see that we do indeed have a noise problem; first, we need to figure out how to actually analyze the circuit.

Figure 1: The Direct Form I filter that we'll use here (from Wikipedia)
Figure 2 shows a suitable interconnection of SPICE primitives on an LTspice schematic, with a behavioral source implementing the summing node that creates the desired filter output. At this stage the output voltage is being calculated as a floating point number. But to model an actual implementation, we somehow need to include the effect of (in our case) a 24-bit quantizer. So we need a model of a quantizer that can be used in a linear SPICE analysis. You might think that this is a tall order, because quantization of samples is inherently a non-linear time-domain process.

Figure 2: A Direct Form filter built using SPICE primitives (in LTspice)
What value should this resistor be? Well, the rms noise voltage contribution of a resistance of value R, measured in a bandwidth deltaf, is given by equation 1:
where T is the absolute temperature and k is Boltzmann's constant. If we define our system full-scale as unity, the rms value of the noise voltage from the quantizer is as shown in equation 2:

which is the standard result, as mentioned previously. Simply squaring and equating these, we have equation 3:
or
since delta f is one-half of the sampling frequency. So the quantizer reduces to a resistor whose value is calculated from the sample rate and the number of bits of resolution as shown in equation 4. We put that resistor in series with the signal being quantized, and buffer it with a voltage-controlled source to prevent any interaction with the rest of the circuit. The modified filter circuit is shown in Figure 3.

Figure 3: Noise simulation schematic for a standard Direct Form biquad
Figure 5 shows the realized frequency responses of the digital filters over the same 10 Hz to 3160 Hz range we used for the analog filters; compare this with Figure 2 of Part 1. All the digital filters have a response that falls away more rapidly as the frequency approaches Nyquist (one-half of the sampling frequency of 44.1 kHz). That's a by-product of the bilinear transform approach to filter design, discussed quite a while ago in “Countdown to S-to-Z”.

Figure 4: Analog and digital filters calculated on the same schematic


Figure 6: Noise spectral density of analog filters

Figure 7: Noise spectral density of digital filters

Table 1: Simulated noise of analog and digital filters with same cutoff frequencies
This data should dispel once and for all the myth that digital filters aren't noisy. With 'only' 24 bits of signal processing, the Direct Form filter is inferior to the analog filter at frequencies below around 300 Hz. At a 10 Hz cutoff frequency, the digital filter's noise level is worse by 34 dB than the analog filter. It's ironic that people often cite digital filters as being of most use in replacing low frequency filters that need high-valued capacitors. We can see, however, that the active filter comprehensively trounces this particular digital filter at low frequencies. The scaling is definitely not working out as you might have expected!
Where does this noise come from? Well, it originates in the quantizer, but it is hugely magnified by the noise gain of the Direct Form filter, which approaches infinity as the cutoff frequency approaches zero. Whoops. One way of thinking about this is that at low cutoff frequencies, the feedback terms in the filter contribute positive feedback that increases the gain of the filter. The input signal is attenuated by the feedforward terms in order that the through gain of the filter comes out right. The net result is a huge magnification of the noise contributed by the inherent quantizer at the output of the filter calculation.
One way of mitigating this noise is to increase the bit depth of your arithmetic. We could make the 10Hz digital filter match its analog counterpart if we 'widened' our system data width from 24 bits to 30 bits. If you're designing your own chip from scratch, this may be feasible and justifiable, but that's rare – usually you're designing with a standard processor.
All is not lost for the digital filter approach, though. For people who need to make decent low frequency IIR filters using modest processing widths (I’m thinking audio here), there are other topologies that don’t suffer the noise gain pathology of the Direct Form filter, and that deliver far superior noise performance for a given processing width. The same techniques shown here can be used to simulate the noise performance. Such filters have already been implemented on the filtering engine in PSoC3, for professional-grade audio processing. That’ll have to be the topic of a future article, unfortunately. Until then, keep an eye on your use of the Direct Form filter at low cutoff frequencies relative to the sample rate; its noise gain might be your loss. Or just keep it analog! / Kendall
P.S. Check out my Cypress blog at www.cypress.com/go/thefilterwizard - you can also email me from there.
About the author:
Kendall Castor-Perry is a Principal Architect at Cypress Semiconductor,doing mixed-signal system analysis and design for the new PSoC platform. Kendall uses decades of experience in analog engineering, filtering and signal processing to capture signals across many domains, extract the information from them and do something useful with it.
- No news
- New generation of thermal sensor arrays overcome the limitations in single-element sensors
- Altera acquires power technology innovator Enpirion
- Ultra-sensitive touch sensor is able to be operated through glass or steel sheet
- Impulse radio ultra-wide band IC takes the lead on accurate geo-positioning
- Better, cheaper OLED micro displays do away with color filter
- OPV solar modules project aims to optimize energy harvesting by autonomous sensors within buildings
- Infineon adds compact half-bridge gate driver family to address power applications
- Over 30 Billion devices to wirelessly connect to the Internet of Everything in 2020
- Ultra-low noise, high PSRR linear voltage regulators reduce jitter, simplify power design
- Nordic Semiconductor releases world's smallest Bluetooth low energy and ANT+ ICs
- K-Type Thermocouple Measurement System with Integrated Cold Junction Compensation
- 16-Bit, 100 kSPS Low Power Successive Approximation ADC System
- Fast and simple measurement of position changes
- Interfacing Microcontrollers to the Industrial World
- Accurate Temperature Sensing with an External P-N Junction
- Complete Closed-Loop Precision Analog Microcontroller Thermocouple Measurement System with 4 mA to 20 mA Output
- How to use USB safely in harsh environments
- Optimizing the Performance of Very Wideband Direct Conversion Receivers
- How Extended Photocoupler Performance is Enabling Next-Generation Applications
- 42V, 2.5A Synchronous Step-Down Regulator with 2.5μA Quiescent Current
Sensor
SoC
Linear Technology
Microcontroller
STMicroelectronics
Power Management
Analog
ADCs
Battery
Intersil
Microcontrollers
Lattice Semiconductor
Texas Instruments
Audio
Mixed-signal
ADC
Analog Devices
Sensors
NXP Semiconductors
Austriamicrosystems
Maxim Integrated Products
Fairchild Semiconductor
FPGA
Atmel
National Semiconductor
Diodes
Cypress Semiconductor
MEMS
MOSFETs
Power
This site contains articles under license from EETimes Group , a division of United Business Media LLC.


