BAD REFERENCE SIGNALS ERROR IN TDOA

3 views (last 30 days)
john corner
john corner on 20 Apr 2021
Answered: Walter Roberson on 21 Apr 2021
WARNING: BAD REFERENCE SIGNALS: ref delays differ by more than 2 samples!
taking ref with higher reliability, i.e. ref check (reliability: 0.00017386(ref) < 0.0054402(ref check)
  2 Comments
john corner
john corner on 21 Apr 2021
%% Calculate Correlation Results
if (interpol <= 1)
delay1 = delay1_native;
delay2 = delay2_native;
delay3 = delay3_native;
else
delay1 = delay1_interp;
delay2 = delay2_interp;
delay3 = delay3_interp;
end
if abs(delay1 - delay3) <= 2
avg_delay13 = (delay1 + delay3) / 2; % this delay includes: 1) different reception start time 2) ref signal delay due to different distances to ref transmitter
else
disp('<strong>WARNING: BAD REFERENCE SIGNALS: ref delays differ by more than 2 samples! </strong>');
if corr1_reliability > corr3_reliability
avg_delay13 = delay1;
disp(['<strong>taking ref with higher reliability, i.e. ref (reliability: ' num2str(corr1_reliability) '(ref) > ' num2str(corr3_reliability) '(ref check) </strong>']);
else
avg_delay13 = delay3;
disp(['<strong>taking ref with higher reliability, i.e. ref check (reliability: ' num2str(corr1_reliability) '(ref) < ' num2str(corr3_reliability) '(ref check) </strong>']);
end
end

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 21 Apr 2021
It looks like you are using a system that has three signals total, two of which are intended to be the same reference signal, and the third is probably the signal whose distance is to be judged. But the correlation between the two reference signals is more than 2 samples. If your sampling frequency is 22100 Hz, that would correspond to 1/11050 seconds; at 343 meters per second in air, that would be
format long g
Fs = 22100; %samples/second
SoS = 343; %m/s
Nsamp = 2; %samples
distance_m = Nsamp / Fs * SoS
distance_m =
0.0310407239819005
distance_cm = distance_m * 100
distance_cm =
3.10407239819005
But if your sampling frequency is 8000:
Fs = 8000; %samples/second
SoS = 343; %m/s
Nsamp = 2; %samples
distance_m = Nsamp / Fs * SoS
distance_m =
0.08575
distance_cm = distance_m * 100
distance_cm =
8.575
I would guess that you are intended to place your microphone at the same distance relative to two speakers that are emitting the same sound, in order to calibrate, but that you have not done that placement accurately enough.

Categories

Find more on Signal Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!