ArticlePDF Available

Real-Time Guitar Preamp Simulation Using Modified Blockwise Method and Approximations

Authors:

Abstract and Figures

The designing of algorithms for real-time digital simulation of analog effects and amplifiers brings two contradictory requirements: accuracy versus computational efficiency. In this paper, the simulation of a typical guitar tube preamp using an approximation of the solution of differential equations is discussed with regard to accuracy and computational complexity. The solution of circuit equations is precomputed and stored in N-D tables. The stored values are approximated, and therefore different approximation techniques are investigated as well. The approximated functions are used for output signal computation and also for circuit state update. The designed algorithm is compared to the numerical solution of the given preamp and also to the real preamp.
Content may be subject to copyright.
Hindawi Publishing Corporation
EURASIP Journal on Advances in Signal Pr ocessing
Volume 2011, Article ID 629309, 11 pages
doi:10.1155/2011/629309
Research Ar ticle
Real-Time Guitar Preamp Simulation
Using Modified Blockwise Method and Approximat ions
Jaromir Macak and Jir i Schimmel
Faculty of Electrical Engineering and Communication, Brno University of Technology, 61600 Brno, Czech Republic
Correspondence should be addressed to Jaromir Macak, jaromir.macak@phd.feec.vutbr.cz
Received 14 September 2010; Revised 12 December 2010; Accepted 27 January 2011
Academic Editor: Vesa Valimaki
Copyright © 2011 J. Macak and J. Schimmel. This is an open access article distributed under the Creative Commons Attribution
License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly
cited.
The designing of algorithms for real-time digital simulation of analog eects and a mplifiers brings two contradictory requirements:
accuracy versus computational eciency. In this paper, the simulation of a t ypical guitar tube preamp using an approximation of
the solution of dierential equations is discussed w ith regard to accuracy and computational complexity. The s olution of circuit
equations is precomputed and stored in N-D tables. The stored values are approximated, and therefore dierent approximation
techniques are investigated as well. The approximated functions are used for output sig nal computation and also for circuit state
update. The designed algorithm is compared to the numerical solution of the given preamp and also to the real preamp.
1. Introduction
The real-time digital simulation of analog guitar eects and
amplifiers has always been, unfortunately, a compromise
between accuracy and speed of a simulation algorithm.
There are many dierent approaches to the simulation,
such as a black box approach, a white box (informed)
approach, circuit-based approaches, and so forth [1]. All
these algorithms dier in accuracy of the simulation as well as
in computational complexity. The circuit-based techniques
usually oer the best accuracy because a simulated circuit
is exactly described by circuit equations, which are often
dierential equations. Nevertheless, the computational com-
plexity needed for a solution of these equations is very high
[2]. Hence, more ecient algorithms for the solution of
the equations must be found. This can often be made by
neglecting unimportant factors, for example, tube heating,
decomposing into separate blocks [3], and decomposing
into a linear and nonlinear part. Subsequently, the separate
simplified block can be described by a new set of circuit
equations that can be solved using several methods, for
example, digital filters and waveshaping [3], Hammerstein
model [4]. The triode amplifier simulation using wave digital
filters is described in [5, 6] and an enhanced tube model
with a grid current is presented in [ 7]. A decomposition
into a linear dynamic and a nonlinear static part is used in
nonlinear state-space formulations [8, 9] and this method
was automated in [10], where the algorithm parameters
are derived from the SPICE netlist. An extended state-
space representation was used in [11]forguitarpoweramp
simulation. A direct solution of nonlinear circuit ordinary
dierential equations (ODEs) was used in [2, 12], but
the computational requirements are high. Therefore, an
approximation of the solution of ODEs was used in [13].
However, an approximation of nonlinear functions are also
used in [6, 10].
In this paper, a typical guitar preamp is simulated using
the approximation of a solution of dierential equations.
First of all, the guitar preamp is decomposed into separate
blocks. It is necessary to find a proper division, because it can
influence the accuracy of the whole simulation. A commonly
used division into blocks does not consider mutual interac-
tions between connected blocks. As was shown in [13, 14],
the simulation fails especially if the load of the simulated
block is nonlinear, which is t ypical for circuits with tubes.
Therefore, a modification designed in [13] and investigated
in [14] must be used in order to get good simulation results if
the blocks are highly nonlinear and connected in series. After
2 EURASIP Journal on Advances in Signal Processing
the decomposition, the new set of dierential equations is
approximated according to [13]. The chosen approximation
markedly aects the accuracy of the algorithm as well as
the computational complexity. Therefore, several t ypes of
approximations will be discussed.
Considering real-time simulation, the computational
complexity must be inv estigated. Commonly used electronic
circuit simulators has a computational complexity given
by O(N
1.4
)whereN is the number of circuit nodes [1].
However, this notation does not determine the real compu-
tational complexity, that is, the real number of mathematical
operations of the algorithm. Thus in this paper, the whole
guitar preamp is numerically simulated using a similar
approach as in the electronic circuit simulators and the
number of instructions required for one signal sample is
computed. It is compared to the number of instr u ctions of
the numerical simulation based on the division into blocks
and also to the number of instructions of the approximated
solution of the given circuit.
Finally, t he accuracy of the numerical simulation of the
whole preamp must be compared to the simulation using
approximation and also to a real guitar preamp.
2. Guitar Preamp Simulation
A guitar tube preamp usually consists of several triode
amplifiers connected in series. The separate triode amplifiers
are decoupled using decoupling capacitors in order to
remove DC. The number of triode amplifiers in the circuit
depends on a given topology and therefore it can dier for
dierent preamps. Guitar preamps usually contain two to five
triode amplifiers. They are usually connected as a common-
cathode amplifier. However, the preamp can also contain a
cathode follower (e.g., Marshall). The circuit schematic of
a testable guitar tube preamp is shown in Figure 1 and the
values for circuit elements are listed in Table 1.Thevalues
were chosen as typical values for tube circuits. This preamp
consists of four common-cathode triode amplifiers. This
circuit schematic is similar to circuit schematics that are used
in some real “Hi Gain guitar amplifiers (e.g., Mesa Boogie
or Engl). Only the values of the circuit elements can have
diering values, some of the common-cathode amplifiers
canhaveacathodecapacitortogainthehighfrequencies
and a potentiometer “Gain with a capacitor connected
between terminals of the potentiometer are used instead of
resistors R
2
and R
g2
(see Figure 1). However, the frequency
dependence of the “Gain parameter caused by the capacitor
can be simulated by a linear filter.
In order to simulate the preamp from Figure 1,an
analysis of the circuit must be done. The circuit equations
can be obtained using nodal analysis. In this case, Kirchho
¨
ı
Current Law (KCL) is used. After obtaining circuit equations,
a discretization of dierential equations is realized. The
backward Euler method with step of a sampling period was
used. Naturally, a dierent method for discretization can be
used, however, this method was chosen due to its simplicity.
More information about obtaining the equations can be
Table 1: Values for circuit elements for Figure 1.
R
1
R
g1
R
k1
R
p1
R
2
R
g2
68 kΩ 1MΩ 2.7 kΩ 100 kΩ 470 kΩ 1MΩ
R
k2
R
p2
R
3
R
g3
R
k3
R
p3
1.8 kΩ 100 kΩ 470 kΩ 470 kΩ 1.8 kΩ 100 kΩ
R
4
R
g4
R
k4
R
p4
R
L
470 kΩ 470 kΩ 1.8 kΩ 100 kΩ 4MΩ
C
1
C
2
C
3
C
4
V
ss
1 µF 22nF22nF22nF400V
found in [13]. The final circuit equations describing the
circuit in Figure 1 are
0
=
V
in
V
g1
G
1
V
g1
G
g1
i
g1
,
0
= V
c1m
V
c1
V
k
G
k
i
p1
i
g1
C
1
f
s
,
0
=
V
ss
V
p1
G
p1
V
2
V
g2
G
2
i
p1
,
0
= V
c2m
V
c2
V
2
V
g2
G
2
C
2
f
s
,
0
=
V
2
V
g2
G
2
V
g2
G
g2
i
g2
,
0
= V
k2
G
k2
i
g2
i
p2
,
0
=
V
ss
V
p2
G
p2
V
3
V
g3
G
3
i
p2
,
0
= V
c3m
V
c3
V
3
V
g3
G
3
C
3
f
s
,
0
=
V
3
V
g3
G
3
V
g3
G
g3
i
g3
,
0
= V
k3
G
k3
i
g3
i
p3
,
0
=
V
ss
V
p3
G
p3
V
4
V
g4
G
4
i
p3
,
0
= V
c4m
V
c4
V
4
V
g4
G
4
C
4
f
s
,
0
=
V
4
V
g4
G
4
V
g4
G
g4
i
g4
,
0
= V
k4
G
k4
i
g4
i
p4
,
0
=
V
ss
V
p4
G
p4
V
p4
G
L
i
p4
,
(1)
where i
g
is the grid current function i
g
(U
g
U
k
)andi
a
is the
plate current function i
a
(U
g
U
k
, U
a
U
k
). The symbol G
represents the conductance of the resistors from the circuit
schematic in Figure 1, f
s
is the sampling frequency, V
ss
is the
power supply, and V
in
is the input voltage. Voltages V
c1m
,
V
c2m
, V
c3m
,andV
c4m
are the voltages on the capacitors in
the previous signal sampling period. Equations (1)have15
unknown voltage variables (denoted in Figure 1); 1st, 5th,
9th, 13th equations describe grid nodes of all tubes four
EURASIP Journal on Advances in Sig nal Processing 3
R
p1
V
g1
V
p1
V
k1
C
1
C
4
C
2
R
k1
V
2
R
2
V
g2
R
g2
R
g1
R
p2
V
p2
V
p3
C
3
R
g3
V
g3
R
3
V
3
R
k3
V
k3
R
k2
V
k2
R
4
V
4
R
g4
V
g4
R
p4
R
p3
V
p4
R
k4
V
k4
R
L
Gain
potentiometer
R
1
V
in
V
ss
Figure 1: A guitar tube preamp circuit schematic.
tubes; 2nd, 6th, 10th, and 14th equations are cathode nodes
and 3rd, 7th, 11th, 15th equations are anode nodes. Korens
nonlinear model of a triode has been used in this paper [15].
The triode plate current is given by
i
a
=
E
E
x
1
K
g1
1+sgn
(
E
1
)
,(2)
where
E
1
=
U
ak
K
p
log
1+exp
K
p
1
µ
+
U
gk
K
vb
+ U
2
ak
.
(3)
Parameters µ, E
x
, K
g1
, K
g2
, K
p
,andK
vb
,areavailablein[15],
U
gk
is the grid-to-cathode voltage and U
ak
is the plate-to-
cathode voltage. The grid current is not specified in [15],
and therefore the grid model was adopted from the Microcap
simulator [16]. The grid current is
i
g
=
g
cf
u
gk
g
co
3/2
, u
gk
g
co
,
0, u
gk
<g
co
,
(4)
where g
cf
= 1 · 10
5
and g
co
=−0.2. Frequency properties
of the tube (e.g., Miller capacitance) are not considered in
the simulation due to simplicity of tube model. However,
it influences accuracy of the simulation, because the Miller
capacitance makes a low-pass filter at the input of the tube.
[17]
Generally, a system of nonlinear equation (1 )issolved
using the Newton-Raphson method
x
i+1
n
= x
i
n
J
1
x
i
n
F
x
i
n
,(5)
where x
i
n
is a vector of unknown voltages, J(x
i
n
)isthe
Jacobian matrix, and F(x
i
n
)isthefunctiongivenby(1), i
denotes iteration index and n is the time index.
However, if it is a real-time simulation, computational
demand has to be investigated. According to (1), the function
F(x
i
n
) involves four grid functions (4), four plate functions
(2), 47 add operations, and 3 1 multiply operations if the
sampling frequency f
s
is substituted with the sample period
T
s
= 1/f
s
and values of capacitors are substituted with
the reciprocal values. Considering the computational cost
of nonlinear device model functions (2)and(4)asc
p
and
c
g
respectively, the total cost of the function F(x
i
n
)isc
f
=
78 + 4c
p
+4c
g
operations. The J a cobian matrix J(x
i
n
)contains
partial first-order derivation of t he function F(x
i
n
). Since
the function F(x
i
n
) has not been a continuous function,
the derivations are computed for instance using the finite
dierence formula
f
(
x
)
=
1
h
f
(
x + h
)
f
(
x
)
(6)
with a step h that consists of two function calls F(x
i
n
)and
two add operations and one multiply operation. The total
cost of the Jacobian matrix computation is N +1function
calls resulting in (c
f
+3)N operations. When the Jacobian
matrix is established, its inversion matrix is computed. The
computational complexity depends on the chosen algorithm
of the matrix inversion. Generally, it is a O(N
3
)problem.
However, the LU decomposition oers a more ecient
implementation. Then, (5) is rewritten as
LU
= J
x
i
n
,(7)
Ly
= F
x
i
n
,(8)
UΔx
i
n
= y,(9)
x
i+1
n
= x
i
n
Δx
i
n
. (10)
According to [18], the cost of (7) (Crouts algorithm) is
(1/3)N
3
of inner loops containing one multiply and add
operation, the cost of (8)and(9)isN
2
multiply and add
operations. Thus, the total cost is c
LU
= (2/3)N
3
+4N
2
operations. Knowing Δx
i
n
,(10) can be solved, which requires
N add operations. The total cost of the New ton method is
then
c
nm
= i
c
f
+3
N + c
f
+
2
3
N
3
+4N
2
+ N
, (11)
where i is a number of iterations of the Newton method
and N is the number of circuit nodes. However, it must be
said that this number is theoretical. Neither of the algorithm
branches nor memory movements have been considered.
4 EURASIP Journal on Advances in Signal Processing
Triod e
amp. 1
Triod e
amp. 2
Triod e
amp. 2
Triod e
amp. 3
Triod e
amp. 3
Triod e
amp. 4
Figure 2: Preamp block decomposition using modified blockwise
method [13].
C
1
R
1
R
p1
V
g1
V
p1
V
k1
C
2
R
k1
V
2
R
2
V
g2
R
g2
R
p2
V
p2
R
k2
V
k2
R
L
R
g1
V
ss
V
in
Figure 3: Circuit schematic of the rst block of the guitar preamp.
3. Simulation Using Modified
Blockwise Method
The simulated circuit c an also be divided into b locks. An
example of division into blocks using the modified blockwise
method [14]isshowninFigure2. The whole circuit from
Figure 1 is divided into three separate blocks containing two
tubes in this case. Two types of blocks are used. The first
one contains the common-cathodetubeamplierwitha
cathode capacitor and is used as the first block in Figure 2.
The other one contains the common-cathode tube amplifier
without the cathode capacitor and is used as the second
and third block. Then, the simulation requires a solution
of three independent simpler blocks, and as a result the
computational complexity can be lower.
The circuit schematic of the first block is shown in
Figure 3. It consists o f two common-cathode tube amplifiers,
thefirsttubeamplierisconnectedexactlyaccordingtothe
circuit schematic in Figure 1. The second tube amplifier is
similar to the second tube amplifier in 1, only the second
decoupling capacitor is not included and the load resistor
R
L
is connected directly to plate of the second tube. This
can be done, because the value of resistor R
L
and presence
of decoupling capacitor have very low influence on the first
preamp [14] because the output signal is obtained at the
output of the first amplifier and the second amplifier builds
only the load of the first amplifier. The value of resistor R
L
is
4MΩ and the others circuit elements values can be obtained
from Table 1. The output signal voltage is obtained from the
node V
2
.
The circuit is described by
0
=
V
in
V
g1
G
1
V
g1
G
g1
i
g1
,
0
= V
c1m
V
c1
V
k
G
k
i
p1
i
g1
C
1
f
s
,
0
=
V
ss
V
p1
G
p1
V
2
V
g2
G
2
i
p1
,
0
= V
c2m
V
c2
V
2
V
g2
G
2
C
2
f
s
,
0
=
V
2
V
g2
G
2
V
g2
G
g2
i
g2
,
0
= V
k2
G
k2
i
g2
i
p2
,
0
=
V
ss
V
p2
G
p2
V
p2
G
L
i
p2
.
(12)
The function F(x
n
) involves 15 multiply operations and 22
add operations and four nonlinear function calls resulting
in c
f
= 37 + 2c
p
+2c
g
operations. The equation is solved
using the Newton method as well. Therefore, (11)canbe
used for t he determination of the computational complexity.
For given N
= 7, the total cost is
c
nm
= i
749 + 16
c
g
+ c
p

. (13)
Figure 4 shows the circuit schematic of the second and
third block. The circuit elements values can be derived from
Tab l e 1. The block contains t wo common-cathode tube
amplifiers without the cathode capacitor. The output signal
is obtained from the node V
2
.
The computational complexity is similar to the first
block. The y only dier in the function F(x
n
), because the
cathode capacitor in the first amplifier is missing (circuit
equations are not explicitly shown). Therefore, it has c
f
=
34 + 2c
p
+2c
g
operations in this case. The cost is then
c
nm
= i
728 + 16
c
g
+ c
p

. (14)
If the blocks are connected together, the total cost of the
solution of these blocks is
c
nm
= i
1
749 + 16
c
g
+ c
p

+
+
(
i
2
+ i
3
)
728 + 16
c
g
+ c
p

,
(15)
where i
1
, i
2
,andi
3
are numbers of iterations of the first,
second, and third block, respectively.
4. Simulation Using Modified Blockwise
Method and Approximation
Asystemofdierential equations can be described by the
equation
0
= F
(
V
in
, V
c1
, V
c2
, ..., V
cM
)
,
(16)
where V
in
is an input voltage or an input signal value and
V
c1
, V
c2
, ..., V
cM
are voltages on capacitors. Thus, the system
EURASIP Journal on Advances in Sig nal Processing 5
R
1
R
p1
V
g1
V
p1
V
k1
C
2
R
k1
V
2
R
2
V
g2
R
g2
R
p2
V
p2
R
k2
V
k2
R
L
R
g1
V
in
V
ss
Figure 4: Circuit schematic of the second block of the guitar
preamp.
has N = M +1 inputs and also N outputs—an output voltage
or an output signal level and new voltages on the capacitors.
The system has a particular solution for a combination of the
inputs. The solution can be precomputed for certain combi-
nations of the input voltages and it must be approximated,
because the solution has to involve all combinations of the
input voltages [13]. The output signal value is computed on
the basis of the approximated solution. Then, the state of the
circuit (capacitor voltages) is actualized. The new capacitor
voltages are used as the inputs for the next sample period.
The approximation leads to the following set of equations:
V
n
out
= F
out
V
n
in
, V
n
c1
, V
n
c2
, ..., V
n
cM
,
V
n+1
uc1
= V
n
uc1
+ T
s
F
c1
V
n
in
, V
n
c1
, V
n
c2
, ..., V
n
cM
,
V
n+1
uc2
= V
n
uc2
+ T
s
F
c2
V
n
in
, V
n
c1
, V
n
c2
, ..., V
n
cM
,
.
.
.
V
n+1
ucM
= V
n
ucM
+ T
s
F
cN
V
n
in
, V
n
c1
, V
n
c2
, ..., V
n
cM
,
(17)
where functions F
out
, F
uc1
, F
uc2
, ..., F
ucM
are approximating
functions, T
s
is the sample period, and the superscript n
denotes time index. The function F
out
approximates directly
the output signal value and the functions F
uc1
, F
uc2
, ..., F
ucM
approximate changes of the capacitor voltage. The compu-
tational complexity depends on the number of accumula-
tion circuit elements (capacitors) N. The computation of
one output signal sample requires M,addoperations,M,
multiply operations and N, computations of approximating
functions. Therefore, the total computational complexity
markedly depends on the chosen approximation. Further-
more, the chosen approximation influences the accuracy of
the algorithm and also memory requirements.
(i) Linear Interpolation oers the fastest implementa-
tion. However, it requires many precomputed values
for smooth behavior. The linear interpolation is given
by
V
out
= V
i
out
1 p
+ V
i+1
out
p
, (18)
where V
i
out
are precomputed output values, i is index
into a vector of fprecomputed output values and p is
a fractional part between neighbouring precomputed
values [19]. The linear interpolation consists of two
add operations, two multiply operations, index and
fractional part computation. The bilinear interpola-
tion has to be used as the approximating function
for the first-order dierential system, because the
system has two inputs: input signal and the capacitor
voltage. The bilinear interpolation requires three lin-
ear interpolations (18). Generally, the N-dimensional
linear interpolation must be used, if t here are M
accumulation elements. It requires 2
N
1linear
interpolations.
(ii) Spline Interpolation oers the smooth behavior of an
approximating function. The spline interpolation is
given by
V
out
=
p
3
6
V
i1
out
+
1+p
3
4p
3
6
V
i
out
+
2 p
3
4
1 p
3
6
V
i+1
out
+
1 p
3
6
V
i+2
out
,
(19)
where p is the fractional part between neighbouring
precomputed values [19]. It consists of 10 add oper-
ations and 19 multiply operations, index and frac-
tional part computation. The N-dimensional spline
interpolation requires (4
N
1)/3 spline interpolations
(19).
(iii) Cubic Spline Approximation also oers the smooth
behavior of approximating function but compared
to the spline interpolation, coecients of cubic
polynomials are stored instead of the precomputed
values. The cubic polynomial is given by
V
i
out
= a
j
V
3
in
+ b
j
V
2
in
+ c
j
V
in
+ d
j
=

a
j
V
in
+ b
j
V
in
+ c
j
V
in
+ d
j
,
(20)
where j index is into a vector of polynomial coe-
cients [20]. It consists of three add operations and
three multiply operations. The combination of spline
and linear approximation can be used for the higher-
order system simulation, because the functions that
are being approximated have very similar shape
with dierent capacitor voltages V
c1
, V
c2
, ..., V
cN
,
as shown in simulations in [13]. The splines are
used for dierent input signal values and the linear
interpolation (18)fordierent capacitor voltages.
Two spline approximations (20)andonelinear
interpolation (18) are required for the rst-order
system (N
= 2). Generally, it requires 2
(N1)
1linear
interpolations and 2
(N1)
spline approximations.
All approximations and interpolations work with indexes
into a vector of spline coecients or precomputed values of
6 EURASIP Journal on Advances in Signal Processing
the solution of the system. It is necessary to find ecient
determination of the index, if it is real-time simulation. The
fastest way of determination of the index is computation
directly from the input values. The solution of the system is
precomputed for integer values of the inputs. Then the index
is obtained from
i
=V
in
(21)
and the fractional part is obtained from
p
= V
in
i.
(22)
The system of (12) has three inputs (input voltage and
two input voltages on capacitors), and therefore M
= 2and
N
= 3 and three approximating functions are needed. The
solution was precomputed (er ror limit of Newton method
was 0.0001). The approximating functions F
out
, F
c1
,andF
c2
are plotted in F igure 5 for input voltage signal between 20
and 50 V and for capacitor voltages V
C 1
= 0V,5VandV
C 2
=
100 V, 200 V, 300 V. Naturally, the capacitor voltages can have
any value between 0 V and the power supply voltage.
The individual functions have very similar shapes with
dierent capacitor voltages. Therefore, splines are used for
the approximation with constant capacitor voltages and
dierent input voltage V
in
and then, computed spline
coecients are stored in look-up table in a row r that was
computed as a linear function of the input and c apacitor
voltages
r
= V
in
V
c1
steps
V
c2
steps
+ V
c1
V
c2
steps
+ V
c2
.
(23)
Then, the spline coecients are computed for dierent
capacitor voltage values. Subsequently, linear interpolation
between spline curves is used in order to get the final values.
It was experimentally found that the coecient computation
can be made for two values of the capacitor voltage V
C 1
(minimal value 0 V and maximal possible value that depends
on values of resistors in the circuit). The step of the capacitor
voltage V
C 2
was 5 V between 0 V and the power supply
voltage 400 V. Other capacitor voltages are interpolated. The
input voltage grid was
±200 V w ith a step of 1 V (see Table 2).
The input voltages can be of course lower than 1 V, but in
this range the approximated function is almost linear, and
therefore it can be approximated by the spline with low error.
The maximal chosen deviation between numerical solution
and approximation was 0.1 V. Index into the table of spline
coecients is dependent on the input voltage and capacitor
voltages and a number of rows r of the table can be obtained
from
n
r
= V
in
steps
V
c1
steps
V
c2
steps
(24)
and in this case, it is 64000 rows. The size is 2 MB per table, if
double precision floating point numbers are used. The total
size of all tables is 6 MB. The final equation for the simulation
of this block are
V
n
out
= F
out
V
n
in
, V
n
c1
, V
n
c2
,
V
n+1
uc1
= V
n
uc1
+ T
s
F
c1
V
n
in
, V
n
c1
, V
n
c2
V
n+1
uc2
= V
n
uc2
+ T
s
F
c2
V
n
in
, V
n
c1
, V
n
c2
.
, (25)
Table 2: Lookup table for simulation of the first block (size 2 MB).
Variable Min. Max. Step
V
in
[V] 200 200 1
V
C1
[V] 0 5 5
V
C2
[V] 0 400 5
Table 3: Look-up table for s imulation of the second and third block
(size 1 MB).
Variable Min. Max. Step
V
in
[V] 200 200 1
V
C1
[V] 0 400 5
Table 4: Computational complexity comparison of simulations
based on the New ton method—number of operations.
Simulation
type
One
iteration
Maximal
iteration
Average
iteration
Whole 5. 48 × 10
3
5.48 × 10
5
1.53 × 10
4
By blocks 2.97 × 10
3
1.39 × 10
4
6.89 × 10
3
The circuit schematic from Figure 4 has only two
inputs—input voltage V
in
and capacitor voltage V
C 1
.There-
fore, only two approximating functions (F
out
and F
c1
)are
needed (see Figure 6). They were approximated using the
same technique as the functions in the previous circuit.
The input voltage grid was
±200 V with a step of 1 V and
capacitor voltage V
c1
grid was between 0 V and the power
supply voltage with a step of 5 V (see Table 3). The total size
of both tables is 2 MB in this case. The final equations for the
simulation of this block are
V
n
out
= F
out
V
n
in
, V
n
c1
,
V
n+1
uc1
= V
n
uc1
+ T
s
F
c1
V
n
in
, V
n
c1
.
(26)
The final simulation equations (25), (26)arequite
simple. This is the biggest advantage when comparing with
other methods for real time simulation, for example, the
state space method, which requires matrix operations and
also nonlinear function precomputation stored N-D lookup
table.
5. Computational Complexity
Theproposedalgorithmswerecomparedwithregardtothe
computational complexity. For this purpose, the functions
(2)and(4) of the nonlinear device model were tabulated and
interpolated using the linear interpolation. As a result, the
cost c
g
is two add operation, and two multiply operations,
the cost c
p
is six add operations and six multiply operations.
Tab l e 4 shows a number of operations required for the
simulations based on the Newton method. Since the New ton
method is an iterative process, the number of operations
was investigated for one iteration, for the average number
of iterations and the maximal number of iterations per
sample as well. However, the average and maximal number of
iterations depend on the type of the input signal. Therefore,
EURASIP Journal on Advances in Sig nal Processing 7
20 100 1020304050
300
200
100
0
100
V
2
(V)
V
in
(V)
(a)
F
c1
(Vs
1
)
20 100 1020304050
0
5000
5000
V
in
(V)
(b)
F
c2
(Vs
1
)
20 100 10203040
50
15
10
5
0
5
×10
4
V
in
(V)
V
c1,2
: 0 V, 300 V
V
c1,2
: 5 V, 300 V
V
c1,2
:5V,200V
V
c1,2
:0V,100V
V
c1,2
:5V,100V
V
c1,2
: 0 V, 200 V
(c)
Figure 5: Approximating functions for the simulation of the system (12)—output function (a), capacitor C
1
up-date (b) and capacitor C
2
update (c) functions.
20 100 1020304050
400
200
0
200
400
V
in
(V)
V
out
(V)
(a)
2
0
2
4
6
8
×10
4
20 100 1020304050
F
c1
(Vs
1
)
V
in
(V)
V
c1
:0V
V
c1
: 100 V
V
c1
: 200 V
V
c1
: 300 V
V
c1
: 400 V
(b)
Figure 6: Approximating functions for the simulation of the system (12)—output function (a) and capacitor C
2
update function (b).
the algorithms were tested with an E-chord guitar ri
with maximal amplitude around 200 mV. The whole circuit
simulation required 2.79 iterations on average and 100
iterations at the most. In the case of the simulation using
block decomposition, the average numbers of iterations were
i
1
= 2.1294, i
2
= 2.4149, i
3
= 2.6806 and maximal numbers
of iterations were i
1
= 4, i
2
= 5, i
3
= 100 for each block,
respectively. The number of iteration of individual block
diers because each block processes a dierent signal. The
maximum number of iteration was 100 and the error limit of
the Newton method was 1
× 10
5
. The number of iteration
was computed from the whole sig nal (5 s, 240
×10
3
samples).
The computational complexity of algorithms b ased on
approximations is shown in Table 5. There are available
results for the whole preamp simulation as well as for the
blockwise simulation. The numbers were computed from
(25)and(26)wheredierent types of approximation of
appropriate order N from Section 4 were used. Similarly, the
whole system can be approximated by order of approxima-
tion N
= 5, because the whole circuit contains 4 capacitors.
8 EURASIP Journal on Advances in Signal Processing
However, the whole circuit simulation was not implemented
due to complex approximating functions and also the look-
up table size would be huge.
As the results available in Tables 4 and 5 have shown,
the algorithms based on approximation oer constant
computational complexity, which is also much lower than
at the algorithms based on the Newton method. The linear
interpolation has the lowest computational complexity.
However, due to higher memory demands it is not suitable
and therefore the spline approximation was chosen as the
best method.
6. Simulation Results
The algorithm was implemented in C++ language as the
VST plug-in eect and then tested in realtime. It was tested
with a 2.66 GHz i7 Intel Mac with 4 GB RAM at a sampling
frequency of 48 kHz using an external audio interface M-
Audio Fast Track Pro with the ASIO buer size 128 samples.
If no oversampling was used, the CPU load was around 3%.
To reduce aliasing distortion, 4-x oversampling was imple-
mented. Poly phase FIR interpolation and decimation was
used. The CPU load with 4-x oversampling was around 6%.
The proposed algorithm was then tested with dierent input
signals including a sinusoid signal at dierent frequencies
and amplitudes (including frequencies close to the Nyquist
frequency), logarithmic sweep signal (see Figure 7)andalso
a real guitar signal. All the performed simulations were stable
even if no oversampling was used and the amplitude of the
testing signal was around hundreds of volts at the input of the
third block. Comparison between the simulation of whole
preamp using the Newton method and the simulation based
on the spline approx imation is plot ted in Figure 8.Time
dierence signals are normalized to the maximal value of the
output signal.
The error values, such as maximal and average error, are
also expressed in Table 6. The maximal error is around 2 V.
An amplification of the preamp is approximately 1. 84
× 10
4
and measured level of noise at t he output of the preamp
without connected guitar is approximately 4.7 V
pp
and with
connected guitar it is approximately 32 V
pp
(these high values
are caused by extremely high amplification, normally, the
amplification is lower). Therefore the error can be masked. In
places with the maximal error, the New ton method reached
the maximal number of iterations (100), and therefore the
error is caused partly by the approximation and partly by the
Newton method.
The c ircuit was also simulated with a reduced power
supply voltage to 261 V and the results were compared to
a real home-made guitar preamp connected according to
the circuit schematic in Figure 1 with the reduced power
supply. Firstly, the simulations using Newton method and
approximations were compared in Figure 9.Theerrorwas
approximately the same as in Figure 8—the maximum
error increased from 2 V to 3.5 V but t he average error
decreased from 6.20
× 10
3
to 4.50 × 10
3
V. T h e re l a t iv e
error in Figure 9 is higher due to lower power supply.
The comparison between the output of real circuit and its
Table 5: Computational complexity comparison of simulations
based on approximations—number of operations.
Simulation
type
Linear
interpretation
Spline
Interpertation
Spline
Approx
Whole 9. 38 × 10
2
5.28 × 10
4
9.53 × 10
2
By blocks 2.06 × 10
2
2.58 × 10
3
2.51 × 10
2
Table 6: Errors for s imulation from Figure 8.Theplatevoltage
signal errors are displayed.
V
p1
V
p2
Max [V] 6.27 × 10
4
2.38 × 10
1
Mean [V] 1.13 × 10
5
5.70 × 10
3
var [V] 1.05 × 10
7
2.54 × 10
4
V
p3
V
p4
Max [V] 2.12 × 10
1
1.99
Mean [V] 1.01
× 10
2
6.20 × 10
3
var [V] 1.07 × 10
3
0.13 × 10
3
Table 7: Harmonics comparison from Figure 11.Themagnitudes
are related to the first harmonic.
23456
Meas. [dB] 35.1 10.0 36.1 14.7 37.7
Sim. [dB]
27.4 9.8 28.3 14.7 29.5
Di. [dB] 7.6 0.2 7.7 0.1 8.2
digital simulation was made using sinusoid signal because a
harmonic signal generator was used as a signal source for
the guitar preamp. The output signal was recorded using
soundcard. The input harmonic signal had an amplitude of
150 mV and a frequency of 1 kHz. Measured and simulated
time-domain signals are shown in Figure 10.Mostofthe
errors occur on transients, but the testing preamp was
extremely noisy, and therefore it is very hard to determine
the deviation of the simulation. The spectrum of the signals is
shown in Figure 11. The rectangular window with a length of
a hundredfold of the signal period (48 samples at a sampling
frequency of 48 kHz) was used to minimize spectrum leak-
age. The measured preamp was homemade and it was not
shielded. Therefore, intermodulation distortion components
occur in measured spectrum. Table 7 shows magnitudes
of the higher harmonic components r elated to the first
harmonic. The error between measurement and simulation
is shown as well. The odd harmonics were almost the
same, but the even harmonic were higher in the simulation.
However, this deviation can be caused by the tube model,
because the same simulation results were obtained using the
numerical solution of the whole circuit. The general model
of a 12ax7 tube was used in the simulation but the real tubes
have dierent properties—there are many dierent types
of 12ax7 tube and also the same type can dier because
of a manufacturer’s tolerance. In order to get an accurate
simulation, the general tube model must be tuned according
to the used tubes. However, it requires a measurement of the
transfer functions of the used tubes.
EURASIP Journal on Advances in Sig nal Processing 9
t (s)
f (Hz)
0 0.5 1 1.5 2 2.5 3
100
1000
10000
20000
(a)
t (s)
f (Hz)
0 0.5
1
1.5 2
2.5
3
100
1000
10000
20000
(b)
t (s)
f (Hz)
0 0.5
1
1.5 2
2.5
3
100
1000
10000
20000
(c)
t (s)
f (Hz)
0 0.5
1
1.5 2
2.5
3
100
1000
10000
20000
(d)
Figure 7: Simulation results for a logarithmic sweep signal. The plate voltage sig nals p
1
, p
2
, p
3
,andp
4
are displayed. The 32-x oversampling
was used to reduce aliasing .
0 500 1000
1500
t (ms)
0
0.005
0.01
0.01
0.02
0
U
p1
error (V)
U
p1
error (%)
(a)
0 500 1000 1500
t (ms)
U
p2
error (V)
0.2
0.4
0
0
0.05
0.1
U
p2
error (%)
(b)
0
0 500 1000 1500
t (ms)
0.05
0.1
0.2
0.4
0
U
p3
error (V)
U
p3
error (%)
(c)
0 500 1000 1500
t (ms)
0
0
2
U
p4
error (V)
0.5
U
p4
error (%)
(d)
Figure 8: Comparison between simulation results using numerical solution and using approximations for a part of a real guitar ri.Only
the error signals are displayed.
024681012141618
0
0.005
0.01
0
0.02
0.04
t (ms)
U
p1
error (%)
×10
3
U
p1
error (V)
(a)
0
0.01
0.02
0.03
0.04
0
0.05
0.1
0.15
0.2
U
p2
error (%)
0 2 4 6 8 10 12 14 16 18
t (ms)
×10
3
U
p2
error (V)
(b)
0
0.05
0.1
0
0.2
0.4
U
p3
error (%)
024681012141618
t (ms)
×10
3
U
p3
error (V)
(c)
0
0.5
1
0
2
4
U
p4
error (%)
0 2 4 6 8 10 12 14 16 18
t (ms)
×10
3
U
p4
error (V)
(d)
Figure 9: Comparison between simulation results using numerical solution and using approximations for the reduced power supply voltage.
10 EURASIP Journal on Advances in Signal Processing
0 0.002 0.004 0.006 0.008 0.01
200
100
0
100
200
t (ms)
U
out
(V)
(a)
t (ms)
U
out
(V)
0.9 1 1.1 1.2 1.3 1.4
×10
3
100
110
120
130
140
150
Measured
Simulated
(b)
Figure 10: Comparison between measured and simulated preamp. The input voltage was sinewave signal with an amplitude of 150 mV and
afrequencyof1kHz.
0 0.5 1 1.5 2 2.5
×10
4
f (Hz)
Measured
0
20
40
M (dB)
(a)
Simulated by blocks
0 0.5 1 1.5 2 2.5
×10
4
f (Hz)
0
20
40
M (dB)
(b)
Simulated
0 0.5 1 1.5 2
2.5
×10
4
f (Hz)
0
20
40
M (dB)
(c)
Figure 11: Spectrum comparison between measured and simulated preamps.
7. Conclusion
In this paper, real-time simulation of a guitar tube amplifier
using approximations is proposed. The approximation of the
solution of dierential equations oers sucient accuracy
of the simulation while the computational cost is relatively
low. The approximations are used together with the modified
blockwise method that allows further reduction of the
computational complexity. The blockwise method has been
tested and it gives almost the same results as the simulation
of the whole circuit. The results of the amplifier simulation
were compared with the measurement of the real amplifier
and the results show that the quite good accuracy of the
simulation can be obtained. However, the compared signals
diers in even harmonics. This was probably caused by
the tube models that were used in simulation, because the
numerical solution of the whole circuit and simulation using
approximation were almost the same. Dierent amplification
factor of the t ube model can cause the bias shift resulting in
dierent results.
The major advantage of the proposed algorithm is con-
stant computational complexity and also the computational
complexity is independent from the number of nonlinear
functions in the simulated circuit or from the number of
circuit nodes. It depends only on the number of accu-
mulation elements. However, this is also disadvantageous,
because the implementation of approximating functions is
quite complicated. Therefore, practically, the number of
EURASIP Journal on Advances in Signal Processing 11
accumulation elements is bounded. Nevertheless, this disad-
vantage is compensated for by using the blockwise method.
Compared to other methods, this method oers quite simple
implementation, because it is derived directly from circuit
equations. Thus, no transformations are necessary and the
implementation should be faster. However, comparison with
other methods has not been done yet and therefore this will
be the next work.
Acknowledgment
This paper was prepared within the framework of project
no. FR-TI1/495 of the Ministry of Industry and Trade of the
Czech Republic.
References
[1] J. Pakarinen and D. T. Yeh, A review of digital techniques
for modeling vacuum-tube guitar amplifiers, Computer Music
Journal, vol. 33, no. 2, pp. 85–100, 2009.
[2] D. T. Yeh, J. S. Abel, and J. O. Smith, “Simulation of the diode
limiter in guitar distortion circuits by numerical solution of
ordinary dierential equations, in Proceedings of the Digital
Audio Eects (DAFx ’07), pp. 197–204, Bordeaux, France,
September 2007.
[3] D. T. Yeh, J. S. Abel, and J. O. Smith, “Simplified, physically-
informed models of distortion and overdrive guitar eects
pedal, in Proceedings of the Digital A udio Eects (DAFx ’07),
pp. 189–196, Bordeaux, France, September 2007.
[4] A.Novak,L.Simon,andP.Lotton,“Analysis,synthesis,and
classification of nonlinear systems using synchronized swept-
sine method for audio eects, EURASIP Journal on Advances
in Signal Processing, vol. 2010, Article ID 793816, 8 pages,
2010.
[5] J. Pakarinen, M. Tikander, and M. Karjalainen, “Wave digital
modeling of the output chain of a vacuum-tube amplifier,
in Proceedings of the International Conference on Digital Audio
Eects (DAFx ’09), pp. 1–4, Como, Italy, September 2009.
[6] M. Karjalainen and J. Pakarinen, “Wave digital simulation of
a vacuum-tube amplifier, in Proceedings of the IEEE Inter-
national Conference on Acoustics, Speech and Signal Processing
(ICASSP ’06), pp. 153–156, Toulouse, France, May 2006.
[7] J. Pakarinen and M. Karjalainen, “Enhanced wave digital
triode model for real-time tube amplifier emulation, IEEE
Transactions on Audio, Speech and Language Processing,vol.18,
no. 4, pp. 738–746, 2010.
[8] D. T. Yeh and J. O. Smith, “Simulating guitar distortion circuits
using wave digital and nonlinear state-space formulations, in
Proceedings of the Digital Audio Eects (DAFx ’08), pp. 19–26,
Espoo, Finland, September 2008.
[9] K. Dempwolf, M. Holters, and U. Z
¨
oLzer, “Disceetization
of parametric analog circuits for realtime simulations, in
Proceedings of the 13th International Conference on Digital
Audio Eects (DAFx ’10), Graz, Austria, September 2010.
[10] D. T. Yeh, J. S. Abel, and J. O. Smith, Automated physical
modeling of nonlinear audio circuits for real-time audio
eectspart I: theoretical development, IEEE Transactions on
Audio, Speech and Language Processing, vol. 18, no. 4, pp. 728–
737, 2010.
[11] I. Cohen and T. Helie, “Real-time simulation of a guitar power
amplifier, in Proceedings of the 13th International Conference
on Digital Audio Eects (DAFx ’10), Graz, Austria, September
2010.
[12] D. T. Yeh, J. S. Abel, A. Vladimirescu, and J. O. Smith, “Nu-
merical m ethods for simulation of guitar distortion circuits,
Computer Music Journal, vol. 32, no. 2, pp. 23–42, 2008.
[13] J. Macak and J. Schimmel, “Real-time guitar tube amplifier
simulation using approximation of dierential equations, in
Proceedings of the 13th International Conference on Digital
Audio Eects (DAFx ’10), Graz, Austria, September 2010.
[14] J. Macak, “Modified blockwise method for simulation of
guitar tube amplifiers, in Proceedings of 33nd International
Conference Telecommunications and Signal Processing (TSP
’10), pp. 1–4, Vienna, Austria, August 2010.
[15] N. K oren, “Improved vacuum tube models for SPICE sim-
ulations, 2003, http://www.normankoren.com/Audio/Tube-
modspice
article.html.
[16] Spectrum Software, Micro-Cap 10,SpectrumSoftware,Sun-
nyvale, Calif, USA, 2010.
[17] J. M. Miller, “Dependence of the input impedance of a three-
electrode vacuum tube upon the load in the plate circuit,
in Scientific Papers of the Bureau of Standards, pp. 367–385,
Washington, DC, USA, September 1920.
[18] W. H. Press, S. A. Teukolsky, W. T. Vetterling, and B. P.
Flannery, Numerical Recipes in C, Cambridge University Press,
Cambridge, UK, 2nd edition, 1992.
[19] U. Z
¨
oLzer, DAFX—Digital Audio Eects, John Wiley & Sons,
New York, NY, USA, 1st edition, 2002.
[20] C. de Boor, A Practical Guide to Splines,Springer,NewYork,
NY, USA, 1st edition, 2001.
... While vacuum tubes are considered obsolete in most applications (due to transistors being cheaper, smaller and more durable), they are still ubiquitous with guitar amplifier technology due to the more organic, musical manner in which they distort when driven at high amplitudes. As a result, they are a major focus in virtual analogue modelling [9], [16], [38], [39], thus a good case study for antialiasing. ...
... Therefore, 10V can be treated as a worst-case scenario input to this single valve amplifier. A logical extension for further work would be to apply the antialiasing methods to a full preamp circuit such as in [38], in which several triodes are cascaded to create more gain, distortion and consequently more aliasing. ...
Thesis
Full-text available
Aliasing is an inherent problem in virtual analogue modelling when simulating nonlinear systems such as guitar amplifiers and distortion effects units. Such systems introduce harmonics into the signal, which in the discrete-time domain can exceed the Nyquist frequency, resulting in unpleasant aliasing distortion. Recent research has shown that aliasing can be significantly reduced by using the antiderivatives of the nonlinear function, and that this method can be applied to systems with state as well as memoryless nonlinearities. In this work, the application of antiderivative antialiasing in the state-space modelling of several nonlinear circuits will be outlined in detail. Existing literature has focused on one-port nonlinearities, so in this work a method for two-port nonlinearities is proposed and demonstrated by example. Furthermore, a second order antialiasing method for state-space models is presented. The antialiasing methods were found to significantly improve the signal to noise ratio and reduce aliasing at low oversampling rates. In the case of scalar nonlinearities, the methods introduced no notable extra computational cost, but for two-port nonlinearities the processing time increased with the order of antialiasing. Finally, the suitability of antiderivative antialiasing in a real-time context was demonstrated through the development of a virtual analogue guitar effects plug-in.
... Among such numerical methods, Newton-Raphson (NR from now on) is largely preferred for its speed of convergence and relatively simple implementation [17]. Application of this solver to digital audio has been reported in fret-string, mass-spring, friction models for musical instrument excitation [18], [19], [20], [21], in guitar amplifier, preamp and pedal simulations [22], [23], [24], [25], [26], [27], in physically-based piano strings [28], stick-membrane collisions [29], and more in general in lots of digital audio effects [9], [30], [31], [32], [33], [34]. With the continuing evolution of the modeling approaches toward robustness and efficiency, NR has not lost its appeal. ...
... Finally, since the term (ρCF S ) n goes to zero for increasing n, it is convenient to rewrite the inequality as in (25). ...
Article
For their numerical properties and speed of convergence, Newton-Raphson methods are frequently used to compute nonlinear audio electronic circuit models in the digital domain. These methods are traditionally employed regardless of preliminary considerations about their applicability, primarily because of a lack of flexible mathematical tools making the convergence analysis an easy task. We define the basin delimiter, a tool which can be applied to the case when the nonlinear circuit is modeled by a delay-free loop network. This tool is derived from a known convergence theorem providing a sufficient condition for quadratic speed of convergence of the method. After substituting the nonlinear characteristics with equivalent linear filters which compute Newton-Raphson on the existing network, through the basin delimiter we figure out constraints guaranteeing quadratic convergence speed in the diode clipper. Further application to a ring modulator circuit does not lead to comparably useful constraints for quadratic convergence, however also in this circuit the basin delimiter has a magnitude roughly proportional to the number of iterations needed by the solver to find a solution. Together, such case studies foster refinement and generalization of this tool as a speed predictor, with potential application to the design of virtual analogue systems for real-time digital audio effects.
... This leads to the possibility of implementing networks with multiple nonlinear elements. Multiple nonlinearities are required for modeling some circuits such as the vacuum tube circuits in Publication III and [61, 62]. One disadvantage of this method is the extra impedance update required when the nonlinear element is not the root, as inFig. 2 .4. ...
... This arrangement is done in order to consider the nonlinear load that one triode stage presents to the other [121]. This method has reduced the average computational complexity of a SS model of a fourtriode stage preamplifier by a factor of between two and four [62]. When WDF simulations are considered, this type of method would not lead to reduced complexity, since WDFs are O (N ). ...
Thesis
Full-text available
This thesis addresses the use of circuit modeling techniques in audio. Circuit modeling has a wide range of applications in audio, including real-time models of analog electronic audio equipment and the use of physical analogies for understanding and simulating musical instruments. Modeling of analog audio equipment is an important topic in audio signal processing. It enables the development of musical software that is capable of simulating rare vintage equipment at a low cost. This type of software can be embedded in portable electronic equipment, in mobile phones or tablets, or in computers. This thesis presents novel models of analog audio equipment used with guitars. It presents a nonlinear audio-transformer model which is used for real-time emulation of vacuum-tube guitar amplifiers. This model has shown that some audio transformers have nonlinear effects for input signals with frequencies below 100 Hz. A new wave-digital model for operational amplifiers is proposed, which is used to simulate a wide class of guitar distortion circuits. The same distortion circuits were modeled with a novel method based on nonlinear system identification, which is enhanced using principal component analysis (PCA) for reduced complexity. It was shown that the proposed method reduces the complexity of the polynomial-Hammer-stein model obtained with the swept-sine technique by 66 %. Additionally, electromagnetic pickups were analyzed and modeled, leading to new pickup-mixing and nonlinearity models and to a better understanding on the effects of guitar pickup and cable interaction. This thesis has also presented how to use physical analogies for audio synthesis. Electro-acoustic analogies were used in order to obtain a model of connected Helmholtz resonators, resulting in the so called Helmholtz resonator tree. This model was implemented using wave-digital filters, which enables musical synthesis using physical descriptors that are intuitive also for non-technical users. This thesis includes contributions for the application of circuit modeling techniques in audio. The audio transformer, electromagnetic pickup, and effect-box modeling developments are important for building real-time systems for audio effects and for preserving the heritage of vintage analog equipment. Finally, the electro-acoustic analogies presented show that circuit modeling can be used for abstract musical synthesis, where a virtual instrument can be excited in different manners yielding interesting timbre variations.
... But while automatically deriving approximate decompositions, e.g. like those of [9,10,11], is beyond the scope of this paper, we are confident it is still useful by itself and furthermore, may form the basis for future methods to automatically find such approximate decompositions. ...
Conference Paper
Full-text available
In the digital simulation of non-linear audio effect circuits, the arising non-linear equation system generally poses the main challenge for a computationally cheap implementation. As the computational complexity grows super-linearly with the number of equations, it is beneficial to decompose the equation system into several smaller systems, if possible. In this paper we therefore develop an approach to determine such a decomposition automatically. We limit ourselves to cases where an exact decomposition is possible, however, and do not consider approximate decompositions.
... Todas as equações da etapa de potência utilizam as equações de pentodo de Koren [19]. Um modelo aprimorado do Marshall JCM800 foi realizado por Mack e Schimmel [22], onde os resultados das equações foram armazenados em uma matriz 3D pré-computada para uma maior eficiência para a utilização do software na forma de pluggins em tempo real. Diferentes métodos de interpolação foram testados para aproximar os valores que não estão presentes na tabela, onde o método de aproximação spline foi considerado o melhor. ...
Article
Full-text available
Este trabalho tem como objetivo revisar e simular alguns dos métodos de emulação computacional de efeitos de distorção de guitarras elétricas e de amplificadores valvulados que tem caracterizado os timbres deste instrumento nos últimos 50 anos. Recentemente, através da disseminação do processa- mento digital de sinais, estas distorções têm sido reproduzidas através de softwares embarcados ou na forma de pluggins em softwares de estúdio. Para a simulação de distorções, duas abordagens são basicamente utilizadas: caixa preta e caixa branca. Na primeira, waveshapers estáticos simplificam o sistema através de equações não-lineares que aproximam o comportamento do aparelho. Algumas das equações presentes na literatura são simuladas neste trabalho, com as respectivas respostas dos sistemas não-lineares no tempo e na frequência. Na abordagem caixa branca, os parâmetros dos circuitos são levados em conta e a modelagem pode ser realizada através de Wave Digital Filters ou de sistemas de equações diferenciais ordinárias em sua representação no espaço de estados, os quais são solucionados através de métodos numéricos. As simulações caixa branca apresentam re- sultados mais precisos, porém demandam maiores recursos computacionais, sendo necessário um compromisso entre precisão e eficiência para a simulação em tempo real.
... In recent literature, this topic has attracted specific attention in relation to real-time implementation, which necessitates a sharp trade off between accuracy and efficiency, with a further possible requirement of parametric control, i.e. allowing on-line updates of the system parameters. Various modelling paradigms have emerged to meet these demands, including Wave Digital Filters (WDF) [1, 2] , state-space models (including the Kmethod and variants thereof) [3, 4, 5, 6], and Port-Hamiltonian Systems [7] . Each of these appoaches can make use of a precomputed lookup table (LUT) that stores the nonlinear behaviour, thus avoiding the need to solve a multidimensional system of implicit nonlinear equations on-line (see, e.g. ...
Conference Paper
Full-text available
Iterative solvers are required for the discrete-time simulation of nonlinear behaviour in analogue distortion circuits. Unfortunately, these methods are often computationally too expensive for real-time simulation. Two methods are presented which attempt to reduce the expense of iterative solvers. This is achieved by applying information that is derived from the specific form of the nonlin-earity. The approach is first explained through the modelling of an asymmetrical diode clipper, and further exemplified by application to the Dallas Rangemaster Treble Booster guitar pedal, which provides an initial perspective of the performance on systems with multiple nonlinearities.
... Such attempts to emulate whole or part of analog devices, as well as the specific techniques developed for this particular purpose, are usually referred to as virtual analog (VA) modeling [1,2,3,4]. Research has been conducted on countless circuits, including synthesizer oscillators [5,6,7] and filters [8,9,10,11], electronic musical instrument circuitry [12,13,14], whole guitar amplifiers [15,16] and parts of them [17,18,19,20,21], equalizers [22,23], ring modulators [24,25,26], analog echo/delay [27,28], modulation [29,30,31], distortion [32,33,15,34], compressor/limiter [35,36,37,38], plate [39,40] and spring reverb [41,42,43] effects, and other vintage devices [44,45,46]. ings of the emulated system and thus only consider input-output relationships, or white-box, when the specularly opposite principle is employed. ...
Thesis
Full-text available
Recent advances in semiconductor technology eventually allowed for affordable and pragmatic implementations of sound processing algorithms based on physical laws, leading to considerable interest towards research in this area and vast amounts of literature being published in the last two decades. As of today, despite the efforts invested by the academic community and the music technology industry, new or better mathematical and computational tools are called for to efficiently cope with a relatively large subset of the investigated problem domain. This is especially true of those analog devices that inherently need to be studied by lumped nonlinear models. This research is, in this sense, directed towards both general techniques and specific problems. The first part of this thesis presents a generalization of the wave digital filter (WDF) theory to enable interconnections among subnetworks using different polarity and sign conventions. It proposes two new non-energic two-port WDF adaptors, as well as an extension to the definitions of absorbed instantaneous and steady-state pseudopower. This technique eventually removes the need to remodel subcircuits exhibiting asymmetrical behavior. Its correctness is also verified in a case study. Furthermore, a novel, general, and non-iterative delay-free loop implementation method for nonlinear filters is presented that preserves their linear response around a chosen operating point and that requires minimal topology modifications and no transformation of nonlinearities. In the second part of this work, five nonlinear analog devices are analyzed in depth, namely the common-cathode triode stage, two guitar distortion circuits, the Buchla lowpass gate, and a generalized version of the Moog ladder filter. For each of them, new real-time simulators are defined that accurately reproduce their behavior in the digital domain. The first three devices are modeled by means of WDFs with a special emphasis on faithful emulation of their distortion characteristics, while the last two are described by novelly-derived systems in Kirchhoff variables with focus on retaining the linear response of the circuits. The entirety of the proposed algorithms is suitable for real-time execution on computers, mobile electronic devices, and embedded DSP systems.
... This article uses a white-box modeling approach based on Wave Digital Filters (WDFs) [15]. In the literature, WDFs and other techniques have been extensively used to model triodes [16]- [19] and other circuitry usually found in tube amplifiers [13], [20]- [22]. Recently, the WDF theory has been extended by introducing new adapters to match polarities and sign conventions among interconnected subcircuits [23]. ...
Article
A new family of wave-digital vacuum tube triode models is presented. These models are inspired by the triode model by Cardarilli , which provides realistic simulation of the triode's transconductance behavior, and hence high accuracy in saturation conditions. The triode is modeled as a single memoryless nonlinear three-port wave digital filter element in which the outgoing wave variables are computed by locally applying the monodimensional secant method to one or two port voltages, depending on whether the grid current effect is taken into account. The proposed algorithms were found to produce a richer static harmonic response, introducing comparable or less aliasing and requiring approximately 50% less CPU time than previous models. The proposed models are suitable for real-time virtual analog circuit simulation.
Thesis
Full-text available
This work proposes the use of artificial neural networks in the task of emulating a tube pream-plifier for electric guitar. Studies are made about the excitation signals based on the systemidentification theory. To overcome the vanishing gradient problem of the most simple recurrentneural networks trained with the back-propagation through time algorithm, two solutions areproposed: the changing of the training technique to the extended Kalman filter; and the use ofanother network topology, the long short-term memory network. A test is developed about thestructure definition of the networks, which is applied to one of the recurrent neural networks. Atube preamplifier is designed, simulated through a circuit simulation software using the triodevacuum-tube models that are available in the literature. A prototype is built. Based on the datafrom the prototype and the simulations, the preamplifier is identified by the three networks andthe results are compared in a quantitative and qualitative form, showing that the long short-termmemory network obtain better results than the simpler recurrent neural networks, and the use ofthe extended Kalman filter as the training algorithm does not reduce the error, only increase thetraining’s speed.
Article
This is the second part of a two-part paper that presents a procedural approach to derive nonlinear filters from schematics of audio circuits for the purpose of digitally emulating musical effects circuits in real-time. This work presents the results of applying this physics-based technique to two audio preamplifier circuits. The approach extends a thread of research that uses variable transformation and offline solution of the global nonlinear system. The solution is approximated with multidimensional linear interpolation during runtime to avoid uncertainties in convergence. The methods are evaluated here experimentally against a reference SPICE circuit simulation. The circuits studied here are the bipolar junction transistor (BJT) common emitter amplifier, and the triode preamplifier. The results suggest the use of function approximation to represent the solved system nonlinearity of the K-method and invite future work along these lines.
Conference Paper
Full-text available
The real-time simulation of analog circuits by digital systems becomes problematic when parametric components like potentiometers are involved. In this case the coefficients defining the digital system will change and have to be adapted. One common solution is to recalculate the coefficients in real-time, a possibly computationally expensive operation. With a view to the simulation using state-space representations, two parametric subcircuits found in typical guitar amplifiers are analyzed, namely the tone stack, a linear passive network used as simple equalizer and a distorting preamplifier, limiting the signal amplitude with LEDs. Solutions using trapezoidal rule discretization are presented and discussed. It is shown, that the computational costs in case of recalculation of the coefficients are reduced compared to the related DK-method, due to minimized matrix formulations. The simulation results are compared to reference data and show good match.
Article
Full-text available
Digital simulation of guitar tube amplifiers is still an opened topic. The efficient implementation of several parts of the guitar ampli-fier is presented in this paper. This implementation is based on the pre-computation of the solution of the nonlinear differential system and further approximation of the solution. It reduces the computational complexity while the accuracy is comparable with the numerical solution. The method is used for simulation of dif-ferent parts of the guitar amplifier, namely a triode preamp stage, a phase splitter and a push-pull amplifier. Finally, the results and comparison with other methods are discussed.
Article
Full-text available
This article introduces a physics-based real-time model of the out-put chain of a vacuum-tube amplifier. This output chain consists of a single-ended triode power amplifier stage, output transformer, and a loudspeaker. The simulation algorithm uses wave digital fil-ters in digitizing the physical electric, mechanic, and acoustic sub-systems. New simulation models for the output transformer and loudspeaker are presented. The resulting real-time model of the output chain allows any of the physical parameters of the system to be adjusted during run-time.
Article
Full-text available
This paper deals with the real time simulation of a class A single ended guitar power amplifier. Power tubes and triode models are compared, based on Norman Koren's work. Beam tetrodes and pentodes characteristics are discussed, and displayed as Norman Koren's model parameters. A simple output transformer model is considered, with its parameters calculated from datasheets speci-fications. Then, the circuit is modeled by a nonlinear differential algebraic system, with extended state-space representations. Stan-dard numerical schemes yield efficient and stable simulations of the stage, and are implemented as VST plug-ins.
Conference Paper
Full-text available
Virtual analog modeling is needed when simulating classic analog circuitry by DSP, for example when emulating analog sound synthesis and sound reproduction systems. In this paper we show how wave digital filters (WDFs) can be applied to efficient real-time simulation of vacuum-tube amplifier stages, typical in professional guitar amplifiers, which pose nonlinear behavior for desired distortion effects
Article
The digital simulation of guitar tube amplifiers is still an opened topic. The commonly used blockwise method for realtime simulation of guitar tube amplifiers is discussed in this paper. However, this method is not precise enough. Therefore, a modification of this method is designed. The modification is based on the simulation of the mutual interaction between the connected blocks. This method is tested on the simulation of the common cathode triode amplifier.
Article
The diode clipper circuit with an embedded low-pass filter lies at the heart of both diode clipping "Distortion" and "Overdrive" or "Tube Screamer" effects pedals. An accurate simulation of this cir-cuit requires the solution of a nonlinear ordinary differential equa-tion (ODE). Numerical methods with stiff stability – Backward Euler, Trapezoidal Rule, and second-order Backward Difference Formula – allow the use of relatively low sampling rates at the cost of accuracy and aliasing. However, these methods require iteration at each time step to solve a nonlinear equation, and the tradeoff for this complexity must be evaluated against simple explicit meth-ods such as Forward Euler and fourth order Runge-Kutta, which require very high sampling rates for stability. This paper surveys and compares the basic ODE solvers as they apply to simulating circuits for audio processing. These methods are compared to a static nonlinearity with a pre-filter. It is found that implicit or semi-implicit solvers are preferred and that the filter/static nonlinearity approximation is often perceptually adequate.
Article
This work extends previous research on numerical solution of nonlinear systems in musical acoustics to the realm of nonlinear musical circuits. Wave digital principles and nonlinear st ate-space simulators provide two alternative approaches explored in this work. These methods are used to simulate voltage amplifica- tion stages typically used in guitar distortion or amplifier circuits. Block level analysis of the entire circuit suggests a strate gy based upon the nonlinear filter composition technique for connect ing amplifier stages while accounting for the way these stages in ter- act. Formulations are given for the bright switch, the diode clipper, a transistor amplifier, and a triode amplifier.
Article
This paper explores a computationally efficient, physicall y in- formed approach to design algorithms for emulating guitar distor- tion circuits. Two iconic effects pedals are studied: the "D istor- tion" pedal and the "Tube Screamer" or "Overdrive" pedal. The primary distortion mechanism in both pedals is a diode clipper with an embedded low-pass filter, and is shown to follow a non- linear ordinary differential equation whose solution is co mputa- tionally expensive for real-time use. In the proposed method, a simplified model, comprising the cascade of a conditioning fi lter, memoryless nonlinearity and equalization filter, is chosen for its computationally efficient, numerically robust properties . Often, the design of distortion algorithms involves tuning the par ameters of this filter-distortion-filter model by ear to match the sou nd of a prototype circuit. Here, the filter transfer functions and memo- ryless nonlinearities are derived by analysis of the protot ype cir- cuit. Comparisons of the resulting algorithms to actual pedals show good agreement and demonstrate that the efficient algor ithms presented reproduce the general character of the modeled pedals.