A Computer Program for Brass Instrument Optimization Part I. Concept ...

50 downloads 445 Views 32KB Size Report
A Computer Program for Brass Instrument Optimization ... really reflects the intentions of its creator and to find a good combination of settings for all the.
A Computer Program for Brass Instrument Optimization Part I. Concept and Implementation Wilfried Kausel, Paul Anglmayer University of Music and Performing Arts Vienna, Institut für Wiener Klangstil, Singerstrasse 26, A-1010 Wien, Austria Summary: In part I. of this paper a concept for computer optimization of brass wind instruments is introduced and an actual implementation is presented. Applications and practical examples showing the program’s capabilities to deal with typical problems instrument makers are confronted with are given in Part II. The concept includes a hierarchical representation of the instrument’s geometry allowing optimization of different valve combinations or instrument setups in the same run, a stable and efficient optimization strategy, and assistants helping the user to create an appropriate target function and to specify optimization parameters and their variation ranges. The horns are modeled by a sequence of transmission line elements representing conical elements and taking losses and spherical wave propagation into account. The optimization is based on a very stable 0th order search algorithm which does not require any derivatives of the target function yet approximates a gradient search thus combining advantages of 0th order and 1st order strategies. The target function assistant allows to combine intonation targets with targets concerning the shape of the input impedance curve, like specifications for absolute or relative magnitude matching, for the upper or lower envelope curve or for the quality factor of certain resonance peaks.

INTRODUCTION 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. In this paper it will be shown how transmission line modeling of horns can be combined with a suitable computer optimization algorithm in order to create a powerful tool 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. In order to make an optimization program more than a vehicle for the programmer only and maybe some enthusiasts much care has been taken to select an efficient and appropriate but easy to use optimization strategy and to encapsulate as much of the expertise mentioned above within the program providing an interface to the user which he can understand and which is as simple as the required functionality does allow. This is achieved by means of ‘assistants’ relieving the user of having to acquire any special knowledge 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 will offer him the possibility to use its fullest flexibility. REPRESENTATION OF INSTRUMENT GEOMETRY The right representation of the instrument’s geometry is already a crucial point. 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 at 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 mouthpiece, 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. The instrument representation which is part of the presented concept 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. The complete record structures are shown and explained in Table 1,2 and 3. 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. An instrument configuration which corresponds to a certain pattern of valves engaged is represented by a data structure called arrangement.

TABLE 1: Parameter Record Field type description Free bool is currently enabled val float current value opt float optimum value tol float step tolerance llim float lower limit ulim float upper limit

TABLE 2: CoordPair Record field type description x pointer pointer to parameter xopt bool is optimization parameter xrel bool is relative value d pointer pointer to parameter dopt bool is optimization parameter drel bool is relative value

TABLE 3: Segment Record field type description name string segment name meas float unit of measure offs float x coordinate offset magn float diameter magnification coo list list of coordinate pairs

TABLE 4: Segment Reference field type description name string instance name ref pointer pointer to segment head float skip at front tail float skip at end

TABLE 5: Arrangement Record field type description name string arrangement name inst list list of segment references Imp list list of impedance records Act bool is currently active

Arrangements therefore contain an ordered list of segment references (Table 4 and 5) 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 also 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 a transmission line model with elements representing conical slices and taking losses and spherical wave propagation into account. This model has been evaluated and compared with other models by Mapes-Riordan (5). The frequency range of the calculation is limited by the model itself because it can only model the fundamental mode of a cavity or duct. As diameters become bigger 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 depends on the diameter and is about flim = 0.586 c / d. It is close to 1500 Hz in a trumpet bell which is fortunately beyond the range of played notes and above the cut-off frequency. OPTIMIZATION TARGET FUNCTION All specifications for the optimized instrument are weighted and combined in the so called target function. One simple case of optimization is the matching of impedance magnitudes. By commands 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 (7) 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 particular frequency. He may 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. 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 ALGORITHM The optimization method which has been selected is based on a very stable 0th order search algorithm which does not require any derivatives of the target function yet approximates a gradient search thus combining advantages of 0th order and 1st order strategies. It was published by Rosenbrock (7) in the 70th. 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 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). Finally a user who is not an optimization expert has a real chance to understand it and to set and tune its parameters properly. REFERENCES (1) (2) (3) (4) (5) (6) (7) (8) (9)

Stewart, G. W., Phys. Rev., 20, pp. 528-551, (1922) Kagawa,Y.,Omote,T., J. Acoust. Soc. Am. 60, pp 1003-1013, (1976). Kinsler,L. E., et al, Fundamentals of Acoustics, NY, Wiley, 1982, ch. 8,10. Caussé, R., et. al, J. Acoust. Soc. Am. 75, pp 241-254,(1984). Mapes-Riordan, D., J. Audio Eng. Soc. 41(6), pp 471 – 482,(1993). Wall, M., GAlib – genetic algorithm package, http://lancet.mit.edu/galib-2.4/Overview.html Rosenbrock, H. H., Comp. J., 3, pp 175-184, (1960). Schwefel, H.-P., Num. Opt. v. Comp.-modellen m. d. Evol.-strat., Basel, Birkhäuser, 1977 Schwefel, H.-P., Evolution and Optimum Seeking, NY, Wiley, 1994

Suggest Documents