Low-distortion Audio-range Oscillator

It's not instantaneous -- and your averaging capacitor may too large. Try running the sim with an o'scope and watch the buf output increase to the RMS value.

Thanks.

OK, well, I have tried and tried to get the scope to work in Tina and it just won't. I don't know what I'm doing wrong and I've read the help section on it.

I used 1uF for Cav from the data sheet for the chip.
 
70 ms to settle @ 1 kHz. Is that good or bad?

You tell us--how much ripple (i.e. distortion) and what oscillator settling time can you accept? When designing something like this you need a clear goal, or you'll be running in circles.

Also don't try to re-invent the wheel; if you need both fast settling at the lowest frequencies and very low distortion, a sample-and-hold based level detector (as used in essentially any newer commercial generator) is probably the by far best solution. Not easy to design though (I'm currently testing my 3rd generation circuit, and I'll need a 4th revision to get where I want).

Simpler to handle is the sin^2 + cos^2 approach. Wire-up two multipliers as square functions, and feed them from the lowpass/bandpass output of the SV filter. The sum of their outputs gives a theoretically ripple-free and instantaneous level detector. Practice will show you several limitations, but still the result is probably more usable than a simple rectifier or RMS-DC converter.

Samuel
 
Simpler to handle is the sin^2 + cos^2 approach. Wire-up two multipliers as square functions, and feed them from the lowpass/bandpass output of the SV filter. The sum of their outputs gives a theoretically ripple-free and instantaneous level detector. Practice will show you several limitations, but still the result is probably more usable than a simple rectifier or RMS-DC converter.

Samuel

Hi Samuel,

You darn near need an AGC just to keep these two (sin^2 + cos^2) equal amplitude to avoid ripple.

How are you managing the pedestal error, glitches and ringing with the THSH?

I'm getting very frustrated.

Cheers,
 
You tell us--how much ripple (i.e. distortion) and what oscillator settling time can you accept? When designing something like this you need a clear goal, or you'll be running in circles.

Also don't try to re-invent the wheel; if you need both fast settling at the lowest frequencies and very low distortion, a sample-and-hold based level detector (as used in essentially any newer commercial generator) is probably the by far best solution. Not easy to design though (I'm currently testing my 3rd generation circuit, and I'll need a 4th revision to get where I want).

Simpler to handle is the sin^2 + cos^2 approach. Wire-up two multipliers as square functions, and feed them from the lowpass/bandpass output of the SV filter. The sum of their outputs gives a theoretically ripple-free and instantaneous level detector. Practice will show you several limitations, but still the result is probably more usable than a simple rectifier or RMS-DC converter.

Samuel
I've been thinking about this ever since the 20Hz oscillator with really long settling time was mentioned, post #218 and probably before. The sine squared plus cosine squared idea is the analog function I was trying to imagine how to do, but it does give a continuous level output instead of sampled or peak-detected, and with an appropriate loop filter should result in a much faster settling time.

I've been thinking (speaking of reinventing the wheel) of using a microcontroller with an A/D converter reading the output and comparing it with an internally generated sine of the same frequency and phase, at 100 or 1,000 points per sample. This would also give (near) continuous level detection (at and near zero crossing the ratio of the two may not be accurate enough to use), using a D/A converter to directly drive the gain element, and both the signal level detect and loop filtering could be done completely in software.

One problem I don't recall seeing mentioned with the CDS cell is its own response time which becomes part of the loop filtering - and its resistance responds MUCH faster to an increase in light than to a decrease in light, likely complicating things (what's more, it even has a memory effect, similar to dissipation factor or "soakage" in capacitors). This is only a "moderate" problem at higher frequencies, but at 20 Hz the response may be fast enough to cause distortion unless the loop filter has a substantially lower cutoff frequency.
 
I've been thinking (speaking of reinventing the wheel) of using a microcontroller with an A/D converter reading the output and comparing it with an internally generated sine of the same frequency and phase, at 100 or 1,000 points per sample. This would also give (near) continuous level detection (at and near zero crossing the ratio of the two may not be accurate enough to use), using a D/A converter to directly drive the gain element, and both the signal level detect and loop filtering could be done completely in software.

Hi benb,

I tried something similar to this with much less demanding sampling at one sample per cycle. What I found is small embedded processors can't keep up to real time events even though they run thousands of times faster. At low frequencies it was not such a problem but as the frequency increased... This was with bear bone code. Although I was trying to do this using the built in SPI running at 12MHz. The processor was running at 48MHz.

I'm still entertaining the idea of using a processor but for lesser demanding tasks. It is doable if most of the real time events are handled outside the processor with discrete hardware. I'm sure one could move up to more a powerful processor and have some success but in interest of keeping the cost down....
 
You darn near need an AGC just to keep these two (sin^2 + cos^2) equal amplitude to avoid ripple.

Yes, that's the main problem--the time constants of the integrators will need to be reasonably well matched.

How are you managing the pedestal error, glitches and ringing with the THSH?

I can't reduce them to zero either, but 100 uVrms fundamental frequency content should be feasible with modest circuit complexity. Most of the ripple energy tends to be located at high multiples of the fundamental frequency, and thus is very effectively low-pass filtered by the state-variable topology. If you drop me an e-mail with your schematic and detailed results I might be able to offer more specific help.

I've been thinking (speaking of reinventing the wheel) of using a microcontroller with an A/D converter reading the output and comparing it with an internally generated sine of the same frequency and phase, at 100 or 1,000 points per sample. This would also give (near) continuous level detection (at and near zero crossing the ratio of the two may not be accurate enough to use), using a D/A converter to directly drive the gain element, and both the signal level detect and loop filtering could be done completely in software.

I tried something similar to this with much less demanding sampling at one sample per cycle. What I found is small embedded processors can't keep up to real time events even though they run thousands of times faster. At low frequencies it was not such a problem but as the frequency increased...

I've contemplated this as well, but have not done any practical work yet. I think the most promising path would be to implement a first stage in the analog domain (peak detector or track-and-hold), then implement the second stage and integrator with AD and DSP. Surely one'd use an MDAC for the multiplier element.

Just for the records, much has been said here already:

http://www.diyaudio.com/forums/solid-state/154260-my-implementation-cordell-distortion-analyser.html

Samuel
 
Yes, that's the main problem--the time constants of the integrators will need to be reasonably well matched.



I can't reduce them to zero either, but 100 uVrms fundamental frequency content should be feasible with modest circuit complexity. Most of the ripple energy tends to be located at high multiples of the fundamental frequency, and thus is very effectively low-pass filtered by the state-variable topology. If you drop me an e-mail with your schematic and detailed results I might be able to offer more specific help.

I had to try everything simpler first with discrete circuits and am now just moving on to what I proposed to you earlier this year. I'll let you know how it goes.




I've contemplated this as well, but have not done any practical work yet. I think the most promising path would be to implement a first stage in the analog domain (peak detector or track-and-hold), then implement the second stage and integrator with AD and DSP. Surely one'd use an MDAC for the multiplier element.

Just for the records, much has been said here already:

http://www.diyaudio.com/forums/solid-state/154260-my-implementation-cordell-distortion-analyser.html

Samuel
 
Yes, that's the main problem--the time constants of the integrators will need to be reasonably well matched.



I can't reduce them to zero either, but 100 uVrms fundamental frequency content should be feasible with modest circuit complexity. Most of the ripple energy tends to be located at high multiples of the fundamental frequency, and thus is very effectively low-pass filtered by the state-variable topology. If you drop me an e-mail with your schematic and detailed results I might be able to offer more specific help.





I've contemplated this as well, but have not done any practical work yet. I think the most promising path would be to implement a first stage in the analog domain (peak detector or track-and-hold), then implement the second stage and integrator with AD and DSP. Surely one'd use an MDAC for the multiplier element.

Just for the records, much has been said here already:

http://www.diyaudio.com/forums/solid-state/154260-my-implementation-cordell-distortion-analyser.html

Samuel

I'll try this again now that I'm more awake.

I had to try everything simpler first with discrete circuits and am now just moving on to what I proposed to you earlier this year. I'll let you know how it goes.

" I've contemplated this as well, but have not done any practical work yet. I think the most promising path would be to implement a first stage in the analog domain (peak detector or track-and-hold), then implement the second stage and integrator with AD and DSP. Surely one'd use an MDAC for the multiplier element."

We think alike with this.
 
Hello,
I agree with Samuel Groner,
If you want fast settling it's hard to beat the Sin^2 + Cos^2 approach. It's particularly impressive to see the operation at 10 Hz on an Oscilloscope but distortion is high.

If you want low distortion then the sample and hold or variant of works well.
There are low charge injection analog switches avaliable which don't cause much pedestal error, glitches or ringing.

I have put the circuit board shown in post #120 in a box and bought a ShibaSoku AD725C Automatic Distortion Analyzer off Ebay.
The Distortion measured was:-
At 10 Hz and 1 kHz = 0.0004 % measured with a 30 kHz low pass filter and RMS response. The residual is mostly noise with a hint of some harmonics.
At 10 kHz = 0.0006 % measured with a 100 kHz low pass filter and RMS response. The residual is mainly third harmonic.
At 20 kHz = 0.0007 % measured with a 100 kHz low pass filter and RMS response. The residual is third harmonic with others creeping in.

The ShibaSoku is a mass of close tolerance components and reed relays. The notch filter is based on 3 cascaded Bridged-T filters. Thanks to Dick Moore's web site for an explanation of the Bridged-T notch filter.
 
Hello,
I agree with Samuel Groner,
If you want fast settling it's hard to beat the Sin^2 + Cos^2 approach. It's particularly impressive to see the operation at 10 Hz on an Oscilloscope but distortion is high.

If you want low distortion then the sample and hold or variant of works well.
There are low charge injection analog switches avaliable which don't cause much pedestal error, glitches or ringing.

I have put the circuit board shown in post #120 in a box and bought a ShibaSoku AD725C Automatic Distortion Analyzer off Ebay.
The Distortion measured was:-
At 10 Hz and 1 kHz = 0.0004 % measured with a 30 kHz low pass filter and RMS response. The residual is mostly noise with a hint of some harmonics.
At 10 kHz = 0.0006 % measured with a 100 kHz low pass filter and RMS response. The residual is mainly third harmonic.
At 20 kHz = 0.0007 % measured with a 100 kHz low pass filter and RMS response. The residual is third harmonic with others creeping in.

The ShibaSoku is a mass of close tolerance components and reed relays. The notch filter is based on 3 cascaded Bridged-T filters. Thanks to Dick Moore's web site for an explanation of the Bridged-T notch filter.

Can you name a few low charge injection switches? Then we don't have to look for them.

Would you be willing to share a schematic of your design? Or did I miss that in a prior post.
 
Member
Joined 2004
Paid Member
Congrats on finding a Shibasoku. Do you have a manual?

In reviewing low distortion oscillators there is usually tradeoffs for fast settling vs. low distortion. The most obvious is the ST1700 series that have a relay that switches between fast settling an low distortion by switching in and out a Jfet agc alongside a led-cdse cell AGC module. The fastest settling are the Krohn Hite state variable oscillators. They use the sample and hold triggered at the peak solution and can settle in very few cycles at 1 Hz or less. They do suffer from feedthrough of the sampling pulse in the output, which is the major limiting factor in the distortion. I have the circuit and description of the KH4025 if anyone wants to see it. Its really complex since its all discrete but it will also be an education in the technology.

Make sure you are solving a problem that needs solving. For a single frequency solution even 10 seconds settling after power on would not be a problem in most applications. Also is low distortion or voltage accuracy the primary goal? If absolute voltage accuracy is less important and stability over a longer period less important something as simple as an incandescent bulb driving a CDS cell may be ideal since its free of transients. It would limit the low frequency possible however.

Adding a DSP would bring a real challenge keeping the digital stuff out of the output. You would almost have to seal it all in a can with a separate power supply. The agc dynamics would be easier to tune with a DSP but the same effect can be had with pretty simple circuitry.
 
The Oscillator schematic is attached to post #136. I had trouble exporting the KiCAD picture hence the poor qualtity.
The low charge injection switch is an Analog Devices ADG1221.
The original schematic and PCB layout is in KiCAD. If that is of use I can send them.

I don't have a manual for the ShibaSoku. There is no Oscillator only bucket loads of filters, reed relays and passives. I have traced out some of the schematic. It is very 1980s. It appears to mostly work OK apart from the 20 kHz filter.
 
Member
Joined 2004
Paid Member
I think the analog multiplier may be a limitation on the distortion. Its the only element I have not been able to make improvements on in the Boonton circuits and seems to be a constraint. The harmonics are low but not that low. There are trims possible but it then gets complex with a lot of parts and needs something like the Shibasoku to adjust.

Your 20 KHz filter is not working on the Shibasoku? Yours is much newer than mine. The oscillators are separate boxes with at least 4 variations I have seen. They are all very high performance.
 
Did you find the schematic for the AGC for the HP239? I'm curious...

The schematic in fig. 8.4 is a bit fuzzy but readable enough.

Regarding your Q about meter scales: if it's either / or then I prefer Voltage readout, but I'd rather have both.
If you have an output attenuator with 10dB steps then you need 2 voltage scales but only one dB scale. see 2/3rds down this page Audio Millivoltmeter
 
For a readout on an audio oscillator, would you prefer dB or volts? I guess the standard is to have a 600 ohm output and indication in dB, but I should read more about this also.
If you're going to include an audio millivoltmeter that can actually measure the voltage across the output terminals then the actual voltage reading is probably best. Unless it's being used in a telco application, or some pro sound applications, where there is widespread compliance with recognized reference levels for dB measurements, displaying some kind of dB value seems to waste more effort due to confusions than it saves in mental arithmetic. If you can't display the actual terminal voltage then showing the voltage that should appear across an open-circuit load would be the most useful.

Dale