**Topics Covered:**

- The Interpolation Formula
- Upsampling and Downsampling
- The interpolation error
- Filters – active and passive filters
- Low-pass, high-pass and band-pass filters

When you can measure what you are talking about and express it in numbers, you know something about it – Kelvin

What makes interpolation possible? Mathematics. I know you were hoping for a better answer but there isn’t.

Since we are adding dots, this process is also called Upsampling. It’s as if we had sampled the original signal at a higher rate than what was the case. Is it cheating? Only if you get caught. E.g., in the case of Hertz’s path, we sampled Hertz 60 times over a 4 hour period. We have 60 dots. We need to add more dots within the dots, let’s say one dot between two sampled dots. We now have 119 dots. Somebody who just popped in to witness the exercise might think we sampled Hertz at 119 dots instead of 60. That’s upsampling for you.

One wouldn’t use a term like upsampling unless one could also downsample, right? Downsampling is the process of removing dots while still trying to keep the original signal looking as good. If you remove one dot too many, you might lose all sense of resemblance.

The sinc interpolation method we used earlier is represented by what is called the Whittaker-Shannon interpolation formula or simply the interpolation formula. The sampling theorem and the interpolation formula is the most popular method of sampling at the present time, and in most cases does a great job. This is what it looks like:

Just like how the sampling theorem *guarantees* to sample a perfectly bandlimited signal such that it can be recovered exactly, the interpolation theorem *guarantees* the sampled signal can be reconstructed perfectly. On paper, yes. In real life, no. It’s a pipe dream.

A perfect reconstruction can *never* happen, simply because bandlimited signals don’t exist. Having said that, the errors introduced in this process are negligible for most practical uses, hence its popularity. However, there are two main issues that one needs to be aware of.

The first is the interpolation error. This is more of a mathematical baggage that came with our use of sinc functions. We happily assumed sinc functions (ideal on paper) can be added together without ‘joins’. In reality, sinc functions are never capable of such perfection, and joins are everywhere. Just because you can’t see them doesn’t mean they’re not there.

So how do engineers deal with imperfection? Just like how the ancients purified water – they use filters.

A filter is a device or process that removes from a signal some unwanted component or feature. Don’t like something in your signal? Chances are, somebody has already invented a filter to get rid of it. Except:

Therefore prepare thee to cut off the flesh.

Shed thou no blood; nor cut thou less, nor more,

But just a pound of flesh: if thou tak’st more,

Or less, than a just pound, be it but so much

As makes it light or heavy in the substance,

Or the division of the twentieth part

Of one poor scruple, nay, if the scale do turn

But in the estimation of a hair,

Thou diest and all thy goods are confiscate. – Merchant of Venice

So let’s rid ourselves of the notion that filters are perfect. They are not. There’s always some mess left behind, be it electronic mess or dirt.

As far as electronic filters are concerned, a filter that can act by itself is a passive filter. A filter that needs an external power source is an active filter. Filters can be analog or digital. They can be discrete (sampled) or continuous. In the signal processing supermarket, filters take up the most shelves. In signal processing, the most important function of filters is to attenuate frequencies.

What do I mean by attenuate? Attenuation simply means that the filters don’t really eliminate frequencies entirely. They only suppress them to near zero so humans can’t see it (but some of our senses can still catch when done badly!). So these suppressed souls hang around like ghosts in the signal, causing all sorts of havoc.

A filter that attenuates low frequencies is called a high-pass filter – since it passes the high frequencies through. We design the high-pass filter with a cut-off rate, and any frequency lower than this rate who dares to enter the filter is brutally suppressed. A filter that does the opposite, i.e., passes the low frequencies, is called a low-pass filter.

What if we want to pass frequencies between two cut-off points? We have a filter for that too, and it’s called the band-pass filter.

So, in brief (as brief as it gets), what engineers do is:

They study the T-Rex thoroughly. They decide which parts are important. They give the animal a good bath, haircut, manicure, pedicure, dental and facial, maybe an enema, etc – the filtering. Then they get on with the sampling process. Once the Veggie-saur is delivered, they might want to filter it, too, for various reasons. When we’ve decided we’ve had enough of our vegetarian monster, we send it back to the yard, where the engineers wave their interpolation magic wand and bring back our T-Rex. He might need filtering again – even though he was given one just a few minutes ago. The current trend is: When in doubt, filter. It’s not funny, really.

I mentioned earlier there were two main issues one needs to be aware of in the process of interpolation. The first was the interpolation error. The second is the subject of the next chapter.

**Takeaways:**

- Upsampling is the interpolation method of adding dots, and downsampling is the interpolation method of removing them.
- A filter is a device or process that removes from a signal some unwanted component or feature.
- Sinc functions are never perfect, and the interpolation formula in practice suffers from the interpolation error.
- A filter that attenuates low frequencies is called a high-pass filter
- A filter that attenuates high frequencies is called a low-pass filter
- A filter that attenuates frequencies between a given range is called a band-pass filter

**Links for further study:**

- http://en.wikipedia.org/wiki/Whittaker%E2%80%93Shannon_interpolation_formula
- http://en.wikipedia.org/wiki/Filter_(signal_processing)
- http://en.wikipedia.org/wiki/Electronic_filter
- http://en.wikipedia.org/wiki/Passive_analogue_filter_development
- http://en.wikipedia.org/wiki/High-pass_filter
- http://en.wikipedia.org/wiki/Low-pass_filter
- http://en.wikipedia.org/wiki/Band-pass_filter

Next: Professor Sampler’s Notes: Aliasing

Previous: Professor Sampler’s Notes: Reconstruction