Hi everyone - this is my first post here. It's about time I joined a DSP forum. I need some advice related to a measurement system. The system samples at 1 kHz but between every sample the input to the DAQ is switched between two inputs. The result is that the acquired signal, at 1 kHz, is two interleaved signals at 500 Hz each. I would then like to go on to separate the two signals, which are a detection of the same measurement but with equal/opposite sensitivities, so that I can find their differential. The idea is that I can use this differential signal to get a measurement that is free from the noise that is common to both channels. I hope I have explained that clearly... Basically I am detecting two interleaved signals which are measurements with opposite sensitivities so that I can subtract them from each other to get a single more sensitive measurement with reduced noise. My query is how and where to implement anti-aliasing filters in this system... I am sampling at 1 kHz then separating the interleaved signals to get two 500 Hz signals. I can then either subtract every consecutive pair (i.e. measurement at 500 Hz which I guess would require me to invert the sign between each subtraction in order to maintain the correct polarity) or, more simply, wait until I have both samples, then produce the subtraction, then wait for another pair, then subtract again (measurement at 250 Hz). I am confusing myself with where to implement anti-aliasing in this sort of scheme before performing FFT on the final signal, and whether the filter should be for 250 or 500 Hz... Thanks for any advice. I need some clarity!

# Anti-aliasing advice for de-interleaved signals

Started by ●July 21, 2010

Reply by ●July 21, 20102010-07-21

On Jul 21, 8:12=A0pm, "PhilipOrr" <philip.orr@n_o_s_p_a_m.eee.strath.ac.uk> wrote:> Hi everyone - this is my first post here. It's about time I joined a DSP > forum. > > I need some advice related to a measurement system. The system samples at=1> kHz but between every sample the input to the DAQ is switched between two > inputs. The result is that the acquired signal, at 1 kHz, is two > interleaved signals at 500 Hz each. > > I would then like to go on to separate the two signals, which are a > detection of the same measurement but with equal/opposite sensitivities, =so> that I can find their differential. The idea is that I can use this > differential signal to get a measurement that is free from the noise that > is common to both channels. > > I hope I have explained that clearly... Basically I am detecting two > interleaved signals which are measurements with opposite sensitivities so > that I can subtract them from each other to get a single more sensitive > measurement with reduced noise. > > My query is how and where to implement anti-aliasing filters in this > system... > > I am sampling at 1 kHz then separating the interleaved signals to get two > 500 Hz signals. I can then either subtract every consecutive pair (i.e. > measurement at 500 Hz which I guess would require me to invert the sign > between each subtraction in order to maintain the correct polarity) or, > more simply, wait until I have both samples, then produce the subtraction=,> then wait for another pair, then subtract again (measurement at 250 Hz). > > I am confusing myself with where to implement anti-aliasing in this sort =of> scheme before performing FFT on the final signal, and whether the filter > should be for 250 or 500 Hz... > > Thanks for any advice. I need some clarity!I think you need to use two separate AA filters, one for each channel. and you are sampling each channel at 500 sps so the two filters need to be 250Hz or less. Mark

Reply by ●July 21, 20102010-07-21

On 07/21/2010 05:12 PM, PhilipOrr wrote:> Hi everyone - this is my first post here. It's about time I joined a DSP > forum. > > I need some advice related to a measurement system. The system samples at 1 > kHz but between every sample the input to the DAQ is switched between two > inputs. The result is that the acquired signal, at 1 kHz, is two > interleaved signals at 500 Hz each. > > I would then like to go on to separate the two signals, which are a > detection of the same measurement but with equal/opposite sensitivities, so > that I can find their differential. The idea is that I can use this > differential signal to get a measurement that is free from the noise that > is common to both channels. > > I hope I have explained that clearly... Basically I am detecting two > interleaved signals which are measurements with opposite sensitivities so > that I can subtract them from each other to get a single more sensitive > measurement with reduced noise. > > My query is how and where to implement anti-aliasing filters in this > system... > > I am sampling at 1 kHz then separating the interleaved signals to get two > 500 Hz signals. I can then either subtract every consecutive pair (i.e. > measurement at 500 Hz which I guess would require me to invert the sign > between each subtraction in order to maintain the correct polarity) or, > more simply, wait until I have both samples, then produce the subtraction, > then wait for another pair, then subtract again (measurement at 250 Hz). > > I am confusing myself with where to implement anti-aliasing in this sort of > scheme before performing FFT on the final signal, and whether the filter > should be for 250 or 500 Hz... > > Thanks for any advice. I need some clarity!So the signal out of the DAC is something like x_dac[n] = x[n] + offset if n is even, and x_dac[n] = offset - x[n] if n is odd? Are you proposing to do the anti-aliasing before sampling or after? There's not much point (or meaning) to anti-aliasing after sampling, unless you're going to decimate. If you think about it, you're sampling the actual signal at 1kHz. So anti-alias filtering appropriate to that sample rate _ahead_ of the modulating process would work. Alternately, if you know that there isn't much energy in the signal (or noise) at or above Nyquist, you may not want to do anti-alias filtering at all. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html

Reply by ●July 22, 20102010-07-22

On 7/21/2010 8:12 PM, PhilipOrr wrote:> Hi everyone - this is my first post here. It's about time I joined a DSP > forum. > > I need some advice related to a measurement system. The system samples at 1 > kHz but between every sample the input to the DAQ is switched between two > inputs. The result is that the acquired signal, at 1 kHz, is two > interleaved signals at 500 Hz each. > > I would then like to go on to separate the two signals, which are a > detection of the same measurement but with equal/opposite sensitivities, so > that I can find their differential. The idea is that I can use this > differential signal to get a measurement that is free from the noise that > is common to both channels. > > I hope I have explained that clearly... Basically I am detecting two > interleaved signals which are measurements with opposite sensitivities so > that I can subtract them from each other to get a single more sensitive > measurement with reduced noise. > > My query is how and where to implement anti-aliasing filters in this > system... > > I am sampling at 1 kHz then separating the interleaved signals to get two > 500 Hz signals. I can then either subtract every consecutive pair (i.e. > measurement at 500 Hz which I guess would require me to invert the sign > between each subtraction in order to maintain the correct polarity) or, > more simply, wait until I have both samples, then produce the subtraction, > then wait for another pair, then subtract again (measurement at 250 Hz). > > I am confusing myself with where to implement anti-aliasing in this sort of > scheme before performing FFT on the final signal, and whether the filter > should be for 250 or 500 Hz... > > Thanks for any advice. I need some clarity!You ought to take a single measurement of a differential signal. Look into using an instrumentation amplifier in front of the anti-alias filter that precedes ADC. (You wrote DAC, but I don't think you meant that.) Subtracting one signal from another displaced 2 ms won't provide much noise cancellation, even at 60 Hz. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Reply by ●July 22, 20102010-07-22

Jerry Avins wrote:> On 7/21/2010 8:12 PM, PhilipOrr wrote: > >> Hi everyone - this is my first post here. It's about time I joined a DSP >> forum. >> >> I need some advice related to a measurement system. The system samples >> at 1 >> kHz but between every sample the input to the DAQ is switched between two >> inputs. The result is that the acquired signal, at 1 kHz, is two >> interleaved signals at 500 Hz each. >> >> I would then like to go on to separate the two signals, which are a >> detection of the same measurement but with equal/opposite >> sensitivities, so >> that I can find their differential.> You ought to take a single measurement of a differential signal. Look > into using an instrumentation amplifier in front of the anti-alias > filter that precedes ADC.BTW, I measured the CMRR of LT1167, and I was amazed to see ~130dB. It would be hard to achieve that kind of performance in digital, especially considering the ADC impairments.> that.) Subtracting one signal from another displaced 2 ms won't provide > much noise cancellation, even at 60 Hz.You can make for the time shift by interpolation. Clay Turner-ish approach with the same interpolator filter used for delaying and advancing the signal by 2 ms in the corresponding channels. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com

Reply by ●July 22, 20102010-07-22

On 22 Jul., 04:00, Tim Wescott <t...@seemywebsite.com> wrote:> On 07/21/2010 05:12 PM, PhilipOrr wrote: > > > > > > > Hi everyone - this is my first post here. It's about time I joined a DS=P> > forum. > > > I need some advice related to a measurement system. The system samples =at 1> > kHz but between every sample the input to the DAQ is switched between t=wo> > inputs. The result is that the acquired signal, at 1 kHz, is two > > interleaved signals at 500 Hz each. > > > I would then like to go on to separate the two signals, which are a > > detection of the same measurement but with equal/opposite sensitivities=, so> > that I can find their differential. The idea is that I can use this > > differential signal to get a measurement that is free from the noise th=at> > is common to both channels. > > > I hope I have explained that clearly... Basically I am detecting two > > interleaved signals which are measurements with opposite sensitivities =so> > that I can subtract them from each other to get a single more sensitive > > measurement with reduced noise. > > > My query is how and where to implement anti-aliasing filters in this > > system... > > > I am sampling at 1 kHz then separating the interleaved signals to get t=wo> > 500 Hz signals. I can then either subtract every consecutive pair (i.e. > > measurement at 500 Hz which I guess would require me to invert the sign > > between each subtraction in order to maintain the correct polarity) or, > > more simply, wait until I have both samples, then produce the subtracti=on,> > then wait for another pair, then subtract again (measurement at 250 Hz)=.> > > I am confusing myself with where to implement anti-aliasing in this sor=t of> > scheme before performing FFT on the final signal, and whether the filte=r> > should be for 250 or 500 Hz... > > > Thanks for any advice. I need some clarity! > > So the signal out of the DAC is something like > > x_dac[n] =3D x[n] + offset if n is even, and > x_dac[n] =3D offset - x[n] if n is odd?I rather read his post as x_dac[n] =3D x(n T) + e[n] if n is even, and x_dac[n] =3D e[n] - x( (n+1/2) T ) if n is odd, e[n] is the usual suspect and T =3D 2ms.> Are you proposing to do the anti-aliasing before sampling or after? > There's not much point (or meaning) to anti-aliasing after sampling, > unless you're going to decimate. > > If you think about it, you're sampling the actual signal at 1kHz. =A0So > anti-alias filtering appropriate to that sample rate _ahead_ of the > modulating process would work.I agree with this, but you have to be sure that the bandwidth of the sensors is also at least 500Hz (each). So the interleaved sequence (x_dac[0], -x_dac[1], x_dac[2], -x_dac[3], .... ) is actually (x(0) + e[0], x(1/1000) - e[1], x(2/1000) + e[2], ...) To reduce the noise, the OP proposes to average two consecutive samples from the second sequence, this is just a very simple lowpass filter. Then the OP is not clear on whether he should decimate the resulting sequence by two or not. If this is a good or a bad way to reduce the noise depends on the (bandwidth of the) original signal x(t). Almost certainly, there are better noise reducing filters. Whether he should decimate by two also depends on the whether the signal x(t) as frequency components above 250Hz. If not, then decimating may be an option, but it should be preceded by a stronger lowpass filter than the two-point average - this will reduce the measurement noise. This is a form of noise- shaping decimation and can also reduce quantization noise, which is not possible with an analog AA filter. Regards, Andor

Reply by ●July 22, 20102010-07-22

Many thanks for the fast responses. I would like to take a truly simultaneous differential measurement, however I can't with this system. The analogue signal is already being switched between the two inputs, and my sampling is simply synchronised with the switch rate so that I detect an interleaved version of the two signals. I also agree that I would ideally need to AA filter before I sample, however I can't do this because the filter would remove the switching signal (fswitch = fs). (Perhaps oversampling so that I could AA filter without removing the differential at fswitch, and then averaging/decimating down after ADC could solve this.) Currently, after de-interleaving I have the two 500 Hz signals. I subtract these from each other to get a differential signal. This is because they contain information on the same measurement but with equal and opposite polarity - however the noise should be identical in both (I thought). Therefore when I subtract I get double the signal power and suppress the common noise. Is this reasoning correct or overly simplistic / wrong? By subtracting the two signals I expected to see this reduced noise. However I don't. Clearly my view of the situation is lacking! Why do I not get reduced noise by this subtraction? In fact, the noise seems a bit worse, not better. Do I need to AA filter the 500 Hz signals before subtraction??

Reply by ●July 22, 20102010-07-22

On Jul 22, 5:32=A0am, "PhilipOrr" <philip.orr@n_o_s_p_a_m.eee.strath.ac.uk> wrote:> Many thanks for the fast responses. > > I would like to take a truly simultaneous differential measurement, howev=er> I can't with this system. The analogue signal is already being switched > between the two inputs, and my sampling is simply synchronised with the > switch rate so that I detect an interleaved version of the two signals. > > I also agree that I would ideally need to AA filter before I sample, > however I can't do this because the filter would remove the switching > signal (fswitch =3D fs). (Perhaps oversampling so that I could AA filter > without removing the differential at fswitch, and then averaging/decimati=ng> down after ADC could solve this.) > > Currently, after de-interleaving I have the two 500 Hz signals. I subtrac=t> these from each other to get a differential signal. This is because they > contain information on the same measurement but with equal and opposite > polarity - however the noise should be identical in both (I thought). > Therefore when I subtract I get double the signal power and suppress the > common noise. Is this reasoning correct or overly simplistic / wrong? > > By subtracting the two signals I expected to see this reduced noise. > However I don't. Clearly my view of the situation is lacking! Why do I no=t> get reduced noise by this subtraction? In fact, the noise seems a bit > worse, not better. Do I need to AA filter the 500 Hz signals before > subtraction??The amount of noise cancellation that you get by combining the two samples depends upon the characteristics of the noise. If the noise is white (i.e. it has a flat power spectrum across the whole band), then the noise samples will be jointly independent of each other, so you can't cancel them out by subtracting them from each other. In a qualitative sense, if the noise is bandlimited, then two adjacent samples will be correlated in some way, so you could get more effective cancellation by subtracting them from each other. However, unless you can make the noise term not change between the two sample times (which is unlikely if it is in fact noise), you aren't going to get perfect cancellation. Jason

Reply by ●July 22, 20102010-07-22

On 7/22/2010 12:43 AM, Vladimir Vassilevsky wrote:> > > Jerry Avins wrote: >> On 7/21/2010 8:12 PM, PhilipOrr wrote: >> >>> Hi everyone - this is my first post here. It's about time I joined a DSP >>> forum. >>> >>> I need some advice related to a measurement system. The system >>> samples at 1 >>> kHz but between every sample the input to the DAQ is switched between >>> two >>> inputs. The result is that the acquired signal, at 1 kHz, is two >>> interleaved signals at 500 Hz each. >>> >>> I would then like to go on to separate the two signals, which are a >>> detection of the same measurement but with equal/opposite >>> sensitivities, so >>> that I can find their differential. > >> You ought to take a single measurement of a differential signal. Look >> into using an instrumentation amplifier in front of the anti-alias >> filter that precedes ADC. > > BTW, I measured the CMRR of LT1167, and I was amazed to see ~130dB. It > would be hard to achieve that kind of performance in digital, especially > considering the ADC impairments.You can't arrange a floating ground digitally, either.>> that.) Subtracting one signal from another displaced 2 ms won't >> provide much noise cancellation, even at 60 Hz. > > You can make for the time shift by interpolation. Clay Turner-ish > approach with the same interpolator filter used for delaying and > advancing the signal by 2 ms in the corresponding channels.That can be done fairly well, but it's like burning the house down to cook the pig.* Any noise that could possibly be reduced that way must be external to the signal source and should be blocked from entering the system in the first place. What the OP proposes, even if it could work, is like cooking a batch of peas in a dirty pot, then trying to wash the dirt off afterward. Much better to wash the pot first. Note that the 2 ms spread between samples is almost 45 degrees at 60 Hz. Jerry _______________________________________ * http://www.angelfire.com/nv/mf/elia1/pig.htm -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Reply by ●July 22, 20102010-07-22

On Jul 22, 5:32=A0am, "PhilipOrr" <philip.orr@n_o_s_p_a_m.eee.strath.ac.uk> wrote:> Many thanks for the fast responses. > > I would like to take a truly simultaneous differential measurement, howev=er> I can't with this system. The analogue signal is already being switched > between the two inputs, and my sampling is simply synchronised with the > switch rate so that I detect an interleaved version of the two signals. > > I also agree that I would ideally need to AA filter before I sample, > however I can't do this because the filter would remove the switching > signal (fswitch =3D fs). (Perhaps oversampling so that I could AA filter > without removing the differential at fswitch, and then averaging/decimati=ng> down after ADC could solve this.) > > Currently, after de-interleaving I have the two 500 Hz signals. I subtrac=t> these from each other to get a differential signal. This is because they > contain information on the same measurement but with equal and opposite > polarity - however the noise should be identical in both (I thought). > Therefore when I subtract I get double the signal power and suppress the > common noise. Is this reasoning correct or overly simplistic / wrong? > > By subtracting the two signals I expected to see this reduced noise. > However I don't. Clearly my view of the situation is lacking! Why do I no=t> get reduced noise by this subtraction? In fact, the noise seems a bit > worse, not better. Do I need to AA filter the 500 Hz signals before > subtraction??the point I was trying to make and you are still missing is what you call "interleaving" is also "sampling" When the other part of the system does the "interleaving" of the two singals, that is sampling.... if there are components in the signal above 250 Hz then you need the AA filter ahead of the sampling/interleaving... Read up on stereo FM multiplexing, it is an anaolog system, but the L and R channels are "sampled" or interleaved. The ADC QUANTIZES the signals. The AA filter is needed when a signal is SAMPLED and it sounds like in your system that happens when the 2 signals are "interleaved" into one. I agree with the others about doing the differential summing in the analog domain and pass the result through ONE AA filter and one A/D. Mark