# Patent

## Title
Ear-coupling detection and adjustment of adaptive response in noise-canceling in personal audio devices

## Abstract

A personal audio device, such as a wireless telephone, includes an adaptive noise canceling (ANC) circuit that adaptively generates an anti-noise signal from a reference microphone signal and injects the anti-noise signal into the speaker or other transducer output to cause cancellation of ambient audio sounds. An error microphone is also provided proximate the speaker to estimate an electro-acoustical path from the noise canceling circuit through the transducer. A processing circuit determines a degree of coupling between the user's ear and the transducer and adjusts the adaptive cancellation of the ambient sounds to prevent erroneous and possibly disruptive generation of the anti-noise signal if the degree of coupling lies either below or above a range of normal operating ear contact pressure.

## Background
This U.S. Patent Application Claims priority under 35 U.S.C. 119(e) to U.S. Provisional Patent Application Ser. No. 61/419,532 filed on Dec. 3, 2010 and to U.S. Provisional Patent Application Ser. No. 61/493,162 filed on Jun. 3, 2011.


BACKGROUND OF THE INVENTION
1. Field of the Invention
The present invention relates generally to personal audio devices such as wireless telephones that include adaptive noise cancellation (ANC), and more specifically, to management of ANC in a personal audio device that is responsive to the quality of the coupling of the output transducer of the personal audio device to the user's ear.
2. Background of the Invention
Wireless telephones, such as mobile/cellular telephones, cordless telephones, and other consumer audio devices, such as mp3 players, are in widespread use. Performance of such devices with respect to intelligibility can be improved by providing noise canceling using a microphone to measure ambient acoustic events and then using signal processing to insert an anti-noise signal into the output of the device to cancel the ambient acoustic events.
Since the acoustic environment around personal audio devices, such as wireless telephones, can change dramatically, depending on the sources of noise that are present and the position of the device itself, it is desirable to adapt the noise canceling to take into account such environmental changes. However, the performance of an adaptive noise canceling system varies with how closely the transducer used to generate the output audio including noise-canceling information is coupled to the user's ear.
Therefore, it would be desirable to provide a personal audio device, including a wireless telephone, that provides noise cancellation in a variable acoustic environment and that can compensate for the quality of the coupling between the output transducer and the user's ear.
SUMMARY OF THE INVENTION
The above stated objective of providing a personal audio device providing noise cancellation in a variable acoustic environment and that compensates for the quality of coupling between the output transducer and the user's ear, is accomplished in a personal audio device, a method of operation, and an integrated circuit.
The personal audio device includes a housing, with a transducer mounted on the housing for reproducing an audio signal that includes both source audio for playback to a listener and an anti-noise signal for countering the effects of ambient audio sounds in an acoustic output of the transducer. A reference microphone is mounted on the housing to provide a reference microphone signal indicative of the ambient audio sounds. The personal audio device further includes an adaptive noise-canceling (ANC) processing circuit within the housing for adaptively generating an anti-noise signal from the reference microphone signal such that the anti-noise signal causes substantial cancellation of the ambient audio sounds. An error microphone is included for correcting for the electro-acoustic path from the output of the processing circuit through the transducer and to determine the degree of coupling between the user's ear and the transducer and a secondary path estimating adaptive filter is used to correct the error microphone signal for changes due to the acoustic path from the transducer to the error microphone. The ANC processing circuit monitors the response of the secondary path adaptive filter and optionally the error microphone signal to determine the pressure between the user's ear and the personal audio device. The ANC circuit then takes action to prevent the anti-noise signal from being undesirably/erroneously generated due to the phone being away from the user's ear (loosely coupled) or pressed too hard on the user's ear.
The foregoing and other objectives, features, and advantages of the invention will be apparent from the following, more particular, description of the preferred embodiment of the invention, as illustrated in the accompanying drawings.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is an illustration of a wireless telephone 10 in accordance with an embodiment of the present invention.
FIG. 2 is a block diagram of circuits within wireless telephone 10 in accordance with an embodiment of the present invention.
FIG. 3 is a block diagram depicting signal processing circuits and functional blocks within ANC circuit 30 of CODEC integrated circuit 20 of FIG. 2 in accordance with an embodiment of the present invention.
FIG. 4 is a graph illustrating the relationship between pressure between a user's ear (quality of transducer seal) and wireless telephone 10 to the overall energy of secondary path response estimate SE(z).
FIG. 5 is a graph illustrating the frequency response of a secondary path response estimate SE(z) for different amounts of pressure between a user's ear and a wireless telephone 10.
FIG. 6 is a flowchart depicting a method in accordance with an embodiment of the present invention.
FIG. 7 is a block diagram depicting signal processing circuits and functional blocks within an integrated circuit in accordance with an embodiment of the present invention.



DESCRIPTION OF ILLUSTRATIVE EMBODIMENT
The present invention encompasses noise canceling techniques and circuits that can be implemented in a personal audio device, such as a wireless telephone. The personal audio device includes an adaptive noise canceling (ANC) circuit that measures the ambient acoustic environment and generates a signal that is injected into the speaker (or other transducer) output to cancel ambient acoustic events. A reference microphone is provided to measure the ambient acoustic environment and an error microphone is included to measure the ambient audio and transducer output at the transducer, thus giving an indication of the effectiveness of the noise cancellation. However, depending on the contact pressure between the user's ear and the personal audio device, the ANC circuit may operate improperly and the anti-noise may be ineffective or even worsen the audibility of the audio information being presented to the user. The present invention provides mechanisms for determining the level of contact pressure between the device and the user's ear and taking action on the ANC circuits to avoid undesirable responses.
Referring now to FIG. 1, a wireless telephone 10 is illustrated in accordance with an embodiment of the present invention is shown in proximity to a human ear 5. Illustrated wireless telephone 10 is an example of a device in which techniques in accordance with embodiments of the invention may be employed, but it is understood that not all of the elements or configurations embodied in illustrated wireless telephone 10, or in the circuits depicted in subsequent illustrations, are required in order to practice the invention recited in the Claims. Wireless telephone 10 includes a transducer such as speaker SPKR that reproduces distant speech received by wireless telephone 10, along with other local audio event such as ringtones, stored audio program material, injection of near-end speech (i.e., the speech of the user of wireless telephone 10) to provide a balanced conversational perception, and other audio that requires reproduction by wireless telephone 10, such as sources from web-pages or other network communications received by wireless telephone 10 and audio indications such as battery low and other system event notifications. A near-speech microphone NS is provided to capture near-end speech, which is transmitted from wireless telephone 10 to the other conversation participant(s).
Wireless telephone 10 includes adaptive noise canceling (ANC) circuits and features that inject an anti-noise signal into speaker SPKR to improve intelligibility of the distant speech and other audio reproduced by speaker SPKR. A reference microphone R is provided for measuring the ambient acoustic environment, and is positioned away from the typical position of a user's mouth, so that the near-end speech is minimized in the signal produced by reference microphone R. A third microphone, error microphone E, is provided in order to further improve the ANC operation by providing a measure of the ambient audio combined with the audio reproduced by speaker SPKR close to ear 5, when wireless telephone 10 is in close proximity to ear 5. Exemplary circuit 14 within wireless telephone 10 includes an audio CODEC integrated circuit 20 that receives the signals from reference microphone R, near speech microphone NS and error microphone E and interfaces with other integrated circuits such as an RF integrated circuit 12 containing the wireless telephone transceiver. In other embodiments of the invention, the circuits and techniques disclosed herein may be incorporated in a single integrated circuit that contains control circuits and other functionality for implementing the entirety of the personal audio device, such as an MP3 player-on-a-chip integrated circuit.
In general, the ANC techniques of the present invention measure ambient acoustic events (as opposed to the output of speaker SPKR and/or the near-end speech) impinging on reference microphone R, and by also measuring the same ambient acoustic events impinging on error microphone E, the ANC processing circuits of illustrated wireless telephone 10 adapt an anti-noise signal generated from the output of reference microphone R to have a characteristic that minimizes the amplitude of the ambient acoustic events present at error microphone E. Since acoustic path P(z) extends from reference microphone R to error microphone E, the ANC circuits are essentially estimating acoustic path P(z) combined with removing effects of an electro-acoustic path S(z). Electro-acoustic path S(z) represents the response of the audio output circuits of CODEC IC 20 and the acoustic/electric transfer function of speaker SPKR including the coupling between speaker SPKR and error microphone E in the particular acoustic environment. S(z) is affected by the proximity and structure of ear 5 and other physical objects and human head structures that may be in proximity to wireless telephone 10, when wireless telephone is not firmly pressed to ear 5. While the illustrated wireless telephone 10 includes a two microphone ANC system with a third near speech microphone NS, some aspects of the present invention may be practiced in a system in accordance with other embodiments of the invention that do not include separate error and reference microphones, or yet other embodiments of the invention in which a wireless telephone uses near speech microphone NS to perform the function of the reference microphone R. Also, in personal audio devices designed only for audio playback, near speech microphone NS will generally not be included, and the near-speech signal paths in the circuits described in further detail below can be omitted, without changing the scope of the invention, other than to limit the options provided for input to the microphone covering detection schemes.
Referring now to FIG. 2, circuits within wireless telephone 10 are shown in a block diagram. CODEC integrated circuit 20 includes an analog-to-digital converter (ADC) 21A for receiving the reference microphone signal and generating a digital representation ref of the reference microphone signal, an ADC 21B for receiving the error microphone signal and generating a digital representation err of the error microphone signal, and an ADC 21C for receiving the near speech microphone signal and generating a digital representation ns of the error microphone signal. CODEC IC 20 generates an output for driving speaker SPKR from an amplifier A1, which amplifies the output of a digital-to-analog converter (DAC) 23 that receives the output of a combiner 26. Combiner 26 combines audio signals from internal audio sources 24, the anti-noise signal generated by ANC circuit 30, which by convention has the same polarity as the noise in reference microphone signal ref and is therefore subtracted by combiner 26, a portion of near speech signal ns so that the user of wireless telephone 10 hears their own voice in proper relation to downlink speech ds, which is received from radio frequency (RF) integrated circuit 22 and is also combined by combiner 26. Near speech signal ns is also provided to RF integrated circuit 22 and is transmitted as uplink speech to the service provider via antenna ANT.
Referring now to FIG. 3, details of ANC circuit 30 are shown in accordance with an embodiment of the present invention. An adaptive filter formed from a fixed filter 32A having a response WFIXED(z) and an adaptive portion 32B having a response WADAPT(z) with outputs summed by a combiner 36B receives reference microphone signal ref and under ideal circumstances, adapts its transfer function W(z)=WFIXED(z)+WADAPT(z) to generate the anti-noise signal, which is provided to an output combiner that combines the anti-noise signal with the audio to be reproduced by the transducer, as exemplified by combiner 26 of FIG. 2. The response of W(z) adapts to estimate P(z)/S(z), which is the ideal response for the anti-noise signal under ideal operating conditions. A controllable amplifier circuit A1 mutes or attenuates the anti-noise signal under certain non-ideal conditions as described in further detail below, when the anti-noise signal is expected to be ineffective or erroneous due to a lack of seal between the user's ear and wireless telephone 10. The coefficients of adaptive filter 32B are controlled by a W coefficient control block 31 that uses a correlation of two signals to determine the response of adaptive filter 32B, which generally minimizes the energy of the error, in a least-mean squares sense, between those components of reference microphone signal ref that are present in error microphone signal err. The signals compared by W coefficient control block 31 are the reference microphone signal ref as shaped by a copy of an estimate SECOPY(z) of the response of path S(z) provided by filter 34B and an error signal e(n) formed by subtracting a modified portion of downlink audio signal ds from error microphone signal err. By transforming reference microphone signal ref with a copy of the estimate of the response of path S(z), estimate SECOPY(z), and adapting adaptive filter 32B to minimize the correlation between the resultant signal and the error microphone signal err, adaptive filter 32B adapts to the desired response of P(z)/S(z)−WFIXED(z), and thus response W(z) adapts to P(z)/S(z), resulting in a noise-canceling error that is ideally white noise. As mentioned above, the signal compared to the output of filter 34B by W coefficient control block 31 adds to the error microphone signal an inverted amount of downlink audio signal ds that has been processed by filter response SE(z), of which response SECOPY(z) is a copy. By injecting an inverted amount of downlink audio signal ds, adaptive filter 32B is prevented from adapting to the relatively large amount of downlink audio present in error microphone signal err and by transforming that inverted copy of downlink audio signal ds with the estimate of the response of path S(z), the downlink audio that is removed from error microphone signal err before comparison should match the expected version of downlink audio signal ds reproduced at error microphone signal err, since the electrical and acoustical path of S(z) is the path taken by downlink audio signal ds to arrive at error microphone E. Filter 34B is not an adaptive filter, per se, but has an adjustable response that is tuned to match the response of adaptive filter 34A, so that the response of filter 34B tracks the adapting of adaptive filter 34A.
To implement the above, adaptive filter 34A has coefficients controlled by SE coefficient control block 33, which compares downlink audio signal ds and error microphone signal err after removal of the above-described filtered downlink audio signal ds, that has been filtered by adaptive filter 34A to represent the expected downlink audio delivered to error microphone E, and which is removed from the output of adaptive filter 34A by a combiner 36A. SE coefficient control block 33 correlates the actual downlink speech signal ds with the components of downlink audio signal ds that are present in error microphone signal err. Adaptive filter 34A is thereby adapted to generate a signal from downlink audio signal ds (and optionally, the anti-noise signal combined by combiner 36B during muting conditions as described above), that when subtracted from error microphone signal err, contains the content of error microphone signal err that is not due to downlink audio signal ds. As will be described in further detail below, the overall energy of the error signal normalized to the overall energy of the response SE(z) is related to the quality of the seal between the user's ear and wireless telephone 10. An ear pressure indicator computation block 37 determines the ratio between E|e(n)|, which is the energy of the error signal generated by combiner 36 and the overall magnitude of the response of SE(z): Σ|SEn(z)|. Ear pressure indication E|e(n)|/Σ|SEn(z)| is only one possible function of e(n) and SEn(z) that may be used to yield a measure of ear pressure. For example, Σ|SEn(z)| or Σ SEn(z)2 which are functions of only SE(z) can alternatively be used, since response SE(z) changes with ear pressure. A comparator K1 compares the output of computation block 37 with a low pressure threshold VthL. If E|e(n)|/Σ|SEn(z)| is above the threshold, indicating that ear pressure is below the normal operating range (e.g., wireless telephone 10 is off of the user's ear) then ear pressure response logic is signaled to take action to prevent generation of undesirable anti-noise at the user's ear 5. Similarly, a comparator K2 compares the output of computation block with a high pressure threshold VthH and if E|e(n)|/Σ|SEn(z)| is below the threshold, indicating that ear pressure is above the normal operating range (e.g., wireless telephone 10 is pressed hard onto the user's ear) then ear pressure response logic is also signaled to take action to prevent generation of undesirable anti-noise at the user's ear 5.
Referring now to FIG. 4, the relationship between the overall magnitude of the response of SE(z), Σ|SEn(z)| is shown vs. pressure in Newtons, between wireless telephone 10 and a user's ear. As illustrated, as the pressure is increased between wireless telephone 10 and the user's ear 5, response SE(z) increases in magnitude, which indicates an improved electro-acoustic path S(z), which is a measure of a degree of coupling between speaker SPKR and error microphone E as described above, and thus the degree of coupling between the user's ear 5 and speaker SPKR. A higher degree of coupling between the user's ear 5 and speaker SPKR is indicated when response SE(z) increases in magnitude, and conversely, a lower degree of coupling between the user's ear and speaker SPKR is indicated when response SE(z) decreases in magnitude. Since adaptive filter 32B adapts to the desired response of P(z)/S(z), as ear pressure is increased and response SE(z) increases in energy, less anti-noise is required and thus less is generated. Conversely, as the pressure between the ear and wireless telephone 10 decreases, the anti-noise signal will increase in energy and may not be suitable for use, since the user's ear is no longer well-coupled to transducer SPKR and error microphone E.
Referring now to FIG. 5, the variation of response SE(z) with frequency for different levels of ear pressure is shown. As illustrated in FIG. 4, as the pressure is increased between wireless telephone 10 and the user's ear 5, response SE(z) increases in magnitude in the middle frequency ranges of the graph, which correspond to frequencies at which most of the energy in speech is located. The graphs depicted in FIGS. 4-5 are determined for individual wireless telephone designs using either a computer model, or a mock-up of a simulated user's head that allows adjustment of contact pressure between the head, which may also have a measurement microphone in simulated ear canal, and wireless telephone 10. In general, ANC only operates properly when there is a reasonable degree of coupling between the user's ear 5, transducer SPKR, and error microphone E. Since transducer SPKR will only be able to generate a certain amount of output level, e.g., 80 dB SPL in a closed cavity, once wireless telephone 10 is no longer in contact with the user's ear 5, the anti-noise signal is generally ineffective and in many circumstances should be muted. The lower threshold in this case may be, for example, a response SE(z) that indicates an ear pressure of 4N, or less. On the opposite end of the pressure variation realm, tight contact between the user's ear 5 and wireless telephone 10 provides attenuation of higher-frequency energy (e.g., frequencies from 2kHZ to 5 kHz), which can cause noise boost due to response W(z) not being able to adapt to the attenuated condition of the higher frequencies, and when the ear pressure is increased, the anti-noise signal is not adapted to cancel energies at the higher frequencies. Therefore, response WADAPT(z) should be reset to a predetermined value and adaptation of response WADAPT(z) is frozen, i.e., the coefficients of response WADAPT(z) are held constant at the predetermined values. The upper threshold in this case may be, for example, a response SE(z) that indicates an ear pressure of 15N, or greater. Alternatively, the overall level of the anti-noise signal can be attenuated, or a leakage of response WADAPT(z) of adaptive filter 32B increased. Leakage of response WADAPT (z) of adaptive filter 32B is provided by having the coefficients of response WADAPT (z) return to a flat frequency response (or alternatively a fixed frequency response, e.g. in implementations having only a single adaptive filter stage without WFIXED(z) providing the predetermined response).
When comparator K1 in the circuit of FIG. 3 indicates that the degree of coupling between the user's ear and wireless telephone has been reduced below a lower threshold, indicating a degree of coupling below the normal operating range, the following actions will be taken by ear pressure response logic 38:
1) Stop adaptation of W coefficient control 31
2) Mute the anti-noise signal by disabling amplifier A1
When comparator K2 in the circuit of FIG. 3 indicates that the coupling between the user's ear and wireless telephone has increased above an upper threshold, indicating a degree of coupling above the normal operating range, the following actions will be taken by ear pressure response logic 38:
1) Increase leakage of W coefficient control 31 or reset response WADAPT(z) and freeze adaptation of response WADAPT(z). As an alternative, the value produced by computation block 37 can be a multi-valued or continuous indication of different ear pressure levels, and the actions above can be replaced by applying an attenuation factor to the anti-noise signal in conformity with the level of ear pressure, so that when the ear pressure passes out of the normal operating range the anti-noise signal level is also attenuated by lowering the gain of amplifier A1. In one embodiment of the invention, response WFIXED(z) of fixed filter 32A is trained for maximum ear pressure, i.e., set to the appropriate response for to the maximum level of ear pressure (perfect seal). Then, the adaptive response of adaptive filter 32B, response WADAPT(z), is allowed to vary with ear pressure changes, up to the point that contact with the ear is minimal (no seal), at which point the adapting of response W(z) is halted and the anti-noise signal is muted, or the pressure on the ear is over the maximum pressure, at which point response WADAPT(z) is reset and adaptation of response WADAPT(z) is frozen, or the leakage is increased.
Referring now to FIG. 6, a method in accordance with an embodiment of the present invention is depicted in a flowchart. An indication of ear pressure is computed from the error microphone signal and response SE(z) coefficients as described above (step 70). If the ear pressure is less than the low threshold (decision 72), then wireless telephone is in the off-ear condition and the ANC system stops adapting response W(z) and mutes the anti-noise signal (step 74). Alternatively, if the ear pressure is greater than the high threshold (decision 76), then wireless telephone 10 is pressed hard to the user's ear and leakage of response W(z) response is increased or the adaptive portion of response W(z) is reset and frozen (step 78). Otherwise, if the ear pressure indication lies within the normal operating range (“No” to both decision 72 and decision 76)5 response W(z) adapts to the ambient audio environment and the anti-noise signal is output (step 80). Until the ANC scheme is terminated or wireless telephone 10 is shut down (decision 82), the process of steps 70-82 are repeated.
Referring now to FIG. 7, a block diagram of an ANC system is shown for illustrating ANC techniques in accordance an embodiment of the invention, as may be implemented within CODEC integrated circuit 20. Reference microphone signal ref is generated by a delta-sigma ADC 41A that operates at 64 times oversampling and the output of which is decimated by a factor of two by a decimator 42A to yield a 32 times oversampled signal. A delta-sigma shaper 43A spreads the energy of images outside of bands in which a resultant response of a parallel pair of filter stages 44A and 44B will have significant response. Filter stage 44B has a fixed response WFIXED(z) that is generally predetermined to provide a starting point at the estimate of P(z)/S(z) for the particular design of wireless telephone 10 for a typical user. An adaptive portion WADAPT(z) of the response of the estimate of P(z)/S(z) is provided by adaptive filter stage 44A, which is controlled by a leaky least-means-squared (LMS) coefficient controller 54A. Leaky LMS coefficient controller 54A is leaky in that the response normalizes to flat or otherwise predetermined response over time when no error input is provided to cause leaky LMS coefficient controller 54A to adapt. Providing a leaky controller prevents long-term instabilities that might arise under certain environmental conditions, and in general makes the system more robust against particular sensitivities of the ANC response. As in the system of FIG. 3, an ear pressure detection circuit 60 detects when the ear pressure indication is out of the normal operating range and takes action to prevent the anti-noise signal from being output and adaptive filter 44A from adapting to an incorrect response (off-ear) or increases the leakage of adaptive filter 44A or resets adaptive filter 44A to a predetermined response (hard pressure on ear) and freezes adaptation.
In the system depicted in FIG. 7, the reference microphone signal is filtered by a copy SECOPY(z) of the estimate of the response of path S(z), by a filter 51 that has a response SECOPY(z), the output of which is decimated by a factor of 32 by a decimator 52A to yield a baseband audio signal that is provided, through an infinite impulse response (IIR) filter 53A to leaky LMS 54A. Filter 51 is not an adaptive filter, per se, but has an adjustable response that is tuned to match the combined response of filter stages 55A and 55B, so that the response of filter 51 tracks the adapting of response SE(z). The error microphone signal err is generated by a delta-sigma ADC 41C that operates at 64 times oversampling and the output of which is decimated by a factor of two by a decimator 42B to yield a 32 times oversampled signal. As in the system of FIG. 3, an amount of downlink audio ds that has been filtered by an adaptive filter to apply response S(z) is removed from error microphone signal err by a combiner 46C, the output of which is decimated by a factor of 32 by a decimator 52C to yield a baseband audio signal that is provided, through an infinite impulse response (IIR) filter 53B to leaky LMS 54A. Response S(z) is produced by another parallel set of filter stages 55A and 55B, one of which, filter stage 55B has fixed response SEFIXED(z), and the other of which, filter stage 55A has an adaptive response SEADAPT(z) controlled by leaky LMS coefficient controller MB. The outputs of filter stages 55A and 55B are combined by a combiner 46E. Similar to the implementation of filter response W(z) described above, response SEFIXED(z) is generally a predetermined response known to provide a suitable starting point under various operating conditions for electrical/acoustical path S(z). Filter 51 is a copy of adaptive filter 55A/55B, but is not itself and adaptive filter, i.e., filter 51 does not separately adapt in response to its own output, and filter 51 can be implemented using a single stage or a dual stage. A separate control value is provided in the system of FIG. 7 to control the response of filter 51, which is shown as a single adaptive filter stage. However, filter 51 could alternatively be implemented using two parallel stages and the same control value used to control adaptive filter stage 55A could then be used to control the adjustable filter portion in the implementation of filter 51. The inputs to leaky LMS control block MB are also at baseband, provided by decimating a combination of downlink audio signal ds and internal audio ia, generated by a combiner 46H, by a decimator 52B that decimates by a factor of 32, and another input is provided by decimating the output of a combiner 46C that has removed the signal generated from the combined outputs of adaptive filter stage 55A and filter stage 55B that are combined by another combiner 46E. The output of combiner 46C represents error microphone signal err with the components due to downlink audio signal ds removed, which is provided to LMS control block MB after decimation by decimator 52C. The other input to LMS control block 54B is the baseband signal produced by decimator 52B.
The above arrangement of baseband and oversampled signaling provides for simplified control and reduced power consumed in the adaptive control blocks, such as leaky LMS controllers 54A and 54B, while providing the tap flexibility afforded by implementing adaptive filter stages 44A-44B, 55A-55B and filter 51 at the oversampled rates. The remainder of the system of FIG. 7 includes combiner 46H that combines downlink audio ds with internal audio ia, the output of which is provided to the input of a combiner 46D that adds a portion of near-end microphone signal ns that has been generated by sigma-delta ADC 41B and filtered by a sidetone attenuator 56 to prevent feedback conditions. The output of combiner 46D is shaped by a sigma-delta shaper 43B that provides inputs to filter stages 55A and 55B that has been shaped to shift images outside of bands where filter stages 55A and 55B will have significant response.
In accordance with an embodiment of the invention, the output of combiner 46D is also combined with the output of adaptive filter stages 44A-44B that have been processed by a control chain that includes a corresponding hard mute block 45A, 45B for each of the filter stages, a combiner 46A that combines the outputs of hard mute blocks 45A, 45B, a soft mute 47 and then a soft limiter 48 to produce the anti-noise signal that is subtracted by a combiner 46B with the source audio output of combiner 46D. The output of combiner 46B is interpolated up by a factor of two by an interpolator 49 and then reproduced by a sigma-delta DAC 50 operated at the 64× oversampling rate. The output of DAC 50 is provided to amplifier A1, which generates the signal delivered to speaker SPKR.
Each or some of the elements in the system of FIG. 7, as well in as the exemplary circuits of FIG. 2 and FIG. 3, can be implemented directly in logic, or by a processor such as a digital signal processing (DSP) core executing program instructions that perform operations such as the adaptive filtering and LMS coefficient computations. While the DAC and ADC stages are generally implemented with dedicated mixed-signal circuits, the architecture of the ANC system of the present invention will generally lend itself to a hybrid approach in which logic may be, for example, used in the highly oversampled sections of the design, while program code or microcode-driven processing elements are chosen for the more complex, but lower rate operations such as computing the taps for the adaptive filters and/or responding to detected changes in ear pressure as described herein.
While the invention has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form, and details may be made therein without departing from the spirit and scope of the invention.

## Claims

1. A personal audio device, comprising:
a personal audio device housing;
a transducer mounted on the housing for reproducing an audio signal including both source audio for playback to a listener and an anti-noise signal for countering the effects of ambient audio sounds in an acoustic output of the transducer;
a reference microphone mounted on the housing for providing a reference microphone signal indicative of the ambient audio sounds;
an error microphone mounted on the housing in proximity to the transducer for providing an error microphone signal indicative of the acoustic output of the transducer; and
a processing circuit that implements a first adaptive filter having a response that shapes the anti-noise signal to reduce the presence of the ambient audio sounds heard by the listener, wherein the first adaptive filter filters the reference microphone signal to generate the anti-noise signal, wherein the processing circuit implements a secondary path adaptive filter having a secondary path response that shapes the source audio and a combiner that removes the shaped source audio from the error microphone signal to provide an error signal indicative of the combined anti-noise signal and ambient audio sounds delivered to the listener, wherein the processing circuit adapts the response of the first adaptive filter to minimize the error signal, wherein the processing circuit determines a degree of coupling between the transducer and an ear of the listener and detects a change in the degree of coupling by comparing a value of an ear pressure indication computed from the secondary path response to a predetermined threshold, and wherein the processing circuit alters the response of the first adaptive filter in response to the value of the ear pressure indication crossing the predetermined threshold.

2. The personal audio device of claim 1, wherein the processing circuit alters the response of the first adaptive filter by forcing the response of the first adaptive filter to a predetermined response in response to determining that the degree of coupling is greater than an upper threshold value.

3. The personal audio device of claim 2, wherein the predetermined response is a response that is trained to cancel the presence of the ambient audio sounds heard by the listener when the degree of coupling is greater than the upper threshold value.

4. The personal audio device of claim 2, wherein an adaptive control of the response of the first adaptive filter has a leakage characteristic that restores the response of the first adaptive filter to the predetermined response at an adjustable rate of change, and wherein the processing circuit increases the adjustable rate of change in response to determining the degree of coupling is greater than the upper threshold value.

5. The personal audio device of claim 1, wherein the processing circuit mutes the anti-noise signal in response to determining that the degree of coupling is lower than a lower threshold value.

6. The personal audio device of claim 5, wherein the processing circuit stops adaptation of the response of the first adaptive filter in response to determining that the degree of coupling is lower than the lower threshold value.

7. The personal audio device of claim 5, wherein the processing circuit alters the response of the first adaptive filter by forcing the response of the first adaptive filter to a predetermined response in response to determining that the ear of the listener and the transducer to determining that the degree of coupling is greater than an upper threshold value.

8. The personal audio device of claim 7, wherein an adaptive control of the response of the first adaptive filter has a leakage characteristic that restores the response of the first adaptive filter to the predetermined response at an adjustable rate of change, and wherein the processing circuit increases the adjustable rate of change in response to determining that the degree of coupling is greater than the upper threshold value.

9. The personal audio device of claim 1, wherein the processing circuit determines the degree of coupling between the transducer and the ear of the listener from a magnitude of the error signal weighted by an inverse of a peak magnitude of the secondary path response of the secondary path adaptive filter, wherein an decrease in the magnitude of the error signal weighted by the inverse of the peak magnitude of the secondary path response of the secondary path adaptive filter indicates a greater degree of coupling between the transducer and the ear of the listener.

10. The personal audio device of claim 1, wherein the processing circuit determines the change in the degree of coupling between the transducer and the ear of the listener by comparing an indication of a peak magnitude of the secondary path response of the secondary path adaptive filter to a threshold value, wherein an increase in the peak magnitude of the secondary path response of the secondary path adaptive filter indicates a greater degree of coupling between the transducer and the ear of the listener.

11. A method of canceling ambient audio sounds in the proximity of a transducer of a personal audio device, the method comprising:
first measuring ambient audio sounds with a reference microphone;
second measuring an output of the transducer with an error microphone;
adaptively generating an anti-noise signal from a result of the first measuring for countering the effects of ambient audio sounds at an acoustic output of the transducer by adapting a response of a first adaptive filter that filters an output of the reference microphone;
filtering the reference microphone signal to generate the anti-noise signal,
shaping the source audio with a secondary path response;
removing the shaped source audio from the error microphone signal to provide an error signal indicative of the combined anti-noise signal and ambient audio sounds delivered to the listener;
adapting the response of the first adaptive filter to minimize the error signal;
combining the anti-noise signal with a source audio signal to generate an audio signal provided to the transducer;
determining a degree of coupling between the transducer and an ear of the listener;
detecting a change in the degree of coupling by comparing a value of an ear pressure indication computed from the secondary path response to a predetermined threshold; and
altering the response of the first adaptive filter in response to the value of the ear pressure indication crossing the predetermined threshold.

12. The method of claim 11, wherein the altering alters the response of the first adaptive filter by forcing the response of the first adaptive filter to a predetermined response in response to determining that the degree of coupling is greater than an upper threshold.

13. The method of claim 12, wherein the predetermined response is a response that is trained to cancel the presence of the ambient audio sounds heard by the listener in response to determining that the degree of coupling is greater than an upper threshold.

14. The method of claim 12, wherein an adaptive control of the response of the first adaptive filter has a leakage characteristic that restores the response of the first adaptive filter to a predetermined response at an adjustable rate of change, and wherein the altering increases the adjustable rate of change in response to determining that the degree of coupling is less than a lower threshold.

15. The method of claim 12, further comprising muting the anti-noise signal in response to determining that the degree of coupling is less than a lower threshold.

16. The method of claim 15, wherein the altering stops adaptation of the response of the first adaptive filter in response to determining that the degree of coupling is less than the lower threshold.

17. The method of claim 15, wherein the altering alters the response of the first adaptive filter by forcing the response of the first adaptive filter to a predetermined response in response to determining that the degree of coupling is greater than an upper threshold.

18. The method of claim 17, wherein an adaptive control of the response of the first adaptive filter has a leakage characteristic that restores the response of the first adaptive filter to a predetermined response at an adjustable rate of change, and wherein the altering increases the adjustable rate of change in response to determining the degree of coupling is less than the lower threshold.

19. The method of claim 11, wherein the determining determines the degree of coupling between the transducer and the ear of the listener from a magnitude of the error signal weighted by an inverse of a peak magnitude of the secondary path response of the secondary path adaptive filter, wherein a decrease in the magnitude of the error signal weighted by the inverse of the peak magnitude of the secondary path response of the secondary path adaptive filter indicates a greater degree of coupling between the transducer and the ear of the listener.

20. The method of claim 11, wherein the determining determines the change in the degree of coupling between the transducer and the ear of the listener from an indication of a peak magnitude of the secondary path response of the secondary path adaptive filter wherein an increase in the peak magnitude of the secondary path response of the secondary path adaptive filter indicates a greater degree of coupling between the transducer and the ear of the listener.

21. An integrated circuit for implementing at least a portion of a personal audio device, comprising:
an output for providing a signal to a transducer including both source audio for playback to a listener and an anti-noise signal for countering the effects of ambient audio sounds in an acoustic output of the transducer;
a reference microphone input for receiving a reference microphone signal indicative of the ambient audio sounds;
an error microphone input for receiving an error microphone signal indicative of the output of the transducer; and
a processing circuit that implements a first adaptive filter having a response that shapes the anti-noise signal to reduce the presence of the ambient audio sounds heard by the listener listener, wherein the first adaptive filter filters the reference microphone signal to generate the anti-noise signal, wherein the processing circuit implements a secondary path adaptive filter having a secondary path response that shapes the source audio and a combiner that removes the shaped source audio from the error microphone signal to provide an error signal indicative of the combined anti-noise signal and ambient audio sounds delivered to the listener, wherein the processing circuit adapts the response of the first adaptive filter to minimize the error signal, wherein the processing circuit determines a degree of coupling between the transducer and an ear of the listener and detects a change in the degree of coupling by comparing a value of an ear pressure indication computed from the secondary path response to a predetermined threshold, and wherein the processing circuit alters the response of the first adaptive filter in response to the value of the ear pressure indication crossing the predetermined threshold.

22. The integrated circuit of claim 21, wherein the processing circuit alters the response of the first adaptive filter by forcing the response of the first adaptive filter to a predetermined response in response to determining that the degree of coupling is greater than an upper threshold.

23. The integrated circuit of claim 22, wherein the predetermined response is a response that is trained to cancel the presence of the ambient audio sounds heard by the listener in response to determining that the degree of coupling is greater than the upper threshold.

24. The integrated circuit of claim 22, wherein an adaptive control of the response of the first adaptive filter has a leakage characteristic that restores the response of the first adaptive filter to a predetermined response at an adjustable rate of change, and wherein the processing circuit increases the adjustable rate of change in response to determining that the degree of coupling is greater than the upper threshold.

25. The integrated circuit of claim 24, wherein the processing circuit mutes the anti-noise signal in response to determining that when the degree of coupling is less than a lower threshold.

26. The integrated circuit of claim 25, wherein the processing circuit stops adaptation of the response of the first adaptive filter in response to determining that the degree of coupling is less than the lower threshold.

27. The integrated circuit of claim 25, wherein the processing circuit alters the response of the first adaptive filter by forcing the response of the first adaptive filter to a predetermined response in response to determining that the degree of coupling is greater than an upper threshold.

28. The integrated circuit of claim 27, wherein an adaptive control of the response of the first adaptive filter has a leakage characteristic that restores the response of the first adaptive filter to the predetermined response at an adjustable rate of change, and wherein the processing circuit increases the adjustable rate of change in response to determining that the degree of coupling is greater than the upper threshold.

29. The integrated circuit of claim 21, wherein the processing circuit determines the degree of coupling between the transducer and the ear of the listener from a magnitude of the error signal weighted by an inverse of a peak magnitude of the secondary path response of the secondary path adaptive filter, wherein an decrease in the magnitude of the error signal weighted by the inverse of the peak magnitude of the secondary path response of the secondary path adaptive filter indicates a greater degree of coupling between the transducer and the ear of the listener.

30. The integrated circuit of claim 21, wherein the processing circuit determines the change in the degree of coupling between the transducer and the ear of the listener by comparing an indication of a peak magnitude of the secondary path response of the secondary path adaptive filter to a threshold value, wherein an increase in the peak magnitude of the secondary path response of the secondary path adaptive filter indicates a greater degree of coupling between the transducer and the ear of the listener.