PWM as DAC problems

  • Follow


Hi All,

I am using the PWM unit in a PIC18F6720 to generate a number of tones
using DDS. All seemed to be well until I hooked up a spectrum
analyser. The 2nd harmonic distortion of a 400Hz tone was sitting at
about -26dB. At first I thought it was a problem with the single
quadrant lookup table and after a lot of testing and making of .WAV
files I came to the conclusion that it had to be somthing to do with
the PWM process.

To confirm this I setup an 8 bit R-2R network and output the data to
this simple DAC and voila! The 2nd harmonic distorion was now  -45dB
below the fundamental.

I thought maybe there is something dodgy about the PWM linearity, so I
checked the output m/s ratio for codes from 0x00 to 0xFF and it was
beatifully linear.
The PRF is running at 14400Hz, sample rate at 7200Hz.

Is there something I am missing about using PWM to synthesise audio
frequency tones?

Regards
Robert
0
Reply robert 9/10/2003 11:10:26 AM

Robert Gush wrote:
> Hi All,
>
> I am using the PWM unit in a PIC18F6720 to generate a number of tones
> using DDS. All seemed to be well until I hooked up a spectrum
> analyser. The 2nd harmonic distortion of a 400Hz tone was sitting at
> about -26dB. At first I thought it was a problem with the single
> quadrant lookup table and after a lot of testing and making of .WAV
> files I came to the conclusion that it had to be somthing to do with
> the PWM process.
>
> To confirm this I setup an 8 bit R-2R network and output the data to
> this simple DAC and voila! The 2nd harmonic distorion was now  -45dB
> below the fundamental.
>
> I thought maybe there is something dodgy about the PWM linearity, so I
> checked the output m/s ratio for codes from 0x00 to 0xFF and it was
> beatifully linear.
> The PRF is running at 14400Hz, sample rate at 7200Hz.
>
> Is there something I am missing about using PWM to synthesise audio
> frequency tones?

I take it you have a low-pass filter after the PWM and before sampling?

Ben
-- 
I'm not just a number. To many, I'm known as a String...


0
Reply Ben 9/10/2003 11:39:06 AM



Robert Gush wrote:
> 
> I am using the PWM unit in a PIC18F6720 to generate a number of tones
> using DDS. All seemed to be well until I hooked up a spectrum
> analyser. The 2nd harmonic distortion of a 400Hz tone was sitting at
> about -26dB.

[...]
 
> Is there something I am missing about using PWM to synthesise audio
> frequency tones?

1. You need to have a good LPF after a PWM modulator.
2. The sidebands of the PWM spectrum are falling into the audio range.
The PWM sample frequency should be at least 10 times higher then audio.

Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com
0
Reply Vladimir 9/10/2003 12:48:24 PM

In comp.dsp, robert@suesound.co.za (Robert Gush) wrote:

>Hi All,
>
>I am using the PWM unit in a PIC18F6720 to generate a number of tones
>using DDS. All seemed to be well until I hooked up a spectrum
>analyser. The 2nd harmonic distortion of a 400Hz tone was sitting at
>about -26dB. At first I thought it was a problem with the single
>quadrant lookup table and after a lot of testing and making of .WAV
>files I came to the conclusion that it had to be somthing to do with
>the PWM process.

   What's your 'modulation index', or what percentage of the full PWM
range does the peak-to-peak 400Hz wave take up? If you lower the
modulation level and make up for it with more gain on the analog side,
you will have less distortion. The tradeoff is that you get more noise
(the absolute noise level is the same, but it's higher in relation to
the lowered signal level).
   I've done PWM at 9600Hz, and generated DTMF and 300 baud mark-space
modem tones with it. I used a several-pole LPF AND a twin-t r-c notch
filter at 9600Hz on the PWM output, and got good (well within
acceptable/legal limits for the phone line) results. I didn't go
through the math of exactly what PWM does, but with an analyzer I did
notice the distortion products going up disproportionally as the
modulation was increased and saw that this was a property of PWM.
   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.
   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.

>To confirm this I setup an 8 bit R-2R network and output the data to
>this simple DAC and voila! The 2nd harmonic distorion was now  -45dB
>below the fundamental.
>
>I thought maybe there is something dodgy about the PWM linearity, so I
>checked the output m/s ratio for codes from 0x00 to 0xFF and it was
>beatifully linear.
>The PRF is running at 14400Hz, sample rate at 7200Hz.
>
>Is there something I am missing about using PWM to synthesise audio
>frequency tones?
>
>Regards
>Robert

0
Reply ben_nospam_bradley 9/10/2003 11:35:04 PM

"Ben Bradley" <ben_nospam_bradley@mindspring.com> wrote in message
news:3f5fac4d.11198835@newsgroups.bellsouth.net...
> In comp.dsp, robert@suesound.co.za (Robert Gush) wrote:

> >I am using the PWM unit in a PIC18F6720 to generate a number of tones
> >using DDS. All seemed to be well until I hooked up a spectrum
> >analyser. The 2nd harmonic distortion of a 400Hz tone was sitting at
> >about -26dB. At first I thought it was a problem with the single
> >quadrant lookup table and after a lot of testing and making of .WAV
> >files I came to the conclusion that it had to be somthing to do with
> >the PWM process.

(snip)

>    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.

Without actually trying to do the calculation, it does seem like that would
generate second harmonic distortion.   Anything that is non-linear between
+x and -x will generate second harmonics.  That is, not symmetric around
zero.  If it is symmetric around zero you should get only odd harmonics.

The result is an amplitude dependent phase shift, which means that a second
harmonic that would otherwise cancel out, doesn't cancel.

-- glen


0
Reply Glen 9/11/2003 2:58:00 AM

"Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message news:<YwR7b.415582$uu5.74781@sccrnsc04>...
> "Ben Bradley" <ben_nospam_bradley@mindspring.com> wrote in message
> news:3f5fac4d.11198835@newsgroups.bellsouth.net...
> > In comp.dsp, robert@suesound.co.za (Robert Gush) wrote:
>  
> > >I am using the PWM unit in a PIC18F6720 to generate a number of tones
> > >using DDS. All seemed to be well until I hooked up a spectrum
> > >analyser. The 2nd harmonic distortion of a 400Hz tone was sitting at
> > >about -26dB. At first I thought it was a problem with the single
> > >quadrant lookup table and after a lot of testing and making of .WAV
> > >files I came to the conclusion that it had to be somthing to do with
> > >the PWM process.
> 
> (snip)
> 
> >    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.
> 
> Without actually trying to do the calculation, it does seem like that would
> generate second harmonic distortion.   Anything that is non-linear between
> +x and -x will generate second harmonics.  That is, not symmetric around
> zero.  If it is symmetric around zero you should get only odd harmonics.
> 
> The result is an amplitude dependent phase shift, which means that a second
> harmonic that would otherwise cancel out, doesn't cancel.
> 

Thanks Glen & Ben,

I doubled the PRF to 28800Hz, left the sample rate at 7200Hz. The 2nd
harmonic has dropped by 6 dB and is now within spec.
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...

Any thanks for the answer about the phase shift.
Regards
Robert
0
Reply robert 9/11/2003 6:38:39 AM

Oops....
  way
Any thanks for the answer about the phase shift.
   ^

Regards,

Robert
0
Reply robert 9/11/2003 7:48:07 AM

"Robert Gush" <robert@suesound.co.za> wrote in message
news:a0f35ea5.0309102238.1c5a421f@posting.google.com...
> "Glen Herrmannsfeldt" <gah@ugcs.caltech.edu> wrote in message
news:<YwR7b.415582$uu5.74781@sccrnsc04>...
> > "Ben Bradley" <ben_nospam_bradley@mindspring.com> wrote in message
> > news:3f5fac4d.11198835@newsgroups.bellsouth.net...
> > > In comp.dsp, robert@suesound.co.za (Robert Gush) wrote:

(snip)
> > (snip)
> >
> > >    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.
> >
> > Without actually trying to do the calculation, it does seem like that
would
> > generate second harmonic distortion.   Anything that is non-linear
between
> > +x and -x will generate second harmonics.  That is, not symmetric around
> > zero.  If it is symmetric around zero you should get only odd harmonics.
> >
> > The result is an amplitude dependent phase shift, which means that a
second
> > harmonic that would otherwise cancel out, doesn't cancel.
> >
>
> Thanks Glen & Ben,
>
> I doubled the PRF to 28800Hz, left the sample rate at 7200Hz. The 2nd
> harmonic has dropped by 6 dB and is now within spec.
> 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...

If you can double the rate, I would think it wouldn't be too hard to make
symmetric pulses.

If you can't make symmetric pulses, alternating from going high at the
beginning of the interval, and at the end of the interval, should correct
that problem.

Increasing the PRF by a factor of two decreases the phase shift by a factor
of two, or 6dB.

It will, though, I believe increase the second harmonic as the frequency
increases, unless you can make them symmetric in either of the ways
indicated.

-- glen


0
Reply Glen 9/11/2003 6:47:40 PM

Ben Bradley wrote:
> 
  ...
>    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.
  ...

When the modulator output is steady, both methods yield waveforms that
can be distinguished only by a timing reference. It's easy to see that
this amounts to a phase shift. Varying only one edge superposes
amplitude and phase modulations. At small duty-cycle changes -- you call
that modulation index -- they have the same spectra, but the relative
distortion increases as the swing does. Your conjecture is correct.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
Reply Jerry 9/11/2003 7:23:39 PM

ben_nospam_bradley@mindspring.com (Ben Bradley) wrote in message news:<3f5fac4d.11198835@newsgroups.bellsouth.net>...

>    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 (robert@suesound.co.za) 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 (vlv@abvolt.com) 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
0
Reply dvsarwate 9/11/2003 7:27:56 PM

I discovered the even distortion problem many years ago when I was trying 
to generate a sine wave using PWM.

Most PWM circuits in microcontrollers output high followed by low at 
whatever duty cycle is set.

Here is an idea. I haven't tried it and I would be interested in 
comments.

Assume that you have two PWM generators operating at the same frequency. 
Two PWMs are often available in microcontrollers.

Set PWM1 with the DAC value. Set PWM2 with (1 - DAC value). Feed PWM1 & 
PWM2 into a balanced input low pass filter where PWM1 and PWM2 are of 
opposite phase. 

I think this will reduce the distortion.

_______
       ___    	PWM1 --- + Input


___
   _______    	PWM2 --- - Input

-- 
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
0
Reply Al 9/11/2003 9:57:00 PM

"Dilip V. Sarwate" wrote:
> 
  ...
> 
> 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).
> 
  ...

Why does the asymmetric form have less distortion than the symmetric?
How are the separate edges separately timed?

When the analog signal is available and constant frequency isn't needed,
a comparator makes simple PWM modulator. 

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
Reply Jerry 9/11/2003 10:37:54 PM

Jerry Avins <jya@ieee.org> asked in message news:<3F60F942.461DEF84@ieee.org>...
> 
> Why does the asymmetric form have less distortion than the symmetric?

Broadly speaking in the manner espoused by Julius Kusuma, since
the asymmetric form uses two samples per pulse (thus effectively
doubling the sample rate being used), we get better performance.

 \|||/   \\\\|  \|||/   |////  
   |        \     |      /

(Sorry, that's the only ASCII representation I could think of that
vaguely represents a vigorous waving of hands)

> How are the separate edges separately timed?

In natural-sampling PWM (with the analog signal available), the
modulating signal is continuously compared to a double sawtooth
waveform: (I hope everyone is using a monospace font!)

  /\    /\    /\
 /  \  /  \  /  \
/    \/    \/    \

The PWM pulse goes positive when the analog signal crosses the
down-ramp and back to 0 (or negative, depending on implementation)
when the analog signal crosses the up-ramp.  If the input
signal is bandlimited to f_s, then making the pulse repetition
frequency at least pi.f_s ensures that there is a unique crossing
point for each ramp (up or down).  Notice that when the signal is
positive, a broad pulse is created, whereas if the signal is
negative, a narrow pulse is created.

In uniform-sampling PWM, the signal is sampled at the peaks and
troughs of the double sawtooth shown.  The sample value is then
held, and compared with the ramp to determine when to turn the
pulse on or off.  The details are omitted.

> When the analog signal is available and constant frequency isn't needed,
> a comparator makes simple PWM modulator. 

I agree with the sentiment expressed though I am unsure what the
qualification "constant frequency isn't needed" means...

--Dilip Sarwate
0
Reply dvsarwate 9/12/2003 3:00:45 AM

Al Clark <dsp@danvillesignal.com> wrote in message news:<Xns93F3ACC849B7Daclarkdanvillesignal@66.133.130.30>...
> I discovered the even distortion problem many years ago when I was trying 
> to generate a sine wave using PWM.
> 
> Most PWM circuits in microcontrollers output high followed by low at 
> whatever duty cycle is set.
> 
> Here is an idea. I haven't tried it and I would be interested in 
> comments.
> 
> Assume that you have two PWM generators operating at the same frequency. 
> Two PWMs are often available in microcontrollers.
> 
> Set PWM1 with the DAC value. Set PWM2 with (1 - DAC value). Feed PWM1 & 
> PWM2 into a balanced input low pass filter where PWM1 and PWM2 are of 
> opposite phase. 
> 
> I think this will reduce the distortion.

I think you are right Al, A bit of a throwback to the old push-pull
tube days. Unfortunately  I'm using 4 of the 5 PWM outputs, so I don't
have the luxury of being able to put them into PUSH-PULL. What I did
notice when checking to see if it was a supply problem was that when
the one supply was dropped that until asymmetrical clipping occurred
than the 2nd harmonic distortion could be 'nulled' out quite a lot. 
Since it is a 'pure' sine that is being generated it maybe it could be
fixed by changing the amplitude of HALF of the generated wave by an
amount that is dependant on the peak amplitude and the frequency.

Regards

Robert
0
Reply robert 9/12/2003 5:29:02 AM

Dilip,

Thanks for the descriptions.

"Dilip V. Sarwate" wrote:
> 
> Jerry Avins <jya@ieee.org> asked in message news:<3F60F942.461DEF84@ieee.org>...
> >
> > Why does the asymmetric form have less distortion than the symmetric?
> 
> Broadly speaking in the manner espoused by Julius Kusuma, since
> the asymmetric form uses two samples per pulse (thus effectively
> doubling the sample rate being used), we get better performance.
> 
>  \|||/   \\\\|  \|||/   |////
>    |        \     |      /

That's not fair! Doubling the sample rate will always make it better.
How does asymmetric PWM compare to symmetric PWM when the sample rates
are the same?

> (Sorry, that's the only ASCII representation I could think of that
> vaguely represents a vigorous waving of hands)
> 
> > How are the separate edges separately timed?
> 
> In natural-sampling PWM (with the analog signal available), the
> modulating signal is continuously compared to a double sawtooth
> waveform: (I hope everyone is using a monospace font!)
> 
>   /\    /\    /\
>  /  \  /  \  /  \
> /    \/    \/    \
> 
> The PWM pulse goes positive when the analog signal crosses the
> down-ramp and back to 0 (or negative, depending on implementation)
> when the analog signal crosses the up-ramp.  If the input
> signal is bandlimited to f_s, then making the pulse repetition
> frequency at least pi.f_s ensures that there is a unique crossing
> point for each ramp (up or down).  Notice that when the signal is
> positive, a broad pulse is created, whereas if the signal is
> negative, a narrow pulse is created.

Neat! But do you mean that natural PWM is the same as asymmetric PWM?

> In uniform-sampling PWM, the signal is sampled at the peaks and
> troughs of the double sawtooth shown.  The sample value is then
> held, and compared with the ramp to determine when to turn the
> pulse on or off.  The details are omitted.
> 
> > When the analog signal is available and constant frequency isn't needed,
> > a comparator makes simple PWM modulator.
> 
> I agree with the sentiment expressed though I am unsure what the
> qualification "constant frequency isn't needed" means...

With most PWM schemes, the periods for all constant outputs (DC levels)
are the same; only the duty cycle varies. With my simple scheme, the
period becomes very long at MAX and MIN levels, although the variation
is moderate over most of the range. I'll try ASCII art:

         +��������+
         R    |\  |
 gnd���C�+����|-\_|______PWM
input����1K�+�|+/  | 
            | |/   |
            |��1M��| 

The 1K/1Meg positive feedback provides hysteresis and speeds the output
transitions. Negative feedback ensures that the output and input have
the same average value. The output duty cycle adjusts itself to make
this happen. The RC integrator allows the output to oscillate while the
input remains steady or varies slowly. With true integration -- an op
amp, say -- rather than the RC exponential, I think this is natural PWM.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
Reply Jerry 9/12/2003 2:22:27 PM

Jerry Avins <jya@ieee.org> complained in message
news:<3F61D6A2.3A037B99@ieee.org>...

.......

> > the asymmetric form uses two samples per pulse (thus effectively
> > doubling the sample rate being used), we get better performance.


> That's not fair! Doubling the sample rate will always make it better.
> How does asymmetric PWM compare to symmetric PWM when the sample rates
> are the same?

Well, if the sample rates are the same, then the pulse repetition
frequency in asymmetric PWM is half the pulse repetition frequency
in symmetric PWM, so it's unfair the other way  :-) but the
comparison still favors asymmetric PWM.

A UNIFORM-sampling double-edge symmetric PWM modulator with
pulse period T will give output (after low-pass filtering) of
approximately

x(t-T/2) +
[(T^2)/32].times.[second derivative of x(t-T/2) + {x(t-T/2)}^2]

where the term on the second line is the dominant term in
the distortion and is primarily second harmonic distortion
arising from the x^2 term..  Note that we are using one sample
every T seconds.

A UNIFORM-sampling double-edge asymmetric PWM modulator with
the same sample rate has pulse period 2T and its output after low
pass filtering is approximately

x(t-T/2)
+ [(T^2)/24].times.[second derivative of {x(t-T/2)}^3].

Although the coefficient of the distortion term is larger,
the value of second derivative is smaller.  Furthermore,
there is no second harmonic distortion (in fact, no distortion
due to the even harmonics).

For NATURAL-sampling double-edge asymmetric PWM modulators,
there is *no* distortion in the low-pass output except what
leaks in from the sidebands of the phase modulation of the
carrier.


> Neat! But do you mean that natural PWM is the same as asymmetric PWM?

It is also possible to modulate only one edge of the pulse by
using a carrier such as

 |   /|   /|
 |  / |  / |
 | /  | /  |
 |/   |/   |/

with the pulse turning on at the beginning of the carrier ramp
and turning off when the analog input signal crosses the ramp.
The resulting signal is called trailing-edge natural-sampling PWM
because only the trailing edge of the pulse is being modulated
and the position of the trailing edge is given not by the value
of x(t) at the beginning of the ramp but when x(t) equals the ramp.

--Dilip Sarwate
0
Reply dvsarwate 9/12/2003 9:36:50 PM

"Dilip V. Sarwate" wrote:
> 
> Jerry Avins <jya@ieee.org> complained in message
> news:<3F61D6A2.3A037B99@ieee.org>...
> 
> ......
> 
> > > the asymmetric form uses two samples per pulse (thus effectively
> > > doubling the sample rate being used), we get better performance.
> 
> > That's not fair! Doubling the sample rate will always make it better.
> > How does asymmetric PWM compare to symmetric PWM when the sample rates
> > are the same?
> 
> Well, if the sample rates are the same, then the pulse repetition
> frequency in asymmetric PWM is half the pulse repetition frequency
> in symmetric PWM, so it's unfair the other way  :-) but the
> comparison still favors asymmetric PWM.

I need to think about that some more. When both edges are determined by
samples, there is one pulse for every two samples. When only one is, the
pulse rate doubles for the same sample rate.
> 
> A UNIFORM-sampling double-edge symmetric PWM modulator with
> pulse period T will give output (after low-pass filtering) of
> approximately
> 
> x(t-T/2) +
> [(T^2)/32].times.[second derivative of x(t-T/2) + {x(t-T/2)}^2]
> 
> where the term on the second line is the dominant term in
> the distortion and is primarily second harmonic distortion
> arising from the x^2 term..  Note that we are using one sample
> every T seconds.
> 
> A UNIFORM-sampling double-edge asymmetric PWM modulator with
> the same sample rate has pulse period 2T and its output after low
> pass filtering is approximately
> 
> x(t-T/2)
> + [(T^2)/24].times.[second derivative of {x(t-T/2)}^3].
> 
> Although the coefficient of the distortion term is larger,
> the value of second derivative is smaller.  Furthermore,
> there is no second harmonic distortion (in fact, no distortion
> due to the even harmonics).
> 
> For NATURAL-sampling double-edge asymmetric PWM modulators,
> there is *no* distortion in the low-pass output except what
> leaks in from the sidebands of the phase modulation of the
> carrier.
> 
> > Neat! But do you mean that natural PWM is the same as asymmetric PWM?
> 
> It is also possible to modulate only one edge of the pulse by
> using a carrier such as
> 
>  |   /|   /|
>  |  / |  / |
>  | /  | /  |
>  |/   |/   |/
> 
> with the pulse turning on at the beginning of the carrier ramp
> and turning off when the analog input signal crosses the ramp.
> The resulting signal is called trailing-edge natural-sampling PWM
> because only the trailing edge of the pulse is being modulated
> and the position of the trailing edge is given not by the value
> of x(t) at the beginning of the ramp but when x(t) equals the ramp.
> 
> --Dilip Sarwate

Thanks! I not only learned a lot od what, but also a good deal of
implicit why.

Jerry
-- 
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
0
Reply Jerry 9/13/2003 8:55:07 PM

16 Replies
235 Views

(page loaded in 0.337 seconds)

Similiar Articles:










7/26/2012 11:41:24 PM


Reply: