Mackie SP-DSP1 User's Manual

Mackie Industrial White Paper
Noise Sensing Using a Variation of the
nLMS Adaptive Filter with Auto Calibration
CHRIS JUBIEN, AES Member, COSTA LAKOUMENTAS, AES Member,
This White Paper discusses a system that will compensate for the noise level in a room by measuring the program and noise level sensed through an ambient microphone. The system then changes the program level in proportion to the noise level that was sensed through the microphone. The technique that is presented here uses a combination of analog to digital conversion (ADC), adaptive digital ltering running on a digital signal processor (DSP), and digital to analog conversion (DAC). The adaptive lter employed is a variation on the Normal­ized Least Mean Squares (nLMS) method. This approach effectively “nulls out” any music that was sensed at the ambient microphone after which the only thing that remains is the noise. A Root Mean Square (RMS) measure of this noise level provides the ability to adjust the pro­gram level accordingly.
BRIAN RODEN, AES Member, DALE SHPAK, AES Member,
JEFF SONDERMEYER, AES Member
0 Introduction
Virtually anyone who has ever listened to music in an auto­mobile has realized this fundamental fact: while driving, the music level must be louder than while the car is parked. The reason for this is because while driving the noise level (wind, road, etc.) is louder than while parked. This requires that the listener constantly adjust the music level to compensate for the varying noise levels. This is not only a problem for automo­biles but virtually all sound systems where background noise is varying substantially. For example: in a factory setting, the music would be set to one level while the machinery is running and another while it is not running. For most systems, this requires that someone always adjust the level in propor­tion to the noise. The question naturally arises: “why can’t this be done automatically?” Mackie Designs has invested a considerable amount of time in research and development to nd an answer to this very question. In the process, we have developed a sophisticated DSP noise sensing algorithm that will perform this task precisely. Mackie’s SP-DSP1™ is an automatic level controller that maximizes intelligibility by changing gain in proportion to environmental noise level changes [6]. Basically, this system senses the level of the ambient noise of a room and adjusts the system gain accord­ingly. To work properly, the controller must “null out” any effect that the program material (music) has on the noise being
received by the ambient microphone. The method we have employed to differentiate the noise from the program material is what makes our algorithm unique (patent pending). One innovative feature of our algorithm is that it adapts over time to the varying room acoustics (i.e. people, drapes, sliding doors, etc.) to provide the best possible music rejection. This signicantly reduces the possibility of “runaway” gain as exhibited in existing hardware-based implementations [10]. To accomplish this, we have utilized a combination of digital hardware (SP-DSP1™) running a complex software algorithm [8]. Figure 0 shows the hardware block diagram of the noise sensor. The software is actually twofold: an embedded soft­ware algorithm plus application software (SP-Control™ for the Palm™) to allow for ease of user control. Additionally, the SP-DSP1™ algorithm allows for a high level of automation, which in-turn, makes this system extremely easy to setup and use. Unlike some of the earlier attempts at “noise sensing”, the SP-Control™ software requires no complex procedures during setup and calibration. The user simply places his speaker(s) as needed and positions the ambient microphone so that it is listening to the primary noise source. Then the appropriate gain structure is setup as well as a few room-specic user parameters. Finally, while playing music, an Auto Calibration is initiated. It’s fast and simple!
September 2000
1
Mackie Industrial White Paper Noise Sensing
32-bit
Floating-Point
DSP
Stereo
DAC
Stereo
ADC
EPROM
SERIAL
EEPROM
Program Input
Ambient Mic
Input
Program
Output
RX
GND
`
TX
RS-232
TRANS.
RS-232 DSUB9
FIR
Down
Sampler
Down
Sampler
Anti-Alias
Filter
Anti-Alias
Filter
G
RMS
Measure
Coefficient
Calculator
Compander
error
Y
-
+
Noise
Threshold
Override
nLMS Adaptive Filter
Figure 0: Hardware Block Diagram
1 Algorithm Overview
This section summarizes the Ambient Noise Sensing Algorithm (see Figure 1) implemented in the SP-DSP1™. The algorithm is used to increase the sensitivity to ambient noise in the room by rejecting the source signal (music) that is broadcast into the room. This allows the SP-DSP1™ to control the volume of the music based on the room ambient noise. The better the rejection of the music signal the more sensitive the gain control without runaway gain problems.
The algorithm adapts to the room characteristics by comparing the room response to the source signal. It computes its own approximation of the room response in order to cancel the music signal from the signal picked up by a room microphone [1-5,7]. Room size is the most important factor determining the effective­ness of the algorithm. Small rooms (ofce size) can achieve as much as 40dB music rejection, while larger rooms (nightclubs or restaurants) might only achieve 10-20dB. Even 10dB rejection allows noticeably better sensitivity to noise.
2
Figure 1: Algorithm Block Diagram
September 2000
Mackie Industrial White Paper Noise Sensing
1.1 Algorithm Block Diagram
The ambient noise sensor algorithm is a variation of a Nor­malized LMS Adaptive Filter [2-4, 7, 11-12]. The coefcient calculator in the system uses the error signal, some Root Mean Square (RMS) signal levels and energies, and the current coef­cients to compute a new set of Finite Impulse Response (FIR) coefcients that approach the Room Transfer Function (RTF) [5]. Down sampling has been used to optimize the adaptation char­acteristics of the algorithm for the largest room possible using minimum MIPS and memory [8, 9]. The compander controls the gain of the music signal based on the ambient noise detected and the user input parameters.
1.2 Normalized LMS Adaptive Filter
The Normalized Least Mean Square (nLMS) Adaptive Filter portion of the Ambient Noise Sensor consists of the FIR lter (Equation 1), Coefcient Calculator (Equation 2), Summation (producing the error signal), and RMS measurements, and can be considered equivalent to the MATLAB1 simulation shown in Diagram 1 [1, 9, 10]. In this simulation the ‘Voice’ signal is the ambient noise signal, the delays represent the RTF, and the nLMS lter adapts to produce the ‘Out’ signal which is an approximation of the music combined with the RTF. When the output signal from the nLMS is subtracted from the input signal (Voice + RTF (Music)) the ‘err’ or error signal approximates the original ‘Voice’ or noise signal. Look at the gains and delays shown in the blocks of Diagram 1 (simu­lating the direct sound plus one reection). The amplitude versus time plot was generated with the coefcients from the ‘Taps’ output of nLMS lter. As you can see from this simple example, this lter is the RTF. Obviously, in the real world, the exact RTF is not obtainable. However, the better the FIR approximates the RTF, the closer the error signal is to the actual noise in the room [2-4, 11-12]. The nLMS Adap­tive Filter is constantly adapting to the room characteristics. This provides optimum performance when the room acoustics change. Room acoustics can change signicantly due to the arrangement of furnishings, opening or closing drapes, the number of people in the room changing, or more dramatic changes such as moveable walls or room dividers.
The effectiveness of the nLMS is determined mostly by the number of taps in the FIR (internal to the nLMS adaptive Filter), the adaptation algorithm, and the density and duration of the RTF. In the SP-DSP1™ the processing capability and memory allocation has limited the FIR length to about 1500 taps. As a result, the signals are down sampled to allow for good cancellation even in reasonably large rooms. Since the
1
MATLAB is the trademark of a comercial matrix-based processing
language.
speed of sound is approximately 1 ft/ms, we designed the system to provide adequate rejection for music paths (direct sound plus reections) up to about 300 feet.
A standard Transversal n-point FIR lter was used [1, 5, 8]. Input buffering is n points long plus a little extra buffer space. The Output, y, forms another buffer:
N-1
y(n) = w
(n)*u(n-i)
i
i=0
(1) where N = number of FIR taps or the order of the lter n = time index y = FIR output w = adaptation coefcients u = FIR input
Calculation of new coefcients (coefcient calculator) is performed if the following two conditions are met:
If the normalization energy is greater than zero (if
negative or 0 it is a debug error condition).
If the Error Threshold signal is above the threshold
computed as a portion of the normalization energy of the input signal.
Mathematical calculations for coefcient updating are according to a slightly modied nLMS formula [2-4, 7, 11-12]:
Wi(n+1) = Wi(n)+ ————————
e(n) * beta * u(n-i)
epsilon * E(n)
(2)
where n = time index i = 0..n-1 W = FIR lter coefcients e = error u = FIR input data E = Normalization Energy beta = adaptation rate (function) epsilon = stability coefcient
Our slightly different use of beta (not shown) plus the use of an Error Threshold are unique adaptations of the standard nLMS algorithm. The new beta function allows faster adapta­tion when the error, e, gets smaller. The normal use of beta as a scaling value (shown above) requires a small value to guarantee stability of the algorithm when the error is large,
September 2000
3
Mackie Industrial White Paper Noise Sensing
Diagram 1: Matlab simulation Block Diagram and Results
which signicantly reduced the adaptation amount when the error was small, extending the adaptation time to well over 30 minutes. Our beta function (patent pending) gives stability to the algorithm when the error is large, but effectively shortens the adaptation time dramatically when the error becomes small. This allows the algorithm to adapt to a room in only a few minutes.
For small rooms a signicant portion of the music energy due to the paths from speaker to microphone (including reec­tions) are removed by the nLMS algorithm, as there would
4
have to be many reections before the sound could have trav­eled this far. Each reection reduces the energy of the music signal, and the amount of reduction of the energy is related to the shape and material of the reecting surface. The more ‘live’ the room, the longer and more dense the RTF is, the less the energy of the music signal that can be removed by the nLMS lter [6]. Even without a lot of reections a very large room may have poor cancellation due to the small number of reections before the music signal has traveled the maximum ‘distance’ of the FIR.
September 2000
Loading...
+ 8 hidden pages