Talk:Zero-order hold
This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
the T factor in Zero-order hold
[edit]hi Dastew,
two things: please ask questions like you have at Zero-order hold in the talk page, not on the article itself. if you want to know why there is this different factor of T, this is discussed quite a bit in Talk:Nyquist–Shannon sampling theorem and also on the USENET comp.dsp. the basic reason is that nearly all textbooks (Pohlmann: Principles of Digital Audio is a notable exception) sample with the Dirac comb without this leading factor of T, that causes each image to be scaled by 1/T, which requires the reconstruction LPF to have a passband gain of T to get the original x(t) out. here we include the leading T factor and the reconstruction LPF has a passband gain of 1. now this does not make any difference regarding the function of the ZOH, but there is confusion that this convention in the textbooks do with that gain factor that we do not have here in WP. this was discussed quite extensively at the sampling theorem talk page. anyway, welcome to Wikipedia. r b-j 18:09, 24 January 2007 (UTC)
btw, you can respond here if you want, no need to go to my talk page. r b-j 18:14, 24 January 2007 (UTC)
- Well this is wrong!!! Matlab does not agree with you. Octave does not agree with you.
- and I don't agree with you. I have built and used differnt programs that are based on the ZOH without the T in the denominator and they work!!! Therefore this is wrong!
- Doug Stewart B.E.Sc. P.Eng.
- it is not wrong. (and try not to underestimate other editors here - there are some pretty smart cookies here.) and MATLAB and Octave have nothing to do with it (they both work with dimensionless numbers and T is not dimensionless). you need to think about what it means to have a hypothetical filter (the brickwall LPF used in reconstruction) with a dimensionful passband gain of T. how may dB is T? does the number of dB gain that corresponds to a gain of T depend on what units you use to express T? should it?
- consider that you have a filter where the species of animal coming out is the same species going in (voltage-in, voltage-out or dimensionless-in, dimensionless-out). now ask yourself what is the dimension of the impulse response of such a filter? i respect your P.Eng. but you might have something that you could learn here. r b-j 18:11, 25 January 2007 (UTC)
- Would you consider puting both versions on the page? And explain that your version has to have this extra T becouse of outher problems related to how you are using it but not realy part of the ZOH?
- I just took a look around the web and looked at about 30 places that disagree with you.
- I found 0 zero that agreed with you.
- Given that every resource that I can find disagrees with you( I could list them all here but why bother), could you explain to me Why:
- Why do " MATLAB and Octave have nothing to do with it"?
- Why are all these people wrong and you are the only one that knows the truth?
- Doug
- anything can be considered. a similar note used to be in the Nyquist–Shannon sampling theorem article and was taken out here and was discussed a little here (there was some objection to including this note about scaling Talk:Nyquist–Shannon sampling theorem#Simple_Solution [1] [2] [3] ).
- so what has happened, we wanted consistancy between the sampling theorem article and the zero and first order hold articles, since the holds simply ask the question "what LTI system can you put in place of the reconstruction LPF, without changing the baseband gain, that will convert the ideally sampled signal into the piecewise constant (or piecewise linear) function that represents the output of a DAC?" if you're going to be gain neutral about this, your reconstruction LPF has to have a passband gain of 1 instead of T which is the convention in most, not all, textbooks (and that T factor is pushed ahead into the ideally sampled signal). then when you ask the question above, the answer is a filter with dimensionless gain and, in fact, a gain of 1 (0 dB) at DC (and close to it for most of the passband). it's not messed up by any factor of T. there was pretty much consensus to just take out this "Note about Scaling" and scale this the logical way even if it was not the convention in most textbooks. r b-j 01:08, 26 January 2007 (UTC)
- What you have done is asked the wrong question. What you should be answering is:
- What is the LTI system that will produce the "stair step* results of an a/d d/a.
- This is all in the Time domain. But what you are asking for is a particular result in the frequency domain. We have the other methods for that. (bilinear Matched pole zero etc.)
- The only system that produces the correct step response (in the time domain)is the ZOH and now you want to change it so it won't even work there. When I build a system that has to work in the frequency domain criteria, I do not use the ZOH.
- You could put the two systems in your web page and state what they are good for.
The T scaling question
[edit]User:Dastew wrote (by the way, Doug, when you use the talk page, put four squiggles (~~~~) at the end and it will expand into a signature with working link and date):
- Every text book that I have shows the ZOH as:
- So why the difference?
Here's the deal. Either filter can work, depending on how you scale the impulse that you put into it. Consider the limit as s goes to zero, so you can see the DC gain of the two filters. The one in the article has a DC gain of 1. The one you prefer, which is indeed common in the literature, has a gain T. Why?
We chose to use a filter with DC gain of 1 because it's nicer, and as Robert says, doesn't depend on what units you measure time in. The choice relates back to what you use as sampling impulses. The unity-gain-at-DC filter is correct for the case where the sampled signal, viewed as a stream of impulses, has the same average value or DC component (or any low frequency component for that matter) as the underlying bandlimited signal that the samples correspond to. This again is a very sensible condition. It means that if the analog bandlimited signal value is 1, you want to represent the sample with an impulse of area T, because you get a new one every T. The impulse you use to get this is , which can also be written as . This latter form makes a lot more sense to me, because it compresses the time scale instead of multiplying the amplitude scale of the delta, but it confuses some people who don't see that they are equivalent.
If you use the more common sampling impulse, just , the mean value of your impulse train, and the filter needed to model the ZOH, now have time factors in them, and so depend on the units with which you measure T. As you say, most textbooks put up with that; but not all. It doesn't hurt to use the cleaner formulation here, and as Robert points out it was well debated in the other article and this is where we settled out.
Your experience with Matlab and Octave is relevant to understanding this, too, because there you are using discrete sample values, not impulse trains, and you can't implement the specified laplace-domain ZOH filter directly, so you have to model or approximate it somehow. If you think of the sample values as the mean values over the sampling interval T of the sample impulse , then things will work out. But if you think of the discrete numbers as the integrals of the sample impulses, things will not work out, and you'll be off by a factor of T. The only conflict here is in how you need to interpret what you're doing to be consistent with one formulation or the other. You could add a section about that once you understand it.
Dicklyon 23:04, 26 January 2007 (UTC)
- But is really worth the 1/T gain here?:
- Can't all the arguments for dimensionless frequency response also be used to argue for dimensionless impulse-response?
- nooooo. that's precisely not the case! in a continuous-time LTI system, what must the dimension of the impulse response be if the system has the same species of animal guzzouta as guzzinta? think of what is the dimension of the dirac delta or dirac comb if you accept the bonehead, neanderthal understanding of either? then think of an LTI system that is a simple "wire". r b-j 18:30, 29 January 2007 (UTC)
- Robert, if you invite comments you shouldn't then thank Bob by using words like "bonehead". Better to point out coolly what's wrong with his logic, which is this: an impulse response of height 1 and width T can not really be said to be non-dimensional. Make it height 1/T and width T, then it will have an integral of 1, or DC gain of 1, and hence will qualify as a smoothing filter. If you don't normalize the height that way, then the filter will have a gain of T for any signal in the passband, which will depend on the units of measurement of T. Dicklyon 18:47, 29 January 2007 (UTC)
- I do get that, but it's not the only side of the story.
- If we sample signal at rate 1/T, we get . Similarly, if we sample it at 8 times that rate, we expect to get . Therefore , not .
- And if we use a good interpolator to upsample by 8, we expect the output to resemble . That is commonly done by inserting 7 zero-valued samples in between each pair of original samples, and filtering the whole sequence with a lowpass filter. The better the filter, the better the fidelity. A rect() function, of width T (which is 8 samples at the new rate) is a lowpass filter, but not a very good one... resulting in the staircase effect. But the output will most closely resemble when the amplitude of the rect() is 1, not 1/8. I think this is why the 1/T factor is not in common usage.
- --Bob K 05:17, 30 January 2007 (UTC)
- "bonehead" and "neanderthal" is not at all directed toward anyone but myself and any other advocate that the distribution only definition and usage of the dirac delta is not particularly useful for our use as engineers and to describe physically what might be going on. the "bonehead" and "neanderthal" use of the dirac delta (which is my use of the dirac delta) is what the they call the "nascent" delta functions in the Dirac delta article. this is in contrast to the Cromagnon (LutzL?) understanding of the dirac as a distribution which is much more nuanced, but it might be more difficult to describe what the dimension of the dependent variable (the "y-axis" variable) is, since it's not really a function to begin with. i certainly didn't expect that i was insulting anyone but just qualifying what i mean when i say what the "dimension of the impulse function" is. r b-j 21:01, 29 January 2007 (UTC)
- OK, I couldn't quite tell who/what it referred to, but it didn't feel right. Got it now. Dicklyon 21:59, 29 January 2007 (UTC)
- I think so, and if most of the books prefer the latter, I think we need to reconsider our position. What I suggest is this modification:
- "... the Zero-order hold is the hypothetical filter or LTI system that converts an ideally sampled signal:
- to a piecewise constant signal:
- "
- I.e., our notation is not really helpful here. It's just unnecessary baggage.
- --Bob K 18:10, 29 January 2007 (UTC)
Complete re-write
[edit]I have probably just wasted a bunch of time, but here is what I think the article needs to say:
The Zero-order hold (ZOH) is a mathematical model of the practical reconstruction of sampled signals done by conventional digital-to-analog converters (DAC). When a signal, x(t), is sampled at intervals of length T, we are left with just the discrete sequence: x(nT), for integer values of n. A zero-order hold reconstructs the following continuous-time waveform from the samples:
- where is the rectangular function.
is depicted in Figure 1, and is the piecewise constant function depicted in Figure 2.
In other words, most conventional DACs output a voltage proportional to the discrete sample value and hold that voltage constant for the duration of the sampling interval and then change that voltage rapidly to the value corresponding to the next discrete sample value.
The rect() function performs a crude, 1-sample, interpolation to span the gap between the original signal samples. At the other extreme of sophistication is the impractical Whittaker-Shannon_interpolation_formula:
Since each sinc() function is infinitely long, every interpolated value is a result of infinitely many samples.
The operations indicated in these formulas can be modelled mathematically as a filtering operation.
The input to the filter is a series of impulse functions, called a Dirac comb, modulated by the sample values:
which is depicted in Figure 3. "" represents an arbitrary constant that may be chosen to balance out the filter gain, so that the reconstructed signal has the same amplitude as x(t).
The filter is defined by its impulse response. For a zero-order hold, the impulse response is:
where is a popular choice in the literature.
The effective frequency response is the continuous Fourier transform of the impulse response:
- We note that , which may make the choice more appealing (than A=1) for some applications.
Compared to the "ideal" (Whittaker-Shannon) frequency response, has a roll-off of gain at the higher frequencies (a 3.9224 dB loss at the Nyquist frequency). Above the Nyquist frequency, the roll-off continues, whereas the "ideal" response is a brick-wall cutoff. is not bandlimited, so if is bandlimited, then the subsequent leakage of higher frequencies represents a difference between and .
- Similarly, if is not bandlimited, then is also an imperfect reconstruction.
And finally, the Laplace transform transfer function of the ZOH is found by substituting into :
--Bob K 23:11, 30 January 2007 (UTC)
Comment on Bob K's rewrite
[edit]Not bad, Bob. I like what you're trying to do here. However, I'm not convinced that it will be more intelligible, or that it will survive the WP:OR hammer. You generalize the choice between the two cases we're arguing over, which is novel, and is useful perhaps, once you understand it, but it's still very perplexing to a newbie to see the arbitrary A introduced. And then later when you say why A=T might be preferred, some more words are probably needed, to explain that T/A is the DC gain, and that by being one it makes a smoothing filter, which could also be applied to the underlying original bandlimited continuous-time signal to get the net system response, etc. Dicklyon 04:30, 31 January 2007 (UTC)
- Thanks for the support. I was actually hoping that you would take over the A=T elaboration, so it comes out to your satisfaction. Feel free to edit my text.
- Regarding "underlying original bandlimited continuous-time signal", please note that I have avoided that assumption. In fact the original x(t) could be the staircase-type function, , for all we know. The ZOH is a real-world operation, and real-world signals are not bandlimited (== infinite duration). The Whittaker-Shannon_interpolation_formula can be applied to any sequence. The only stipulation is that in order for it to reproduce the original input exactly, there can't be any aliasing. But I have not claimed that it reproduces the original input, just as the ZOH does not generally do that. I have only claimed that they are both interpolation formulas.
- --Bob K 05:33, 31 January 2007 (UTC)
- Right, I get that. What I meant though is that since there IS always a unique underlying bandlimited signal, even if that's not where the samples came from, the ZOH filter can be imagined applying to the that signal. It's a bit messy though, since the filter is then not time-invariant, but it gives you a way think about the rolloff of high frequencies when you think of the ZOH as a sort of smoothing filter. I'll have to think more about how/whether that works out in detail. Maybe I'm just grasping for a good excuse for making the DC gain be 1.
- Rbj, what's your take on the proposed re-write? Dicklyon 05:47, 31 January 2007 (UTC)
- okay, lemme start with a little reminder of some of the recent history. i am well aware of the convention in most of the textbooks and also have a bias toward consistancy with the prevailing wisdom (which would normally be what is in the textbooks and other well-established literature) in Wikipedia. that is essentially what WP:NOR is about. my purpose is not to add my own OR, but to have consistancy between articles of related topics here and also to not perpetuate a bona-fide mistake in convention. not all conventions are equally valuable, the 0-origin vs. 1-origin is another example, but here we are not dealing with an existing language or product and simply have to put up with the convention, good or bad, as it exists. here, we can choose to not perpetuate a mistaken convention. now, in the Nyquist-Shannon sampling theorem i was originally thinking of sticking with the common convention and fixing it with that "Note about scaling" so that this article could be done correctly. in one sense, where you put that gain of T doesn't matter so much as long as you have it in there somewhere. but here it is different. it is not about where the T goes, but whether it goes in or not.
- now, when you contemplate the "effect" or more specifically the "net effect" of doing "something", you need to "compare apples to apples". otherwise the difference in comparing apples to oranges may not be entirely due to the "something" but there may be some component of the difference that is due to the difference between apples and oranges.
- when one asks "what is the effect (on frequency response) of the inclusion of the zero-order hold?" what you are comparing is
- to
- .
- both of these signals are modeled as the output of an LTI that is driven by the sampled signal xs(t) that has been expressed in 2 different forms (or 3 if you include BobK's A way).
- now it doesn't matter whether or not you use
OK, for the record your "first case" is my case. --Bob K 12:54, 5 February 2007 (UTC)
- and a reconstruction brick-wall filter with passband gain of T ...
- ... or use
And your 2nd case is my . --Bob K 12:54, 5 February 2007 (UTC)
- and a reconstruction brick-wall filter with a passband gain of 1. but whichever you use, you must be consistent and use the same brick-wall reconstruction filter in the case of using the ZOH as when you leave out the ZOH to determine the net effect of the ZOH. in either case, for frequencies below Nyquist (for frequencies above Nyquist, there is a problem of dividing by zero, if your brickwall filter is perfect) the complex transfer function from x(t) to xZOH(t) is
- in the first case you have a brickwall filter with passband gain of T, and a filter that takes you from
- to
Wrong. When A=1, and takes you from to .
--Bob K 12:54, 5 February 2007 (UTC)
- and that eventually followed by the brickwall with passband gain of T.
??? No, does not subsequently go through any brickwall filter. --Bob K 12:54, 5 February 2007 (UTC)
- the T and 1/T kill each other off and this essentially becomes the same as the second case which is the brickwall filter with passband gain of 1 and a filter that takes you from
- to
- .
- Now what's happening in the first case is that they are replacing the brickwall filter of passband gain of T (which gives you the unscaled x(t) back) with a ZOH that has that gain absorbed in the transfer function:
- or, if you replace j2πf = jω with s,
- but if you took out the ZOH, you wouldn't replace it with a gain of 1, you would replace it again with a gain of T.
This conclusion is based on the previous errors that I have pointed out. Whatever it is you are trying to say might also be incorrect. --Bob K 12:54, 5 February 2007 (UTC)
- the net effect of having the ZOH is still the component of H(s) that multiplies the T. O&S recognized this when they put in for their compensation filter one with a transfer function of
- This is around pp. 484-485, section 7.7.2 in my (c) 1989 edition of Discrete-Time Signal Processing.
- in conclusion, it doesn't matter which way you go with the sampling theorem (except i'll add that there is a serious pedagogical problem with the common convention that leads naive students into asking the question "How do I design a LPF with a gain of T?"), but the net consequence of the hold action of the DAC, the "Zero-order hold", is a dimensionless frequency response that is 0 dB at DC and something around -4 dB at Nyquist. moreover, how can you even compute the dB gain (or loss) when there is this dimensionful factor of T stuck in there?? it is non-sensical.
Here is your quote from above:
- when one asks "what is the effect (on frequency response) of the inclusion of the zero-order hold?" what you are comparing is
- to
- .
That comparison is unitless and totally out of our control. Set , look up a couple of Fourier transforms, and that's it. It has nothing to do with which value of you prefer. has nothing to do with it.
--Bob K 12:54, 5 February 2007 (UTC)
- this net effect of the ZOH is something real and is not arbitrary. to just say "we'll toss in a fudge factor of T or 1/T or A or whatever" is neither accurate nor elucidating. it is actually a consequence of the less than ideal convention they use in the first place. O&S recognized this and, at least, they got their compensation correct (because they compared their ZOH to the gain of T, not to 1) but others fail to do this correctly. i don't see how it is useful for Wikipedia to reinforce an actual quantitative mistake (in the transfer function) because of a common (but poor IMO) choice of convention. the convention is arbitrary as long as you keep your ducks lined up, but the effect of the hold action of a DAC is not. the gain factor is not arbitrary. at DC you have 0 dB loss and around Nyquist, it's about -4 dB loss and there is no dependence on a T factor that is not even a dimensionless factor to begin with.
If the ZOH input is the discrete x[n] sequence, then there is no debate about its "net effect" or its reality. But if the input is the modulated Dirac comb, which exists only in our imaginations, then the ZOH is not "real" either. And its individual effect is not the "net effect" of the model.
--Bob K 15:16, 5 February 2007 (UTC)
- i'm going home to sleep now. i've had a long, long day. -- r b-j 03:57, 1 February 2007 (UTC)
- Yes, but what what do you think of Bob's rewrite? Should we try to use it, mutatis mutandis? Dicklyon 04:53, 1 February 2007 (UTC)
I can't agree with you anymore, Rbj. What the DAC actually does is not at issue. That is why I moved it to the top of the re-write. Your student who wants to build a DAC can stop reading right there. If instead, he tries to implement the theoretical model, generating a Dirac comb will be just a problematic as "designing an LPF with a gain of T". The two problems cannot physically be separated.
You say the hold action of the DAC, the "Zero-order hold", is a dimensionless frequency response that is 0 dB at DC and something around -4 dB at Nyquist. But what is 0 dB? It is a ratio of 1. It's the ratio of to . Those interpolations are both defined only in terms of the samples, x(nT), and T. It has nothing to do with the value of that we are quibbling about.
--Bob K 15:34, 1 February 2007 (UTC)
- Bob, as was our pattern before, i am not sure you and i are communicating effectively (i, at least, am confused - i fully agree, AFAICT, with the second paragraph above and cannot see how that jives with the first). i made a different notation than you (replacing xsinc(t) with just x(t) )... r b-j 16:04, 1 February 2007 (UTC)
- Yes, you are quite right to do that, because x(t) need not be bandlimited. I mention it here and now because your subsequent mistake is to talk only about the transfer function between [instead of ] and .
- but in every other way, i stand by every statement made above which AFAICT is fully compatible with your second paragraph in your current response here. i cannot fully decode your first paragraph (except for the second sentence, which i disagree with), and i do not understand with what it is you're disagreeing with. r b-j 16:04, 1 February 2007 (UTC)
- Rbj, can you please point out what sentences and paragraphs you are referring to that you agree with and can't parse and don't agree with? I can't figure it out. Is it Bob's short paragraphs immediately above, where the second sentence, that you disagree with, is "What the DAC actually does is not at issue."? If so, please explain what you mean by disagreeing with that, as it's pretty fundamental to discussing any of the rest that we agree on what a DAC does. Or is it something else about how Bob showed that the choice of scaling is not just between two choices, but is a continuum with a free factor A? Dicklyon 04:18, 2 February 2007 (UTC)
- i just don't think there is anything more i can say but to just repeat the point ad nauseum. one more repetition, vomit if you like: when there is a quarter in the offering plate and i take it out and plop down a dollar bill, is it accurate to say "I just put down a dollar!"? it is, in one sense, but it certainly would not be accurate to say "I just contributed a dollar."
- in one case, where
- ,
- the hypothetical brickwall reconstruction filter
- is replaced by
- .
- in one case, where
- in the other case, where
- ,
- the hypothetical brickwall reconstruction filter
- is replaced by
- .
- in the other case, where
- what is the Δ(dB) as a function of f in each case? r b-j 04:57, 2 February 2007 (UTC)
As you ignored twice yesterday, (below), the transfer function from [not ] to is:
- ,
regardless of which you prefer.
--Bob K 13:40, 2 February 2007 (UTC)
- i am crapped out arguing this and i do regret bringing it up. not that i expected a rubber stamp, but we shouldn't be reinforcing the misconception created the not-so-good-covention. it is only a convention, but not all conventions are equally useful.
- if you can get access to the Journal of the Audio Engineering Society i can point you to where this weakness in convention actually made a widely respected author (Barry Blesser: The Digitization of Audio 1979) make this very same mistake (and, nearly a decade later, where i corrected it in the Journal, of which now i am a reviewer BTW). we can do either convention in Nyquist-Shannon sampling theorem, but if we do the common convention, there needs to be a "Note about scaling" and doing it the way we did makes for a more concise presentation and consistency with this and with First-order hold to not get the wrong answer. but, because it was not the common convention, i was surprized (pleasantly) that you and BobK so quickly adopted it and it was BobK who put it in the article (not me) and you endorsed it in the talk page explicitly. (which, again, was quite surprizing and pleasantly so.)
- but now, because it isn't the common convention, some chickens are coming home to roost. and this effect of ZOH is not just a convention. it is a real thing with an unambiguous comparison of with ZOH to without ZOH. O&S do this right (even though they use the common convention) but any textbook that says that the effect of ZOH is
- .
- is wrong. they neglected to subtract the quarter from the dollar. O&S do it right. Pohlmann Principles of Digital Audio also does it right, but he uses the scaling convention we use here so the presentation is a little bit easier. (so User:Dastew is not accurate saying that no textbooks define the ZOH this way.) r b-j 04:57, 2 February 2007 (UTC)
- Rbj, I don't think we need the rant. It's clear why you want the gain of 1 at DC, so you can measure the droop in dB relative to a flat reconstruction. You can still do that with any factor if you compare the two (sinc versus flat) with same gain, but if you want to simplify the comparison, then the DC gain of 1 is better. We are all in agreement. But instead of the rant, you could answer my question about what part of Bob's statement you don't agree with, so I can try to help.
- As the article stands, the lead is misleading, in my opinion, and Bob's lead works much better. So let's focus on that instead. Presently, it says, among other things "A mathematical model such as the ZOH (or possibly the first-order hold) is necessary because, in the sampling and reconstruction theorem...". Now, to me, this doesn't make sense, since the ZOH can well be discussed without reference to the sampling theorem. It has nothing to do with sampling, only with reconstruction, and its reconstruction isn't what's called for in the sampling theorem. Sure, you can compare it, but that comparison is not what makes understanding a DAC's ZOH necessary. So the "is necessary because" assertion is just wrong. ZOH should stand on its own. The ZOH should be completely described in the time domain, and in terms of the sample values, with no deltas, before it then further modeled as a filter applied to an impulse train. That way it can be understood with simple math; the frequency-domain characterization is gravy, for people who want to know more. In terms of connecting with the sampling theorem you can, as I did, assume a unique underlying bandlimited signal (the same as what you get by sinc reconstruction); but Bob points out, correctly, that you don't need to assume that to discuss the ZOH. So, how much of that can you agree with? Dicklyon 07:23, 2 February 2007 (UTC)
- I just noticed that even Bob uses sampling to get x(nT), which is not even necessary for defining and discussing ZOH; in many cases, the discrete-time signals x[n] are synthetic, not samples of any x(t). Might as well just work in terms of those to start. Then your first equation would be:
- No infinite pulses, no scale factors, no assumed underlying x(t), just a simple definition of what a ZOH does to a sequence of values. Dicklyon 07:33, 2 February 2007 (UTC)
- Same problem I saw in my own logic, where I said "Maybe I'm just grasping for a good excuse for making the DC gain be 1." A gain of 1 at DC is "nice", but this is just a model, where the internal scaling of impulses and filter gain are irrelevant in the end (Bob's A). As for consistency with another article, that's overrated, too. It's "nice", but each article can stand alone and derive its own results in its own way and still be OK.
- As I said, Bob's writeup that tries to make it clear why there's a free choice of A is an interesting step, but, sort of like the "note on scaling", it puts more distractions into the derivation than you really need. Bob, is there any problem with the article as it is? Maybe the problem is just how the whole thing is framed in the lead: "A mathematical model such as the ZOH (or possibly the first-order hold) is necessary because, in the sampling and reconstruction theorem,..." What if instead we explain what a first-order hold IS, and then get into the model later. What is IS is a thing that holds a sample value constant for an interval T, to make a continuous-time signal from a discrete set of samples. How you analyze its effect is then a subsequent question. Bob, I now see that your rewrite took pretty much this approach, which I failed to appreciate before with the A distraction. How about another rewrite? Dicklyon 15:57, 1 February 2007 (UTC)
- there is no "free choice" with A. we have choices about what the Vref is applied to the ADC and DAC, and assuming those Vref's are the same (that the ADC and DAC scale between voltage and the converted numbers identically), that this A is T or 1/T or however Bob put it. it is not arbitrary. you guys need to work this out step-by-step. r b-j 16:04, 1 February 2007 (UTC)
is a free choice, because is something that we construct (in our imaginations) from the samples. We can construct anything we want. No matter which gain you prefer for your rect() filter, I can construct an that will produce the same amplitude as .
--Bob K 16:21, 1 February 2007 (UTC)
- using your notation, the gain from to is not a free choice, is deterministic, and has no A in it. and that is what the effect of the ZOH is about. r b-j 16:43, 1 February 2007 (UTC)
Exactly. does not matter. It is arbitrary. --Bob K 16:59, 1 February 2007 (UTC)
- no, Bob. A isn't in there because it is fixed or set to T. you see T instead. r b-j 19:17, 1 February 2007 (UTC)
- You are free to pick A=T, while most of the rest of the world picks A=1. And you will have to construct your with a different gain than the rest of the world. But that's OK.
- no, Bob. assuming the reference voltage or full-scale voltage is the same in the ADC and DAC, when you go from x(t) to xzoh(t), the frequency response is:
- there is no other choice of A. (there is no A.) you can choose another scaling if you want, but it needs to be dimensionless and if it isn't 1 your output (at low frequencies) is not the same size as your input. this is math, not art, not politics, not personal preference. you've done nothing to refute either any of the mathematical statements in the article or in my response above. and, indeed, you cannot. the math (or "maths" if you're on the other side of the pond) is clear and unambiguous. if your ADC and DAC are set up so that when 5 volts DC goes in, then 5 volts DC comes out, the frequency response of the ZOH is the equation above. no A factor. and that is a consequence of a net transfer function of
- .
- no A factor. r b-j 19:17, 1 February 2007 (UTC)
is not the input to your filter. The input is . The frequency response you are talking about includes the gain of the filter and the gain of the Dirac comb. So if I hadn't done anything before to mathematically refute your statements, I have now.
--Bob K 19:36, 1 February 2007 (UTC)
- no, ignoring them is not refuting them. to repeat:
- Now what's happening in the first case is that they are replacing the brickwall filter of passband gain of T (which gives you the unscaled x(t) back) with a ZOH that has that gain absorbed in the transfer function:
- or, if you replace j2πf = jω with s,
- but if you took out the ZOH, you wouldn't replace it with a gain of 1, you would replace it again with a gain of T. the net effect of having the ZOH is still the component of H(s) that multiplies the T.
- you gotta be comparing apples to apples to meaningfully discuss the net effect of anything. and you are not. r b-j 19:42, 1 February 2007 (UTC)
You are the one who is ignoring. So I repeat:
is only the transfer function from to .
So the transfer function from to is , where:
The A's cancel out. So is arbitrary and does not matter.
--Bob K 20:39, 1 February 2007 (UTC)
Synthesized our ideas
[edit]I think the rework I just did synthesizes our various concerns. Let me know if I screwed up anything. I included something like the old note on scaling (in which the freedom to scale is left as merely implicit), to address the concern that started all this, referenced Pohlmann so it's clear that it's not OR, and made the simple description of the ZOH before the more elaborate frequency-domain method that needs the impulses in the model. In all cases I used x[n] as the samples, and mentioned an underlying original signal only near the end with respect to comparing with the the Whittaker–Shannon interp. I based it mostly on Rbj's text that was there, so may have missed some of Bob's points. Please rework as you see fit, as it will be easier to see where we differ from how we right it than from out discussions, I think. Dicklyon 07:36, 3 February 2007 (UTC)
- It's a big improvement. It could be better in several ways:
- 1. Why switcheroo from and to and ?
- That's just because I picked up one form from you and one from Rbj. Either is OK by me. Dicklyon 17:01, 3 February 2007 (UTC)
- I prefer the first way. The mixture is preferable to not showing it at all, but I don't think the mixture adds any value. --Bob K 15:09, 4 February 2007 (UTC)
- I'm OK with that. But I'm going to leave it alone for now, and let you or Rbj or someone else choose how to fix it. I suspect he'll have other things he might want to tweak anyway. Dicklyon 17:48, 4 February 2007 (UTC)
- 2. Incongruous that you say resulting in a low-pass filter model with a DC gain of T, and hence dependent on the units of measurement of time, but you have nothing to say about . Either explain why the 1/T is preferable (which I believe will sound pretty lame) or just don't mention it (because frankly, IT DOES NOT MATTER).
- I don't understand. The 1/T is to get the DC gain of 1. What more is needed? Dicklyon 17:01, 3 February 2007 (UTC)
- You are implementing a filter whose impulse response has units of 1/T "and hence dependent on the units of measurement of time". Why is that any less remarkable than the DC gain? The instantaneous gain is what the implementer actually cares about. The DC gain is just a result of the implementation. We appear to be making a value judgment without justification, and we can't even claim "convention".
- --Bob K 15:09, 4 February 2007 (UTC)
- Bob, for any LTI filter where the species of aminal coming out is the same as going in, the dimension of the impulse response is 1/time. it's completely appropriate that such an impulse response be dimensionful in that manner and not correct for it to be dimensionless. r b-j 05:14, 6 February 2007 (UTC)
- I don't know what instantaneous gain of a filter is. DC gain of unity is the convention I've always used for lowpass filters, perhaps because it was inherited from analog RLC filters. You'll find it in lots of books on digital filters, too. Dicklyon 17:48, 4 February 2007 (UTC)
- it's not just the DC gain. it is the gain where x(nT) rect((t-nT)/T) has the same value of x(t) when t=nT. that is a unique and non-arbitary scaling. and it makes a difference if such a digital filter with an ADC and conventional DAC is placed in a loop (as it would be in a servo-control system). this constant gain is not arbitrary. it is a design parameter that is something to have control over and a design parameter that manifests a measureable and behavioral difference in a system with both analog and digital subsystems. that's why this misplaced T can lead to trouble if you don't line your ducks up. r b-j 05:14, 6 February 2007 (UTC)
- Actually, the answer I have been seeking (but I didn't know it) is that the convolution integral contains a factor, which has units of time. So the units of h(t) are indeed the reciprocal of time. --Bob K 11:23, 5 February 2007 (UTC)
- 3. Most importantly, point out that is only .
- Again, it's not clear to me why it's so important to explain that, if we've already said that we've picked x[n] and x_ZOH to have the same mean value.
- That is not the gain that Rbj intends to be unitless. It's the one below, as indicated by his 16:04, 1 February 2007 entry, where he refers to , not . And in fact it is unitless, regardless of which convention we use. So there is nothing to argue about. The convention is irrelevant.
- It's also important as a purely practical matter, because in the vast majority of cases the discrete sequence does represent sampling. We do our readers an injustice to overlook that reality. Leave that to the math journals.
- --Bob K 15:09, 4 February 2007 (UTC)
- I didn't interpret Rbj's comments that way. But no matter, I said the way the makes sense to me. Dicklyon 17:48, 4 February 2007 (UTC)
- dunno for sure that anybody is getting it the way i meant. i thought so last June. i'll wait a little longer for the dust to settle. (and i'm more WPreoccupied by a cultural battle at Marriage at the moment.) r b-j 05:14, 6 February 2007 (UTC)
Rbj also says:
- when one asks "what is the effect (on frequency response) of the inclusion of the zero-order hold?" what you are comparing is
- to
- .
With , the frequency responses are:
And the relative response (or "comparison" in Rbj's words) of the ZOH, for |f| < Nyquist, is just: .
Maybe another way of framing the controversy between Rbj and Doug is whether or not the should be divided by the .
Regardless of that, I would like some comment on the discussion about "net effect" (15:16, 5 February 2007 (UTC)). For your convenience, I will copy/paste what I think is the key point:
- If the ZOH input is the discrete x[n] sequence, then there is no debate about its "net effect" or its reality. But if the input is the modulated Dirac comb, which exists only in our imaginations, then the ZOH is not "real" either. And its individual effect is not the "net effect" of the model.
The model contains two components, each with potential gain. And since we can make them cancel, internally, the gain does not change the "net effect". Looking at just one component in a vacuum is what's causing all the debate.
- And besides that, I think my initial instinct was right. We don't need any Dirac combs to talk about the ZOH and to analyze its frequency response. Without the comb, all we have is the "net effect", and I think we can all agree on that. No comb, no debate.
--Bob K 11:30, 6 February 2007 (UTC)
- If there is an underlying signal, x(t), the transfer function
- is just regardless of which "convention" you choose, because it includes the gain associated with the transform from to .
- --Bob K 16:15, 3 February 2007 (UTC
- Agreed, but then I'd have to introduce the spectrum of the underlying signal; I didn't really want to go there. But you could. Dicklyon 17:01, 3 February 2007 (UTC)
- I got weary of being reverted. I had to decide not to care so much. --Bob K 15:09, 4 February 2007 (UTC)
- BTW, without and , I have a hard time even caring about . But maybe that's just me.
- --Bob K 16:34, 4 February 2007 (UTC)
- Agreed, but then I'd have to introduce the spectrum of the underlying signal; I didn't really want to go there. But you could. Dicklyon 17:01, 3 February 2007 (UTC)
- It's still the deviation from a spectrally-flat construction of continuous-time signal from discrete samples, whether there's an original waveform or not. And if there is an original waveform, who is to say that it was bandlimited? The ZOH can reconstruct a sampled signal exactly if the original signal was the output of a ZOH at the same sample rate. The "special" property of the bandlimited x(t) with respect to the sampling theorem shouldn't have so much to do with how we describe the ZOH. Dicklyon 17:48, 4 February 2007 (UTC)
- At the risk of total confusion, let me point out that you might mean an all-pass filter (i.e. no interpolation at all), rather than the brick wall (W-S) interpolator. And that reintroduces the Dirac comb in a whole new way:
- becomes:
- And clearly the T-factor is consistent with the other interpolators.
- With , the frequency response is:
- So again, the diff between you and Doug is that he is talking about an unnormalized (absolute?) response and you are talking about a ratio of two different responses to one input:
- But having a ratio (which can be converted to dB) does not make you right and him wrong, as Rbj would suggest. If Doug wants a dB plot, he can normalize by H(0) or by max(H(f)). It's done all the time. Doug is talking about apples and you are talking about oranges. So everybody just needs to define their terms clearly and acknowledge the other points of view and conventions. The users can take it from there and do whatever they need to do.
Another approach
[edit]Another approach that would come out simpler, I think, would be to work the problem first assuming that time is measured in samples. That is, the sample rate is one and T is one sample. After you get the equations, explain the measure with respect to seconds just scales the time and frequency axes. Much cleaner, no room for arguing about scale factors. Some lines like this avoid all the mess about where to put the T.
A zero-order hold reconstructs the following continuous-time waveform from a sample sequence x[n], assuming unit sample rate (that is, continuous time t is measured in units of samples):
- where is the rectangular function.
Since it shouldn't matter what units time is measured in, there's no incentive to consider constants other than what you get by scaling time and frequency axes.
Shall I go ahead and try it this way? Dicklyon 19:36, 3 February 2007 (UTC)
- My advice is no, because "the mess with T" is important to the people who have to implement things. If we can't figure it out, what chance do they have? But I have figured it out, so others should benefit from that. Isn't that why we are here?
- --Bob K 15:47, 4 February 2007 (UTC)
- OK, I'll leave it as is. Someone else can have a turn and we'll see where it goes. Dicklyon 17:50, 4 February 2007 (UTC)
- I feel I should say one more time, in words instead of formulas, why the mess with T is not a mess at all. The rect() filter does not opererate directly on the x[n] sequence. Its only use is to operate (in our imaginations) on , which only exists in our imaginations. We don't get to choose the x[n], but we do get to choose the filter and we do get to construct . Since we control both gain factors, it does not matter which convention we choose. As long as the factors cancel out, the result is the same. And if they don't cancel out, then there is a non-unity gain. But the relative sinc() response is probably what most people care about.
- --Bob K 16:08, 4 February 2007 (UTC)
- Of course, I agree, it's not a mess at all, just a slight confusion of some people in interpreting the equations and why they don't always look like the ones someone else derived. Dicklyon 17:50, 4 February 2007 (UTC)
Back to basics
[edit]Gentlemen, I am not sure that "back to" is a correct description. (Did we ever actually go there?)
But please consider these "sample sequences":
and:
and:
To reconstruct x(t), from these sequences, the "rectangular interpolation" formulas are:
The frequency responses:
and
are clearly identical and equal to:
When one looks at just the reconstruction formulas, without regard to any sampling process, case "c" is suddenly different than cases "a" and "b". respectively produce responses of:
- (cases "b" and "a")
Indeed, there may not even be a sampling process to look at, in which case there is no to compare with , and the "gain" of T is not a gain at all. In that case it's only the relative responses at different values of that actually matters.
And if there is an x(t) and a process to sample it, then the "gain" of T in cases "b" and "a" is the rightful consequence of disregarding the sampling process. It represents an incomplete or partial result, not a net effect. Doug, and apparently most of the "world", are satisfied with that. They make no assumptions whatsoever about the sampling process, and therefore claim no particular "net effect" or "DC gain". It is unknown to them, and they do not care. They can talk about ZOH without arguing over sampling models and gains.
I think we should respect that, but we need not stop there. We are free to point out that actual signal reconstruction also requires something more... specifically accounting for both the "DC gain" of the reconstruction and the gain of the sampling process. But we are bucking convention to call that "net effect" a zero-order hold. And we are also way out-of-line to insist that the two gains must be equal (unity). Reconstruction does not require that. So what does?
--Bob K 20:02, 9 February 2007 (UTC)
- One has to stop somewhere. We are free to pick a gain for some "conventional" way of looking at things, and the way I like is that the average value is maintained, as it is in your (a) and (b) sampling methods. Why not stop there? Or, if you want to introduce more free gains in the sampling and in the intermediate results of the reconstruction, what would you write that's useful enough to justify the added complexity? Dicklyon 22:58, 9 February 2007 (UTC)
I am not proposing an arbitrary gain just for generality. That was just to make basically the same point I made here with b[·] and c[·]. But I think it was so general that it became a distraction, or maybe an excuse to zone out.
What I am proposing, is that we follow convention and define ZOH and its "frequency response" in terms of just the rectangular interpolation formula (cases "a" and "b"), independent of sampling. That means you are not necessarily trying to reconstruct the original signal level, which is certainly the case a lot more often than not. Then the concept of "DC gain" is irrelevant. Only the comparative gain of each frequency vs the others is important.
But I am also proposing that we subsequently introduce the context of sampling and reconstruction, where concepts like gain and 0 dB actually make sense. And we point out the difference between a relative "frequency response":
and an actual transfer function:
--Bob K 00:31, 10 February 2007 (UTC)
- Not following you, Bob. How do you define ZOH in terms of the sampling formulas a and b? Those aren't interpolation formulas, right? Dicklyon 00:42, 10 February 2007 (UTC)
I did not say "sampling formulas a and b". I said "rectangular interpolation formula (cases a and b)". I.e:
which are identical formulas, if you don't know anything about how the discrete sequences were created. That's Doug's point, I think.
- no, Bob. if Doug says that the transfer function of the ZOH is
- then Doug is saying
- unless you are saying that x[n] is not the same as x(nT) and xZOH(nT). but if you insist that x[n] is the same as x(nT) and xZOH(nT) then you cannot also say that the system that takes you from x[n] to xZOH(t) is
- it's off by a dimensionful scaling factor. and that is off, not just a different convention. r b-j
- Most of the world defines the ZOH just in terms of what happens to the a[n] sequence, i.e. what it becomes, rather than its history.
- OK, I see I misinterpreted which equations you were referring to; I didn't quite understand why you started with what are apparently sampling equations. I don't think Doug has a point; he just kicked this off by noting that the equations in his books differ from what we use here, and he hasn't said anything since, has he? Dicklyon 17:49, 10 February 2007 (UTC)
We can and probably should add our own sampling/reconstruction perspective as an afterthought. I don't know whether to call it a bigger picture or a smaller picture. Depends on where you sit, I suppose. There we can derive the 0 dB DC gain "net effect" (as Rbj calls it). And it does not take a Dirac comb and rect() filter to do it. Those imaginary concoctions are a matter of choice, and they are inseparable. No comb, no rect() filter. The gains that we assign to them are arbitrary as long as the "net effect" is unity (0 dB). One way to do that is to make them both unity. That is fine. What's apparently not fine is the assertion that our 0 dB "net effect" is a ZOH.
--Bob K 12:13, 10 February 2007 (UTC)
- So show us the way. Dicklyon 17:49, 10 February 2007 (UTC)
- i don't get it at all, and i do not think that the problem lies with my inability to comprehend the topic. this is not like a Matched filter where you are designing or analyzing something that is scaling independent where any scaling fit the theory. it's more like a Wiener filter thing where the mathematics give you an estimate of a parameter scaled correctly. The theory doesn't have an unknown constant of integration that allows independence in scaling like the solution to
- unlike this, you're just not free to pick whatever scaling you want when discussing the transfer function from x[n] to
- the only transfer function that is correct is
- the interest of scaling this so that is not relevant. if the scaling of x[n] to xZOH(t) (so that x[n] = x(nT) = xZOH(nT)) was such that it naturally came out in the math that that wouldn't change any qualitative or other quantitative point in the argument. it's not about it's about x[n] = x(nT)) = xZOH(nT). r b-j 02:00, 11 February 2007 (UTC)
- Robert, I'm not following you here. There is no transfer function from x[n] to xZOH(t), so I don't know what you're referring to when you say "there's only one transfer function that is correct". The continuous-time transfer function that is correct depends on how you choose to go from discrete samples to impulses; the free gain is in how that intermediate result (impulses) relates to the samples. And as Bob points out more recently, there's ANOTHER free gain if you don't require the reconstructed x to have x(nT) equal to x[n], which you might not if x[n] came from some sampling formula that didn't have that property, such as integrating an original x(t) over some intervals. We can pin these gains down by various conventions, but I'm not sure what you're trying to say about some stronger constraint. Dicklyon 05:05, 11 February 2007 (UTC)
- okay, i adjusted some notation above, because i was getting a little sloppy. Dick, the issue is representing the quantitative value of the samples x[n], dimension and all, to be the same as the signal being sampled x(t). now we know that in the computer or DSP, the samples are represented as dimensionless discrete numbers that are proportional to, and quantized from, the sampled signal at the sampling instances. that is x(nT). (Bob K likes that better and, at least in the past, not using the x[n] notation.) now, this VREF and quantization error issue is a separate issue and it should be. so instead of saying that (say VREF is such that one LSB of x[n] is 1 mv of x(t)) or that this x[n] × 1 mv = x(nT), let's just say that x[n] = x(nT) and understand that value of the sample in the context of the scaling that the A/D did. x[n] and x(t) have the same dimension, right? if x(t) is volts at some particular time t=nT, so is x[n] volts and not only that, x[n] is the same volts as x(nT). so when you look at that number in computer or DSP memory, you know what voltage (or whatever physical quantity) it represents.
- now, so we do not introduce extraneous and meaningless scaling factors, let's say that the D/A undoes this sampling by converting the x[n] samples back to the same kind of animal that x(t). the output of this D/A is what we are calling xZOH(t) and since it is dimensionally the same as x(t), it can be compared to x(t) and, particularly, to the values of x(t) when t=nT. now that relationship is
- that is a well-defined, unique, and meaningful relationship. to say that
- for any other A other than A=1 is nothing more than pulling a scaling factor (dimensionless or not) out of our butt. it is another issue. an issue of different VREF for A/D and D/A or even of the D/A not outputting the same kind of physical quantity (dimensioned differently) than what goes into the A/D. when talking of sampling and reconstruction (and the first half means little without the second) all of this scaling crap is non sequitur. it is not germane to the conversation.
Sheesh. Rbj, that's not the A that Bob proposed. If you put A in the two places he suggested, it drops out. It is the free variable that lets one see the relationship between two correct approaches that follow different convetions. You either still can't see it, or are being difficult in ignoring it. Dicklyon 22:36, 11 February 2007 (UTC)
- no, but i think it is equivalent to his A/T or its reciprocal. so call it "B" or something else (i'm too lazy to change it everywhere). i shouldn't have used the same letter but i've used it before as a nondescript scaling constant and it was familiar to me. r b-j 02:45, 12 February 2007 (UTC)
- now, if you accept that (the premise that the DSP or whatever is doing nothing but passing the input x[n] to the output and the D/A is undoing the conversion of physical quantity to number that the A/D did with no extraneous scaling), and if you also accept that we're not obscuring the concepts by saying that x[n] is anything different (dimensionally and quantitatively) than x(nT), then there is an unambiguous and natural scaling for xZOH(t). it is the one where A is the dimensionless 1. in fact, consider x(t) is properly bandlimited, blah, blah... and that it is a random process with zero DC and non-zero power (think of it as the ideal reconstruction of good pseudo-random x[n] where each x[n] is a R.V. with zero mean and some non-zero variance). now if:
- where x[n] = x(nT).
- now create an error signal which is the difference: xZOH(t) - x(t) and square and LPF that error signal (or apply whatever decent LP norm to this error signal) and adjust A so that mean square error is minimum. what value for A do you get? (i will bet, the dimensionless 1.)
- so now, here is what we get: we do have a relationship between the spectrums of x[n] and x(t). it is this DTFT thing, and if you keep your dimensional ducks in line, that relationship is:
- where
- and
- note that although x[n] and x(t) are the same species of animal, XZ(z) and X(s) are not. that is because integration w.r.t. time tosses in a dimensionful time factor whereas discrete summation of terms do not.
- and, again if x(t) is properly bandlimited, blah, blah..., then for frequencies between -Nyquist and +Nyquist, there is a meaningful frequency response between x[n] and x(t) and it is the constant T or 1/T (whatever direction you're going). and the relationship of spectra is:
- for -1/(2T) < f < +1/(2T).
- with this Nyquist criterion met, there is a relationship between x(t) and the properly scaled xZOH(t), one where we pulled no scaling factor out of our butt and where xZOH(t) most nearly equals x(t) and when you crank the sampling frequency up to infinity, they be identical, not just proportional. so now you crank Fs down to some finite value and you see that there is a relationship between the spectrums of x(t) and xZOH(t). it is the unambiguous
- for -1/(2T) < f < +1/(2T).
- the transfer function between the like animals is
- or
- now, you or Bob or Doug or whomever may point out that the mapping of spectrums of x[n] to xZOH(t) is
- for -1/(2T) < f < +1/(2T).
- and that ostensible frequency response of
- is the same as
- when s = j2πf. but i continue to point out that, without the ZOH, there had to have been a previous factor between the two spectrums of T before (because even though dimensionally x[n] and x(t) are the same species of animal, their spectrums are not dimensionally the same because of the extra dimensional factor you pick up in the continuous-time Fourier Transform, an integral, that you don't get in the DTFT, a discrete summation). the ZOH is another block, an additional block and its unambiguous transfer function is the net difference, a frequency response factor of
- which corresponds to a transfer function of
- guys, i'm pooped out on this. i can't do this anymore. can you just read this over again or think about it or do the math? i know, we all know, that we're just repeating over and over again the same points. i know the math, the dimensional bookeeping, and the attribution of what effect to which cause that i am doing is legit and nothing any of you guys are saying is able to negate it. i cannot understand why we keep going through weird tortured logic with extraneous scaling factors that eventually just come out in the wash to accomplish what? help some engineer or student screw up and put a
- transfer function in a control loop (here scaling will have a salient effect) and he/she finds out that the stability of the control loop depends on what units of time they happen be using? what is gained by crapping up the concepts or language with all this extraneous factor stuff? r b-j 07:10, 11 February 2007 (UTC)
Phew! I'll be brief. For me it's much simpler, because all I really know about ZOH is that apparently the closest thing we have to a "convention" is the frequency response:
Its unit is time, so obviously it is not a transfer function, at least not between two continuous-time domains. 'Turns out what that means is that it does not include that part of the transfer function attributable to sampling. The student who screws up, does so because he does not understand that convention, or he does not know how to complete the transfer function. But we can show him. (Or we can buck tradition and go with the Pohlmann/r b-j convention.) Whether the formula above has any practical use of its own right, or is just a partial result waiting to be completed, I don't know. IMO, it's not unlike the DTFT formula:
which leaves plenty of work to be done before you can relate it to sampling... the "real world" as we see it.
--Bob K 14:03, 11 February 2007 (UTC)
T, f, ω, s, z, and even i & j
[edit]- BTW, to try to keep from an explosion of different transform definitions, in this thing i was using only the Z transform and Laplace transform defs:
- and
- and defining the DTFT and continuous Fourier transform in terms of those, where
- and
- If you are worried about students trying to apply these things to real control loops with real sample rates and real frequencies, then keep f and T around in plain sight, and carefully deal with the resultant annoyances. --Bob K 04:01, 12 February 2007 (UTC)
- I dunno, but it's even scarier to me to do away with the electrical engineering conventional notation of j2 = -1 and reverting to the more original and proper notation of using i for the imaginary unit, but maybe we should chuck that convention. It is also not so good and was not necessary in the beginning, but EE textbooks still use the j notation. r b-j 20:16, 11 February 2007 (UTC)
- is my preference for that reason. I'm just used to it. But I can live with . I think that battle is neither small enough to win nor big enough to matter. --Bob K 04:01, 12 February 2007 (UTC)
Undoing my removal of T
[edit]What's up with this page? The derivation of the ZOH with a T in the bottom is fine for certain purposes, but totally in contradiction to the convention of about 30 textbooks. In this case, Wikipedia shouldn't try to be a unique and cool snowflake - if convention is to model the ZOH without the T in the bottom, the T shouldn't be in the bottom! Who's going to read this page but students and other people new to DSP and control theory? The notation should agree with the instructional material out there.
128.143.74.94 (talk) 05:44, 6 April 2010 (UTC)
- The question can well be, "What's up with these textbooks that require an additional gain of T in the signal chain for reconstruction?" You can argue that it's just a convention (it is, but some conventions can lead to confusion), but even so, the convention must remain when the ZOH is inserted. The net effect of the ZOH is to produce this output
- when the input is
- Now if your textbook has, for a sampling function, the dirac comb with no leading T factor (and most textbooks do)
- leading to the sampled signal
- that's fine, except you need an additional T factor in the signal chain, but if you lowpass filter (with passband gain of 1) that xs(t) without the additional T factor, your reconstructed signal will be scaled by 1/T. This was discussed over and over and over again, here and also at Nyquist–Shannon sampling theorem.
- Now you need to compare apples-to-apples. If that additional T factor was there for ideal reconstruction without the ZOH (so it must be external to the ZOH), it must also be there for reconstruction with the ZOH (and external to it, you are trying to put that gain of T into the ZOH, which means, to be mathematically legitimate, that factor must be taken out somewhere else. To consider the net effect (on frequency response) of only the ZOH compared to not having the ZOH where everything else is the same, the ZOH must take the sampled signal (which must have the T factor upstairs so that the LPFed output comes out scaled correctly) and produce that xZOH(t) coming out. How are you going to do that?
- Did you notice that by just changing the final result (so that it appears consistent with your textbook), that you broke the math leading to the final result? You multiplied the final result by a T factor, but you didn't do it to the previous math, so you made the derivation incorrect. Would you consider posting here (not in the article), how you're going to get to the result you seek from the same (or different) axioms going in? 96.252.13.17 (talk) 16:17, 6 April 2010 (UTC)
Another common misconception
[edit]Besides the 1/T issue, now it appears that the common misconception that the ZOH effect comes from A/D conversion is trying to find a place in the article. To the "master in electrical engineering", ask yourself precisely "what are the functions of the A/D and D/A?" If it is an analysis machine that has an A/D and no D/A (say, it's a spectrum analyzer or similar), the input is properly sampled (the uniformly-spaced values of the input voltage are proportionately converted into numbers) and the spectrum of such analyzed, should that spectrum be compensated by dividing by the sinc(fT) function? Then ask yourself if it's a synthesis machine that has a D/A (and no A/D), and there is a stream of numbers that are proportionate to the voltage of the analog signal to be synthesized. Now if the D/A outputted a series of spikes (approximations to Dirac delta impulses) of a very thin width and height proportional to the number being converted, would, after a flat anti-aliasing filter, the output need to be compensated by dividing by the sinc(fT)? Now what if the D/A outputted a piece-wise constant function (a series of finite rectangular pulses of with T and height proportional the number going out)? Would compensation for the sinc(fT) be necessary then?
So you have three questions to answer. Let's see if you learned enough getting your masters in EE that you can answer those questions correctly. If you have trouble with this, I might suggest that you visit the USENET newsgroup comp.dsp and ask people there. 70.109.176.192 (talk) 17:45, 9 June 2010 (UTC)
- Looks like another one of these clueless folks have again tried to transmit, via Wikipedia, their cluelessness to others. 96.237.136.210 (talk) 19:27, 14 July 2017 (UTC)
Proportional Minus Delay (PMD)
[edit]I saw some proportional minus delay in connection with ZOH. Can this be integrated into the article? I could'nt find a similar article here. Cplusplusboy (talk) 11:52, 14 June 2013 (UTC)
Article is wrong. Probably written by non-experts. Rewrite necessary.
[edit]- This is by far the most badly edited page in Wikipedia. *By far*. The transfer function of the ZOH is:
- period. There is no scaling factor in it and this transfer function is derived from the necessary impulse response to output a hold. The usage of the 1/T scaling factor has nothing to do with the DC gain of the ZOH but rather with the usual presence of a sampler in front of the ZOH to derive the frequency response, after all, the input to the ZOH **must** be impulses and not a continuous time signal, which would obviously achieve the wrong frequency response (that's why some here are observing a scaled DC gain). Thus, the actual answer is that Sampler+ZOH has the transfer function:
- If anyone is in doubt of why this happens, I'll be glad to provide pretty pictures so you can understand it more easily.
- In conclusion: the ZOH transfer function **has no scaling factor 1/T**. This wiki article must be edited and fixed.
PS: I found this lecture slides which should help the editors of this page understand it: http://ecee.colorado.edu/~ecen5807/course_material/Lecture20slidesb.ppt Check slide 21. Signed: Dr.AnonymousCoward189.101.213.204 (talk) 13:43, 31 August 2013 (UTC)
Dr.IPbrazil,
Quoting: "the author of the slides (me) requested that the slides should **not** be used as an authoritative reference for this or any other wikipedia topic."
I'm not going around the maypole with you at all about this. 70.109.186.111 (talk) 03:02, 10 February 2014 (UTC)
Opportunity for linking
[edit]The article ends explaining why the ZOH of DACs results in a 3.9 dB rolloff at the Nyquist frequency. This suggests that conventional DACs are not suitable for very accurate output and need some high frequency compensation. Curious readers will wonder about this, so it would be nice to link to the "solution", if it exists. — Preceding unsigned comment added by Picamas (talk • contribs) 19:08, 16 September 2023 (UTC)