Maker Pro
Maker Pro

PCM vs PWM for low distortion sinewaves

B

BobW

Jan 1, 1970
0
I'm attempting to generate low distortion sinusoids (in the 200Hz - 3KHz
range). There will be a fixed number of amplitude changes for each period
regardless of the frequency being generated.

If we keep the number of pulse width or amplitude changes per period the
same (let's say 32 per period), and the resolution the same (16 bit DAC or
16 bit pulse width resolution), and the final filtering is the same (2 pole)
and constant (i.e., not tracking) -- do you think that I can get lower
distortion using 16 bit PCM or 16 bit PWM?

Thanks for your thoughts.

Bob
 
J

John Larkin

Jan 1, 1970
0
I'm attempting to generate low distortion sinusoids (in the 200Hz - 3KHz
range). There will be a fixed number of amplitude changes for each period
regardless of the frequency being generated.

If we keep the number of pulse width or amplitude changes per period the
same (let's say 32 per period), and the resolution the same (16 bit DAC or
16 bit pulse width resolution), and the final filtering is the same (2 pole)
and constant (i.e., not tracking) -- do you think that I can get lower
distortion using 16 bit PCM or 16 bit PWM?

Thanks for your thoughts.

Bob

Delta-sigma.

John
 
V

Vladimir Vassilevsky

Jan 1, 1970
0
BobW said:
I'm attempting to generate low distortion sinusoids (in the 200Hz - 3KHz
range). There will be a fixed number of amplitude changes for each period
regardless of the frequency being generated.

If the sample rate is the exact multiple of the frequency of the
sinewave, then all of the distortion will be concentrated at the
harmonics of the sinewave. This is not good.
If we keep the number of pulse width or amplitude changes per period the
same (let's say 32 per period), and the resolution the same (16 bit DAC or
16 bit pulse width resolution), and the final filtering is the same (2 pole)
and constant (i.e., not tracking) -- do you think that I can get lower
distortion using 16 bit PCM or 16 bit PWM?

So, you have the 2nd order LPF with Fc at ~3kHz, hence the THD is going
to be as bad as 20% or so at 200 Hz at the best.

The PCM will generate less artifacts then PWM. For the PWM, you will
have to predistort the sinewave, and it will be a lot of trash above
Nyquist.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com
 
B

BobW

Jan 1, 1970
0
Vladimir Vassilevsky said:
If the sample rate is the exact multiple of the frequency of the sinewave,
then all of the distortion will be concentrated at the harmonics of the
sinewave. This is not good.


So, you have the 2nd order LPF with Fc at ~3kHz, hence the THD is going to
be as bad as 20% or so at 200 Hz at the best.

The PCM will generate less artifacts then PWM. For the PWM, you will have
to predistort the sinewave, and it will be a lot of trash above Nyquist.


Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com

Vladimir,

Thanks for your help. You raise some good points -- especially regarding the
distortion at low frequencies.

The most important factor is frequency accuracy. I need to be within 0.3%.

What I can do is to increase the samples per period as the frequency goes
down.

Another alternative is to have a tracking filter (a switched capacitor
filter comes-to-mind). This will result in higher power, however, and this
thing will be battery operated.

Regards,
Bob
 
B

BobW

Jan 1, 1970
0
John Larkin said:
Delta-sigma.

John

John,

I've played with a form of delta-sigma before (this so-called "adaptive
delta modulation"). At that time, it required an asic.

The thing I'm working on is a little battery operated unit and (currently)
uses a small micro controller running at 16MHz (max). The micro has some
very convenient stuff for doing PWM. I'll have to see whether or not I can
do delta-sigma in software because I fear that adding an external part would
result in too much power consumption.

Thanks,
Bob
 
If the sample rate is the exact multiple of the frequency of the
sinewave, then all of the distortion will be concentrated at the
harmonics of the sinewave. This is not good.


So, you have the 2nd order LPF with Fc at ~3kHz, hence the THD is going
to be as bad as 20% or so at 200 Hz at the best.

The PCM will generate less artifacts then PWM. For the PWM, you will
have to predistort the sinewave, and it will be a lot of trash above
Nyquist.

Vladimir Vassilevsky
DSP and Mixed Signal Design Consultanthttp://www.abvolt.com

Good points here. I suspect the original poster is going to do a
simple table look-up, hence the sample rate being a multiple of the
sine wave to keep the look-up table smaller. If a coordic was used,
the sample rate could be a non-multiple of the sine wave.
 
J

john jardine

Jan 1, 1970
0
BobW said:
Vladimir,

Thanks for your help. You raise some good points -- especially regarding the
distortion at low frequencies.

The most important factor is frequency accuracy. I need to be within 0.3%.

What I can do is to increase the samples per period as the frequency goes
down.

Another alternative is to have a tracking filter (a switched capacitor
filter comes-to-mind). This will result in higher power, however, and this
thing will be battery operated.

Regards,
Bob
If frequency accuracy is boss, I'd be inclined to generate the sines using
direct DDS via 8 bit adds, a lookup table and ADC. harmonic distortion will
be the same at 200Hz as 3kHz. Clock noise should run at the 100's of kHz,
hence trivial filtering.
 
Top