[email protected] (Ben Bradley) wrote in message news:<
[email protected]>...
> There are (at least) two ways of generating PWM. One is where one
> edge always occurs at the same time (in relation to the generating
> frequency) and the opposite edge varies. This is analogous to the
> output of a comparator driven by [the input signal and] a sawtooth
> wave. The other varies both edges complementarily, like a comparator
> driven by a triangle wave. The PWM I generated only varied one edge,
> but I believe the one that varies both edges generates less
> distortion.
The distortion in "double-edge" PWM is smaller than in "single-edge"
PWM. Performance is better if the locations of the two edges are
determined by different sample values of the modulator input
(asymmetric double-edge PWM) than by a single value (symmetric
double-edge PWM).
> This distortion appears to be a dirty secret about PWM that is
> rarely discussed and not well known about. I don't know where the math
> is that describes it, but I'm pretty sure it's not simple. If someone
> has a good reference for it, that would (maybe!) be appreciated.
Ummm... not a dirty secret, just a topic that is unfamiliar to many
readers of comp.dsp. The power electronics people are very familiar
with this type of stuff; just look in the IEEE Transactions on Power
Electronics.
Robert Gush (
[email protected]) wrote
>I doubled the PRF to 28800Hz, left the sample rate at 7200Hz. The 2nd
>harmonic has dropped by 6 dB
This is precisely the behavior predicted by theory. A paper
describing
in gory detail the time-domain and frequency representations of the
various forms of PWM signals is scheduled to appear in the October
2003
issue of the European journal titled Signal Processing. If you cannot
wait that long, a preprint can be downloaded from
http://www.ifp.uiuc.edu/~sarwate/spectral.ps
>I don't suppose anyone has got a simple method of correcting this
>distortion?
>What about deliberately introducing an asymetrical distorion that is
>proportional to frequency? It would be fairly easy to do with the
>hardware multiplier as I am already doing amplitude modulation...
All the methods being discussed here are termed "uniform-sampling"
PWM because the pulse widths are proportional to uniformly-spaced
-in-time sample values of the modulating signal that is, the
standard bread-and-butter discrete-time signal universally beloved
in the DSP community. Converting such a signal to PWM is relatively
easy but has problems with harmonic distortion. Now, it has long
been a folk theorem in the PWM community that the "natural-sampling"
form of PWM has **NO** harmonic distortion. A formal proof of this,
applicable to all signals (not just the single-tone and two-tone
signals that provide the basis for the folk theorem) is given in the
paper cited above. Natural-sampling PWM is relatively easy to
create with analog electronics when the modulating signal is available
as a continuous-time signal. Natural-sampling PWM is **NOT** as easy
to generate when the modulating signal is available only as a sequence
of (uniformly spaced) samples. Some DSP-oriented natural sampling
PWM schemes are described in a paper by Pascual et al. in the January
2003 issue of the IEEE Transactions on Power Electronics (preprint
mss available at http://www.ifp.uiuc.edu/~sarwate/PWM_PEL.pdf). This
paper describes a hi-fi audio amplifier putting more than 50W into an
8 ohm load with an efficiency of 82% -- far better than any analog
linear amplifier -- and a THD of 0.022%.
Vladimir Vassilevsky (
[email protected]) pointed out that
>The sidebands of the PWM spectrum are falling into the audio range
This is true for both uniform-sampling PWM and natural-sampling PWM.
In the former case, the harmonic distortion is overwhelmingly larger
that the distortion caused by the sidebands. In the latter case, this
sideband distortion is the *only* distortion when the PWM signal is
demodulated by passing it through a low-pass filter. Thus, making
the pulse repetition frequency as large as possible is the right
thing to do (as Vladimir suggested) because it puts the sidebands
far away and because it reduces harmonic distortion in
uniform-sampling PWM. Curiously, these offending **passband**
PWM signals consist of the modulating signal **perfectly**
phase-modulated onto the carrier (pulse repetition) frequency and
its harmonics; no need for varactor diodes or VCOs etc. This fact
might be of more interest to the RFians reading this newsgroup...
--Dilip Sarwate