You are on page 1of 9

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/229010599

Real-time guitar tube amplifier simulation using an approximation of


differential equations

Article · October 2002

CITATIONS READS

17 785

2 authors:

Jaromir Macak Jiri Schimmel

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.

The user has requested enhancement of the downloaded file.


Proc. of the 13th Int. Conference on Digital Audio Effects (DAFx-10), Graz, Austria , September 6-10, 2010

REAL-TIME GUITAR TUBE AMPLIFIER SIMULATION USING AN APPROXIMATION OF


DIFFERENTIAL EQUATIONS

Jaromir Macak Jiri Schimmel


Dept. of Telecommunications, Dept. of Telecommunications,
FEEC, Brno University of Technology FEEC, Brno University of Technology
Brno, Czech Republic Brno, Czech Republic
jaromir.macak@phd.feec.vutbr.cz schimmel@feec.vutbr.cz

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

3. NONLINEAR TUBE MODELS


Ra UN
The accuracy of the simulation is related to the chosen simulation Ua
Ug
algorithm as well as with the nonlinear device models. Koren’s R1 R2
model is used in this paper [8]. RL
The triode plate current is given by Rg Uk
Uin
E1Ex Rk Ck
Ia = (1 + sgn(E1 )) (1)
Kg1
where
Uak 1 Ugk
E1 = log(1 + exp(Kp ( + p )). (2) Figure 2: Triode amplifier circuit schematic (R1 = 68 kΩ, R2 =
Kp µ 2
Kvb + Uak 1 Ω, Rg = 1 MΩ, Rk = 2.7 kΩ, Ra = 100 kΩ, RL = 4 MΩ,
Parameters µ, Ex , Kg1 , Kg2 , Kp and Kvb are listed in table 1, Ck = 680 nF and UN = 350 V).
Ugk is the grid-to-cathode voltage and Uak is the plate-to-cathode
voltage. The pentode plate current is given by
4.1. Approximation of Differential equations
E1Ex Uak
Ia = (1 + sgn(E1 )) arctan( ), (3)
Kg1k Kvb Using the Euler method
where yn+1 = yn + Ts f (yn+1 ) (8)
Ug2k 1 Ug1k
E1 = log(1 + exp(Kp ( + )) (4)
Kp µ Ug2k with the sampling period Ts for the system (7) leads to a system
and the pentode screen current is given by
Ug2k Uin G1 + Ug G2
exp(Ex log( µ
+ Ug1k ) 0 = G2 − Ug G2 − ig
Is = . (5) G1 + Gg + G2
Kg2 Uk Gk − ia − ig (9)
0 = Uc1m − Uc −
Voltage Ug1k is the pentode grid-to-cathode voltage and Ug2k is Ck f s
the screen-to-cathode voltage. The grid current is not specified in 0 = UN Ga − Ua Ga − Ua GL − ia
[8], therefore the grid model was adopted from SPICE simulator.
The grid current is that consists of unknown variables Ug ,Uk ,Ua , the capacitor volt-

gcf (ugk − gco )3/2 ugk ≥ gco age Uc1m from the last sample period and the input signal voltage
Ig = (6) Uin . This means that the system contains two inputs Ukm and
0 ugk < gco
Uin . The unknown variables Ug ,Uk ,Ua can be numerically com-
where gcf = 1 · 10−5 and gco = −0, 2. puted for the different combinations of the inputs and then can be
approximated as the functions of two input variables
Tube µ Ex Kg1 Kg2 Kp Kvb
12AX7 100 1.4 1060 - 600 300 Ug = UGapprox (Uin , Uc1m )
6L6GC 8.7 1.35 1460 4500 48 12 Uk = UKapprox (Uin , Uc1m ) (10)
EL34 11.0 1.35 650 4200 60 24
Ua = UAapprox (Uin , Uc1m ).
Table 1: Model parameters for different tubes. The approximated functions of plate and grid voltages are depicted
in Figures 3 and 4.

4. TRIODE AMPLIFIER SIMULATION 350

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

smaller the step is, the better-obtained accuracy. The step of 2 V


30
U =0V for the input voltages and the cubic spline interpolation were used.
c1m
20 Figure 6 shows the sine sweep log spectogram and frequency re-
Uc1m = 3 V
sponse of the triode amplifier. The gain is reduced at low frequen-
U =6V cies due to the negative cathode feedback. The frequency response
10 c1m
Uc1m = 9 V is distorted at the frequencies close to the Nyquist frequency due
0 U = 12 V to bilinear transform warping.
Ug [V]

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

Once the functions are approximated, the simulation process


starts. Firstly, the DC voltages are computed, then the voltages
M [dB]
Ug ,Uk ,Ua are computed from (10). The last step is computation 30
of the new capacitor voltage used in next sample period. The ca-
pacitor voltage can be obtained from
25 1
Uk Gk − ia − ig 10 10
2
10
3 4
10 10
5
Uc1m [n + 1] = Uc1m [n] − (11) f [Hz]
Ck fs

where the currents ig and ia are computed from the approximated


Figure 6: Sine sweep log spectogram (top) and frequency response
voltages Ug ,Uk ,Ua .
(bottom) of the simulated triode amplifier.

4.2. Simulation Results


The output voltage for the 1kHz sinewave input with an amplitude 5. SIMULATION OF TRIODE AMPLIFIER CONNECTED
of 5 V at a sampling frequency of 96 kHz is displayed in figure IN SERIES
5 and compared to the solution without the approximation. The
The simulation of the single triode amplifier does not count on the
influence of adjacent blocks, therefore it can be used only as the
400 input triode stage, where the signal is small enough and there is
no grid current flowing to the next triode. For larger input signals,
300 the grid current of adjacent blocks has to be taken into account.
This nonlinear current shifts the bias of the next triode amplifier by
U [V]

200 discharging of the decoupling capacitor and also compresses the


a

output signal due to increasing Ra voltage. The influence of the


100
grid current of an adjacent triode amplifier to the transfer function
0 is shown in Figure 7 where the second triode grid current is related
0 1 2 3 4 5 to the different load of the first triode amplifier.
t [ms]

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

6. TRIODE PHASE SPLITTER SIMULATION


Ra UN
The triode phase splitter is used for amplification of the signal for Ua
the power amplifier tubes and for the inverted signal generation. R1 Ug
The circuit schematic is displayed in Figure 11. The phase split-
RL
ter is far from an ideal one, the inverted signal does not have the C1 Rg
same amplitude as the direct signal and both the signals (direct R2 Rk Uk
Uin
and inverted) are nonlinearly distorted. The phase splitter block
also has influence on the frequency response. The capacitors C1 U3 U2
Rg2 RL2
and C2 build the high-pass filter and the combination of C3 and
R4 emphasizes the middle frequencies by short-circuiting the neg-
ative global feedback on the resistor R5 . The negative feedback C2 U
g2
R3 R5 R4
AC voltage is fed via capacitor C2 to the grid of the second tube.
U4 Ra2 Ua2
To simplify the task, the negative feedback voltage can be fed to C3
the grid of the fist tube with the opposite sign. This means that UFDB
the direct and feedback signal can be summed in front of the phase
splitter block. The feedback voltage in figure 11 is connected to
the ground, which leads to ODEs

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

UFDB [n] = Z −1 {H (z)Z {UOUT [n − 1]}} . (19) (Ug1 − U2 )Gg1 + ig1


Uc1m [n + 1] = Uc1m [n] + (21)
C1 f s
The signal UOUT is obtained at the output of the power ampli-
fier (see equation (26)) and it is delayed one sample period due to and
elimination of the delay free loop. This simplification influences (Ug2 − U2 )Gg2 + ig2
the frequency response of the power amplifier due to the different Uc2m [n + 1] = Uc2m [n] − (22)
C2 f s
phase delay in the feedback. However, the input and output sig-
nals have to be oversampled to reduce aliasing distortion. Thus, and
the frequency distortion caused by the extra unit delay block man- U4 G4
Uc3m [n + 1] = Uc3m [n] + . (23)
ifests outside the audible region. C3 f s

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

100 Figure 15: Push-pull amplifier schematic (R1 = 30 kΩ, RB =


0 0.5 1 1.5 2 2.5 220 kΩ, Rg = 5 kΩ, Ra = 1.7 kΩ, Rs = 1 kΩ, RD = 500 Ω,
t [ms]
C1 = 22 nF, C2 = 100 µF, UB = −50 V and Un = 450 V).
Figure 13: Inverted and direct output signal of the phase splitter
The grid voltages Ug1 and Ug2 are computed from
simulation for 1kHz sinewave input with an amplitude of 8 V at a
sampling frequency of 96 kHz. d (U0 − U1 )
0 = C1 − (Uin − U0 )G0
dt
0 = (Uin − U0 )G0 − (U1 − UB )GB − (U1 − Ug1 )Gg1 (24)
15 0 = (U1 − Ug1 )Gg1 − ig

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]

0 Min Presence 0= − ia2 + (UD − Ua2 )Ga2


Max Presence
0= − is1 + (UD − Us1 )Gs1
−5
0= − is2 + (UD − Us2 )Gs2 (25)
−10 0= − ia1 − ia2 − is1 − is2 + (UN − UD )GD −
dUD
−15 1 − C2
10 10
2 3
10 10
4
10
5 dt
f [Hz]
and finally, the output signal is obtained from
Figure 14: Frequency response of the phase splitter for minimal Ua1 − Ua2
UOUT = (26)
value of R4 (maximal presence effect) and maximal value of R4 N
(minimal presence effect).
where N is the output transformer ratio.

7.1. Approximation of Differential Equations


7. OUTPUT POWERAMP SIMULATON
The approximated functions for the grid current circuit are
A typical guitar power amplifier consists of two or four pentodes
connected in push-pull topology operating in class A or class AB. Ug = UGapprox (Uin , Uc1m )
(27)
A simplified circuit schematic is displayed in Figure 15 and it can U1 = U1approx (Uin , Uc1m )

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]

Figure 17: Frequency responses of measured Mesa Boogie speaker


cabinet.
5
[V]
OUT

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]

tational complexity. Several famous guitar amplifiers were simu-


OUT

0
lated (e.g., Marshall and Mesa Boogie). Sound examples are avail-
U

−5 able on the web page www.utko.feec.vutbr.cz/~macak/


DAFx10/. The amplifiers were decomposed according to the pre-
0 20 40 60 80 vious chapters and each part was described by the ODEs and then
t [ms]
approximated. The real values of the circuit elements and also the
topology depend on the particular amplifier. However, the circuits
Figure 16: The output signal from the output transformer – sym- shown in this paper are very similar to the original ones. The com-
metrical limiting (top), compression effect (bottom). putational complexity of the simulation algorithm is constant, the
output signal value and the new capacitor values are computed us-
ing approximating functions. Therefore, the computational com-
8. SPEAKER CABINET SIMULATION USING IMPULSE plexity depends on the chosen approximation technique. The low-
RESPONSE APPROXIMATION est computational complexity is achieved when linear approxima-
tion is used. However, a large resolution of the look-up table for
Complete guitar amplifier simulation was described in previous linear approximation has to be used for smooth behavior of the
sections. However, the amplifier can not work without the loud- approximated function. Therefore, the spline approximation was
speaker and the loudspeaker dramatically affects the color of the used for this simulation. The simulation using approximation were

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

This paper was supported by the Fund of the Council of Higher


Education Institutions of the Czech Republic under project no.
2912/2010.

12. REFERENCES

[1] J. PAKARINEN and D. T. YEH, “A review on digital guitar


tube amplifier modeling techniques,” Computer Music J.,
vol. 33, no. 2, pp. 85–100, Jun. 2009.
[2] T. D. Yeh, J. S. Abel, and J. O. Smith, “Simplified,
physically-informed models of distortion and overdrive gui-
tar effects pedal,” in Proc. Digital Audio Effects (DAFx-07),
Bordeaux, France, Sep. 10-15, 2007, pp. 189–196.
[3] T. D. Yeh and J. O. Smith, “Simulating guitar distortion
circuits using wave digital and nonlinear state-space formu-
lations,” in Proc. Digital Audio Effects (DAFx-08), Espoo,
Finland, Sept. 1-4„ 2008.
[4] J. Pakarinen and M. Karjalainen, “Wave digital simulation
of a vacuum-tube amplifier,” in Proc. Intl. Conf. on Acous-
tics, Speech, and Signal Proc., Toulouse, France, May 15-19,
2006.
[5] J. Pakarinen, M. Tikander, and M. Karjalainen, “Wave digital
modeling of the output chain of a vacuum-tube amplifier,” in
Proc. of the Int. Conf. on Digital Audio Effects (DAFx-09),
Como, Italy, Sept. 1–4, 2009.

DAFX-8

View publication stats

You might also like