DSPRelated.com
Forums

GCC Clarity.

Started by staplep March 20, 2009
I have also tried using the GCC for TDOA estimation. I initially
implemented the cross-correlation, but found that even when i changed the
angle of arrival, the delay might not change. This is most definitely
wrong, and I suspected that the clarity needed to increase. I implemented
the GCC, which does increase the clarity, but just gives back the same
value of delay as the standard cross-correlation! Can anyone please explain
this to a confused student!!!
On Mar 20, 3:46&#4294967295;pm, "staplep" <pst...@gmail.com> wrote:
> I have also tried using the GCC for TDOA estimation. I initially > implemented the cross-correlation, but found that even when i changed the > angle of arrival, the delay might not change. This is most definitely > wrong, and I suspected that the clarity needed to increase. I implemented > the GCC, which does increase the clarity, but just gives back the same > value of delay as the standard cross-correlation! Can anyone please explain > this to a confused student!!!
with the exception of *very* common acronyms, like "DSP", "IIR", "FIR", "FFT", "DFT", maybe "DTFT", maybe "LMS", maybe "SRC", maybe "ASRC", you should not assume that people have the slightest idea what you mean with your acronym. i can surmise that "TDOA" means something like "Time Of Arrival". "Time Delay Of Arrival" doesn't seem to make much sense to me. for the life of me, the only definition of "GCC" i can think of is Gnu C Compiler (normally "gcc"). most of us comp.dspers are happy to help confused students here, if it ain't just doing their homework. but you have to spell it out more so that we know what you're talking about and what it is that you kno, what you don't know, and what might be misconceived. r b-j
robert bristow-johnson <rbj@audioimagination.com> wrote:
> for the life of me, the only definition of "GCC" i > can think of is Gnu C Compiler (normally "gcc").
As I understand it, gcc is now the Gnu Compiler Collection. (Front ends for other languages have been added, including Fortran.) I don't know what gcc the OP was writing about, either. -- glen
On Mar 20, 1:52 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> robert bristow-johnson <r...@audioimagination.com> wrote: > > for the life of me, the only definition of "GCC" i > > can think of is Gnu C Compiler (normally "gcc"). > > As I understand it, gcc is now the Gnu Compiler Collection. > (Front ends for other languages have been added, including > Fortran.) > > I don't know what gcc the OP was writing about, either. > > -- glen
Well, I took the poster to mean generalized cross correlator and time difference of arrival due to past experience with those meanings associated with GCC and TDOA appearing so close together, but the OP should have spelled them out. And without meaningful detail of what was attempted and how, what the results were, and what was expected and why, I see little basis for any response. Dale B. Dalrymple
well, i learned two things:

On Mar 20, 6:14&#4294967295;pm, dbd <d...@ieee.org> wrote:
> On Mar 20, 1:52 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: > > > robert bristow-johnson <r...@audioimagination.com> wrote: > > > for the life of me, the only definition of "GCC" i > > > can think of is Gnu C Compiler (normally "gcc"). > > > As I understand it, gcc is now the Gnu Compiler Collection. > > (Front ends for other languages have been added, including > > Fortran.)
wow. so if you are compiling Fortran, you still use gcc. okay.
> > > I don't know what gcc the OP was writing about, either. > > > -- glen > > Well, I took the poster to mean generalized cross correlator and time > difference of arrival
ah! "difference". i thought it was "delay". and i confess, i hadn't heard of *Generalized* Cross Correlation and it escaped my notice that the "CC" was cross-correlation, even though both were mentioned by the OP. okay, so i know of how cross-correlation can be used to estimate the time difference between two inputs (like microphones) that derive their input from the same source. maybe the OP should be more specific as to exactly how he/she is computing the cross-correlation and from such result, how he/she estimates the time difference between the two inputs.
> due to past experience with those meanings > associated with GCC and TDOA appearing so close together, but the OP > should have spelled them out. And without &#4294967295;meaningful detail of what > was attempted and how, what the results were, and what was expected > and why, I see little basis for any response.
ooops, i guess i just repeated what you said, Dale. that'll teach me for not reading down to the bottom of a post i'm responding to. (i guess i hadn't learned that lesson in the past.) r b-j
On Mar 21, 9:25&#4294967295;am, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On Mar 20, 3:46&#4294967295;pm, "staplep" <pst...@gmail.com> wrote: > > > I have also tried using the GCC for TDOA estimation. I initially > > implemented the cross-correlation, but found that even when i changed the > > angle of arrival, the delay might not change. This is most definitely > > wrong, and I suspected that the clarity needed to increase. I implemented > > the GCC, which does increase the clarity, but just gives back the same > > value of delay as the standard cross-correlation! Can anyone please explain > > this to a confused student!!! > > with the exception of *very* common acronyms, like "DSP", "IIR", > "FIR", "FFT", "DFT", maybe "DTFT", maybe "LMS", maybe "SRC", maybe > "ASRC", you should not assume that people have the slightest idea what > you mean with your acronym. &#4294967295;i can surmise that "TDOA" means something > like "Time Of Arrival". &#4294967295;"Time Delay Of Arrival" doesn't seem to make > much sense to me. &#4294967295;for the life of me, the only definition of "GCC" i > can think of is Gnu C Compiler (normally "gcc"). > > most of us comp.dspers are happy to help confused students here, if it > ain't just doing their homework. &#4294967295;but you have to spell it out more so > that we know what you're talking about and what it is that you kno, > what you don't know, and what might be misconceived. > > r b-j
Generalized Cross correlation.
On Mar 21, 4:36&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> well, i learned two things: > > On Mar 20, 6:14&#4294967295;pm, dbd <d...@ieee.org> wrote: > > > On Mar 20, 1:52 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote: > > > > robert bristow-johnson <r...@audioimagination.com> wrote: > > > > for the life of me, the only definition of "GCC" i > > > > can think of is Gnu C Compiler (normally "gcc"). > > > > As I understand it, gcc is now the Gnu Compiler Collection. > > > (Front ends for other languages have been added, including > > > Fortran.) > > wow. &#4294967295;so if you are compiling Fortran, you still use gcc. &#4294967295;okay. > > > > > > I don't know what gcc the OP was writing about, either. > > > > -- glen > > > Well, I took the poster to mean generalized cross correlator and time > > difference of arrival > > ah! &#4294967295;"difference". &#4294967295;i thought it was "delay". > > and i confess, i hadn't heard of *Generalized* Cross Correlation and > it escaped my notice that the "CC" was cross-correlation, even though > both were mentioned by the OP. > > okay, so i know of how cross-correlation can be used to estimate the > time difference between two inputs (like microphones) that derive > their input from the same source. &#4294967295;maybe the OP should be more > specific as to exactly how he/she is computing the cross-correlation > and from such result, how he/she estimates the time difference between > the two inputs. > > > due to past experience with those meanings > > associated with GCC and TDOA appearing so close together, but the OP > > should have spelled them out. And without &#4294967295;meaningful detail of what > > was attempted and how, what the results were, and what was expected > > and why, I see little basis for any response. > > ooops, i guess i just repeated what you said, Dale. &#4294967295;that'll teach me > for not reading down to the bottom of a post i'm responding to. &#4294967295;(i > guess i hadn't learned that lesson in the past.) > > r b-j
What type of GCC? Hanan Thomson,SCOT Transform,PHAT??? Please state.
Sorry, I should have clarified a lot more, excuse my ignorance! 

The GCC is the generalized cross correlation, used for determining the
time delay of arrival(TDOA). All of the implementation is in MATLAB aswell.
I have two recordings of the same sound, from spaced microphones. Using a
cross correlation, I can work out the time delay (supposedly). I am trying
to implement a sound localization system, to find the angle of arrival from
this time delay. So, different angles should give wholly different results,
because the delay changes.

OK, so my way of implementing this is to execute the cross correlation,
then find the time delay from the peak of the correlation. When I observe
the peak, it often spans a few samples, which I think is the cause of my
poor results.  I could be wrong though. When I use MATLAB to find the
delay, it does return a seemingly accurate result. The thing is, when I
change the angle, it often returns the same result as before! The fact that
the delay doesn't change when I change the angle of the sound source means
that my implementation is wrong, or the correlation isn't specific enough!


So, after trawling through many internet sites, I found many papers on
what is called the generalized cross correlation. This is supposed to
clarify the results, by decreasing the amount of peaks the max correlation
occurs over. My problem is that both the GCC and the cross correlation
return the exact same results! And the results are often wrong! Could
someone please clarify my error, I feel so stupid because I can't figure it
out! 
On Mar 22, 3:47 pm, "staplep" <pst...@gmail.com> wrote:
> Sorry, I should have clarified a lot more, excuse my ignorance! > > The GCC is the generalized cross correlation, used for determining the > time delay of arrival(TDOA). All of the implementation is in MATLAB aswell. > I have two recordings of the same sound, from spaced microphones. Using a > cross correlation, I can work out the time delay (supposedly). I am trying > to implement a sound localization system, to find the angle of arrival from > this time delay. So, different angles should give wholly different results, > because the delay changes. > > OK, so my way of implementing this is to execute the cross correlation, > then find the time delay from the peak of the correlation. When I observe > the peak, it often spans a few samples, which I think is the cause of my > poor results. I could be wrong though. When I use MATLAB to find the > delay, it does return a seemingly accurate result. The thing is, when I > change the angle, it often returns the same result as before! The fact that > the delay doesn't change when I change the angle of the sound source means > that my implementation is wrong, or the correlation isn't specific enough! > > So, after trawling through many internet sites, I found many papers on > what is called the generalized cross correlation. This is supposed to > clarify the results, by decreasing the amount of peaks the max correlation > occurs over. My problem is that both the GCC and the cross correlation > return the exact same results! And the results are often wrong! Could > someone please clarify my error, I feel so stupid because I can't figure it > out!
So we have some vocabulary down. I also said: "without meaningful detail of what was attempted and how, what the results were, and what was expected and why, I see little basis for any response. " Without better detail, no one can troubleshoot whether your problem is in understanding, coding, choice of algorithm, test signal, or expectation. What signal did you test with? What SNR? What GCC did you implement. How do you determine delay from the 'flat peak'? At high SNR, CC and GCC should be similar. How big are the errors? et cetera Dale B. Dalrymple
On Mar 22, 7:40&#4294967295;pm, dbd <d...@ieee.org> wrote:
> On Mar 22, 3:47 pm, "staplep" <pst...@gmail.com> wrote: > > > > > Sorry, I should have clarified a lot more, excuse my ignorance!
listen, it's me who is ignorant. there's enough alphabet soup in my life and in the news that i just don't allocate real estate in my brain for more acronyms.
> > What signal did you test with? What SNR? What GCC did you implement. > How do you determine delay from the 'flat peak'?
i just can't imagine it being flatter than what correlating a sine against itself would get you. i think there is a mathematical minimum to the 2nd derivative of a normalized autocorrelation. they can be sharp (like with white noise), but the *peak* cannot be really flat. i don't get it.
> At high SNR, CC and GCC should be similar.
can someone spell out the difference? i know, at least how i would define cross-correlation in a sorta practical manner: R_xy(tau,t) = integral{ x(t+u+tau/2)*y(t+u-tau/2)*w(u) du} where w(t) is a window function centered around t=0 and maybe y(t) has to be complex conjugated in the integral. this can be turned into a discrete-time version as so: R_xy(tau,n) = sum{ x[n+i+floor(tau/2)]*y[n+i+floor(tau/2)-tau]*w[i] } i where now the lag, tau, is an integer. i s'pose you might wanna normalize it by dividing by sqrt(R_xx(0,n)*R_yy(0,n)} so my question is, specifically, what other kind of cross-correlation are people using? r b-j