ADD H2 DISTORTION
Work In Progress
I wrote something on the Random Noise page about intentionally adding 2nd harmonic distortion. Thinking more about an adjustable distortion circuit, there are two obvious simple ways to generate a second harmonic. The first is to use a nominally square-law device such as a jfet, and the second is to use a multiplier to square the input. These two methods have slightly different effects although both generate the second harmonic of a sinewave.
The multiplier with sin(wt) at both inputs has output 0.5( 1 - cos2wt))
The square-law device with this input will have output something like 0.5( 1 - cos(2wt)) + sin(wt)
The first question is whether we actually want the cosine of 2wt, why not the sine? If we are concerned about adding or subtracting from the speaker distortion that could matter, but both methods give us the cosine so in both cases we would need some sort of phase adjustment if we want something different. Those 'intentionally' high distortion amplifiers will almost certainly also have someting like the square-law effect, so that may be all we need.
The additional term in the square-law output is just the original undistorted signal, so we already have the distortion added to the original signal, something we would need to do in an additional stage for the multiplier version. Alternatively we could just add a DC offset to one of the multiplier inputs to add the undistorted signal to the output.I should really have specified input A sin(wt) for amplitude A, and this reveals a possibly important feature which is that the whole distortion term in both responses includes a factor A2, in the case of the square-law we get:
0.5( A2 - A2 cos(2wt) ) + A sin(wt)
This demonstrates that as we increase signal level the percentage 2nd harmonic will increase in proportion to signal level, but what is less well known is the effect of the first A2 term, which is a DC term for a fixed input level, but for a constantly changing music signal it becomes another AC distortion term, varying in proportion to amplitude squared, and we could guess it will add some low bass energy to typical music with varying amplitude. Could that be the feature some listeners find attractive? Who knows.Searching for existing examples of intentionally adding distortion I came across the Pass H2 Harmonic Generator. There are a few interesting points, one is a finding that given a choice listeners tended to prefer 'negative phase' second harmonic (H2), the opposite to the jfet Id vs Vgs effect. The whole idea however is made more complicated by a claim that some recording engineers are adding second harmonic to their recordings to supposedly optimise the sound. Adding more H2 which may add to or subtract from this already 'optimised' level can then be expected to make the result worse. The 'optimised' sound unfortunately will only sound the way the engineer intended if we use the same speakers or ones with similar H2 distortion, or maybe he used headphones. I know my own speakers have some H2 distortion, and I already like the sound, so maybe my low distortion amplifier is a good choice, and I really don't want recordings to be intentionally distorted further based on some other person's speakers and taste.
I read to the end of that link, and found instructions to reverse the speaker connections to hear the difference between positive and negative phase H2. For a single sinewave that is correct, but for some more complex signals the effect can be different compared to inversion done before the distortion circuit, or with the circuit itself altered to reverse the curvature of its transfer function. If the aim is only to cancel some of the speaker distortion, then the speaker reversal may help.Ok, a simple example to prove the point. Suppose we start with a rectangular wave going positive to +1V for 10ms, then negative to -500mV for 20ms, then repeat indefinitely. We could apply this to the gate of a jfet in a common-source stage. The positive level will have higher gain than the negative level, but we still have a rectangular wave output with 10ms and 20ms sections. Suppose we also add to the input a low level 20kHz, something like 10mV in level. This component will then be amplified more for 10ms and less for 20ms, so we get an additional amplitude modulated 20kHz at the output. If we now invert the output we still have a higher amplitude for 10ms and lower for 20ms. If we did the inversion before the jfet input we would instead find the output amplitude of the 20kHz component would be higher for 20ms and lower for 10ms. The effect of the inversion is very different for input inversion compared to output inversion. This is an example of intermodulation, and we find there are four different output signals possible for the four permutations of input and output inversion. That is why an adjustable square law distortion adding circuit may need switched inverters at both input and output, but again those only wanting some speaker distortion cancellation only need to try output inversion.
Here is my initial design from about 20 years ago, it uses a dual control to adjust the signal level at the jfet gate and therefore distortion level, while keeping overall gain about constant. It also attempts to add some degree of soft clipping, (that is the reason for the 10k in series with the jfet gate), but the result will vary considerably for the usual range of jfet characteristics. The original specified jfet is probably difficult to find now, but something like a J202 may work ok.
A more recent attempt shown next includes selectable inversion before and after a signal squaring circuit. The previous circuit used a dual potentiometer for just a single channel, so for stereo signals we would need a 4-gang pot, which is difficult to obtain, but with a single pot per channel we need only a dual pot for a stereo version, plus a two pole two way switch. The squaring section can be made using a four quadrant multiplier, which avoids the wide range of jfet characteristics which causes problems for the previous version. With the potentiometer set to its mid point there will be zero distortion, and turning in oposite directions gives increasing levels in inverted or non-inverted form. The multiplier could be the LM13700 which can be used as two four quadrant multipliers. The original undistorted signal goes direct to the output amplifier, so any distortion added by the multiplier is only distorting the distortion, so not a great concern, and a relatively high distortion multiplier is ok. If we only want low level distortion, for example 1%, then the 10k marked with a * could be increased to something like 100k to limit maximum distortion. For the originally intended 'guitar effects' application we may want the maximum range.
As mentioned above the multiplier produces a DC output component, so its output needs to be capacitor coupled, around 10uF should be adequate. If the predicted low frequency output resulting from amplitude changes is found to be some benefit the capacitor can be increased to maintain that. I am uncertain how the controls could be labelled, maybe 'pre-inversion' for the switch and 'post-inversion' for the potentiometer.
It will make no difference if the x-squared circuit gets its input after the inverting switch or from either of the inputs to the switch, in an earlier version I put an adjustable inverter at the input of that circuit but of course (x) squared is identical to (-x) squared so that would have no effect, and the inversion must also be applied to the undistorted input signal to be equivalent to the effect on a square-law jfet input. For a guitar effects application the input inversion may be too small an audible effect to be worth including.
For the guitar effect it may be a useful idea to use a switch with a centre-off position so that the undistorted signal can be switched off to leave just the squared signal, in which case the x-squared circuit can get its input before the switch as shown in the diagram.
But why stop at the second harmonic? Maybe we could add variable levels of 3rd and other higher harmonics. That is quite easy, all we need to do is feed some of the squared output back to the input stages, as in the next example. We need to ensure the added feedback loop remains stable at all control settings, and the stability of highly nonlinear feedback is not always an entirely trivial problem, so further thought is needed. We do know it will work in principle, this 'square law plus feedback' was used by Baxandall in his article about how feedback affects the distortion spectrum, but here we are potentially using much higher distortion levels.
Searching via Google we can find numerous treatments saying the requirement for stability is that a nonlinear function inserted in a previously stable feedback loop must have ratio of its output to input amplitudes less than unity. If that was reliable our x-squared circuit obviously can have output amplitude far greater than the input at high input levels, (x-squared is greater than x for x greater than 1), so we would need some signal level limiting at least, shown in the next example as a pair of diodes. That can add even more nonlinearity in the feedback loop, so adds to the complexity, and actually building and testing the circuit may be the easiest way to investigate stability. There is also no certainty of loop stability without the nonlinearity, component tolerances need to be taken into account, maybe the 22k shown with a ** needs increasing a little. The values of components around the LM13700 are probably less than ideal, some measurement and experimentation is needed to optimise these.For a music signal with moderate or high dynamic range there are mostly short duration peaks and lower average level. For average level at -20dB the second harmonic percentage is reduced by a factor of 10. With 1% peak 2nd harmonic the average signal level will then have only 0.1% 2nd harmonic, which is 80dB less than the peak level. Mostly there will therefore be little if any audible effect. The result of our H2 adding circuit is unlikely to have a dramatic effect unless we add something like 10% or more at the peak level, which is ok for a guitar effect, but not what we would want for a high quality audio system. This is why we are happy to listen to speakers with a few percent distortion at peak level, and those 'zero feedback' and similar high distortion amplifiers. At normal listening levels the distortion will be mostly harmless, only noticeable, if at all, when directly compared to a low distortion system.
Initial conclusion is that even as a 'guitar effect' there is little if any benefit, the distortion will only be significant at peak signal levels and fall rapidly as notes decay. Maybe used together with heavy compression the result may be more dramatic, if highly compressed and distorted is what anyone really wants.