Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Equipment & Tools From test equipment to hand tools

Low-distortion Audio-range Oscillator
Low-distortion Audio-range Oscillator
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 4th April 2020, 09:06 PM   #8731
QAMAtt is offline QAMAtt
diyAudio Member
 
Join Date: Nov 2017
Location: Seattle, WA, USA
Quote:
Originally Posted by Bonsai View Post
You using 4 layer board?
Yes, 4 layer
__________________
www.QuantAsylum.com
  Reply With Quote
Old 4th April 2020, 10:01 PM   #8732
Bonsai is offline Bonsai  Europe
diyAudio Member
 
Bonsai's Avatar
 
Join Date: Jul 2003
Location: Europe
Thanks.
  Reply With Quote
Old 5th April 2020, 08:16 PM   #8733
BSST is offline BSST  United States
diyAudio Member
 
BSST's Avatar
 
Join Date: Jul 2018
Quote:
Originally Posted by Bob Cordell View Post
The AGC (or leveling) circuits in most oscillators are responsible for most of the oscillator distortion if very low-distortion operational amplifiers are used. The two main components of the AGC circuit are the rectifier and the gain control device. The latter is often implemented with a JFET (or other voltage controlled resistance Ė VCR Ė element). Both of these components create distortion, sometimes one dominating more than the other depending on circuit details. Here I would like to say a few words about the creation of distortion by the rectifier circuit, and ways to mitigate it. The ripple of its filtered output is responsible for distortion by modulating the resistance of the VCR element.

There are other approaches to the required amplitude detection circuit that offer lower ripple than an ordinary rectifier, the most well-known of which is a sample-and-hold circuit. The S-H can provide very good results, but it can be complex, sensitive to timing of the sampling, and dependant on a fairly small sampling aperture. Unless a dual S-H running off of both the positive and negative signal phases is used, whatever ripple it creates is only at 1X the fundamental frequency. All things considered, it can provide very good performance if carefully implemented, but is not necessarily the answer to the maidenís prayer.

Here Iíll stick with ordinary rectifier types that are simple to implement and are very forgiving in nature. In particular, Iíll show some ripple data from three different rectifier types. These I will refer to as multiphase rectifiers. I refer to a half-wave rectifier as a single-phase rectifier, since it conducts on only 1 phase of the signal and its ripple frequency is 1X the sine wave input frequency. A full-wave rectifier is a 2-phase rectifier.

When implementing an oscillator as a state variable oscillator (SVO), both in-phase and quadrature versions of the signal are readily available. If these two signals are each presented to their own full-wave rectifier (FWR) and the rectifier outputs are summed, a 4-phase rectifier circuit results. Its ripple is very helpfully at 4 times the fundamental frequency, so a given amount of filtering results in much less ripple.

An 8-phase rectifier is implemented in a straightforward way by properly creating versions of the fundamental that are 45 degrees apart. This is easily accomplished with two resistive summing networks that sum equal portions of the fundamental and quadrature signals. Four fundamental signals now result. If these are applied to 4 FWRs, and the results summed (easily by a resistor network of 4 resistors), then an 8-phase (8X) rectifier results. Its ripple frequency is at 8X the fundamental, reducing even further the ripple for a given filter circuit.

There is another matter at work in reducing the ripple as well. The raw unfiltered output of the FWR falls all the way to zero at the signal zero crossings. This creates a lot of ripple to be attenuated by the filter. The raw output of a 4X rectifier does not fall in its valley nearly as far from its peak because the output from the neighboring quadrature-driven FWR comes up to take over while the raw signal is still at a high level (just 45 degrees from its peak point). By the same process, the raw output of the 8X rectifier falls even much less from the peak, creating a raw peak-to-valley voltage that is much smaller. The valley occurs only 22.5 degrees from the peak in time.

A measurement was done in simulation to illustrate the remarkable improvement in ripple when going from 2X to 4X to 8X rectification. A 1 kHz signal of 5-V peak amplitude was applied to the rectifiers. All rectifier outputs were equipped with the same simple first-order R-C filter with a time constant of 3.3 ms. As a baseline, the filtering was chosen so that the 2X rectifier yielded p-p ripple of 100 mV. Gains of all of the rectifiers were normalized to produce the same rectified DC output level of 3.18V.

The raw rectifier output voltages had p-p voltage swings of 5 V, 1.03 V and 0.21 V for the 2X, 4X and 8X rectifiers, respectively. This is an approximate 5:1 reduction in raw ripple for each doubling of rectifier order (14 dB).

Filtered output p-p ripple voltages were 100 mV, 10 mV and 1.2 mV, respectively. This is an approximate 10:1 reduction in filtered ripple for each doubling of rectifier order (20 dB per doubling of order).

These are exceptionally encouraging results for the high-order rectifiers. This performance is especially important for lower-frequency oscillators (like 20 Hz), but still makes a remarkable improvement for a 1 kHz oscillator. The much higher ripple frequency also invites the use of higher-order ripple filters without serious degradation of oscillator agc stability. Iíll show some results in another post.

Some may think the cost and complexity of the 8X rectifier is high. I donít think so, given what it does for you. Apart from a couple of resistors, it requires 4 full-wave rectifiers. Each FWR requires 2 op amps, 2 diodes and 3 resistors. The rectifier op amps need not be audio-grade. Even a lowly LM324 can do quite well at audio frequencies in a rectifier application. One quad op amp will give you 2 FWRs. Two quad op amps will do the whole job. Op amps, diodes and resistors are cheap these days.

Cheers,
Bob
Hi Bob,

I'm intrigued with your 8 phase rectifier.

I note that when integrator gains are exactly 1 at 1kHz and all resistors are appropriately chosen, there's perfect cancellation of all harmonics below 8th and all remaining harmonics are multiples of the 8th.

Given that, I'm trying to project how much ripple suppression might suffer when voltage-controlled tuning is introduced. To raise the oscillator frequency 1%, the inverter gain must rise 2%, and each integrator's gain will reduce 1%, yielding unity loop gain at 1.01kHz. So now the balance of the 8-phase rectifier is compromised by the 1% difference in integrator amplitudes and there will ripple introduced at 2nd, 4th, 6th, etc harmonics. But I suspect ripple is still low.

Does your simulation project harmonic content in the ripple output?

Thanks.

Best regards,

Steve
  Reply With Quote
Old 5th April 2020, 11:25 PM   #8734
Bob Cordell is offline Bob Cordell  United States
diyAudio Member
 
Join Date: Sep 2006
Quote:
Originally Posted by BSST View Post
Hi Bob,

I'm intrigued with your 8 phase rectifier.

I note that when integrator gains are exactly 1 at 1kHz and all resistors are appropriately chosen, there's perfect cancellation of all harmonics below 8th and all remaining harmonics are multiples of the 8th.

Given that, I'm trying to project how much ripple suppression might suffer when voltage-controlled tuning is introduced. To raise the oscillator frequency 1%, the inverter gain must rise 2%, and each integrator's gain will reduce 1%, yielding unity loop gain at 1.01kHz. So now the balance of the 8-phase rectifier is compromised by the 1% difference in integrator amplitudes and there will ripple introduced at 2nd, 4th, 6th, etc harmonics. But I suspect ripple is still low.

Does your simulation project harmonic content in the ripple output?

Thanks.

Best regards,

Steve
These are very good questions, and I have looked into some of them. A great many of the simulations I have done are on a complete SVO with the entire agc loop, so I can look in all of the important places.

A key aspect of the design is that the agc control feedback signal from the first integrator output back to the inverting summer is basically an error injection signal that can be of either phase depending on the operating resistance of the JFET control element. In a perfect condition, this signal is zero. Of course, even when the SVO is perfectly balanced and the fundamental in this signal is zero, there is still the distortion components in this signal. This signal does not usually need to be very large, and it is injected into the inverting summer through a fairly large resistance. What is convenient about this is that one has a signal within the oscillator loop that has distortion that is not that difficult to measure, and it is distortion that is reflective of the much lower distortion in the oscillator output.

These distortion components pass though the forward path of the integrators and are attenuated as expected as they make their way to the oscillator output. This is the main origin of the oscillator's distortion if the SVO op amps are ideal. The agc control circuit I described above is essentially the same as the one I used in the oscillator in the THD analyzer I did back around 1980. The schematic of that can be found on my web page.

Anyway, I usually look at the FFT of this signal, the oscillator output signal, and the signal driving the gate of the agc element.

The signal at the output of the rectifier circuit is quite sinusoidal and at the 8th harmonic. However, this does not mean that it has no effect on lower harmonics of the oscillator output. This can be a bit non-intuitive, but the reason is that the JFET has some nonlinearity. That 8 kHz ripple is being applied to the gate of a JFET, so there is mixing and down conversion that can occur. I have done many simulations to verify this and related behavior, with different amplitudes of ripple and different orders of rectifiers. Anyway, this 8 kHz ripple still must be held small, as it plays a role in creating a good portion of the 3rd harmonic in the output of the oscillator. The key thing to bear in mind here is that the 8 kHz ripple is not being injected into the oscillator signal path, but rather is modulating the gain in the agc control element. indeed, this is the essence of the nonlinearity. In this regard, things would be no different if the JFET was replaced by an ideal multiplier.

The 8X rectifier is very forgiving, but it is certainly true that if the quadrature input to it is of a different amplitude than the in-phase input, some additional harmonics below the 8th harmonic will begin to appear in the ripple. These will usually tend to be at the 4th harmonic in the ripple. I have not done extensive testing on the end effect of slight mismatches in amplitude between the quadrature and in-phase oscillator signals delivered to the rectifiers. Your point is well-taken when we make the oscillator into a narrow-band VCO by slightly altering the main SVO feedback resistance. Indeed, I have created such a VCO using the oscillator I have been simulating, and results are very encouraging in regard to any degradation of the oscillator THD as the frequency is moved by 1% or so in either direction. In a later post I'll present some of those results.

In that same matter, I have done numerous experiments with injection locking of the oscillators, and have had some very interesting results that I will put in another post.

Cheers,
Bob
  Reply With Quote
Old 6th April 2020, 12:33 PM   #8735
jan.didden is offline jan.didden  Europe
diyAudio Member
 
jan.didden's Avatar
 
Join Date: May 2002
Location: Westende Resort, BE coast
Slightly OT/: I have started a new thread about distortion in filters due to the capacitive load on some opamps:

Capacitive load impact on distortion

Would appreciate if some of the cognoscenti here would comment.

/OT

Jan
  Reply With Quote
Old Yesterday, 03:10 AM   #8736
MagicianT is offline MagicianT  Canada
diyAudio Member
 
Join Date: Jan 2020
Location: Montreal
Quote:
Originally Posted by 1audio View Post
I implemented a 4 phase rectifier with LM339's (open collector) as active perfect diodes some time ago. The other virtue of this is that you can get an H2 and H4 signal that can be added back to null out harmonics. This is a trick borrowed from the Amber 3501 oscillator.

Still I think David's trick using an ADC to sample and a multiplying DAC as a gain control is really elegant and simple. Using a fast comparator to sense the zero crossing to trigger the ADC to sample the peak of the cosine is not too difficult to implement. The issue with any of these is to keep any switching transients from getting back into the output. Possibly several isolated supplies would be needed once you are getting below -120 dB since it would not take much crosstalk to show in the output. That is the limitation of the older KH oscillators.
No, sampling one time per whole period of sine wave is wrong idea. Same apply to peak detectors. The issue is SNR of the AGC loop control. To make signal-to-noise ratio be adequate, averaging over multiple cycles required. Basically, averaging or low passing is the only way. OTOH AGC should have fast response, to stabilize amplitude in a reasonable time frame. To satisfy both conditions, sampling has to be continuous, as fast as possible. Micro CPU calculates RMS each cycle with high level of accuracy, so 16-bits or more and low noise ADC required.
Alternative in the analog domain is an integrator. It's "sampling" all the time right after full wave rectifier, does averaging and LPF filtering.
Attached Files
File Type: pdf dc1858af-Linear-Ultra-Low-THD.pdf (313.8 KB, 22 views)
  Reply With Quote
Old Yesterday, 06:26 AM   #8737
1audio is offline 1audio  United States
diyAudio Member
 
Join Date: Mar 2004
Location: SF Bay Area
Low-distortion Audio-range Oscillator
The sample and hold solution has been used effectively to get really stable and accurate AC sources for 50 years. You need to sample at precisely the peak of the waveform but that's the zero crossing of the cosine so not a difficult problem.
The implementation in the Boonton uses a single set of time constants for 10 Hz to 140 KHz with essentially no variation in output to 5 decimals. It also settles really quickly. it does use a number of parts, some of which are types no longer used. That where an ADC can do it very nicely as David proved. Below:
Attached Images
File Type: png Boonton S&H.PNG (59.7 KB, 85 views)
__________________
Demian Martin
Product Design Services
  Reply With Quote
Old Yesterday, 01:06 PM   #8738
Bob Cordell is offline Bob Cordell  United States
diyAudio Member
 
Join Date: Sep 2006
Quote:
Originally Posted by MagicianT View Post
No, sampling one time per whole period of sine wave is wrong idea. Same apply to peak detectors. The issue is SNR of the AGC loop control. To make signal-to-noise ratio be adequate, averaging over multiple cycles required. Basically, averaging or low passing is the only way. OTOH AGC should have fast response, to stabilize amplitude in a reasonable time frame. To satisfy both conditions, sampling has to be continuous, as fast as possible. Micro CPU calculates RMS each cycle with high level of accuracy, so 16-bits or more and low noise ADC required.
Alternative in the analog domain is an integrator. It's "sampling" all the time right after full wave rectifier, does averaging and LPF filtering.
It is true that sampling multiple times during a period is helpful. The 4X and 8X rectifiers I described above do just that in the analog domain. One will always need some form of filtering after the rectifier, and more sampling per cycle reduces the amount of filtering needed for a given amount of rectifier ripple, both because the ripple frequency is higher and because the raw amplitude of the ripple to be filtered is smaller. In addition to the filtering of the ripple, some form of integrator is also almost always used to obtain precision and stability in the oscillator's output amplitude.

Oscillator agc feedback stability and settling time depend a lot on the filtering and integration loop, and a faster loop, made possible by multiphase rectification, can help a great deal. It also depends on the oscillator frequency compared to the time constants in the ripple filter. Using different time constants for each decade of frequency can greatly improve this tradeoff. The biggest challenge in this tradeoff is often the performance at the lowest frequency for the oscillator.

Cheers,
Bob
  Reply With Quote

Reply


Low-distortion Audio-range OscillatorHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Radford Low Distortion Oscillator Series 2 audiomik Equipment & Tools 23 8th February 2020 06:48 PM
ultra-low distortion audio oscillator geekysuavo Analog Line Level 16 26th March 2013 03:04 PM
Low distortion oscillator? rjm Equipment & Tools 30 4th May 2011 10:45 PM
Can we improve this low distortion sine oscillator ? gaetan8888 Solid State 22 29th March 2009 12:30 PM
Simple, low distortion 1kHz oscillator jackinnj Solid State 4 6th October 2003 03:58 AM


New To Site? Need Help?

All times are GMT. The time now is 04:11 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.00%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright ©1999-2020 diyAudio
Wiki