Yes, I see....the signal with compact support can have zeros outside of ROC...It's clear why, now. I'm not sure what to do differently yet....
my idea was this: given alpha <=1 (an adaptation coefficient) we do:
received signal from microphone (length 2N), and the weights (length N, padded with N zeros at the end). 2. divide (FT of reference) by (FT of received) 3. unwrap phase; take result of (2) as phase and magnitude 4. multiply (FT of weights) by mag^alpha*( cos (phase*alpha) + i sin(phase*alpha) ) 5. take IFT of weights, and throw away final N samples
Maybe there's an eigenvalue/vector trick that I'm missing... chuck
On 4/8/06, Piotr Majdak piotr@majdak.com wrote:
Hi Charles,
Charles Henry wrote:
- Fourier deconvolution: The only restriction here is that the
signal spans the entire frequency range (which in terms of wavelets, is just an octave chirp).
Dividing by a spectrum, every zero become a pole. Thus, dividing by a spectrum of a signal with zeros outside of ROC will result in unstable signals. To avoid this problem you can try to calculate a minimum phase version of your ref-signal and divide by that one. Of course, the phase information won't be deconvolved perfectly in this case :-(
br, Piotr Majdak
-- Charles Zachary Henry
anti.dazed.med Med student who needs a Mickey's
On Sun, 9 Apr 2006, Charles Henry wrote:
Yes, I see....the signal with compact support can have zeros outside of ROC...
Btw, what does "ROC" mean?
- unwrap phase; take result of (2) as phase and magnitude
- multiply (FT of weights) by mag^alpha*( cos (phase*alpha) + i
sin(phase*alpha) )
That causes the signal's complex cepstrum to be multiplied by alpha? why do you do it, and why do you consider alpha as an "adaptation coefficient"?
Maybe there's an eigenvalue/vector trick that I'm missing...
Don't eigenvalue methods only work on linear transforms? Where's your linear transform? (Fourier transforms are linear, but I haven't seen anyone eigendecomposing Fouriers yet...)
sorry for the "newbie" questions ;-)
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju | Freelance Digital Arts Engineer, Montréal QC Canada
hi!
Mathieu Bouchard wrote:
Yes, I see....the signal with compact support can have zeros outside of ROC...
Btw, what does "ROC" mean?
ROC=Region of convergence http://en.wikipedia.org/wiki/Region_of_convergence
br, Piotr
- unwrap phase; take result of (2) as phase and magnitude
- multiply (FT of weights) by mag^alpha*( cos (phase*alpha) + i
sin(phase*alpha) )
That causes the signal's complex cepstrum to be multiplied by alpha? why do you do it, and why do you consider alpha as an "adaptation coefficient"?
Suppose we've got some filter, w, that we're processing the sound through, and we've got a signal, x, that we pass through, and we recieve y from a mic
so, we want x, but we get y: use X(f) for FT of x(t), and Y(f) for FT of y(t)
we modify our filter so that on the next iteration, we make y get closer to x
W(f; n+1)=W(f; n) * ( X(f) / Y(f) ) ^ alpha
This thing here: mag^alpha*( cos (phase*alpha) + i sin(phase*alpha) ) is just ( X(f) / Y(f) ) ^ alpha ( X(f) / Y(f) ) ^ alpha tracks along the complex curve between X(f) and Y(f) and takes a value in between them, depending on alpha
alpha is used as an adaptation coefficient, because there is always some noise in the system we are trying to measure.
So, when alpha is 0, this ratio is just 1, meaning, we make no modifications.. We start with alpha =1, and decrease it slowly to 0 over the course of many adaptations
Maybe there's an eigenvalue/vector trick that I'm missing...
Don't eigenvalue methods only work on linear transforms? Where's your linear transform? (Fourier transforms are linear, but I haven't seen anyone eigendecomposing Fouriers yet...)
Hey, there is a Fourier matrix eigenvalue/vector decomposition: Eigenvalue and eigenvector decomposition of the discrete Fourier transform McClellan, J.; Parks, T. Audio and Electroacoustics, IEEE Transactions on Volume 20, Issue 1, Mar 1972 Page(s): 66 - 74
and another about a matrix that commutes with the Fourier Transform, Eigenvectors and functions of the discrete Fourier transform Dickinson, B. Steiglitz, K. Princeton University, Princeton, NJ, USA; This paper appears in: Acoustics, Speech, and Signal Processing [see also IEEE Transactions on Signal Processing], IEEE Transactions on Publication Date: Feb 1982 Volume: 30, Issue: 1 On page(s): 25- 31
but I haven't read them yet....school is keeping me too busy these days....
and that wasn't exactly what I was referring to, either:
the problem looks like this, the output is x convolved with the filter w, convolved with some "assumed" linear transform L
x*w*L=y
and we know that the signal x and y have compact support (meaning zero outside a certain range in time), and this (I think) results in some zeros in y(t) being outside of ROC in the Laplace domain. The naive deconvolution seems to be unstable for this reason.
If it was possible to know the eigenvalues/vectors of w*L, we could solve this problem immediately, but we can't know them, at all... If there is a basis of functions that spans the eigenfunctions of w*L, we might try to adapt differently.... I just *think* there's some *trick*
I will probably come back to this problem in a month or so, but I haven't made any progress since trying the "Toeplitz Solver" (which was also unstable)
Chuck
I have implemented the fourier domain adaptation algorithm and worked out most of the bugs. It is doing a good job of restoring frequency and phase response for short (8192) length filtering on blocks of 16384 samples. The two signals, one reference signal and the received signal from the microphone line up on top of one another pretty well. The problem, which you can see in the screenshot, is that the signal at the beginning and end are getting left out. This may have something to do with my handling of the frequencies at zero and at the Nyquist frequency (of the wavelet subband being adapted). The FT at these two frequencies was being problematic, so instead of dividing by the numbers (which sometimes turn out as 0) I used different lines: mag[0]=((fabsf(refsub[0]) > fabsf(recsub[0]))? 1.1 : 0.9); mag[half]=((fabsf(refsub[half]) > fabsf(recsub[half]))? 1.1 : 0.9); these circumvent the problem with division by zero, and tend to converge...but as you can see, they don't coverge to the right number. Any ideas what I could replace these lines with?
I'll enclose the code for the adaptive filters called controlfreak~.c also, and see if any suggestions for improving the code come up (this is a very high latency filtering routine; once I get it fully working with high latency, I'll try to modify it to reduce the latency)
A representative screenshot can be found here: http://czh.zapto.org/public/adaptation.jpg
Algorithm:
my idea was this: given alpha <=1 (an adaptation coefficient) we do:
- Fourier transform of 3 things: reference signal (length 2N),
received signal from microphone (length 2N), and the weights (length N, padded with N zeros at the end). 2. divide (FT of reference) by (FT of received) 3. unwrap phase; take result of (2) as phase and magnitude 4. multiply (FT of weights) by mag^alpha*( cos (phase*alpha) + i sin(phase*alpha) ) 5. take IFT of weights, and throw away final N samples
Lastly, the changes to this: 6. multiply the weights by a gaussian centered at the average time location, E(t), handled in a periodic sense; the standard deviation is a function of alpha, so that the gaussian converges to 1, everywhere, as alpha goes to 0 7. measure and renormalize weights 8. measure and reject adaptation if correlation decreases; if correlation improves, but is negative, multiply weights by -1
Chuck
controlfreak~ works on the wavelet transform of another object I put together called wpp~ using the wave++ library for the wavelet transform.
Chuck