Electronics > Projects, Designs, and Technical Stuff

Low Distortion Audio Oscillator Stabilized Via Trigonometric Identity

(1/3) > >>

ccktek:
If the sine and cosine outputs of a quadrature sinusoidal oscillator are squared and summed, the result is a D.C. voltage whose amplitude is proportional to the amplitude of the outputs and independent of frequency:

     V = Asin2(ωt) + Acos2(ωt)      where A is the amplitude of the two outputs;
     V = A(sin2(ωt) + cos2(ωt))
     V = A                                       due to the trig identity sin2(θ) + cos2(θ) = 1.

This voltage in conjunction with a voltage controlled amplifier, FET, or CdS opto-isolator in a servo-system feedback loop can be used to control and stabilize the oscillator’s output amplitude.  In contrast with the control voltage from the more usual rectifier/filter, this voltage is free of ripple and responds nearly instantly to changes in oscillator output level.

The approach is certainly not new, but it does not appear often in the usual sources of technical information.  I wanted to test the concept in the design of a variable frequency audio generator having low distortion, constant amplitude with tuning, and negligible amplitude bounce and settling time with perturbations such as changes in frequency.  The result is total harmonic distortion at or below .00035% at all frequencies (more on this later), amplitude constant within a db or so, and amplitude settling time with range switching less than 2 seconds in the 20-200Hz range and negligible in the 200-2KHz and 2K-20KHz ranges.

For the quadrature oscillator I chose a two-integrator “cookbook” circuit.  The squaring is done by AD534 precision multipliers.  Squaring accuracy is good but not perfect, so the output of the summed squares is filtered with a 47K resistor and 4.7uf capacitor with minimal effect on settling time.  For the control device I chose the SSM2018 voltage controlled amplifier.  FETs and CdS opto-isolators have nonlinear resistance; from empirical experience I was concerned that they might be tricky to get working reliably in a variable frequency setting in which their operating levels might vary considerably. 

In operation the gain of the oscillator’s main feedback loop is set slightly below the point of oscillation.  The SSM2018 is not part of this loop but rather is in a separate loop outside the main one.  This second loop adds a small amount of positive feedback to sustain oscillation.  The gain of the second loop is controlled by the SSM2018 and the summed outputs of the AD534s to maintain constant amplitude of oscillation.

The SSM2018 is not free of distortion, but at least its distortion is reasonably low (about .01%), predictable, and does not vary drastically with expected changes in level.  Only a small fraction of the 2018’s output is injected into the oscillator, so its effect on oscillator distortion is limited.  This component is obsolete but still available; I happened to have several on hand.

I obtained lowest distortion with OPA1642A op amps for the oscillator, although others featuring very low distortion specifications were nearly as good.  Resistors are all metal film.  Capacitors are polystyrene foil or equivalent in quality.  R1 and R2 are conductive plastic types. The two 910-ohm resistors and the frequency-determining capacitors are matched between the two integrators to within 0.1%, possibly an overkill but not too difficult to  accomplish; I wanted precise amplitude equivalence and quadrature between the two outputs.

The most expensive component is the dual gang tuning potentiometer.  I used a Bourns precision 10-turn wire-wound pot and expected some detrimental effect on distortion compared with single-frequency fixed resistance designs.

The I.C.s are mounted in sockets, apparently with no adverse effects, but contacts may deteriorate with time, so soldering would be preferred.  The range switch has silver plated contacts and a steatite wafer, good but not ideal; alternatives are limited.

C1 is chosen empirically for flattest amplitude with changing frequency in the high end of the 2KHz-20KHz range.  Its value depends on circuit layout and individual op amps; for some combinations it may not be necessary.

To set up the oscillator I adjust R1 and R3 for about 1.4V RMS output and about 100mv control voltage at pin 11 of the 2018 with a goal of lowest possible distortion along with constant amplitude with frequency.  These adjustments interact, and the control voltage varies with frequency.  R4 is adjusted for minimum ripple at its wiper.  R5 is adjusted for minimum 2nd harmonic in the output.    Settings are most critical in the highest frequency range, so I do them at 10KHz and let the other ranges go along for the ride without further attention.     

I measured distortion at fixed frequencies: 100Hz, 230Hz, 1KHz, and 10KHz.  In the 20-200Hz and 200-2KHz ranges THD is 1ppm to 2.5ppm, i.e. .0001% to .00025%.  The adjustable gain output amplifier adds some distortion at the highest frequencies.  For this reason there are two outputs, one adjustable, the other direct.  Distortion at 10KHz is 3ppm into a 600-ohm load and 1.5ppm into a 3K load from the direct output; 10KHz distortion from the adjustable output amplifier is about 3.5ppm with either load and is essentially independent of output level setting.  These distortion figures reflect only total harmonic distortion, not THD+noise. 

The digital frequency display is a kit originally designed by DL4YHF and widely available (search DIY Frequency Tester 1Hz-50MHz Crystal Counter Meter).  The kit has an added one-transistor oscillator for testing crystals, useless in the current application.  EI9GQ describes removing the oscillator and using the transistor and freed-up board space for a pre-amp suitable for HF ham radio use.  TheHWcave modifies this modification (), and I modify that modification for appropriate input impedance and gain at audio frequencies for use in my generator.

ejeffrey:

--- Quote from: ccktek on October 08, 2019, 04:14:55 pm ---If the sine and cosine outputs of a quadrature sinusoidal oscillator are squared and summed, the result is a D.C. voltage whose amplitude is proportional to the amplitude of the outputs and independent of frequency:

     V = Asin2(ωt) + Acos2(ωt)      where A is the amplitude of the two outputs;
     V = A(sin2(ωt) + cos2(ωt))
     V = A                                       due to the trig identity sin2(θ) + cos2(θ) = 1.

This voltage in conjunction with a voltage controlled amplifier, FET, or CdS opto-isolator in a servo-system feedback loop can be used to control and stabilize the oscillator’s output amplitude.  In contrast with the control voltage from the more usual rectifier/filter, this voltage is free of ripple and responds nearly instantly to changes in oscillator output level.

--- End quote ---

This is only true if the amplitude of the quadrature signals is accurately identical or at least tracking much better than the overall amplitude.  You are basically relying on the amplitude of the cos() term while the sin() is zero crossing and vice versa but if those components are poorly correlated that information will be wrong.  If this turns out to be a problem one trick would be to buffer and filter the squared quadrature signals separately and compare them to slowly servo the relative gain of the two quadratures.

TimFox:
The trig identity should work to stabilize a quadrature oscillator, but I am not aware of any commercial application.  The quadrature generators that I own use the zero crossing of one channel to operate a sample-hold to sample the peak voltage of the other channel to derive a gain-control signal.

T3sl4co1l:

--- Quote from: ejeffrey on October 08, 2019, 04:55:34 pm ---This is only true if the amplitude of the quadrature signals is accurately identical or at least tracking much better than the overall amplitude.  You are basically relying on the amplitude of the cos() term while the sin() is zero crossing and vice versa but if those components are poorly correlated that information will be wrong.  If this turns out to be a problem one trick would be to buffer and filter the squared quadrature signals separately and compare them to slowly servo the relative gain of the two quadratures.

--- End quote ---

More specifically, for an integrator,
Vin = A cos(ωt)
Vo = A/ω sin(ωt) + C

So you need to divide by frequency, if you wish to use the same mechanism in a VFO.  (In a double integrator VFO, you vary both integrator gains proportionally.)

A real circuit also has nonzero input offset, and I suppose we can throw finite gain into the mix as well (though that doesn't have much impact here).

Another (better?) way to look at it, is what it is: a differential equation.  In that case we have
x'' + A x' + B x = 0
or equals nonzero if it's a driven or injection-locked* oscillator, as the case may be.

The solution of this equation gives B as the frequency-determining term, and A as the loss or gain, as the case may be.  We might implement this as two integrators cascaded, with the second output fed back to the first (inverted as needed), and with a variable (+/-) feedback from the first (i.e., local negative/positive feedback) to control amplitude.

*The homogeneous solutions of a linear ODE are linearly independent of the driving term in an inhomogeneous equation; this shows that injection only causes locking in a nonlinear system.  Which is what all real stable oscillators are; it's more a matter of whether we realize it, or choose to model it that way, or not. :)



--- Quote from: TimFox on October 08, 2019, 09:03:45 pm ---The trig identity should work to stabilize a quadrature oscillator, but I am not aware of any commercial application.  The quadrature generators that I own use the zero crossing of one channel to operate a sample-hold to sample the peak voltage of the other channel to derive a gain-control signal.

--- End quote ---

I think some DDS or trig algorithms do this -- namely, a CORDIC where complex multiplication is used to represent angles.  In short, the a + bi registers numerically represent the integrator outputs.

Rounding errors will cause the magnitude to diverge over time.  A normalization step fixes this.  The normalization doesn't need to be perfect; if a lesser amount is used (a ratio closer to 1 than 1/|z| is), the error can be kept low.  This allows many optimizations to be made, as calculating 1/|z| exactly is relatively difficult.

Tim

ccktek:
This is only true if the amplitude of the quadrature signals is accurately identical or at least tracking much better than the overall amplitude.

Indeed.  That's why "I wanted precise amplitude equivalence and quadrature between the two outputs" as stated about half way down the text.

You are basically relying on the amplitude of the cos() term while the sin() is zero crossing and vice versa but if those components are poorly correlated that information will be wrong.

The identity says that the summed squares voltage is constant regardless of the arguments of the sin and cos functions as long as these arguments are the same and the amplitudes are equal.  This is true even if the frequency is arbitrarily low, right down to DC, at any point in the waveforms, not just at zero crossings.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod