Prev: Announcing AjarDSP - an open source VLIW DSP
Next: Last Call for Papers Reminder (extended): International Conference on Signal Processing and Imaging Engineering ICSPIE 2010
From: Tim Wescott on 22 Jul 2010 10:40 On 07/22/2010 07:13 AM, PhilipOrr wrote: >> 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... >> > > I do understand what you mean. The problem is that in this system the two > signals are never separate at any stage. They are not sampled then > interleaved digitally. > > It is an optical fiber system. There is an optical path switch that is > changing the signal sent to the photodetector. My sampling of the > photodetector outputs is synchronised with the optical switch. So the > 'interleaving' stage is done before I can apply any AA filtering. If there > were two separate photodetectors then I could easily filter both as you > say, but in this system I have to use a switch and so they are both in the > same signal before I can apply filtering - before they are even a voltage. > There is no electronics until after the photodetection, by which stage the > signals are already 'interleaved'. Unfortunately. One of the top-ten mistakes that I see in digital systems design is some variation of the following statement: "I am sampling, therefore I need an anti-alias filter". You don't, necessarily. See http://www.wescottdesign.com/articles/Sampling/sampling.html for details. In fact, the system as you describe it _can't_ have an anti-alias filter put in. The sampling process destroys information; once that information is destroyed you can't bring it back. Unless you are decimating (i.e. sampling further), any post-sampling filter you put in will not have any affect on aliasing, and therefore cannot be an anti-aliasing filter. If aliasing is a problem, you'll have to live with it. If you've got some other system problem, you'll need to find it. Have you connected an oscilloscope to the ADC input and monitored the input signal vs. the ADC start-of-conversion command? The exercise may be illuminating. -- 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
From: robert bristow-johnson on 22 Jul 2010 11:32 On Jul 22, 10:13 am, "PhilipOrr" <philip.orr(a)n_o_s_p_a_m.eee.strath.ac.uk> wrote: > >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... > > I do understand what you mean. The problem is that in this system the two > signals are never separate at any stage. They are not sampled then > interleaved digitally. > in other words, your interleaved samples represent the signal (or it's negative) at the "interleaved" times of sampling. right? then, before subtracting, you need to advance one sample (let's say it's the even indexed sample) *ahead* 1/2 sample and the other sample (the odd one) behind 1/2 samples, so that they represent simultaneous sampling before you subtract one from the other. also, as Tim pointed out, this should take care of any DC bias in your ADC. if the error components are uncorrelated, their power will add (double) and their voltages will will increase by sqrt(2). but the legitimate component of your signal (what you want) will double and you will get *slightly* (3 dB) better signal-to-noise ratio. it's not a bad way to do things before the days of sigma-delta converters. i did this myself (a medical instrument with a very slow sampling rate and 12-bit converter) in 1979. have never done anything like it since. r b-j
From: PhilipOrr on 22 Jul 2010 11:48 Guys, thanks very much. I think you are right in that I am barking up the wrong tree with the 'aliasing problem'. Perhaps this is not really what I need to do to improve this system. In short, I thought the majority of the noise in this system would be correlated between these two channels, and that by subtracting them from one another I would remove the noise - especially at lower frequencies - allowing me to get larger SNR on my differential signal. However it seems the noise is not reduced, and when I look closely at the waveforms it is clear that the noise is visibly uncorrelated between the two signals. I'm now trying to identify at what point in the scheme this noise is being introduced (it must be after the switch of course). Since they both use the exact same path and components for detection after the switch (but out of time with each other) this is proving quite difficult. It may be photodetector noise or quantization noise, and by subtracting the signals I am effectively doubling the strength of this random noise as someone mentioned above. Does this sound correct? Could this be suppressed? Perhaps I can't improve it further because of the limited freedom I have in this scheme. It probably sounds like I'm not getting anywhere but this is all very helpful for me, so thanks again.
From: PhilipOrr on 22 Jul 2010 12:02 >in other words, your interleaved samples represent the signal (or it's >negative) at the "interleaved" times of sampling. right? then, >before subtracting, you need to advance one sample (let's say it's the >even indexed sample) *ahead* 1/2 sample and the other sample (the odd >one) behind 1/2 samples, so that they represent simultaneous sampling >before you subtract one from the other. > >also, as Tim pointed out, this should take care of any DC bias in your >ADC. if the error components are uncorrelated, their power will add >(double) and their voltages will will increase by sqrt(2). but the >legitimate component of your signal (what you want) will double and >you will get *slightly* (3 dB) better signal-to-noise ratio. > >it's not a bad way to do things before the days of sigma-delta >converters. i did this myself (a medical instrument with a very slow >sampling rate and 12-bit converter) in 1979. have never done anything >like it since. > >r b-j > As for the ADC, I'm putting the photodetector straight into a National Instruments PXI analogue input. The processing (de-interleaving, subtraction, FFT) is then done in LabVIEW. At the moment I am not shifting any samples like you say. My understanding of DSP is limited as I'm sure you have noticed. What I am doing is constantly sampling but using shift registers to store sample A, then get sample B and subtract. i.e. Sample - Store as A Sample - Store as B -> Subtract B-A Sample - Store as A Sample - Store as B -> Subtract B-A (Differential output at fs/2). or Sample - Store as A Sample - Store as B -> Subtract B-A Sample - Store as A -> Subtract B-A Sample - Store as B -> Subtract B-A (Differential output at fs). As it stands, I don't even know which of the above is more technically sound. I have been trying both.
From: Tim Wescott on 22 Jul 2010 12:14
On 07/22/2010 08:48 AM, PhilipOrr wrote: > Guys, thanks very much. > > I think you are right in that I am barking up the wrong tree with the > 'aliasing problem'. Perhaps this is not really what I need to do to improve > this system. > > In short, I thought the majority of the noise in this system would be > correlated between these two channels, and that by subtracting them from > one another I would remove the noise - especially at lower frequencies - > allowing me to get larger SNR on my differential signal. > > However it seems the noise is not reduced, and when I look closely at the > waveforms it is clear that the noise is visibly uncorrelated between the > two signals. I'm now trying to identify at what point in the scheme this > noise is being introduced (it must be after the switch of course). Since > they both use the exact same path and components for detection after the > switch (but out of time with each other) this is proving quite difficult. > > It may be photodetector noise or quantization noise, and by subtracting the > signals I am effectively doubling the strength of this random noise as > someone mentioned above. Does this sound correct? Could this be suppressed? > Perhaps I can't improve it further because of the limited freedom I have in > this scheme. > > It probably sounds like I'm not getting anywhere but this is all very > helpful for me, so thanks again. Any truly random noise, i.e. photodetector, ADC, or circuit noise, will double in power when you do the subtraction. But if the thing you're measuring isn't moving too fast, the measurements will be highly correlated, which means that when you do the subtraction the _amplitude_ will double -- which means that the power will go up by a factor of four. So your signal to noise ratio should improve. This is what you do by averaging: if your noise is a white process and you add up N samples, the noise power will go up by N (i.e. the expected noise amplitude goes up by sqrt(N)). But if your signal isn't moving significantly over those N samples the _signal_ power goes up by N^2. Then you divide the sum by N, and you're left with the original signal and 1/sqrt(N) of the noise power. -- 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 |