[sdiy] VCO reset time
Magnus Danielson
cfmd at bredband.net
Sun Jun 6 18:55:06 CEST 2004
From: Don Tillman <don at till.com>
Subject: Re: [sdiy] VCO reset time
Date: 06 Jun 2004 09:25:42 -0700
Message-ID: <m2y8n07iwp.fsf at till.com>
Hi Don,
> > From: "JH." <jhaible at debitel.net>
> > Date: Sun, 6 Jun 2004 14:14:12 +0200
> >
> > I only was partially surprised, because tri based PWM still
> > _sounds_ like having some angle modulation components; it's just
> > surprising when you look at the modulated waveform and see that
> > its symmetry is is never changed. I would have to dig this up,
> > but I'm sure Magnus you are faster developing the formula
> > yourself than me finding the old calculations. If memory serves,
> > the fundamental of a tri based pwm has no angle modulation
> > component, but the higher harmonics still do.
>
> Email posts are not the best medium for this, so we'll just have to
> pretend we're all sitting around a table with a large pad of paper, a
> few pens, and a pitcher of "Fat Tire Amber Ale".
I didn't have the friends and a pitcher of Ale around, but I did have a pad of
paper, a few pens, a formula book and the lovely summery nature around the
table.
Let's do the friends and pitcher around a table at some later date, OK? ;O)
> The topic is PWM from a triangle vs. PWM from a sawtooth.
Indeed.
> Magnus just reached over and pulled out the equations for triangle-
> based PWM, and, strangely enough, the fundamental and all the
> harmonics are all in phase.
I actually took half-a-page to just reherse myself and then one page of
derivations to find the Fourier series for both forms. They are:
Tri-based:
2*h
a = ---- sin(n*Pi*alpha)
n n*Pi
b = 0
n
Saw-based:
2*h
a = ---- sin(n*Pi*alpha)*cos(-n*Pi + n*Pi*alpha)
n n*Pi
2*h
b = ---- sin(n*Pi*alpha)*sin(-n*Pi + n*Pi*alpha)
n n*Pi
Notice how these represent the same energy, but that the saw based have the
additional cos and sin terms due to the phase-modulation due to changing alpha.
Also, I would actually like to object to the "strangely enought" comment. It's
not as strange since when you look at this waveform it is symmetric around t=0
and thus is an even function. It comes as no major supprise that the overtones
are also even.
> Triangle-based PWM sounds great. It's like the harmonics are all
> phasing around. Yet remarkably, the phases of the harmonics are not
> actually changing.
Indeed.
> What's happening is a comb filter effect. At this point I take the
> pad of paper and draw out the harmonic spectrum of a pulse stream, and
> it shows that the strength of the harmonics take the overall shape of
> a decaying full-wave-rectified sine wave. [scribble-scribble...]
Exactly.
> As the pulse width narrows, the FWR sine shape spreads out. And for
> the theoretical case of an infinitely narrow pulse, the spectrum is
> flat and the harmonics all have the same level. [scribble...]
Exactly.
> As the width of the pulses increase, going toward a square wave, the
> FWR sine shape compresses. And for the case of a symmetrical square
> wave there's a null for each of the even harmonics and we get the
> classic all odd harmonics sound. [scribble...]
>
> It's the moving shape of the spectrum that we hear as the
> triangle-based PMW sound.
Indeed. This is just what the formulas actually say. Look at the sin term,
this is having exactly this effect. You can view the PWM-ration alpha in the
above formulas as being the relative comb-filter frequency.
sin(n*Pi*alpha) will have a first null at 180 degrees, that is n*Pi*alpha = Pi
thus giving n * alpha = 1 => n = 1/alpha. Thus, the higher alpha the lower n
for the first null.
Don't say Fourier-series is booring, it can be very exciting when in hands of
creative people - been more creative! ;O)
> Now...
>
> Triangle-based PWM and sawtooth-based PWM are essentially the same
> thing. The difference is that with sawtooth-based PWM, everything is
> moving back and forth in time with the modulating signal compared to
> the triangle version. So the phase of the fundamental is changing,
> and the phase of each harmonic is changing by multiples of that.
Right.
> For an audio VCO, triangle-based PWM is more "correct". The duty
> cycle of the waveform is changing and nothing else. An audio VCO with
> sawtooth-based PWM has all these other phases and timings changing;
> that may sound better for some applications, and it makes a great
> optional feature, but it's not what was asked for.
Indeed.
Now this makes it relevant to ask the question on how you acheive the variable
amount of such phase-modulation. One way is naturally to use it in combination
with my little sawtooth phase modulator. You could use that one in combination
with a PWM curcuit to do a tri-based PWM equalent, but then on top of that
provide the modulation. There is naturally a more direct fashion to acheive it.
> For an LFO, folks care less about phase, it's more about where the
> waveform starts. So for an LFO it may be more reasonable to have
> falling-sawtooth-based PWM because the effective start of the
> waveform, the rising point, stays in place as the modulating
> voltage changes.
Again, it all depends on the application.
Cheers,
Magnus
More information about the Synth-diy
mailing list