I'm trying to wrap my head around how to generate sine-waves out of a DAC near the Nyquist frequency (or determining how close I can get for reliable results). So if I want to generate a 499 Hz sine wave using a 1 kSPS DAC, I will calculate each sample:

$$y(t) = \sin(2 \pi 499 \ t) $$

Converting this to discrete time:

$$ y[k] = y\left( \tfrac{k}{1000} \right) = \sin \left(2 \pi 499 \frac{k}{1000} \right)$$

I end up with something like this:

enter image description here

The red line shows the 499 Hz signal, while the blue dots show the DAC sample. I get these large amplitude fluctuations. I know it's common to use a reconstruction filter to get rid of DAC images, which I always thought of as a low-pass filter from DC to Nyquist, which wouldn't really help get rid of the amplitude fluctuations...or would it?

Is there a better approach for generating sine waves? Or is there just simply a limit I cannot exceed (and what is the limit)?

  • 1
    $\begingroup$ so this is a "conventional" DAC and not an oversampled sigma-delta DAC? if that is the case, and you really want to generate good sinusoids up to nearly Nyquist, you will need a helluva sharp brickwall LPF as an anti-imaging filter. $\endgroup$ Commented Nov 19, 2020 at 22:53
  • 1
    $\begingroup$ oversampling (which is one of the techniques of sigma-delta) is far cheaper than an analog brick-wall LPF. $\endgroup$ Commented Nov 19, 2020 at 22:56

1 Answer 1


There's nothing wrong about this – it's absolutely what you should be seeing.

The sine wave is intact, if you applied a reconstruction filter – there's no amplitude fluctuation of the wave, as soon as you limit its bandwidth to the nyquist bandwidth, the analog signal "has" to follow the full sines.

  • $\begingroup$ well, Marcus, there is something wrong with this. his anti-imaging filter isn't sharp enough, but that's a damn hard task for an analog filter. $\endgroup$ Commented Nov 19, 2020 at 22:55
  • $\begingroup$ well, you're right about the realizability of the filter, but he's not using any filter at all so far. $\endgroup$ Commented Nov 19, 2020 at 22:56
  • 1
    $\begingroup$ The output beating is 100% right! Look at the beat frequency: exactly the 1 Hz that's left between Nyquist and his oscillation. $\endgroup$ Commented Nov 19, 2020 at 22:59
  • 2
    $\begingroup$ i am starting to suspect that this is not really about a DAC. it's more about mathematical reconstruction and the OP doesn't quite grok the reconstruction part of the sampling theorem. $\endgroup$ Commented Nov 19, 2020 at 23:04
  • 2
    $\begingroup$ Looking at that, I think you're right. $\endgroup$ Commented Nov 19, 2020 at 23:09

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.