ADC without antialias filter? was: Anti-aliasing ADC samples

hello all,

I have a little topic I couldn't understand completely (or as much I want to ;-)

As a rule of thumb it is well known to use a filter to cut all frequencies above half the sample frequency. But I guess, there are cases that doesn't need this or where the signals would be more real without this filter than with such one. For example ECG-signals. A QRS complex has frequencies in the range of over 100 Hz. But these frequencies where not stationary so one criteria to construct alias is not present. But filtering these Signals to avoid frequencies over half the sampling rate may extend the QRS and in this case changes relevant parameters of the signal. In real world we often have nonstationary signals in which aliasing would not be created by having samplerates below the nyquist criteria. OK, we make errors having not enough sampling rate, sure, but depending on the goal of the signal analysis, may be it is sometimes better to take these errors and avoid others created from (analog) filters.

Where is the error in this statement? Or is it correct? What do you think about?

regards

Marte

Reply to
Marte Schwarz
Loading thread data ...

Wrong. They can still alias, and perhaps not give a tone but a wrong waveform.

---_--_--_----

could become

------__------

which is totally incorrect.

I think you need to filter. If you are concerned about the waveform shape and do not want ringing: there are special filters for that. But expect that the rolloff is slower.

Thomas

Reply to
Zak

Well known, but generally misapplied.

If the signal comes to you adequately bandlimited then you don't need to low-pass filter it. There are some signals where anti-alias filtering would degrade the signal -- specifically, a video signal is not optically anti-aliased. Instead you try to get the sharpest picture you can onto the detector, and avoid scenes that have a lot of high frequency content.

I agree with that statement. If you're intentionally sampling below the frequency content of the parent signal then you _are_ going to degrade it, you should do so intelligently.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

I have indeed omitted an anti-aliasing filter when I'm confident of the bandwidth of the input signal.

Graham

Reply to
Pooh Bear

I don't fully understand your post. In particular, I don't know what QRS is, and I don't understand what you mean by stationary in this context.

There are a few rules when it comes to sampling. The most strict case is when you can make no assumptions about the input signal bandwidth. Then you need to low- or band-pass filter it very well prior to sampling.

Another interesting case would be where you know that the majority of the signal of interest is below Nyquist, and there is little signal or noise above Nyquist. In this case, you could omit the filter based on this a priori knowledge.

I see frequent references to under-sampling in literature about ADC's for communications applications. In particular, you might see an 80 MHz ADC with an analog input bandwidth of 200 MHz or something. Why would you feed such a high BW signal into an 80 MHz ADC?

Well, what is going on there is that they band-pass the input signal until it has less than 40 MHz of bandwidth, and then they under-sample it. So it is aliased, but that is OK because you know exactly which alias region it inhabits (because of the BPF), so you can account for it later.

For example, I was thinking that it would be kind of cool to build a direct sampling FM radio. You could have an antenna, then a LNA and AGC circuit followed by an 88-108 MHz bandpass followed by an ADC. If you ran the ADC at, say, 80 MHz, you could pick up the entire FM band. Sure, it would be aliased, but since you know the frequency content is between 88 and 108, you don't care, and you can demodulate it digitally in spite of that.

Another example would be if you have some kind of parametric model of what you think you are sampling. Then you can just adjust the parameters until they fit with the samples. By making these kind of assumptions, your reconstructed signal could conceivably have detail not present in the raw samples. But there are a lot of assumptions built-in to the process, so it is important that they be understood and verified.

HTH

--Mac

Reply to
Mac

Marte:

I disagree with some of your points. I start by pointing out some sampling issues and then I'll comment on your main point regarding filters.

I agree with Tim that poor Mr. Nyquist is often misunderstood. Nyquist's rate has to do with re-constructing a band-limited signal from a sampled data set. If your intent is to extract signal features without reconstructing the actual waveform, then you can take all sorts of liberties with the sample rate, provided you do no violence to the mathematical properties of the sampled data you want to extract/preserve. A common application of this is in sampling a radio receiver IF, say for an AM radio station. The carrier is typically converted to 455 kHz but the actual audio modulation of that carrier is only about 15 kHz wide. So the sample rate must be greater than 30 kHz to recover the modulation without introducing alias products. It doesn't have to be greater than 910 kHz, because we are not trying to recover the carrier after we digitize. This is often called "undersampling", but in reality it is still oversampling the bandwidth of interest. Its undersampling the carrier, because we don't really need it.

The second thing to understand is that alias products are always present in any sampled data set, no matter if its filtered before digitizing or not. This is a natural result of the sampling theorem, (when you look at the entire frequency band, not just the band from 0 to half the sample rate). What actually has to be avoided is the condition where the alias products intermix with (or overlap) the desired non-alias products, because then you don't know which ones you can ignore when you do the digital processing.

If you sample a 45 Hz tone at 100 Hz sample rate, you get a tone at 45 Hz in the digital domain, and you will also have a tone at (100-45 = ) 55 Hz. You also have an infinite number of tones at the repeating locations of 145,

155, 245, 255, etc. but I'm going to ignore them for this discussion. As long as we reject everything above 50 Hz, we can see exactly what we digitized : 45 Hz. But suppose we digitized 55 Hz at the same 100 Hz rate. We'd have a tone at 55 Hz, and another at 100-55 = 45 Hz. (and 145, 155....) Now if we process the lower 0 - 50 Hz band, we are going to think we had 45 Hz coming in when we actually did not. Here the alias product showed up in the desired signal band.

I apologize if you understand all this already, but I wanted to set up a numerical case to disagree with some of your assertions, because numbers help make things clearer. I've already spoken to your statement that:

I assume you mean that because the pulse is transient, its not stationary in the mathematical sense. That doesn't really matter here - the fact that we sample it at all means that we have to concern ourselves with alias issues. The duration of the alias energy is exactly as long as the duration of the digitized signal whether it's transient or continuous, and its always there.

Your primary concern seems to be in these statements:

First, if the QRS signal changes in any relevant way due to the filter, then either there is really higher frequency energy than you think there is, or the filter is not as good as it needs to be. Building a good anti-alias filter can be difficult or impossible, if the design tries to use a sampling rate that's very close to the minimum (2x). The biggest reason for raising the sample rate above 2x is to relax the analog filter specs. Its usually much easier to process more data digitally than to build a sharper analog filter. In my example, if the highest component to preserve is 45 Hz, then the analog filter has to pass 45 Hz with no loss or phase perturbations, and reject everything above 50 Hz. That is a 50/45 = 1.1 to 1 shape factor. It is almost impossible to build a low pass filter that steep, and even harder to keep it stable over temperature and time.

But if my digital processing can reject everything above 45 Hz in the digital spectrum, then I don't really have to worry about a 51 Hz analog signal causing a problem. Its digital alias will show up at 49 Hz and the digital processing will reject it. But if an analog signal arrives at 55 Hz, its going to create an alias at 45 and my digital processing won't be able to reject that. The digital filtering does allow the cutoff for the analog filter to be extended from 50 to 55 Hz though. This changes the shape factor to 55/45 = 1.2 to 1. Still hard to build, but better than before. Moving the sample rate up to 120 Hz will buy big improvement. An input at 75 Hz will alias to 45 Hz when sampled at 120 Hz. Now the filter shape decreased to 75/45 = 1.6 to 1. Here we get to practical shape for an analog filter. The farther I'm willing to raise that sample frequency, the easier to ensure clean digitizing with no alias issues and no in-band distortion from the filter.

My advice is to not get hung up on squeezing your signal into the minimum number of samples per second. Make your life easier by giving margin for your filters. ADC's without filters mean you can never be certain that the digital data stream really represents what appeared at the analog input. Noise, static electricity pops, ground loops, etc are all facts of life and analog filters are a necessity for signal integrity.

I agree with Tim that if the filtering is done elsewhere, you don't need to do it twice. But it must be done. Avoiding filters because they seem to degrade the signal indicates you are actually interested in more of the signal than you designed for.

A great book on this topic is Richard Lyons "Understanding Digital Signal Processing". His graphical illustrations of many of these principles are very unique and bring a lot of clarity without a pile of obscure math.

Steve

Reply to
Steve Burke

Marte, first of all: analog filters work with known parameters. Whatever change they induce is linear and can be compensated for during the digital processing if needed. Aliasing on the other hand is not a linear phenomenon. When the signal is digitized you cannot differ between the folded back alias and the original signal, because the frequency is no more related to the signal frequency. Additionally there are timing errors, because the remaining analog filters will delay the aliasing signal much less than the original. An example: The probes pick up the heart muscle signal plus some mains-, motor- cellphone- radiation. Later the doctor wants to see the heart signal with a resolution of 10cm/beat and is used to a resolution of 1mm. this means a signal range of 2Hz*100=200Hz, so if you digitize with 1000Hz and 12bit, your analog filter has to attenuate all signals above 800Hz by at least

74dB. a 700Hz disturbance will fold back to 300 hz and can be filtered out digitally, but not one at 900Hz, that folds back to 100Hz. So your analog filter has to be quite steep and complicated. Much better is to oversample and use a simple analog filter. So with 12800Hz sample rate you just need a 3rd order filter, easy to implement and no adjustment needed. The most important thing is to shield the analog processing to eliminate the induced undesired crap, then the filter might even be just a first order lowpass.
--
ciao Ban
Apricale, Italy
Reply to
Ban

Hi all,

This is the one case that I don't want to take in account. Just let's take the heart-signal as it is. For those who don't know I try to simplify it:

_____ _____ _____ | | | | | | | | | | | | | | | | | | _________| |________________| |________________________| |_________

t1 t2 t3 t4 t5 t6

Look @ this: Really we have (nearly) infinite frequencies in this signal. So we have to decide whether we have to filter or not. I pointed, that as long as the distances t3-t1, t5-t3... are not equal (in case of ECG varying randomly from 0.3 to 1 s) I do not get aliasing frequencies if i use a sampling rate from lets say 100 Sps. Well, it is obvious, that the time-resolution won't be more than 10 ms but I can't see, where in this example would be any chance for alias errors.

Right, but there you have stationary signals in contrast to the upper situation, where the higher frequencies exists only a very short time and because of the nonstationarity there is no chance to create alias effects.

but guess, if you have 8 channels with 24 Bit resolution @ 12800 Sps that creates a dataflow that needs too much µC-power for a small, and portable system.

Marte

Reply to
Marte Schwarz

The QRS wave is a sample of an EKG (electrocardiogram) waveform, that has segments known as P, Q, R, S, and T. "QRS" is the "important" part". The waveform can tell a lot about the health of the heart, but I can't imagine anything anywhere near 100 Hz being meaningful - the fundamental is about

1 Hz, after all. ;-)

I once worked with a unit that did that very thing, but I was on the software side, so just got a data stream - I have no idea if they used antialiasing filters, but since it was an FM RF link, it was probably pretty low. Just for perspective, if you listen to the FM, it goes wuooooooWEEEoowuoooooWEEoowuoooooWEEoowuooo....., then that goes to an F/V converter and gets ADC'd.

Cheers! Rich

Cheers! Rich

Reply to
Rich Grise

Have you ever seen an ECG? What you have drawn has only timing information and a lot of redundancy. You better take a logic analyzer for that kind of signal. And you should study again the sampling theorem. It actually doesn't talk about aliasing, but that any waveform can be perfectly reconstructed, if the highest frequency is below half the sampling frequency. If your heartbeats are equal or not is irrelevant.

Don't mix Shannon and Fourier. Of course there is aliasing. Lets zoom into the rising edge. There is a

+/-10ms uncertainty when it happened, so only a 50Hz signal can be exactly reconstructed. And what happens when you sample in the moment it rises? There is a random step, which is the higher frequencies folding back into your signal.

You seem to know too little about digital processing. And if you have a

24bit A/D, it must be a Delta/Sigma converter, which will work completely different than you thought. BTW these converters do a similar data reduction that I was proposing. And they *are* small.
--
ciao Ban
Apricale, Italy
Reply to
Ban

We are looking at heart surface being fluoresced by heart signals, looking at it with a phodiode camera and the bandwidth needs to be high, but I figure most of the signal is below

100 Hz. The bandwith of the system is several hundred Hz. There is some other stuff apparently as they wish to get a 10 kHz bandwidth.

A chart of collected data of signals propagating the heart surface. I could not find the movie I was looking for.

formatting link

greg

Reply to
GregS

Hi Rich,

The range of heartbeats is about 50 to 180 bpm, that's true. But ig you want to create a QRS which usualy looks like a triangle you need a frequency range up to 200 Hz. IMHO IEC and AAMI says about 100 Hz is needed for diagnostic ECG.

That is not the point I mean.

Marte

Reply to
Marte Schwarz

Hi Ban,

Guess, I say a lot of EGCs. As I wrote: It is simplified and while I didn't want to "draw" real looking ECG signals, the drawn signal is very good to explain what I want to know.

In face of the postulation I did i can not see the relevance of real amplitude or something else. The question is the same with such a signal:

_____ _____ | | | | | | _____ | | | | | | _________| |________________| |________________________| |_________ t1 t2 t3 t4 t5 t6

I know, this is not a ECG signal but is very pretty to explain, why I think, a filter derates my signal more than it would help.

I this special case ther is no sampling point in the moment of rising possible (infinity small). That would mean, I only get a jitter of 10 ms and gan reconstruct the Signal as is. I gan not see any mirroring frequencies created by aliasing.

The AD we uses at the moment (AD1254) gives us 4 ksps when multiplexing the channels. I get the sample values like with every other AD, isn't it?

Clock frequency is not the same than sample rate here.

Yes, and now what do you want to say me with this?

Marte

Reply to
Marte Schwarz

OK, so find a filter design with a 300 Hz cutoff, that's flat in the passband. Or am I missing something?

Yeah, but was it cute? ;-)

Cheers! Rich

Reply to
Rich Grise

Hi Rich,

Yes, may be I want to sample with 100 Sps. There are really higher frequencies in the ECG signal as well as in the exsample signal above. Normally we have to built an antialias filter with cutoff under 50 Hz. The obvious effect then is, that the signal without filter is much more like the original signal (sampled with >1 kSps) than the (correct) filtered signal. Theory says the filter should be there to reduce unwanted / unreal signals that are produced via aliasing. Fact is, we do not see such unwanted signal parts but we realise degraded quality with filters.

Marte

Reply to
Marte Schwarz

I didn't find that one on AD, but the 7718. These converters work completely different. They integrate the incoming analog signals and are open as long as the channel is active. Which means you get an ugly step instead of your square edge and anyway you want that step only on rising or falling edges, not when the signal is almost constant. You are describing a sampling converter, using much more current and having much less resolution.

You can pretty easily downsample with a small FIR filter, but if you do not know that, I would recommend to read your script about A/D converters again. Then it would be better to simulate the whole project with Matlab. Record some real probe signal with a digital scope and use that wav file for your simulation. You can also simulate analog filters with CoolEdit and the digital part with Matlab DSP toolbox and filter toolbox. When this works you should only start with the hardware. This is also tricky as the converter is extremely delicate and has to be protected from blowout. We can give you some hand there, but we cannot do the understanding for you.

--
ciao Ban
Apricale, Italy
Reply to
Ban

That's probably because in an EKG signal there probably aren't very many harmonics above 50 Hz to _do_ any aliasing. :-) As long as you can follow the slew rate, you should be fine as is.

Good Luck! Rich

Reply to
Rich Grise

Hi,

formatting link

Thank you, but as long as I have the feeling that you didn't understand the topic here I won't miss your help :-)

Have a nice weekend

Marte

Reply to
Marte Schwarz

Marte, the part is called ADS1254, that's why I didn't find it.

Please read about Sigma/Delta converters. You will see that you are just dreaming what you wrote. And I'm sure your professor will ask you as well. So you should be a little more humble if someone points out your misunderstanding. This is not only true for the principle of operation, but also about the sampling theorem. This is one of the fundamentals for any engineer, which you will be asked about. And I can see you know deep down that your understanding is missing: "I get the sample values like with every other AD, isn't it?" No, it is integrating and *not* sampling. And maybe you know that this is equivalent to a lowpass filter. So the whole question is bogus, you are already filtering with this converter and maybe you do not need an additional analog filter, if you choose the right parameters, and you will loose many details and you won't get any square edges, they are also not needed anyway. But I think Karlsruhe is not a bad place to study, so you seem to be still in the beginning. Talk with some tutor about the project, is it for the "Studienarbeit?" And why don't you ask the question in de.sci.electronics, where you participate with some arrogant answers:

I'm sure Mawin will put you right.

--
ciao Ban
Apricale, Italy
Reply to
Ban

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.