Low-distortion Audio-range Oscillator

Hi Davada,

ARTA's dual-channel FR mode (driving an EMU0202/0204) is indeed one of my favourite tools, and I've been using it to test my home-made notches for quite a long time. The problem with this direct method is that even at its best resolution (which is 44.1kHz SR, 131072 acquisition length - about 0.3Hz), I did never manage to get the actual depth of a high-rejection notch, the only way to reliably do this being fixing input frequency and then fine-tuning the notch itself. The -3db bandwitdth of a >60db Q bandpass filter is about 1Hz or less @ 1kHz, so I never even tried this method for determining the running Q of a generator- with barely 3 experimental points in range of interest you're likely going to underestimate the actual output level at the fundamental...; nevertheless it's an estimate I'm interested in, so I've decided to give this method a try - it actually seems to work fine: I've got a Q value around 63dB @ 1kHz, 20Vpp out, quite load independent up to 1.5kohm load, which seems actually in very good agreement with my previous - indirect - estimates.

As far as the ARTA's frequency compensation feature, I did have the same idea :), and made a few tests a few months ago or so, either with ARTA itself, or importing data in MATLAB and letting it do all the math. This method actually works pretty well, failing only to provide accurate results in the vicinity of the frequency the notch is tuned to, but it doesn't seem to be a real issue since we are mainly interested in the level of the harmonics. One major advantage of this technique is that you can drive a simple passive twin-t notch at a pretty high level to extend the dynamic range of your spectrum analyzer (ie your soundcard) and let ARTA (or Matlab) do the boring task of automatically compensate for its far-from-flat response - a 20Vpp-0.0001% THD sine has harmonics in the -100dBv range, something an EMU0204 will catch smoothly.

If you don't want to play with active notches and the issues related to achieve high selectivity and good flatness and high acceptance and low THD and low noise and ..., well, this could be a nice alternative.

Ciao,

L.
 
It looks very nice nevertheless - is it your APF generator with a T&H/S&H peak detector? Can you tell us some more about its architecture?

Ciao,

L.
Hello Ciao,
Thanks for the complements. Yes it is based on an APF (All Pass Filter) generator with an (S&H) Sample and Hold controlling a multiplier.
I'm still playing with the circuit. I will attach the schematic and board layout when I can work out a way of attaching a KiCAD schematic.

I have just bought 'The Design Of Active Crossovers' by Douglas Self which includes some interesting measurement results on the LME49990 which shows that the distortion in the voltage-follower mode (gain, Av = 1) with 2 kohm source impedance is poor beyond about 10 kHz. I have used the LME49990 based on the data sheet claims and need to investigate further.

It's never going to be as low distortion as a fixed frequency Oscillator.

Hello David,
Thanks for the suggestion to look at the Linear Technology rms to DC converters. I think that the choice between the Analog Devices parts and the LT parts isn't clear. If I get around to designing a new Notch Filter board I will look closely at the compromises between the two types.
 
Hello Ciao,
Thanks for the complements. Yes it is based on an APF (All Pass Filter) generator with an (S&H) Sample and Hold controlling a multiplier.
I'm still playing with the circuit. I will attach the schematic and board layout when I can work out a way of attaching a KiCAD schematic.

I have just bought 'The Design Of Active Crossovers' by Douglas Self which includes some interesting measurement results on the LME49990 which shows that the distortion in the voltage-follower mode (gain, Av = 1) with 2 kohm source impedance is poor beyond about 10 kHz. I have used the LME49990 based on the data sheet claims and need to investigate further.

It's never going to be as low distortion as a fixed frequency Oscillator.

Hello David,
Thanks for the suggestion to look at the Linear Technology rms to DC converters. I think that the choice between the Analog Devices parts and the LT parts isn't clear. If I get around to designing a new Notch Filter board I will look closely at the compromises between the two types.

I thought you were complaining about your RMS detector.

David.
 
Sonic, I'd go for a SVF topology; if you want to try something as simple as a Wien Bridge but with far better out-of-the-box performances you can go for a HP239A clone - even in its original form (2 opamps in the Bridged-t generator plus an output buffer) it is capable of quite amazing THD figures. At present I'm playing with a slightly more complex experimental version of it employing a full-wave peak detector and OPA2134 in place of the orginal Harris opamp, and it's impressive to see how well it works.

L.
 
Yeah :D Sonic is right - didn't notice that PChi was referring to me as 'Ciao'.

L.
Hello Coluke,
Thanks for pointing out my error and please forgive my ignorance. I admire anyone who has learnt a another language because I have tried in the past and failed.

You are right David I was complaining about the RMS detector.
I listed the rms to DC converter that I used because that influences the measurement bandwidth and so effects the thd result.
Just for information for other readers the AD536A bandwith for 1 % error is specified as 120 kHz with an input signal of 1 V rms. It drops to 45 kHz with 100 mV. The LTC1968 has superior bandwith especially at lower signal levels but being digital goes a bit funny at low signal levels.

I chose the All Pass Filter Phase Shift circuit becaue the gain doesn't change much with frequency adjustment when using an un-matched dual gang potentiometer. Less that 1 % with a bit of tweeking from 10 Hz to 100 kHz. Also there is an almost 90 degree phase shifted (depending on component match) signal to drive a zero crossing comparator to control a Sample and Hold. Giving a low ripple control voltage.

I think that the issue with a Wien bridge is that the gain does vary with frequency because of component mis-match which the variable gain element has to compensate for. The Linear Technology AN43 circuit uses an LDR. In my experience the Silonex LDR based Optocouplers aren't very linear, others may be better. As the frequency is varied the Distortion trim needs to be adjusted to cope with the mismatch of R1 and R2 which isn't practical. It's also difficult to stabilise the amplitude control loop with the filtering causing problems. If the frequency is fixed then the circuit or the later configuration AN132 is good.

I think that the State Variable Filter topology is good for fixed frequency but I think that gain varies with oscillation frequency due to dual gang potentiometer mis-match so I believe that it's dificult to come up with a low distortion variable frequency version.

I guess that all this proves that it's suprisingly difficult to make a variable frequency low distortion oscillator.

Regards Paul
 
Hello Coluke,
Thanks for pointing out my error and please forgive my ignorance. I admire anyone who has learnt a another language because I have tried in the past and failed.

Hi Pchi, no problem - didn't even notice it until Sonic's message :)

What about sidebands and noise performances of your generator? Level flatness and output THD tell us only half of the story. When I tried to build a low THD/THD+N APG generator I found especially difficult to keep THD+N low, even with a way better ALC loop than the one implemented in the generator this thread was started about. An APF ring can attain a very high Q (even higher than the respectable >60dB a SVF ring can operate at), but if I remember well operating Q is strongly dependent from the inverter gain, and in a completely non-linear way, so designing an ALC loop that fulfills all the requirements (high gain, fast response, high ripple rejection) can be very difficult. I abandoned the project, but maybe I was completely wrong (or my experience was too little at that time) and a very high performances APF generator is indeed feasible, although as far as I know this topology was never used in state-of-the-art low THD generators (AP, Tek, HP, Boonton, KH either use SVFs or Bridged-Ts).

The same holds for continous coverage via a dual-gang pot: after the very first tests I decided to get rid of pots - they are quite noisy, and you must pay a lot (way too much, imho) for a precision unit with reasonably matched elements, so I will definitely go for a discrete tuning mechanism - maybe something a-la HP239: two significant figures and a vernier control; or an even simpler selector of spot frequencies arranged in a 1-2-5 sequence - CW operation is something I don't really need.

IMHO doing a very low * THD * variable frequency generator is not that difficult, the real issue being to keep very low * THD+N * too.

Ciao,

L.
 
Last edited:
In my experience the Silonex LDR based Optocouplers aren't very linear, others may be better.

Paul -

Were you referring to the non-linearity in the LED drive current-to-LDR output resistance relationship, or did you have in mind something else?

In reading your comment I began to wonder if perhaps you had found an inherent non-linearity in the photocell element itself.

Specifically, I'm wondering if the resistance of the photocell changes at all (at a fixed illumination) as the voltage across the photocell varies. Sort of an analog to the Early effect, if you will.

If that is the case, then clearly an LDR-based gain control stage will introduce distortion even with a ripple-free ALC input voltage.

I suppose one could build a simple test circuit with a fixed-illumination LDR used as a feedback element around a low-noise op amp, then compare the distortion of that circuit to a version in which the LDR is replaced by a resistor of equivalent value.

Maybe I'll look into this a bit if no one has already done it.

--
Curt
 
Paul -

Were you referring to the non-linearity in the LED drive current-to-LDR output resistance relationship, or did you have in mind something else?

In reading your comment I began to wonder if perhaps you had found an inherent non-linearity in the photocell element itself.

Specifically, I'm wondering if the resistance of the photocell changes at all (at a fixed illumination) as the voltage across the photocell varies. Sort of an analog to the Early effect, if you will.

If that is the case, then clearly an LDR-based gain control stage will introduce distortion even with a ripple-free ALC input voltage.

I suppose one could build a simple test circuit with a fixed-illumination LDR used as a feedback element around a low-noise op amp, then compare the distortion of that circuit to a version in which the LDR is replaced by a resistor of equivalent value.

Maybe I'll look into this a bit if no one has already done it.

--
Curt
Hello Curt,

I was refering to the non-linearity of the resistance versus voltage of the photocell element. I wasn't concerned about the LED drive current to LDR resistance transfer function. I used the Silonex parts to fine tune the notch of a distortion analyzer and found that they added some distortion. The web site Silonex Inc.: Products: Audiohm Optocouplers: Audio Characteristics has some information on linearity.
I experimented with the parts some years ago and only have limited data available.
With (I think an NSL-37V51) connected in series with 6.2 kohm with a 20 kohm in parallel with the photocell. 12.5 V peak to peak across the series combination. LED driven so that the Photocell = 9 kohm the distortion was mainly third harmonic at 0.2 %, measurement frequency = 1 kHz.
With 1 V across the combination the distortion was 0.05 %.
Some measurements with the intended operating conditions would be good.

Regards
Paul
 
Hi L.

I don't know what the sidebands are like unfortunately. I am measuring the THD+N without limiting the bandwidth beyond what the Analog Devices AD536A RMS to DC Converter does at about 0.4 V rms with it's level dependent bandwidth. It's typical - 3dB Bandwidth at 100 mV rms is 450 kHz so it should be a little better than that at 400 mV but I am unable to verify it. The rms value looks about right when viewing the peak to peak residual on an Oscilloscope.
The noise is less than 0.004 % of 3 V rms as measured by the 'Distortion Analyzer' so is less than 120 uV. I would like to be able to make better measurements but haven't got the equipment.
The oscillator amplitude of 5 V rms and low impedances has kept the noise low.

The ALC loop has high DC gain but low AC gain, It takes many seconds to stabilise when the Oscillator Frequency is set to 10 Hz. I wasn't worried about fast stabilisation.
I tried to calculate the change in amplitude with loop gain but my differential equation skills aren't good enough. I have simulated the response.
The ALC error amplifier doesn't have high ripple rejection because I am relying on low ripple from the Sample and Hold.
I am using standard dual gang potentiometers (which are expensive). I have found variable frequency useful for general purpose but I agree that for measuring distortion some spot frequencies are all that is required.

I am going to attempt to attach a pdf of the Schematic as it is now. There is another page containing the output attenuator and buffers and also a 5 V regulator for the monostable. It isn't complete yet. I intend to change the reference voltage and am still investigatingh distortion at 25 kHz.
I had to export a .dxf file from KiCAD then use Open Office to create the pdf. I guess that there is a better way.
If anyone wants the KiCAD files I can attach them.

Regards
Paul
 

Attachments

  • Oscillator section 0_1 modified.pdf
    116.8 KB · Views: 516
Hi Davada,

I was looking for very low THD+N, so the ALC multipliers are directly connected to ring's output: @1kHz, 20Vpp out on 10k load, AD633 output sits at about 130mVpp - only 2nd and 3rd harmonic are visible, both in the -100dBv range, which seems indeed to account for a very low ALC-injected THD at generator output.

L.
 
I am going to attempt to attach a pdf of the Schematic as it is now.

Hi PChi - thanks for the schematics. Had a look at it: it seems you're actually discharging the hold capacitor somewhere during the cycle (had no time to check all the timings) - I may be wrong, but it's pretty unlikely that you're going to keep CV ripple low this way. Did you manage to check CV ripple at the S&H output?

L.
 
Hi L,
Thanks for looking at the schematics and the comments.
I am not discharing the hold capacitor during the cycle. When prototyping the circuit I found that if the Oscillator wasn't running (depending on leakage currents) the sample capacitor could have a high voltage which sets the loop gain below 1 hence no oscillation so no zero crossing to trigger the monostable so no discharge of the hold capacitor. The extra monostable section 'MONO 2' is a watchdog to ensure that if the oscillator isn't running the hold capacitor gets discharged.
I used a low speed comparator on the prototype because it was all I had but the AD790 likes to oscillate even with a ground plane and surface mount decoupling capacitors so the 'watchdog' is probably unecessary.

The zero crossing detector IC4 triggers the Monostable IC5 on only the positive going transistions (when it's working properly). I had a little trouble that I need to investigate further with the AD790 which has a little internal hysteresis occasionally producing glitches on the negative going input transitions which are slow when the Oscillator was set to 10 Hz. The Monostable output turns on the analog switch IC7 for about 500 ns to sample the signal from the output of IC6 which is shifted by about 90 degrees relative to the zero crossing detector input. So it's sampling the peak voltage approximately.
The ripple is low at the Sample and Hold output until the Oscillator frequency is increased. At 100 kHz there is about 30 mV of ripple mainly caused by the input signal changing during the sampling period. I believe (though I haven't checked fully) that it is responsible for the increase in distortion that I am measuring at 25 kHz.

I would prefer to use an integrated sample and hold but couldn't find one that was good enough. It needs very low droop so that the hold capacitor doesn't discharge when the Oscillator is set to 10 Hz and reasonably fast acquistion at 100 kHz. I used a low charge injection analogue switch to minimise sample and hold voltage steps.
I would prefer a better comparator than the AD790 with less delay and a little more hysteresis.
Paul