# Perceptual Matching of Low Order Models to Room Transfer Functions

Skip other details (including permanent urls, DOI, citation information)This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 3.0 License. Please contact mpub-help@umich.edu to use this work in a way not covered by the license. :

For more information, read Michigan Publishing's access and usage policy.

Page 111 ï~~Perceptual Matching of Low Order Models to Room Transfer Functions Eric M. Mrozek and Gregory H. Wakefield Department of Electrical Engineering and Computer Science University of Michigan, Ann Arbor MI48109 mrozek@eecs.umich.edu ghw@eecs.umich.edu Abstract The use of a genetic algorithm is investigated for application to artificial reverberation. The genetic algorithm searches the parameter space of low-order filter models to find impulse responses that match the measured acoustic transfer functions of a room. A perceptually-based error criterion is used to compare the impulse responses. 1 Introduction Realistic reverberation can be artificially applied to nonreverberant signals by convolving them with the acoustic impulse response measured in a room. This amounts to filtering the signal with a very long finite impulse response (FIR) filter. The problem with this technique is that it is computationally expensive and requires a large amount of memory. We can reduce the computational load by using low-order infinite impulse response (IIR) models to approximate the measured response. These generally take the form of a parallel combination of comb filters followed by a series combination of allpass filters [Schroeder, 1962]. Refinements can include a sparsely tapped FIR filter to account for early distinct echoes [Schroeder, 1970], and low pass filters in the feedback paths of the IIR sections to account for dispersion and atmospheric absorption [Moorer, 1985]. The goal of this work is to explore the use of genetic algorithms for choosing model parameters that match the modeled impulse response to the measured response. Perceptual criteria are applied to the matching function. 2 Reverberation Model We use the all-pass reverberator shown in Figure 1 from [Schroeder, 1961, 1962] to model the room reverberation. It is made up of a cascade of all-pass networks. Each stage has the same form, as shown in Figure 2, which has the impulse response: yi(k) = giYi(k-di)-gixi(k)+xi(k-di) (1) and the transfer function: 1Hi(z)I Z-d gi 1 (2) 1 - giz-d i z = ela The magnitude of the transfer function is unity for all frequencies, hence the name "all-pass." Figure 1: N Stage All-Pass Reverberator x(k) ya(k) y2(k) A-P A-P A. gI'd I g2,d2 g Figure 2: Single stage of the all-pass reverberator. 3 Optimization Methodology The genetic algorithm (GA) is a procedure that stochastically searches a parameter space for solutions that perform well according to some user-supplied cost function. It uses two basic stochastic methods, genetic inheritance and survival of the fittest, to structure the search [Michalewicz, 1994]. Although the analytic understanding of GAs is somewhat weak, they can provide adequate results and they work much more efficiently than exhaustive search. GAs are particularly useful in applications like ours where reasonably fast and robust optimization algorithms have not been developed. Our implementation sets the GA characteristics as follows1: Â~ Size of population = 20 Â~ Probability of crossover = 0.6 Â~ Probability of mutation = 0.005 1. For those familiar with the GA, this provides a reasonable framework within which to replicate our results. ICMC Proceedings 1996 111 Mrozek & Wakefield

Page 112 ï~~* No elitism (best performer is not replicated in the following generation) Filter parameter constraints: " Delay range, di e {primes > 83 (1.9ms)}. " Feedback gain, gi e {0.36, 0.37,... 0.99) " Direct path gain, k = 0 Note that the feedback gains are all less than one to insure stability. In addition, the delays are limited to prime numbers of samples so that the density of the impulse response builds up rapidly. The cost function used by the GA is the mean square error between the impulse response of the model and the measured acoustic transfer function of the room after both have been smoothed and normalized, surement as the input to the low-order model. The cost function was evaluated over 9876 points (224ms) of the room response. Figure 3: Measured Room Response 600 400 200 a 0 -200 -400 - l1 Cost = N k N (ro (k)-inorm(k))2 (3) where r is the measured response of the room, and in is the impulse response of the model. The normalized room response is given by: rsmooth(k) rnorm(k) = N112k (4) (Ydk= I rsmooth(k)2) and m,,orn(k) is similarly defined. The smoothed signals are: rsmooth(k) = Ir(k)I*B i(k) (5) msmooth(k) = Im(k)*ri(k)I*BIi(k) (6) where * indicates convolution, B, 1(k) is an 11 point Bartlett window (corresponding to Â~0.1 ims), and r81(k) is the first 81 samples (1.8ms) of the room response (see the discussion in the Results section). The smoothing accounts for the fact that the timing of echoes is not perceived to one sample accuracy. It allows echoes from the model that are nearly in the correct location to strongly correlate with the true echoes of the room. 4 Results The acoustic transfer function was measured from a hallway in our research building. The measuring system consisted of a NextStation, and Ariel Pro Port Model 656, a Crown Macro 1 amplifier, an Audix HRM-1 loudspeaker, and an ACO 7017 microphone placed 60 inches away from the loudspeaker (ca. 4.4ms). The stimulus was a maximum length sequence (MLS) [Rife, 1989] at a rate of 44100 samples per second. The transfer function in Figure 3 was obtained by correlating the measurement with the MLS and averaging over several periods of the sequence. We did not deconvolve the system response from the measurement, but rather used the first 81 samples (l.8ms) of the mea 0 2000 4000 6000 Sample Number 8000 10000 Figure 4 shows the GA results for a 4-stage reverberator. We can see that the initial population, which was randomly selected, has a high cost function. The cost is quickly reduced in the first 20 generations. The average cost is nearly equal to the minimum cost, which indicates that many members of the population perform as well as the best one. Note also that the plot of the minimum cost does not monotonically decrease. This is consistent with the fact that elitism is not used in the GA and the individual with the best performance may not be reproduced in the next generation. Figure 4: Evolution of a 4-stage reverberator. The maximum, minimum, and average costs for the population are plotted for each generation. 40 60 Generation 100 A comparison of the average cost curves for reverberator models of different orders is shown in Figure 5. Note that the 1-stage reverberator quickly reduces nearly to the "steady state" value, while the 7-stage filter takes much longer to do so. This is because the parame Mrozek & Wakefield 112 ICMC Proceedings 1996

Page 113 ï~~ter space that is being searched is much larger for the 7 -stage model. We can also see that the 7-stage filter eventually performs as well as the 4-stage filter, but doesn't do any better. This implies that the 7-stage reverberator is more complex than is necessary. The minimum cost curves in Figure 6 display the same trends as for the average cost curves. Figure 5: Evolution of average cost for 1, 4, and 7-stage reverberator models. 5, 83 -4 stages 0 20 40 60 80 100 Generation Figure 6: Evolution of minimum cost for 1, 4, and 7 stage reverberators. 6 5 -7 stages 1 stage Uo3 ceptual validity of the cost function used in designing the low-order reverberator. Should these low-order approximations prove to be perceptually poor in quality, we will need to consider more accurate cost functions. We are also concerned about generalizing these methods to other types of rooms, including those with substantial reverberation times and acoustic detail. Part of this work will clearly be the incorporation of coloration into the low-order approximants to reflect the fact that different spectral bands decay at different rates. Finally, we are interested in the problem of simultaneously fitting room impulse responses for binaural realization over headphones. We anticipate that the perceptual criteria will introduce substantially greater constraints on any low-order approximant than is present in purely monaural systems. Acknowledgments This work was supported by a fellowship from TRW to the first author and by the MusEn Project with funds provided from the Office of the President of the University of Michigan. References [Begault, 1992] D. R. Begault: "Perceptual effects of synthetic reverberation on three-dimensional audio systems," Journal of the Audio Engineering Society, 40(1), pp. 895-904, 1992. [Michalewicz, 1994] Zbigniew Michalewicz: Genetic Algorithms + Data Structures = Evolution Programs, 2nd Edition, Springer-Verlag, New York, 1994. [Moorer, 1985] James A. Moorer: "About This Reverberation Business," In C. Roads and J. Strawn (Ed's.): Foundations of Computer Music, MIT Press, Cambridge, pp. 605-639, 1985. [Rife, 1989] D. D. Rife and J. VanderKooj: "Transfer function measurement with maximum length sequences," Journal of the Audio Engineering Society, 37(6), pp. 419-444, 1989. [Schroeder, 1961] M. R. Schroeder and B. F. Logan: "Colorless artificial reverberation," Journal of the Audio Engineering Society, 9(3), 1961. [Schroeder, 1962] M. R. Schroeder: "Natural sounding artificial reverberation," Journal of the Audio Engineering Society, 10(3), pp. 219-223, 1962. [Schroeder, 1970] M. R. Schroeder: "Digital simulation of sound transmissions in reverberant spaces (part 1)," Journal of the Acoustical Society of America, 47(2), pp. 424-43 1, 1970. [Singh, 1993] Gagandeep Singh: "Use of a Genetic Algorithm for Parameterization of Low Order Reverb Simulation," University of Michigan, Directed Study Report, December, 1993. 0 20 40 60 Generation 5 Conclusions For a very specialized case, we have established the primarily goal of this paper: The genetic algorithm is effective in matching a reverberator model to a measured room response. We have also verified that higher order models generally perform better, but it takes longer to find the best solutions because the dimension of the parameter space is larger. More generally, we are interested in the extensions of this method to a number of important problems in synthesizing and modeling rooms and the behavior of sources in rooms. These include characterizing the per ICMC Proceedings 1996 113 Mrozek & Wakefield