Path: EDN Asia >> Design Centre >> Test & Measurement >> Grasping the intuitive sampling theory (Part 2)
Test & Measurement Share print

Grasping the intuitive sampling theory (Part 2)

16 Oct 2013  | Michael Dunn

Share this page with your friends

Of course, the purpose of the anti-aliasing filter is to prevent aliasing (i.e., the sampling of any frequencies above Nyquist). What does the reconstruction filter do? Is it identical to the input filter?

Yes. No. Maybe. Are we talking theory or practice?

Consider – what exactly is a sample? Mathematically, it's an infinitesimally short pulse – a Dirac delta function – but scaled to the amplitude of the signal at that point (math geniuses, help me out here). That's all fine and dandy, until we get to the output end of our system. For everything to work properly, we need our DAC to be sending out these "scaled" Dirac impulses. While we could design a DAC to approximate this behaviour, we really don't want to. Well, I don't. You go right ahead.

Real DACs, in general, hold each output sample until the next comes along. There's even a name for this: zero-order hold. In effect, we've widened that Dirac delta to the duration of a sample. A delta function has an infinite and flat frequency spectrum, but a sample-wide pulse has a spectrum that, while still infinite, is not flat, but drops off according to, yes, the famous sinc function, which is defined by sin(x)/x.

Figure 2: The sinc, or sin(x)/x, function. Of course, it extends to infinity in both directions.


Like oak is to wine (a source of both corks and barrels), sinc is to sampling (related to both time and frequency domains). In the time domain, sinc is the impulse response of the brickwall LPFs we're trying to implement. A lot of scopes, by the way, list sin(x)/x in their display menu, usually alongside linear interpolation and "dots." When there isn't a high enough sample density to fill every screen pixel, the available samples are fed into a digital LP reconstruction filter which fills in the gaps. Always choose this option over the others if you want an accurate representation of your signal on-screen.

What did I mean by the sinc to frequency domain connection? It refers back to the spectral roll-off caused by the DAC's zero-order hold. Look at the zoomed sinc function below from x=0 to x=1 (the magenta curve). It illustrates the roll-off caused by the zero-order hold between zero and the sampling frequency. Thus, our reconstruction filter (in green) must be modified from its basic LPF shape to one whose response rises by the same amount as the sinc function falls. (note that the graph shows sin(πx)/πx; the X-axis would cover 0 to π when written as sin(x)/x)

Figure 3: The sinc function (magenta), zooming in on the X-axis from 0-1. The sampling frequency is at 1, and the Nyquist at 0.5 (the black line). The green curve illustrates the reconstruction filter response needed to compensate for the sinc roll-off, and I've chosen 80% of Nyquist as my cut-off frequency. Of course, a real filter wouldn't be quite so angular and linear. Blame the artist.


At the Nyquist frequency (x=0.5), sinc is about 3.92dB down, so our filter must be 3.92dB up. Hang on! We want stopband at Nyquist, not a boost! OK, the reconstruction filter response is heading towards being 3.92dB up at Nyquist, but at some lower frequency (50 per cent? 80 per cent? 90 per cent!?), we start to roll off – fast. Thus, this final LPF combines reconstruction with equalisation. The EQ function can even be done with DSP, leaving the final analogue filter for reconstruction only, hence, identical to the input anti-aliasing filter.

Don't be too upset by all this zero-order hold equalisation business. The resultant spectrum actually makes filter design simpler. Without the roll-off exhibited by step (vs. impulse) samples, the undesired image signals above Nyquist would be higher in amplitude – forever.


About the author
Michael Dunn has been messing with electronics almost as long as he's been walking, and got his first scope around age 15. Things have gone downhill since then. The scopes now vie with wine racks, harpsichords, calculators, and 19th century pianos for space. Over the years, he's designed for the automotive, medical, industrial, communications, and consumer industries, as both freelancer and employee, working with analogue, digital, micros, and software. Since 2000, he's run the TekScopes Yahoogroup, now with over 5,000 members, and he was previously editor-in-chief of ScopeJunction.


To download the PDF version of this article, click here.


 First Page Previous Page 1 • 2


Want to more of this to be delivered to you for FREE?

Subscribe to EDN Asia alerts and receive the latest design ideas and product news in your inbox.

Got to make sure you're not a robot. Please enter the code displayed on the right.

Time to activate your subscription - it's easy!

We have sent an activate request to your registerd e-email. Simply click on the link to activate your subscription.

We're doing this to protect your privacy and ensure you successfully receive your e-mail alerts.


Add New Comment
Visitor (To avoid code verification, simply login or register with us. It is fast and free!)
*Verify code:
Tech Impact

Regional Roundup
Control this smart glass with the blink of an eye
K-Glass 2 detects users' eye movements to point the cursor to recognise computer icons or objects in the Internet, and uses winks for commands. The researchers call this interface the "i-Mouse."

GlobalFoundries extends grants to Singapore students
ARM, Tencent Games team up to improve mobile gaming


News | Products | Design Features | Regional Roundup | Tech Impact