# THD calculations

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.

#### tiroth

If one has, say, two unity gain buffers with a known THD of X%, can one put some bounds on the THD of a signal which passes through both buffers?

I am assuming noise is incoherant and ignoring its contribution at the moment. My first thought would be that the distortion would be 1-(1-X/100)^2 but I have a feeling this is not very sharp.

I would like to have a better idea of the overall contributed distortion caused as signals travel through various functional components, so this seems like an important thing to know!

Thanks,
Tyler

#### Nelson Pass

Paid Member
Assuming that the distortion of both buffers is low,
say 1% of less, than the upper boundary is the
addition of the two distortion figures, and the lower
boundary is something slightly greater than 0.

If the two buffers are identical and fairly low distortion,
you should assume the distortion to be about twice the
value of one.

All this is strictly rule-of-thumb, of course.

#### tiroth

Aren't these exactly the bounds? i.e. the range {0, sum of distortions}? The worst case being each buffer distorts by adding exactly some x to the waveform, and the best case being buffer one adds x and buffer two adds -x? I would think that this was sharp, but I may be ignoring some subtlety.

I've noticed that in some cases (2-order IIR implementation of eq filter) the total THD from the two stages is much less than the combined distortion figures.

In this example:
Filter 1: 0.0004% THD
Filter 2: 0.0004% THD

The upper bound would have been 0.0008% by the above logic. These distortion figures may seem trivial, but I am considering the case of, say, 1/3 octave EQ with 30 filters. How the distortion sums is thus the difference between 0.012% distortion (-78dB) and <.001% (-100dB).

I'm guessing there is no rule of thumb other than to assume that your buffers are doing "similar" things internally, and thus to assume the distortion will be nearly double. Is this the thought process behind your statement?

#### 13DoW

If the two buffers are identical and unity gain then they both see the same peak input voltage (as long as the first doesn't distort grossly and compress) and the harmonics generated by the non-linearities in their transfer functions will be the same and sum directly (not rms).

(I'm not sure about the realtive phases of, say, Xth harmonic generated in the first buffer passing through the second and the Xth harmonic generated in the second by the fundamental. If they are different you could get partial or even complete cancellation of particular harmonics but not all at the same time.
If cancellation does happen it would only affect high order harmonics relative to the passband where you can pick-up near 180degrees phase-shift from the second buffer.)

If the two buffers are identical and have gain then the second will dominate because it will see a larger input and it will distort more.

Cascading filters could be more complicated because the second filter can remove harmonics generated by the first.

Regards,
13th Duke of Wymbourne

#### awhobbyboy

noise of N stages in series add in rms power: distortion of N stages = srqt N x distortion of one stage

in dBv scale that means adding 20log(sqrt(N)) db

Remark:
N opamps paralel REDUCES distortion by 20log(sqrt(N))

#### R. McAnally

Overall distortion is calculated by "summing the squares" of each individual component and taking the square root of the total. Similar to pythagreon's theorem, a^2 + b^2 = c^2, where C (the diagonal of a triangle) is the total distortion, A and B are individual components. The same process can be applied to any amount of distortion components.

This assumes there is no clipping at the time =).. the same process is used for summing noise contributions.

Hope it helps,

tiroth said:
Aren't these exactly the bounds? i.e. the range {0, sum of distortions}? The worst case being each buffer distorts by adding exactly some x to the waveform, and the best case being buffer one adds x and buffer two adds -x? I would think that this was sharp, but I may be ignoring some subtlety.

I've noticed that in some cases (2-order IIR implementation of eq filter) the total THD from the two stages is much less than the combined distortion figures.

In this example:
Filter 1: 0.0004% THD
Filter 2: 0.0004% THD

The upper bound would have been 0.0008% by the above logic. These distortion figures may seem trivial, but I am considering the case of, say, 1/3 octave EQ with 30 filters. How the distortion sums is thus the difference between 0.012% distortion (-78dB) and <.001% (-100dB).

I'm guessing there is no rule of thumb other than to assume that your buffers are doing "similar" things internally, and thus to assume the distortion will be nearly double. Is this the thought process behind your statement?

#### djk

I can show you how to build a 1/3rd oct EQ with only one op- amp. Of course the op-amp could be realized with discrete parts ala' the N.Pass article on same.

#### tiroth

I'll be watching carefully for clipping djk,

I'd be interested to see your design. For an actual EQ I'm going to be operating strictly in the digital domain, since I'm not aware of anything that uses real resistors and opamps that can achieve the specs of cascaded TAS3001 (30 channels, >103db S/N, <-94dB THD+N, constant Q, near linear phase response) or similar algorithms implemented on a general-purpose DSP. Better analog EQ design gives me a better target. #### JoeBob

1/3 oct EQ with only one opamp? That sounds interesting, have a page on it?

#### tiroth

Hmm, no more editing after 10 minutes, eh? I should have said the phase response was "closer" to linear. I'm looking at bounds of 18 degrees, with the average phase shift being much less.

#### djk

"1/3 oct EQ with only one opamp? That sounds interesting, have a page on it?" I have a couple of pro-sound eq made by DuKane that have only one op-amp per channel.They have a single ended class A single transistor input buffer and a single differential gain stage for the filters.The filters are all passive LCR.But a hybrid is also possible.Dynaco used LCR filters for the upper bands and gyrators for the larger low freqency inductors. If you look at the schematic for the McIntosh MQ104 parameric eq it is the same, earlier versions used a single transistor for the gyrator.If you use pots with a center tap and ground the tap the eq is effectively out of circuit with the pot near the center position.My DuKane actually have a switch on each band! These old dinosaurs make the new 60 op-amp stereo models sound really bad.

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.