>On Sep 12, 10:47=A0am, "maz_p5" <maz...@hotmail.com> wrote:
>> >>For one half of your problem, all you need to do is fill in a
>> >>table. =A0You pick a grid point x,y and determine the distance
>> >>that point and your microphones (simple high school geometry). Then
>> >>you calculate the delay between that point and the microphones.
>> >>per your example, for location (30,10), the time delay between that
>> >>location and microphone 1 is .00093 sec. =A0You compute the delays
>> >>all the other microphones. =A0Then you should multiply the absolute
>> >>delays by 44100 (the sample rate) to get the delay expressed in
>> >>of the 'number of sample times.' =A0Those are the values you put
>> >>the look-up table (e.g.: for grid location 30,10 - the time delays
>> >>the microphones are: t1, t2, t3, t4). =A0I have no idea why you're
>> >>computing distances after computing the time delays.
>> >>Once you've populated the look-up table, you turn to the other half
>> >>your problem - computing the actual time delays using your
>> >>measurements (do so with xcorr( ), max( ), or some other method to
>> >>determined later). =A0Your measured results will be a delay expressed
>> >>'number of sample times.' =A0Now, using your measured results,
>> >>through the look-up table to find the best match between the
>> >>and pre-computed time delays.
>> >>Aa an aside, I also can't help but notice that you frequently start
>> >>other threads under a different title for the same problem, and you
>> >>ask for MATLAB code examples. =A0I strongly suspect that you are not
>> >>very experienced with programming. =A0Most people posting here,
>> >>they can be very generous with their time and knowledge, won't do
>> >>something like "Here's how to solve your problem analytically, and,
>> >>oh, by the way, here's some MATLAB code to do it." =A0They
>> >>expect that the person who poses the problem has some basic
>> >>and programming skills. =A0So I think you might have to reconsider
>> >>deadline and include some unscheduled 'learn how to program in
>> >>time (or C, C++, FORTRAN, etc.).
>> >>It takes time to learn DSP techniques, and it can be very
>> >>frustrating. =A0But you should at least have some kind of
>> >Thanks for the help. Honestly, you are right. I know my basics and I
>> >my problem very well. I know how to build up this system and what all
>> >and procedures to follow. I have also read lot about it from various
>> >papers. But yes, I am just a little weak as far as MATLAB is
>> >know the steps to do like i have to calculate the delay,
>> >location estimation and I also have papers which explain in terms of
>> >mathematical formulas but I dont know what do they mean in terms of
>> >functions and hence I asked for help. I dont want people to solve my
>> >for me, but example codes will help me understand the particular
>> >Sorry for the trouble.
>> >Thank you.
>> >- Maz
>> Below are the values by calculation as well as by cross - correlation
>> the point (30,20):
>> Delay (in samples) =A0 =A0Delay by manual calculation =A0 Delay by
>> Delay12 =A0 =A0 =A0 =A0 =A0 =A0 =A0 18.1251 =A0 =A0 =A0 =A0 =A0 =A0 =A0
>=A0 =A0 =A0 =A0 17
>> Delay13 =A0 =A0 =A0 =A0 =A0 =A0 =A0 80.998 =A0 =A0 =A0 =A0 =A0 =A0 =A0
>=A0 =A0 =A0 =A0 =A094
>> Delay14 =A0 =A0 =A0 =A0 =A0 =A0 =A0 72.8532 =A0 =A0 =A0 =A0 =A0 =A0 =A0
>=A0 =A0 =A0 =A0 76
>> Delay23 =A0 =A0 =A0 =A0 =A0 =A0 =A0 62.87337 =A0 =A0 =A0 =A0 =A0 =A0
>=A0 =A0 =A0 =A0250
>> Delay24 =A0 =A0 =A0 =A0 =A0 =A0 =A0 54.7281 =A0 =A0 =A0 =A0 =A0 =A0 =A0
>=A0 =A0 =A0 =A0 54
>> Delay34 =A0 =A0 =A0 =A0 =A0 =A0 =A0 -8.14527 =A0 =A0 =A0 =A0 =A0 =A0
>=A0 =A0 =A0 -17
>> Now inserting the calculated values in my formula gives me the location
>> (29.99,19.98) which is perfect;
>> But, the cross-correlated values gives me the answer as (1.9869,33.2)
>> which is not right.
>> The cross - correlated values give perfect final answer for center
>> location but not these ones on the side.
>> This shows that my formula for calculating the location is correct,
>> somehow the 1st part i.e. calculating the exact delay is not right.
>> Can you please help me with this?
>> Thank you.- Hide quoted text -
>> - Show quoted text -
>Well, those xcorr results delay13, delay23 and delay34 seem way out of
>range. The others aren't too bad, but I wouldn't trust them either.
>One of the reasons I wanted you to pre-compute the entire grid was so
>that you could see what kind of resolution you could expect from your
>measured time delays (where the measured delays were from xcorr( ),
>max( ) or some other method).
>The pre-computed delays should, of course, give you exact results.
>When using xcorr, are you getting a broad peak with gently sloping
>sides away from the peak, or multiple peaks, where each one is roughly
>the same height as the others? The latter could happen if your input
>signals to xcorr are sinusoidal. You mentioned before that your
>inputs were mostly zero and then +/1 for a while, and then zero again.
>What exactly does your two time domain recordings look like? Are they
>indeed sinusoids over a short period of time? And are they at a
>particular frequency, or are they some combination of a few
>frequencies? And how many points are you using for the xcorr - I hope
>it=92s not the nearly one million points each like you were using
Yes there are multiple peaks with the same frequency very close to each
other near that sound arrival point. rest of the signal is flat close to
zero. Also, iv noticed that the signals are not the same or delayed version
of one another. obviously its coming from the same source but the signals
are slight different, maybe due to many factors affecting it.
This is the reason, I asked for your email so that i could email you one
of sound sample sets for your to figure out what exactly it looks like.
Then we can apply the same solution to all of them. can you please have a
look. I think we can solve the solution much much quicker if you have a
look at it.
Also, yes the values i just showed in the last post were of the same huge
data. But, I have calculated the readings for other points with shorter
data of just 3 sec as well, and the answer still differs by huge sample