Digital Value/Tube Simulation. Jesse Loweke, 420116987 Digital Audio Systems, DESC9115, Semester 1 2015.

Masters of Design Science (Audio and Acoustics). Faculty of Architecture, Design and Planning, The University Of Sydney.

Introduction. Problem Description.

Tube/valve technology in the music industry Valve technology in guitar amplification is known (Especially guitar amplification) can be seen over for its “warm” “clean” and “detailed” sonic the last century as a rise and fall phenomenon only characteristics that may lack, not only to rise again. When the first valve were that, its US $100 million worldwide guitar amp used in the music industry although their business, “One rough estimate shows a 10- popularity was without question, there was in fact percent-per-year growth in demand for tubes used very little other technology of the time to draw a in MI amplifiers and high-end audio since the late comparison with, the question is how does one 1980s, with no apparent slackening-even during draw this comparison without other technology to the US. Recession of 1991-92” [1]. It is figures compare it with. like these that show this technology is still sought after, even though it is considered now as It wasn’t until the rise of the ‘digital age’ did this “vintage” there is still most defiantly a market for comparison become apparent. As time went on this type of ‘vintage’ Technology. Although a and technology evolved transistors replaced market exists for tube guitar amplification, it is , and new amplifiers were produced that, in mostly in the high-end audio realm leaving the turn, produced different sonic characteristics due average Joe musician or producer in an to the change in design and the relationship of the economical limbo, not only that as previously internal circuitry. mentioned vacuum tubes are still bulky in design, Although current solid state technology has require high operating voltage, have high power Advantages, light weight, less sensitive to consumption, low power efficiency and can have mechanical shocks, higher power efficiency and short life spans due to electron emitting materials more economical for the user, the question has used in operating [1]. been raised time and time again, although we have This asks the question how can the average Joe gained these advantages of the latest technology, still enjoy and implement that classic valve sound what has it cost us in terms of sonic quality, which into their own productions without the price tag is after all, paramount. and obvious disadvantages, the answer? Digital simulation.

Specifications of Vacuum Tubes. As the electrons are pulled from the heated Before delving into the digital models for cathode to the anode, current increases, however simulating a value effect, it is important to grasp only some of discharged electrons from the an understanding of what exactly is the cause of cathode reach the anode (one of the disadvantages the ‘tube sound’ In terms of the physical circuitry, as mentioned early in terms of power efficiently) the relationship between the individual the electrons with less velocity that don’t make it components and the resulting output. to the anode can be observed to linger around the Basic Tube Characteristics. hot cathode creating a space of negatively charged

The term ‘vacuum diode’ relates to the most basic electrons known as “space-charge current”[2] of tube circuitry, including two electrodes which this situation causes some electrons to be blocked are placed inside a , these two from reaching the anode “The resulting current is electrodes are called the anode (plate) and the self-limited and depends on the anode voltage” cathode. [2] . The formula below shows this relationship (The Langmuir-Child equation) The cathodes role in the circuit is to be heated to the point that electrons can be “emitted by thermionic emission” [2], while the anode is responsible for the collection of these electrons, thus the ‘warm up time’ needed for tube amps, if Where G represents a constant that relates to the the cathode isn’t heated, no electrons will be structure of the tube itself. emitted, therefore the anode is unable to collect any, thus no power. As the voltage increases, a threshold is met that attracts all of the discharged electrons from the The next operation is the velocity of the initial cathode to the anode which results in saturation. current, in which the now heated cathode discharges electrons at random, with the external Triodes. voltage applied, electrons arrive at the anode Triodes include a third electrode in their circuitry, creating current in the circuit, however a negative known as the gird. The grid consists of wires voltage is applied to repress current flow. The which can be wound in different ways, when a below formula is a representation of the current in voltage is applied to the grid it is possible to a diode. alternate the flow of electrons with the given voltage, as a minor change in the grid voltage can produce a major change in current, thus

amplification is possible (e.g. guitar amplifiers). Where I is the diode current, V is the voltage of the anode, ET is the thermal voltage and I0 is the current at zero voltage [3] represents the grid voltage, while on the y axis IA The figure below Showing anode (plate), cathode, is the anode output causing a non-linear effect. grid and the relationship between them in within While (bottom right) shows the output spectrum the tube itself.

Figure 1. [2] Figure 2. [4]

It is with excess current flow (by the grid voltage) Including the fundamental and the second gird is possible, (sought after by many harmonic caused by the non-linear curve. This guitarists). It isn’t just the distortion that gives that harmonic can be controlled by applying the “tube sound” it is also the relationship of the other voltage (operating point) in the linear area of the components mentioned working together that top left graph. produces the sonic characteristics that are desired. The DC component in the output of the signal can This relationship can be show by the following be adjusted by means of a high pass filter It can be formula: also be seen in the output signal (top left) that asymmetrical soft is occurring due to the non-linear curve of the adding to the (formula of ratio of Grid current, anode current, vintage sound in terms of distortion. and voltage). The valve will also produce soft clipping

as [4] explains “soft reduction of the power supply It is the non-linearity of the transfer function voltage occurs when in a high power operation, between the anode current and input grid voltage short transients need a high current. This power that is responsible for the distinct sound of tube supply effect leads to a soft clipping of the audio technology. Figure 2 (top left) shows the non- signal”. linear behaviour of triodes where on the x axis UG Components such as resistance, reactance and capacitance are also accountable for how the tube in question will sound along with previously mentioned elements.

Implementation. Within the simulations grid rectification effect (as With an understanding of how tube technology mentioned earlier) is incorporated as well what is operates and relates to the sonic characteristics know as the miller affect, which in essence is a that are produced by its amplification, a digital low pass filter effect due to the relationship of the model can be constructed. capacitance in the circuitry. [6] Although not the only work in digital simulation, With the mathematical relationship know, It is Normans Korens work in electronic circuit simulation is possible in programs such as matlab, simulation programing that the ‘Spice’ model was where one can ‘tweak’ the parameters to their created, one of the leading tube simulation models liking. The function taken from [4] used for as of present. The spice model is derived from the implementation into MatLab is as follows, with Leach’s model [5] descriptions of the functions parameters. Which is derived from an earlier model (Child- lanmuire) [3] the Leach’s model can be expressed y=tube(x, gain, Q, dist, rh, rl ,mix) as: Where; ‘x’ is the input .wav file. ‘Gain’ is the input level/distortion. ‘Q’ is function transform (affecting linearity of system). ‘dist’ is how the system distorts, in terms of

The Norman Koren’s model is timber. (Asymmetrical soft clipping ). “phenomenological” and is aimed to model the ‘rh’is a high pass filter ( to attenuate DC physical behaviour of the internal circuitry using component ) “parameters not derived from fundamental ‘rl is a low pass filter (to simulate the capacitance physics” [6]. of the triode) And ‘mix’ is the ratio of processed-to-non [6] explains the design; processed signals. “It has been designed so that plate current Ip > 0 whenever plate voltage Vpk > 0 [3]. It matches better published curves from datasheets. The expression of the Ip current is the following:”

The following graphs (refer to appendix) show how this implementation is affecting a guitar signal used as the input signal, It can been seen in the processing of the guitar signal the effect the tube simulation has, asymmetrically clipping the signal, much like the effect of a triode.

Performance Assessment.

[2] Paper on triode modelling simulations shows measurements of real life triode current Figure 3. [2]. within a RSD 12AX7 tube in comparison to the current calculated with Langmuir-Childs formula. value which begins to distort the signal more, and The graph below in figure 3. shows how close the a higher negative for the transfer function which simulation is to reproducing the real life effect of corresponds to less linearity within the system the circuitry. With these results It could be said simulating that of valve systems. The amount of that the measured and the simulated tube effects asymmetrical clipping due to the “dist” parameter would sound very simular in terms of audio is an important part of the sonic characteristics of characteristics. valves and was given the same value as the input With reference to the code in this paper different gain value producing the nonlinearities that are parameter combinations were tested to see which associated with this technology. In terms of the resulted in a more desirable simulated tube sound filters “rl” was given a lower value as the “twang” was lost in the mix that replicated the With the following results being deemed as most desirable; capacitance in the system and higher frequencies x = data; were affected too much while “rh” was given a lower value as the lower frequencies needed to be gain = 12; present in the mix and not filtered too much, or a Q = -0.9; very tinny, thin sounding mix was produced. dist = 12; rh = 0.95; rl = 0.01; Evaluation. mix = 1; It can be seen that there are many benefits to digital simulation of tube amplifiers, this This combination of parameters values have been technology provides the Sonic characteristics that chosen as they take advantage of a higher gain are sought after by many audio engineers, producers, audiophiles and musicians alike, References. without the outlined disadvantages of this vintage [1] Barbour, E. “The Cool Sound Of Tubes”. Page 25 , Svetlana technology, considering the current market and Electron Devices, August 1998. Portola Valley, Calif, USA. past trends the sound a tube amplifier makes will [2] Dempwolf, K. Holters, M. Zolzer, U. “A Triode Model For no doubly ever go out of fashion, as its history is Simulation with Individual Parameter Fitting”. 131st A.E.S Convention paper, page 2., NEW YORK, far too rich, it has helped shape multiple genres of USA. music, by likes of jimi Hendrix, Eric Clapton, [3] Pakarinen, J. Yeh, D,T.” A review of digital techniques for modeling vacuum-tube guitar amplifiers," Computer Music jimmy Page, Carlos Santana and many more. The Journal, vol. 33, no. 2, pp.85. 2009. simulations made in the digital realm have [4] U. Zolzer. DAFX: Digital Audio Effects, 2nd,John Wiley & Sons Ltd, Hamburg, Germany, May.2011. evolved to the point where there accuracy is at a [5] Marshall, W. “Spice Models for vacuum tube amplifiers” high level, and can be made available to many, at Journal of A.E.S Vol. 43, No. 3, page, 117-126. March 1995. a fraction of the price of expensive outboard [6] Cohen, I. Helie, T. “ Measures and parameter estimation of hardware. triodes, for the real-time simulation of multi-stage guitar ” ”. 129st A.E.S Convention paper, page 2., Sanfransico, USA.

[7] Oliveira, T.C. Barreto, G. Pasqual, A.M. “Review of digital emulation of vacuum-tube audio amplifiers and recent advances in related virtual analog models” University of Campinas, Sao Paulo, Brazil. June. 2013.

[8] Cohen, I. Helie, T. “Simulation of guitar stage for several triode models: examination of some relevant phenomena and choice of adapted numerical schemes”. 127th A.E.S Convention paper, NEW YORK, USA. October. 2009.

[9] Li, Shengchao. Why do tube amplifiers have fat sound while solid state amplifiers don’t, Audio Engineering Society Convention paper, Maryland, USA, October.2011

[10] leach, W.M. “Spice models for vacuum tube amplifiers” Journal of A.E.S vol. 43, no.3, March. 1995.

[11] Lynar, N. “Digital Tube Simulation Models” University of Sydney, Australia, 2013.

Appendix

Clean Guitar Signal

Processed Guitar Signal

Parameters used for simulation for

Function y=tube(x, gain, Q, dist, rh, rl, mix);

x = data; gain = 12;

Q = -0.9; dist = 12; rh = 0.95; rl = 0.01;