diyAudio (
-   Parts (
-   -   Understanding distortion mechanism (

Bricolo 7th February 2005 09:04 PM

Understanding distortion mechanism

This is something I'd like to know, and that has been mentionned several times recently, here.

When some of you write "the transconductance is quadratic, this will create 2nd order harmonics", "put a ccs instead of a resistor, you'll have 20dB less thd" I'm really interested. I'l also like to know how to predict this.

Non linear transfer function create harmonics, if the TF is Nth order, it will produce Nth order harmonics
Vce modulation on a BJT creates distortion (early effect) (is there somethink like this for Fets?)

What are the other distortion sources?

Bricolo 26th February 2005 02:42 PM

No one interested? :xeye:

thorstenlarsen 26th February 2005 03:12 PM

:o No. If the transfer function is n`th order it will stil produce most second order distortion if it is a single ended curcuit. For eksample: A bipolar transistor has an eksponential transfer funktion when voltage-driven and it will make most 2. order

Bricolo 26th February 2005 03:46 PM

Are you sure than a BJT has mostly 2nd order distortion?

I've often read that Fets have a quadratic TF, and so have mostly 2nd harmonics, due to this quadratic TF. Unlike bipolars

adx 26th February 2005 08:28 PM

2 Attachment(s)

In fact, I've been playing with an FFT program so I'll modify it to demonstrate:

- The white lines are the time domain signal (the only difference you will be able to see is a 'small' gain difference).
- Purple is the fft output (dB magnitude)
- Green lines are 20dB y axis markers
- The top / bottom graphs show:
y = ((1-yy/10)^2-1)*10 'quadratic distortion
y = (2^(1+yy/10)-2)*10 'exponential ditortion
(where yy=pure sinewave, y=distorted version, in BASIC)

This shows:
-Quadratic distortion produces ONLY 2nd order harmonics (I thought there would be some 3rd etc but there you go, perhaps I missed something in the rush).
-Exponential distortion produces a roughly 'linear' dropoff in harmonics (I have gone for very roughly 10% distortion in these plots, but for 1% distortion the 2nd is ~-60dB, 3rd ~-120dB etc)

You have do be doing something pretty nasty before this difference becomes audible!

In reality both MOSFETs and BJTs produce similar looking distortion spectra because they are non-ideal. Same applies for tubes in fact.

thorstenlarsen 27th February 2005 07:19 PM

Hi Bricolo ;)
Another thing to consider is that in most cases a BJT is current driven. In that case the distortion will be a function of change in hfe. You can find a graph of hfe as a function of emitter current in many datasheets. It is very different for every particular type of transistor. It is possible to find transistors with a very linear hfe- curve. They will offcause distort very little when current driven. In the JLH class a only the first transistor should be regarded as voltage driven. In many cases the drive is somewhere between voltage and current so the distortion is difficult to predict. And simulations are depending on the accuracy of the models they use. Hope you get some inspiration out of this.:scratch1:


adx 1st March 2005 09:12 AM

Re: Understanding distortion mechanism
2 Attachment(s)

Originally posted by Bricolo
Vce modulation on a BJT creates distortion (early effect) (is there somethink like this for Fets?)
There are effects similar to the early effect and hfe variation for fets just like bjts. The voltage to current gain graph may occur in different forms or even be ommitted for switching fets. Not much use beyond a simple shortlist. Actually testing the component is the only way to know how it measures and sounds if you really want the best result.

The reason I'm posting is to elaborate on my ealier post. Of course squaring a sinewave only creates the 2nd harmonic - this is what a frequency doubler is (using the sin^2 = sin2f identity). I was thinking a step ahead and assuming an audio signal, which I thought might in some cases make higher order harmonics due to intermodulation. No. All it does is create intermodulation products not much higher in frequency than the 2nd harmonic (ie doesn't cause a train of harmonics). It often takes a simulation before I realise the obvious.

Here is another simulation showing 3 closely spaced sinewaves, and the result of putting each resulting sample through the same quadratic transfer function in my original post:

thorstenlarsen 1st March 2005 03:23 PM

Hi adx !
Interesting findings. So if we add one more stage we will get some 4`th harmonic because the next stage will produce 2`nd harmonics of the second harmonics of the first stage. And/or maybe we will some reduction in the 2`nd harmonic because of distortion annulation. If the currents in the two stages are in opposit phase. What do you think?


adx 1st March 2005 10:47 PM

2 Attachment(s)
Yes, but it also produces a 3rd harmonic, I'm no maths expert (that's by choice) but if you go (a+bx^2)^2 I expect there will be a 4th order thingie (polynomial?). N E way 3 tones it looks like as attached...

There is some difference between inverting and not inverting the stages, but not a lot, the only difference is the 2nd harmonic(s) is about 10dB lower, the others remain the same. This makes sense because the second stage is only ~10% distortion so can't compensate 100%. In the real world of a stable <1% (for class-A amps anyway), the polarity of successive stages will make practically no difference. I sort of knew that, but a live example has made it nice and clear.

The graph shown is actually with it inverted, because my equation does an inversion. Here is the QB code which generates the distorted time domain signal for the inlcuded graph:

FOR i = 0 TO 4095
yy = SIN(i / 4096 * 3.1415926# * 100) 'generate single tone
yy = yy + SIN(i / 4096 * 3.1415926# * 110) 'generate 2nd tone
yy = yy + SIN(i / 4096 * 3.1415926# * 120) 'generate 3rd tone
yy = yy/3 'scale to 1/3rd to compensate

yy = ((1-yy/10)^2-1)*10 'quadratic distortion extra stage
'yy = -yy 'invert it
y(0, i) = ((1-yy/10)^2-1)*10 'quadratic distortion
'y(0, i) = (2^(1+yy/10)-2)*10 'exponential ditortion
PSET (i / 8, 200 - y(0, i) * 100),15
y(1, i) = 0

(Actually running it in FreeBasic on windoze - a very happy find for me, the master of writing simulations in QB!)

thorstenlarsen 3rd March 2005 12:36 AM

Distortion nulling
Hi adx !

It should be no problem in theory to reduce the second harmonic to zero. If first stage makes 10% and second stage makes 10%, but antiphase, the result would be 0%. But the second stage would also make 10% distortion of the second harmonic from the first stage, which would give 1% fourth harmonic distortion. In practice it is a matter of adjusting the working points to reach the desired distortion spectrum, or the best compromise.
Or maybe just choose what sounds best.


All times are GMT. The time now is 06:33 AM.

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