DSPRelated.com
Forums

Spectrum compensation for zero-order hold DAC

Started by Brian Willoughby February 3, 2012
On 2/6/2012 8:24 PM, Tim Wescott wrote:

   ...

> By my definition, a signal which appears at a different frequency from > that at which it was sampled is an alias.
Does a modulator create aliases?
> The goal of the system > designer is to make sure that any unwanted aliases fall in a spectrum > that is disjoint from the spectrum of the wanted signal (or alias), so > that a reconstruction filter can, indeed, take it out.
I would like another opinion, maybe Rick's, here. I think that an alias is an artifact of sampling. Images appear during reconstruction. They are created by the sampling, but they aren't aliases because their spectra don't overlap the signal's spectrum.
> In fact, Wikipedia's definition matches mine: "In signal processing and > related disciplines, aliasing refers to an effect that causes different > signals to become indistinguishable (or aliases of one another) when > sampled."
Right. Different frequencies are distinguishable.
> It is immaterial to me if a 2kHz signal is an alias of a 3kHz > signal, if all I care about are signals from DC to 1kHz: I'll filter out > the 2kHz signal and the 3kHz signal to boot. It's much the same as if I > ask your name and you tell me "Ralph" -- if I'm looking for a guy named > Bob, I don't care if your name is Jerry, Ralph, or Murgatroyd, as long as > it isn't Bob.
:-) Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On 2/6/2012 8:36 PM, Tim Wescott wrote:

   ...

> What the OP was overlooking is that _in the limit_ as f approaches Fs/2 > the signal in question has an amplitude _at f_ of 2/pi (I think that's > what it was, at least), as predicted. But the closer that f gets to Fs/2 > the longer you have to look to see the average, etc.
That's true provided only that "the signal" is properly defined. Stay with the OP's simplification and sample a cosine. Stay with yours and keep an integer number of samples per cycle. (At f = fs/2, that means two samples per cycle.) The amplitude of the samples will be the same as the peak amplitude of a very low frequency. Properly defined, "the signal" doesn't mean the raw DAC output, but the output after the images are removed. The amplitude of _that_ is 2/pi. It is, after all, the magnitude of first term of the Fourier series of a square wave. Jerry -- Engineering is the art of making what you want from things you can get. ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
On 2/3/2012 6:05 PM, HardySpicer wrote:
> On Feb 4, 10:31 am, Jerry Avins<j...@ieee.org> wrote: >> On 2/3/2012 7:44 AM, Brian Willoughby wrote: >> >>> I just came across a concept that doesn't completely make sense to me, >>> and I am hoping that the group can help me to understand more. >> >> [confusion deleted (if only!)] >> >> The root of your confusion is a bad assumption early on. The >> sample-and-hold does affect the response below Nyquist. A sample and >> hold has no effect at DC, and puts out only DC when the input signal is >> at the sample rate. In between it gently rolls off along a sin(x)/x >> curve. (x = pi at the sample rate.) At the Nyquist rate, the output (of >> the fundamental) sin(pi/2)/(pi/2), or about .637. that's roughly -4 dB. >> >> 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; > > You mean zero-order hold - not sample and hold...
Bryan imagined that his ZOH is made by following an impulsive DAC with an analog S&H. (Please pardon the alphabet soup.) I tried to stay with his paradigm. I shouldn't have. 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 Tue, 07 Feb 2012 10:49:31 -0500, Jerry Avins <jya@ieee.org> wrote:

>On 2/6/2012 8:24 PM, Tim Wescott wrote: > > ... > >> By my definition, a signal which appears at a different frequency from >> that at which it was sampled is an alias. > >Does a modulator create aliases? > >> The goal of the system >> designer is to make sure that any unwanted aliases fall in a spectrum >> that is disjoint from the spectrum of the wanted signal (or alias), so >> that a reconstruction filter can, indeed, take it out. > >I would like another opinion, maybe Rick's, here. I think that an alias >is an artifact of sampling. Images appear during reconstruction. They >are created by the sampling, but they aren't aliases because their >spectra don't overlap the signal's spectrum. > >> In fact, Wikipedia's definition matches mine: "In signal processing and >> related disciplines, aliasing refers to an effect that causes different >> signals to become indistinguishable (or aliases of one another) when >> sampled." > >Right. Different frequencies are distinguishable. > >> It is immaterial to me if a 2kHz signal is an alias of a 3kHz >> signal, if all I care about are signals from DC to 1kHz: I'll filter out >> the 2kHz signal and the 3kHz signal to boot. It's much the same as if I >> ask your name and you tell me "Ralph" -- if I'm looking for a guy named >> Bob, I don't care if your name is Jerry, Ralph, or Murgatroyd, as long as >> it isn't Bob. > >:-) > >Jerry
Tim and I aren't the only people who casually refer to images as aliases. In most environments I've worked in people understand it, and it's especially effective for talking to implementers or techs who understand aliasing but may not be familiar with spectral replication in reconstruction. So it's handy to use that way, but I've never had an issue with it being used this way even in meetings or discussions at an engineering or theoretical level. I do agree that "image" is a more correct term for the reconstruction artifacts, but, as Tim pointed out with the Wiki article, restricting "alias" to refer only to ADC sampling artifacts <fs/2 is not as general and more restrictive than the word implies. Either way, it pays to understand the concept first and worry about what to call it second. It's not like we don't have a lot of overloaded and poorly defined terms in this business. I gave up on trying to herd the cats into more disciplined usage of terms long ago. I've found it easier and less time consuming to just ask for clarification when there's a potential problem with ambiguity. But, yes, I think "image" is a better term for the artifacts in reconstruction, but "alias" is often used. Eric Jacobsen Anchor Hill Communications www.anchorhill.com
On Tue, 07 Feb 2012 12:11:19 -0500, Jerry Avins wrote:

> On 2/6/2012 8:36 PM, Tim Wescott wrote: > > ... > >> What the OP was overlooking is that _in the limit_ as f approaches Fs/2 >> the signal in question has an amplitude _at f_ of 2/pi (I think that's >> what it was, at least), as predicted. But the closer that f gets to >> Fs/2 the longer you have to look to see the average, etc. > > That's true provided only that "the signal" is properly defined. Stay > with the OP's simplification and sample a cosine. Stay with yours and > keep an integer number of samples per cycle. (At f = fs/2, that means > two samples per cycle.) The amplitude of the samples will be the same as > the peak amplitude of a very low frequency. Properly defined, "the > signal" doesn't mean the raw DAC output, but the output after the images > are removed. The amplitude of _that_ is 2/pi. It is, after all, the > magnitude of first term of the Fourier series of a square wave.
Well, I guess that's what I'm trying to bring the OP to a realization of. He appears to be looking at the DAC output on an oscilloscope and taking the "signal amplitude" as the p-p amplitude of the DAC output, I'm trying to show why that doesn't fit either with what he's asking or what we're saying. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
On Tue, 07 Feb 2012 17:27:21 +0000, Eric Jacobsen wrote:

> On Tue, 07 Feb 2012 10:49:31 -0500, Jerry Avins <jya@ieee.org> wrote: > >>On 2/6/2012 8:24 PM, Tim Wescott wrote: >> >> ... >> >>> By my definition, a signal which appears at a different frequency from >>> that at which it was sampled is an alias. >> >>Does a modulator create aliases? >> >>> The goal of the system >>> designer is to make sure that any unwanted aliases fall in a spectrum >>> that is disjoint from the spectrum of the wanted signal (or alias), so >>> that a reconstruction filter can, indeed, take it out. >> >>I would like another opinion, maybe Rick's, here. I think that an alias >>is an artifact of sampling. Images appear during reconstruction. They >>are created by the sampling, but they aren't aliases because their >>spectra don't overlap the signal's spectrum. >> >>> In fact, Wikipedia's definition matches mine: "In signal processing >>> and related disciplines, aliasing refers to an effect that causes >>> different signals to become indistinguishable (or aliases of one >>> another) when sampled." >> >>Right. Different frequencies are distinguishable. >> >>> It is immaterial to me if a 2kHz signal is an alias of a >>> 3kHz >>> signal, if all I care about are signals from DC to 1kHz: I'll filter >>> out the 2kHz signal and the 3kHz signal to boot. It's much the same >>> as if I ask your name and you tell me "Ralph" -- if I'm looking for a >>> guy named Bob, I don't care if your name is Jerry, Ralph, or >>> Murgatroyd, as long as it isn't Bob. >> >>:-) >> >>Jerry > > Tim and I aren't the only people who casually refer to images as > aliases. In most environments I've worked in people understand it, and > it's especially effective for talking to implementers or techs who > understand aliasing but may not be familiar with spectral replication in > reconstruction. So it's handy to use that way, but I've never had an > issue with it being used this way even in meetings or discussions at an > engineering or theoretical level. > > I do agree that "image" is a more correct term for the reconstruction > artifacts, but, as Tim pointed out with the Wiki article, restricting > "alias" to refer only to ADC sampling artifacts <fs/2 is not as general > and more restrictive than the word implies. Either way, it pays to > understand the concept first and worry about what to call it second. > > It's not like we don't have a lot of overloaded and poorly defined terms > in this business. I gave up on trying to herd the cats into more > disciplined usage of terms long ago. I've found it easier and less time > consuming to just ask for clarification when there's a potential problem > with ambiguity. > > But, yes, I think "image" is a better term for the artifacts in > reconstruction, but "alias" is often used.
I will try to be more precise in my terminology in the future -- but I'll still think privately that "alias" is a perfectly valid term for the phenomenon under discussion. -- My liberal friends think I'm a conservative kook. My conservative friends think I'm a liberal kook. Why am I not happy that they have found common ground? Tim Wescott, Communications, Control, Circuits & Software http://www.wescottdesign.com
Eric Jacobsen <eric.jacobsen@ieee.org> wrote:


(snip)
> Tim and I aren't the only people who casually refer to images as > aliases. In most environments I've worked in people understand it, > and it's especially effective for talking to implementers or techs who > understand aliasing but may not be familiar with spectral replication > in reconstruction. So it's handy to use that way, but I've never had > an issue with it being used this way even in meetings or discussions > at an engineering or theoretical level.
I suppose most of the time either one is fine with me. Only in the case where they do need to be distinguised is it important to get the right one. As someone, I believe Jerry, noted:
>>Does a modulator create aliases?
In the case of an ideal modulator, generating an upper and lower sideband off the carrier, image seems an appropriate term. The two are like mirror images. If you add the signal and carrier, and then pass the sum through a non-linear system (such as a diode) you will get many aliases along with the possibly desired upper and lower sidebands at the sum and difference frequency. Seems to me that part of the difference is in which ones you actually want and which ones you don't want. Note that in addition to using non-linear circuits as modulators and demodulators, they can also be used as frequency multipliers. If you filter out a higher harmonic of the carrier, along with its sidebands, do you call that alias or image?
> I do agree that "image" is a more correct term for the reconstruction > artifacts, but, as Tim pointed out with the Wiki article, restricting > "alias" to refer only to ADC sampling artifacts <fs/2 is not as > general and more restrictive than the word implies. Either way, it > pays to understand the concept first and worry about what to call it > second.
It seems to me that alias is bad when it overlaps the desired signal band, such that it can't be filtered out. Image is sometimes desired, and often can be filtered when not.
> It's not like we don't have a lot of overloaded and poorly defined > terms in this business. I gave up on trying to herd the cats into > more disciplined usage of terms long ago. I've found it easier and > less time consuming to just ask for clarification when there's a > potential problem with ambiguity.
> But, yes, I think "image" is a better term for the artifacts in > reconstruction, but "alias" is often used.
It gets especially interesting in the non-baseband case. -- glen
On Tue, 07 Feb 2012 11:55:48 -0600, Tim Wescott <tim@seemywebsite.com>
wrote:

>On Tue, 07 Feb 2012 17:27:21 +0000, Eric Jacobsen wrote: > >> On Tue, 07 Feb 2012 10:49:31 -0500, Jerry Avins <jya@ieee.org> wrote: >> >>>On 2/6/2012 8:24 PM, Tim Wescott wrote: >>> >>> ... >>> >>>> By my definition, a signal which appears at a different frequency from >>>> that at which it was sampled is an alias. >>> >>>Does a modulator create aliases? >>> >>>> The goal of the system >>>> designer is to make sure that any unwanted aliases fall in a spectrum >>>> that is disjoint from the spectrum of the wanted signal (or alias), so >>>> that a reconstruction filter can, indeed, take it out. >>> >>>I would like another opinion, maybe Rick's, here. I think that an alias >>>is an artifact of sampling. Images appear during reconstruction. They >>>are created by the sampling, but they aren't aliases because their >>>spectra don't overlap the signal's spectrum. >>> >>>> In fact, Wikipedia's definition matches mine: "In signal processing >>>> and related disciplines, aliasing refers to an effect that causes >>>> different signals to become indistinguishable (or aliases of one >>>> another) when sampled." >>> >>>Right. Different frequencies are distinguishable. >>> >>>> It is immaterial to me if a 2kHz signal is an alias of a >>>> 3kHz >>>> signal, if all I care about are signals from DC to 1kHz: I'll filter >>>> out the 2kHz signal and the 3kHz signal to boot. It's much the same >>>> as if I ask your name and you tell me "Ralph" -- if I'm looking for a >>>> guy named Bob, I don't care if your name is Jerry, Ralph, or >>>> Murgatroyd, as long as it isn't Bob. >>> >>>:-) >>> >>>Jerry >> >> Tim and I aren't the only people who casually refer to images as >> aliases. In most environments I've worked in people understand it, and >> it's especially effective for talking to implementers or techs who >> understand aliasing but may not be familiar with spectral replication in >> reconstruction. So it's handy to use that way, but I've never had an >> issue with it being used this way even in meetings or discussions at an >> engineering or theoretical level. >> >> I do agree that "image" is a more correct term for the reconstruction >> artifacts, but, as Tim pointed out with the Wiki article, restricting >> "alias" to refer only to ADC sampling artifacts <fs/2 is not as general >> and more restrictive than the word implies. Either way, it pays to >> understand the concept first and worry about what to call it second. >> >> It's not like we don't have a lot of overloaded and poorly defined terms >> in this business. I gave up on trying to herd the cats into more >> disciplined usage of terms long ago. I've found it easier and less time >> consuming to just ask for clarification when there's a potential problem >> with ambiguity. >> >> But, yes, I think "image" is a better term for the artifacts in >> reconstruction, but "alias" is often used. > >I will try to be more precise in my terminology in the future -- but I'll >still think privately that "alias" is a perfectly valid term for the >phenomenon under discussion.
I agree, but I understand when people want to make the distinction between them. Eric Jacobsen Anchor Hill Communications www.anchorhill.com
On Tue, 07 Feb 2012 10:49:31 -0500, Jerry Avins <jya@ieee.org> wrote:

>On 2/6/2012 8:24 PM, Tim Wescott wrote: > > ... > >> By my definition, a signal which appears at a different frequency from >> that at which it was sampled is an alias. > >Does a modulator create aliases?
Case in point: We've developed a number of modulators that use a sampled IF and take an image at >fs/2 as the final output that goes out the antenna rather than the energy at <fs/2. More than once, I'd say "many" times, during the proposal process as well as during development and to customers after development, when explaining what it does it has gone like this: Me: "We take the image at frequency X, bandpass filter it, and that is the analog IF output." Customer/Implementer/Whoever: "What do you mean by that? That's well over half the sample rate." Me: "We take one of the spectral replicates that is at the desired IF frequency, filter it, and that's the output." Customer/Implementer/Whoever: "Spectral replicate?" Me: "It's essentially an alias of the modulated signal." Customer/Implementer/Whoever: "Ah, I get it. Now I understand." I've found that many people understand it better when you use the term "alias", even though "image" might be "more correct". And, yes, that was a modulator, so I'd argue that to a lot of people a modulator does, in fact, create aliases. I won't disagree strongly with that point of view because I think there's some reasonable logic behind it. It's consistent with the Wiki definition that Tim referenced. But "image" is a better word when making the distinction. Eric Jacobsen Anchor Hill Communications www.anchorhill.com
On 2/7/2012 12:53 PM, Tim Wescott wrote:
> On Tue, 07 Feb 2012 12:11:19 -0500, Jerry Avins wrote: > >> On 2/6/2012 8:36 PM, Tim Wescott wrote: >> >> ... >> >>> What the OP was overlooking is that _in the limit_ as f approaches Fs/2 >>> the signal in question has an amplitude _at f_ of 2/pi (I think that's >>> what it was, at least), as predicted. But the closer that f gets to >>> Fs/2 the longer you have to look to see the average, etc. >> >> That's true provided only that "the signal" is properly defined. Stay >> with the OP's simplification and sample a cosine. Stay with yours and >> keep an integer number of samples per cycle. (At f = fs/2, that means >> two samples per cycle.) The amplitude of the samples will be the same as >> the peak amplitude of a very low frequency. Properly defined, "the >> signal" doesn't mean the raw DAC output, but the output after the images >> are removed. The amplitude of _that_ is 2/pi. It is, after all, the >> magnitude of first term of the Fourier series of a square wave. > > Well, I guess that's what I'm trying to bring the OP to a realization > of. He appears to be looking at the DAC output on an oscilloscope and > taking the "signal amplitude" as the p-p amplitude of the DAC output, I'm > trying to show why that doesn't fit either with what he's asking or what > we're saying.
I know. I tried to amplify what you had been writing. Jerry -- Engineering is the art of making what you want from things you can get. &macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;&macr;