Professional Documents
Culture Documents
net/publication/229010599
CITATIONS READS
17 785
2 authors:
7 PUBLICATIONS 46 CITATIONS
Brno University of Technology
36 PUBLICATIONS 106 CITATIONS
SEE PROFILE
SEE PROFILE
All content following this page was uploaded by Jiri Schimmel on 29 June 2015.
ABSTRACT the ODEs depends on an input signal voltage and on a circuit state
(capacitor voltages). Therefore, the described system is considered
Digital simulation of guitar tube amplifiers is still an opened topic. to have more inputs. To reduce the computational complexity, the
The efficient implementation of several parts of the guitar ampli- solution of the ODEs is pre-computed and approximated for the
fier is presented in this paper. This implementation is based on combination of different inputs (the input signal and the capaci-
the pre-computation of the solution of the nonlinear differential tor voltages). The approximated values can be used for one itera-
system and further approximation of the solution. It reduces the tion of the Newton-Rapson method as an estimation or directly as
computational complexity while the accuracy is comparable with output signal values if the step of input voltages is small enough.
the numerical solution. The method is used for simulation of dif- Furthermore, the stability of the solution is guaranteed if the input
ferent parts of the guitar amplifier, namely a triode preamp stage, voltages are within the approximated range.
a phase splitter and a push-pull amplifier. Finally, the results and
comparison with other methods are discussed.
2. BLOCK DIAGRAM OF THE GUITAR TUBE
AMPLIFIER
1. INTRODUCTION
Recently, there has been extensive research in the field of digital A typical guitar tube amplifier is shown in Figure 1. The preamp
simulation of analog guitar effects and amplifiers and several algo- consists of several common-cathode triode amplifiers with differ-
rithms for real-time simulation has been proposed [1]. Fundamen- ent values of circuit elements, a cathode follower and a tone stack
tally, all circuit simulation-based algorithms use a block decompo- circuit. The power amplifier contains a phase splitter, a push-pull
sition, which allows description of each block more precisely. The amplifier, an output transformer and a global negative feedback.
static waveshaping and linear filtration algorithm presented in [2]
provides good results for stationary signals but fails on transients Triode Triode Triode Cathode
because of the dynamic bias changes that appear in analog circuits. Amp. 1 Amp. 2 Amp. 3 Follower
The major advantage of this algorithm is its speed if a nonlinearity
is implemented as the look-up table or approximated via linear or Tone Push-Pull Output
spline interpolation. Stack Part 1 Transformer
Nonlinear wave digital filters (WDF) offer efficient and dy- Phase
namic simulation of circuits with one nonlinear function (more Splitter
nonlinearities typically decrements efficiency). The diode limiter Push-Pull
unit is simulated in [3] and the simulation of common-cathode tri- Part 2
ode amplifier with no grid current is presented in [4]. The WDF
Feedback
are very efficient if the circuit is linear or if there are one [4] or two Filter
[5] nonlinear functions. However, the guitar amplifier circuits can
contain more nonlinear functions.
Numerical methods for simulation of the nonlinear diode lim- Figure 1: Block diagram of a typical guitar tube amplifier.
iter unit are described in [6]. They are based on a numerical so-
lution of the nonlinear differential equations (ODE) and it is pos-
sible to use this method for simulation of more complicated cir- Several simplifications will be introduced in this simulation:
cuits with more nonlinear functions. A similar approach is used in
professional circuit schematic simulators (e.g., SPICE) where the • the simulation is divided into blocks,
nonlinear circuit equations are in matrix form and LU decomposi- • the preamp power supply is constant,
tion is used for solving the system. The major disadvantage is its • the cathode follower is ideal impedance divider,
computational complexity. • the tone stack is the digital filter designed according to [7],
A common-cathode triode amplifier with a nonlinear grid and • the output transformer is ideal,
plate currents, a triode phase splitter and a pentode push-pull am- • the power amplifier load is constant,
plifier are described using nonlinear ODEs in this paper. Subse- • an extra delay block in the feedback to avoid the delay free
quently, the Euler method is applied for the ODEs. The solution of loop.
DAFX-1
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
300 Uc1m = 0 V
A triode amplifier circuit can be found in each guitar preampli-
Uc1m = 3 V
fier. An example of the common-cathode triode amplifier circuit 250
Uc1m = 6 V
is shown in Figure 2. This circuit is described using the nonlinear
differential system 200 Uc1m = 9 V
Ua [V]
Uc1m = 12 V
Uin G1 + Ug G2 150
0 = G2 − Ug G2 − ig Uc1m = 15 V
G1 + Gg + G2
100
dUk (7)
0 = Uk Gk − ia − ig + Ck
dt 50
0 = UN Ga − Ua Ga − Ua GL − ia
0
−40 −20 0 20 40
where ig is grid current ig (Ug −Uk ) and ia is plate current ia(Ug − Uin [V]
Uk , Ua − Uk ). The symbol G represents the conductance of the
resistors from the circuit schematic in Figure 2. The differential
system consists of the three unknown variables Ug ,Uk ,Ua and the Figure 3: Plate voltage functions on different capacitor voltage.
output signal value can be derived directly from the voltage Ua .
DAFX-2
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
c1m
U = 15 V
−10 c1m
−20 33489
16744
8372
−30 4186
2093
f [Hz]
1047
−40 523
−40 −20 0 20 40 262
Uin [V] 131
65
33
16
0 0.5 1 1.5 2 2.5 3
Figure 4: Grid voltage functions on different capacitor voltage. t [s]
35
2.5
100
2 RL = 4 MΩ
0 RL = 1 MΩ
error [%]
1.5
Ua [V]
RL = 0.5 MΩ
1 −100
0.5 −200
0
0 1 2 3 4 5 −300
t [ms] −40 −20 0 20 40
Uin [V]
Figure 5: The output (top) and error (bottom) signal of the simu- Figure 7: The influence of the grid current of an adjacent triode
lated triode amplifier. amplifier to the transfer function of triode amplifier.
DAFX-3
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
In order to simulate the bias shift and the compression, the 5.1. Approximation of Differential Equations
coupling of triode amplifiers has to be simulated together. The out-
put voltage is obtained from the output of the first triode in the first The equations to be approximated are
couple and then is used as the input of next couple. It is supposed Uin G1 + Ug G2
that the third triode connected to the output of the second triode 0 = G2 − Ug G2 − ig
G1 + Gg + G2
in the couple has minimal influence on the first tube of the cou-
Uk Gk − ia − ig
pling. Thus, the second triode of the couple works into a constant 0 = Uc1m − Uc1 −
load. The whole process of block decomposition is illustrated in Ck fs
Figure 8 where the preamplifier containing four triodes is replaced 0 = (UN − Ua )Ga − ia − (U2 − Ug2 )G3
with three couples of triodes. This process of decomposition al- (13)
(U2 − Ug2 )G3
lows the simulation of the adjacent blocks interaction. However, it 0 = Uc2m − Uc2 +
Ca f s
increases the computational complexity.
0 = (U2 − Ug2 )G3 − Ug2 Gg2 − ig2
0 = Uk2 Gk2 − ia2 − ig2
Triode Triode
Amp. 1 Amp. 2 0 = (UN − Ua2 )Ga2 − Ua2 GL − ia2 .
The system has three inputs Uin , Ucm1 , Ucm2 and approximated
Triode Triode
Amp. 2 Amp. 3
functions are
Ug = UGapprox (Uin , Uc1m , Uc2m )
Triode Cathode
Amp. 3 Follower Uk = UKapprox (Uin , Uc1m , Uc2m )
(14)
Ua = UAapprox (Uin , Uc1m , Uc2m )
Figure 8: Preamp block decomposition. IR3 = IR1approx (Uin , Uc1m , Uc2m ).
The capacitor voltages are recomputed using
U k G k − ia − ig
Figure 9 shows the circuit schematic of the couple of triodes. Uc1m [n + 1] = Uc1m [n] − (15)
The second triode amplifier builds the nonlinear load for the first Ck fs
one. The output signal is obtained from the output of the capacitor and
Ca . The ODEs of the couple of triodes are IR3
Uc2m [n + 1] = Uc2m [n] + . (16)
Ca f s
Uin G1 + Ug G2
0 = G2 − Ug G2 − ig
G1 + Gg + G2 5.2. Simulation Results
dUk Figure 10 shows the output signal of the coupling of triode am-
0 = Uk Gk − ia − ig + Ck
dt plifiers. The output signal is compared to the output signal from
0 = (UN − Ua )Ga − ia − (U2 − Ug2 )G3 the single triode amplifier with the same schematic values. The
(12) positive voltage compression of the output signal appears in the
d (Ua − U2 )
0 = Ca − (U2 − Ug2 )G3 coupled triode amplifier and also the capacitor voltage Ucm2 is
dt
discharging because of the grid current of the second triode. This
0 = (U2 − Ug2 )G3 − Ug2 Gg2 − ig2
causes the bias change in the next triode couple.
0 = Uk2 Gk2 − ia2 − ig2
0 = (UN − Ua2 )Ga2 − Ua2 GL − ia2 .
100
50
0
UN
Ra Ra2
Ua R3 Ua2 −50
UOUT [V]
R1 R2 Ca Output −100
Uk Ug2
Ug Uk2 RL −150
Rg Rg2
Uin
Rk Ck Rk2 −200
triode couple
−250 single triode
−300
0 0.5 1 1.5 2 2.5
Figure 9: Circuit schematic of couple of triode amplifiers (R1 = t [ms]
68 kΩ, R2 = 1 Ω, Rg = 1 MΩ, Rk = 2.7 kΩ, Ra = 100 kΩ,
R3 = 470 kΩ, Rg2 = 1 MΩ, Rk2 = 10 kΩ, Ra2 = 100 kΩ, Figure 10: Output signals comparison of single triode amplifier
RL = 4 MΩ, Ck = 680 nF, Ca = 22 nF and UN = 350 V). and couple of triodes.
DAFX-4
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
0 = (Uin − U1 )G1 − (Ug1 − U2 )Gg1 − ig1 Figure 11: Phase splitter circuit schematic (R1 = 1 Ω, Rg1,2 =
d (U1 − Ug1 ) 1 MΩ, Rk = 470 Ω, R2 = 10 kΩ, R3 = 100 kΩ, R4 = 22 kΩ,
0 = C1 − (Uin − U1 )G1 R1 = 4.7 kΩ, Ra1 = 82 kΩ, Ra2 = 100 kΩ, RL1,2 = 4 MΩ,
dt
0 = (Uk − U2 )Gk − ia1 − ig1 − ia2 − ig2 C1,2,3 = 100 µF and UN = 400 V.
0 = (UN − Ua1 )Ga1 − Ua1 GL1 − ia1
UFDB
0 = (UN − Ua2 )Ga2 − Ua2 GL2 − ia2 R3
d (Ug2 − U3 ) UOUT R5 R4
0 = − ig2 + (U2 − Ug2 )Gg2 − C2 (17)
dt
C3
0 = (Ug1 − U2 )Gg1 + (Uk − U2 )Gk −
− (Ug − Ug2 )Gg2 − (U2 − U3 )G2
0 = (U2 − U3 )G2 − U3 G3 − U3 G5 − U4 G4 +
d (Ug2 − U3 ) Figure 12: Circuit schematic of the simplified feedback filter.
+ C2
dt
d (U3 − U4 )
0 = C3 − U4 G4 . 6.1. Approximation of Differential Equations
dt
The ODEs (17) are discretized using (8). The system has four
The feedback signal goes through the feedback filter (see Fig- inputs Uin , Ucm1 , Ucm2 and Ucm3 and the approximated functions
ure 1) connected according to Figure 12 with the analog transfer are
function
Ug1 = UG1approx (Uin , Uc1m , Uc2m , Uc3m )
(R4 R5 C3 )s + R5
H (s) = . Ug2 = UG2approx (Uin , Uc1m , Uc2m , Uc3m )
(C3 R4 R5 + C3 R3 R5 + C3 R3 R4 )s + R3 + R5
(18) Uk = UKapprox (Uin , Uc1m , Uc2m , Uc3m )
The resistor R4 can often be found as the potentiometer “Pres- Ua1 = UA1approx (Uin , Uc1m , Uc2m , Uc3m ) (20)
ence”. In this case, the intensity of the feedback can be changed Ua2 = UA2approx (Uin , Uc1m , Uc2m , Uc3m )
with influence to the frequency response.
The transfer function (18) is discretized using bilinear trans- U2 = U2approx (Uin , Uc1m , Uc2m , Uc3m )
form resulting to discrete transfer function H (z) and the feedback U4 = U4approx (Uin , Uc1m , Uc2m , Uc3m ).
voltage UFDB is obtained from the output of filter H (z) with input
signal UOUT The capacitor voltages are recomputed using
DAFX-5
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
6.2. Simulation Results be divided into two parts. The first one is the grid current circuit
and the second one is the plate current circuit. The both parts are
The simulation of the triode phase splitter block was tested with independent because there is no coupling via cathode resistor as
1 kHz sinewave input signal at a sampling frequency of 96 kHz with the triode amplifiers. The plate resistors Ra simulates the
and an amplitude of 8 V. The inverted signals Ua1 and Ua2 (see loudspeaker load transformed by the output transformer. It must
Figure 13) are nonlinearly distorted and have different amplitude be noted that a high level of simplification was used because the
as was expected. Figure 14 displays the frequency response of speaker load is frequency dependent and the output transformer
the tube power amplifier with different values of potentiometer R4 is far from an ideal one. The resistor RD simulates the rectifier
(Presence). The maximal presence effect occurs (dash-dotted line) resistance. It can be used for the simulation of a tube (higher val-
when the potentiometer R4 has the lowest value and there is no ues) or semiconductor rectifier (lower values). The combination of
negative feedback for higher frequencies. For the higher values RD and C2 also simulates power amplifier compression (sagging
of the potentiometer R4 , the negative feedback is constant for all effect).
frequencies. The high-pass filter effect is caused by C1 and C2
capacitors.
UD
Uin UB
450
Rs Ra Ra Rs RD
Ua1 C2
R1 RBUs1 Ua1
400 Ua2
Rg UN
350
C1 Ug1
U0 U1
300 Rg
Ua [V]
250 C1
R1 RB Ua2 Us2
200
-Uin UB
150
10 where the Ub is the bias voltage and Uin are inverted input signals.
Then the plate voltages are computed from
5
0= − ia1 + (UD − Ua1 )Ga1
M [dB]
DAFX-6
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
and the capacitor voltage is recomputed using resulting sound as well. Hence the speaker simulation algorithm
has to be involved in guitar amplifier simulation. Good results are
U c1m [n + 1] = U c1m [n]−
obtained using filtration with measured impulse responses. The
(U1 − UB )Gb + (U1 − Ug1 )Gg (28) impulse responses were measured with varied positioning of the
− .
C1 f s measuring microphone in front of the loudspeaker and subsequently,
The approximated functions for the plate current circuit are the measured impulse responses were interpolated using bilinear
interpolation to simulate any position of the microphone in front
UA1 = UA1approx (Ug1 , Ug2 , Uc2m ) of the loudspeaker. The frequency response for the measured Mesa
US1 = US1approx (Ug1 , Ug2 , Uc2m ) Boogie speaker cabinet is shown in Figure 17 top and the de-
(29) tailed frequency responses for neighboring positions are displayed
UA2 = UA2approx (Ug1 , Ug2 , Uc2m )
in Figure 17 bottom (the dash-dotted and dashed lines show mea-
US2 = US2approx (Ug1 , Ug2 , Uc2m )
sured frequency response and the solid line shows the interpolated
and the new capacitor voltage is obtained from one). The step of the measuring grid was 2 cm.
U c2m [n + 1] = U c2m [n]+
(UN − Uc2m )Gd − (ia1 + ia2 + is1 + is2 )
+ .
C2 f s 0
(30)
M [dB]
−20
7.2. Simulation Results
−40
The push-pull power amplifier with two 6L6GC tubes was simu- 2 3 4
lated with the input 1 kHz sinewave signal with an amplitude of 10 10 10
f [Hz]
200 V and a sampling frequency of 96 kHz. Firstly, the opposite
10
grid voltages were computed from the grid current circuit. Sub-
sequently, these voltages were used as inputs for the plate current 0
M [dB]
circuit. The output signal from the amplifier is shown in Figure 16.
One can see the symmetrical signal limiting, which is typical for −10 measured
power amplifiers and also the output signal amplitude compression measured
−20
(sagging effect) can be seen in Figure 16. The power supply drops interpolated
due the current flowing through the resistor RD and the level of −30 3 4
the output voltage decreases while the input signal has the same 10 10
amplitude. f [Hz]
0
9. REAL-TIME IMPLEMENTATION
U
−5
The algorithms were implemented in C++ language as the VST
0 0.5 1 1.5 2 plug-in effect. IIR filter was used for the tone stack simulation
t [ms]
and the FDL (frequency-domain delay line) convolution was cho-
sen for the loudspeaker cabinet simulation [9]. The major ad-
5 vantage of the FDL convolution is low latency with low compu-
[V]
0
lated (e.g., Marshall and Mesa Boogie). Sound examples are avail-
U
DAFX-7
Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010
compared to the solution of the ODEs and all results were similar [6] T. D. Yeh, J. S. Abel, and J. O. Smith, “Simulation of the
to the Figure (5). The maximal error was about 2% of the maxi- diode limiter in guitar distortion circuits by numerical solu-
mum signal level for 2 V step of input and capacitor voltages. tion of ordinary differential equations,” in Proc. Digital Au-
The algorithms were tested in real-time with a 1.6 GHz PC dio Effects (DAFx-07), Bordeaux, France, Sep. 10-15, 2007,
with 512 MB RAM at a sampling frequency of 48 kHz with 2-x pp. 197–204.
oversampling (polyphase FIR interpolation). The total computa- [7] David T. Yeh and Julius O. Smith, “Discretization of the
tional complexity especially depends on the number of simulated ’59 Fender Bassman tone stack,” in Proc. of the Int. Conf. on
tubes (for four preamp tubes, the phase splitter and the push-pull Digital Audio Effects (DAFx-06), Montreal, Quebec, Canada,
amplifier is about the 58 % of CPU load). The algorithm imple- Sept. 18–20, 2006.
mentation is not optimalized very well. The nonlinear tube mod-
els are implemented according to (1),(3),(5) and (6) and can be [8] N. Koren, “Improved vacuum tube models for SPICE
replaced with the look-up table. simulations,” Available at http://www.normankoren.
com/Audio/Tubemodspice_article.html, 2003.
10. CONCLUSIONS AND FUTURE WORK [9] G. García, “Optimal filter partition for efficient convolution
with short input/output delay,” in Proc. of the AES 113th
The appropriate division of complete guitar tube amplifier into Convention, Los Angeles, California, USA, October 2002.
separated blocks was found, the individual blocks were described [10] D. G. Manolakis and J. G. Proakis, Digital Signal Process-
and the resulting equations were approximated. The major ad- ing: Principles, Algorithms and Applications, Prentice Hall,
vantage of the approximation is constant computational complex- Englewood Cliffs, NJ, USA, 3rd edition, 1991.
ity and the stability of the algorithm compared to algorithms that
use numerical algorithms for solving the implicit nonlinear func- [11] T. Serafini S. Barbati, “A Perceptual Approach on
tions (e.g., K-method [3] or solution of ODEs without approxima- Clipping and Saturation,” Available at http:// www.
tion). This solution also enables more nonlinear functions without simulanalog.org/clip.pdf, 2002.
adding computational load. The major disadvantage is a bounded [12] U. Zölzer, DAFX - Digital Audio Effects, J. Wiley & Sons,
number of accumulation elements in the circuit schematic because Ltd, 1st edition, 2002.
the dimension of approximating functions increases with the num-
ber of accumulation elements, which is related to the memory de-
mands and the computational complexity increases as well.
Future work is related to improving of the push-pull amplifier
and output transformer models. The approximation of the other
methods will be investigated as well.
11. ACKNOWLEDGMENTS
12. REFERENCES
DAFX-8