h[n] given x[n] (system given the input signal, so-called system identification), or
both, x[n] and h[n] (input signal and the system simultaneously, so-called blind deconvolution).
While tasks 1 and 2 are somewhat similar thanks to the commutativity of convolution (identify one signal given two others), task 3 poses a significant challenge that is an active area of research.
This article contains a brief description of various methods used to accomplish deconvolution. By no means is this list complete nor are the explanations in-depth. Nevertheless, it will give you an overview of the methodologies used and when to use them.
But before I give you a tour of the deconvolution methods, I will present two vivid use cases of deconvolution to motivate the topic.
Example Application of Non-Blind Deconvolution
A simple example of deconvolution application is frequency response measurement of a loudspeaker. The excitation signal in this case cannot be an impulse because it could damage the loudspeaker. A fairly often used option is to use an exponential sweep: a signal whose frequency rises exponentially over time. Having recorded the response of a loudspeaker to the exponential sweep excitation, we need to deconvolve it to obtain just the loudspeaker’s impulse response. The loudspeaker is our unknown h[n], x[n] is the exponential sweep, and y[n] is the recorded response. Thus, it is a system identification problem.
Example Application of Blind Deconvolution
Imagine a smart home system. Whenever one of the users (residents) speaks up, the system needs to record that speech, perform automatic speech recognition, understand the message conveyed by speech, and ultimately decide what action to take. All these tasks are significantly more dificult when the recorded speech is reverberant, i.e., bears the impact of room acoustics. The system knows neither the speech utterance nor the room impulse response (which varies with user and smart device positions). Thus, it needs to use statistical or machine learning algorithms to infere which is which and improve the quality of the recorded speech.
In this case, x[n] is the speech signal, h[n] is the room’s impulse response, and y[n] is the signal recorded by the smart device.
A Catalogue of Deconvolution Methods
What follows is a quick tour of some of the deconvolution approaches where either the input signal or the system (but not both) are known. If you are interested in the topic, you are welcome to follow the sources specified at the end.
As we know from the convolution property of the z-transform, a convolution of time-domain signals is equivalent to multiplication of their z-transforms. Thus, why not try to deconvolve the signals in the z-domain?
In the following we will assume that capital letters denote the z-transforms of the time-domain signals. We have
y[n]=x[n]∗h[n],(2)Y(z)=X(z)H(z).(3)
With this formulation we can easily obtain the desired time domain signal h[n] if we know x[n]
h[n]=Z−1{H(z)}=Z−1{X(z)Y(z)}.(4)
There are two caveats to this approach:
X(z) mustn’t be zero for any z (we mustn’t divide by 0),
The inverse z-transform in Equation (4) must exist.
With that in mind, we can present two numerical software functions that use the above approach.
Deconvolution Functions in Numerical Software
Deconvolution in numerical software is achieved through polynomial division in the z-domain, as in Equation (4).
In SciPy and Matlab, we have two very similar functions for deconvolution:
In these functions, the divisor is deconvolved from signal to obtain the quotient. The remainder is the signal that could not be properly deconvolved (typically because of numerical precision). For these operations, the following identities should hold
signal = convolve(divisor, quotient)+ remainder
signal =conv(divisor, quotient)+ remainder
Keep in mind the caveats above: if the divisor signal has zeros in its z-transform, then the application of the above functions will lead to noise amplification and, ultimately, worthless output.
Deconvolution Via (Pseudo-)Inverse of the Convolution Matrix
If we write the convolution in Equation (1) in a matrix form it should be easier for us to reason about it. First, let’s write x[n] in a vector form
x[n]=[x[n],x[n−1],…,x[n−M−N+1]]⊤,(5)
where M is the length of the impulse response h and N is the length of the observation window y[n].
Second, we can write
y[n]=Hx[n],(6)
where H is an N×(M+N−1)convolution matrix which has Toeplitz structure (identical elements along each diagonal of the matrix)
To ensure proper understanding, let’s write out the elements of y[n] analogously to x[n]
y[n]=[y[n],y[n−1],…,y[n−N+1]]⊤,(8)
Since there is no additive noise, we can obtain x[n] or its estimate x~[n] by
inverting H if H is full-rank and not ill-conditioned
x[n]=H−1y[n],(9)
computing the Moore-Penrose pseudoinverse of H if H cannot be easily inverted
x~[n]=(H⊤H+δI)−1H⊤y[n],(10)
where δ is a small constant added for numerical stability (so-called Tikhonov regularization). This is the solution of least squares minimization of the squared difference between the samples of y[n] and Hx[n].
Wiener Filtering (Wiener Deconvolution)
What if y[n] in Equation (1) is not a perfect convolution of x[n] and h[n] but contains some additive noise? Such situations typically occur if y[n] is measured and real-world phenomena influence the result. We could write it as
y[n]=x[n]∗h[n]+w[n],(11)
where w[n] denotes the noise signal that is not correlated with either x[n] or h[n]; the crosscorrelation between w[n] and either x[n] or h[n] is 0. That means that noise is not similar to x nor h in any significant way.
Assuming we know h[n], we can obtain an estimate of x[n], x~[n], by using a Wiener deconvolution filter [3]. This filter is defined in the frequency domain so we have
x~[n]=F−1{X~(jω)}=F−1{G(jω)Y(jω)},(12)
where X~(jω) and Y(jω) denote the Fourier transforms of x~[n] and y[n] respectively, and G(jω) is the inverse filter specified in the frequency domain.
where ⋅∗ denotes complex conjugate, H(jω) is the Fourier transform of h[n], SXX(jω) and SWW(jω) are mean power spectral densities (PSDs) of x[n] and w[n] respectively. (If you don’t know what PSD is, don’t worry; think of it as a probabilistic version of the Fourier transform. Actually, it can be estimated by properly averaging the short-time Fourier transform).
I think of the quotient in Equation (14) as a fraction of the clean signal present in the output Y(jω). After all, if there was no noise, then SWW(jω)=0, and accordingly G(jω)=H(jω)1, what brings Equation 12 back to Equation 4.
Surprisingly, I wasn’t able to find the derivation of Equation 13; it probably can be found in the Wiener’s original works from the 1940s.
Deconvolution Using Complex Cepstrum Liftering
The complex cepstrum of a discrete signal x[n] is defined as a stable sequence x^[n] whose z-transform is [1]
X^(z)=logX(z),(14)
where X(z) is the z-transform of x[n]. Thus, x^[n] can be expressed as
As we know from the convolution property of the z-transform, a convolution of time-domain signals is equivalent to multiplication of their z-transforms. If we apply a logarithm function to the multiplication of these transforms, we obtain a summation of the logarithms of the individual transforms. Mathematically speaking, if
y[n]=x[n]∗h[n],(16)
then
Y(z)=X(z)H(z)(17)
and
y^[n]=x^[n]+h^[n].(18)
If the nonzero values of x^[n] and h^[n] occupy different ranges of the n index (different quefrencies of the cepstrum), we can zero-out the corresponding elements of y^[n] corresponding to, for example, h^[n] and after computing the inverse cepstrum obtain the signal x[n].
The operation of manipulating the elements of the cepstrum is called liftering.
Deconvolution via complex cepstrum liftering can be done, for example, to extract the glottal excitation from a recording of a human voice. In this case, x[n] is the glottal exciation, h[n] is the vocal tract impulse response (because vocal tract is a filter) and y[n] is the recorded speech signal. Take note that this is another example of blind deconvolution (we initially know neither x[n] nor h[n]).
Of course, typically x^[n] and h^[n] will overlap in the cepstral domain what makes the task more difficult and renders perfect deconvolution with this method impossible.
Summary
In this article, we discussed 4 deconvolution techniques out of which 1 works in the presence of noise. For further details, please refer to the sources below.
Bibliography
[1] Alan V Oppenheim, Ronald W. Schafer Discrete-Time Signal Processing, 3rd Edition, Pearson 2010.
[2] Simon Haykin, Adaptive Filter Theory, 5th Edition, Pearson 2014.
Comments powered by Talkyard.