DSPRelated.com
Forums

In D/A conversion, is sample-and-hold necessary?

Started by m26k9 July 23, 2009
Clay <clay@claysturner.com> wrote:
 
< As I think either you or Glen alluded to, one advantage of narrow
< pulses, is the sinc for reconstruction becomes so broad as to be
< effectively flat. I don't recall the exact width of the pulses, but I
< do remember when I first looked at them on my 'scope. I was impressed
< with the simplicity yet effectiveness of the design. The chip IIRC was
< just 18 pins. 

Reminds me that audio CDs store the track number in BCD, for
a maximum of 99 tracks per CD.  (No track 0.)  That was to
save the logic for a binary to BCD decoder in CD players.

From the days when every last gate and every last pin on 
a package were important.

-- glen
Dear Tim, Clay, Jerry, Glen, Vladimir and robert. Thank you a million for
your input. 

I would be glad if someone could clarify this explanation a bit more.

>The narrow pulses contain less energy than wider ones >would. In fact, the energy at low frequencies is directly proportional >to the pulse area, height times width. When the pulses are narrow, >energy is low, but the response is uniform at all frequencies. As the >pulses widen, energy at all frequencies increases, but high=frequency >energy increases less. (The width of the pulse "blurs" the highs.)
I am a little unsure as to how to mathematically get the frequency-power relationship described here. Probably missing something very basic. Wider pulses do contain more energy (for the same pulse height), but how to get the relation "high-frequency energy increases less"? Thank you heaps for all the input.
m26k9 wrote:
> Dear Tim, Clay, Jerry, Glen, Vladimir and robert. Thank you a million for > your input. > > I would be glad if someone could clarify this explanation a bit more. > >> The narrow pulses contain less energy than wider ones >> would. In fact, the energy at low frequencies is directly proportional >> to the pulse area, height times width. When the pulses are narrow, >> energy is low, but the response is uniform at all frequencies. As the >> pulses widen, energy at all frequencies increases, but high=frequency >> energy increases less. (The width of the pulse "blurs" the highs.) > > I am a little unsure as to how to mathematically get the frequency-power > relationship described here. Probably missing something very basic. Wider > pulses do contain more energy (for the same pulse height), but how to get > the relation "high-frequency energy increases less"? > > Thank you heaps for all the input.
The derivation isn't something you really need for addressing your question. A graph showing the response falloff at higher frequencies is Figure 1 of http://waynestegall.com/audio/linearphasepostdac.htm. The curve assumes that each audio output lasts until the next is produced. The sampling rate is 44.1 KHz. Look for an explanation of the need for "sync compensation". Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Jul 23, 8:54&#4294967295;pm, "m26k9" <maduranga.liyan...@gmail.com> wrote:
> Dear Tim, Clay, Jerry, Glen, Vladimir and robert. Thank you a million for > your input.
what input was that? until maybe now, i said nothing to help you out. (and the "STUPIDENT" wasn't directed at you, unless it comes from Vlad.)
> I am a little unsure as to how to mathematically get the frequency-power > relationship described here. Probably missing something very basic. Wider > pulses do contain more energy (for the same pulse height), but how to get > the relation "high-frequency energy increases less"?
it used to be that i could find old posts of mine in Google Groups, but no more (i think that the time integral of USENET expanded faster than Google's ability to archive it, even Google is smaller than the exponential function). so i'll do a little repeating of myself: when you sample a signal x(t) with a string of impulses x(t) * T * SUM{ delta(t - nT) } n you get T * SUM{ x(nT) delta(t - nT) } n note the leading T factor. when that is passed through an ideal, theoretical, brick-wall filter with cutoff at 1/(2T), what comes out is x(t). that's what the sampling theorem says. the impulse response of this ideal brick-wall filter is: h(t) = (1/T)*sinc(t/T) now if you pass the above string of weighted impulses through a hypothetical analog filter with impulse response h(t) = (1/T)*rect(t/T - 1/2) where rect(u) = 1 only if |u|<1/2 and zero otherwize. the delay of 1/2 is there to make the impulse response causal. if you do that, you get the ideal S/H output of a normal D/A. the frequency response of that hypothetical filter is H(f) = sinc(f*T) * e^(j*pi*f*T) r b-j
robert bristow-johnson wrote:
> On Jul 23, 8:54 pm, "m26k9" <maduranga.liyan...@gmail.com> wrote: >> Dear Tim, Clay, Jerry, Glen, Vladimir and robert. Thank you a million for >> your input. > > what input was that? until maybe now, i said nothing to help you > out. (and the "STUPIDENT" wasn't directed at you, unless it comes > from Vlad.) > >> I am a little unsure as to how to mathematically get the frequency-power >> relationship described here. Probably missing something very basic. Wider >> pulses do contain more energy (for the same pulse height), but how to get >> the relation "high-frequency energy increases less"? > > it used to be that i could find old posts of mine in Google Groups, > but no more (i think that the time integral of USENET expanded faster > than Google's ability to archive it, even Google is smaller than the > exponential function). so i'll do a little repeating of myself: > > > when you sample a signal x(t) with a string of impulses > > > x(t) * T * SUM{ delta(t - nT) } > n > > you get > > > T * SUM{ x(nT) delta(t - nT) } > n > > note the leading T factor. when that is passed through an ideal, > theoretical, brick-wall filter with cutoff at 1/(2T), what comes out > is x(t). that's what the sampling theorem says. the impulse response > of this ideal brick-wall filter is: > > h(t) = (1/T)*sinc(t/T) > > now if you pass the above string of weighted impulses through a > hypothetical analog filter with impulse response > > h(t) = (1/T)*rect(t/T - 1/2) > > where > > rect(u) = 1 only if |u|<1/2 and zero otherwize. > > the delay of 1/2 is there to make the impulse response causal. > > if you do that, you get the ideal S/H output of a normal D/A. the > frequency response of that hypothetical filter is > > H(f) = sinc(f*T) * e^(j*pi*f*T)
Another viewpoint: If a frequency of 1/T were possible, each interval of T would contain one full cycle. The cycle would be aliased to DC, and the response would be zero. Look at the response of a sinc -- it does indeed go to zero there. In the way, it droops. Half way there, at Fs/2, it is a little over 3 dB down. That's the sinc rolloff. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry, Robert, thank you very much for your time and explanations sir.

I think I get it now. If I understand correctly, the high-frequency
attenuation is an effect of the sinc shape. 
Seems there are quite few ways to do the D/A/D-C and well beyond the usual
S/H + LPF or delta-sigma found in text books. My scheme is still analytical
hence I think the correct way would be analyze the DAC as a S/H + LPF
rather than a LPF alone.

Thank you very much.
On Jul 23, 11:30&#4294967295;pm, "m26k9" <maduranga.liyan...@gmail.com> wrote:
> > I think I get it now. If I understand correctly, the high-frequency > attenuation is an effect of the sinc shape. > Seems there are quite few ways to do the D/A/D-C and well beyond the usual > S/H + LPF or delta-sigma found in text books. My scheme is still analytical > hence I think the correct way would be analyze the DAC as a S/H + LPF > rather than a LPF alone.
well, you *could* have the LPF alone, but how are you gonna get the string of impulses to filter with it? that "Dirac comb" that you see in the sampling theorem is a fictional construct to illustrate a point (it effectively throws away all of the information between samples, yet somehow, if it was bandlimited to begin with, you can get that information back). when we sample, we don't *really* use a string of Dirac delta functions. we sample at virtual instances by some other means. but to reconstruct, we know if we attached our samples to these Dirac impulses and LPF, we get our original bandlimited signal back. but the D/A does not spit out a string of Dirac impulses, it spits out a piece-wise constant function which can be mathematically modeled as a string of Dirac impulses followed by a linear filter with that (1/T)rect(t/T) as an impulse response. that is the reason that a simple D/A has that sinc(f*T) response. r b-j
m26k9 <maduranga.liyanage@gmail.com> wrote:

> Seems there are quite few ways to do the D/A/D-C and well > beyond the usual S/H + LPF or delta-sigma found in text books. My > scheme is still analytical hence I think the correct way would > be analyze the DAC as a S/H + LPF rather than a LPF alone.
This may be tangential, but in my opinion almost no design engineers would refer to a DAC as automatically containing a sample-hold function. S/H implies there is either a continuous-time signal you are sampling, or a higher-sample-rate digital signal you are sampling; and the latter usage is probably stretching normal terminology. It is quite possible the signal sourcing the DAC is the highest-sample-rate signal in the system, hence there is no additional "sampling" in the DAC. If this word usage occured in a textbook, it might be peculiar to that textbook. What many DAC's do automatically give you is a "zero-order hold" function. (Although, conceptually you can have a DAC without this.) Steve
Thank you very much Robert, Steve.

Actually I do have a impulse train of samples. I am doing the DAC on on an
IFFT output. So the digital samples are already there. Does that mean I do
not need a S/H and do a LPF directly?

But, even if I do not have a pulse train, I can do sampling on my analog
signal, get the digital samples, send it through a LPF and it will
construct an analog signal? would it not?

I am a little confused still as to why I need to do S/H before LPF, as
oppose to just LPF?

Thank you and I am sorry if I am missing a a trivial point.

robert bristow-johnson wrote:

> On Jul 23, 1:49 pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote: > >>There is a DSD audio format which is essentially a pulse density >>modulated signal. There is no sample-hold there.
Isn't DSD the direct analog to PDM conversion? BTW, I have never seen the DSD in the reality. Do you actually use it? VLV