Square-Law Transfer Function With Feedback.
One of many things we can do with AIM-Spice, (and I assume with other versions), is 'DC Transfer Curve Analysis', which plots the transfer function for an input Vin which can be swept over a specified range, in this example -2V to +2V. This can be used for a circuit using the usual active devices such as transistors, but an alternative is to specify a nonlinear function, such as a square-law amplifier using a 'Non-linear Dependent Source'. In the following example this function is B1 which is a voltage source generating voltage v = v(2)+0.5*V(2)^2 where V(2) is whatever voltage appears at node 2 in the circuit. V2 appears not to connect to anything apart from the two resistors, but it also controls the voltage source B1. In a real circuit we could use a jfet as the input device for something approximating to a square-law. Such a device could be used for an output stage or any other stage, but here I will concentrate on use as an input stage.
The plots are all of the DC transfer function, so for a real amplifier only valid for DC and low frequencies, at high frequencies variations in gain and phase may need to be taken into account. The first diagram is with no feedback, the second 10k is disconnected, and this is just a typical square law amplifier response. (In practice using a jfet input the input would be limited to -1V where the gain drops to zero rather than extended to -2V.) The red line V(1) is just the unity gain response we are aiming for, green V(5) is the actual response after a unity gain inverting stage E2 (to keep overall gain positive), and is clearly highly nonlinear. The distortion is extracted by subtracting this output V(5) from the input V(1) using E3 which has output V(6) = V(5) - V(1). Shown in blue, this is just the deviation from a straight line response, and the peak deviation is 100% of the input at peak input +2V or -2V. Starting with 100% peak distortion and then adding negative feedback we could imagine is a recipe for disaster, but not so. Including the 10k feedback resistor and with just unity gain for amplifier E1 we get the second diagram with much lower distortion, the peak deviation from linearity is now just 0.5V, or 25%. Looking closely it can be seen that the blue trace is no longer perfectly symmetrical. The gain of E2 needs adjusting by trial and error, otherwise one peak level would be higher than the other, the minimum peak distortion occurs when the peaks are equalised in this way. What we are doing here is an example of the 'signal nulling' method of distortion extraction, and adjusting E2 is how we can adjust for the best signal nulling to minimise peak error voltage. Looking at the following dagrams, E1 is increased to 2, 4, 8 and 16, and it is found that the peak distortion falls with each increase in E1, which is in effect 2x negative feedback loop gain. The distortion looks fairly similar in shape for all feedback levels, just a smooth curve with maximum level at the +/-2V input signal peaks. The final diagram, with just gain 16 for E1 appears almost perfectly linear at the scale used. Increasing the vertical resolution the blue curve can again be seen to be just a smooth curve, as shown at the end of this page.
The result with E1 gain = -1 at first looks wrong, distortion has been reduced from 100% with no feedback to 25%. The two 10k feedback resistors reduce the loop gain by half, so the gain round the fedback loop is just -0.5, so how has this reduced distortion by a factor of 4? Calculating the closed-loop gain from V2 to V4 we find gain = -1/3, and this is confirmed by the gain 3.2 required for E2 to give minimum peak distortion detected at V6. The input to the nonlinear function generator is therefore a third of its level with no feedback, and so its second harmonic distortion percentage is also reduced by a factor of 3.2. The negative feedback then reduces distortion further. It is the reduction in signal level handled by the nonlinear function generator which provides most of the distortion reduction at this low loop gain.
Note that we need to know nothing at all about the test signal apart from its peak levels, in this case +/- 2V. The peak distortion, V6 is the same for any signal of this peak level, it could be a single sinewave, multiple sinewaves, music, or anything else.
The gains for E1 and E2 used for the above plots are as follows:
E1 = -1 ...... E2 = 3.2
E1 = -2 ...... E2 = 2.07
E1 = -4 ...... E2 = 1.52
E1 = -8 ...... E2 = 1.2542
E1 = -16 .... E2 = 1.1257
The gain of E2 was adjusted by trial and error to give the minimum peak distortion voltage detected at V(6) as the difference between output V(5) and input V(1).Here again is the result for E1 = -16, but with different vertical scale, showing distortion V(6) reaching peak level 12.5 mV. With peak input 2V the distortion as a ratio of peaks is then 0.625%, and looks mostly to be a square function which will primarily produce second harmonic, though the slight asymmetry suggests some low level higher order harmonics are also present as expected.
And next is what we get with E1 = -1000, distortion now peaks at 4uV, or 0.0002%. It now looks perfectly symmetrical, distortion is almost entirely second harmonic. (The increased higher order harmonics produced by applying feedback to a square-law amplifier are invariably derived for a fixed input signal level at the input of the square-law device, but if feedback is increased by increasing the gain of following stages inside the feedback loop as done here then the input signal level falls and higher harmonics are dramatically reduced to leave almost entirely a low level of second harmonic.) Feedback loop gain is just 500, but the reduction from 100% open-loop to 0.0002% closed loop distortion is a factor of 500,000, far more than the loop gain. Most of the reduction is again a result of the reduction in signal level being handled by the 'square-law' input device. This reduces distortion by 1000 and the feedback effect then reduces it further by the loop gain, 500.
If we had used the single square-law device as the output stage instead of the input then we lose the benefit of reduced signal level it has to handle as we increase loop gain. Using complementary lateral mosfet output stages however allows higher feedback loop gain without stability problems compared to bipolar transistors, so input stage distortion becomes far less important, and a much simpler input stage can work well.