Abstract:
Techniques for reducing unwanted acoustic feedback in a space are carried out by an adaptive notch filter algorithm that adjusts a notch to a plurality of different notch values in order to locate feedback. The results obtained by performing the algorithm at various notch values are compared. Based on the comparison, the parameters for the algorithm are adjusted for processing of the input signals to reduce the feedback.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     This invention relates to techniques for reducing acoustic feedback, and more particularly relates to such techniques in which a digital notch filter algorithm is employed. 
     2. Description of Related Art 
     Digital notch filters have been used in the past in an attempt to reduce acoustic feedback in sound amplification systems, including public address systems. For example, U.S. Pat. No. 4,091,236 (Chen, issued May 23, 1978) describes an analog notch filter for an audio signal to suppress acoustical feedback. The apparatus receives an audio signal which is substantially non-periodic in the absence of acoustical feedback and substantially periodic with an instantaneous dominant frequency in the presence of such feedback. The duration of successive periods are monitored and compared by an up/down counter to determine whether the audio input signal is substantially periodic and to determine the instantaneous dominant frequency of the audio signal. Upon detection of an audio signal which is substantially periodic, the notch filter is tuned to the instantaneous dominant frequency so as to suppress the acoustical feedback. 
     U.S. Pat. No. 4,232,192 (Beex, issued Nov. 4, 1980) describes an integrator/detector (FIG. 9) which determines when an audio signal has exceeded a threshold for a selected number of cycles. If the threshold is exceeded for the selected number of cycles, a sampler circuit samples a voltage corresponding to the frequency that has exceeded the threshold. The sampled voltage is used by a voltage frequency converter in order to adjust the notch of a notch filter implemented in hardware. 
     U.S. Pat. No. 5,245,665 (Lewis et al., issued Sep. 14, 1993) describes a device for suppressing feedback in which a Fast Fourier Transform is conducted on samples of digitized signals to produce corresponding frequency spectrums. The magnitudes of the spectrum at various frequencies are analyzed to determine one or more peak frequencies which are 33 decibels greater than harmonics or sub-harmonics of the frequency in an attempt to detect resonating feedback frequencies. Two processors are required. A primary processor periodically collects a series of the passing digital signals and conducts a Fast Fourier Transform on each collected series of digital signals. The frequency spectrums produced by the Fast Fourier Transform are examined by the primary processor to discover the presence of any resonating feedback frequency. Filter control signals are passed by the primary processor, along with the digital sound signals, to a secondary processor which operates a digital filtering algorithm in accordance with the filter control signals to attenuate resonating feedback frequencies in the stream of digital signals. 
     SUMMARY OF THE INVENTION 
     The present invention can be used to increase the effective acoustic gain before acoustic feedback in public address systems, hearing aids, teleconferencing systems, hands-free communication interfaces, and the like. The invention uses techniques unrelated to the notch filters employed by the known prior art, including the above-discussed patents. Rather than attempting to identify a frequency at which feedback is occurring, the present invention employs an algorithm defining a digital filter with a notch adjustable to a plurality of notch values expressed in non-frequency terms, such as phase angles. Feedback is located by comparing values resulting from the processing with the notch adjusted to different notch values. 
     One novel feature of the invention is that notch filter coefficients are generated directly by the feedback detector. This eliminates the step of identifying the frequency of feedback prior to generating the notch filter coefficients. 
     According to one embodiment of the invention, the notch values are adjusted until the signals processed by the notch filter algorithm result in a minimum mean squared value over a time window. After the feedback has been located using the notch filter algorithm, digital output signals are generated by executing the algorithm with the notch adjusted to the notch value at which the minimum mean squared value results. The digital output signals then are converted to corresponding analog signals which are transmitted to a speaker. 
     By using the foregoing techniques, acoustic feedback can be reduced with a degree of efficiency and accuracy previously unattainable. By eliminating the need to determine the frequency at which feedback is occurring, the technique can be carried out by a single inexpensive microprocessor. In addition, the feedback can be located with a high degree of accuracy, thereby reducing the filter depth required to ensure system stability, increasing the resulting quality of the sound produced by the overall system. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     These and other advantages and features of the invention will become apparent upon reading the followed detailed description and referring to the accompanying drawings in which like numbers refer to like parts throughout and in which: 
     FIG. 1 is a block diagram illustrating a preferred form of components for use in connection with the present invention; 
     FIGS. 2 and 3 are flow diagrams illustrating a preferred form of algorithm executed by the digital signal processor shown in FIG. 1; and 
     FIG. 4 is a flow diagram illustrating a preferred form of digital notch filter algorithm performed by the processor shown in FIG. 1. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring to FIG. 1, a preferred form of the invention includes a conventional microphone 100 that generates audio signals which are sampled every 21 microseconds by a conventional analog to digital converter 102. The digital signals produced by converter 102 are received by a conventional digital signal processor 104 and are processed according to the algorithms described in connection with FIGS. 2-4. Processor 104 outputs digital signals resulting from the algorithms to a conventional digital to analog converter 106 which supplies audio signals to a conventional amplifier 108 that drives a speaker 110. All of the components illustrated in FIG. 1 are included within a space 112 which may be a room, an ear canal in which a hearing aid is mounted, and the like. 
     Referring to FIG. 2, processor 104 receives a new digital input sample from converter 102 every 21 microseconds as shown in step S10. In step S12, the processor performs an automatic gain control function that includes a digital peak detector with a rapid attack and slow decay. The peak detector creates a control signal which keeps the value of the signals from converter 102 normalized to the digital clipping level. This feature maintains a maximum undistorted signal for processing by an adaptive filter algorithm even in the presence of weak feedback signals. 
     The input sample values resulting from automatic gain control in step S12 (i.e., values x(n)) are operated on by an adaptive notch filter algorithm in step S14. FIG. 4 illustrates the adaptive notch filter algorithm in conventional filter notation. The algorithm includes addition terms A10-A17, multiplication terms M10-M17, and one clock cycle delays represented by D10-D13. During each clock cycle, a new value of k 0  is calculated and substituted in multiplication terms M14-M15. The value of k 1  is fixed at 1. In FIG. 4, a 0  =k 0 , a 1  =∝(k 1 ), therefore a 1  =∝. 
     The notch filter algorithm adapts parameter k 0  until the presence of feedback, if any, is detected. A value of k is calculated according to the following equation: ##EQU1## from which is calculated k 0  (n) where 
     
         k.sub.0 (n)=0.5k.sub.0 (n-1)+0.5k, 
    
     
         C(n+1)=λC(n)+A(n+1)B(n+1), 
    
     
         D(n+1)=λD(n)+A(n+1)A(n+1), 
    
     
         A(n+1)=2*s.sub.0 (n), 
    
     
         B(n+1)=s.sub.0 (n+1)+s.sub.0 (n-1), 
    
     and 
     
         s.sub.0 (n+1)=x(n+1)-k.sub.0 (n)(1+∝)s.sub.0 (n)-∝s.sub.0 (n-1), 
    
     where ∝ is a parameter which preferably ranges in value from 0.99 to 0.999 and corresponds to the phase angle band width of the notch filter which preferably varies from 0.0375 to 0.075 degrees. 
     In step S14, the value of k 0  converges on a first value at which the values resulting from the notch filter algorithm described in FIG. 4 represent a minimum mean squared value over a time window. The time window is determined by the value of λ which is set to a value less than one, such as 0.9. Stated differently, the value of parameter k 0  converges on a first notch value at which the value of s 2   2  is minimized over a time period determined by the value of λ which preferably lies within the range 0.9 to 0.05. 
     The algorithm illustrated in FIG. 4 results in a value s 2  at the end of step S14. 
     In step S16, value s 2  is used to generate first remainder values by subtracting the values of s 2  from the input values x(n). In step S18, a first resultant value is calculated by taking the absolute value of the first remainder values and averaging them over time. Averaging is achieved by calculating the average of the absolute value signals using the following equation: 
     
         z(n)=beta*y(n)+(1-beta)*y(n-1)+(1-beta).sup.2 *y(n-2)+ . . . +(1-beta).sup.10 *y(n-10)+ . . . 
    
     The term beta determines the averaging ratio, viz. the most recent sample is multiplied by the value of beta and the previous value of the average output is multiplied by a term (1-beta). This is the same concept as multiplying older values of y by a smaller term. Values of beta are chosen for optimum performance and determine the value to which z would average to for a given signal input. 
     In step S20, the value of k 0  for the algorithm illustrated in FIG. 4 is set to the relationship -2k 0   2  +1, where the value of k 0  is the value obtained in step S14. If k 0  is represented by the -cos x, then the new second value of k 0  is set equal to cos 2x. With the new second value of k 0 , the algorithm illustrated in FIG. 4 is again executed and the resulting output value s 2  is subtracted from the input x(n) in step S22 to create second remainder values. In step S24, a second resultant value is calculated by taking the absolute value of the second remainder values and averaging them over time as in step S18. 
     Referring to FIG. 3, in step S26, the ratio of the first and second resultant values obtained in steps S18 and S24 are calculated. In step S28, if the ratio exceeds 30 decibels, a software counter is incremented in step S32. If the ratio does not exceed 30 decibels, then the software counter is reset in step S30. In steps S34 and S36, the algorithm determines whether the software counter exceeds a predetermined threshold count. The count corresponds to a time period preferably lying in the range of 50 to 100 milliseconds. If the count is exceeded, then the notch value k 0  of the filter algorithm shown in FIG. 4 is set to the same value obtained in step S14. In step S38, the filter algorithm shown in FIG. 4 is executed with the value of k 0  obtained from step S14. Step S38 results in a substantial decrease in the magnitude of the feedback signal detected in steps S10-S34. Step S38 is executed as many times as necessary with k 0  set to different values corresponding to feedback detected in steps S10-S34 at different values of k 0 . 
     The output digital signals resulting from step S38 are sent to digital to analog converter 106 (FIG. 1). In step S40, the algorithm waits for the next sample and returns via path P10 to step S10 (FIG. 2) in order to execute another cycle of the algorithm. 
     Those skilled in the art will recognize that the preferred embodiments may be altered and amended without departing from the true spirit and scope of the invention as defined in the accompanying claims.