# Zero Order Hold Bode diagram

Here is the transfer function of the Zero Order Hold and its bode diagram:

This transfer function is usually used for modelized a Digital to Analog Converter.

Do you know why there is sharp roll off and rises at certain frequency as it can be seen on the bode diagram ?

Thank you :)

Consider a sinewave sampled close to the Nyquist frequency (this can be an analogue sinewave that is sampled by an ADC or, a digital reproduction of a sinewave created by a DAC). Then, consider what the RMS value of the sampled waveform is. Here's a sinewave that is 1 volt peak sampled 8 times over three cycles: -

So, if you calculate the amplitude in RMS terms you get 0.7071 and, this is exactly the same RMS value as the idealized sinewave. However, if you the did a Fourier analysis of the sampled waveform you'd see that the RMS content at the sinewave fundamental frequency was less than 0.7071 AND, importantly, the distortion of the sampled sinewave has led to harmonics above the fundamental frequency. Together, fundamental and harmonics keep the overall RMS the same but clearly, there are harmonics hence, the fundamental drops in amplitude as you approach the Nyquist frequency.

This leads to the sharp roll-off of fundamental RMS value and the increase in higher order harmonics due to the sampling artefacts rising in magnitude when sampling frequency approaches the Nyquist frequency. At the Nyquist frequency, the magnitude at the fundamental frequency diminishes to zero. When you sample above the Nyquist frequency you'll generate aliasing.

Here is a very good article by Maxim that explains this in more detail: -

EQUALIZING TECHNIQUES FLATTEN DAC FREQUENCY RESPONSE - application note 3853

• Thank so much ! Really well explained ! :D
– Jess
Jul 7, 2021 at 8:58

$$\ 1 - e^{-sT} = 0 \$$ for $$\s = \color{red}{0j}, \ j\frac{2\pi}{T}, \ j\frac{4\pi}{T}, \ j\frac{6\pi}{T}\$$ etc. The zeros when plotted in dB show up as $$\-\infty\$$; i.e. sharp dips at equal intervals of frequency.

The zero at $$\s = 0j\$$ doesn't appear in the bode since it gets cancelled by the $$\\frac{1}{sT}|_{s=0j}\$$.

## edit

But there is a lot of transfer function with zeroes and the gain do not go to minus infinity ?

Try plotting the bode of a system with a zero on the imaginary axis.

bode(tf([1,0,1], [1, 2,1]), [0.999999 : 0.00000001 : 1.000001])


Imagine I have no gain @ 1 kHz why when I applied a signal at the input of the ZoH @1KHz I woould have no output signal ?

Look carefully at the bode you posted in the question. If you want to see the no-output response you have to give an input above the twice Nyquist frequency (Nyquist frequency is at f/fs = 0.5 in your graph). In fact, the first zero is appearing exactly at the sampling frequency. So yes! You will get zero output!subject to conditions

This is a property of the sample part of sample-and-hold. See Wikipedia, or the other answer posted for examples.

You would get a sequence of zeroes if you sampled $$\\sin(\frac{k\ 2\pi}{T} t)\$$ at exactly $$\t = nT\$$, where $$\n, k\$$ are any positive integers.

• In other words, imaging due to sampling. Also, -20 dB/dec is no sharp roll-off, but the consequence of the 1/s. Jul 6, 2021 at 17:10
• "Sampling sold separately". AFAIK, This transfer function works as a stand in for zero-order-hold only when fed with an impulse train with $T$ gap between impulses.
– AJN
Jul 6, 2021 at 17:17
• Don't forget that the response, itself, is the result of the convolution between a sampled input (which is a weighted train of impulses) and the response of the ZOH, which is a rectangle in frequency domain. So the sampling is included and the train of impulses is implicit. Jul 6, 2021 at 19:20
• The bode plot is obtained by substituting $s = j\omega$; i.e. we are plotting the transfer function values over the imaginary axis. If the transfer function has a zero on the imaginary axis, then the gain will be $0 \equiv -\infty dB$. For most transfer functions the zeros are not on the imaginary axis, but some where else; then the gain will not be 0. You can check yourself by plotting the bode of $\frac{s^1+0s+1}{s^2+2s+1}$. But the plotting software may not exactly pick the point so the plot may not show exactly $-\infty dB$. That is a plotting artifact;
– AJN
Jul 7, 2021 at 12:01
• If can add my two-Euro-cent contribution, increasing the simulation granularity by selecting a large amount of points will help to see the sharp dips at the zeroes frequencies. Jul 7, 2021 at 16:29