Talk:Zero-order hold

message: 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:
:x_{\mathrm{ZOH}}(t)\,= \sum_{n=-\infty}^{\infty} x(nT)\cdot \mathrm{rect} \left(\frac{t-T/2 -nT}{T} \right) \ 
:where \mathrm{rect}() \  is the rectangular function.  
\mathrm{rect} \left(\frac{t-T/2}{T} \right) is depicted in Figure 1, and x_{\mathrm{ZOH}}(t)\, 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:
:x_{\mathrm{sinc}}(t) = \sum_{n=-\infty}^{\infty} x(nT) \cdot \mathrm{sinc} \left( \frac{t -nT}{T} \right) \ 
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:
:
x_s(t)\,	= A \sum_{n=-\infty}^{\infty} x(nT)\cdot \delta(t - nT) \
        	= x(t) \ A \sum_{n=-\infty}^{\infty} \delta(t - nT) \
which is depicted in Figure 3.   "A\," 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:
: h_{\mathrm{ZOH}}(t)\,=  \frac{1}{A}\cdot \mathrm{rect} \left(\frac{t -T/2}{T} \right)\ 
where A=1\, is a popular choice in the literature.
The effective frequency response is the continuous Fourier transform of the impulse response:
: H_{\mathrm{ZOH}}(f)\, = \mathcal{F} \{ h_{\mathrm{ZOH}}(t) \} \,= \frac{1}{A}\cdot \frac{1 - e^{-i 2 \pi fT}}{i 2 \pi f} = \frac{T}{A}\cdot e^{-i \pi fT} \cdot \mathrm{sinc}(fT) \ 
:We note that H_{\mathrm{ZOH}}(0)\, = \frac{T}{A}\,, which may make the choice A=T\, more appealing (than A=1) for some applications.
Compared to the "ideal" (Whittaker-Shannon) frequency response, H_{\mathrm{ZOH}}(f)\, 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.   x_s(t)\, is not bandlimited, so if x(t)\, is bandlimited, then the subsequent leakage of higher frequencies represents a difference between x_{\mathrm{ZOH}}(t)\, and x(t)\,.
:*Similarly, if x(t)\, is not bandlimited, then x_{\mathrm{sinc}}(t)\, is also an imperfect reconstruction.
And finally, the Laplace transform transfer function of the ZOH is found by substituting s = i2\pi f\, into H_{\mathrm{ZOH}}(f)\,:
: H_{\mathrm{ZOH}}(s)\, = \mathcal{L} \{ h_{\mathrm{ZOH}}(t) \} \,= \frac{1}{A}\cdot \frac{1 - e^{-sT}}{s} \  
--Bob K 23:11, 30 January 2007 (UTC)
thread_title:  Complete re-write 

message: ::::: 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:
:::::: X_\mathrm{Z}(z) \ \stackrel{\mathrm{def}}{=}\  \sum_{n=-\infty}^{\infty} x[n] \, z^{-n} \ 
::::: and
:::::: X(s)  \ \stackrel{\mathrm{def}}{=}\  \int_{-\infty}^{\infty} x(t) \, e^{-s t} \, dt \ 
::::: and defining the DTFT and continuous Fourier transform in terms of those, where 
::::::  z = e^{j 2 \pi f T} = e^{j \omega} \ 
::::: and
::::::  s = j 2 \pi f = j \Omega \ 
:::::::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)
replies: text:  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)
replies: text: j\, is my preference for that reason.  I'm just used to it.  But I can live with i\,.  I think that battle is neither small enough to win nor big enough to matter.  --Bob K 04:01, 12 February 2007 (UTC)
thread_title:  T, f, ω, s, z, and even i & j 

message: 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)
replies: text: 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)
thread_title:  Another common misconception 

message: 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)
thread_title:  Proportional Minus Delay (PMD) 

message: : This is by far the most badly edited page in Wikipedia. *By far*. The transfer function of the ZOH is:
:: H_{\mathrm{ZOH}}(s)\, = \mathcal{L} \{ h_{\mathrm{ZOH}}(t) \} \,= \frac{1 - e^{-sT}}{s} \ 
: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:
:: H_{\mathrm{Sampler+ZOH}}(s)\, = \mathcal{L} \{ h_{\mathrm{Sampler+ZOH}}(t) \} \,= \frac{1 - e^{-sT}}{sT} \ 
: 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)
thread_title:  Article is wrong. Probably written by non-experts. Rewrite necessary. 

message: 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)
thread_title:  Opportunity for linking