Reply by Jerry Avins July 11, 20062006-07-11
Eric Jacobsen wrote:

   ...

> I think you got pretty good dialogue on this previously. Personally, > if the sample clock to the ADC on the card is reasonably stable > (enough to drive the SHA without degrading SNR), it might be as simple > as driving an external SHA with the existing ADC clock. > > Getting that clock out cleanly might be tricky, but I think that'd be > my first approach.
Isn't that what I sorta said, way back when? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by Eric Jacobsen July 11, 20062006-07-11
On Mon, 10 Jul 2006 18:22:39 -0500, Ben Jackson <ben@ben.com> wrote:

>On 2006-07-10, Eric Jacobsen <eric.jacobsen@ieee.org> wrote: >> On Sun, 09 Jul 2006 19:24:13 -0500, Ben Jackson <ben@ben.com> wrote: >>> >>>I meant that initially it would be narrow (<20kHz bw) and outside >>>the 20kHz. > >Here I was talking about still outside the soundcard, already >band-limited. > >>> Then by chopping > >...outside the soundcard... > >>> it would appear as an alias within >>>the 20kHz passband of the soundcard. > >...after going through the soundcard's anti-aliasing filter. > >> What you're describing is often called "sampled IF" when used in >> communications systems. For those type of systems the "anit-alias" >> filter is actually a bandpass filter that passes the signal of >> interest and rejects anything that may already be at baseband within >> the normal Nyquist region of the converter. This leaves only the >> aliased energy within the bandpass filter input frequency, with the >> low-frequency alias left for subsequent digital processing. > >Well, the "low frequency alias" doesn't exist until someone comes along >and samples at Fs < 2 * Fmax. I was proposing to do that undersampling >external to the soundcard (since the soundcard's input anti-alising >filter and bandwidth are unsuitable, as you describe), essentially >introducing a zero-order hold, and then use the soundcard to sample >the aliased signal. > >What we were discussing was what (if any) phase/frequency alignment >requirements would be for such an external chopper. > >I think the question was basically equivalent to asking if you could >mix an IF down to baseband and then feed it to a soundcard without >subsequent filtering, relying on the soundcard's anti-aliasing filter >to remove unwanted mixing products. And that's probably a false economy!
Duh, okay, now that I've caught up to everyone else... ;) I think you got pretty good dialogue on this previously. Personally, if the sample clock to the ADC on the card is reasonably stable (enough to drive the SHA without degrading SNR), it might be as simple as driving an external SHA with the existing ADC clock. Getting that clock out cleanly might be tricky, but I think that'd be my first approach. Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Reply by Ben Jackson July 10, 20062006-07-10
On 2006-07-10, Eric Jacobsen <eric.jacobsen@ieee.org> wrote:
> On Sun, 09 Jul 2006 19:24:13 -0500, Ben Jackson <ben@ben.com> wrote: >> >>I meant that initially it would be narrow (<20kHz bw) and outside >>the 20kHz.
Here I was talking about still outside the soundcard, already band-limited.
>> Then by chopping
...outside the soundcard...
>> it would appear as an alias within >>the 20kHz passband of the soundcard.
...after going through the soundcard's anti-aliasing filter.
> What you're describing is often called "sampled IF" when used in > communications systems. For those type of systems the "anit-alias" > filter is actually a bandpass filter that passes the signal of > interest and rejects anything that may already be at baseband within > the normal Nyquist region of the converter. This leaves only the > aliased energy within the bandpass filter input frequency, with the > low-frequency alias left for subsequent digital processing.
Well, the "low frequency alias" doesn't exist until someone comes along and samples at Fs < 2 * Fmax. I was proposing to do that undersampling external to the soundcard (since the soundcard's input anti-alising filter and bandwidth are unsuitable, as you describe), essentially introducing a zero-order hold, and then use the soundcard to sample the aliased signal. What we were discussing was what (if any) phase/frequency alignment requirements would be for such an external chopper. I think the question was basically equivalent to asking if you could mix an IF down to baseband and then feed it to a soundcard without subsequent filtering, relying on the soundcard's anti-aliasing filter to remove unwanted mixing products. And that's probably a false economy! -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/
Reply by Eric Jacobsen July 10, 20062006-07-10
On Sun, 09 Jul 2006 19:24:13 -0500, Ben Jackson <ben@ben.com> wrote:

>On 2006-07-09, Eric Jacobsen <eric.jacobsen@ieee.org> wrote: >> On Fri, 07 Jul 2006 14:07:40 -0500, Ben Jackson <ben@ben.com> wrote: >> >>>On 2006-07-07, Jerry Avins <jya@ieee.org> wrote: >>>> My reasoning was, that if the S&H's sample window drifts with respect to >>>> the DAC's, there's no way to assure that the DAC always samples a >>>> settled signal. >>> >>>But the ADC (I think you mean) on the soundcard is behind the card's >>>anti-aliasing filter. In effect it can't "see" those high frequency >>>transitions at all. If there were no filter in the system, I'd agree >>>with what you're saying. >> >> Do you mean that the signal is fairly narrow and contained within the >> passband of the 20kHz anti-alias filter, or do you mean that the >> signal is less than 20kHz bandwidth and outside of the the filter >> passband? > >I meant that initially it would be narrow (<20kHz bw) and outside >the 20kHz. Then by chopping it would appear as an alias within >the 20kHz passband of the soundcard.
In that case it's a futile exercise as the anit-alias filter will already have attenuated the signal into oblivion. I think that's what Jerry was trying to say earlier. What you're describing is often called "sampled IF" when used in communications systems. For those type of systems the "anit-alias" filter is actually a bandpass filter that passes the signal of interest and rejects anything that may already be at baseband within the normal Nyquist region of the converter. This leaves only the aliased energy within the bandpass filter input frequency, with the low-frequency alias left for subsequent digital processing. If the anti-alias filter removes the desired signal before digitization and you don't want to change the anti-alias filter then you don't have much hope of recovering the signal. Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Reply by Ben Jackson July 9, 20062006-07-09
On 2006-07-09, Eric Jacobsen <eric.jacobsen@ieee.org> wrote:
> On Fri, 07 Jul 2006 14:07:40 -0500, Ben Jackson <ben@ben.com> wrote: > >>On 2006-07-07, Jerry Avins <jya@ieee.org> wrote: >>> My reasoning was, that if the S&H's sample window drifts with respect to >>> the DAC's, there's no way to assure that the DAC always samples a >>> settled signal. >> >>But the ADC (I think you mean) on the soundcard is behind the card's >>anti-aliasing filter. In effect it can't "see" those high frequency >>transitions at all. If there were no filter in the system, I'd agree >>with what you're saying. > > Do you mean that the signal is fairly narrow and contained within the > passband of the 20kHz anti-alias filter, or do you mean that the > signal is less than 20kHz bandwidth and outside of the the filter > passband?
I meant that initially it would be narrow (<20kHz bw) and outside the 20kHz. Then by chopping it would appear as an alias within the 20kHz passband of the soundcard. -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/
Reply by Eric Jacobsen July 9, 20062006-07-09
On Fri, 07 Jul 2006 14:07:40 -0500, Ben Jackson <ben@ben.com> wrote:

>On 2006-07-07, Jerry Avins <jya@ieee.org> wrote: >> My reasoning was, that if the S&H's sample window drifts with respect to >> the DAC's, there's no way to assure that the DAC always samples a >> settled signal. > >But the ADC (I think you mean) on the soundcard is behind the card's >anti-aliasing filter. In effect it can't "see" those high frequency >transitions at all. If there were no filter in the system, I'd agree >with what you're saying.
Do you mean that the signal is fairly narrow and contained within the passband of the 20kHz anti-alias filter, or do you mean that the signal is less than 20kHz bandwidth and outside of the the filter passband? Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Reply by July 9, 20062006-07-09
Jerry Avins wrote:
> Ben Jackson wrote: >> Let's say I have a signal of <= 20kHz but not at baseband. I want to >> use my soundcard as an ADC to undersample the signal, but I don't want >> to modify the card to remove the anti-aliasing filter. > > In theory, yes. Chopping the signal that way would effectively > heterodyne it to baseband. > >> Could I just >> chop the signal with an analog sample & hold (with an input bandwidth >> suitable for the maximum input frequency) at the soundcard's sample >> rate? How critical would it be for the S&H clock to exactly match the >> ADC clock? > > It would need to be phase locked within a narrow range of phases.
You may use the line out of the same soundcard to get a synchronuous clock. However, this clock will have only half of the frequency you need. But when use put the inverse signal to the left and right channel it should be possible to extract a clock when either of the channels changes to logical high. However, depending on the real frequency of your input signal you should be very careful with jitter. And do not expect too much from the aliasing filters of your soundcard. It may not filter the high frequency components of your S/H sufficiently. Marcel
Reply by Ben Jackson July 7, 20062006-07-07
On 2006-07-07, Jerry Avins <jya@ieee.org> wrote:
> My reasoning was, that if the S&H's sample window drifts with respect to > the DAC's, there's no way to assure that the DAC always samples a > settled signal.
But the ADC (I think you mean) on the soundcard is behind the card's anti-aliasing filter. In effect it can't "see" those high frequency transitions at all. If there were no filter in the system, I'd agree with what you're saying. -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/
Reply by Jerry Avins July 7, 20062006-07-07
Ben Jackson wrote:
> On 2006-07-07, Jerry Avins <jya@ieee.org> wrote: >> Jerry Avins wrote: >>> Ben Jackson wrote: >>>> How critical would it be for the S&H clock to exactly match the >>>> ADC clock? >>> It would need to be phase locked within a narrow range of phases. >> That works only if you can adjust the sample rate. A simpler method uses >> a front end that beats the lower edge of the band to DC. > > Aren't those two answers contradictory?
They may be. It was late when I wrote that. Maybe is was one of those moments of clarity that go *poof!* in the light of day.
> My original thought was that > if the original signal was undersampled and then run through a DAC, then > *that* signal would have the desired alias at baseband. So you cut > out the middle man and replace the ADC+DAC with just the S&H from the > front end of the ADC. The normal DAC output filter action is performed > by the soundcard's input anti-aliasing filter.
The theory doesn't matter, because it won't work in practice. Two easily overlooked requisites for undersampling are the acquisition jitter and frequency response. Both need to be as good as a full-rate ADC's. The S&H takes care of the frequency response, but not jitter. To use a just-good-enough sound card practically, you need to beat your signal to baseband and account for images.
> More generally, as you pointed out, this is just producing one of the > mixing products n*F +/- m*Fs, and if I choose Fs = F then even though > the sample rates don't match, the signal has still been moved down to > the soundcard's input frequency. Why does synchronization with the > soundcard's sample rate matter depending on the beat frequency?
My reasoning was, that if the S&H's sample window drifts with respect to the DAC's, there's no way to assure that the DAC always samples a settled signal. If the S&H's clock jitters as much as we know the DAC's will, the scheme falls apart. So you drive the S&H with a stable signal, and derive the DAC clock from that. Is the light worth the candle? Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
Reply by Ben Jackson July 7, 20062006-07-07
On 2006-07-07, Jerry Avins <jya@ieee.org> wrote:
> Jerry Avins wrote: >> Ben Jackson wrote: >>> How critical would it be for the S&H clock to exactly match the >>> ADC clock? >> >> It would need to be phase locked within a narrow range of phases. > > That works only if you can adjust the sample rate. A simpler method uses > a front end that beats the lower edge of the band to DC.
Aren't those two answers contradictory? My original thought was that if the original signal was undersampled and then run through a DAC, then *that* signal would have the desired alias at baseband. So you cut out the middle man and replace the ADC+DAC with just the S&H from the front end of the ADC. The normal DAC output filter action is performed by the soundcard's input anti-aliasing filter. More generally, as you pointed out, this is just producing one of the mixing products n*F +/- m*Fs, and if I choose Fs = F then even though the sample rates don't match, the signal has still been moved down to the soundcard's input frequency. Why does synchronization with the soundcard's sample rate matter depending on the beat frequency? Thanks. -- Ben Jackson AD7GD <ben@ben.com> http://www.ben.com/