This disclosure is generally directed to systems and methods for estimating the noise floor of a sensor and for detecting when the noise floor of a sensor deviates from an expected noise floor. In particular, various examples described in this disclosure are directed to systems and methods for estimating the noise floor of an accelerometer, deployed in a vehicle-implemented noise-cancellation system, and for detecting when the estimated noise floor deviates from an expected noise floor.
All examples and features mentioned below can be combined in any technically possible way.
According to an aspect, a computer-implemented method for detecting a noise floor of a sensor, comprises the steps of: receiving a sensor signal from a sensor; determining a plurality of power spectral densities from a plurality of successive frames of samples of the sensor signal, each of the plurality of power spectral densities being determined from a respective frame of the plurality of successive frames, each power spectral density being comprised of a plurality of frequency bins, each frequency bin being associated with a power of the sensor signal at the frequency of the respective frequency bin, wherein each successive frame of the plurality of successive frames differs by at least one sample; identifying a minimum power of the plurality of power spectral densities; and determining whether the minimum power exceeds a threshold value.
In an example, the computer-implemented method further comprises the step of determining, according to at least one condition, whether a vehicle in which the sensor is disposed is in an idle state, wherein the step of determining whether the estimated noise floor of the sensor signal exceeds a threshold value only occurs when the vehicle is in the idle state.
In an example, the at least one condition is selected from at least one of: vehicle engine revolutions per minute, accelerator pedal position, vehicle speed, and engine harmonics.
In an example, the at least one condition further comprises detecting whether a door of the vehicle opened or closed.
In an example, the computer-implemented method further comprises the step of filtering each power spectral density of the plurality of power spectral densities such that frequency spikes within each power spectral density are reduced.
In an example, each power spectral density is filtered using median filtering.
In an example, the computer-implemented method further comprises the step of incrementing a counter by a first value if the estimated noise floor exceeds a threshold value and decrementing a counter by a second value if the estimated noise floor fails to exceed the threshold value.
In an example, the computer-implemented method further comprises the step of excluding the sensor signal from an adaptive filter update calculation if a value of the counter exceeds a counter value.
In an example, the first value and the second value are the same.
In an example, the computer-implemented method further comprises the steps of incrementing a counter by a predetermined amount if the estimated noise exceeds the threshold value; excluding the sensor signal from an adaptive filter update calculation if a value of the counter exceeds a counter value; and excluding a filter associated with the sensor signal from the production of a noise-cancellation signal.
According to another aspect, a non-transitory storage medium comprises program code that, when implemented by a processor, causes the processor to execute the steps comprising: receiving a sensor signal from a sensor; determining a plurality of power spectral densities from a plurality of successive frames of samples of the sensor signal, each of the plurality of power spectral densities being determined from a respective frame of the plurality of successive frames, each power spectral density being comprised of a plurality of frequency bins, each frequency bin being associated with a power of the sensor signal at the frequency of the respective frequency bin, wherein each successive frame of the plurality of successive frames differs by at least one sample; identifying a minimum power of the plurality of power spectral densities; and determining whether the minimum power exceeds a threshold value.
In an example, the program code further includes the step of determining, according to at least one condition, whether a vehicle in which the sensor is disposed is in an idle state, wherein the step of determining whether the estimated noise floor of the sensor signal exceeds a threshold value only occurs when the vehicle is in the idle state.
In an example, the at least one condition is selected from at least one of: vehicle engine revolutions per minute, accelerator pedal position, vehicle speed, and engine harmonics.
In an example, the at least one condition further comprises detecting whether a door of the vehicle opened or closed.
In an example, the program code further includes the step of filtering each power spectral density of the plurality of power spectral densities such that frequency spikes within each power spectral density are reduced.
In an example, each power spectral density is filtered using median filtering.
In an example, the program code further includes the step of incrementing a counter by a first value if the estimated noise floor exceeds a threshold value and decrementing a counter by a second value if the estimated noise floor fails to exceed the threshold value.
The details of one or more implementations are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and the drawings, and from the claims.
In the drawings, like reference characters generally refer to the same parts throughout the different views. Also, the drawings are not necessarily to scale, emphasis instead generally being placed upon illustrating the principles of the various aspects.
In a vehicle-implemented noise-cancellation system, accelerometers are often employed to generate reference signals for the noise-cancellation system. When an accelerometer malfunctions, the noise floor (that is, the noise present in the accelerometer output signal even when the accelerometer is not detecting any accelerations) tends to drift upward over time or sharply increase. The increased noise in the accelerometer signal can be interpreted by the noise-cancellation system as the reference signal itself, which, at best, degrades the performance of the noise-cancellation system and, at worst, causes the noise-cancellation system to generate noise in the vehicle cabin rather than cancel it.
It is thus desirable to identify a deviation in the expected noise floor of an accelerometer before the deviation affects the performance of the noise-cancellation system. It is also desirable to identify a deviation in the expected noise floor of an accelerometer during runtime, so that noisy accelerometer signals or malfunctioning accelerometers can be automatically excluded from the noise-cancellation system without intervention from the user or a technician. Further, it is desirable to identify a deviation in the expected noise floor of an accelerometer so that the malfunctioning accelerometer can be identified for servicing or replacement.
As described above, the systems and methods described in this disclosure for detecting a deviation in the expected floor of a sensor can be used, in various examples, by noise-cancellation systems such as those implemented in a vehicle. An example such of a vehicle-implemented noise-cancellation system will be briefly described, for purposes of illustration, in connection with
In an example, reference sensor 106 is configured to generate noise signal(s) 114 representative of the undesired sound, or a source of the undesired sound, within predefined volume 104. For example, as shown in
Actuator 110 can, for example, be speakers distributed in discrete locations about the perimeter of the predefined volume. In an example, four or more speakers can be disposed within a vehicle cabin, each of the four speakers being located within a respective door of the vehicle and configured to project sound into the vehicle cabin. In alternate examples, speakers can be located within a headrest, or elsewhere in the vehicle cabin.
A noise-cancellation signal 118 can be generated by controller 112 and provided to one or more speakers in the predefined volume, which transduce the noise-cancellation signal 118 to acoustic energy (i.e., sound waves). The acoustic energy produced as a result of noise-cancellation signal 118 is approximately 180° out of phase with—and thus destructively interferes with—the undesired sound within the cancellation zone 102. The combination of sound waves generated from the noise-cancellation signal 118 and the undesired noise in the predefined volume results in cancellation of the undesired noise, as perceived by a listener in a cancellation zone.
Because noise-cancellation cannot be equal throughout the entire predefined volume, noise-cancellation system 100 is configured to create the greatest noise-cancellation within one or more predefined cancellation zones 102 with the predefined volume. The noise-cancellation within the cancellation zones can effect a reduction in undesired sound by approximately 3 dB or more (although in varying examples, different amounts of noise-cancellation can occur). Furthermore, the noise-cancellation can cancel sounds in a range of frequencies, such as frequencies less than approximately 350 Hz (although other ranges are possible).
Error sensor 108, disposed within the predefined volume, generates an error sensor signal 120 based on detection of residual noise resulting from the combination of the sound waves generated from the noise-cancellation signal 118 and the undesired sound in the cancellation zone. The error sensor signal 120 is provided to controller 112 as feedback, error sensor signal 120 representing residual noise uncanceled by the noise-cancellation signal. Error sensors 108 can be, for example, at least one microphone mounted within a vehicle cabin (e.g., in the roof, headrests, pillars, or elsewhere within the cabin).
It should be noted that the cancellation zone(s) can be positioned remotely from error sensor 108. In this case, the error sensor signal 120 can be filtered to represent an estimate of the residual noise in the cancellation zone(s). In either case, the error signal will be understood to represent residual undesired noise in the cancellation zone.
In an example, controller 112 can comprise a nontransitory storage medium 122 and processor 124. In an example, non-transitory storage medium 122 can store program code that, when executed by processor 124, implements the various filters and algorithms described below. Controller 112 can be implemented in hardware and/or software. For example, controller can be implemented by a SHARC floating-point DSP processor, but it should be understood that controller can be implemented by any other processor, FPGA, ASIC, or other suitable hardware.
Turning to
Wadapt filter 126 is configured to receive the noise signal 114 of reference sensor 106 and to generate noise-cancellation signal 118. Noise-cancellation signal 118, as described above, is input to actuator 110 where it is transduced into the noise-cancellation audio signal that destructively interferes with the undesired sound in the predefined cancellation zone 102. Wadapt filter 126 can be implemented as any suitable linear filter, such as a multi-input multi-output (MIMO) finite impulse response (FIR) filter. Wadapt filter 126 employs a set of coefficients which define the noise-cancellation signal 118 and which can be adjusted to adapt to changing behavior of the vehicle response to road input (or to other inputs in non-vehicular noise-cancellation contexts).
The adjustments to the coefficients can be performed by an adaptive processing module 128, which receives as inputs the error sensor signal 120 and the noise signal 114 and, using those inputs, generates a filter update signal 130. The filter update signal 130 is an update to the filter coefficients implemented in Wadapt filter 126. The noise-cancellation signal 118 produced by the updated Wadapt filter 126 will minimize error sensor signal 120, and, consequently, the undesired noise in the cancellation zone.
The coefficients of Wadapt filter 126 at time step n can be updated according to the following equation:
where {tilde over (T)}de is an estimate of the physical transfer function between actuator 110 and the noise-cancellation zone 102, {tilde over (T)}′de is the conjugate transpose of {tilde over (T)}de, e is the error signal, and x is the output signal of reference sensor 106. In the update equation, the output signal x of reference sensor is divided by the norm of x, represented as ∥x∥2.
In application, the total number of filters is generally equal to the number of reference sensors (M) multiplied by the number of speakers (N). Each reference sensor signal is filtered N times, and each speaker signal is then obtained as a summation of M signals (each sensor signal filtered by the corresponding filter).
Noise-cancellation system 100 further includes noise-floor detection module 132, which is configured to receive noise signal 114 in order to determine whether noise floor of the reference sensor 106 deviates from an expected amount. Noise-floor detection module 132 is an abstract representation of the computer-implemented method described in further detail below in and in connection with
Again, the noise-cancellation system 100 of
At step 310, a power spectral density of the sensor signal is calculated based on the at least one frame of samples determined in step 308. Calculating the PSD of the sensor signal will yield a plurality of frequency bins each associated with a respective power of the sensor signal at the frequency of the frequency bin. The PSD can be calculated according to any method suitable for calculating a PSD. In the simplest example, the PSD can be calculated from a single frame of samples according to the following equation:
S
x
x
(nF,f)=|Xi(nF,f)|2 (2)
where Sx
Instead of using a single frame, the PSD can also be calculated from multiple frames of samples. In step 308, the samples can be organized into a plurality of successive frames as samples are derived from the sensor signal over time, each frame of the plurality of successive frames differing from the previous frame by at least one sample. Thus, for example, if the first frame includes samples s1, s2, s3, s4, and s5, the next frame can include samples s2, s3, s4, and s5, but also s6. Successive frames can thus overlap in samples but differ by at least one sample. However, successive frames need not overlap at all—indeed, successive frames can be separated by one or more samples. Finally, while each frame typically includes more than one sample, in alternative examples each frame can include only a single sample.
Step 310 will typically be repeated for each new frame of samples determined in step 308. As the samples are derived and organized into successive frames of samples, the power spectral density of the sensor signal can be updated for each new frame using the following equation:
S
x
x
(nF,f)=(1−α)·|Xt(nF,f)|2+α·Sx
where Sx
The above Eq. (3) represents a memory-efficient method of calculating a PSD of the current frame, using the previous-calculated PSD to update the current PSD. In alternative examples, the previous frames can be stored in memory and used to calculate the PSD each time the PSD is calculated. (As will be described below, a new frame is typically generated, and the PSD updated, each time step 304 is repeated as part of a loop. However, it is conceivable that multiple frames can be generated, and the PSD updated or otherwise calculated as part of a single execution of step 304.)
At step 312, the noise floor of the ith sensor signal can be estimated from the PSD of the sensor, calculated in step 310, by selecting the minimum power of the calculated PSD, as follows:
NF
i(nF)=min Sx
where Sx
The noise floor as estimated in step 310, is, however, not necessarily reliable since it is not known, at the time of calculation, whether the estimated noise floor is in fact representative of the noise floor of the sensor or the result of some input to the sensor. For example, if the sensor is an accelerometer disposed in an idling vehicle, music playing in the vehicle can cause the accelerometer to output a signal that corresponds to the vibrations resulting from the music and is thus not representative of the noise floor of the accelerometer itself. In other words, even the minimum power of the PSD can contain some amount of input signal and thus not be representative of the noise floor of the sensor. One or multiple steps can be taken to mitigate the risk of an inaccurate noise floor estimate.
{tilde over (S)}
x
x
(nF,f)=median{Sx
where fL and fR are determined by the median filter order. In an alternative example, the values of the PSD can be averaged, either across the length of the PSD or locally around each frequency bin. This method, is, however, less desirable than median filtering since averaging tends to raise the overall value of the calculated power values of the PSD above an accurate estimate of the noise floor.
In addition, rather than calculating a single PSD or using only the most-currently calculated PSD to estimate the noise floor, the noise floor may be selected from a historical set of PSD calculations. Two methods for selecting a noise floor from a set of a historical PSD calculations are shown in
Turning first to
Stated differently, as described in connection with step 310 and Eq. (3) the PSD calculation can be updated over time as successive frames are defined according to newly received samples of the sensor signal. Thus, each PSD update, based on a respective successive frame, can be used to generate a new noise floor estimate, which can be stored in a buffer as a history of noise floor estimates.
At step 316, from this buffer, the minimum noise floor can be selected as being the noise floor estimate as follows:
=10·log10[min NFi(nF−j)]+NFoffset,j=0 . . . Nh−1 (7)
where j is the time index of the buffer and NFoffset is the offset that is used to compensate for the normalization factors of the PSD. Several factors determine the needed offset, including the time-domain window size, the number of FFT points, the window that is used (rectangular, Hamming, Hanning, etc.) and the sampling frequency. These normalization factors are understood in the art and can be implemented at any suitable time, not just during step 316.
The net result of steps 316 and 318 is the implementation of a window of time from which a noise floor is estimated by storing the last Nh estimates for the sensor-under-test. The length of the window of time is determined by the length of buffer, which, in an example, is a circular buffer, although any first-in-first-out buffer can be used. The length of this window can be tuned by setting a maximum number of frames Nh and varying the number of frames that are used in the floor estimation. Once a number is found that yields reliable results, the maximum number of frames Nh is changed to the suitable number.
In an alternative example, rather than storing a minimum power of each historical power spectral density, a plurality of power spectral densities may be stored and the minimum power selected from across the plurality of power of spectral densities. This is, however, less memory efficient since it requires the storage of additional data (the entire PSD) in memory rather than only the minimum power of each PSD. Storing multiple PSDs, however, permits the estimation of a noise floor per frequency bin rather than a single noise floor across all the stored PSDs. In other words, instead of selecting a minimum power across all PSDs, a minimum power per frequency bin across all PSDS can be selected, yielding a set of minimum powers across frequency. This can be useful for detecting whether the noise floor is deviating for one frequency. Alternatively, instead of storing the minimum for each frequency bin, the minimum can be stored for a subset of frequency bins of the PSD.
Turning now to
This method would, however, have the effect of failing to update the currently-stored noise floor estimate if the noise floor consistently rose over time (as the new noise floor estimate would never be lower than the previously-calculated noise floor estimate). Thus, step 324 requires a periodic mandatory update of the noise floor estimate. Step 324 is, therefore, a decision block that asks whether a predetermined period of time has elapsed at step 322. If the period of time has elapsed, then previously-stored minimum power is replaced with the newly-identified minimum power. The period of time of step 324 is comparable to the length of the buffer of
In an alternative example, a noise floor can be estimated per frequency bin. This can be accomplished by comparing, for each frequency bin, a previously-stored power against a new power. If the new power is less than the previously-stored power, then the new power replaces the previously-stored power as a minimum power for the given frequency bin, thus storing a set of minimum powers across frequency. Furthermore, the power for each frequency bin can be updated after a mandatory period. Alternatively, rather than storing a power for each frequency bin, a power may be stored for a subset of frequency bins.
The methods described in connection with
If the noise floor does not exceed the threshold then the method returns to step 304 to identify a new noise floor estimate based, at least in part, on a frame of newly-received samples. Thus, method 300 represents a loop that determines a noise floor estimate, determines whether the estimate deviates from the expected noise, and repeats. The repeating nature of method 300 (and specifically of steps 302-306) is assumed in steps 316-322 which require the selection of a noise floor estimate from a historical set of power spectral densities (e.g., the plurality of minimum powers stored in the buffer of step 316 or the previously-stored minimum power), each historical power spectral density having thus been rendered in a previous iteration of step 304.
The threshold of step 326 can be a predetermined threshold or can be determined during runtime based on historical values or other factors. For example, the threshold can be based on an average of estimated noise floors taken over a predetermined period of time.
Using a threshold as the sole determiner of deviation, however, is prone to false positives (i.e., in the event that an input signal, incorrectly designated as a noise floor, exceeds the threshold). Setting a relatively high threshold can help avoid such false positives but can result in unnecessary delays in detecting the deviation in the noise floor since the estimated noise floor has to rise to a higher level than strictly necessary.
Thus, in an alternative example, if the minimum power exceeds the threshold of step 326, a counter is incremented. If the counter exceeds a predetermined amount within a certain period of time, the sensor is deemed to have deviated from the expected noise floor. The period of time is thus a sliding window of time during which a certain number of noise floor estimates must exceed the threshold of step 326 in order to determine that the sensor has deviated from the expected noise floor. An example of this is represented in
Similar to the example method of
The method described in connection with
Once the sensor is deemed to have deviated from the expected noise floor, one of several actions can be taken. If sensor is used in an adaptive system, such as in a noise-cancellation system, the operation of the adaptive system can be halted. This is shown in
In an alternative example, if the sensor is one of several sensors used in an adaptive system, the sensor deemed to have exceeded the expected noise floor can be excluded from future updates of the adaptive system. Thus, in a vehicle-implemented noise-cancellation system, if an accelerometer-under-test is deemed to have a high noise floor, the noise-cancellation system can be updated using the remaining accelerometers and thus excluding the accelerometer-under-test. Furthermore, because each filter associated with the faulty sensor is nonzero, it will continue to produce a signal to be played by the speaker. Accordingly, any filters associated with the faulty sensor are prevented from producing a signal to the speaker. Stated differently, when a sensor is found to be faulty, its contribution to the update equation as well as to the speaker signals (N outputs, one per speaker) is removed, thus removing the faulty sensor from the production of the noise-cancellation signal. This is shown in
If multiple noise floors are found for multiple frequency bins, the steps described in connection with
In the vehicle-implemented noise-cancellation system embodiment, the operation of the vehicle can interfere with the estimation of the noise floor. It is thus useful to require that the vehicle be in an idle state (thus minimizing interfering vibrations from the engines) before the noise floor is estimated.
Accordingly, in the example of step 304 shown in
The conditions for the update that can be checked include, for example, the vehicle speed (to determine if the vehicle is moving), the accelerator pedal position (to determine if accelerator is pressed, even if the vehicle is not moving), the engine RPM (to determine if the accelerator has been pressed and released before the RPMs have reached idle). Each of these conditions can be read from, for example, the vehicle CAN bus, which relays the state of these conditions to the controller. In addition to, or instead of, reading the inputs from the vehicle CAN bus, the harmonics of the engine may be analyzed via the accelerometer input to determine whether they are characteristic of a vehicle at idle. The above-described checks are simply an example of the kind of checks that can be conducted to determine if the engine is in an idle state and other checks that would similarly ascertain the state of the vehicle are within the scope of this disclosure. Furthermore, in addition to checking whether the engine is in an idle state, other conditions that can negatively influence the noise floor estimation, such as the opening or closing of a vehicle door or the playing of music can also be checked during the update condition.
The above-described system and method for detecting when the noise floor of a sensor deviates from an expected noise floor improves the functioning of a computer by allowing a computer to reliably estimate the noise floor of a sensor and to determine when the noise floor has deviated from an expected value. Furthermore, the above-described system improves the functioning of a computer by permitting a computer to take corrective action once a malfunctioning sensor is identified.
The functionality described herein, or portions thereof, and its various modifications (hereinafter “the functions”) can be implemented, at least in part, via a computer program product, e.g., a computer program tangibly embodied in an information carrier, such as one or more non-transitory machine-readable media or storage device, for execution by, or to control the operation of, one or more data processing apparatus, e.g., a programmable processor, a computer, multiple computers, and/or programmable logic components.
A computer program can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program can be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a network.
Actions associated with implementing all or part of the functions can be performed by one or more programmable processors executing one or more computer programs to perform the functions of the calibration process. All or part of the functions can be implemented as, special purpose logic circuitry, e.g., an FPGA and/or an ASIC (application-specific integrated circuit).
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. Components of a computer include a processor for executing instructions and one or more memory devices for storing instructions and data.
While several inventive embodiments have been described and illustrated herein, those of ordinary skill in the art will readily envision a variety of other means and/or structures for performing the function and/or obtaining the results and/or one or more of the advantages described herein, and each of such variations and/or modifications is deemed to be within the scope of the inventive embodiments described herein. More generally, those skilled in the art will readily appreciate that all parameters, dimensions, materials, and configurations described herein are meant to be exemplary and that the actual parameters, dimensions, materials, and/or configurations will depend upon the specific application or applications for which the inventive teachings is/are used. Those skilled in the art will recognize, or be able to ascertain using no more than routine experimentation, many equivalents to the specific inventive embodiments described herein. It is, therefore, to be understood that the foregoing embodiments are presented by way of example only and that, within the scope of the appended claims and equivalents thereto, inventive embodiments may be practiced otherwise than as specifically described and claimed. Inventive embodiments of the present disclosure are directed to each individual feature, system, article, material, and/or method described herein. In addition, any combination of two or more such features, systems, articles, materials, and/or methods, if such features, systems, articles, materials, and/or methods are not mutually inconsistent, is included within the inventive scope of the present disclosure.