Reply by Tim Wescott July 2, 20052005-07-02
Olivia.McElwee@gmail.com wrote:
> Hi, > I want to set a few things clear in my head and was hoping you could > help. > Sawtooths have an infinite number of harmonics, so am I right in saying > that a DAC can only represent harmonics with frequencies equal to or > below the Nyquist limit? In other words, if I have a sampling rate of > 1000Hz, and I wish to output a sawtooth with a fundamental frequency of > 200Hz, then the best I could hope for is the following signal from the > DAC - > > (1/PI)*sin(2*PI*200*t) + (1/(2*PI))*sin(2*PI*400*t) > > The first and second harmonic, correct? > > So the first harmonic contains 50% of the power concerned with the > sawtooth, and the second harmonic 25%. So my signal above contains 75% > of the power of a proper sawtooth. I guess it depends on the > application as to how much of the power you need to represent. A DAC of > 200Hz would allow you to produce 96.875% of the signal - the first 5 > harmonics, correct? > > Thank you, > O. >
DACs are (theoretically) capable of generating frequency components from DC to light. But when you output a signal at some sampling rate the results are aliased because of sampling and filtered because of the zero-order hold properties of the DAC. If you have a sampling rate of 1000kHz and want to put out a 200Hz "sawtooth" you will put out: - components at 200Hz, 800Hz, 1200Hz, 1800Hz, n * 1000kHz +/- 200Hz. - components at 400Hz, 600Hz, 1400Hz, n * 1000kHz +/- 400Hz. - components at 600Hz, 400Hz, 1600Hz, n * 1000kHz +/- 600Hz - etc. Note that it isn't going to be a very good representation of a sawtooth, which you could see pretty quickly with a graphing package. Generally if you need an accurate reconstruction you run the output of the DAC through a low-pass filter with a bit of peaking to account for the filtering effect of the zero-order hold effect. Getting accurate reconstruction becomes increasingly hard as you approach the Nyquist frequency (1/2 the sampling rate), and is infinitely difficult _at_ the Nyquist frequency. -- ------------------------------------------- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by July 2, 20052005-07-02
Hi,
I want to set a few things clear in my head and was hoping you could
help.
Sawtooths have an infinite number of harmonics, so am I right in saying
that a DAC can only represent harmonics with frequencies equal to or
below the Nyquist limit? In other words, if I have a sampling rate of
1000Hz, and I wish to output a sawtooth with a fundamental frequency of
200Hz, then the best I could hope for is the following signal from the
DAC -

(1/PI)*sin(2*PI*200*t) + (1/(2*PI))*sin(2*PI*400*t)

The first and second harmonic, correct?

So the first harmonic contains 50% of the power concerned with the
sawtooth, and the second harmonic 25%. So my signal above contains 75%
of the power of a proper sawtooth. I guess it depends on the
application as to how much of the power you need to represent. A DAC of
200Hz would allow you to produce 96.875% of the signal - the first 5
harmonics, correct?

Thank you,
O.