Computer Optimization of Brass Wind Instruments

Computer Optimization of Brass Wind Instruments
Wilfried Kausel
University of Music and Performing Arts Vienna, Institut für Wiener Klangstil,
Singerstrasse 26/a, A-1010 Vienna, Austria
e-mail: [email protected]
Summary: Computer optimization of brass wind instruments combines knowledge in several different areas.
Usually the performance of those instruments is described by musical terms. Characteristics like intonation,
response, pitch variability, sound timbre or efficiency have first to be objectified and mapped to acoustical
properties which can be measured and properly predicted by computer simulation.
Fundamental physical and acoustical relationships are used to model brass wind instruments and their parts
mathematically. Numerical algorithms are then applied to compute transmission characteristics which are
related to musical performance quantities.
With a mathematical model and a suitable numerical algorithm an optimization strategy can be applied. By
modifying optimization parameters – usually geometrical dimensions of the instrument – the optimizer
program tries to find an optimum solution. This optimum is specified by the user as a combination of
desirable properties preferably already expressed in musical terms. The so called target or objective function
calculates all characteristics of an instrument, derives musical properties and combines these results the way
the user has specified into a single value out of a scale ranging from ‘very good’ to ‘extremely bad’. This
function is evaluated after each optimization step to guide the program on its way either to a perfect solution
– if this is possible – or at least to the best possible compromise.
This work presents a successful approach to computer optimization of brass instruments. Several different
optimization methods are described. All of them are implemented in an optimization program which can be
used by instrument makers to improve existing instruments or to design new ones according to a certain
performance specification. One of the optimization algorithms is even able to reconstruct the complete
geometry of a typical trumpet from its calculated impedance magnitude curve. Future experiments will show
if it is possible to measure input impedance curves accurately enough to apply this method to reconstruct the
geometry of existing instruments from an acoustical measurement in the frequency domain.
INTRODUCTION
Assessment of sound quality and playing properties of musical instruments is partially
based on objective acoustical characteristics, well defined and measurable, but subjective
criteria, related to specific players, their way to play that instrument and their personal preference
and musical taste, are equally important.
To describe objective acoustical characteristics of brass wind instruments, it is necessary to
define some related physical quantities which can be measured and to some extent calculated
using mathematical models. Dealing with sound these quantities usually are the sound pressure,
which oscillates periodically around its quiescent value, the atmospheric pressure, and the sound
velocity, which is a periodic vector function, indicating instantaneous speed and direction of
oscillating volume elements. These two quantities are not independent of each other but are
related in a very similar way just like voltage and current density in an electrical circuit. In
correspondence with the electrical current, which is the area integral of the current density, a
sound flow is defined as area integral of sound velocity.
Considering a vibrating air column inside a tube the second and third dimension of the
problem are very often neglected and only a one dimensional problem is dealt with. In this case
the sound pressure becomes a scalar function p = f(x, t) just like the sound velocity v = f(x, t) and
the sound flow u = a(x) v(x, t). The cross-sectional area a of the tube is assumed to be constant
over time but varying over the length x of the tube and a positive velocity is one having the same
direction as the positive x-axis.
Of course there is a frequency limit for the validity of a one-dimensional model. As soon as
frequencies are considered with wave lengths not much longer than the tube dimensions
perpendicular to the tube’s x-axes, wave propagation in y and z-direction must be taken into
account also. The one-dimensional approximation will also fail to exactly predict the sound
conditions near the end of the flaring bell of a brass wind instrument where the tube is open and
radiates sound into the 3-dimensional environment.
Other aspects which are usually neglected by simple models are the bends of the tube, the
vibration of its wall and the temperature gradient in an instrument which is being played by a
human player. The effect of air viscosity and sound absorption of the tube wall are often taken
into account because those losses are in fact significant and must not be neglected.
Sound pressure and flow at any point inside or outside the instrument are periodic
functions and the law of linear superposition is valid (at least for the sound levels and
environmental conditions we are used to associate with musical performances), therefore it is
convenient to make a Fourier transformation from the time domain into the frequency domain.
Instantaneous values of sound pressure and sound flow are lost, but their magnitude and phase
relationships at any frequency can now be focused on.
There are some important frequency domain characteristics which can be considered to be
the link between the world of the acousticians and the world of the musicians. The most
important one is the acoustical impedance Z (ω ) in a certain point of a sound field. It is a
complex function of frequency, defined as the quotient of sound pressure P(ω ) and sound flow
U (ω ) both being the Fourier transformations of the corresponding time domain functions, which
have been described above. If this impedance is measured at the interface between the player’s
lips and the instrument’s mouthpiece it is referred to as ‘acoustical input impedance’. It is of
major importance because it represents the ‘load’ seen by the sound generating oscillator – lets
call it ‘lip-oscillator’ – built from the player’s lungs, his mouth cavity, the vibrating lips and the
mouthpiece.
It also represents the feedback of the instrument which converts the sound flow spectrum –
usually considered to be the player’s contribution, being called ‘excitation spectrum’ – into a
sound pressure spectrum which is then modulated and propagated to the listener first by the
instrument itself and then by the acoustical environment where the performance takes place.
The sound pressure transmission function H (ω ) is defined as the complex ratio of two
different sound pressure functions, one usually measured at an observation location close to the
end or even outside of the instrument, while the other one is often taken somewhere in the
mouthpiece where the sound originates.
In order to make the lip-oscillator oscillate with a certain frequency a stable phase
relationship between sound flow and sound pressure must exist in front of the player’s lips. This
phase requirement is only met with standing waves present in the instrument. At those
frequencies the input impedance magnitude will show a significant maximum. In between these
impedance peaks a player will not easily be able to generate or sustain a tone. On the other side if
a player tries to force a tone which does not match one of these resonances it will tend to move
its pitch by itself to the closest resonance frequency of the instrument. This happens because a
standing wave developing in front of the lip-valve tends to synchronize the lip vibration with its
own frequency thus locking and stabilizing the oscillation.
Now we enter into the world of the musicians. Especially if they are playing together in the
brass section of an orchestra, they will carefully tune their instruments. When they buy an
instrument, they will pay attention, to get an acceptable ‘intonation’ of all tones, which are
usually played on it. They will also compare the ‘sound quality’ of different instruments and a
characteristic commonly called ‘response’ or ‘responsiveness’ seems to be the measure for how
effortlessly a certain tone can be initiated or sustained. They might also check, how easy the
pitch of the tones can be controlled and licked up or down, a property sometimes designated as
‘variability’. It is a question of playing technique, music style and personal taste if a player likes
that feature or not.
Mapping the musical term ‘intonation’ to certain characteristics of the input impedance
curve does not seem too difficult. Often this is done by determining the frequency difference
between the actual position of an impedance magnitude peak (or a zero of its phase) and the
corresponding note of the equally tempered scale. Anyhow, this is only part of the whole story
because when a player plays that note, higher resonance frequencies with eventually different
intonation will be excited, too, and an overall pitch will sound, which is effected by the
excitation spectrum, which in turn is strongly influenced by the player and the dynamic level he
is playing.
Variability can obviously be mapped to the quality factor of the resonances, this means a
sharp and high impedance peak will more strictly enforce its pitch than a blunt and weak one.
The sound quality of an instrument is again related to the input impedance but also to the
sound pressure transmission function. It includes the player’s excitation spectrum and will
strongly depend on the acoustical environment and the direction and distance of the listener
relative to the instrument’s coordinate system.
Other musical terms like ‘response’ or ‘responsiveness’ are even more difficult to objectify
because not even professional musicians often agree about the meaning of this measure. Anyhow
there is an objective characteristic in the impedance curve, the group delay, which is related to
the performance of the lip-oscillator. An oscillation is sensitive to both the gain and the phase of
the feedback loop, so the phase-frequency relationship of the load is indeed another factor
controlling the oscillation, its onset and sustain. It turned out that this indicator seems to be in
acceptable agreement with subjective judgements.
The input impedance curve of a brass wind instrument therefore provides most of the clues
for the computer optimization of musical performance as specified by instrument makers and
musicians. Intonation can be improved by centering impedance peaks at desired frequencies.
Typical excitation spectra of players can be taken into account by weighting the higher
harmonics of a fundamental according to the dynamic playing level and eventually the player’s
playing technique and to calculate an overall intonation, which is not only based on the played
fundamental but also on higher harmonics, which will more or less contribute to the radiated
sound (12).
Especially in the lower register of an instrument there is a significant deviation between the
center position of the corresponding impedance peak and the pitch of the sounding tone.
Investigations have shown, that there is a good agreement between the sounding pitch of the
played instrument and the intonation calculated from a measured input impedance curve
provided that typical excitation spectra are taken into account by including weighted higher
harmonics in the calculation (10)(11).
Variability of certain tones can be controlled by setting up the optimizer to widen or
narrow corresponding resonance peaks. Finally a desired impedance envelope shape can be
achieved by combining optimization target specifications for intonation with such for relative or
absolute impedance magnitude matching. The envelope shape together with the group delay at
impedance peaks has some effect on the instrument’s responsiveness as well as on the
composition of the radiated sound.
MODELING BRASS WIND INSTRUMENTS
For almost 80 years now acousticians are attempting to predict the behavior of acoustical
systems using various modeling techniques (1). Up to now they have found several different
ways how to calculate characteristics of horns with given geometry using computers.
The most complex modeling technique, the finite-element method (FEM) can represent the
3-dimensional space and the validity of its results is not limited to a certain frequency range (2).
Unfortunately this method requires substantially more computer resources than any other method
and is therefore not feasible when repeated calculations in an iterative loop are required.
On the other side simple electrical-equivalent modeling with lumped parameters (3) does
not yield results accurate enough to have practical relevance. Transmission line modeling (4) is a
compromise between the simple lumped-parameter model and the versatile FEM model.
Transmission line elements can be derived from cylindrical segments as well as from conical
segments and losses can be neglected or included.
Investigations have shown that transmission line modeling using conical elements taking
losses into account is sufficiently accurate in the frequency range which is normally considered
to be of interest when brass wind instruments are analyzed (5).
Other authors using conical transmission line elements to model the input impedance of
brass instruments found excellent agreement between model predictions and experimental data
(4). The required computing resources for this simulation method nowadays do allow iterative
processing which is essential as soon as physical modeling is employed in the context of
computer optimization of real world brass wind instruments.
TRANSMISSION LINE MODEL FOR OPTIMIZATION
Figure 1: Trumpet cut into conical slices described by transmission matrices
This transmission line model uses simple conical or cylindrical slices as shown in Figure 1
to compose the instrument to be analyzed. Each slice of the acoustical transmission line is
described by a frequency dependent transmission matrix (5) which takes thermo-viscose losses
into account:
 ai11 (ω ) ai12 (ω ) 
Ai (ω ) = 
=
ai 21 (ω ) ai 22 (ω )
 xi+1 
sinh (Γ L ) 

cosh (Γ L ) −

Γ xi +1 
 xi 
= 
2
 1  xi +1  1  
Γ L cosh (Γ L ) 


−
Γ
+
sinh
(
)
L




 
(Γ xi )2 
 Z c  xi  Γ xi  
where
Z c = R0
rv =
{ ( 1 + 0.369 r ) − j 0.369 r }
−1
−1
v
ρ ω Sm
ηπ
v
R0 =





xi +1 
sinh (Γ L )  
cosh (Γ L ) −

Γ xi+1  
xi 

xi
Z c sinh (Γ L )
xi+1
{
−1
(
Γ = k 1.045 rv + j 1 + 1.045 rv
ρc
Si
k=
−1
)}
ω
c
ZLWK EHLQJ WKH HTXLOLEULXP JDV GHQVLW\ WKH UDGLDQ IUHTXHQF\ WKH VKHDU YLVFRVLW\
coefficient, c the speed of sound, Sm the planar cross-sectional area at the center and Si the
spherical area at the input end of the conical element, xi the radius of the input spherical sector,
xi+1 the radius of the output spherical sector and L the distance between the two spheres.
This matrix describes the relationship between sound pressure p and sound flow u in front of and
after a conical slice by
 pi (ω )
 pi+1 (ω )
 u (ω )  = Ai (ω )  u (ω )  .
 i

 i +1

The product
L
A(ω ) = ∏ Ai (ω )
i =1
gives an expression for the transmission characteristic of the complete instrument. The ratio
between sound pressure and sound flow at the open end of the flaring bell
p L (ω )
= ZT
u L (ω )
is enforced by the termination or radiation impedance ZT which is the characteristic impedance of
the open mouth of the instrument. It is here modeled by
 ω a  2
 0.61 ω a L 
L
 + j 
Z T = Z c 

c


 2 c 
with aL =
SL
π
If this impedance is transformed by the chain matrix A from the open end back to the
mouthpiece, then the acoustical input impedance is obtained.
Because of the one-dimensional assumptions higher oscillation modes are not taken into
account by this model. Frequencies above a certain limit, which is related to the cross-sectional
dimensions, can no longer be covered without taking higher oscillation modes into account. In a
brass instrument the flaring bell is typically that region which determines the upper frequency
limit because of its quite large dimensions. The frequency
f <
0.58 c
d
is usually considered the theoretical upper frequency limit for a circular duct of diameter d,
when higher oscillation modes are ignored. In a brass wind instrument the limit is somewhat
reduced because of its more complex geometry, its sometimes slightly noncircular cross-section
and the bends of its tube.
DIFFERENT OPTIMIZATION ALGORITHMS
In this paper it will be shown how transmission line modeling of horns is combined with a
set of computer optimization algorithms in order to create a powerful tool, the ‘Brass Instrument Optimization Software’ (BIOS) (16)(17).
It was developed for instrument makers helping them to improve existing instruments as
well as to design new ones according to a given specification. When historical instruments are to
be reconstructed from paintings or descriptions transmission line modeling might help to predict
essential characteristics and the optimizer program can be used to make them reasonable instead
of wasting material and countless working hours by trial and error.
Computer optimization is sometimes considered rather an art than a science especially
when actual simulated genetic or annealing approaches are referred to (6). The reason is that
much experience, insider knowledge and sometimes intuition is usually required to select the
right optimization variables and their best variation range, to create a target function which really
reflects the intentions of its creator and to find a good combination of settings for all the various
tuning parameters of the optimization algorithm.
The optimization program presented here implements several different optimization
strategies. A very old one, which was already proposed in the early sixties and which has been
almost forgotten and superseded by the variety of modern approaches, like simulated annealing,
adaptive simulated annealing and the whole group of genetic algorithms, turned out to be the
winner – at least up to now. It was able to find good compromises even when difficult to achieve
and even contradictory optimization targets have been specified and it perfectly succeeded in the
ultimate challenge of a ‘computerized instrument maker’ having to create an instrument
completely from scratch. This so called Rosenbrock algorithm will be described in more detail
in the next section.
Its results have been compared with the results of five other strategies, which have also
been tested. All of them are so called genetic algorithms (9), where ‘trumpet individuals’ are
reproducing themselves by mating to form populations, which are exposed to the pressure of
selection. Children inherit basic properties from both parents and bad trumpets have a much
smaller chance to reproduce themselves as they may die early. Random mutation is implemented
as well as independent parallel populations with some individuals migrating from one to another.
The first approach, which has been implemented, is the ‘simple genetic algorithm’ as
described by Goldberg (13). It uses non-overlapping populations and optional elitism. Elitism
means that the best individuals are directly moved from one generation to the next, making them
somehow immortal – at least until better individuals take their place. Each generation the
algorithm creates an entirely new population of individuals.
The second approach is a 'steady-state genetic algorithm' that uses overlapping populations.
It can be specified how much of the population should be replaced in each generation.
The third variation is the ’incremental genetic algorithm’, in which each generation consists
of only one or two children. The incremental genetic algorithms allow to specify replacement
methods defining how the new generation should be integrated into the population. So, for
example, a newly generated child could replace its parent, replace a random individual in the
population, or replace an individual that resembles it closely.
The fourth type is the ’Deme’ genetic algorithm. This algorithm evolves multiple
populations in parallel using a steady-state algorithm. Each generation the algorithm migrates
some of the individuals from each population to one of the other populations.
The last GA-type implemented is a deterministic crowding scheme based on the steadystate genetic algorithm as proposed by Goldberg. Like the other genetic algorithms its
implementation has been taken from the GAlib genetic algorithm package, written by Matthew
Wall at the Massachusetts Institute of Technology (6).
The genome type, which was associated with the trumpet individuals, was the so called
binary string genome. Each optimization parameter was quantised within its variation range
according to a specified minimum parameter resolution and the required number of bits was then
mapped to the next empty piece of the binary string. Populations are initialized randomly and
mutations are random single bit errors created in the binary string with a given probability.
The default crossover method, which was normally used, determines a random bit position
in the parent’s chromosomes and then creates a son with its father’s lower string and it’s
mother’s upper string and a daughter composed from the remaining segments.
Some disadvantages of that simple implementation are immediately obvious. One is that an
already good starting position is completely lost during initialization of a population. The
specified variation range determines the range for the random initialization as well as that for
random mutations.
Another one is, that the probability, for a single bit mutation to create an improvement is
almost zero. In the results section below it will become obvious that there is much too much
freedom to create meaningless and crazy geometries. In order to make genetic algorithms to
compete well, a completely different data representation would be necessary.
THE ROSENBROCK ALGORITHM
The optimization method which has given best results up to now, was described by
Schwefel in [8]. Originally it was published by Rosenbrock in 1960 [7]. In the past this algorithm
has already been used successfully by the author for optimization of target functions with up to
50 parameters and more (digital and analogue filters, electrical circuit design). The search
strategy is based on a very stable 0th order search algorithm which does not require any
derivatives of the target function although it approximates a gradient search. Therefore it
combines advantages of 0th order and 1st order strategies.
In the first iteration it is a simple 0th order search in the directions of the base vectors of an
n-dimensional coordinate system. In the case of a success, which is an attempt yielding a new
minimum value of the target function, the step width is increased, while in the case of a failure it
is decreased and the opposite direction will be tried.
Once a success has been found and exploited in each base direction the coordinate system
is rotated in order to make the first base vector point into the direction of the gradient. Now all
step widths are initialized and the process is repeated using the rotated coordinate system.
Initializing the step widths to rather big values enables the strategy to leave local optima behind
and to go on with search for more global minima.
It has turned out that this simple approach is more stable than many sophisticated
algorithms and it requires much less calculations of the target function than higher order
strategies (8). Because of this inherent stability and because of some well working heuristics in
the calculation of the step widths this algorithm is even suitable and has already proven to be
valuable for optimization problems involving highly non-linear and non monotonous target
functions.
Finally a user who is not an optimization expert has a real chance to understand it and to
set and tune its parameters properly. Heuristic controlling procedures have been implemented to
adjust optimization parameters at run time as soon as the optimization progress slows down or
gets stuck. This allows to run successful optimizations without any user intervention.
REPRESENTATION OF INSTRUMENT GEOMETRY
The right representation of the instrument’s geometry is already a crucial point. The
instrument representation used in the optimizer assigns data structures called segments to
physical parts of the instrument like mouthpiece, slides, bell and so on. These segments contain
sequences of elementary conical elements described by coordinate pairs representing diameter d
and its position x along the segment axis or optionally diameter increment and relative position.
Each coordinate value (x or d) is linked to an instruction if and how resp. how much this value is
allowed to be modified during the optimization run.
Mixing absolute and relative coordinates freely allows to specify cylindrical or conical
sleeves with a certain length which are inserted at an absolute position. Position, length and bore
of the sleeve can be released for optimization. Releasing the last x value of a segment allows
optimization of the segment length. This can be essential when the tuning slide of an instrument
is to be modeled. Another optimization parameter which effects the overall tuning is the air
temperature. It can be released between specified limits just like other coordinates.
Making coordinate values of an instrument’s geometry optimization parameters is a very
simple and flexible way to give the optimizer enough freedom to find any shape in order to come
to an optimum. The Rosenbrock optimization algorithm was indeed able to deal with that high
degree of freedom and, as will be shown below, gave good results even with 100 or more
coordinate parameters. Genetic optimization methods did not perform well with that many
parameters. It turned out, that neither the standard initialization, crossover and mutation methods
nor the standard parameter mapping to binary string genomes are suitable for this kind of
coordinate optimization.
On the next higher level, segments are now arranged to bigger structures just like
instruments are built in the physical reality. An instrument configuration, which corresponds to a
certain pattern of valves engaged is represented by a data structure called arrangement.
Most instruments allow to modify their acoustical lengths by means of valves. When the
player presses one of these valves a corresponding tube segment is inserted in a certain place
increasing the total acoustical length and lowering the resonance frequencies of the instrument.
This way chromatic scales can be played even in the lowest register.
Optimization of a horn has to take that into account. There are certain parts like mouth
piece, leadpipe, tuning slide or bell which are always contributing to the acoustical length of the
instrument. Any modification there will equally influence all played notes regardless of which
valve is engaged. Other segments, the so called slides, are only active as long as their
corresponding valve is depressed.
Treating different valve combinations of an instrument like different instruments is not a
solution unless modifications in common parts of the instrument are synchronized properly. If
different valve combinations were optimized separately it might be impossible to reunite the
results back into one physical instrument because they might contain contradicting proposals for
modifications in one and the same common part. Therefore it is essential to deal with all valve
combinations at once.
Arrangements therefore contain an ordered list of segment references reflecting the
sequence of tubular instrument parts aligned along the total acoustical length of the instrument.
An instrument with three valves is represented by eight different arrangements of segment
instances. Often these arrangements are referred to as V0 (no valve depressed – slides disabled),
V1, V2, V3, V12, V13, V23 and V123 (all valves depressed – all slides inserted).
CALCULATING INPUT IMPEDANCE
Each arrangement is associated with an input impedance list which is continuously
recalculated during the optimization whenever a change is made to any of the segments involved.
Input impedance over frequency is the curve which is related to important characteristics of a
horn like intonation, responsiveness and even sound. It is computed using the transmission line
model described above.
It has to be noted, that the phase relationship between sound pressure and sound flow in the
mouthpiece, which is the argument of the complex input impedance, is not considered for
optimization purpose. This can be done, because the phase information of the complex
impedance function is not independent of its magnitude. In a minimum phase system it can be
reconstructed from the magnitude by means of the Hilbert transform, using the requirement that
the impulse response of a real instrument must be causal, that means there must not be any
reflection preceding the excitation pulse.
The question, if a real system is truly a minimum phase system – at least to the accuracy
required by the application –, can only be answered by comparing measured phases with
theoretical values. Recent measurement results have again strengthened our conviction, that the
difference between actual phases and phases obtained for minimum phase systems is at least
smaller than the measurement accuracy, which has been achieved.
It was already noted, that the frequency range of the calculation is limited by the model,
because it includes only the fundamental mode of a cavity or duct. As diameters are increasing
this condition is only met for lower frequencies. That means that especially the bell region of a
horn will introduce modeling errors at higher frequencies. The upper frequency limit for a typical
trumpet is close to 1500 Hz, which is fortunately beyond the range of all played notes.
OPTIMIZATION TARGET FUNCTION
In order to make an optimization program more than a vehicle for the programmer only
and maybe some enthusiasts, it was not only necessary to select efficient and appropriate but
easy to use optimization strategies, but to encapsulate as much of the expertise required to create
an optimization target function within the program. An easy interface has been provided for the
user which he can understand and which is as simple as the required functionality does allow.
This goal was achieved by means of ‘assistants' relieving the user of having to acquire any
special knowledge about the target function as long as he is requesting the program to work on
what is considered a ‘standard task’. If later on a user decides to take the challenge the program
offers the possibility to use its fullest flexibility.
In the optimization target function all specifications for the optimized instrument are
weighted and combined. One simple case is the optimization of the matching of impedance magnitudes. By command or by using an editor the user creates a table of frequencies which will be
attached to a certain arrangement. Corresponding target magnitude values have to be supplied.
The user can load them from a saved BIAS (12) measurement or he can take a previous
simulation of a reference instrument. He can of course view and edit all values. He selects all
entries and assigns weights and ‘absmatch’ or ‘relmatch’ attributes. This means that either the
normalized absolute differences between actual impedance and target impedance are contributing
to the target function result or the normalized percentage values of these deviations.
Another case is the application of intonation targets. An experienced user can assign
‘centering’ attributes to certain frequencies and he can specify which impedance peak should be
centered at this frequency. He can combine such targets with matching targets or with targets
affecting the Q-factor of the associated resonance peak. Other users will prefer to start the
intonation assistant who will show them notes and intonation in Cents of all tones which can be
played using a given valve combination. The global tuning can be adjusted and intonation targets
can now be specified in Cents or Hz for some or all tones. Then the optimizer can be started.
All target function contributions (normalized deviations from the rated value) are raised to
a specified power called progression – the higher this power, the more relative weight will be put
on the biggest deviations, the lower this power, the more evenly the relative weights will be
distributed –, multiplied with the user specified weight factors and added to get the final result.
In the ideal case this result will become very small during the optimization being zero when all
targets have been reached perfectly.
OPTIMIZATION RESULTS
For the first benchmark a typical trumpet has been modified locally in a way to disturb its
normal acoustical properties. Close to the mouthpiece at the beginning of the leadpipe where
brass instruments are very sensitive to modifications of its geometry an artificial bottleneck has
been inserted. The known original impedance curve has been given to the optimizer as a target
impedance curve. The bore diameters around the modification have been made optimization
parameters in order to enable the program to correct the artificial defect.
BIOS – Brass Instrument Optimization Software
initial bottleneck
target impedance
initial impedance
Figure 2: Trumpet with bottleneck; initial and target impedance
Figure 2 shows the straightened geometry including the bottleneck with different x and y
axes scales as required to fit the cross-section into the display window. The short markers in the
geometry plot indicate breakpoints in the outline. The axes labels are associated to the input
impedance magnitudes, the units are [Hz] and [N @
This simple optimization problem was solved by all algorithms in a very short time. As an
example the result of a genetic algorithm with incremental population development is shown in
Figure 3. Eight coordinate parameters (the complete geometry specification of the leadpipe)
have been made optimization parameters. Their variation range was limited to ±10 mm in xdirection and ±80% of the initial diameter values.
The incremental genetic algorithm parameters were a population size of 100, a crossover
probability of 0.6, a mutation probability of 0.1 and the number of offsprings was 2. About 350
calculations of the target function – in terms of genetic optimization: evaluations of an individual
– were required to generate the illustrated result improving the target function from about 36 to
about 11.
BIOS – Brass Instrument Optimization Software
bottleneck eliminated
impedance matched
Figure 3: Corrected trumpet created by genetic algorithm (incremental version)
The simple genetic algorithm with the same parameter settings could not improve a rather
good initial value found by chance in more than 12 generations evaluating more than 1200
individuals.
The steady state algorithm, again with the same parameters and a population overlap of
50%, needed about 450 evaluations to come close to the solution of the incremental one.
The Deme algorithm with three parallel populations and 5 individuals to migrate from each
generation got stuck after achieving a tolerable improvement within 450 evaluations. Further
improvement was then achieved much later after 1300 evaluations.
The incremental algorithm with deterministic crowding performed could benefit from an
early random hit. During the random initialization phase it found a good solution with 30
attempts only. It needed 500 more evaluations to find any further improvement.
The Rosenbrock algorithm needed not more than 130 target function calculations to beat
the result of any genetic algorithm and it took another 120 evaluations to generate an
optimization result which was 10 times better than the best genetic one.
Anyhow these results were valuable and encouraging enough to start a really tough job.
Now the different algorithms should show their capability to deal with a big number of
parameters, actually the complete geometry of the instrument should now be subject to
optimization. On the other hand the problem should be solvable and the optimum result be
known. At the same time it should prove even to the skeptic that there is indeed an unequivocal
relationship between the input impedance magnitude curve and the geometry of that instrument.
Therefore the final and ultimate benchmark for all algorithms was to build a trumpet with a
specified input impedance starting from a narrow tube with a standard mouthpiece attached to it.
This initial situation is shown in Figure 4. All bore dimensions along the whole acoustical axes
of the instrument have been made optimization parameters with upper variation limits of about
twice the dimensions of a typical trumpet.
If a measured impedance curve was used to be matched by the target function, then this
task would be considered to be what is called in literature ‘the inverse problem’ or ‘acoustical
bore reconstruction’. Up to now this inverse problem has been tackled and successfully solved
only on the basis of a measured impulse response in the time domain.
Although it is known, that an impulse response in the time domain is mathematically really
equivalent to a complex spectrum in the frequency domain, measurements of the steady state in
the frequency domain have not yet been considered to be used as the basis of an acoustical bore
reconstruction. The reason is, that the system, which is investigated in the so called ‘pulse
reflectometry’ (14, 15) and the one usually measured using frequency domain methods are not
completely identical.
In the pulse reflectometry the instrument is coupled to a non reflecting sound source. This
means ideally, that the plane wave front of the Dirac impulse is guided into the instrument
passing an infinitely long tube with a characteristic impedance which is perfectly matched with
the characteristic impedance of the circular cross-section at the entry point of the instrument
being measured. All reflections, which are observed at this entry point are therefore caused by
impedance changes (= bore diameter changes) within the instrument and multiple reflections
caused by the termination at the entry point are avoided.
Practically this is achieved by making the tube of the sound source long enough that
reflections from the end where the pulse is excited do not reach the instruments entry point
during the time interval required to be considered. What is recorded, is the transient
characteristic after a pulse excitation of a system, which has been in the perfect equilibrium state
before.
BIOS – Brass Instrument Optimization Software
standard mouthpiece
open tube
target impedance
initial impedance
Figure 4: Design of a trumpet from scratch
In frequency domain measurements the steady state is measured and a reflecting sound
source is usually directly connected to the mouthpiece. To calculate the input impulse response
IIR(e being the discretized frequency, required to do bore reconstruction analytically, the
phases of the input impedance Zin(e ) must be known or properly reconstructed and the
M
M
characteristic impedance Z0 of the effective coupling cross-section must be determined exactly.
On top of that, the conversion
( )
IIR e j θ
Z0
Z in e j θ
=
Z0
1+
Z in e j θ
1−
( )
( )
seems to present some numerical challenge, in order to get a result accurate enough for the
numerically already rather sensitive incremental procedure for getting physical dimensions.
The other way round – to use the optimizer to match a simulated and a measured
impedance curve, thus reconstructing the original geometry – solves all these problems
implicitly. It can eventually match phases, if it finally turns out, that phases do carry some
relevant information concerning geometry and it can work with much more general and accurate
models – even including higher oscillation modes and more different kinds of losses. Finally it
seems obvious, that steady state measurements in the frequency domain are much easier to be
accomplished with good accuracy than time domain measurements involving ideal Dirac
impulses and very long ‘lossless’ coupling tubes.
The corresponding result, achieved by the Rosenbrock strategy with an admitted countless
number of target function evaluations (it took a long weekend on a 500 MHz Pentium 3) is
shown in Figure 5. It is an interesting detail, that even with an almost perfect matching of actual
and desired impedances, there is still some noticeable ripple in the flaring bell close to the end of
the instrument. It is certainly more than a pure coincidence that Sharp’s and Amir’s direct
method of bore reconstruction from measured impulse responses also ceases somewhere in the
bell to generate accurate coordinates.
First, this is the region where all one dimensional models start to become invalid. Second,
measurements – even simulations – of faint reflections coming from the very far end, attenuated
by modeled and unmodeled losses are certainly afflicted with some noise, either with real or
numerical one. The transmission line model multiplies the termination impedance vector with
about one hundred partial transmission matrices until the input impedance is obtained. It seems
that the contribution of matrices, which are closer to the mouthpiece, are either more accurate or
simply more significant.
BIOS – Brass Instrument Optimization Software
Figure 5: Trumpet created by Rosenbrock
BIOS – Brass Instrument Optimization Software
Figure 6: Trumpet created by genetic algorithm (steady state)
Unfortunately the results of all genetic algorithms were really inferior. The best one is
shown in Figure 6. In order to make genetic algorithms able to compete a complete redesign of
the instrument’s geometric representation and its genetic mapping will be necessary.
The last example shows how the optimizer is dealing with co-optimization of different
valve combinations of a real trumpet. The main geometry has been reconstructed by David Sharp
(David, thank you for this valuable contribution!) from the Univ. of Edinburgh using the method
published in (14). The flaring bell was reconstructed by means of a sliding caliper.
Figure 7 shows how the actual acoustical length is modified by means of valves.
Depressing a valve shifts the pitch of all playable tones down by one, two or three half tones,
because an extra tube is inserted into the effective sound path, which makes it longer by the right
relative factor – about 6% per half tone. A combination of valves, e.g. adding 6% and 12.36%
(1.062 = 1.1236) of the original length will in total add 18.36%. This is less than 19.1%
(1.063 = 1.191) which would be required to correctly lower the sound by three half tones.
Therefore a separate valve is used to shift by this amount.
BIOS – Brass Instrument Optimization Software
V1
no valve depressed
V2
V3
V1+V2+V3
V1+V2
V3+V2
Figure 7: Bb Trumpet geometries corresponding to all possible valve combinations
This does not mean that valve combinations are not used by trumpet players. Some tones
can be reached only by combining two or even three valves, although the pitch has to be
corrected by a slide or using the lips. The optimizer has now been used to optimize the intonation
of all playable tones in order to get an overall intonation which is the best possible compromise
including all valve combinations.
Figure 8 shows the intonation of all playable tones, measured in Cent before an overall
intonation optimization. The basis of the intonation calculation is the equally tempered scale,
which divides an octave into twelve equal half tone steps. The frequency ratio corresponding to
the octave is 1:2, the ratio corresponding to the equally tempered half tone step therefore
1 : 12 2 = 1 : 1.05946 (about 6% difference). Each half tone step is divided into 100 Cents, 1 Cent
related to a frequency ratio of 1 : 1200 2 = 1 : 1,00057779 (about 578 ppm). Differences below
about 10 Cents are usually tolerable.
[Cent]
[Hz]
Figure 8: Intonation of all playable tones before optimization
Figure 8 shows the improved intonation which is much better and more balanced than
usually available on typical trumpets. Especially the lowest tones of each valve combination are
out of tune on almost every modern instrument.
[Cent]
[Hz]
Figure 9: Intonation of all playable tones after Rosenbrock optimization
Figure 10: Resulting geometry after overall intonation optimization
For this global intonation optimization all diameter coordinates have been made
optimization parameters. No specific constraints have been put on the shape of the input
impedance curve just intonation optimization was requested.
It is interesting, that the resulting geometry (Figure 10) resembles certain historical
instruments. Is there some old knowledge, which ancient instrument makers had been aware of,
before it was lost for some reason to be now regained with the help of modern computers?
REFERENCES
(1)
(2)
Stewart, G. W., Acoustic Wave Filters, Phys. Rev., 20, pp. 528-551, (1922)
Kagawa,Y.,Omote,T., Finite Element Simulation of Acoustic Filters of Arbitrary Profile
with Circular Cross Section, J. Acoust. Soc. Am. 60, pp 1003-1013, (1976).
(3) Kinsler,L. E., et al, Fundamentals of Acoustics, NY, Wiley, chapters 8 & 10, (1982)
(4) Caussé, R., et al., Input Impedance of Brass Musical Instruments – Comparison between
Experiment and Numerical Models, J. Acoust. Soc. Am. 75, pp 241-254, (1984).
(5) Mapes-Riordan, Horn Modeling with Conical and Cylindrical Transmission-Line
Elements, D., J. Audio Eng. Soc. 41(6), pp 471 – 482,(1993).
(6) Wall, M., GAlib – genetic algorithm package, http://lancet.mit.edu/galib-2.4/Overview.html
(7) Rosenbrock, H. H., An automatic method for finding the greatest or least value of a
function, Comp. J., 3, pp 175-184, (1960).
(8) Schwefel, H.-P., Num. Opt. v. Comp.-modellen m. d. Evol.-strat., Basel, Birkhäuser, 1977
(9) Schwefel, H.-P., Evolution and Optimum Seeking, NY, Wiley, 1994
(10) Bertsch, M., Studien z. Tonerzeugung auf der Trompete, Thesis @ Univ. of Vienna, (1998)
(11) Bertsch, M., Intonation on trumpets, in: Proceedings ISMA pp 135-140, Leavenworth,
Washington (USA), (1998)
http://iwk.mdw.ac.at/english/research/intonation/intonation.htm
(12) Widholm, G., Brass Wind Instrument Quality Measured and Evaluated by a new Computer
System, in Proc. of the 15th Int. Congress on Acoustics, Trondheim, Vol. III, pp.517-520,
(1995).
(13) Goldberg, D., Genetic Algorithms in Search, Optimization and Machine Learning, Addison
Wesley Publishing Company; ISBN: 0201157675, (1988)
(14) Sharp, D., Acoustic pulse reflectometry for the measurement of musical wind instruments,
Thesis @ Univ. of Edinburgh (1996)
(15) Amir, N., et al., Reconstructing the bore of brass wind instruments: theory and experiment,
in Proceedings SMAC, pp 470-475, (1993)
(16) Kausel, W., Anglmayer, P., Widholm, G., A computer program for optimization of brass
instruments. Part I. Concept, implementation., Forum Acusticum (Joint meeting of
ASA+EAA+DEGA), Berlin, (1999)
(17) Anglmayer P., Kausel, W., Widholm, G., A computer program for optimization of brass
instruments. Part II. Applications, practical examples., Forum Acusticum (Joint meeting
of ASA+EAA+DEGA), Berlin, (1999)