Low Distortion Signal Generator. Part 1.


Sometime around 1982 I designed a variable frequency audio signal generator, called the AFG/3, with a range from 10Hz to 100kHz and sinewave, squarewave and toneburst outputs. There were switched ranges from 0-3V down to 0-3mV, and a constant 600R output impedance. Now I only have the first prototype, kept for my own use, which still works well apart from being in need of some recalibration. The toneburst was an added feature just to be different to other similar products, the IHF-A-202 'dynamic headroom' specification had been mentioned in some audio magazines and books, and was fairly easy to implement using CMOS logic devices. This appears to be a less popular test now, but the signal is still useful for example to check amplifier clipping without needing a high power load resistor. The original specification sheet and circuit diagram are shown on a separate page here. Looking again at the circuit I think some of the component values are less than ideal, but even so I have found it to be a dependable test instrument for many years.

The distortion specification was reasonably good, but not good enough for direct distortion testing of my more recent amplifier designs. Typical figures are 0.006% at 20Hz and 0.007% at 20kHz.
Here is a simplified circuit diagram of the sinewave generator:

I started by thinking about ways to improve the existing generator. An additional idea I mentioned before somewhere is to add an output filter stage to attenuate the harmonics at one or two fixed frequencies so that low distortion testing can be done at those frequencies.


Circuit Improvements


A good place to start is by looking at how other designers have achieved better results with similar circuits. Going back to July 1981 a good example was published in Audio magazine, as part of a series of three articles by Bob Cordell: 'Build a High Performance THD Analyzer'. The generator circuit is shown as Fig.9 on page 39, and uses a very similar approach to my AFG/3. If I had seen that article before designing my own circuit I am not certain I would have done it any different, but at least I would have realised that my choice of op-amp was less than ideal, and possibly the gain control jfet also could be a more suitable type, though the 2N4091 is not easily available here (UK). I did use the same techniques of trying to minimise the signal voltage across the jfet and feeding half the drain signal back to the gate to improve linearity.

More modern 'ultra-low distortion' op-amps such as the LME49710 or LM4562 could make some improvement even with no other changes.

My circuit does have one additional trick shown as R17, value 27k, which creates a notch filter effect intended to null the third harmonic. This is most helpful at low frequencies where the conflict between distortion reduction and amplitude stabilisation is a greater problem. I believe the idea was used in a design by Ian Hickman published in Wireless World (April 1992 pp.345-346). A disadvantage is that higher order harmonics are increased somewhat, but these are still generally at a fairly low level

There are some lower distortion examples using different types of oscillator, the best I was aware of back in 1982 was one designed by John Linsley Hood using a twin-T oscillator with R54 thermistor level stabilisation which achieved 0.00015% at 1kHz, but operated at a series of fixed frequencies. ('Spot-frequency distortion meter', Wireless World, July 1979, pp.62-66.) The R54 and similar glass encapsulated low power thermistors are no longer made. There are still a few glass thermistors such as the Epcos NTC G540 series, but the dissipation factor is specified as 0.4mW/deg.C compared to 0.02mW/deg.C for the R54 so a redesign for higher power dissipation would be needed. Low power light bulbs are sometimes used, but these again need higher power, and also have positive rather than negative temperature coefficients so a slightly different circuit is needed.

Part of the problem with jfet gain control is the need for a control voltage derived from the sinewave amplitude, often obtained from a simple rectifier and filter. The aim is to derive a control voltage with no components of the signal frequency or its harmonics, which will cause distortion. Excessive filtering to try to achieve this will cause long settling times and amplitude bounce when changing frequency or range, or even control loop instability. I used a not very precise full-wave rectifier in the AFG/3, and a filter with switched components to try to optimise the settling time for different frequency ranges (done mostly by trial and error).

I had thought of using a potentially much better method. The oscillator has both sine and cosine outputs available, and if we square and add these voltages we in theory get a perfect constant voltage proportional to signal amplitude squared. (sin 2wt + cos2wt = 1). Good low distortion analogue multipliers were and still are relatively expensive, but the LM13700 could be used. This is a 'dual operational transconductance' amplifier, and each half can be used as a four quadrant multiplier to produce the sine and cosine squared, which can be added and compared to a reference voltage. The resulting difference voltage can then be filtered to reduce any residual harmonics and used to control a jfet.

It should be possible to use a single LM13700 to produce the sum of squares and also act as the voltage controlled gain element instead of the jfet (hint: subtract the sum of squares from a reference voltage and after filtering the result add it to one of the multiplier sine inputs), but then the control voltage filtering in effect happens prior to the addition of the squares, so any unbalanced second harmonics and other distortion will not be reduced by the filtering. The LM13700 is anyway not very low distortion, so using a jfet gain control will probably turn out to be better in practice.

Another option I saw recently is a 'sample and hold' circuit to detect the peak level of the sine output but triggered by the zero-crossing of the cosine. All such methods should be better than my simple full-wave rectified sinewave. Just adding a full wave rectified cosine should be an improvement, the second harmonic can then cancel from the control voltage, provided the sine and cosine voltage levels are equal. In a variable frequency circuit these voltages are unlikely to be accurately equal over the whole frequency range. The same problem applies to the sum of squares method.


Output Stage Filter


Using an active filter the most important requirements are low noise and distortion. To avoid common-mode distortion an inverting amplifier is a good starting point. For low noise we then need a high source resistance and a low impedance feedback network, for which a twin-T notch filter is the obvious choice. A notch in the feedback network becomes a peak in the closed-loop gain, but to get a predictable gain at the pass frequency we need a bypass resistor so that the feedback is not completely nulled. Passing the 1kHz generator output through the following circuit could reduce its 2nd harmonic by a factor of 30 or more, and also reduce its low frequency supply effects. Of course the inverting amplifier needs to have even lower distortion than the amplifiers we want to test with the output signal. An advantage of this example is that additional filtering can be added in the input arm of the amplifier, and here a 220n across the 600R source impedance and a 4n7 in series with the 56k input resistor are used to further attenuate unwanted frequencies.

A problem with filter design is that the attenuation achieved in our Spice simulation assumes exact component values, but in the real world component tolerances can seriously diminish the required effect. Including a small preset pot at a suitable point in the circuit can allow adjustment for better results. In the twin-T filter above an adjustment of the 1k resistor value could make a worthwhile improvement.

If we found that almost all the distortion was at a single harmonic we could use a notch filter to remove that harmonic, and the next example is essentially an elliptic filter. With a 1kHz input signal the 3rd harmonic is attenuated by over 65dB relative to the fundamental frequency, but the other harmonics have far lower attenuation. Note that there is a gain of 20dB at 1kHz. A dB scale is used here to more easily reveal the level of rejection. The gain peak could be more accurately at 1kHz, but I started with standard component values and adjusted these to improve the 3rd harmonic rejection.

The twin-T version has at least two advantages, its op-amp has no common-mode voltage to add distortion, and also it rejects a wider range of unwanted frequencies, so although the 3rd harmonic rejection is not quite as impressive as the notch filter the overall result should be better. The addition mentioned earlier to add a notch to the generator circuit can anyway be tuned to reject the dominant distortion harmonic.


HOME.