0
$\begingroup$

I understand how the ADC and Nyquist works. Anything above Fs/2 can be indistinguishable from frequencies inside Fs/2 so we use an alias filter to remove them before sampling. This can also be an advantage if we are limited by a clock, for example if Fs=80 kHz or Fs/2 = 40kHz we can digitise a received signal at 50kHz because it will alias to 30kHz. So we can effectively use cheaper clocks to sample high frequencies (along as the equipment/circuit allows the higher frequencies to resonate through it before the ADC).

How is the same done on the DAC with the sample and hold reconstruction ... I am not conceptionally understanding how any physical frequencies can be created above Fs/2 to use the full advantage of a smaller clock. i.e. If we want to the DAC to create a signal at 50kHz, I would be assuming I would need to be greater than 100kHz and no alias 'tricks' can be done using a clock less than 100 kHz.

Thanks

$\endgroup$

3 Answers 3

3
$\begingroup$

In addition to the good points Marcus has made in his answer, I want to add that there are other DAC topologies specific for doing this more efficiently.

The OP is correct that a traditional (Non-Return to Zero or NRZ) DAC will suffer from passband roll-off due to the staircase reconstruction, in addition to any other bandwidth limitations of the DAC analog output circuits. This doesn't mean the output can't be physically created, rather it just means there is an attenuation due to that roll-off. The output still has all the frequencies as we get with the case of an ADC (based on the digital signal being a stream of weighted impulses).

I show the expected result in the plot below for a NRZ DAC with the OP's case of creating a 50 KHz sine wave output with a sampling rate of 80 KHz. Just as with an ADC, the sampled spectrum will be periodic repeating around every multiple of the sampling rate. For a real sinuosoid at frequency $f_n$ the output frequencies will be $fout = Nf_s +/- f_n$, where $f_s$ is the sampling rate and $N$ is a positive integer. With a 80 KHz sampling rate, 50 KHz is created by $N=1$ and $f_n=30$ KHz. Thus we get a 50 KHz output by digitally creating a 30 KHz sinusoid sampled at 80 KHz, and bandpass filtering the output in the range from $f_s/2$ to $f_s$ which is referred to as the "Second Nyquist Zone".

All the output frequencies in the frequency range plotted are indicated by the orange circles and would be at $N 80 \text{ KHz} \pm \text{ 30 KHz} = [30, 50, 110, 130, 190, 210, 270, 290, 350, 370 ....] \text{ KHz}$

The attenuation due to the staircase reconstruction in the DAC is indicated in blue, and we have a predicted output level of 50 KHz that is attenuated by approximately -6.5 dB. (Note that the 30 KHz tone itself is also attenuated approximately 2.1 dB).

NRZ Output

As introduced above, the NRZ provides a zero-order hold staircase reconstruction which can be shown to multiply the output spectrum with a Sinc function shape in frequency, with the first null at the sampling rate. This in addition to the output bandwidth of the analog output of the DAC circuit itself. The sampled system is periodic in frequency, so any particular higher frequency output can be selected with bandpass filtering but will be attenuated by the analog output bandwidth of the DAC and the Sinc shape from the staircase reconstruction.

DACs for improved performance in higher Nyquist zones for direct sampling applications include Return to Zero (RZ) DACs where the output of the DAC is a pulse that is half the width of the output period instead of the full width as in the case a traditional NRZ DAC. At the expense of output power (and therefore SNR) in the first Nyquist zone, there will be a cross-over in the 2nd Nyquist zone where we gain more output power and SNR, as the effect of this is to push the first null in that Sinc shaped frequency roll-off out from $f_s$ to instead be at $2f_s$.

Another topology with even better performance for operation in the third Nyquist zone has the output toggle in polarity at half the width of the output pulse. DACs with this mode of operation are referred to as “RF-mode” by Analog Devices and "Mixed-Mode" by TI and AMD. Even other operating modes that are available are further detailed in the references at the end of this post.

A summary of the frequency responses for the NRZ, RZ, and RF mode operation are shown in the plot below. NZ1, NZ2, NZ3, and NZ4 refer to the Nyquist Zones, with the upper edge of NZ2 at the sampling rate ($f_s$):

DAC modes

The plot below shows the resulting 50 KHz signal out of these operating modes, with the "RF-mode" resulting in the lowest loss for a 50 KHz output with an 80 KHz sampling rate. We also see from this plot that the NRZ DAC still out-performs the RZ DAC if it were to be used directly for producing a 50 KHz output, but the RF DAC is about 4 dB better.

DAC modes to create 50 KHz

It's possible that this mode could be emulated by following a standard NRZ DAC that supports the output bandwidth with an analog mixer, with the LO driven by a 2x clock synchronized to the sampling rate $f_s$ as I draw in the diagram below.

RF Mode

Related Links:

Nice overview of multiple DAC mode variants: "Operational modes of high-speed DACs: analysis and mathematical modeling, by K. K. Khramov and V. V. Ramoshov: https://iopscience.iop.org/article/10.1088/1742-6596/1096/1/012158/pdf

Overview by ADI:

https://www.analog.com/en/resources/technical-articles/directsampling-dacs-in-theory-and-application.html

TI DAC supporting the "RF-Mode" or what they call "Mix-Mode" (This is a very expensive DAC for direct sampling applications in multi-GHz frequencies, just as an example but not a suggested part for the OP to use!):

https://www.ti.com/lit/ds/symlink/afe7954.pdf?ts=1696542130043&ref_url=https%253A%252F%252Fwww.google.com%252F

$\endgroup$
3
  • $\begingroup$ lovely overview! the nice thing is that the mixer in your last application doesn't actually have to be a nice continuous-value amplifier – an inverter and a switch that switches between the original signal and its inverse should do (given an appropriate BPF). I think (not sure) that's called a chopper mixer, but to me "chopping" sounds more like it'd convert the signal from your NRZ DAC figure to that of your RZ DAC figure, and not the MIX-MODE DAC figure (because that is just "chopping off" the second half of each sample period). $\endgroup$ Commented Jun 10 at 15:13
  • 1
    $\begingroup$ @MarcusMüller indeed! Note that if you look under the hood of the standard double balanced mixer created with a diode ring that the LO operates the diodes as an RF switch, switching the RF path from 0 to 180 degrees. (Flipping the polarity as in the Mix-Mode DAC here). When I was designing mixers one product I did was using a GaAs switch to select between the 0 and 180 degree legs of a balun. It’s still an RF mixer or multiplier, just different ways to get there. (And when we can saturate both inputs as in a phase detector, we can use an XOR gate as the mixer!) $\endgroup$ Commented Jun 10 at 16:58
  • 1
    $\begingroup$ ohhh I never looked at the double-balanced diode mixer that way! Nice! I learn so much every day! $\endgroup$ Commented Jun 10 at 17:13
3
$\begingroup$

DAC - Can we create and use frequencies above Fs/2?

yes, that's commonly done. You can work with any image you want, as long as it's pronounced enough (in the end, as long as the analog bandwidth of the DAC is high enough due to its output stage switching fast enough).

How is the same done on the DAC

You need a reconstruction filter, always, the equivalent to the anti-aliasing filter for the ADC.

the sample and hold reconstruction

That's not a reconstruction, since it's not bandlimited. You're missing a proper reconstruction filter.

I am not conceptionally understanding …

The math is very similar to the ADC case: You model your DAC as producing a sequence of equidistant pulses; from them having the distance $\frac{1}{F_s}$ follows that the spectrum at the output of the DAC is periodic with a period of $F_s$, and the job of the reconstruction filter is to select the "repetition" you want. Often, that is the baseband from $-F_s/2$ to $+F_s/2$ (so, centered around $f_0=0$), so the reconstruction filter is simply a low-pass filter. But that's not necessary, you can also use a band pass filter and get, for example a $<F_s$ wide bandwidth around $f_0 = 3F_s$.

While "sample and hold" is a filter, it does not fulfill the needs of restricting the output bandwidth to a single $F_s$ (or less), so in itself, the sample-and-hold behaviour of DACs isn't sufficient – and you need to add an analog filter afterwards to get the reconstruction you want.

alias 'tricks'

The equivalent to aliasing for ADCs (and when downsampling an already discrete-time signal) is "imaging" in DACs (and when upsampling an already discrete-time signal).

$\endgroup$
0
$\begingroup$

Yes, in your specific case, quite easily.

Your system has no reconstruction filter, or rather, it is just a zero-order-hold output, so essentially the ideal DAC output is square wave steps.

Square waves have odd harmonics. All you have to do is to generate a square wave with some odd harmonic at 50 kHz.

For example, with 80 kHz sampling rate, you can generate a 10 kHz square wave with a DAC that has zero-order-hold output. The resulting square wave has frequency content at 10 kHz, 30 kHz, 50 kHz, etc. The amplitude of 50 kHz sine wave is only one fifth of the 10 kHz sine wave, but it's there.

If you only want the 50 kHz sine wave instead of the 10 kHz square wave, then you need a suitable reconstruction filter, like a 50 kHz bandpass, and the nearest frequecies are the other odd harmonics of 30 kHz and 70 kHz.

Another way is also possible. Since the sampling rate is 80 kHz, the highest reproducible signal is 40 kHz, which again with zero-order-hold means it is a 40 kHz square wave. If you generate a 30 kHz sine wave, which is 10 kHz less than 40 kHz, it will also generate some sine wave with frequency of 10 kHz more than 40 kHz, so at 50 kHz. Again, you can filter out the other frequencies, and there is again 20 kHz between the 30 kHz that was generated and the 50 kHz you wanted.

Due to the zero-order-hold output, the DAC has an effect called the DAC aperure, and as the time-domain impulse response of samples is a rectangle, it means that the frequency-domain output images is a sinc waveform with zero at Fs, 2Fs, etc. So the 30 kHz is already a bit attenuated, and the frequency of first image frequency at 50 kHz a bit more attenuated.

In audio synthesizers this is called subtractive synthesis, generate some waveform that has a lot of frequencies in the spectrum, and subtract/filter away the frequencies you don't want.

$\endgroup$
1
  • $\begingroup$ I don't think the harmonic approach would be very useful unless we really only wanted to generate a 50 Hz tone exactly with a 80 Hz sampling clock --- consider what would happen if you shifted your 10 Hz signal by 0.1 Hz... $\endgroup$ Commented Jun 8 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.