# Harmonic distortion in valves

1. Apr 24, 2006

### eeka chu

I'm thinking particularly of thermionic triode valves (tubes) here, but I suppose the reasons are probably similar whether it's a bipolar, jfet, mosfet etc...

If your not sure about valves, a triode is super simple. It's just a hot cathode that emits electrons thermionically, an anode that pulls the subsequent electron cloud towards itself and grid near the cathode with a negative voltage on it that's used to control the current flow by electrostatic repulsion.

Why, when a current flows through these devices, and particularly as they go into cliping, does that current suddenly fracture into harmonics?

Since the fracturing occurs at integers of the fundamental, I'm guessing that it has something to do with energy (somehow) being injected / removed at the centre of the wavelength of the oscillation.

I understand, from playing the electric guitar, that if I tap a string halfway along it's length (inject energy at this point) I cause the harmonic pattern to redistribute itself so as to produce a waveform with more and / or higher harmonic components.

And that if I put diodes on a big coil, like a transformer's winding, the reverse current can cause ringing in the coil. In this instance, energy stored in the capacitance of the diode is being injected back into the coil and, I assume, it's because that energy re-enters the coil just as the waveform on it reaches halfway that it produces a harmonic on it; or that the period of the discharge happens to be double the frequency of the original waveform, although that would be one unlucky stroke of coincidence.

But I'm wondering what it is that causes the electrons to do the same as a processing element begins to clip off the current flow. The harmonic pattern seems quite closely related to the way in which the clipping off occurs, which suggests that the generation of the harmonics is closely related to this process as well.

Also, if my electrons now have twice the oscillating frequency of the fundamental, they should be oscillating at twice the velocity right?

For some reason I'm getting pictures of the 'water hammer' effect you get when you shut a valve off quickly. The interruption in the flow causes a pressure wave to shudder back through the pipes. But I don't think those sudders are related to any fundamental, just the design of the pipe system. Whereas the 'shuddering' as a current flow is clipped is specifically related to the fundamental frequency and even changes depending on the frequency of that fundamental.

I expect this effect also occurs, at minute levels, as the electrons pass through the crystal boundaries in a real world conductor.

Any ideas?

Last edited: Apr 24, 2006
2. Apr 24, 2006

### rbj

"current suddenly fracture into harmonics?"

3. Apr 25, 2006

### eeka chu

I don't want to be too picky but could you be a bit more vague?

4. Apr 25, 2006

### rbj

it's just the mixture of language that has some relevance (the nonlinear properties of the vacuum tubes and output transformers are responsible for generating harmonics that were not in the original input) with language that one might judge to indicate that you don't have any idea about what you're talking about or writing of.

i do signal processing on audio signals for a living. i have some pretty good idea about what this sound of tube amplifiers is about and why it is so hard (but not impossible) to emulate it with mathematics.

now, i do not know how to answer or respond to questions and ideas of which some are so ill-formed, it's just impossible to respond with actual physics and mathematics.

5. Apr 26, 2006

### eeka chu

I'm pretty sure these harmonics and patterns are actually present in amplification stages lacking any form of transformer as well, such as preamps - which usually don't have windings in them, unless it's an interstage transformer or choke loading (I don't think I've ever actually seen choke loading in a preamp due to the huge values needed).

In fact, just about everything that conducts creates some level of harmonic distortion it would seem. For example, you can buy solid state analog audio switches that have a harmonic spectrum pictured in their datasheet, despite just being a lump of semiconductor with zero windings present anywhere in their circuit, and something that's not actually meant to go into clipping during normal operation.

I'm aware valves are nonlinear components, but that's just a statement as opposed to an explanation of why the harmonics are created. And I'm attempting to use simple language since I expect (and this has been pretty much confirmed by the number of replies) that hardly anyone knows what I'm talking about.

I've been told by DSP / Microprocessor guys that "Anything a valve can do a DSP can do better" (Literally here, this is what I've been told word by word). Which always says to me... "I don't really know what I'm talking about", since pretty much every digital model of valve distortion out there sounds terrible or, at best, moderately good. Which isn't to say theren't aren't also some terrible sounding valve circuits, but generally digital is too simplistic - it might only be based on clipping and the rough shape of the harmonic sprectrum at 1kHz for instance, limited measurements at a (painfully) limited number of static test points.

There's a big craze at the moment to attribute all of the valve sound to the output transformer, which I'm sure has some truth to it but it also seems to have appeared right alongside the big boom in single ended triode amps.

I've spent years working through audiophile forums, so you'll have to forgive me if I don't accept things at face value. If I did, I'd now own a \$20,000 6ft power cable for my half million pound amp, and still be complaining about the tone. :tongue:

I've had guys on audiophile forums spend pages and pages explaining opinions as fact and simultaneously they've been saying nothing at all, and then getting on me if I question it; usually after I've just googled something from the thread and found a pretty much polar opinion stated as fact.

Last edited: Apr 26, 2006
6. Apr 27, 2006

### rbj

this is a good thing to post to USENET comp.dsp where i hang out a little.

we're big boys here. the reason that harmonic components are created is because when a general sinusoidal function is operated by a non-linear operator, the result is periodic (with the same fundamental frequency of the input) but not quite a sinusoidal function. when you determine the Fourier series for that non-sinusoidal function, you will have non-zero coefficients for harmonic components besides that of the fundamental frequency.

listen, being scientists, we believe that this phenomenon sometimes called the "warm sound" created by vacuum tube amplifiers is due to causal effects. what that means is, as long as nothing has changed (that is we have a time-invariant system), the same cause results in the same effect. the same input to the tube amp will result an identical ouput. that means that the output of the tube amp (and speakers and enclosure) is a well defined mathematical function of the present input voltage and past values. we may not know entirely what that well-defined mathematical function is, but it is there. the amp is not magic; it takes that input voltage (plus signals from independent noise sources and the hum from 60 Hz or 50 Hz power supplies) and, by way of the physics happening in the circuits and devices in the amplifier, performs some mathematical function or operation upon that input and (assuming a causal system, which means that future values have no effect on the present) past values of the input voltage.

using Digital Signal Processing (DSP), the first problem is that of sampling and sampling rate, but since neither human hearing nor tube amplifiers have infinite bandwidth, there is a finite sampling rate that can be used to adequately model the tube amp. it may be very high (maybe it has to be fs = 192 kHz or higher) but does not have to be infinite. then once the internal mathematics of operation of the tube amp are known and understood (i am not saying we're there yet), if the mathematics is done computationally (inside the DSP) or by virtue of the physics of this tube amp, if the same signal results coming out, no one can tell the difference.

the output transformer (which is not necessary with a transistor amp with complementary NPN and PNP "push-pull" output transistors) has both non-linearity and memory, the latter in the form of hysteresis. modeling that, along with tube behavior, along with the power supply behavior (the B+ voltage drops when you hit a power chord because of non-perfect power supply regulation and that changes how the tube circuits behave), along with loudspeaker and enclosure properties, in order to make an accurate tube amp emulation. none of this is easy and has likely not been done totally successfully to date.

7. May 1, 2006

### eeka chu

Will check it out. I'm on diyaudio.com quite a lot but decided to post here instead looking for an answer based on physics.

I wasn't trying to say the people here are stupid, just that they might not even know what a triode really does since it's not a very useful piece of technology now in anything other than audio and some radio gear.

See end.

I 100% agree with you, that's precisely what I would say with regards to digital recreation as well. That our ears are far from perfect, broadband receivers and that there are finite limits to them that can be surpassed by technology.

My problem with the DSP guys is that they make out as though recreating the distortion is a pretty simple task, when so much of it sounds unbearable. I'm guessing because a lot of the programmers specialise in programming more discrete applications than audio. Also, due to the history of it, there's a kind of general distaste for anything digital in audio; which is a bit of a shame.

Or valve amplifiers if it's a particularly low plate resistance or arranged as a cathode follower.

I read an interesting discussion that was related to how valves exhibit 'duty cycle' modulation of the waveform. That at varying power levels one phase of the waveform is stretched beyond the 50% crossing point of a synthetically generated input (from a signal generator).

I don't know if this effect occurs in simple preamp valves because it seems more like a memory effect occurring due to hysteresis. Seems like it might be worthy of an experiment.

So the non-linear operators you mentioned would be things like the hysteresis of the transformer etc.

But still, that doesn't quite explain why the harmonics are created, only that they are when processed in a non-linear way.

Let's imagine we have a super simple system. We feed in 500Hz and we get out 500Hz with some fraction of harmonic distortion at 1kHz.

What's confusing me is firstly how that harmonic has actually been generated, electronically, and why it's appeared a such a precise interval of the fundamental. Also, I would guess that the frequency interval isn't absolutely perfect, so it should be possible for the distortion to be 'out of tune' with the fundamental. Although, the harmonics tend to have their phase with regards to the fundamental all messed up anyway as different frequencies have different time-based interactions with real world components. And yet more... are the harmonics 'identical' copies of the fundamental just at an integer multiple of their original frequency (imagine that the fundament already has some form of organic looking modulation on it rather than being a pure waveform), within reason obviously given the components processing it won't be perfect, or are they much more / entirely a product of the components themselves and just at an integer multiple of the original fundamental? Can harmonics be generated with no form of 'memory' in the processing system? If the answer is yes, then answer to the question before must be that the waveform of the harmonics is more / entirely a result of the components, otherwise the components would be predicting the future, since their waveform will need to end half-way etc through the fundamental. Why are harmonics always, or very near always, more dominant at the frequencies higher than the fundamental as opposed to lower?

Non-linear operators only seem to be half the answer. I mean, with regards to the second question, why does the non-linear operator cause the distortion to occur at such perfectly spaced harmonic intervals? E.g. why don't we get dominant peaks at more random frequencies that more represent the components themselves than the fundamental and then go on to create serious beat sounds when recombined with the fundamental?

I'm picturing the output stage of an amplifier with a big transformer on it. Into the transformer I inject a 500Hz pure sine wave. The field strength in the core rises and falls. The hysteresis of the real world material means that my injected waveform is having to 'work' at the core to push and pull the domains into representing the correct field. Since my generator isn't perfect and can't supply infinite amounts of power, it can't achieve that effect perfectly and so the output of the transformer isn't a perfect representation of the input.

But what is happening there, in the magentics and electronics, that's resulting in a harmonic interval being produced. Is it the interaction of the next incoming waveform with the still slightly biased core? Or the domains in the core relaxing, and if so why do they do so as to represent an interval of the fundamental? Or something totally different?

Lots of questions!

8. May 1, 2006

### rbj

imagine the nonlinearity happens to be mathematically:

$$f(x) = a_0 + a_1 x^2$$

what will happen when you put a 500Hz sine wave into that? what do you get out. do the math!

the harmonics are generated due to the mathematics that are the accurate description of what is happening physically. the harmonics of a memoryless non-linearity will be perfectly harmonic because you still get a periodic function coming out. that's what Fourier Series says about it.

if the tube V-I curves were precisely equally spaced straight lines (which they aren't) you would not be generating any harmonics from the tubes because they would be perfectly linear devices.

9. Aug 23, 2006

### jpg

Output transformers

On the topic of tube amp sound.

Does anyone know of any circuits which emulate output transformer characteristics using passive devices?

The idea is to get tubelike output stage clipping which is affected by the V to I phase difference and I suspect also by the incuctances and capacitances of the the transformer - phase change can produce interesting clipping.

10. Aug 23, 2006

### 3trQN

With regards to thermionic valves, something thats new to me but im curious.

I understand that Cathode Filament supplies electrons through thermionic emission and that the electrons are accelerated towards the annode at a rate determined by the grid voltage (in a Triode).

Current being the rate of flow of charge accross the valve:

I = dQ/dt

where dQ is proportional to the E-Field strength (or the voltage at the grid) and the rate of electron ionisation(?)/ Emission at the Cathode.

Im curious as to what the effect of increasing the voltage at the grid electrode to a point where the e-field is such that the rate of charge flow exceeds the the rate of thermionic emisison?

Under these conditions what kind of output is observed?

11. Aug 23, 2006

### 3trQN

Nevermind, i found out that the grid lies between the cathod and the annode and is therfor of the same charge as the annode, increasing this higher than the annode is obvious.

But what about a grid which is oppositley charged at the reverse side, propelling charges towards the annode...

12. Aug 24, 2006

### rbj

the grid has a voltage (relative to cathode) that is independently deteremined by applied bias voltage added to the input voltage (the signal to be amplified). The grid is what controls the electron flow from cathode to anode. The more negative the voltage of the grid, the more these electrons that are drawn to the anode are repelled or contained.

The bias voltage is a negative DC voltage that is used to set the nominal or quiescent current (from cathode to anode) to a "middle" level somewhere. That way if the input voltage swings up from zero, the grid becomes less negative and more current flows, if the input becomes negative, the grid is even more negative than the quiescent state (what the bias voltage sets) and there is less than the quiescent current flowing. if the grid stays negative (relative to cathode) no (or very little) quantity of electrons will flow out of it. if it ever goes positive (despite the negative bias) the grid will act like a "mini-anode" and there will be some grid current flow.

assuming a constant anode to cathode voltage, the relationship of this grid voltage to anode current is at least somewhat non-linear. in addition, in a typical Class A amplifier, the anode voltage is not constant, but decreases from the power supply voltage by an amount proportional to the anode current (because of ohm's law applied to the anode resistor).

the output voltage is taken off of the anode (and is biased itself). the relationship of this output voltage to input voltage is slightly non-linear and inverted. if the input voltage increases, the grid-to-cathode voltage is less negative, more electron current is allowed to flow to the anode (positive current is the opposite direction), and more voltage drop across the anode resistor, and the anode voltage decreases.

that's how a vacuum tube works (at least a triode).