[sdiy] Re: linear FM

Magnus Danielson cfmd at swipnet.se
Thu Feb 6 06:09:23 CET 2003


From: "jhaible" <jhaible at debitel.net>
Subject: Re: [sdiy] Re: linear FM
Date: Thu, 6 Feb 2003 03:01:55 +0100

Dear Jürgen et. al.

> > On Wednesday 05 February 2003 22:03, Ian Fritz wrote:
> > > The variable being integrated is current.  An electronic device
> > > cannot integrate a frequency.  This is nonsense.
> >
> > You and I are talking about different things it appears, so
> > interpreting what I'm saying indeed does not make sense interpreted in
> > your context.
> >
> > I am talking about integrating frequency and I mean it. I'm perfectly
> > aware that the frequency variable will be represented by a current and
> > the integration product a voltage when I try to implement that as an
> > analog system like the one you are talking about. That voltage variable
> > (representing phase) maps to another voltage variable which represents
> > the momentaneous amplitude of the oscillator.
> 
> My reaction to your mail was the same as Ian's: in a capacitor it's current
> that's integrated over time to get a voltage, and nothing else.
> But there is certainly more, because we surely can look at a VCO from
> a different perspective (in PLL analysis it's common to describe the VCO
> as an integrating phase-in / frequency-out building block), and generally
> you can map any physical unit to an electrical analogy, if you do it
> in a consistent way.

Well, Achim and I are basically saying the same thing but disagreeing on how
certain minor details should be expressed (actually, I think the discussion is
bound in a light confusion, I actually think we agree totally, but I've not
had the energy to read back long enought in the thread and answer to all the
replies... this fever I've got is anoying!).

But if we look at how things actually is defined, we find that the total phase
is what drives oscillators, the first derivate is the frequency and the
second derivate is the drift rate. From that it is naturaly to view any form of
phase accumulator (which state is the phase - these are killers when done
digitally and naturally I've done the exercise) which effectively is
integrators of the applied frequency control (often offset by some constant).
A sawtooth oscillator is nothing but an integrator, with the 2pi wrapping
being performed by extra hardware and with a waveform and frequency distorsion.
The triangle is a two-state integrator where each of the state integrates its
section of the 2pi, nominally they integrate half part (pi).

> And given a certain ambiguity of triangle oscillator states (unlike a
> saw oscillator, a triangle oscillator has no clear mapping of a voltage
> to a phase),

It does. I recommend you to look into a Buchla 259 oscillator and see how the
triangle and squarewave is converted into sawtooth, which approximates the
phase (which Achim correctly pointed out and I've allways thought... as an
analogy only that is, since it's not exactly the phase - infinitivly steep
fall-times ain't possible to implement, 7 ps is just an approximation still and
in audio electronics that would be smoothed out very quickly anyway).
I've come to realize that a triangle core is probably supperiour to a sawtooth
if handled correctly. The sawtooth one is however very easy to understand
(well, should be ;O).

My point was that you need to view both the voltage of the cap and the state of
the schmitt-trigger to get the full phase.

> I think your proposal of actually _defining_ such a clear
> mapping, at the expense of working with negative frequency, is
> really interesting!

You can map the state (tri + square) into phase. What is so interesting is that
the change of state changes direction in negative frequency, but that's about
it actually, it comes naturally with a negative slope instead of a positive
slope.

> It's just that I don't know if it's consistent, for the reason I tried to
> describe in my previous mail. So I will try it here again, referring
> to your example:
> 
> >A triangle oscillator can be viewed as a system that is based on
> >integrating the frequency input to phase and then mapping the phase to
> >amplitude in a linear-modulo-2pi fashion. Hence if you reverse the
> >current flow, you reverse the sign of the variable being integrated,
> >which is frequency.
> 
> My point is that the same could be said for a sine oscillator, implemented
> as an oscillating filter (no comparators and no switching at all!):
> The current in one (or more) capacitor(s) reverses direction (just not
> resulting in constant ramps as the triangle oscillator), but no one would
> think of calling this "reversing the frequency". So where is the difference?

Running the oscillators "backward in time" is equalent to running them at a
negative frequency. Why? Since the frequency and time scalars multiply, and the
negative slope of the phase that we are after must come from either of the f
and t, but only one of them due to the multiplication.

As Achim pointed out this is why you need a full 4-quadrant multiplication,
since both the state (square-wave) and the linear frequency require to change
the direction of the slope. If you where to have done a sawtooth oscillator
to do negative frequency modulations (I've toyed with the idea) you would
effectively have converted the oscillator core into a triangle core, since you
need the reset-curcuit to operate both ways.

Now, to tie the knot neatly between a sawtooth in a triangle core, do you know
how the Pearl Syncussion gets sawtooth out of it's triangle oscillator core?
By using two resistors and one transistor it drives the CV-input (V/Oct) with
the schmitt-trigger output (which usually is a squarewave, but will become a
short pulse) and thus rush the discharge of the integrator capacitor. VERY
minimalistic and full of insight in what is actually happening! Naturally, the
frequency is near doubled (and only near doubled, the reset time is there to
haunt us still).

So, would changing the signs of a sine/cosine core be equalent to running it
backwards in time/at negative frequency?
Yes.

What makes that happend? Well, a sine/cosine core was never modeled to have its
state even near the phase, it uses the properties of sine and cosine slope
derivation or integration (which ends up a game of alternating sine, cosine
and sign). Never the less will the same rules apply, but only due to the
relationships between the phase and the slopes of sine and cosine.

In order to make the best possible sine/cosine pair I think a straight
sine/cosine core is probably the way to go instead of the triangle core.
If one spend sufficient time to make a good amplitude limiter wich does not
introduce any major harmonic distorsion (i.e. by using propper AGC methods
rather than relying on clipping) I think it can be done. One trick to use in
the AGC is actually to let it's time constant also be under CV control.

> >> And, if we use our oscillator waveform - triangle, saw etc. - as an
> >> input for a sine shaper, would it matter at all? (I don't think so).)
> >
> >Working out what the spectrum is after applying an arbitrary waveshaper
> >to an arbitrary waveform is an entirely different matter, even though
> >it's highly interesting
> 
> Let's try to look at this from a different perspective. I think the first,
> initial
> definition of an angle is that of a fraction of a circle. The origin of
> phase
> is in an angle, and the origin of frequency is the spinning wheel. This
> can be represented by e**jPhi = e**jwt.

rather:

 jPhi    j(omega*t+phi(t)+Phi0)
e     = e

Note that Phi0 is the initial phase of the oscillator. For PLL and timekeeping
work this is seriously important for the modelling. The art of timekeeping is
the art of not only transfering the frequency, but also comparing and adjusting
the phase. Equipment able to derive the ticks of the Ceasium beams in
Washington DC to within +/-60 ns is cheap to come by and used throughout
telecom networks these days.

> The sine and cosine are just
> projections of this, or mathematically the imaginary and real part.
> So a sine wave is really closest to this original concept, even if
> it's applicable to complex waveforms like a triangle (and thanks again
> for clarifying this).
> Therefore, in your phasor representation, you always have this e**jwt
> in the origin, even if you add the representations for the harmonics at
> the tip of this fundamental phasor. (I hope I get the words right - you
> certainly get the idea.)
> 
> Now I would not describe a triangle wave with a fundamental phasor
> that permanently changes direction; I would describe it with a rotating
> fundamental and some rotating additions added-on, just as you
> explained.
> 
> Which doesn't mean this must be the only way to describe a triangle
> wave.
> Are you proposing a description with a non-rotating (but oscillating
> between two end positions) fundamental phasor, and a more complex
> add-on on top of it, which would result in the same overall behaviour
> as the usual description? Somehow you must make your mapping
> of current and phase, voltage and frequency, consistent to the
> phasor description ...

One of the things that I have tried to underline is that you must separate the
waveform function from that of the total phase of the system. However we
realize an oscillator we have with all it's deficiencies allways the full phase
state in the oscillator, we must have or else it would not be able to operate
predictably as an oscillator. From the phase state information we can allways
derive the wrapped phase and naturally (by definition actually) reversably.
When we run the oscillator in reverse, our phasor turn the other way and thus
will the waveform occur backwards in "time" (actually, the waveform had a
certain time direction assumed, if you time-reverse the waveform you would view
this as running it in positive frequency).

This is a highly confusing thread if you do not follow it properly...

Cheers,
Magnus



More information about the Synth-diy mailing list