The present invention relates to the field of audio loudspeakers; more particularly, the present invention relates to compensating for distortions produced by small loudspeakers.
Codec technology has advanced to the point that analog input and output (I/O) processing in mobile devices determine the limitations in audio and speech quality. Specifically, small loudspeakers with nonlinear characteristics are a major source of audio degradation in terminal devices such as, for example, cellular phones and personal digital assistants (PDAs).
Loudspeakers have two types of distortions: 1) linear distortions (low frequency suppression, resonances, etc.); and 2) non-linear distortions. The amplitudes and phases of the loudspeaker's frequency response characterize the linear distortion. The effect of linear distortion is to alter the amplitudes and phases of the signal's frequency content. Linear distortion does not add any extra frequencies to the sound and can be easily compensated using a linear filter with a frequency response that is the inverse of the loudspeaker's linear frequency response.
Non-linear distortion can lead to a more severe degradation of the sound. Extra frequency components known as harmonics and intermodulation distortions that may not be present in the original sound could appear. These “extra sounds” can alter the original sound in a way that it is perceived as harsh and unnatural. As is well known in the art, sound is produced by the vibration of a loudspeaker's diaphragm or horn. Generally, nonlinear distortions are higher for larger excursions of the loudspeaker's diaphragm, which occur at lower frequencies and also at resonant frequencies of the loudspeaker.
Exact compensation of non-linear distortions requires a predistortion filter that is the exact inverse of the loudspeaker model.
Volterra expansions have been used in the art to model the linear (H1) and nonlinear (H2, H3, . . . ) components of a loudspeaker's response as shown in
In general, the input-output relationship of the loudspeaker in time-domain is given by a p-th order Volterra expansion as:
where, Hk=hk (m1, m2, m3, . . . mk) is the k-th order Volterra kernel and Hk [x(n)] is given as:
It is generally assumed that loudspeakers can be sufficiently modeled by a second or third order Volterra model. The second order model is a special case of (1) and is given as:
The first term is a constant and is generally assumed to be zero, the second term is the linear response (H1), and the third term is the quadratic nonlinear response (H2).
To compensate for the linear and nonlinear distortions in the electro-acoustic conversion, a predistortion filter is used.
Finding the exact inverse is not straightforward and poses a challenge in equalizing any nonlinear system including nonlinear loudspeakers. A number of approximate solutions have been used. For example, see W. Frank, R. Reger, and U. Appel, “Loudspeaker Nonlinearities-Analysis and Compensation”, Conf. Record 26th, Asilomar Conference on Signals, Systems and Computers, Pacific Grove, Calif., pp. 756-760, Oct. 1992; X. Y. Gao, W. M. Snelgrove, “Adaptive Linearization of a Loudspeaker,” Proc. IEEE Intl. Conf. Acoust., Speech, Signal Processing, pp. 3589-3592, 1991 and U.S. Pat. No. 6,408,079, entitled “Distortion Removal Apparatus, Method for Determining Coefficient for the Same, and Processing Speaker System, Multi-Processor, and Amplifier Including the Same,” issued Jun. 18, 2002. These schemes use the Volterra model of the loudspeaker to find a predistortion filter that is an approximation to the loudspeaker's nonlinear inverse. Typically, the approximate inverse has only a linear component and a quadratic component as shown in
The linear part is typically selected to completely compensate for the loudspeaker's linear distortion (G1=H1−1) as described above. The second order or quadratic component of the predistortion filter is selected to completely compensate for the quadratic distortion of the loudspeaker (G2=H1−1 H2H1−1).
As a by-product of this compensation scheme, extraneous third and fourth order nonlinearities are introduced. Some prior art references describe using higher order (the so-called p-th order) predistortion filters to construct a better approximation to the nonlinear inverse. In such cases, higher order nonlinearities will be introduced at the loudspeaker output.
The p-th order Volterra inverse converges to the real inverse only if certain conditions are met. For small signal levels, Volterra preinverse improves the perceived sound quality from loudspeakers. It is stated in W. Frank, R. Reger, and U. Appel, “Loudspeaker Nonlinearities-Analysis and Compensation”, Conf. Record 26th , Asilomar Conference on Signals, Systems and Computers, Pacific Grove, Calif., pp. 756-760, Oct. 1992, that at nominal input power of the loudspeaker, the higher order distortions are small. While this might be true in applications where the loudspeaker is very close to the ear (such as in voice telephony), in future multimedia applications such as video phones and hand-free telephony, the loudspeaker is far from the listener's ear. These applications require higher playback levels.
For high playback levels, the p-th order Volterra inverse may not converge to the exact nonlinear inverse and, as a result, the extra distortions introduced by the predistortion filter maybe worse than the original uncompensated loudspeaker distortions. The structure of the p-th order Volterra inverse is such that linear distortions may be compensated at a high cost for nonlinear distortions. For large input levels, the third, fourth and higher order distortions become larger than the uncompensated distortions, thereby rendering the precompensation scheme useless. As a result, the sound quality of the Volterra precompensated loudspeaker may be lower than the uncompensated case.
A method, apparatus and system are disclosed herein for loudspeaker equalization. In one embodiment, the system comprises an input for receiving samples of an input signal, a pre-compensator to produce a pre-compensated output in response to the samples of an input signal, parameters of a loudspeaker model, and previously predistorted samples of the input signal, and a loudspeaker, corresponding to the loudspeaker model, to produce an audio output in response to the pre-compensated output.
The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the invention, which, however, should not be taken to limit the invention to the specific embodiments, but are for explanation and understanding only.
A method and an apparatus for compensating loudspeaker's linear and nonlinear distortions using a nonlinear inverse and a feedback loop are described. In one embodiment, the inverse is an exact non-linear inverse. To compensate for the distortions of the electro-acoustic conversion in small loudspeakers, the signal is passed through the predistortion filter placed between the audio signal source and the loudspeaker.
Embodiments set forth herein compensate for a loudspeaker's linear and non-linear distortions using an exact nonlinear inverse and a feedback loop for adaptively adjusting the parameters of the predistortion filter so that the difference between the input and the precompensated output of the loudspeaker is minimized or substantially reduced. In one embodiment, the predistortion filter transforms the input signal using an inverse (e.g., an exact inverse) of the estimated loudspeaker transfer function and generates a reproduction of the input sound. In one embodiment, a feedback signal may be used to compute the exact inverse of a nonlinear system. The feedback is used to adaptively adjust the parameters of the predistortion filter so that the difference between the input and the precompensated output of the loudspeaker is reduced, and potentially minimized. The resulting improvement in quality makes the techniques described herein suitable for inclusion in applications where high quality sound at high playback levels is desired. Such applications include, but are not limited to, cellular phones, teleconferencing, videophones, videoconferencing, personal digital assistants, Wi-Fi, systems, etc.
In one embodiment, a model of the electroacoustic characteristics of the loudspeaker is used to derive a transfer function of the loudspeaker. The precompensator then performs an inverse of this transfer function. Accordingly, the output of the loudspeaker more closely resembles the original input signal.
In the following description, numerous details are set forth to provide a more thorough explanation of the present invention. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.
Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
The present invention also relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.
The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.
A machine-readable medium includes any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer). For example, a machine-readable medium includes read only memory (“ROM”); random access memory (“RAM”); magnetic disk storage media; optical storage media; flash memory devices; electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.); etc.
Overview
A method and apparatus for precompensation of linear and non-linear distortions of a loudspeaker in order to reduce loudspeaker distortions are described. In one embodiment, the method comprises performing adaptive precompensation by modifying the operation of a predistortion filter in response to the previous predistorted values and the original input signal, determining a precompensation error between the original input samples and the loudspeaker output and substantially reducing the precompensation error by computing the exact inverse of a loudspeaker's model. The difference between the input and the predicted loudspeaker output provides a feedback signal that is used to adjust the parameters of the precompensator so that the error is minimized or substantially reduced.
In one embodiment, substantial reduction in the precompensation error is achieved by computing the coefficients of a polynomial representing an inverse (e.g., an exact inverse), computing the predistorted signal by finding a real root of this polynomial, scaling and storing the root for the next coefficient computation, and rescaling the predistorted signal before sending it to the loudspeaker.
In one embodiment, the mathematical model of the loudspeaker in general could be the p-th order Volterra model as described herein. For the purpose of illustrations, the exact inverse based on the second order Volterra model is described, but the method and apparatus described herein are not so limited and may also be used for models of higher order.
The final output of the precompensator is a scaled version of the output from exact inverse module 802. This scaling is performed by a gain module 811 that has a gain of s2. In one embodiment, gains s1 and s2 are stored in parameter memory 801. Gains s1 and s2 could be fixed or variable depending on the embodiment. Alternative embodiments may use unity gain for s1 (s1=1) and store a related set of parameters, such as, for example, a properly scaled version of the model parameters in parameter memory 801.
A(n)d′2pre(n)+B(n)d′pre(n)+C(n)=0 (1)
Roots of this equation give the output of the exact inverse d′pre(n). The polynomial root solver in this embodiment is a quadratic equation solver 1022.
One embodiment of a method to compute these coefficients are given by the following equations:
As shown above, in one embodiment, the coefficients depend on the parameters of the loudspeaker model {H1, H2}, the past scaled values of the predistortion signal d″pre(n) (the states) and the input signal d(n).
As is evident from equations (2a), (2b) and (2c), the coefficients of the quadratic equation are not constant; they depend on the past scaled values of the predistorted signal d″pre(n-i) as well as the parameters of the loudspeaker model.
As illustrated by these equations, the feedback in
The roots in this embodiment are given by the following equation:
As shown herein, in general there is multiple roots. For a p-th order polynomial equation, there are in general p roots and for a quadratic equation there are in general two roots. All of these roots are possible candidates for solution. However, only one root is selected for subsequent processing. Various criteria can be employed to select a candidate solution. In one embodiment, the selected root is real. In case, no real root exists, an alternate real value for d′pre(n) is selected so that the precompensation error e(n) is reduced, and potentially minimized. For a p-th order polynomial, if p is odd, at least one real root is guaranteed to exist. If p is even and no real root exists, a (p-1)-th order polynomial can be derived from the p-th order polynomial by differentiating relative to d′pre(n). The derived polynomial has order (p-1), which will be odd and is guaranteed to have a real root. The real root of the (p-1)-th order polynomial reduces the precompensation error. For the case of a quadratic polynomial, if a real root does not exist, the alternate real solution that reduces the precompensation error is given by:
Different valid solutions (roots) may result in different overall performance for the precompensator. For example, some roots may produce a predistorted signal that has a bias value. Such properties may or may not be desirable for certain applications. Hence, a number of embodiments are possible depending on the method of selecting a root from a plurality of roots. In one embodiment, the real root with the smallest absolute value is used.
Referring to
After computing the coefficients, processing logic determines the roots of the inverse polynomial (processing block 1104) and selects a real root of the polynomial to reduce, and potentially minimize, the precompensation error (processing block 1105). In an alternative embodiment, processing logic selects an alternate real solution that reduces the precompensation error, such as described above.
After selection, processing logic scales and stores the selection (processing block 1106). In one embodiment, the scaled selection is stored in the state buffer for the next root computation. In one embodiment, the output of the root solver is scaled by another factor and output as the precompensator output.
Next, processing logic determines if this sample is the last (processing block 1107). If the input data is not exhausted, processing transitions to processing block 1102 where the next data sample is read and the computation of the polynomial coefficients, the roots and storage of the past states are repeated; otherwise, the process ends.
Components and Interface
A number of components are included in devices and/or systems that include the techniques described herein. For example, a central processing unit (CPU) or a digital signal processor (DSP) for computing the coefficients and roots of the inverse polynomial. A memory for storing the loudspeaker model, the precompensator parameters and portions of the input signal is part of such a device and/or system. Furthermore, analog and digital gain elements may be included in the audio system. These may include digital multipliers and analog amplifiers. One such device is a cellular phone.
Referring to
The external terminal 1230 includes an external interface (external I/F) 1231, a CPU (Central Processing Unit) 1232, a display unit 1233, a keyboard 1234, a memory 1235, a hard disk 1236 and a CD-ROM drive 1237.
CPU 1232 in cooperation with the memories of cellular phone 1210 (e.g., memory 1221, the memory 1235, and hard disk 1236) cooperate to perform the operations described above.
An Exemplary Computer System
Referring to
System 1300 further comprises a random access memory (RAM), or other dynamic storage device 1304 (referred to as main memory) coupled to bus 1311 for storing information and instructions to be executed by processor 1312. Main memory 1304 also may be used for storing temporary variables or other intermediate information during execution of instructions by processor 1312.
Computer system 1300 also comprises a read only memory (ROM) and/or other static storage device 1306 coupled to bus 1311 for storing static information and instructions for processor 1312, and a data storage device 1307, such as a magnetic disk or optical disk and its corresponding disk drive. Data storage device 1307 is coupled to bus 1311 for storing information and instructions.
Computer system 1300 may further be coupled to a display device 1321, such as a cathode ray tube (CRT) or liquid crystal display (LCD), coupled to bus 1311 for displaying information to a computer user. An alphanumeric input device 1322, including alphanumeric and other keys, may also be coupled to bus 1311 for communicating information and command selections to processor 1312. An additional user input device is cursor control 1323, such as a mouse, trackball, trackpad, stylus, or cursor direction keys, coupled to bus 1311 for communicating direction information and command selections to processor 1312, and for controlling cursor movement on display 1321.
Another device that may be coupled to bus 1311 is hard copy device 1324, which may be used for printing instructions, data, or other information on a medium such as paper, film, or similar types of media. Furthermore, a sound recording and playback device, such as a speaker and/or microphone may optionally be coupled to bus 1311 for audio interfacing with computer system 1300. Another device that may be coupled to bus 1311 is a wired/wireless communication capability 1325 to communication to a phone or handheld palm device.
Note that any or all of the components of system 1300 and associated hardware may be used in the present invention. However, it can be appreciated that other configurations of the computer system may include some or all of the devices.
Thus, as described above, at least one embodiment provides better compensation for loudspeaker distortions resulting in higher quality sound from the loudspeaker.
Whereas many alterations and modifications of the present invention will no doubt become apparent to a person of ordinary skill in the art after having read the foregoing description, it is to be understood that any particular embodiment shown and described by way of illustration is in no way intended to be considered limiting. Therefore, references to details of various embodiments are not intended to limit the scope of the claims which in themselves recite only those features regarded as essential to the invention.
The present patent application claims priority to the corresponding provisional patent application Ser. No. 60/577,375, titled, “Method And Apparatus For Loudspeaker Equalization Using Adaptive Feedback And Exact Inverse” filed on Jun. 4, 2004, which is incorporated by reference herein.
Number | Date | Country | |
---|---|---|---|
60577375 | Jun 2004 | US |