+ All Categories
Home > Documents > KnowHow of UTLN Patents EP2235558/US8638641 [1]...

KnowHow of UTLN Patents EP2235558/US8638641 [1]...

Date post: 19-May-2018
Category:
Upload: buihanh
View: 219 times
Download: 3 times
Share this document with a friend
133
1 Private communication for Cyberio do not redistribute KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539 [2] Ales Mishchenko ([email protected], +33662549192), Herve Glotin ([email protected], +33494142824), Pascale Giraudet ([email protected]) October 17, 2014 Motivation. Localisation and identification of bioacoustic sources using pas- sive acoustics is an important task for ecological monitoring.The passive acoustics is particulary important where videomonitoring fails, such as estimating the quantity, biodiversity and habbits of night animals, such as bats, night insects, etc. The most challenging problem in acoustical monitoring remains the localisation and separation of sound sources, robust to echoes and noise. This report presents the solution to this problem, based on the coherence between common signals, captured by differ- ent microphones. This coherence appears because the location and velocity of sound source relative to different microphones correspond to time difference of sound ar- rival to different microphones (TDOA) and difference in sound frequency relative to these microphones (FD). In addition, kinematic relation between velocities and locations entrain relations between TDOAs and FDOAs.
Transcript
Page 1: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

1

Private communication for Cyberiodo not redistribute

KnowHow of UTLN PatentsEP2235558/US8638641 [1] and FR1454539 [2]

Ales Mishchenko ([email protected], +33662549192),Herve Glotin ([email protected], +33494142824),

Pascale Giraudet ([email protected])

October 17, 2014

Motivation. Localisation and identification of bioacoustic sources using pas-sive acoustics is an important task for ecological monitoring.The passive acoustics isparticulary important where videomonitoring fails, such as estimating the quantity,biodiversity and habbits of night animals, such as bats, night insects, etc. The mostchallenging problem in acoustical monitoring remains the localisation and separationof sound sources, robust to echoes and noise. This report presents the solution tothis problem, based on the coherence between common signals, captured by differ-ent microphones. This coherence appears because the location and velocity of soundsource relative to different microphones correspond to time difference of sound ar-rival to different microphones (TDOA) and difference in sound frequency relativeto these microphones (FD). In addition, kinematic relation between velocities andlocations entrain relations between TDOAs and FDOAs.

Page 2: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

2

1 Contents

1.1 The project plan and report overview

see section 2

1.2 Material: Sensors and recordings

see section 3

1.3 Introduction

see section 4

1.4 PATENT1 description: TDOA from 1D signal correla-tion

see section 5

1.5 Transition from PATENT1 to PATENT2 - main patent1corrections

see section 6

1.6 Conclusions of PATENT1

see section 7

1.7 PATENT2 description: The complete algorithm details

see section 8

Page 3: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

1. CONTENTS 3

1.8 PATENT2 results: new feature: TDOA correction byTDOA-FD relation

see section 9

1.9 PATENT2 results: assessment of bat orientation, posi-tion and velocity

see section 10

1.10 PATENT2 conclusions and future work

see section 11

1.11 bibliography

see section 11

1.12 APPENDIX

see section 12

APPENDIX1: Statistics (Likehood, Fisher information, CramerRao bound)

APPENDIX2: Artificial simulations showing improvements of our meth-ods

APPENDIX3: theory on any number of sensors and Doppler effect

APPENDIX4: Matlab code for simulation

Page 4: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

4

2 The project plan and report overview

2.1 Studying the state of the art.

Collecting and studying the available bibliography and, in particular, the patentfor whales tracking (Glotin-Giraudet [1]), as well as publications like [12] for patentgeneralisation. Among other state of the art methods put a particular attention tolocalization methods such as [11], [13], [19], [20] and [28]. See section 11.Summary of state of the art. Passive acoustics location systems has been ofconsiderable interest for many years and found wide applications in many areasincluding radar, sonar, and wireless communications [3],[4],[?].It can be applied tosuch various areas of the industry as extraction the trajectory of a fast moving,sound-emitting animals (e.g. bats)? extraction the trajectory of a fast moving,sound-emitting machinery, such as extraction the trajectory of cars before and afteraccident), extraction the airplaines trajectory to identify path deviations and pre-vent the collisions, or detection the enemy’s submarines. Passive acoustics locationsystems usually rely on estimation of Time-Difference of Arrival (TDOA) and/orFrequency Difference of Arrival (FD or FDOA) of a common signals, captured bydifferent microphones. Assuming a narrowband source signal modulating a high-frequency carrier, the Doppler effect (resulting from different velocities relative todifferent microphone) induces negligible time-scaling on the narrowband modulatingsignal, but significantly modifies the carrier frequency, giving rise to the FDOA. TheTDOA accounts for a time-shift in a 1D temporal signal, registered by a microphone.For a stationary emitter, one common technique is to measure the TDOAs of thesource signal to a number of spatially separated receivers. Each TDOA defines ahyperbola in which the emitter must lie. The intersection of the hyperbolae givesthe source location estimate. When the source is moving, FDOA measurementsshould be used in addition to TDOAs to estimate accurately the source positionand velocity. Numerous techniques are available in literature for stationary sourcelocation using TDOAs [?][7]. Relatively little work is available for moving sourcelocation and very few can be identified as combined TDOA+FDOA multiple-sourcemulti-frequency band localisation. Our method is a generalisation of TDOA-basedmethod, described in [1] for the case of TDOA+FDOA localisation.

Page 5: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

2. THE PROJECT PLAN AND REPORT OVERVIEW 5

2.2 Adapting algorithms and calculation of TDOA on realdata.

Processing real recordings (57 in general, with particular concentration on the first 7aquired recordings), calculation of TDOA (Time difference of arrival for the recordedsound), smoothing and refinement TDOA(t) with patented coherence condition for-mulas. Including studying and comparision to state of the art approaches to po-sitioning using time-difference of arrival ([21], [40], [42], [46], [52], [62]). See section 5.

2.3 Calculation of all coherence between TDOA and FD.

Developing algorithms and programming the processing of TDOA and FD with gen-eralized patented coherence.Novelty of calculation of all coherence between TDOA and FD. Our tech-nique is based on usage of 2D cross-correlation of Spectrograms/scalograms of differ-ent microphones recordings, resulting in a set of initial simultaneous frequency andtime shift. In our paper we use derivation of FD coherence formulas and gerenralisa-tion of TDOA and FD formulas for the case of arbitrary number of microphones, aswell as combination of TDOA and FD coherence formulas for the case of TDOA+FD.

Usage a shift in frequency of a recorded sound (doppler effect) is a commontechnique to extract the velocity of a fast moving animal/object. Further to thistechnique, we use the refinement the recording data, using an accordance betweensound frequencies registred by different microphones, caused by correspondence be-tween animal/object approach or retreat velocity, relative to different microphones.Similarilty, we use the refinement the recording data, using an accordance betweentime difference of sound arrival and frequency difference of a sound, arrived to differ-ent, caused by coordination between position and velocity of a moving animal/ob-ject. The main part of the algorithm are sets of coherence formulas to refine therecorded data in order to extract velocities and positions coherent between each over.

2.4 Calculation of TDOA and FD on real data and Trackingwith TDOA and FD.

Adapting algorithms and programming the processing 7 real recordings, calcula-tion of TDOA and FD, smoothing TDOA(t) and FD(t), refinement of TDOA with

Page 6: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

6

patented coherence condition formulas. See section 3.3. Reconstruction of trajec-tory using refined TDOA and FD data.

2.5 Optimization of parameters of algorithms for TDOAcalculation.

Adapt the resulting algorithm of TDOA calculation to a variety of bat recordings,including optimisation of time-step, crosscorrelation-window, number of maximumsand perdentage of TDOA to filter with coherence condition formulas. See section 5.1.

2.6 The complete algorithm (including Patent2) details.

The Cross-correlation of the 3 data types (1D temporal signal, 1D spectrum and 2Dspectrogram/scalogram), followed by data combination in all 3 domains 8.

2.7 Appendix

Estimation of quality of real data and sensors geometry.

Calculation statistical measures (Likehood, Fishes information, Cramer-Rao boundsand other) to analyse data and make conclusions on optimal sensors geometry. Uti-lization and adaptation of an available algorithms, such as [9] and [10]. See section12.

Simplified simulations.

Creating the simplified model of bat tracking with 4 sensors, checking consistencyof coherence equations for FD and TDOA on these simulations. See subsection 4.7.

Page 7: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

2. THE PROJECT PLAN AND REPORT OVERVIEW 7

Some theory on using the TDOA and FD for any number of sensors andof using Doppler effect.

The theoretical assessments of using the TDOA and FD for any number of sensors.Advantages of adding the coherence equations for quadruplets, pentaplets, etc tothe coherence equations for triplets.

Page 8: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

8

Figure 1: The recording(left) and spectrogram(right)of 1st microphone of recordingMyosp

0 0.5 1 1.5 2 2.5 3 3.5 4−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time, s

Rec

ordi

ng a

mpl

itude

3 Material: Sensors and recordings

3.1 Geometry of microphones

The geometry of anthena, consisting from 4 recording microphones is showon in afigure 2.

3.2 Real bat sound to be processed.

We are using 57 recordings of real-world bat recordings located at ”/NAS/ALESRES/-DATA”, each containing recording name and time of recording:

’MyospECORx_ 08_16_12_ 22_35_28ALL’ Frequency range in 10kHz units = [4 8]

’PlecotusECORx_ 08_16_12_ 21_40_40ALL’ Frequency range in 10kHz units = [2 6] With cricet = [0.3 6]

’RhinoFerECORx_ 08_16_12_ 22_34_12ALL’ Frequency range in 10kHz units = [7 9] With cricet = [0.3 9]

’RhinohipECORx_ 08_16_12_ 21_58_31ALL’ Frequency range in 10kHz units = [4.2 11.5] With cricet = [0.3 11.5]

’SerotuleECORx_ 08_16_12_ 21_43_32ALL’ Frequency range in 10kHz units = [1.8 6] With cricet = [0.3 6]

’PikECORx_ 08_16_12_ 21_55_44ALL’ Frequency range in 10kHz units = [3.5 6] With cricet = [0.3 6]

’PipECORx_ 08_16_12_ 21_50_36ALL’ Frequency range in 10kHz units = [4 6] With cricet = [0.3 6]

’p6_21_48_27’ Frequency range in 10kHz units = [4 11]

’p6_21_58_43’ Frequency range in 10kHz units = [4 6]

’p6_22_25_20’ Frequency range in 10kHz units = [3 7]

’p6_23_10_03’ Frequency range in 10kHz units = [3 9]

’p7Pkuhl_23_00_25’ Frequency range in 10kHz units = [2.9 6]

’p7Ppip146_56’ Frequency range in 10kHz units = [4 7]

’p7Ppip154_48’ Frequency range in 10kHz units = [4 7]

’p7Ppip228_03’ Frequency range in 10kHz units = [3.5 6]

’p7Ppip333_50’ Frequency range in 10kHz units = [3.5 6]

’p7Rhip201’ Frequency range in 10kHz units = [4 11.5]

Page 9: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

3. MATERIAL: SENSORS AND RECORDINGS 9

Figure 2: The geometry of recording microphones

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6 −0.4

−0.2

0

0.2

0.4

0.6

0.8

10

0.2

0.4

0.6

0.8

1

anthena length,manthena width,m

anth

ena

heig

ht,m

’p7Rhip218’ Frequency range in 10kHz units = [4 11.5]

’p7Rhip307’ Frequency range in 10kHz units = [4 11.5]

’p7Rhip120’ Frequency range in 10kHz units = [4 11.5]

’h_21_15_21’ Frequency range in 10kHz units = [4 6]

’h_21_21_37’ Frequency range in 10kHz units = [4 11]

’h_21_54_53’ Frequency range in 10kHz units = [2 6]

’h_22_31_54’ Frequency range in 10kHz units = [7 9]

’o_21_39_47’ Frequency range in 10kHz units = [3 9]

’o_21_44_22’ Frequency range in 10kHz units = [3 7]

’o_22_02_56’ Frequency range in 10kHz units = [4 12]

’o_22_25_59’ Frequency range in 10kHz units = [3.8 6]

’sr214804smc4’ Frequency range in 10kHz units =[2.4 5]

’sr215511pikbuzzsmc3’ Frequency range in 10kHz units =[2.4 5]

’sr215545pikpic’ Frequency range in 10kHz units =[2.4 5]

’sr215631smc’ Frequency range in 10kHz units =[2.4 5]

’sf221250’ Frequency range in 10kHz units =[2.4 5]

’sf221533’ Frequency range in 10kHz units =[2.4 5]

’sf222023’ Frequency range in 10kHz units =[2.4 5]

’sf222221’ Frequency range in 10kHz units =[2.4 5]

’sf222816’ Frequency range in 10kHz units =[2.4 5]

’sm214708’ Frequency range in 10kHz units =[2.4 5]

’sm214728’ Frequency range in 10kHz units =[2.4 5]

’sm214941’ Frequency range in 10kHz units =[2.4 5]

’sm215423_2pic1pik’ Frequency range in 10kHz units =[2.4 5]

’sm215856_3sp’ Frequency range in 10kHz units =[2.4 5]

’sm215922_2sp’ Frequency range in 10kHz units =[2.4 5]

’sm221439’ Frequency range in 10kHz units =[2.4 5]

’sg214525pic’ Frequency range in 10kHz units =[2.4 5]

’sg214548smc8’ Frequency range in 10kHz units =[2.4 5]

’sg214653smc9’ Frequency range in 10kHz units =[2.4 5]

’sg214700smc10’ Frequency range in 10kHz units =[2.4 5]

’sg215151pyg’ Frequency range in 10kHz units =[2.4 5]

’sg221333’ Frequency range in 10kHz units =[2.4 5]

’sg221550smc2’ Frequency range in 10kHz units =[2.4 5]

’sg221641smc6’ Frequency range in 10kHz units =[2.4 5]

’sg222003smc5’ Frequency range in 10kHz units =[2.4 5]

Page 10: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

10

Figure 3: The Spectrogram of 1st microphone of recording Serotule(left upper), Ple-cotus(right upper), Pip(left middle), Pik(right middle), Rhinohip(left lower), Rhi-noFer(right lower)

spectrogramme

Fre

quen

ces

Hz

Temps en s0 0.5 1 1.5 2 2.5 3 3.5

0

2

4

6

8

10

12

x 104 spectrogramme

Fre

quen

ces

Hz

Temps en s0 0.5 1 1.5 2 2.5 3 3.5

0

2

4

6

8

10

12

x 104

spectrogramme

Fre

quen

ces

Hz

Temps en s0 0.5 1 1.5 2 2.5 3 3.5

0

2

4

6

8

10

12

x 104 spectrogramme

Fre

quen

ces

Hz

Temps en s0 0.5 1 1.5 2 2.5 3 3.5

0

2

4

6

8

10

12

x 104

spectrogramme

Fre

quen

ces

Hz

Temps en s0 0.5 1 1.5 2 2.5 3 3.5

0

2

4

6

8

10

12

x 104 spectrogramme

Fre

quen

ces

Hz

Temps en s0 0.5 1 1.5 2 2.5 3 3.5

0

2

4

6

8

10

12

x 104

Page 11: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

3. MATERIAL: SENSORS AND RECORDINGS 11

’sg222141smc7’ Frequency range in 10kHz units =[2.4 5]

’ECOR2116_42’ Frequency range in 10kHz units =[2.4 5]

’ECOR2156_31att312k’ Frequency range in 10kHz units =[2.4 5]

’ECOR2154_58’ Frequency range in 10kHz units =[2.4 5]

We are using mainly 4seconds of 7 first recordings Myosp,Pik,Pip,Plecotus,RhinoFer,Rhinohip,Serotule;recorded by 4microphones each). The corresponding files are located at ”/NAS/ALESRES/-DATA”, each containing recording name (animal name), data and code of recording.These recordings are made with the biggest anthena, shown in a picture 2.

The list of all recordings above contains also the frequency range of a correspond-ing recording in 10kHz units. The recorded signal together with its spectrogram isshown in figure 1 respectively. Other spectrograms recorded with abovementionedanthena are shown in figure 3.

All 57 recordings are made with 6 types of anthenas listed below as coordinatesof each 4 microphones (in meters):

antenna1=[0 0 -0.6 0.6 ; 0 0.692 -0.346 -0.346; 0.99 0 0 0 ]’;

antenna2=[0,39,0 ; 0,0,32.4 ; -34.6,-21.2,0 ; 33.2,-18.3,0]/100;

antenna3=[0,39,0 ; 0,0,32.4 ; -33,-18.5,0 ; 34.5,-16,0]/100;

antenna4=[12.5,-7.5,27.8 ; 0,0,5 ; 0,14.5,27.5 ; -13,-7.5,27]/100;

antenna5=[-0.335 0 0.335 0 ; -0.215 0 -0.215 0.375; 0 0.324 0 0 ]’;

antenna6=[0 0 0.6 -0.6 ; 0 0.7 -0.346 -0.346; 1 0 0 0 ]’;

3.3 Recordings and resulting data, arrived to sensors

The recordings description

The available from Cyberio recordings include the folowing.

Flying object. In the following recordings, object is flying in the XYZ space ap-proximately 2-3 meters from the sensors. 7 objects are recorded: Myosp,Pik,Pip,Plecotus,RhinoFer,Rhinohip,Serotule.

Sensors. 4 sensors, placed into small ( 60cm) pyramid.

Recorded sound. In the following recordings, 4 seconds of each objects arerecorded. Approximately 3 seconds in each recordings contain bat-sound.

Page 12: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

12

The resulting data description

In the previous section, we presented artificial results from the mathematical modelof bat tracking. In this section, we process the real data recordings of 1 flying bat,therefore, from 7 recorded objects (described above), we are presenting ”Myosp”object, corresponding to recording file name

"MyospECORx_ 08_16_12_ 22_35_28"

containing 4 sensors.

Page 13: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

4. INTRODUCTION 13

4 Introduction

4.1 The processing: 1D cross-correlation and 2D cross-correlation

TDOA (time difference of arrival) and FD (frequency difference of Doppler effect ofarrived signals) are used in the algorithm below.TDOA can be calculated both from cross-correlation of signal, arrived to differentmicrophones (1D cross-correlation) and from cross-correlation of spectrograms ofrecordings of different microphones (2D cross-correlation). FD is calculated fromcross-correlation of spectrum and using 2D cross-correlation.

2D cross-correlation of spectrograms(described in detailes in later sec-tions)

To detect the difference of times of sound-arrival to each pair of sensors and differ-ence of frequency of arrived sound, the following steps were performed:Calculating Spectrogram. For each sensor the Spectrogram of arrived sound iscalculated.Optional line-detection in Spectrogram. This optional step allows to stressclicks (verical lines in spectrogram), characterisic for some bats. To stress the veri-cal lines, the second-derivative over the horizontal axis is applied over the image ofa spectrogram.Cross-correlation between Spectrograms for TDOA and FD processing.For each pair of sensors, their Spectrograms are cross-correlated in 2D (for TDOAand FD processing), resulting in correlation-images, showing shifts at which Spec-trograms are more similar (best shifts) or more different (worst shifts).Analysis of maximums in Cross-correlation images. Maximums of cross-correlation correspond to estimations for TDOA and FD: The shift in horizontal axis(time), providing maximum of cross-correlation, correspond to the most probableTDOA to these sensors. The shift in vertical axis (frequency), providing maximumof cross-correlation, correspond to the most probable FD in these sensors(frequencyshift because of Doppler effect).

Results for 2D cross-correlation of spectrograms

The resulting functions TDOA(t) and FD(t) show, that, at this stage of process-ing, the Original Spectrogram and Spectrogram with lines detection provide similar

Page 14: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

14

trends in functions TDOA(t) and FD(t). But as corresponding TDOA(t) and FD(t)are different, it is necessary to keep calculating both variants to see which will bebetter at later, final stages (final trajectory tracking).

As it was noted, the maximums of cross-correlation correspond to estimations forTDOA and FD. Each of the maximums of Cross-correlation correspond to estimationof TDOA (time difference of sound-arrival) and FD (frequency difference of Dopplereffect of arrived signals).In the absence of noise and ideal conditions, the biggest maximum correspond tothe real TDOA and FD. If we perform calculations using biggest maximum, theresulting TDOA(t) and FD(t) will represent very non-smooth curves. Therefore,estimation of trajectory from TDOA(t) and velocity from FD(t) will be also non-smooth and unrealistic. The reason for this is that in the presence of noise the biggestmaximum may not be the ”true-maximum”, corresponding to real TDOA(t) andFD(t). To avoid this, the different combinations of maximums are used to optimizethe smoothness of resulting functions TDOA(t) and FD(t).

1D cross-correlation of signals(described in detailes in this section)

If processing of only TDOA is used, the cross-correlation of signals (instead of spec-trograms) is used. For each pair of sensors, their arrived signals are cross-correlated,resulting in correlation-functions, showing shifts at which signals are more similar(best shifts) or more different (worst shifts).

TDOAs between two microphones are calculated as peaks of correlation ofrecordings of these microphones. Figure 4 shows correlations and peaks of cor-relation of different microphones of Myosp recording.

In the following section we will concentrate on 1D-correlation (1D signal corre-lation, described in our patent1). Later we will describe and combine all types ofcorrelation (1D signal, 1D spectrum, 2D spectrogram, described in our patent2).

4.2 Notes on material from later-described patent 1 (con-clusions on geometry of antena, based on patent1)

Pseudorecordings shown below in section 12 were with 4 sensors made in a wide-spaced grid (10-20m). The real recordings were made with narrow-spaced grid(4sensors, placed into small 60cm-pyramid). As it is seen, wide-spaced grid provide

Page 15: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

4. INTRODUCTION 15

Figure 4: Cross-correlation between signals (right) and Peaks of cross-correlation(left)

Page 16: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

16

good Likelihood function: very highly concentated Likelihood function in case of lowerror spectrogram and suffisiently concentated Likelihood function in case of morerealistic high error spectrogram (see figures in section 12).Simulations of Pseudorecordings on the existing narrow-spaced grid used for realrecordings provide much worse Likelihood function. The resulting Likelihood func-tion (from narrow-spaced grid) are shown in figures in section 12 as well.

Choice of the antenna

As it will be described later, the narrow-grid sensors provide data, which may bedifficult to use for the bat localisation. From the other side, the narrow grids arepreferrable for the algorithm customer (Cyberio).Because of this, the decision wasmade to use the narrow grids and improve the concentation of Likelihood functionby using TDOAs, coherent with each other as well as FDOSs. Despite the fact thatusing the narrow grids is a risk, uising the advance refinement and tracking algo-rithms should improve the ability to use the recorded narrow-grid data to localisethe bat.In the future, we will continue to use narrow grids, as advised by Cyberio becausethe short base offers great logistical and commercial benefits. Our supplement withthe transitivity of FD should allow effective screening of a narrow grids.

Frequencies decay and sound distortion

Another technical difficulty for development of localisation algorithm can be thenatural decay of high frequency components of a sound wave at big distances. Figure5 show the typical decay of sound of different frequencies in air as function of an airhumidity.

Based on theoretical analysis, described in the following sections, as well asgeneral biology and physics of considered system, it is possible to estimate constants,such as range of operation.

Biological constrains estimation

Different theories of functional organisation of cochlea agree in different integationsegments in different frequency-ranges (see figure 6) and this can be used in adjusting

Page 17: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

4. INTRODUCTION 17

Figure 5: Frequency dependent attenuation of air (dB) in 30 m distance at differenthumidity (percent)

Figure 6: Anatomical organisation of cochlea, resulting in different sensitivity todifferent frequencies

Page 18: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

18

Figure 7: Differences in human and bat ear sensitivities

Figure 8: Threshold of hearing of different bats

Page 19: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

4. INTRODUCTION 19

the spectrogram according to biological frequency integation principles. Anotheradaptation of the system to biological properties of bat echo-location system isusing different sensibilities to different frequencies (as shown in figure 7).

Physical constrains estimation

From another side, it is possible to use physical constrains of biological echo-locationsystem. For example, the difficulty with location of objects, those sizes is less thansound wavelength. Another physical constrain is different propagation properties ofdifferent frequencies (figure 5). All these biological constraints, optimized by evolu-tion, resulted in a very particular pattern of sound used by bats, as well as frequencydistribution (figure 8). We can use the same constrains to optimize the operation ofour system.

Page 20: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

20

5 PATENT1 description: TDOA from 1D signal

correlation

Refinement of TDOA of 1D cross-correlation of signals with coherenceformulas

The resulting TDOA can be further refined with patented coherence-condition for-mulas. As in claim 7 of the patent, it is possible to refine the set of TDOA byapplication of the following coherence equations:(4 sensors case)TDOAij + TDOAjk = TDOAik ± errTDOAij + TDOAjh = TDOAih ± errTDOAik + TDOAkh = TDOAih ± errTDOAjk + TDOAkh = TDOAjh ± err

It is possible to fix the allowdable error, as the maximum possible overall systemerror, depending on microphone sensitivity, noise level, sound quality, etc. This waythe equations will serve as a filters out TDOAs which discrepancy is more thanmaximum possible overall system error.

Another approach is to choose the error adaptively, so that a fixed percentageof TDOAs will be allowded to pass thought the filter, whereas others, more worseTDOAs will be filtered out: ±err = ±err(percentage) In the following examples, weutilise the latter approach and choose err(percentage) so that exactly the specifiedpercentage of TDOAs will satisfy the corresponding equation.

For each coherence equation of the form

TDOAij + TDOAjk = TDOAik the error is calculated ERRij = TDOAij +TDOAjk - TDOAik And only a given percentage of a TDOAs is left, providing thelowest ERRij.

Results of refinement of TDOA with coherence formulas

As it can be immediately seen from the 1st(TDOAs without refinement) and 2nd(TDOAswith refinement) pictures of the figure 9, , refinement reduces the amount of smallerroneous TDOAs whereas lefts the amount of big TDOAs the same.

Again, as it can be immediately seen from the 1st(TDOAs without refinement)and 2nd(TDOAs with refinement) pictures of the figure 9, refinement reduces theamount of small erroneous TDOAs whereas lefts the amount of big TDOAs the

Page 21: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

5. PATENT1 DESCRIPTION: TDOA FROM 1D SIGNAL CORRELATION 21

Figure 9: Distribution of TDOA, calculated with 200ms-3280ms time-window(Myosp recording): refinement of TDOA (all maximums before and after coher-ence check), histograms count each TDOA one time. In all pictures, the percentageof TDOA left and entropy of histogram (e) is shown above.

0 100 2000

50

100

150

200

250

300

350

10.85<ms<187.73

Num

ber

of T

DO

As,

max

1< 3

12

1max 25% e=1

0 100 2000

50

100

150

200

250

300

350

10.34<ms<178.27

Num

ber

of T

DO

As,

max

2< 3

19

2max 25% e=0.88

0 100 2000

50

100

150

200

250

300

350

8.8<ms<149.18

Num

ber

of T

DO

As,

max

3< 3

18

3max 25% e=0.88

0 50 100 1500

50

100

150

200

250

300

350

8.35<ms<140.74

Num

ber

of T

DO

As,

max

4< 3

19

4max 25% e=0.88

0 50 100 1500

50

100

150

200

250

300

350

6.81<ms<111.57

Num

ber

of T

DO

As,

max

5< 3

17

5max 25% e=0.88

0 5 10 15 20 250

10

20

30

40

50

60

1.01 <TDOA,ms< 197.51

Num

ber

of a

ll m

axs

TD

OA

s< 4

10

all maxs25% e=0.67

0 5 10 15 20 250

5

10

15

20

25

1.01 <TDOA,ms< 197.51

Num

ber

of a

ll m

axs

TD

OA

s< 1

62

all cohers25% e=0.54

0 200 400 6000

0.5

1

1.5

2

2.5

3x 10

4

1 <TDOA,ms< 583.9

Num

ber

of a

ll m

axs

TD

OA

s< 2

6384

maxsXtripl25% e=0.35

Figure 10: Refinement of TDOA with patented coherence formulas, calculated withshort (15ms) time-window (Myosp recording, at 1sec position). first 2 histogramscount each TDOA one time, last histograms counts each TDOA N times, whereN is a coherent triplets, where this TDOA is presented. This histogram countseach TDOA not one time, but as many times as it is included in different coherenttriplets.

Page 22: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

22

Figure 11: Entropy of a histogram of all maximums after coherence check, cal-culated 200ms-3280ms time-window (Myosp recording). Legend: ”all maxs” lineshows of entropy before TDOA filtering; ”all cohers” curve shows entropy afterTDOA filtering.

0 5 10 15 20 25 30 35 400.4

0.45

0.5

0.55

0.6

0.65

0.7

0.75Entropy as percntage of TDOA coherence

1 < coherentTDOAs/allTDOAs, % < 40

0 <

entr

opy

all maxsall cohers

same. We can also see that the histogram of refined TDOAs is more sparce andcontains more distinct peaks.

Selecting the coherent TDOA those satisfy the coherence equations will allowto leave only correct TDOAs and therefore to produce more smooth TDOA and,therefore, more smooth and correct tracking. Figure 9 shows the process of refine-ment of TDOA with patented coherence formulas. 1st ans 2nd figures represent allmaximums before and after coherence check. The 3rd figure at 10 shows all max-imums after coherence check, counted by number of triplets. Figure 10 shows thesame results, but with short (15ms) time-window. The peaks of a histogram arevisibly separated in this case.

The percentage of TDOA to save after coherence check is based on the En-tropy of a histogram of all maximums after coherence check, is shown at 11 (Myosprecording). It is visible that the entropy drop is happened around 25 percent of

Page 23: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

5. PATENT1 DESCRIPTION: TDOA FROM 1D SIGNAL CORRELATION 23

Figure 12: Cross-correlation of signals, arrived to the triplet of microphones withnumbers 1, 2 and 3, Myosp recording. 1st row: signals, 2nd row: spectrograms, 3rdrow: TDOAs between pair of these triplet of microphones (40 percent of the mostcoherent TDOAs are shown), 4th row: Amplitude of recordings

signal,mic=1

spectr,mic=1

freq,H

z

time,s

0 1 2 30

5

10

x 104

signal,mic=2

spectr,mic=2

freq,H

z

time,s

0 1 2 30

5

10

x 104

signal,mic=3

spectr,mic=3

freq,H

z

time,s

0 1 2 30

5

10

x 104

0 2 4

3

2

1

0

time,s

TD

OA

,ms

TDOA(1,40%)mics=1 2

0 2 4

100

200

300

time,s

Cor.

Am

pl

Cor.Ampl(1,40%)mics=1 2

0 2 4

2

1

0

time,s

TD

OA

,ms

TDOA(1,40%)mics=2 3

0 2 4

100

200

300

time,s

Cor.

Am

pl

Cor.Ampl(1,40%)mics=2 3

0 2 410123

time,s

TD

OA

,ms

TDOA(1,40%)mics=3 1

0 2 4

100

200

300

time,s

Cor.

Am

pl

Cor.Ampl(1,40%)mics=3 1

signal,mic=1

spectr,mic=1

freq,H

z

time,s

0 1 2 30

5

10

x 104

signal,mic=2

spectr,mic=2

freq,H

z

time,s

0 1 2 30

5

10

x 104

signal,mic=3

spectr,mic=3

freq,H

z

time,s

0 1 2 30

5

10

x 104

0 2 4

3

2

1

0

time,s

TD

OA

,ms

TDOA(1,40%)mics=1 2

0 2 4

100

200

300

time,s

Cor.

Am

pl

Cor.Ampl(1,40%)mics=1 2

0 2 4

2

1

0

time,s

TD

OA

,ms

TDOA(1,40%)mics=2 3

0 2 4

100

200

300

time,s

Cor.

Am

pl

Cor.Ampl(1,40%)mics=2 3

0 2 410123

time,s

TD

OA

,ms

TDOA(1,40%)mics=3 1

0 2 4

100

200

300

time,s

Cor.

Am

pl

Cor.Ampl(1,40%)mics=3 1

left-TDOAs. This correspond to high peak-separation in the histogram of all maxi-mums.

Results of refinement of TDOA of 1D cross-correlation of signals

Figure 12 show the results of TDOA refinement with patented coherence-conditionformulas. The 3rd row shows the refined TDOAs between each pair of triplet ofmicrophones.The 3rd row shows the TDOAs refined with the formulas:TDOAij + TDOAjk = TDOAik ±err(40percent)

Page 24: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

24

TDOAij + TDOAjh = TDOAih ±err(40percent)TDOAik + TDOAkh = TDOAih ±err(40percent)TDOAjk + TDOAkh = TDOAjh ±err(40percent)

The following conclusions can be made:1. The refinment results in more smooth and more coherent TDOAs (less false out-bursts of TDOAs, caused by noise in recordings)2. Plotting TDOAs for triplets shows the correctness of coherence of TDOAs (for ex-ample 3 TDOAs mic1-mic2, mic2-mic3, mic3-mic1 illustrate the triplet coherency=0:mic1-mic2 + mic2-mic3 + mic3-mic1 = 0 3. The refinment is the same for allTDOAs-percentage(1percent,5percent,10percent) delivering the same minimum en-tropy value (see figure 11)4. The remaining false outbursts of TDOAs can be, probably removed with usingof FD and FD-TDOA coherence formulas from the patent generalisation.

Figure 12 illustrates also the interesting relation between recording amplitudeand quality of calculated TDOA. It is possible to see the distinction between time-period of a good signal (1sec-2,5sec) and time-period of a mostly noise (before 1secand after 2,5sec). The time-period of a good signal corresponds to high recordingamplitude and high quality of calculated TDOA.

In figure 13 there are summary for Plecotus species for both timeSteps(dt) andtimeWindow of 33ms, tracking 10 maximums and 5 maximums are compared. Ineach image above it is shown (in different subplots) the refined TDOAs and theoriginal signal. Different curves correspond to different pairs of microphones. As itcan be seen, our method allows increasing the number of maximums of correlationfunction, followed by reducing the number of maximums of correlation function bycoherence equations. The resulting number of maximums recinstructs more pointsof TDOA at the cost of increasing the calculation time.

Page 25: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

5. PATENT1 DESCRIPTION: TDOA FROM 1D SIGNAL CORRELATION 25

Figure 13: Comparison of 5 biggest maximums for each pair of microphones (left)and 10 biggest maximums for each pair of microphones (right) correlation, 1 percentof refined TDOAs left. Plecotus recordings shown.

0.5 1 1.5 2 2.5 3 3.5

−4

−2

0

2

4

time,s

TD

OA

,ms

TDOA(1%)

0 0.5 1 1.5 2 2.5 3 3.5 4−1

−0.5

0

0.5

1

time,s

Rec

ordi

ng A

mpl

itude

microphones 1 and 2

microphones 1 and 3

microphones 1 and 4

microphones 2 and 3

microphones 2 and 4

microphones 3 and 4

Page 26: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

26

Figure 14: Coherent TDOA, calculated with our method, rambou5-rec2-eco-rx-21-16-42 recording, 40 percents of coherent TDOAs is left.

Comparison of our and Cyberio Refined TDOA for all pair of microphones

On figures 14, 15 the TDOA of rambou5-rec2-eco-rx-21-16-42 recording are pre-sented, acquired, correspondingly, by our and Cyberio’s method. The area of highSNR, where Cyberio’s method was able to reconstruct TDOAs is marked with awave-textured rectangle. It can be seen, that in the areas of small SNR (before0,5sec and after 2sec) our method is still able to calculate some TDOAs, whereasCyberio’s method fails outside the segment of good SNR ratio (before 0,5sec andafter 2sec).

Page 27: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

5. PATENT1 DESCRIPTION: TDOA FROM 1D SIGNAL CORRELATION 27

Figure 15: TDOA, calculated with Cyberio’s method, rambou5-rec2-eco-rx-21-16recording.

Page 28: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

28

5.1 Optimization of parameters of algorithms for TDOAcalculation

Due to the difference in sounds, emitted by different species, as well as differencein antenae geometry and media of sound-propagation, it is necessary to adapt theresulting algorithm of TDOA calculation to a variety of bat recordings.We optimise time-steps, crosscorrelation-windows, number of maximums and persen-tages of TDOA to filter with coherence condition formulas.

Recordings processed with optimized parameters (expected frequency of click-ing, time-step and time-window) help to improove results. Such as, for example,with expected frequency of clicking is 20hz, time-step and time-window is 25ms isworse than with expected frequency of clicking is 30hz, time-step and time-windowis 16ms.

Page 29: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

6. TRANSITION FROMPATENT1 TO PATENT2 - MAIN PATENT1 CORRECTIONS29

6 Transition from PATENT1 to PATENT2 - main

patent1 corrections

6.1 Adding the processing of Frequency Difference of Signal(FD)

If we will add the processing of Frequency Difference of Signal (FD) to this patent,we may do the following:

6.2 In all claims

In all claims which mention TDOA - change TDOA to TDOA and FD and then usecombination of TDOA and FD.

6.3 In Claim 4

CHANGE FROMfrom the position of these peaks, the potential TDOAs corresponding to the prede-termined sounds from the source.TOfrom the horisontal position of these peaks, the potential TDOAs (for further coor-dinates estimation), as well as from the vertical position of these peaks, the potentialFDs (for further velocities estimation) corresponding to the predetermined soundsfrom the source.

6.4 In Claim 7

To claim 7 (if we claim only 4 sensors case)ADD THE FOLLOWING:...selecting the coherent FD... those satisfy the transition principle of the FD andsatisfy the system of equations:FDOSij + FDOSjk = FDOSik ±err(percentage)FDOSij + FDOSjh = FDOSih ±err(percentage)FDOSik + FDOSkh = FDOSih ±err(percentage)FDOSjk + FDOSkh = FDOSjh ±err(percentage)Here we choose err(percentage) so that exactly the specified percentage of TDOAs

Page 30: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

30

will satisfy the corresponding equation.Or, better, to claim 7 (if we claim any number of sensors case)ADD THE FOLLOWING:...selecting the coherent TDOA and FD... those satisfy the transition principle ofthe TDOA and FD, as well as satisfy the system of 2n(n-3) equations:

n(n-3) equations:∑

TDOAi,i+1 = TDOAi,m

andn(n-3) equations:

∑FDi,i+1 = FDi,m

where n is a number of sensors 2 ≤ m ≤ N − 2 and summation is over 1 ≤ i ≤ m

6.5 General relation (TDOA and FD) for any number ofsensors

The theorem for the claim 7 in the most general case:any number ofsensors, any type of measurements

Theorem:Let us consider any quality Qi, measured by each sensor Si, 1 ≤ i ≤ n, where n is anumber of sensors. Let dQij be the difference of this quality, measured by sensorsSi and Sj:dQi,j = Qj −Qi

When there are n(n-3) linear conditions on differences dQij of the form :∑dQi,i+1 = dQi,m

where 2 ≤ m ≤ N − 2 and summation is over 1 ≤ i ≤ m

Lemma:The number of sub-polygons of a n-order polygon is n(n-3). This is true for bothconvex and concave polygons, as well as planar and non-planar polygons.Proof of Lemma:Each diagonal of a polygon divides it into 2 sub-polygons. Example: diagonal ACdivides polygon ABCD into sub-polygons ABC and ACDEThe number of diagonals of a polygon is n(n-3)/2. Therefore, the number of sub-polygons of a n-order polygon is n(n-3). See illustration on 16.Lemma is prooved

Page 31: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

6. TRANSITION FROMPATENT1 TO PATENT2 - MAIN PATENT1 CORRECTIONS31

Figure 16: Diagonal convex polygon

Figure 17: Diagonal concave polygon

Some examples for the Lemma:This is true also for concave polygons. Example: dotted diagonal divides solid linepolygon into 2 sub-polygons (triangle, containing vertex A and 5-order polygon con-taining vertex B). See illustration on 17.

Examples of non-planar polygons. Example1: Cube on the following pic-ture can be viewed as non-planar polygon 123487651. Diagonal 46 divides polygon123487651 into sub-polygons 1264851 and 7326487. See illustration on 18. Exam-ple2: Octahedron an be viewed as non-planar polygon ABCDEFA. Diagonal CEdivides polygon ABCDEFA into sub-polygons CEABC and CEFDC. See illustra-tion on 19.

Proof of TheoremLet us put all sensors Si, 1 ≤ i ≤ n as vertices of a n-order polygon. As Lemmasays, we will have n(n-3) sub-polygons (chaines of sensors Si...SjSk). For each sub-polygon (each chain) we write the following:∑

dQi,i+1

Page 32: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

32

Figure 18: Diagonal 3D polygon

Figure 19: Diagonal 3D polygon

Page 33: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

6. TRANSITION FROMPATENT1 TO PATENT2 - MAIN PATENT1 CORRECTIONS33

where 2 ≤ m ≤ N − 2 and summation is over 1 ≤ i ≤ mLet us rewrite dQi,j as dQi,j = Qj −Qi:∑

dQi,i+1 =∑

(Qi+1 −Qi) = (Q2 −Q1) + (Q3 −Q2) + (Q4 −Q3) + ... = dQi,m

The Theorem is prooved

6.6 Relation between TDOA and FD

Bat positions: x1, x2, x3, ...Sensors positions: xs1, xs2, xs3, ...Bat movement: xi+1 − xi = vi ∗ δtiwhere δti = ti+1 − ti

Subtracting and adding xs1 results in(xi+1 − xs1)− (xi − xs1) = vi ∗ δtiSubtracting and adding xs2 results in(xi+1 − xs2)− (xi − xs2) = vi ∗ δtiHere (xi+1 − xsj) and (xi − xsj) are distances to sensor sj in moments ti+1 and ticorrespondinglyProjecting on the vectors xi+1 − xsj and xi − xsj results in

|xi+1 − xs1| = |xi − xs1 + δti ∗ Vi,s1

and|xi+1 − xs2| = |xi − xs2 + δti ∗ Vi,s2

where Vi,sj is the velocity of approach to the sensor sj.

Subtracting these equation and using Doppler effect formula, resiults in

c ∗ TDOAi+1,s1s2 = c ∗ TDOAi,s1s2 = δti ∗ FDi,s1s2 ∗ c/freal

orFDi,s1s2

freal=

TDOAi+1,s1s2−TDOAi,s1s2

δti

Page 34: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

34

7 Conclusions of PATENT1

7.1 Possible future improvements of PATENT1

The reporting patent1 above shows work, devoted to signal analysis in order to un-derstand the relationships between the fundamental measurements which are corre-lation amplitude, FD and TDOA.

Line-detection in spectrograms

Line-detection in spectrogram remains optional. This step allows to stress clicks(verical lines in spectrogram), characterisic for some bats. But, at the stage ofTDOA(t) and FD(t) it is unclear if line-detection improves the performance for thefinal goal (trajectory tracking) or not. TDOA(t) and FD(t) provide similar trendsTDOA(t) and FD(t), but are different. The conclusion is that it is necessary tokeep calculating both variants to see which will be better at later, final stages (finaltrajectory tracking).

Analysis of maximums in Cross-correlation images

Each of the maximums of Cross-correlation correspond to estimation of TDOA (timedifference of sound-arrival) and FD (frequency difference of Doppler effect of arrivedsignals). Analysis of maximums in Cross-correlation images provides better estima-tion in presence of noise. This analysis includes different combinations of maximumsto optimize the smoothness of resulting functions TDOA(t) and FD(t).

Difference in sound of approaching bat and the bat fying away from themicrophones

As we see from the correlation amplitude (see the bottom-left of the 21,20), thesound emitted by approching bat is less coherent than the sound from the flyingaway animal. This may be caused by more complex amplitude modulations of thefrontal direction of the sound. This causes that frontal emmisions are incoherentfrom one microphone to another, which may be due to the head function transfer ofthe bat. As it is visible from 21,20 the time of the nearest approach is around 1,5second.

Page 35: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

7. CONCLUSIONS OF PATENT1 35

Figure 20: Amplitudes of recordings, corresponding to all(above) and coher-ent(below) correlation peaks, 1 and 4 microphones, calculated 200ms-3280ms time-window (Myosp recording), 10percents of TDOAs is left.

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght b

efor

ecombHeight before all maxs

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght b

efor

e

combHeight before max1

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght b

efor

e

combHeight before max2

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght a

fter

combHeight after all maxs

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght a

fter

combHeight after max1

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght a

fter

combHeight after max2

Figure 21: Amplitudes of recordings, corresponding to all(above) and coher-ent(below) correlation peaks, 1 and 3 microphones, calculated 200ms-3280ms time-window (Myosp recording), 10percents of TDOAs is left.

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght b

efor

e

combHeight before all maxs

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght b

efor

e

combHeight before max1

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght b

efor

e

combHeight before max2

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght a

fter

combHeight after all maxs

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght a

fter

combHeight after max1

1000 2000 3000

−100

−50

0

50

100

Temps,ms

com

bHei

ght a

fter

combHeight after max2

Page 36: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

36

Domain of operation and physical relationships between correlation am-plitude and FD, TDOA

The rules for detecting the flying bat with the dFD/dt and dTDOA/dt

As we see from the spectrogram, the typical recordings represent not only the batsound (high frequency bursts between 1 second and 2,5 seconds of recording), butalso the static sound sourses, such as, for example, night insects (low frequencybursts during all the recording) (see spectrogram images above 3). Such static soundsourses provide a very high degree of correlation between pairs of microphones anda very high degree of coherence. Therefore, static sound sourses contribute intothe highest coherent TDOA. In order to remove the static sound sourses from theconsideration, 2 methods can be applied: (1)filtering by frequency (using a frequencyrange for a spectrogram, characteristic for the recorded animals) and (2)using non-zero time-variations of TDOA (dTDOA/dt) and FD (dFD/dt), characteristic forthe moving object like the flying bat.

The rules for detecting the flying bat with the FD

This method includes the following: The FD should be in the following range

|FD(t)| < f · 2 · Vc(f)

, where f is a typical frequency of sound for a given bat (50

kHz), V is the maximum bat velocity (not more than 15 m/s for all the bats) andc is the sound speed (331 m/s). The resulting range is about |FD(t)| < 5kHz

On the top-right of the ?? and ?? the only valuable FD correspond to the timeperiod of sound emmision of the bat (visible on the ??).

7.2 Summary of patent 1

We think that we investigated most of the physical properties of the flight of thebat, so now we can work with the proper TDOA space to localise the bat. This willbe conducted according to the following plan of the nearest steps:

Filtering all TDOA system according to coherence equations and other statisti-cal methods (outliers rejection smoothing, maximum combination, etc)

Introduce simple tracking for the system of coherent TDOA measurement (go fromsingle-point x, v estimation to all-trajectory x(t), v(t) estimation)

Page 37: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

7. CONCLUSIONS OF PATENT1 37

Introduce filtering by FD coherence equations (patent extention proposal)

Analyse advantage of tracking (trajectory x(t), v(t) estimation) for the system ofcoherent TDOA and FD

Analyse advantage refinement of TDOA and FD to likehood estimationFor likehood estimation, use more fine gird to have more than 6x6 posible velocitiesand, especially, more than 7x7 spatial positions.Also, for likehood estimation, generate more pseudomeasurements (more than 1piece of spectrogram and more than 1 animals) to have sufficiently large amount ofdata to calculate Likelihood function more accurately.

If simple tracking will be not suffisient, make an Extended Kalman Filtering modelfor the tracking bat system.

Based on the final result (trajectory tracking) advise optimal preprocessing, such asvertical lines detection or other spectrogram processing.

Page 38: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

38

8 PATENT2 description: The complete algorithm

details

8.1 The Cross-correlation of the 3 data types (1D temporalsignal, 1D spectrum and 2D spectrogram/scalogram)

The acoustic signal arrived to a microphone represents the 1st data type (1D tempo-ral signal). Calculated 1D spectrum of arrived sound to each microphone representsthe 2nd data type (1D spectrum). The FFT of signal represents the 3rd data type,showing the spectrogram/scalogram of a recorded bat-signal.

Signal-stressing and noise-suppression in Spectrogram/scalogram. Thehunting bat emits high-frequency clicks, appearing as vertical lines in a Spectro-gram/scalogram. Accordingly, line-detection in Spectrogram/scalogram can be per-formed to stress hunting bat sounds and suppress other sounds. This step allowsto stress clicks (verical lines in Spectrogram/scalogram). To stress the verical lines,the second-derivative over the horizontal axis is applied over the image of a Spec-trogram/scalogram.

The Cross-correlation of the 3 data types (1D temporal signal, 1Dspectrum and 2D spectrogram/scalogram)The cross-correlation of the 1st data type (1D temporal signal) is performed foreach pair of sensors (i and j): their signals (SIG(t)i and SIG(t)j) are cross-correlatedin 1D (for TDOA processing), resulting in correlation-function (xcorr(SIGi,SIGj)),showing potential time-shifts at which SIGi and SIGj are more similar (best shifts)or more different (worst shifts).The cross-correlation of the 2nd data type (1D spectrum) is performed for each eachpair of sensors (i and j): their spectrums (FFT(f)i and FFT(f)j) are cross-correlatedin 1D (for FD processing), resulting in correlation-function (xcorr(FFTi,FFTj)),showing frequency-shifts at which FFTi and FFTj are more similar (best frequency-shifts) or more different (worst frequency-shifts).The cross-correlation of the 3rd data type (2D Spectrogram/scalogram) is performedfor each pair of sensors (i and j), their Spectrograms/scalograms (Si and Sj) are cross-correlated in 2D (for TDOA and FD processing), resulting in correlation-images

(xcorr(Si,Sj)), showing 2D shifts (2-component vectors DIJ) at which Si and Sj aremore similar (best shifts) or more different (worst shifts).

Page 39: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

8. PATENT2 DESCRIPTION: THE COMPLETE ALGORITHM DETAILS 39

8.2 Analysis of maximums (local peaks) in 3 data-typescross-correlations, resulting in calculation of 3 types ofTDOAs and FDs

Local peaks of cross-correlation (maximums, surrounded by lower values) correspondto estimations for TDOA(Time difference of arrival for the recorded sound) andFD(Frequency difference, caused by the Doppler effect).

Let us denote the maximums (local peaks) in cross-correlation of the 1st datatype (1D temporal signal) as TDOA1, the maximums in cross-correlation of the 2nddata type (1D spectrum) as FD2, whereas the local peaks in cross-correlation ofthe 3rd data type (2D spectrograms/scalograms) as TDOA3 and FD3. In this 3rdcase, the shift in horizontal axis (time), providing maximum of cross-correlation,correspond to the most probable TDOA3 to these sensors. The shift in verticalaxis (frequency), providing maximum of cross-correlation, correspond to the mostprobable FD3 in these sensors(frequency shift because of Doppler effect).

Refinement of TDOA and FD with transitivity constrains (minimi-sation of global error) Selecting the coherent TDOA and FD, those satisfy thetransition principle of the TDOA and FD, formulated as minimisation of the leastmean-square error over 2n(n-3) equations:n(n-3) equations: TDOA(i,i+1) = TDOA(ibeg,iend)andn(n-3) equations: FD(i,i+1) = FD(ibeg,iend)

where n is a number of sensors, 2 ≤ m ≤ n− 2 and summation is over i: 1 ≤ i ≤ mThe TDOAs, FDs, which do not provide the allowadable least mean-square errorover these 2n(n-3) equations are removed from the TDOAs, FDs sets. This is truefor each of 3 types of TDOAs and FDs: TDOA1, FD2, TDOA3 and FD3.

Relation between TDOA and FD The Relation between TDOA and FD(each of 3 types of TDOAs and FDs) can be derived from the physical laws of batmovement.Bat positions: x1, x2, x3, ...Sensors positions: xs1, xs2, xs3, ...Bat movement: xi+1 − xi = vi · δtiwhere δti = ti+1 − tiSubtracting and adding xs1 results in(xi+1 − xs1)− (xi − xs1) = vi · δtiSubtracting and adding xs2 results in

Page 40: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

40

(xi+1 − xs2)− (xi − xs2) = vi · δtiHere (xi+1 − xsj) and (xi − xsj) are distances to sensor sj in moments ti+1 and ticorrespondinglyProjecting on the vectors xi+1 − xsj and xi − xsj results inPR(xi+1 − xs1) = PR(xi − xs1) + δti · Vi,s1

andPR(xi+1 − xs2) = PR(xi − xs2) + δti · Vi,s2

where Vi,sj is the velocity of approach to the sensor sj.In other words, the velocity of approach Vi,sj to the sensor sj, multiplies by the timestep ti+1−ti, reults in the difference of distance to the sensor sj in the time momentsti+1 and ti correspondingly (these distances are PR(xi+1 − xs1) and PR(xi − xs1)correspondingly).

Subtracting these equation and using Doppler effect formula, resiults in

FDi,s1s2

fcentral=

TDOAi+1,s1s2−TDOAi,s1s2

δti

Or, denoting fcentral

δtias ratioFrDti, we have

FDi,s1s2 = ratioFrDti · (TDOAi+1,s1s2 − TDOAi,s1s2) (1)

The Relation between TDOA and FD is true for each of 3 types of TDOAs andFDs: TDOA1, FD2, TDOA3 and FD3.

Connection between different TDOAs and FDs: TDOA1, FD2, TDOA3and FD3 As we have 3 types of TDOAs and FDs, the transitivity constrains,described in the previous section, take the form:

FDki,s1s2 = ratioFrDti · (TDOAhi+1,s1s2 − TDOAhi,s1s2)where 1 ≤ k ≤ 3, 1 ≤ h ≤ 3, and h = k.

The equality of quantities, received from the different data types result in:TDOA1 = TDOA3andFD2 = FD3 .

The equality above is understood as equality of the sets. These equations, togetherwith transitivity constrains for each data type

Page 41: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

8. PATENT2 DESCRIPTION: THE COMPLETE ALGORITHM DETAILS 41

∑TDOAk(i, i+ 1) = TDOAk(ibeg, iend) ,∑FDk(i, i+ 1) = FDk(ibeg, iend) ,

(where k = 1, 3 for TDOAs and k = 2, 3 for FDs), form the complete system ofequations.

These equations interconnect all the 3 datatypes.

8.3 Combination of the transitivity equations into proce-dure of optimization the TDOAs and FDs set

Combination (also named early fusion) of the transitivity equations

Here we choose err(N), depending on the amount N best maximums (TDOAs,FDs) that we plan to leave from the total number of maximums (N TDOAs, N FDs)so that exactly the specified percentage of TDOAs will satisfy the correspondingequation.

Let us take the the 4 sensors case. The system of TD-coherence-equations(TDOA refinment) can be satisfied with some error RTD:

R2TD = (TDOAijm + TDOAjkm − TDOAikm)2 + (TDOAijm + TDOAjhm −

TDOAihm)2+(TDOAikm+TDOAkhm−TDOAihm)2+(TDOAjkm+TDOAkhm−TDOAjhm)2

The system of FD-coherence-equations (Doppler effect refinment) can be satisfiedwith some error RFD:

R2FD = (FDijm+FDjkm−FDikm)2+(FDijm+FDjhm−FDihm)2+(FDikm+

FDkhm− FDihm)2 + (FDjkm+ FDkhm− FDjhm)2

The system of (TDOA1− TDOA3)2 = err(N) can be satisfied with some errorR13:R2

13 =∑

(TDOA1(i1, j1)− TDOA3(i3, j3))2

The distance (TDOA1 − TDOA3)2 is the maximum-set-distance, resulting in theelimination of element from TDOA1 set if it is too far from all the elements ofTDOA3 set.

Page 42: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

42

The system of (FD2− FD3)2 = err(N) can be satisfied with some error R23:R2

23 =∑

(FD1(i1, j1)− FD3(i3, j3))2

The distance (FD2− FD3)2 is the maximum-set-distance, reulting in the elimina-tion of element from FD2 set if it is too far from all the elements of FD3 set.

The system of relations TDOAs and FDs can be satisfied with some error RTF :

R2TF =

∑(FDki,s1s2 − ratioFrDti · (TDOAhi+1,s1s2 − TDOAhi,s1s2))

2 .

In order to combine the errors into a single measure of accuracy (perform earlyfusion), we need all errors to have the same units. In our case, R23, R13 and RTD

have units of seconds, where as RFD and RTF have units of Hz. To make bothtypes of variables unitless, it is necessary to divide them either by some character-istic constant, either by their mean value to make them relavtive errors of the formδV alue/V alue instead of absolute errors of the form V alue.

We are using the 1st method of division by characteristic constant ratioFrDtiused in the equation, connecting FD and TDOA:FDki,s1s2 − ratioFrDti · (TDOAhi+1,s1s2 − TDOAhi,s1s2) .In case of the frequency units (RFD and RTF ) we leave them as is, with frequencyunits. In case of the time units (R23, R13 and RTD) we multiply by the ratioFrDti.

Division by characteristic constants provides us errors with the same units:RunitsTD = RTD · ratioFrDti, RunitsFD = RFD, Runits13 = R13 · ratioFrDti,Runits23 = R23 · ratioFrDti, RunitsTF = RTF .Combining the errorsRunitsTD, RunitsFD, Runits13, Runits23, RunitsTF with someweights wTD, wFD, w13, w23, wTF , we have:

RunitsTOTAL = wTD ·RunitsTD+wFD ·RunitsFD+w13 ·Runits13+w23 ·Runits23+wTF ·RunitsTF .

The weights wTD, wFD, w13, w23, wTF may be chosen according to the what is moreimportant in the given system of recording and can be optimised to minimize theRunitsTOTAL.In case of treatment of different sound-sources with different frequency, ratioFrDtidepends on the frequency: ratioFrDti = ratioFrDti(FRbat). In this case whileusing combination of errors of the transitivity equations, it is necessary to sum over

Page 43: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

8. PATENT2 DESCRIPTION: THE COMPLETE ALGORITHM DETAILS 43

all frequency bands allFRbat:∑

t∈allFRbat RunitsTOTAL(iFRbat), where iFRbat isthe i-th frequency band. The another summation is over all time segments T :∑

t∈T RunitsTOTAL(t).The optimisation of weights wTD, wFD, w13, w23, wTF is done with a constrain wTD+wFD +w13 +w23 +wTF = 1 and is performed to minimise the error RunitsTOTAL insome period T, covering at least one complete call of the animal (for the bat, thiscould be around 2 seconds) .∑

t∈allFRbat

∑t∈T RunitsTOTAL(t, iFRbat) =

∑t∈allFRbat(

∑t∈T wTD · RunitsTD(t) +

wFD ·RunitsFD(t) + w13 ·Runits13(t) + w23 ·Runits23(t) + wTF ·RunitsTF (t))

Intersection (also named late fusion) of the transitivity equations An-other, alternative way of simultaneous satisfying the TD-coherence, FD-coherenceequations is their intersection. In this case we satisfy the 3 systems separately withseparate tolerances RTD, RFD:R2

TD > (TDOAijm + TDOAjkm − TDOAikm)2 + (TDOAijm + TDOAjhm −TDOAihm)2+(TDOAikm+TDOAkhm−TDOAihm)2+(TDOAjkm+TDOAkhm−TDOAjhm)2

R2FD > (FDijm+FDjkm−FDikm)2+(FDijm+FDjhm−FDihm)2+(FDikm+

FDkhm− FDihm)2 + (FDjkm+ FDkhm− FDjhm)2

R213 > (

∑(TDOA1(i1, j1)− TDOA3(i3, j3))2)

R223 > (

∑(FD1(i1, j)− FD3(i3, j3))2)

R2TF > (

∑(FDki,s1s2 − ratioFrDti · (TDOAhi+1,s1s2 − TDOAhi,s1s2))

2

The intersection of these solutions will give us the solution, satisfying all theconditions.

8.4 Equations for reconstruction of missing TDOAs fromFDs

Using the connection between TDOA and FD from the previous section:FDki,s1s2 = ratioFrDti · (TDOAhi+1,s1s2 − TDOAhi,s1s2)and expressing TDOAi+1,s1s2, we have: TDOAi+1,s1s2 = TDOAi,s1s2+FDi,s1s2/ratioFrDtiIt is easy to show also the relation for i − 1: TDOAi−1,s1s2 = TDOAi,s1s2 −FDi,s1s2/ratioFrDti

These equations for TDOAi+1,s1s2 and TDOAi−1,s1s2 from TDOAi,s1s2 and FDi,s1s2

Page 44: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

44

is true for each of 3 types of TDOAs and FDs: TDOA1, FD2, TDOA3 and FD3.

They allow to reconstruct the missing TDOAs, using the neighboring values ofFD.

In short, the velocity information can be derived from the relation betweenTDOA and FD, shown earlier.This relation has the following formc(fcentral) · TDOAi+1,s1s2 − c(fcentral) · TDOAi,s1s2 = δti · FDi,s1s2 · c(fcentral)/fcentraland, from the previous moment in time c(fcentral)·TDOAi,s1s2−c(fcentral)·TDOAi−1,s1s2 =δti−1 · FDi−1,s1s2 · c(fcentral)/fcentral

Assuming the constant time-step δti−1 = δti = δti+1 and resolving both equa-tions in relation to the c(fcentral) · TDOAi+1,s1s2 and c(fcentral) · TDOAi−1,s1s2 cor-respondingly, we have the following equations:

TDOAi+1,s1s2 = TDOAi,s1s2+δti·FDi+1,s1s2/fcentralTDOAi−1,s1s2 = TDOAi,s1s2−δti·FDi−1,s1s2/fcentral(2)

These equations allow to reconstruct the absent temporal information TDOAi+1,s1s2

and TDOAi−1,s1s2 in case that we have frequency-information FDi+1,s1s2 and FDi−1,s1s2

in the corresponding moment of time.

The section 9 shows the results of reconstruction the absent TDOAs using FD.

8.5 Description of the algorithm flow-chart

1) Calculating Spectrogram/scalogram of arrived sound to each sensor (microphone)

2) Signal-stressing and noise-suppression in Spectrogram/scalogram. For example,hunting bat emits high-frequency clicks, appearing as vertical lines in a Spectro-gram/scalogram. Accordingly, line-detection in Spectrogram/scalogram can be per-formed to stress hunting bat sounds and suppress other sounds. This step allowsto stress clicks (verical lines in Spectrogram/scalogram). To stress the verical lines,the second-derivative over the horizontal axis is applied over the image of a Spec-trogram/scalogram.

3) Cross-correlation between Spectrograms/scalograms for TDOA and FD process-ing. For each pair of sensors, their Spectrograms/scalograms are cross-correlated in2D (for TDOA and FD processing), resulting in correlation-images, showing shifts

Page 45: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

8. PATENT2 DESCRIPTION: THE COMPLETE ALGORITHM DETAILS 45

at which Spectrograms/scalograms are more similar (best shifts) or more different(worst shifts).

4) Analysis of maximums in Cross-correlation images, resulting in calculation ofTDOA and FDMaximums of cross-correlation correspond to estimations for TDOA(Timedifference of arrival for the recorded sound) and FD(Frequency difference, causedby the Doppler effect): The shift in horizontal axis (time), providing maximum ofcross-correlation, correspond to the most probable TDOA to these sensors. The shiftin vertical axis (frequency), providing maximum of cross-correlation, correspond tothe most probable FD in these sensors(frequency shift because of Doppler effect).

5) TDOA-algorithm: refinement of TDOA with patented formulas.

Selecting the coherent TDOA, those satisfy the transition principle of the TDOA, aswell as satisfy the system of 3n(n-3) equations: n(n-3) equations: TDOA(i, i+1) =TDOA(ibeg, iend)± errIf these equations are not satisfied with the chosen accuracy err, then correspondingTDOAs are removed from the TDOA sets.For example, in case of 4 microphones the equations become:TDOAij + TDOAjk = TDOAik ± errTDOAij + TDOAjh = TDOAih± errTDOAik + TDOAkh = TDOAih± errTDOAjk + TDOAkh = TDOAjh± err

6) TDOA-FDOA-algorithm: refinement of TDOA and FD with patented formu-las, described in a section .

Selecting the coherent TDOA and FD, those satisfy the transition principle of theTDOA and FD, as well as satisfy the system of 3n(n-3) equations: n(n-3) equations:TDOA(i, i + 1) = TDOA(ibeg, iend) ± err and n(n-3) equations: FD(i, i + 1) =FD(ibeg, iend)±err where n is a number of sensors, 2 ≤ m ≤ n−2 and summationis over i: 1 ≤ i ≤ mIf these equations are not satisfied with the chosen accuracy err, then correspondingTDOAs and FDs are removed from the TDOAs, FDs sets.For example, in case of 4 microphones the equations become:TDOAij + TDOAjk = TDOAik ± errTDOAij + TDOAjh = TDOAih± errTDOAik + TDOAkh = TDOAih± err

Page 46: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

46

TDOAjk + TDOAkh = TDOAjh± err

FDij + FDjk = FDik ± errFDij + FDjh = FDih± errFDik + FDkh = FDih± errFDjk + FDkh = FDjh± err

Writing these equations for the all 3 data types and adding above-mentioned re-lations between different data types, we have:FDki,s1s2 = ratioFrDti · (TDOAhi+1,s1s2 − TDOAhi,s1s2)± errTDOA1 = TDOA3± errFD2 = FD3± err∑

TDOAk(i, i+ 1) = TDOAk(ibeg, iend)± err∑FDk(i, i+ 1) = FDk(ibeg, iend)± err

where 1 ≤ k ≤ 3, 1 ≤ h ≤ 3, and h = k.

7) Reconstruction of missing TDOAs from FDs, described in a section .

8) Possible smoothing TDOA(t) and FD(t) using outlier removal process, withthresholds, corresponing to allowable positions and velocity changes.Tracking, reconstruction of trajectory using refined and smoothed TDOA(t) andFD(t) data.

Page 47: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

9. PATENT2 RESULTS: NEWFEATURE: TDOA CORRECTION BY TDOA-FD RELATION47

Figure 22: The typical recorded bat-signal (Myop species)

0 0.5 1 1.5 2 2.5 3 3.5 4−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time, s

Rec

ordi

ng a

mpl

itude

9 PATENT2 results: new feature: TDOA correc-

tion by TDOA-FD relation

The Figure 22 shows the typical recorded bat-signal (Myop species). It representsthe 1st data type (1D temporal signal). Calculated 1D spectrum of arrived soundto each sensor (microphone) is shown in the Figure 23 shows the spectrum of thisbat-signal. This is the case of the 2nd data type (1D spectrum), the FFT of signalarrived sound to each sensor (microphone) is performed. Calculating the 3rd datatype, spectrogram/scalogram of arrived sound to each sensor (microphone) is shownin the Figure 24, showing the Spectrogram of a recorded bat-signal, from a figure22.

The figures 25, 26 and 27 show the original TDOA trajectories of recordingsnamed sf221250, sm214708 and sm214708 with missing TDOA points (solid curves),as well as trajectories with adding missing TDOA points using velocity informationfrom all the sources which are consistent with each-other. The sources are spectrum,spectrogram and enhanced spectrogram of abovementioned recordings. It is visible,that, for this example, using enhanced spectrogram is better, since it adds additionalTDOA point at the end of TDOA trajectory.

Page 48: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

48

Figure 23: The typical spectrum of bat-signal (Myop species)

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

x 10�3 AmplitudeAtTime1075ms micro2 with average

kHz

am

plit

ude

Amplitude

Average

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

4

x 10�3 AmplitudeAtTime1075ms micro4 with average

kHz

am

plit

ude

Amplitude

Average

0 10 20 30 40 50 60 70 80 90 1000

1

2

3

x 10�3 AmplitudeAtTime1075ms microDIF24 with average

kHz

am

plit

ude

Amplitude

Average

Figure 24: The typical Spectrogram of bat-signal (Myop species)

Page 49: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

9. PATENT2 RESULTS: NEWFEATURE: TDOA CORRECTION BY TDOA-FD RELATION49

Figure 25: The correction of TDOA trajectory with TDOA-FD equation onsf221250 recording. New added TDOAs are shown in dotted lines.

1 2 3 4 5 6 7 8 9 105

4

3

2

1

0

1

2

3

time moment, s*0.3

TD

OA

,ms

TDOAs of our results

TDOA(mic1 mic2)

TDOA(mic1 mic3)

TDOA(mic1 mic4)

TDOA(mic2 mic3)

TDOA(mic2 mic4)

TDOA(mic3 mic4)

Page 50: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

50

Figure 26: The correction of TDOA trajectory with TDOA-FD equation onsg215151 recording. New added TDOAs are shown in dotted lines.

1 2 3 4 5 6 7 8 9 104

3

2

1

0

1

2

3

time moment, s*0.3

TD

OA

,ms

TDOAs of our results

TDOA(mic1 mic2)

TDOA(mic1 mic3)

TDOA(mic1 mic4)

TDOA(mic2 mic3)

TDOA(mic2 mic4)

TDOA(mic3 mic4)

Page 51: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

9. PATENT2 RESULTS: NEWFEATURE: TDOA CORRECTION BY TDOA-FD RELATION51

Figure 27: The correction of TDOA trajectory with TDOA-FD equation onsm214708 recording. New added TDOAs are shown in dotted lines.

1 2 3 4 5 6 7 8 9 105

4

3

2

1

0

1

2

time moment, s*0.3

TD

OA

,ms

TDOAs of our results

TDOA(mic1 mic2)

TDOA(mic1 mic3)

TDOA(mic1 mic4)

TDOA(mic2 mic3)

TDOA(mic2 mic4)

TDOA(mic3 mic4)

Page 52: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

52

The figures show that adding missing TDOA points is sufficiently shooth andthis reconstruction is consistent with the reality. For example, in recording sf221250the recostructed point in the trajectory of TDOA24 is below trajectory, which seemsnot smooth. But in the other trajectories of the triplet (TDOA12, TDOA14) thecorrespondiong point above trajectory, which is consistent with the recostructedpoint.

The figure 27 illustrate the correction of TDOA trajectory with TDOA-FD equa-tion on sm214708 recording (TDOA-FDOA-algorithm).

Page 53: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

9. PATENT2 RESULTS: NEWFEATURE: TDOA CORRECTION BY TDOA-FD RELATION53

Figure 28: The state of the art trajectory. The point 5 (shown as empty circle)was not reconstructed by state of the art, it was just interpolated.

9.1 Trajectories, recostructed using the TDOA and FD forany number of sensors - 3D pictures

The figures 28, 29 show reconstructed trajectories using state of the art TDOA andusing TDOA-FD correction.

9.2 Trajectories and time, elapsed by reconstruction, usingstate-of-the-art algorithm and using our TDOA-algorithm(patent1)

The table 1 shows the elapsed time of the solver on all reconstructed points usingstate-of-the-art algorithm and using our TDOA-algorithm (patent 2008).

Page 54: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

54

Figure 29: The trajectory, reconstructed using TDOA-FD correction. The point 5was not reconstructed by our algorithm (in difference to state of the art), as well asanother, second additional point 7 new it was reconstructed.

Page 55: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

9. PATENT2 RESULTS: NEWFEATURE: TDOA CORRECTION BY TDOA-FD RELATION55

Recording Elapsed time of state-of-the-art algorithm Elapsed time of TDOA-algorithmsg214653 0.15382 0.15062sg221641 0.11541 0.11457sm221439 0.086859 0.085453

Table 1: The elapsed time (seconds) of the state-of-the-art and our TDOA-algorithmon all reconstructed points

Page 56: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

56

Figure 30: The projection of the trajectories (baseline and our method) on ZX planewith norm of a solution residual of each reconstructed point. Recording O2225.

−0.2 −0.15 −0.1 −0.05 0 0.05 0.1 0.15−0.8

−0.7

−0.6

−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

34 56 7 8 9

12 34 56 7 8 910

resnorm=0.24941

resnorm=0.012857

o22

25

okT=80perc−V=1.429OUR MEANresnorm= 0.065(base) 0.057728(our)

3

45

6

7 8

91

2

3

4 56

7 8

910

baselineour

Recording Residual of baseline Residual of our TDOA-FDOA-algorithmp7Pkuhl 0.039505 0.036843o2225 0.065 0.057728

sf221250 0.050663 0.04023

Table 2: The residual (square norm) of the solver on all reconstructed points

9.3 Trajectories, recostructed using the TDOA and FD (TDOA-FDOA-algorithm) - projection pictures

The figures 30, 31 show different provections of reconstructed trajectories for record-ing O2225, using state-of-the-art algorithm and using our TDOA-FDOA-algorithm(our patent2). It can be seen, that our patent2 not only corrects existing trajectorypoints, but also adds new trajectory points (point 10).

The figures 32 and 33 show provection of reconstructed trajectories for recordingp7Pkuhl and sf221250, using state-of-the-art algorithm and using our TDOA-FDOA-algorithm (our patent2). It can be seen, that our patent2 corrects existing trajectorypoints, making it more smooth.

The table ?? shows the residual of the TDOA-FDOA-algorithm on all recon-structed points.

Page 57: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

9. PATENT2 RESULTS: NEWFEATURE: TDOA CORRECTION BY TDOA-FD RELATION57

Figure 31: The projection of the trajectories (baseline and our method) on ZY planewith norm of a solution residual of each reconstructed point. Recording O2225.

0 0.02 0.04 0.06 0.08 0.1 0.12 0.14−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

3 45 678 9123 45 678 910 resnorm=0.24941

resnorm=0.012857

o22

25

okT=80perc−V=1.429OUR MEANresnorm= 0.065(base) 0.057728(our)

3

45

6

78

9

1

2

3

45

6

78

9

10

baselineour

Figure 32: The projection of the trajectories (baseline and our method) on YX planewith norm of a solution residual of each reconstructed point. Recording p7Pkuhl.

−0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5−1.4

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

12345 6

71

2345 6

7

8 resnorm=0.12841

resnorm=0.0087249

p7PkuhlokT=80perc−V=1.429OUR MEANresnorm= 0.039505(base) 0.036843(our)

1

2

3

4

5

6

7

1

2

34

5

6

78

baselineour

Page 58: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

58

Figure 33: The projection of the trajectories (baseline and our method) on ZX planewith norm of a solution residual of each reconstructed point. Recording sf221250.

−2.5 −2 −1.5 −1 −0.5 0−1.4

−1.2

−1

−0.8

−0.6

−0.4

−0.2

0

3

45

678

9

10

2

3

45

6

78

9

10

resnorm=0.082495

resnorm=0.010769

sf221250okT=80perc−V=1.429OUR MEANresnorm= 0.050663(base) 0.04023(our)

34567

8

9

10

2

34567

8

910

baselineour

Recording Elapsed time of baseline Elapsed time of our TDOA-FDOA-algorithmp7Pkuhl 0.05005 0.046853o2225 0.037473 0.031836

sf221250 0.1224 0.07658

Table 3: The elapsed time (seconds) of the state-of-the-art and our TDOA-FDOA-algorithm on all reconstructed points

The table ?? shows the elapsed time of the TDOA-FDOA-algorithm on all re-constructed points.

Page 59: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

10. PATENT2 RESULTS: ASSESSMENTOF BATORIENTATION, POSITION ANDVELOCITY59

Figure 34: The residual norm in dependance on angle between flight directionand direction to the center of microphones-antenna. The 2 trends are shown: theoverall 2π trend from angle 0(flight towards antenna) to angle 2π(flight away fromantenna) shown in black, as well as partial π trends from angle 0(flight towardsantenna) to angle π(passing antenna) and from angle π(passing antenna) to angle2π((flight away from antenna) shown in grey(red in color version). These trends arein agreement with bats biology on the next picture.

0 0.5 1 1.5 2 2.5 3−0.2

0

0.2

0.4

0.6

0.8

1

1.2

angle

resi

duN

orm

10 PATENT2 results: assessment of bat orienta-

tion, position and velocity

The figure 34 show the dependance of the residual norm on the angle between flightdirection and direction to the center of microphones-antenna. This dependanceshows maximum of the residual when the microphones are at the side (left, right,up or bottom) of the bat and minimum of the residual when the microphones areat the back or at the front of the bat.This reflects the directionality of bat sound-amplitude. Based on this satistics,one may speculate that the front/back there are maximum/minimum of bat soundamplitude, whereas sides (left, right, up or bottom) are the maximums of gradi-ent of bat sound amplitude. The high gradient of bat sound amplitude leads tohigh difference in sound amplitude, registered by different microphones. The resultis increased difference between recordings of different microphones, leading to high

Page 60: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

60

Figure 35: The previous experiments on bats sound emmision and bats ear sensi-tivity in dependance on angle between flight direction and direction to the centerof microphones-antenna. The 2 trends are shown: the overall bats ear sensitivitytrend from angle 0(flight towards antenna) to angle 2π(flight away from antenna),as well as partial bats sound emmision trends from angle 0(flight towards antenna)to angle π(passing antenna) and from angle π(passing antenna) to angle 2π((flightaway from antenna). These trends are in agreement with our experiments on theprevious picture.

Page 61: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

10. PATENT2 RESULTS: ASSESSMENTOF BATORIENTATION, POSITION ANDVELOCITY61

Figure 36: The residual norm in dependance on distance to the center ofmicrophones-antenna. It is visible, that close-to microphones positions are resolvedmore accurately.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

1 111 1

99

9 99

99 9

1212 121212

1221 212121 2121 21212123 23232323232323

262626

26262626

262628 28

28

2828

28 28

29

29

29 2929

2929

29

29

3232

3232 32

32

3232

32

3333

333333 33

3333

3636

3636

36

3636 36

3737 38 3838 38

39

39

39

40404040

40

41

41

41

4141

41414141

4444

4444

444444 44

45

454545

474747 47

5151

5252

52 52 5252

5656

5656 56

56

5656

56

1 111 1

99

9 99

99 9

1212 121212

1221 212121 2121 21212123 23232323232323

262626

26262626

262628 28

28

2828

28 28

29

29

29 2929

2929

29

29

3232

3232 32

32

3232

32

33

33

333333

333333

33

3636

3636

36

3636 36

373738 38 38

38

38

38

39

39

39

40404040

40

41

41

41

4141

41414141

4444

4444

444444 44

45

454545

474747 47

5151

5252

52 52 5252

5656

5656 56

56

5656

56

distanceTOantenna

resi

duN

orm

error-rate in cross-correlation between different microphones and high TDOA-errors.

The figure 34 show 2 trends: the overall increase of residual from angle 0(flighttowards antenna) to angle 2π(flight away from antenna), as well as partial increasefrom angle 0(flight towards antenna) to angle π(passing antenna) and partial de-crease from angle π(passing antenna) to angle 2π((flight away from antenna).These treands are in agreement with measurements of bats sound emmision andsound receiving. Because bats sound emmision shows partial increase from angle0(flight towards antenna) to angle π(passing antenna) and partial decrease fromangle π(passing antenna) to angle 2π((flight away from antenna) - see figure 35.As well as sound receiving shows overall increase of sensitivity from angle 0(flighttowards antenna) to angle 2π(flight away from antenna).

The figure 36 show the dependance of the residual norm on the distance to thecenter of microphones-antenna. This dependance shows 2 regions. The 1st is theregion where distance to different microphones are very different (the region wherethe distance to the center of antenna is not much more than the size of antenna- the 0 to 1 meters distance). The 2nd is the region where distance to differentmicrophones is about the same (2,5 - 4 meters distance). As it may be expected,

Page 62: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

62

Figure 37: The residual of bat-location in dependance on distance to the center ofmicrophones-antenna. It is visible, that close-to microphones positions are resolvedmore accurately.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

11

1

1

1

9

9

9 9

9

9

9 912

12

12

1212

12

2121

21212121

2121

2123

232323

2323

2323

26

2626

26

2626

26

26

26

28

28

28

28

28

28 28

29

2929

29

29

29

29

29

29

32

32

32

32 32

32

323232

33

33

33

3333 3333333636

3636 36 36

36

36

37

3738

38

38 38

39

39

39

404040

40

40

41

41

41

4141

41414141

4444

44

4444

44

4444

45

45

4545

4747

4747

51

51

525252

52

5252

56

56

56

56 56

56

565656

11

1

1

1

9

9

9 9

9

9

9 912

12

12

1212

12

2121

21212121

2121

2123

232323

2323

2323

26

2626

26

2626

26

26

26

28

28

28

28

28

28 28

29

2929

29

29

29

29

29

29

32

32

32

32 32

32

323232

33

33

33

33

33

33

33

33

33

363636

36 36 36

36

36

37

37

3838

38

38

38

38

39

39

39

404040

40

40

41

41

41

4141

41414141

4444

44

4444

44

4444

45

45

4545

4747

4747

51

51

525252

52

5252

56

56

56

56 56

56

565656

distanceTOantenna

resi

duP

ositi

on

the location in 2nd region is more difficult and results in higher residual.The figure 37 shows the same dependance, but for the residual of bat-location. Asit can be seen, the difference in residuals between 1st and 2nd region is even moreobvious.

The figure 38 show the dependance of the time of trajectory reconstruction onthe distance to the center of microphones-antenna. This dependance shows that ittakes more time to localise bats at the edges (segment between 1 and 2,5 meters) ofthe microphones-antenna.This is probably due to the same reason as figure 34 shows higher residual in regionof high gradient of bat sound amplitude. In other regions, we see that localisationinside the microphones-antenna (0-1 meters) is a little-bit better than localisationfar outside the microphones-antenna (2,5-4,5 meters).

The figures 39 and 40 show the dependance of the frequency of sound, emmitedby bat on the velocity of the bat in our and previous experiments. The previousexperiments on frequency of sound, emmited by bat in dependance on velocity ofthe bat. The clear increase of frequency is visible with increase of velocity.This trend are still not visible in our experiments on the previous picture. This canbe because of different bats species involved. To investigate this effect further, it

Page 63: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

10. PATENT2 RESULTS: ASSESSMENTOF BATORIENTATION, POSITION ANDVELOCITY63

Figure 38: The time of trajectory reconstruction in dependance on distance to thecenter of microphones-antenna.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 50

0.05

0.1

0.15

0.2

0.25

0.3

0.35

1 1

1

1

1

999 99

99

9

12

1212

1212

12

21212121

21

21

21

2121

23

23

2323

23232323 26

2626

26

26

26

26

2626

2828

28

28

2828

28

29 29 2929

29

29

29

29

29

323232

32 323232

3232

33

33

33

33

3333

3333

3636363636 36

3636

37

37

38

3838

38

3939

39

40

40

40

4040

41

41

414141 41

41

41

41

44

444444

44

44

44

44

45

45

45

45 47

47

47

4751

51

52

52

52

52

5252

565656

56 565656

5656

11

1

1

1

999 99

99

9

12

1212

1212

1221

212121

21

21

21

212123

23

2323

232323

23 2626

2626

26

26

26

2626

28 28

2828

2828

28

29 29 2929

29

29

29

2929

323232

32 323232

3232

33

33

33

33

33

33

33

33

33

3636363636 36

3636

37

37

38

3838

38 3838

3939

39

40

40

40

4040

41

41

414141 41

41

41

41

444444

44

44

44

44 44

45

45

45

45 47

47

47

47

51

51

5252

52

52

5252 565656

56 565656

5656

distanceTOantenna

solv

erT

ime

will be necessary to compensate Doppler effect and different bat species. This willbe one of future research direction.Note, that In difference to clear correlation in angle-effects, this correlation canbe bat-behaviour-dependent, namely: this can be because the bat compensates forDoppler effect only if velocity is outside-generated (in previous experiments - whenbat sits on the pendulum), whereas if velocity is bat-generated (when bat flyes)the bat does not compensate for Doppler effect, caused by this velocity. We willinvesigae this in the future. If this effect will turn to be bat-behaviour-dependent,this will be an interesting finding in bat neurophysiology.

Page 64: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

64

Figure 39: The frequency of sound, emmited by bat in dependance on velocity ofthe bat. No clear trends are visible, in difference to previous experiments on thenext picture. This can be because of different bats species involved. To investigatethis effect further, it will be necessary to compensate Doppler effect and different batspecies. In difference to clear correlation in angle-effects, this correlation requiresmore investigation and will be one of future research direction.

0 0.5 1 1.5 2 2.5 325

30

35

40

45

50

55

60

angle

batfr

eq

Page 65: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

10. PATENT2 RESULTS: ASSESSMENTOF BATORIENTATION, POSITION ANDVELOCITY65

Figure 40: The previous experiments on frequency of sound, emmited by batin dependance on velocity of the bat. The clear decrease of frequency is visiblewith increase of velocity (during forward pendulum swing). This trend are still notvisible in our experiments on the previous picture. In difference to clear correlationin angle-effects, this correlation requires more investigation and will be one of futureresearch direction.

Page 66: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

66

11 PATENT2 conclusions and future work

This report presents the passive acoustics method capable of localisation of multiplemoving or stationary animals, emmiting sound in different frequency bands. Thismethod is useful forecological monitoring, such as estimating the quantity, biodiver-sity and habbits of night animals, such as bats, night insects, etc.

One of the main point of our future work can be adding the processing of cor-relation amplitude difference and signal amplitude attenuation difference for anynumber of sensors. The attenuation of signal amplitude depends on the distanceto the microphone, as well as on directionality of sound (often corresponding tosituation where animal is facing and approaching microphone or flying backwardsfrom it). This should be in correspondance with calculated velocity (and, there-fore, FDOA) and location (and, therefore, TDOA). Adding the amplitude modalitywill serve as a further refinement of data and more reliable localisation and trajec-tory reconstruction results. Another direction of our future work can be adding theprocessing of phase difference for any number of sensors.

Page 67: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

Bibliography

[1] H.Glotin, P.Giraudet, F.Caudal. Real-time robust method for determining thetrajectory of one or more cetaceans by means of passive acoustics, usinga laptop computer, EP2235558 B1,CA2697864A1, EP2235558A1, US8638641,US20100290316, WO2009066012A1, filed 3.09.2008, published 24.04.2013

[2] A.Mishchenko, H.Glotin, P.Giraudet. CONTRAINTES CONJOINTES DETRANSITIVITE DE DIFFERENCES TEMPORELLES ET EFFET DOPLERMULTIBANDES POUR LA SEPARATION, CARACTERISATION, ET LO-CALISATION DE SOURCES SONORES PAR ACOUSTIQUE PASSIVE, filed20.05.2014.

[3] G. C. Carter, Time delay estimation for passive sonar signal processing, IEEETrans. Acoust., Speech, Signal Processing, vol. ASSP-29, pp. 462470, June 1981.

[4] E. Weinstein, Optimal source localization and tracking from passive array mea-surements, IEEE Trans. Acoust., Speech, Signal Processing,vol. ASSP-30, pp.6976, Feb. 1982.

[5] B. Friedlander, A passive localization algorithm and its accuracy analysis, IEEEJ. Ocean Eng., vol. OE-12, pp. 234245, Jan. 1987.

[6] W. W. Smith Jr. and P. G. Steffes, Time delay techniques for satellite interferencelocation system, IEEE Trans. Aerosp. Elect. Syst., vol. 25, pp. 224230, Mar. 1989.

[7] Y. T. Chan and K. C. Ho, A simple and efficient estimator for hyperbolic loca-tion, IEEE Trans. Signal Processing, vol. 42, pp. 19051915, Aug.1994.

[8] C.L.Walters et all. A continental-scale tool for acoustic identification of Europeanbats. Journal of Applied Ecology 2012

67

Page 68: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

68 BIBLIOGRAPHY

[9] S. Das. Efficient calculation of Fisher information matrix: Monte Carlo approachusing prior information, Masters thesis, Department of Applied Mathematics andStatistics, The Johns Hopkins University, Baltimore, Maryland, USA, May 2007,http://dspace.library.jhu.edu/handle/1774.2/32459.

[10] J.C.Spall. CramerRao Bounds and Monte Carlo Calculation of the Fisher Infor-mation Matrix in Difficult Problems. Proceeding of the 2004 American ControlConference Boston, Massachusetts June 30 - July 2, 2004

[11] Sheng-Chih Chan, Kun-Chou Lee, Tsung-Nan Lin, Ming-Chung Fang. Under-water positioning by kernel principal component analysis based probabilisticapproach. Applied Acoustics 74 (2013) 11531159

[12] Paolo Annibale and Rudolf Rabenstein. ACOUSTIC SOURCE LOCALIZA-TION AND SPEED ESTIMATION BASED ON TIME-DIFFERENCES-OF-ARRIVAL UNDER TEMPERATURE VARIATIONS. 18th European SignalProcessing Conference (EUSIPCO-2010). Aalborg, Denmark, August 23-27,2010

[13] H. Staras and S. N. Honickman, The accuracy of vehicle location by trilaterationin a dense urban environment, IEEE Transaction on Vehicular Technology, vol.VT-21, no. 1, pp. 3844, February 1972.

[14] J. W. S. Turin. G. L and T. S. Johnston, Simulation of urban vehicle monitoringsystems, IEEE Transaction on Vehicular Technology, vol. VT-21, no. 1, pp. 916,February 1972.

[15] M. Hebert and S. Drulhe, Source localization for distributed robotic teams.Robotics Institute of Carnegie Mellon University, 2002.

[16] B. C. Dalton, Audio-based localisation for ubiquitous sensor networks, Mastersthesis, Massachusetts Institute of Technology, September 2005.

[17] A. J. E. Brandstein. M. S and H. F. Silverman, A closed form location estimatorfor use with room environment microphone arrays, IEEE Transactions on Speechand Audio Processing, vol. 5, no. 1, pp. 4550, 1997.

[18] M. Omologo and P. Svaizer, Acoustic event localization using a crosspower-spectrum phase based technique, Proceedings of IEEE International Conferenceon Acoustics, Speech, and Signal Processing (ICASSP94), vol. 2, pp. 273276,April 1994.

Page 69: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

BIBLIOGRAPHY 69

[19] M. M. P. Svaizer and M. Omologo, Acoustic source localization in a three- di-mensional space using crosspower spectrum phase. Proceedings of IEEE Interna-tional Conference on Acoustics, Speech, and Signal Processing (ICASSP97),1997.

[20] M. Omologo and P. Svaizer, Acoustic source localization in noisy and rever-berant environments using csp analysis, Proceedings of IEEE International Con-ference on Acoustics, Speech, and Signal Processing (ICASSP96), pp. 901904,1996.

[21] F. Gustafsson and F. Gunnarsson, Positioning using time-difference of arrivalmea- surements, Proceedings of IEEE International Conference on Acoustics,Speech, and Signal Processing (ICASSP2003), vol. VI, pp. 553556, 2003.

[22] Y. Yu and H. F. Silverman, An improved tdoa-based location estimation algo-rithm for large aperture microphone arrays, Proceedings of IEEE InternationalConference on Acoustics, Speech, and Signal Processing (ICASSP2004), vol. IV,pp. 7780, 2004.

[23] G. D. A. Xuehai Bian, James M. Rehg, Sound source localization in domesticenvi- ronment, GVU center, Georgia Inst. of Technology, 2004.

[24] P. Minero, State of the art on localization and beamforming of an acousticsource, June 21 2004, summary of Localization Techniques.

[25] T. G. Ulrich Klee and J. McDonough, Kalman filters for time delay of arrival-based source localization, EURASIP Journal on Applied Signal Processing, pp.115, 2006.

[26] G. C. Knapp. C. H., Carter, The generalized correlation method for estimationof time delay. IEEE Transactions on Acoustics, Speech and Signal Processing,vol. ASSP-24, no. 4, pp. 320327, August 1976.

[27] G. C. Carter, Coherence and time delay estimation, Proc. IEEE, vol. 75, pp.236 255, February 1991.

[28] J. Benesty, Adaptive eigenvalue decomposition algorithm for passive acousticsource localization, Bell Labs Tech. Memo., 1998.

[29] J. B. Yiteng Huang and G. W. Elko, Adaptive eigenvalue decomposition algo-rithm for realtime acoustic source localization system, IEEE, pp. 937940, 1999.

Page 70: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

70 BIBLIOGRAPHY

[30] J. H. DiBiase, A high-accuracy, low-latency technique for talker localization inrever- berant environments using microphone arrays, Ph.D. dissertation, BrownUniversity, May 2000.

[31] M. S. Brandstein, A framework for speech source localization using sen-sor arrays, Ph.D. dissertation, Brown University, Prividence, RI, USA, 1995,ph.D.thesis.

[32] Y. T. Chan, A simple and efficient estimator for hyperbolic location, IEEETrans. on Signal Processing, vol. 42, no. 8, pp. 19051915, August 1994.

[33] Y. T. Chan and K. C. Ho, An efficient closed-form localization solution fromtime difference of arrival measurements, IEEE, 1994.

[34] J. C. Schau and A. Z. Robinson, Passive source localization employing inter-secting spherical surfaces from time-of-arrival differences, IEEE Transactions onAcoustic, Speech, and Signal Processing, vol. 29, no. 4, pp. 984995, July 1989.

[35] J. O. Smith and J. S. Abel, Closed-form least-squares source location estima-tion from range-difference measurements, IEEE Trans. Acoust., Speech, SignalProcess- ing, vol. ASSP-35, no. 12, pp. 16611669, December 1987.

[36] J. S. Abel and J. O. Smith, The spherical interpolation method for closed-form passive localization using range difference measurements, Proc. ICASSP-87(Dallas, TX), pp. 471474, 1987.

[37] J. O. Smith and J. S. Abel, The spherical interpolation method for sourcelocaliza- tion, IEEE Journal of Oceanic Engineering, vol. OE-12, no. 1, pp.246252, January 1987.

[38] J. S. Abel and J. O. Smith, Source range and depth estimation from multipathrange difference measurements, IEEE Transaction on Acoustic, Speech, and Sig-nal Processing, vol. 37, no. 8, pp. 11571165, August 1989.

[39] B. M. H. Rabinkin. D. V, A dsp implementation of source location using mi-crophone arrays. Journal of Acoustical Society of America, vol. 99, no. 4, April1996.

[40] EKSLER, Time delay estimate method for detection of acoustic source location,in In Proceedings of 9th Conference and Competition STUDENT EEICT, vol.2. FEKT, 2003, pp. 216220.

Page 71: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

BIBLIOGRAPHY 71

[41] P. A. G. Bendat. J. S., Engineering Applications of Correlation and SpectralAnalysis. John Wiley and Sons, Inc., 1980.

[42] G. C. Carter, Time delay estimation for passive sonar signal processing, IEEETrans. Acoust., Speech, Signal Processing, vol. ASSP-29, no. 3, pp. 463470, June1981.

[43] B. T. Fang, Simple solutions for hyperbolic and related position fixes, IEEETrans. on Aerosp. Electron. Systems, vol. 26, no. 5, pp. 748753, September 1990.

[44] W. H. Foy, Position-location solutions by taylor-series estimation, IEEE Trans.Aerosp. Electron. Systems, vol. AES-12, no. 12, pp. 187194, March 1976.

[45] P. Mailloux, Phased Array Antenna Handbook. Artech House, 1994.

[46] D. Carevic, Tracking target in cluttered environment using multilateral time-delay measurements. The Journal of the Acoustical Society of America, 2003.

[47] C. L. G. Ferguson. B. G and L. K. W, Locating far-field impulsive sound sourcesin air by triangulation, Journal of Acoustical Society of America, 2002.

[48] R. O. Schmidt, A new approach to geometry of range difference location,IEEE Transactions on Aerospace and Electronic Systems, vol. AES-8, no. 6,pp. 821835, November 1972.

[49] G. W. E. Yiteng Huang, Jacob Benesty and R. M. Mersereau, Real-time pas-sive source localization: A practical linear-correction least squares approach.IEEE Transactions on Speech and Audio Processing, vol. 9, no. 8, November2001.

[50] J. S. Abel, A divide and conquer approach to least-squares estimation, IEEETrans- action on Aerospace and Electronic Systems, vol. 26, pp. 423427, March1990.

[51] J. B. Yiteng Huang and G. W. Elko, Passive acoustic source localiza-tion for video camera steering, Acoustics, Speech, and Signal Processing,2000.ICASSP00.Proceedings, vol. 2, 2000.

[52] W. R. Hahn and S. A. Tretter, Optimum processing for delay-vector estimationin passive signal arrays. IEEE Transaction in Information Theory, 1973.

Page 72: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

72 BIBLIOGRAPHY

[53] W. K. M. K. W. Cheung, H. C. So and Y. T. Chan, Least squares algorithms fortime-of-arrival-based mobile location, IEEE Transactions on Signal Processing,vol. 52, no. 4, pp. 11211128, April 2004.

[54] S. M. S. Bechler. D and K. Kroschel, System for robust 3d speaker trackingusing microphone array measurements, in Proc. 2004 IEEE/RSJ InternationalConference on Intelligent Robots and Systems, Sep 28 - Oct 2 2004, pp. 21172122.

[55] H. C. So and S. P. Hui, Constrained location algorithm using tdoa measure-ments, IEICE Trans. Fundamentals, vol. E86-A, no. 12, December 2003.

[56] W. R. P. H. F. Silverman and J. L. Flanagan., The huge microphone array(hma)- part i. IEEE Transactions on Concurrency, vol. 6, no. 4, pp. 3646,October- December 1998.

[57] , The huge microphone array (hma)-part ii. IEEE Transactions on Concur-rency, vol. 7, no. 1, pp. 3247, January-March 1999.

[58] A. A. Eugene Weinstein, Kenneth Steele and J. Glass, Loud: A 1020-nodemodu- lar microphone array and beamformer for intelligent computing spaces,MIT/LCS Technical Memo, 2004.

[59] CMOS Analog Multiplexers/Demultiplexers, Texas Instruments, June 2003,data Sheet.

[60] W. T. V. W. H. Press, S. A. Teukolsky and B. P. Flannery, Numerical Recipesin C. Cambridge University Press, New York, 1992.

[61] B. Friedlander, A passive localization algorithm and its accuracy analysis, IEEEJ. Ocean Eng., vol. OE-12, pp. 234245, January 1987.

[62] Robert MacCurdy, Rich Gabrielson, Eric Spaulding, Alejandro Purgue,Kathryn Cortopassi. Automatic Animal Tracking Using Matched Filters andTime Difference of Arrival. JOURNAL OF COMMUNICATIONS, VOL. 4, NO.7, AUGUST 2009

[63] Cynthia F. Moss, Chen Chiu and Annemarie Surlykke. Adaptive vocal behav-ior drives perception by echolocation in bats. Current Opinion in Neurobiology,2011,21:645652(pdf)

Page 73: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

BIBLIOGRAPHY 73

[64] Yossi Yovel, Ben Falk, Cynthia F. Moss, Nachum Ulanovsky. Active Controlof Acoustic Field-of-View in a Biosonar System. PLoS Biology, September 2011,Volume 9, Issue 9, e1001150(pdf)

Page 74: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

74 BIBLIOGRAPHY

12 APPENDIX1: Statistics (Likehood, Fisher in-

formation, CramerRao bound)

12.1 The method of using statistical measures to analysedata

To analyse real-world and simulated data, it is possible to use different statisticalmeasures to analyse the amount of useful information in measured data ([9], [10]).

The likelihood of the set of parameter values given the observed outcomes is theprobability of some observed outcomes given a set of parameter values.

In our case, the parameter values are unobservable coordinates and velocitiers ofthe bat, while observed outcomes are raw sound or preprocessed sound recordings.It is convinient to use spectrogram of a recorded sound as observed outcome. Tocalculate the likelihood it is necessary to have a statistically significant number ofrecordings with corresponding bat trajectory (with corresponding coordinates andvelocitiers of the bat). In reality, we do not have trajectories and the number ofavailable recordings is very small. However, it is possible to create artificial spectro-grams to create artificial likelihood function. This will not describe the quality of asystem, but can be used to analyse some papameters of the recording system, suchas the distance between microphones.

The Fisher information ([9]) is a way of measuring the amount of informationthat an observable spectrograms carry about an unknown coordinates and velocitiersupon which the probability of spectrograms depends.

CramerRao bound (CRB [10]) states that the variance of any unbiased estima-tor θ of unobservable parameters θ is at least as high as the inverse of the Fisherinformation I(θ).In our case, Fisher information Matrix is to estimate the unobservable coordinatesand velocitiers (parameters θ are v(t1), v(t2), ..., v(tn), x(t1), x(t2), ..., x(tn)) from aset of observed data set (spectrograms Si(tj), where 1 ≤ i ≤ Nsensors,1 ≤ j ≤NTimeMoments).The Fisher information measures the amount of information that an observable ran-dom variable Si(tj) carries about an unknown parameters x(tj), v(tj). To calculateFisher information Matrix it is necessary to calculate the likelihood function (prob-ability density) of Si(tj) conditional on the value of x(tj), v(tj).For each time moment tj, 1 ≤ j ≤ NTimeMoments, we have to estimate unknown co-

ordinate and velocity x, v from observed spectrograms Si, 1 ≤ i ≤ Nsensors

Page 75: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

12. APPENDIX1: STATISTICS (LIKEHOOD, FISHER INFORMATION, CRAMERRAO BOUND)75

Figure 41: The scheme of calculating Fisher information (FIM) and CramerRaobound (CRB), from [10]

Likelihood function in our case takes the form: l(x, v|Si). The log-likelihood func-tion is the natural logarithm:L(x, v|Si) = ln(l(x, v|Si))To calculate Fisher information let us define the gradient vector g

g(x, v|Si) =dL(x,v|Si)

d(x;v)= dL(θ|Si)

and the Hessian matrixH(x, v|Si) =

d2L(x,v|Si)d(x;v)d(x;v)T

= dL(θ|Si)dθ

When the Fisher information matrix (F (θ) = F (x, v)) takes the form:F (x, v) = E[g(x, v|Si) · gT (x, v|Si)|x, v] = −E[H(x, v|Si)|x, v]

As it was mentioned above, we do not have trajectories for available recordings.In this conditions, we can not use statistical measures (Likelihood, Fisher informa-tion, CramerRao bound) to describe the quality of our recording system. However,we can use Likelihood function to analyse which distance between microphones pro-vide good localisation for a given properties of sound (spectral properties, soundvelocity and typical distance to the bat). This will be decribed in details below.

12.2 Notes on material from later-described patent 1 (con-clusions on geometry of antena, based on patent1)

Pseudorecordings shown above were with 4 sensors made in a wide-spaced grid (10-20m). The real recordings were made with narrow-spaced grid(4 sensors, placed

Page 76: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

76 BIBLIOGRAPHY

Figure 42: 2m-grid Likelihood function of coordinates, resulting from low errorspectrogram (Myosp recording). Each line consists from 4 spectrograms, receivedby 4 sensors, followed by resulting likelihood function (coordinates estimation). It isvisible, that likelihood function is not very concentrated - it is not easy to determinewhere the bat is likely to be at this moment. Corresponding results with wide-spacedgrid, shown in previous sections, were better.

Page 77: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

12. APPENDIX1: STATISTICS (LIKEHOOD, FISHER INFORMATION, CRAMERRAO BOUND)77

Figure 43: 2m-grid Likelihood function of velocities, resulting from low error spec-trogram (Myosp recording). Each line consists from 4 spectrograms, received by 4

sensors, followed by resulting likelihood function (velocities V = Vx, Vy estimation).Wide-spaced grid was better.

Page 78: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

78 BIBLIOGRAPHY

Figure 44: 60cm-grid Likelihood function of coordinates, resulting from high er-ror spectrogram (Myosp recording). It is visible, that likelihood function is verywidespread - it is impossible to determine where the bat is likely to be at this mo-ment. Results with wide-spaced grid, shown in previous sections, were much better.

Page 79: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

12. APPENDIX1: STATISTICS (LIKEHOOD, FISHER INFORMATION, CRAMERRAO BOUND)79

Figure 45: 60cm-grid Likelihood function of velocities, resulting from high errorspectrogram (Myosp recording). Each line consists from 4 spectrograms, received by

4 sensors, followed by resulting likelihood function (velocities V = Vx, Vy estimation).Corresponding results with wide-spaced grid, shown in previous sections, were muchbetter.

Page 80: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

80 BIBLIOGRAPHY

into small 60cm-pyramid). As it is seen from above, wide-spaced grid provide goodLikelihood function: very highly concentated Likelihood function in case of low errorspectrogram (figures 48,49) and suffisiently concentated Likelihood function in caseof more realistic high error spectrogram (figures 50,51).Simulations of Pseudorecordings on the existing narrow-spaced grid used for realrecordings provide much worse Likelihood function. The resulting Likelihood func-tion (from narrow-spaced grid) are shown in the following figures 42,43, 44,45.

Page 81: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

13. APPENDIX2: ARTIFICIAL SIMULATIONS SHOWING IMPROVEMENTS OF OURMETHODS81

13 APPENDIX2: Artificial simulations showing

improvements of our methods

13.1 The numerical demonstration of the proposed claims

Based on the physics of sound, acoustical properties (properties of emmitted sounds),physical properties (natural bounds and statistical properties of velocity and trajec-tory of flying animals), the model of bat tracking includes the folowing.

Flying object. In the following simulations, object is flying in the XY plane(for better illustration).

Sensors. Here 4 virtual sensors were used, placed at the 4 angles of a squarein the XY plane.

Emitting sound. In the following results, transformations of real-world batsound were used. Transformation includes frequency-shifts, time-shifts, croppingand glueing of parts, addition of noise. The detailed procedure of transfomation isas follows: The real-world bat sound (figure ??) is transformed into the spectrogram(figure 1), which is divided into subperiods (subspectrograms), those size correspondto typical distance between bat clicks. These subspectrograms are transformed dif-ferently for 4 different sensors. These different transformations include horisontalshift to simulate TDOA from the current bat-position to different sensors, as wellas vertical shift to simulate FD (Doppler effect) according to current bat-velocitywith respect to different sensors. This detailed procedure is used to estimate thelikehood function (see sections below). The simplified procedure of transfomationinclude just the information about TDOA and FD, without any information of realemitted sound. This simplified procedure is used to simulate the trajectory, as wellas TDOA and FD, corresponding to positions and velocities.

Results of simulation

Results of simulation with 4 sensors, placed at the angles of a square, are shownon the pictures (figures ??,??,??). These pictures show the simulation of the flying

Page 82: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

82 BIBLIOGRAPHY

object (the bat), starting the movement from the center (marked by cross) andperforming stohastic motion near existing 4 sensors (shown at the corners of thepicture).The flying object (bat) constantly emits sound, whose propagation is simulated bytaking into account TDOA and FD, corresponding to positions and velocities of thebat. The transformed by TDOA and FD sound is registered by 4 sensors.The difference of time of sound-arrival to each pair of sensors is calculated accordingpositions of the bat and is shown in-between each pair of sensors (TDOA in ms).Also, nearby to TDOA, the difference of frequency of sound, registered by each pairof sensors is shown (FD in Hz).In the middle of the picture, the sum of all 4 TDOAs and FDODs are shown. Itis visible that both sums are close to zero, which supports the theoretical proofthat sum of TDOAs=0 (used for TDOA selector in Glotin-Giraudet [1]), as well assupports the theoretical proof that sum of FDODs=0 (shown on a separate page).

Generating pseudomeasurements

Calculation of Likelihood function L(x, v and subsequent Fisher information matrixF (x, v) is possible either analytically or using large amount of data.To calculate L(x, v and subsequently F (x, v) by Monte Carlo methods, many record-ings are necessary. As we have only 7 recordings by 4 microphones, it is necessaryto use mathematical model to generate large amount of data.Generating pseudomeasurements is done with mathematical model described earlier.Flying object is described in a single point of trajectory in the XY plane. 4 sensorswere used, placed at the angles of a square in the XY plane. Object (bat) is situatedinside this square, divided into 7x7 grid. Velocities of the object are measured alsoonto the 2D grid, corresponding to Vx, Vy having 6x6 nodes of measurements.Emitting sound in the following results are made by transformation of the real-worldbat sound (frequency-shifts, time-shifts, cropping and glueing of parts, addition ofnoise). The detailed procedure of transfomation is as follows: The real-world batsound (figure ??) is transformed into the spectrogram (figure 1), which is dividedinto subperiods (subspectrograms), those size correspond to typical distance be-tween bat clicks. These subspectrograms are transformed differently for 4 differentsensors. These different transformations include horisontal shift to simulate TDOAfrom the current bat-position to different sensors, as well as vertical shift to simu-late FD (Doppler effect) according to current bat-velocity with respect to differentsensors.

Page 83: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

13. APPENDIX2: ARTIFICIAL SIMULATIONS SHOWING IMPROVEMENTS OF OURMETHODS83

Figure 46: Spectrograms with high error potential of sensor1 pseudorecordings.Choice of 4 spectrograms from this set determines pseudomeasurements of 4 sensorsand, therefore, estimation of hidden parameters x, v

Figure 47: Spectrograms with low error potential of sensor1 pseudorecordings.Choice of 4 spectrograms from this set determines pseudomeasurements of 4 sensorsand, therefore, estimation of hidden parameters x, v

The resulting spectrograms are shown in the following figures.

In figures 46,47 two variants of transformation of the real-world bat sound isused. Figure 47 shows frequency-shift and time-shift, surrounded by noise. Thisprovides the lowest possible error and most ”concentrated” likehood function. Fig-ure 46 shows frequency-shift and time-shift, surrounded by similar patterns. Thisprovides the highest possible error and most ”wide-spread” likehood function. Thelatter pseudomeasurements are more close to real measurements.

Calculation the likehood function

The first step to estimate parameters x, v is seeking and estimating the likelihoodby Monte Carlo methods. In our case (complicated statistical model) likelihoodfunction can only be approximated by Monte Carlo methods using generated pseu-domeasurements.The resulting likelihood functions are shown in the following figures 48,49,50,51.

Page 84: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

84 BIBLIOGRAPHY

Figure 48: Likelihood function of coordinates, resulting from low error spectrogram(Myosp recording). Each line consists from 4 spectrograms, received by 4 sensors,followed by resulting likelihood function (coordinates estimation). It is visible, thatlikelihood function has big maximum (black spot), where the bat is likely to be atthis moment

Page 85: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

13. APPENDIX2: ARTIFICIAL SIMULATIONS SHOWING IMPROVEMENTS OF OURMETHODS85

Figure 49: Likelihood function of velocities, resulting from low error spectrogram(Myosp recording). Each line consists from 4 spectrograms, received by 4 sensors,

followed by resulting likelihood function (velocities V = Vx, Vy estimation). It isvisible, that likelihood function has big maximum (black spot), corresponding to

the velocity V = Vx, Vy of the bat.

Page 86: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

86 BIBLIOGRAPHY

Figure 50: Likelihood function of coordinates, resulting from high error spectrogram(Myosp recording). Each line consists from 4 spectrograms, received by 4 sensors,followed by resulting likelihood function (coordinates estimation)

Page 87: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

13. APPENDIX2: ARTIFICIAL SIMULATIONS SHOWING IMPROVEMENTS OF OURMETHODS87

Figure 51: Likelihood function of velocities, resulting from high error spectrogram(Myosp recording). Each line consists from 4 spectrograms, received by 4 sensors,

followed by resulting likelihood function (velocities V = Vx, Vy estimation)

Page 88: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

88 BIBLIOGRAPHY

14 APPENDIX3: theory on any number of sen-

sors and Doppler effect

Due to the difference in sounds, emitted by different species, as well as differencein antenae geometry and media of sound-propagation, it is necessary to adapt theresulting algorithm of TDOA calculation to a variety of bat recordings.In this section we optimise time-steps, crosscorrelation-windows, number of maxi-mums and persentages of TDOA to filter with coherence condition formulas.

14.1 The theoretical assessments of using the TDOA andFD for any number of sensors

Advantages of adding the coherence equations for quadruplets, penta-plets, etc to the coherence equations for triplets

With N microphones (1 < i, j < N), we have N(N − 1)/2 pairs(p) of mi-

crophones, (N(N−1)/2)!6(N(N−1)/2−3)!

triplets(p3) of pairs of microphones and (N(N−1)/2)!24(N(N−1)/2−4)!

quadruplets(p4) of pairs of microphones. Here the number of pairs p correspondto the number of unknowns (number of TDOAs, for example), whereas the numberof triplets p3 correspond to the number of coherence equations.

The number of pairs grow approximately as a square of number of microphones.For the number of microphones from 3 to 10, number of pairs are, correspondingly3,6,10,15,21,28,36,45. However, the number of triplets grow much faster than thenumber of pairs. The number of quadruplets grow even more faster.As the number of pairs correspond to the number of unknown TDOAs, whereas thenumber of triplets and quadruplets correspond to the number of coherence equa-tions, the more triplets and quadruplets we have, the more number of correlation-maximums we can process. On 52 there are possible number of maximums in case oftriplets and quadruplets. Note, that these are the maximum number of maximums- if the number of maximums is smaller, we have less unknowns then equations -normal situation if we try to satisfy each coherence equation not exactly, but withsome tolerance.

The theorem in the most general case:any number of sensors, any typeof measurements

Theorem:Let us consider any quality Qi, measured by each sensor Si, 1 ≤ i ≤ n, where n is a

Page 89: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

14. APPENDIX3: THEORYONANYNUMBEROF SENSORS ANDDOPPLER EFFECT89

Figure 52: The maximum number of maximums, able to process in case of tripletsand quadruplets for 4,5,6,7 microphones(X-axis)

4 4.5 5 5.5 6 6.5 70

50

100

150possible number of maximums in case of triplets and quadruplets

possible number of maximums in case of tripletspossible number of maximums in case of quadruplets

Page 90: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

90 BIBLIOGRAPHY

number of sensors. Let dQij be the difference of this quality, measured by sensorsSi and Sj:dQi,j = Qj −Qi

When there are n(n-3) linear conditions on differences dQij of the form :∑dQi,i+1 = dQi,m

where 2 ≤ m ≤ N − 2 and summation is over 1 ≤ i ≤ m

Lemma:The number of sub-polygons of a n-order polygon is n(n-3). This is true for bothconvex and concave polygons, as well as planar and non-planar polygons.Proof of Lemma:Each diagonal of a polygon divides it into 2 sub-polygons. Example: diagonal ACdivides polygon ABCD into sub-polygons ABC and ACDEThe number of diagonals of a polygon is n(n-3)/2. Therefore, the number of sub-polygons of a n-order polygon is n(n-3). Lemma is prooved

Proof of TheoremLet us put all sensors Si, 1 ≤ i ≤ n as vertices of a n-order polygon. As Lemmasays, we will have n(n-3) sub-polygons (chaines of sensors Si...SjSk). For each sub-polygon (each chain) we write the following:∑

dQi,i+1

where 2 ≤ m ≤ N − 2 and summation is over 1 ≤ i ≤ mLet us rewrite dQi,j as dQi,j = Qj −Qi:TDOA-FD

∑dQi,i+1 =

∑(Qi+1 −Qi) = (Q2 −Q1) + (Q3 −Q2) + (Q4 −Q3) + ... =

dQi,m

The Theorem is prooved

14.2 The theoretical assessments of using Doppler effectcoherence equations (FD-coherence-equations) to in-crease the robustness and quality of TDOA refinment

The process of TDOA refinment in the space of TDOAsWith N microphones (1 < i, j < N), we have N(N − 1)/2 pairs p of microphones

(1 < p < N(N − 1)/2) and (N(N−1)/2)!6(N(N−1)/2−3)!

− 1 triplets p3 of pairs of microphones

(1 < p3 < (N(N−1)/2)!6(N(N−1)/2−3)!

− 1) Note, that ”-1” is added because the last triplet is

Page 91: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

14. APPENDIX3: THEORYONANYNUMBEROF SENSORS ANDDOPPLER EFFECT91

excluded because the TD-coherence-equations of this triplet is linear combination ofTD-coherence-equations of all other triplets (here we call ”TD-coherence-equations”the ordinary TDOA coherence equations from our 1st patent).

Denoting the number triplets (N(N−1)/2)!6(N(N−1)/2−3)!

− 1 as Np3 (Np3 = (N(N−1)/2)!6(N(N−1)/2−3)!

− 1),we have the same in the form 1 < p3 < Np3. The pairs p, belonging to some tripletTRIPLET (p3) can be denoted as p ∈ TRIPLET (p3).For the case of 4 microphones, we have 6 pairs of microphones (p = 1, 2, 3, 4, 5, 6)and 3 triplets of pairs of microphones (p3 = 1, 2, 3). for the case of pyramidal an-tenna, these 3 triplets correspond to 3 faces of this pyramid (the last, 4th triplet,corresponding to the 4th face of this pyramid, is excluded because the TD-coherence-equations of this triplet is linear combination of TD-coherence-equations of all othertriplets). For simplicity, we will number pairs of microphones with a single indexp. The other 2 indices of TDOAs are the moment of measurement t and numberof maximum m: TDOApm(t). For each time moment t we have the following Np3TD-coherence-equations:

∑p∈TRIPLET (p3) TDOApm(t) = 0 for 1 < p3 < Np3. The

process of refinment of TDOAs is, in fact filtering TDOApm(t) leaving only maxi-mums m who satisfy the TD-coherence-equations (

∑p∈TRIPLET (p3) TDOApm(t))

2 <

εTDcoherence with some threshold εTDcoherence: TDOApm(t).The process of TDOA refinment in the space of errors of TDOAsDenoting the errors of TDOAs as δpm(t), we can consider TD-coherence-equationsin the space, where each axis corresponds to one pair of microphones (1 < p <N(N − 1)/2). In this space we observe accuracies of TD-coherence-equations δpm(t)for different maximums m. We are interested in TDOAs who fall into hypercube ofthe size εTDOAerror in this space. We may call it εTDOAerror-hypercube.The distribution of errors in TDOAsIf we assume that the errors of TDOAs δpm(t) have the normal distribution, then thedensity of δpm(t) is high at the beginning of coordinates (point (0, 0, 0, 0, 0, 0)). Inother words, there are more small errors than big errors. The same conclusion canbe made, using the following practical reasoning: in the ideal case (no echoes, nonoise), the TDOApm(t) repersent only one ”correct” maximum m0: TDOApm0(t).In reality, there are echoes (they are usually less loud than original signal) and noise(it is also usually less loud than original signal). As a consequence, usually the”correct” maximum m0 is higher than all other maximums m, however, there couldbe times when the noise-related maximums or echo-related maximums can be higerthan the ”correct” maximum m0.The TD-coherence-equations in the space of errors of TDOAs δpm(t) represent somelinear subspace of dimension N(N − 1)/2 − Np3. For the case of 4 microphones,

Page 92: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

92 BIBLIOGRAPHY

we have 6 pairs(N(N − 1)/2 = 4), 3 triplets(Np3 = 3), the TD-coherence-equationsrepresent a line in the space of errors of TDOAs δpm(t). We may call it ”TD-coherence-line”. Since the zero-error of TDOAs δpm(t) = 0 satisfy the TD-coherence-equations, this ”TD-coherence-line” go through the beginning of coordinates of thisspace (throught the point (0, 0, 0, 0, 0, 0)).The process of refinment of TDOAs is, in fact, leaving only maximums m correspond-ing to errors of TDOAs δpm(t) in the εTDcoherence-vicinity of this ”TD-coherence-line”.Note, that some of these δpm(t) fall into εTDOAerror-hypercube (TDOAs with smallerrors), whereas some δpm(t) fall outside εTDOAerror-hypercube (TDOAs with bigerrors).The quality of TDOA refinmentViewing the process of TDOA refinment in the space of errors of TDOAs, we mayformulate the Criteria of quality of TDOA refinment: The more δpm(t) fallinto the intersection of εTDOAerror-hypercube and εTDcoherence-vicinity of the ”TD-coherence-line”, the better TDOA refinment is provided by TD-coherence-equations.The robustness of TDOA trackingSimilarily, viewing the process of TDOA tracking in the space of errors of TDOAs,we may formulate the robustness of TDOA tracking as the quality of δpm(t)-trajectory to not go away from the beginning of coordinates with time. In otherwords, the TDOA-tracking is robust, if when TDOA-trajectory fall into εTDOAerror-hypercube at some time t, this TDOA-trajectory will remain in the εTDOAerror-hypercube.Doppler EffectThe Doppler effect is described and an equation for the frequency observed as afunction of velocity and emitted frequency is derived in the textbook. The generalDoppler equation is

f ′ = fv ± vdv ∓ vs

where f ′ is the observed frequency, f is the emitted frequency, vd is the velocity ofthe detector (or observer), vs is the velocity of the source, and v is the speed of thewave (sound) in the medium (343 m/s for sound in air).

If the speeds vs, and vr, are small compared to the speed of the wave, the re-lationship between observed frequency f and emitted frequency f0 is approximately∆f = ∆v

cf0.

The role of Doppler of TDOA trackingSimilarily to TDOAs, we denote the differencies of frequencies between pais of mi-crophones as FDpm(t) (pairs of microphones are index p, the other 2 indices of FDs

Page 93: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

14. APPENDIX3: THEORYONANYNUMBEROF SENSORS ANDDOPPLER EFFECT93

are the moment of measurement t and number of maximum m).

The velocity coherence equation for TRIPLET (p3) (one from Np3 triplets),based on Doppler effect (FD-coherence-equations) look as follows:

∑p∈TRIPLET (p3) FDpm(t) =

0 for 1 < p3 < Np3 (in the previous report it was shown that FD-coherence-equations have this form). The errors of FDs can be denoted as ∆pm(t) (similarilyto errors of TDOAs, denoted earlier as δpm(t)).

The process of refinment of FDs is, in fact filtering FDpm(t) leaving only max-imums m who satisfy the FD-coherence-equations (

∑p∈TRIPLET (p3) FDpm(t))

2 <

εFDcoherence with some threshold εFDcoherence: FDpm(t).

We will not consider here the space of errors of FDs (∆pm(t) space). Since ourgoal is to show that FD-coherence-equations improve the situation in the space oferrors of TDOAs δpm(t), we are concentrating on the connection between TDOAs andFDs. It is easy to show (see the report) that this connection has the following form:TDOApm(t+1)−TDOApm(t) = FDpm(t) · TimeStep

SoundFrequency. Or, in the space of errors

of TDOAs, (δpm(t+1)− δpm(t))2 ≤ ∆pm(t) · TimeStep

SoundFrequency. This inequality provides

the increasing of robustness of TDOA tracking(see above) by using FD-coherence-equations (if TDOA-trajectory fall into εTDOAerror-hypercube at some time t, thisinequality will force TDOA-trajectory to remain inside the εTDOAerror-hypercube).Also, this inequality provides the higher quality of TDOA refinment(see above),because the normal distribution of errors in TDOAs (or, even more generally, becausethere are more small errors than big errors).

The figure 53 illustrates the abovementioned shows ”TD-coherence-line” andεTDcoherence-vicinity of this ”TD-coherence-line” (provided by TD-coherence-equations),as well as εTDOAerror-hypercube (rectangle) in time-moments t and t+1.

The inequality (δpm(t + 1) − δpm(t))2 ≤ ∆pm(t) · T imeStep

SoundFrequencyprovides the

increasing of robustness of TDOA tracking, because if TDOA-trajectory fall intoεTDOAerror-hypercube at some time t, this inequality will force TDOA-trajectory toremain inside the εTDOAerror-hypercube.

Page 94: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

94 BIBLIOGRAPHY

Figure 53: The geometry of recording microphones, allowing TDOA refinment toeliminate echoes (left) and not allowing to eliminate echoes (right).

Page 95: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 95

15 APPENDIX4: Matlab code for simulation

\begin{verbatim}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% CALCULATE TDOA(PATENT1) OR FD+TDOA(PATENT2) USING(OR NOT USING) COHERENCE EQUATIONS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% SET DIRECTORIES, NUMBER OF CORRELATION MAXIMUMS, TIME−WINDOW, ETC%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

warning o f f a l l ; c l o s e a l l ; c l e a r a l l ; g lobDirIN=’/NAS3/ALES/DATA/ ’ ; %globDirOUT=’C: \ ’ ;globDirOUT=’/NAS3/ALES/ ’ ; globDirIN=’ml8b\ERMITES\DATA\ ’ ; globEXTpar . INsubDODO=’CENT16NOV/ ’ ;

globDirOUT=’/NAS3/ALES/CHIROcopyNAS3GLOTIN/RESULTS/PATENT1nocoher / ’ ;n o n d i f f i c i l e s =[56 1 6 7 2 5 46 47 48 49 50 51 52 53 40 41 42 43 44 29

30 31 3 2 ] ; p e u d i f f i c i l e s =[55 21 9 10 33 36 37 45 3 8 ] ;t r e s d i f f i c i l e s =[23 26 28 12 13 14 15 16 34 35 39 ] ; t r o p d i f f i c i l e s

=[57 22 24 25 27 8 11 20 17 18 19 3 4 ] ;OBLIGATvecALL percTDOArefine = [ ] ;

LsegBEFOREDODO=25; LsegDODO=50;NsegsBEFOREDODO=(3500−500)/LsegBEFOREDODO; NsegsDODO=(5500−500)/LsegDODO; ALLmaxsDODO=wrev (wrev ( [ 1 2 4 6 ] ) ) ; ALLmaxsBEFOREDODO=wrev (wrev ( [ 1 2 4 8 ] ) ) ;

Allw=wrev ( 1 : 6 ) ; Allw=2; ALLhz=wrev ( 1 : 9 ) ; ALLhz= [ 4 ] ; vars2Dhzw = [ ] ; f o r iALLhz=ALLhz , vars2Dhzw=[vars2Dhzw 10∗ iALLhz+Allw ] ; end ;

% ! ! ! ! ! ! ! ! ! ! ! ! ! ! SWITCH ALLmaxs=wrev (wrev([6<−>1]) ) ; SIMULTANEOSLY SWITCH globEXTpar .OUTsub=’per0L300max6<−>1tdoa / ’ ; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

ALLperc=wrev (wrev ( [ 0 ] ) ) ; ALLmaxs=wrev (wrev ( [ 6 ] ) ) ; %ALLmaxs=wrev (wrev ( [ 6 ] ) ) ;Lseg=300; Nsegs=(3500−500)/Lseg ;vars2Dmp= [ ] ; f o r iALLmaxs=ALLmaxs , vars2Dmp=[vars2Dmp 10∗ iALLmaxs+ALLperc ] ; end ;%AllSegmentTrajectoryMS={[500 750 ] , [ 7 50 1000 ] , [ 1000 1250 ] , [ 1250 1500 ] , [ 1500 1750 ] , [ 1750

2000 ] , [ 2000 2250 ] , [ 2250 2500 ] , [ 2500 2750 ] , [ 2750 3000 ] , [ 3000 3250 ] , [ 3250 3500 ]} ;AllSegmentTrajectoryMS=c e l l (1 , Nsegs ) ; f o r i s e g =1:Nsegs , AllSegmentTrajectoryMS{ i s e g }=[500+( i s eg −1)

∗Lseg 500+ i s e g ∗Lseg ] ; end ;RECStoDOjustdoCUBE=[33 49 38 9 21 23 12 1 26 56 2 8 ] ;RECStoDOdoAllForfdfd2=s e t d i f f ( 1 : 5 4 ,RECStoDOjustdoCUBE) ;RECStoDOdoAllFortdoaIfdm1=s e t d i f f ( 1 : 5 4 , [ RECStoDOjustdoCUBE [15 16 17 6 7 2 8 3 4 10 5 11 13

1 4 ] ] ) ;% ! ! ! ! ! ! ! ! ! ! ! ! ! ! SWITCH 0+ => a l l f r e qu en c i e s 104+ => LOW f r equ en c i e s 2∗104+ => HIG

f r e qu en c i e s ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !RECStoDOnew=[0+[56 1 26 28 9 ] 104+[56 1 26 28 9 ] 2∗104+[56 1 26 28 9 ] 104+[21 23 12 33 49

38 ] 2∗104+[21 23 12 33 49 38 ] ] ;RECStoDOpat2=[12 33 38 4 9 ] ;RECplos=[ s e t d i f f (RECStoDOdoAllFortdoaIfdm1 ,RECStoDOpat2) s e t d i f f ( 1 : 5 7 , [ RECStoDOpat2

RECStoDOdoAllFortdoaIfdm1 ] ) ] ;%s e t d i f f ( 1 : 5 4 , [ 5 6 1 26 28 9 21 23 12 33 49 38 ] ) ;%justdoCUBE=ONLY AFTER calcTDOA , l i n e=load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor

) globEXTcourt{ i chant } ’TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str (iSegmentTrajectory ) ’ . mat ’ ] ) ;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% PATHS TO DATA%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

globEXTpath0 ={ . . .’MyospECORx 08 16 12 22 35 28ALL ’ ; . . . % c l i c k s =12hz 10kHz= [4 8 ]’ PlecotusECORx 08 16 12 21 40 40ALL ’ ; . . . % c l i c k s =7.5hz 10kHz= [2 6 ] %Wcricet [ 0 . 3 6 ]’RhinoFerECORx 08 16 12 22 34 12ALL ’ ; . . . % 10kHz= [7 9 ] %Wcricet [ 0 . 3 9 ]’RhinohipECORx 08 16 12 21 58 31ALL ’ ; . . . % 10kHz= [ 4 . 2 1 1 . 5 ] %Wcricet [ 0 . 3 1 1 . 5 ]’ SerotuleECORx 08 16 12 21 43 32ALL ’ ; . . . % c l i c k s=7hz 10kHz= [ 1 . 8 6 ] %Wcricet [ 0 . 3 6 ]’PikECORx 08 16 12 21 55 44ALL ’ ; . . . % c l i c k s =10hz 10kHz= [ 3 . 5 6 ] %Wcricet [ 0 . 3 6 ]’PipECORx 08 16 12 21 50 36ALL ’ ; . . . % c l i c k s=9hz 10kHz= [4 6 ] %Wcricet [ 0 . 3 6 ]’ p6 21 48 27 ’ ; . . . % 10kHz= [4 11 ]’ p6 21 58 43 ’ ; . . . % 10kHz= [4 6 ]’ p6 22 25 20 ’ ; . . . % 10kHz= [3 7 ]

Page 96: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

96 BIBLIOGRAPHY

’ p6 23 10 03 ’ ; . . . % 10kHz= [3 9 ]’ p7Pkuhl 23 00 25 ’ ; . . . % 10kHz= [ 2 . 9 6 ]’ p7Ppip146 56 ’ ; . . . % 10kHz= [4 7 ]’ p7Ppip154 48 ’ ; . . . % 10kHz= [4 7 ]’ p7Ppip228 03 ’ ; . . . % 10kHz= [ 3 . 5 6 ]’ p7Ppip333 50 ’ ; . . . % 10kHz= [ 3 . 5 6 ]’ p7Rhip201 ’ ; . . . % 10kHz= [4 1 1 . 5 ]’ p7Rhip218 ’ ; . . . % 10kHz= [4 1 1 . 5 ]’ p7Rhip307 ’ ; . . . % 10kHz= [4 1 1 . 5 ]’ p7Rhip120 ’ ; . . . % 10kHz= [4 1 1 . 5 ]’ h 21 15 21 ’ ; . . . % 10kHz= [4 6 ]’ h 21 21 37 ’ ; . . . % 10kHz= [4 11 ] %Inva l i d argument . at 1669 lh=legend ( sh , ph , LegendStyle ) ;’ h 21 54 53 ’ ; . . . % 10kHz= [2 6 ]’ h 22 31 54 ’ ; . . . % 10kHz= [7 9 ] ICOSAPUS OSTANOVLEN V TECENIE ETOGO’ o 21 39 47 ’ ; . . . % 10kHz= [3 9 ]’ o 21 44 22 ’ ; . . . % 10kHz= [3 7 ]’ o 22 02 56 ’ ; . . . % 10kHz= [4 12 ]’ o 22 25 59 ’ ; . . . % 10kHz= [ 3 . 8 6 ]’ sr214804smc4 ’ ; . . . % 10kHz=[2.4 5 ]’ sr215511pikbuzzsmc3 ’ ; . . . % 10kHz=[2.4 5 ] %Inva l i d argument . at 1669 lh=legend ( sh , ph ,

LegendStyle ) ;’ s r215545pikp ic ’ ; . . . % 10kHz=[2.4 5 ]’ sr215631smc ’ ; . . . % 10kHz=[2.4 5 ]’ s f221250 ’ ; . . . % 10kHz=[2.4 5 ]’ s f221533 ’ ; . . . % 10kHz=[2.4 5 ]’ s f222023 ’ ; . . . % 10kHz=[2.4 5 ] %Inva l i d argument . at 1669 lh=legend ( sh , ph , LegendStyle ) ;’ s f222221 ’ ; . . . % 10kHz=[2.4 5 ]’ s f222816 ’ ; . . . % 10kHz=[2.4 5 ]’ sm214708 ’ ; . . . % 10kHz=[2.4 5 ]’ sm214728 ’ ; . . . % 10kHz=[2.4 5 ]’ sm214941 ’ ; . . . % 10kHz=[2.4 5 ]’ sm215423 2pic1pik ’ ; . . . % 10kHz=[2.4 5 ]’ sm215856 3sp ’ ; . . . % 10kHz=[2.4 5 ] %Inva l i d argument . at 1669 lh=legend ( sh , ph , LegendStyle ) ;’ sm215922 2sp ’ ; . . . % 10kHz=[2.4 5 ]’ sm221439 ’ ; . . . % 10kHz=[2.4 5 ]’ sg214525pic ’ ; . . . % 10kHz=[2.4 5 ]’ sg214548smc8 ’ ; . . . % 10kHz=[2.4 5 ] %Inva l i d argument . at 1669 lh=legend ( sh , ph , LegendStyle ) ;’ sg214653smc9 ’ ; . . . % 10kHz=[2.4 5 ]’ sg214700smc10 ’ ; . . . % 10kHz=[2.4 5 ] %Inva l i d argument . at 1669 lh=legend ( sh , ph , LegendStyle ) ;’ sg215151pyg ’ ; . . . % 10kHz=[2.4 5 ]’ sg221333 ’ ; . . . % 10kHz=[2.4 5 ]’ sg221550smc2 ’ ; . . . % 10kHz=[2.4 5 ]’ sg221641smc6 ’ ; . . . % 10kHz=[2.4 5 ]’ sg222003smc5 ’ ; . . . % 10kHz=[2.4 5 ]’ sg222141smc7 ’ ; . . . % 10kHz=[2.4 5 ]’ECOR2116 42 ’ ; . . . % 10kHz=[2.4 5 ]’ ECOR2156 31att312k ’ ; . . . % 10kHz=[2.4 5 ]’ECOR2154 58 ’ ; . . . % 10kHz=[2.4 5 ] %NUMBER 57 NUMBER 57 NUMBER 57 NUMBER 57 NUMBER 57’ dodo 20131016 203651t specDETECTION det30perc micro4mean104range111 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det15perc micro4mean116range106 .mat ’ ; . . .’ dodo 20131016 203651t specDETECTION det31perc micro4mean139range157 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det16perc micro4mean100range100 .mat ’ ; . . .’ dodo 20131016 203651t specDETECTION det32perc micro4mean107range111 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det18perc micro4mean107range100 .mat ’ ; . . .’ dodo 20131016 205700t specDETECTION det22perc micro4mean107range106 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det19perc micro4mean132range128 .mat ’ ; . . .’ dodo 20131016 205700t specDETECTION det6perc micro4mean115range127 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det20perc micro4mean123range139 .mat ’ ; . . .’ dodo 20131016 205700t specDETECTION det7perc micro4mean115range124 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det68perc micro4mean126range147 .mat ’ ; . . .’ dodo 20131016 210202t specDETECTION det67perc micro4mean121range114 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det74perc micro4mean115range113 .mat ’ ; . . .’ dodo 20131016 210202t specDETECTION det68perc micro4mean146range146 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det75perc micro4mean138range127 .mat ’ ; . . .’ dodo 20131016 210202t specDETECTION det69perc micro4mean164range156 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det91perc micro4mean122range117 .mat ’ ; . . .’ dodo 20131016 210202t specDETECTION det70perc micro4mean148range105 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det93perc micro4mean132range124 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det18perc micro4mean159range196 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det94perc micro4mean164range134 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det20perc micro4mean138range159 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det57perc micro4mean109range100 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det38perc micro4mean118range128 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det59perc micro4mean121range102 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det39perc micro4mean124range127 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det60perc micro4mean123range104 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det46perc micro4mean138range149 .mat ’ ; . . .

Page 97: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 97

’ dodo 20131016 212213t specDETECTION det74perc micro4mean113range107 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det47perc micro4mean118range128 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det83perc micro4mean121range107 .mat ’ ; . . .’ dodo 20131016 210705t specDETECTION det49perc micro4mean162range192 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det84perc micro4mean118range116 .mat ’ ; . . .’ dodo 20131016 211207t specDETECTION det10perc micro4mean115range137 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det85perc micro4mean116range128 .mat ’ ; . . .’ dodo 20131016 211207t specDETECTION det26perc micro4mean115range119 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det86perc micro4mean121range134 .mat ’ ; . . .’ dodo 20131016 211207t specDETECTION det80perc micro4mean117range108 .mat ’ ; . . .’ dodo 20131016 212213t specDETECTION det94perc micro4mean141range106 .mat ’ ; . . .’ dodo 20131016 211207t specDETECTION det81perc micro4mean130range156 .mat ’ ; . . .’ dodo 20131016 212715t specDETECTION det18perc micro4mean180range196 .mat ’ ; . . .’ dodo 20131016 211207t specDETECTION det83perc micro4mean115range117 .mat ’ ; . . .’ dodo 20131016 212715t specDETECTION det51perc micro4mean114range108 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det13perc micro4mean128range146 .mat ’ ; . . .’ dodo 20131016 212715t specDETECTION det7perc micro4mean109range104 .mat ’ ; . . .’ dodo 20131016 211711t specDETECTION det14perc micro4mean126range114 .mat ’ ; . . .} ; nb fichierNOFRBAND=length ( globEXTpath0 ) ;f o r i chant =1:nb fichierNOFRBANDglobEXTpath0{ i chant+nb fichierNOFRBAND}=globEXTpath0{ i chant } ;globEXTpath0{ i chant+2∗nb fichierNOFRBAND}=globEXTpath0{ i chant } ;end ;

n b f i c h i e r=length ( globEXTpath0 ) ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% FREQUENCIES OF DATA%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

globEXTrangeKHZcell ={ . . .10∗ [4 8 ] ; . . .10∗ [2 6 ] ; . . . %Wcricet [ 0 . 3 6 ]10∗ [7 9 ] ; . . . %Wcricet [ 0 . 3 9 ]10∗ [ 4 . 2 1 1 . 5 ] ; . . . %Wcricet [ 0 . 3 1 1 . 5 ]10∗ [ 1 . 8 6 ] ; . . . %Wcricet [ 0 . 3 6 ]10∗ [ 3 . 5 6 ] ; . . . %Wcricet [ 0 . 3 6 ]10∗ [4 6 ] ; . . . %Wcricet [ 0 . 3 6 ]10∗ [4 1 1 ] ; . . .10∗ [4 6 ] ; . . .10∗ [3 7 ] ; . . .10∗ [3 9 ] ; . . .1 0∗ [ 2 . 9 6 ] ; . . .10∗ [4 7 ] ; . . .10∗ [4 7 ] ; . . .1 0∗ [ 3 . 5 6 ] ; . . .1 0∗ [ 3 . 5 6 ] ; . . .10∗ [4 1 1 . 5 ] ; . . .10∗ [4 1 1 . 5 ] ; . . .10∗ [4 1 1 . 5 ] ; . . .10∗ [4 1 1 . 5 ] ; . . .10∗ [4 6 ] ; . . .10∗ [4 11 ] ; . . .10∗ [2 6 ] ; . . .10∗ [7 9 ] ; . . .10∗ [3 9 ] ; . . .10∗ [3 7 ] ; . . .10∗ [4 12 ] ; . . .1 0∗ [ 3 . 8 6 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .

Page 98: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

98 BIBLIOGRAPHY

10∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .1 0∗ [ 2 . 4 5 ] ; . . .10∗ [2 1 0 . 5 ] ; . . . %0−2.7510∗ [3 5 . 5 ] ; . . . %a l l10∗ [ 7 . 5 8 . 5 ] ; . . . %6.5 11 .5 NUMBER 57 NUMBER 57 −−−−− DALEE DODO10∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .1 0∗ [ 3 . 2 7 ] ; . . .} ;f o r i chant =1:nb fichierNOFRBANDglobEXTrangeKHZcell{ i chant+nb fichierNOFRBAND}=[globEXTrangeKHZcell{ i chant }(1) (

globEXTrangeKHZcell{ i chant }(1)+globEXTrangeKHZcell{ i chant }(2) ) / 2 ] ;globEXTrangeKHZcell{ i chant+2∗nb fichierNOFRBAND}=[( globEXTrangeKHZcell{ i chant }(1)+

globEXTrangeKHZcell{ i chant }(2) ) /2 globEXTrangeKHZcell{ i chant }(2) ] ;end ;globEXTrangeKHZmat=ce l l2mat ( globEXTrangeKHZcell ) ;datafrom0cyberio1dodo=1;f o r i chant =1: n b f i c h i e ri f ichant >2∗nb fichierNOFRBANDglobEXTpath{ i chant }=[globEXTpath0{ i chant } ’ . wav ’ ] ; globEXTcourt{ i chant }=[globEXTpath0{ i chant

} ( 1 : 5 ) ’HIG’ ] ;datafrom0cyberio1dodo=0;e l s e i f ichant>nb fichierNOFRBANDglobEXTpath{ i chant }=[globEXTpath0{ i chant } ’ . wav ’ ] ; globEXTcourt{ i chant }=[globEXTpath0{ i chant

} ( 1 : 5 ) ’LOW’ ] ;datafrom0cyberio1dodo=0;e l s e i f ichant<=57

Page 99: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 99

globEXTpath{ i chant }=[globEXTpath0{ i chant } ’ . wav ’ ] ; globEXTcourt{ i chant}=globEXTpath0{ i chant} ( 1 : 8 ) ;

datafrom0cyberio1dodo=0;e l s eglobEXTpath{ i chant}=globEXTpath0{ i chant } ; globEXTcourt{ i chant}=globEXTpath0{ i chant } ( [ 1 5 : 2 0 39

40 ] ) ;datafrom0cyberio1dodo=1;end ;end ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% CYCLE OVER ALL DATA%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

fo r oneforALLbatNums=wrev (wrev (RECplos ( 1 : 1 : end ) ) ) %s e t d i f f ( 1 : 5 6 , RECplos ) ) ) ; wrev ( [ 3 4 : 3 7 39 :4042 :48 5 0 : 5 3 ] ) %wrev (wrev (RECStoDOpat2) )

ALLbatNums=(wrev ( [ oneforALLbatNums ] ) ) ; R1005betterdo12ot23R0199report=[12 3 6 ] ;R1005betterot12do23R0199report=[39 48 5 2 ] ; R1005betterR0199report=[39 40 48 52 41 42 4 4 ] ;ALLbias=1; dotk=0;

% ! ! ! ! ! ! ! ! ! ! ! ! ! ! SWITCH ’ . . . tdoa / ’ SIMULTANEOSLY TDOA0FD123type=0 ’ . . . fdm1/ ’SIMULTANEOSLY TDOA0FD123type=−1 ETC ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

%globEXTpar .OUTsub=’per0L300max6tdoa / ’ ; TDOA0FD123type=0;%globEXTpar .OUTsub=’per0L300max6fdm1 / ’ ; TDOA0FD123type=−1;%globEXTpar .OUTsub=’per0L300max6fdm1 / ’ ; TDOA0FD123type=−1;%globEXTpar .OUTsub=’per0L300max6fd / ’ ; TDOA0FD123type=1;globEXTpar .OUTsub=’per0L300max6fd2 / ’ ; TDOA0FD123type=2;

doneCUBEinroot=d i r ( [ ’ . . / . . / ’ globEXTpar .OUTsub ’∗ ’ globEXTcourt{oneforALLbatNums} ’ dt=25msCUBE∗ .mat ’ ] ) % ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! TODEL! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

i f ˜ isempty ( doneCUBEinroot ) , [ ’ ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! EST TAKOE: . . / . . / ’ globEXTpar .OUTsub ’ dt=25msCUBE∗ .mat ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ’ ] , cont inue ; end ;% ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! TODEL ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

mkdir ( globDirOUT , globEXTpar .OUTsub) ;mid=505; edge=101; i f edge <1000 , s t r edge =[ ’0 ’ num2str ( edge ) ] ; e l s e s t r edge=num2str ( edge ) ; end ;

i f mid<1000 , strmid =[ ’0 ’ num2str (mid ) ] ; e l s e strmid=num2str (mid ) ; end ;

ALL5hz1w1maxs2pers2=c e l l (1 , l ength ( AllSegmentTrajectoryMS ) ) ; f o r i j i =1: l ength (ALL5hz1w1maxs2pers2) ,ALL5hz1w1maxs2pers2{ i j i }=wrev (wrev (vars2Dmp+10000∗vars2Dhzw ) ) ; end ;

% 41−>216 ALLbatNums=[49 ] ; ALLbatNums=[49:56 47 43 :45 36 :41 31 :34 23 :29 21 : −1 :1 ] ;msize=4; f s i z e =10; f s izeSm=6; f s i z eB i g =18; s t r type={ ’Orig ’ , ’ VerLn ’ , ’ AbsVerLn ’ } ; cortype={ ’

Fspectrogr ’ , ’ FspecVerLn ’ , ’ FspeAbsVer ’ , ’ Tspectrogr ’ , ’ TspecVerLn ’ , ’ TspeAbsVer ’ , ’ TsigOrigin ’ , ’TsigOrPeak ’ , ’ TsigOrPik2 ’ , ’ TsigOrPik3 ’ } ;

hist0zoom1artzoom2no3=3; l abe l 0 range1 s imp l e =1; vecPlotZoomsOfCorrs = [ ] ; %[1 7 ] ;p l o tSpec t r =0; p lo tPar t sSpec t r =0; p l o tF i l t e r edPa r t sSp e c t r =0;plotCORRS=0; plotCORiTDOA=0;

ca l cFFTip l o t i t =1;L ineSty l eS t r

={ ’ − ’ , ’ − − ’ , ’ − . ’ , ’ : ’ , ’ − ’ , ’ − − ’ , ’ − . ’ , ’ : ’ , ’ − ’ , ’ − − ’ , ’ − . ’ , ’ : ’ , ’ − ’ , ’ − − ’ , ’ − . ’ , ’ : ’ , ’ − ’ , ’ − − ’ , ’ − . ’ , ’ : ’} ;MarkerStr={ ’o ’ , ’ s ’ , ’ d ’ , ’V’ , ’ o ’ , ’ s ’ , ’ d ’ , ’V’ , ’ o ’ , ’ s ’ , ’ d ’ , ’V’ , ’ o ’ , ’ s ’ , ’ d ’ , ’V’ , ’ o ’ , ’ s ’ , ’ d ’ , ’V

’ } ;

%=====================================================================% FREEQUENCIES, ANTENNAS GEOMETRIES%=====================================================================f minHz=1000∗min(min (globEXTrangeKHZmat ) )∗ones (1 , n b f i c h i e r ) ; f maxHz=1000∗max(max(

globEXTrangeKHZmat ) )∗ones (1 , n b f i c h i e r ) ;% f minHz ( [ 1 : 7 ] ) =1000∗[40 20 70 95 20 33 40]−10;% f maxHz ( [ 1 : 7 ] ) =1000∗[83 50 90 115 55 53 60]+10;f minHz=1000∗globEXTrangeKHZmat ( : , 1 ) ’ ;f maxHz=1000∗globEXTrangeKHZmat ( : , 2 ) ’ ;indf min=25; indf max=80;

antenneStr={ ’Old ’ , ’ Passer6 ’ , ’ Passer7 ’ , ’ Horiz ’ , ’ Ouvert ’ , ’ smcgcp ’ } ;anteneINDbat=[1∗ ones (1 ,7−0) 2∗ ones (1 ,11−7) 3∗ ones (1 ,20−11) 4∗ ones (1 ,24−20) 5∗ ones (1 ,28−24) 6∗

ones (1 , nb f i c h i e r −28) ] ;Nantenne=6;antenneBourgesPosMic=c e l l (1 , Nantenne ) ;antenneBourgesPosMic {1}=[0 0 −0.6 0 .6 ; 0 0 .692 −0.346 −0.346; 0 .99 0 0 0 ] ’ ;antenneBourgesPosMic {2}=[0 ,39 ,0 ; 0 , 0 , 32 .4 ; −34.6 ,−21.2 ,0 ; 33 .2 , −18 .3 ,0 ]/100 ;antenneBourgesPosMic {3}=[0 ,39 ,0 ; 0 , 0 , 32 .4 ; −33 ,−18.5 ,0 ; 34 .5 , −16 ,0 ]/100 ;antenneBourgesPosMic {4}=[12.5 , −7.5 ,27.8 ; 0 ,0 ,5 ; 0 , 14 . 5 , 2 7 . 5 ; −13 ,−7.5 ,27]/100;antenneBourgesPosMic {5}=[−0.335 0 0 .335 0 ; −0.215 0 −0.215 0 . 3 75 ; 0 0 .324 0 0 ] ’ ;antenneBourgesPosMic {6}=[0 0 0 .6 −0.6 ; 0 0 .7 −0.346 −0.346; 1 0 0 0 ] ’ ;f r eq0 =50000; f c o e f =7; Nmic=4; Nraz=4; waterbyair =1500/331; hydrobymicro=7000/1; ArrTimeErrRatio

Page 100: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

100 BIBLIOGRAPHY

=hydrobymicro/waterbyair ;%−−−−−−−−−−−−−−−−−−−ORIGf e =48000; % frequence d ’ ? ?? chan t i l l onag efen=10∗ f e ; % f e n e t r e s de 10 secondesnb sum=100; % d i v i s i o n de l ’ e chan t i l l onag e par 100c s t =6; nb s igb =100; e p r a i e =0.02; s i g s e g =50; s i g p a s =10; th r e s =3; nb plan=3; rou=1; s e v e r a l =1; c=1500;rep=pwd ;nom fich =[ ’3M ch4 ’ ; ’ 3 M ch5 ’ ; ’ 3 M ch6 ’ ; ’ 3 S ch4 ’ ; ’ 3 S ch5 ’ ; ’ 3 S ch6 ’ ; ’ 1 0 M ch2 ’ ; ’ 1 0 M ch3

’ ; ’ 1 0 S ch1 ’ ; ’ 1 0 S ch5 ’ ; ’ 1 0 S ch7 ’ ] ;% i f s e v e r a l==1% nb f i c h i e r =4;micro=[1 2 3 6 ] ; %nb td=15;% e l s e% nb f i c h i e r =5;micro=[7 8 9 1 0 ] ; %nb td=5;% end%−−−−−−−−−−−−−−−−−−−ORIG−TO−MYfe =250000; % frequence d ’ ? ?? chan t i l l onag e = 250 000 pts par seconde

indINmsec=f e /1000;f en =0.1∗ f e ; % f e n e t r e s de 0 .1 secondesnb sum=1;c s t =0.99599∗( f e /nb sum) ;micro=[1 2 3 4 ] ;e p r a i e=ep r a i e /ArrTimeErrRatio ;indVms=( fen /1000) ;

c=331; minVel=−15; maxVel=15;maxXYZ=1; sensS1XY2=[[0 0 0 ] ; [maxXYZ 0 0 ] ; [maxXYZ maxXYZ 0 ] ; [ 0 maxXYZ 0 ] ; [ 0 0 maxXYZ ] ] ;

antenneBourgesDistMicros=c e l l (1 , Nantenne ) ;f o r iantenne=1:NantenneantenneBourgesDistMicros{ iantenne}=zero s (Nmic , Nmic) ;end ;antenneBourgesDistMicros {1}(1 ,3) =67;antenneBourgesDistMicros {1}(1 ,2)= 55 . 5 ;antenneBourgesDistMicros {1}(3 ,4) =68;antenneBourgesDistMicros {1}(3 ,2)= 51 ;antenneBourgesDistMicros {1}(1 ,4) =66.5;antenneBourgesDistMicros {1}(3 ,4)= 49 ;antenneBourgesDistMicros {2}(1 ,3) =46.5;antenneBourgesDistMicros {2}(1 ,2) =51;antenneBourgesDistMicros {2}(3 ,4) =47;antenneBourgesDistMicros {2}(3 ,2) =50;antenneBourgesDistMicros {2}(1 ,4) =46.5;antenneBourgesDistMicros {2}(3 ,4) =49;

%=====================================================================% CYCLE OVER ALL CORRELATION POSSIBILITIES : ’ unbiased ’ , ’ biased ’ , ’ none ’%=====================================================================fo r C bias=ALLbiasi f C bias==1BegBias=’u ’ ; StrCors=’unbiased ’ ;e l s e i f C bias==2BegBias=’b ’ ; StrCors=’biased ’ ;e l s e i f C bias==3BegBias=’n ’ ; StrCors=’none ’ ;end ;

plotTIMEall=c e l l ( nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;plotTDOAall=c e l l ( nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;

% f o r i f i l e=ichant% f o r i=micro% f o r j=micro% i f i>=j , cont inue ; end ;% plotTIMEall{ i f i l e , i , j}=− i n f ∗ones (1 , l ength ( vecTimesTracking ) ) ;% end ;% end ;% end ;N t r i p l e t s=ze ro s (max(ALLbatNums) , l ength ( AllSegmentTrajectoryMS ) , l ength (ALL5hz1w1maxs2pers2{1}) ) ;tota lErrorMin=i n f ∗ones (max(ALLbatNums) , l ength ( AllSegmentTrajectoryMS ) , l ength (ALL5hz1w1maxs2pers2

{1}) ) ;totalErrorMax=−i n f ∗ones (max(ALLbatNums) , l ength ( AllSegmentTrajectoryMS ) , l ength (

ALL5hz1w1maxs2pers2{1}) ) ;t o t a lE r r o r=ze ro s (max(ALLbatNums) , l ength ( AllSegmentTrajectoryMS ) , l ength (ALL5hz1w1maxs2pers2{1}) ) ;totalTime=ze ro s (max(ALLbatNums) , l ength ( AllSegmentTrajectoryMS ) , l ength (ALL5hz1w1maxs2pers2{1}) ) ;tota lErrorN=ze ro s (max(ALLbatNums) , l ength ( AllSegmentTrajectoryMS ) , l ength (ALL5hz1w1maxs2pers2{1}) )

;

Page 101: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 101

cube=ze ro s ( l ength ( AllSegmentTrajectoryMS ) , l ength (ALLmaxs) ,17) ; squareRes=ze ro s ( l ength (AllSegmentTrajectoryMS ) ,17) ;

%=====================================================================% CYCLE OVER ALL SEGMENTS OF TRAJECTORY (TIME−STEPS)%=====================================================================fo r iSegmentTrajectory=1: l ength ( AllSegmentTrajectoryMS )N2Darr DivsMaxsPers=34;Ntdoa2D=c e l l (1 , N2Darr DivsMaxsPers ) ; ALLmaxsBYperc=c e l l ( N2Darr DivsMaxsPers , l ength (

AllSegmentTrajectoryMS ) ) ;f o r i o i =1:N2Darr DivsMaxsPersNtdoa2D{ i o i}=zero s (max(ALLbatNums) , l ength (ALL5hz1w1maxs2pers2{ iSegmentTrajectory }) ) ;ALLmaxsBYperc{ i o i , iSegmentTrajectory}=zero s ( l ength (ALLmaxs) , l ength (ALLperc ) ) ;end ;

%=====================================================================% CYCLE OVER ALL DESIRED PERCENTAGES OF LEFT−TDOA%=====================================================================fo r C DivsMaxsPers=ALL5hz1w1maxs2pers2{ iSegmentTrajectory} %ODNO v FORindC DivsMaxsPers=f ind ( C DivsMaxsPers==ALL5hz1w1maxs2pers2{ iSegmentTrajectory } , 1 , ’ f i r s t ’ ) ;maxClickFreqHz=f i x ( C DivsMaxsPers /100000) ;windowSize=f i x ( ( C DivsMaxsPers−maxClickFreqHz ∗100000) /10000) ;nb td=f i x ( ( C DivsMaxsPers−maxClickFreqHz∗100000−windowSize ∗10000) /10) ;C pers=f i x ( C DivsMaxsPers−maxClickFreqHz∗100000−windowSize∗10000−nb td ∗10) ;%nb td=nb td ∗2 ;windowSize=windowSize /2 ; maxClickFreqHz=maxClickFreqHz ∗5 ; Nmax=nb td ; vecALL percTDOArefine=so r t

( [ OBLIGATvecALL percTDOArefine C pers ] ) ;

f o r C cortype=[3∗2+1] %[3∗2+1 3 6 2 5 3∗2+3] %wrev ([3∗2+1 3 6 2 5 3∗2+3]) %1:3∗2+1BegFi le=[ cortype{C cortype} num2str (maxClickFreqHz ) ’ hz ’ num2str ( windowSize ) ’w’ num2str ( nb td )

’m’ num2str ( C pers ) ’ p ’ BegBias ] ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−% MODEL ( IF WE WANT ADDITIONALLY TO MAKE ARTIFICIAL SIMULATIONS WITH THESE PARAMETERS)%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−f o r C model =[ ]Ntraj =90; maxUturn=15; lenUturn=round ( Ntraj /maxUturn ) ;cent sens=mean( sensS1XY2 , 1 ) ;%−−−−−−ALLOCATION−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−arrsecsS1TR2=ze ro s (Nmic , Ntraj ) ;%projvelS1TR2=ze ro s (Nmic , Ntraj ) ;%arrfreqS1TR2=ze ro s (Nmic , Ntraj ) ;

veltosensTR1S2=ze ro s ( Ntraj , Nmic , 3 ) ;vectosensTR1S2XY3=ze ro s ( Ntraj , Nmic , 3 ) ;absdisttosensTR1S2=ze ro s ( Ntraj , Nmic) ;

batvelsTR1XY2=ze ro s ( Ntraj , 3 ) ;batmtrsTR1XY2=ze ro s ( Ntraj , 3 ) ;

TDOAsecsTR1S23=ze ro s ( Ntraj , Ntraj , Ntraj ) ;FDODhzTR1S23=ze ro s ( Ntraj , Ntraj ) ;%−−−−−−TRAJECTORY, CHANT −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−bat s ec s =1:Ntraj ; maxRandVel=round (maxVel /4) ;% batvelsTR1XY2 ( : , 1 )=maxVel∗ s i n ( l i n s pa c e ( sensS1XY2 (1 ,1 ) , sensS1XY2 (2 ,1 ) , Ntraj ) ∗2∗ pi ∗maxUturn/

Ntraj )−maxRandVel+randi (maxRandVel , [ 1 , Ntraj ] ) ;% batvelsTR1XY2 ( : , 2 )=maxVel∗ cos ( l i n s pa c e ( sensS1XY2 (1 ,2 ) , sensS1XY2 (2 ,2 ) , Ntraj ) ∗2∗ pi ∗maxUturn/

Ntraj )−maxRandVel+randi (maxRandVel , [ 1 , Ntraj ] ) ;% batvelsTR1XY2 ( : , 3 )=maxVel∗ s i n ( l i n s pa c e ( sensS1XY2 (3 ,3 ) , sensS1XY2 (4 ,3 ) , Ntraj ) ∗2∗ pi ∗maxUturn/

Ntraj )−2∗maxRandVel+randi (2∗maxRandVel , [ 1 , Ntraj ] ) ;%+maxXYZ/Ntraj ;

batvelsTR1XY2 ( : , 1 )=ze ro s (1 , Ntraj ) ;batvelsTR1XY2 ( : , 2 )=ze ro s (1 , Ntraj ) ;batvelsTR1XY2 ( : , 3 )=ze ro s (1 , Ntraj ) ;

DomTreug2=[ l i n s pa c e (0 ,maxVel /3 , lenUturn ) l i n s pa c e (maxVel /3 ,0 , lenUturn ) ] ;DomTrap3=[ l i n s pa c e (0 ,maxVel /3 , lenUturn ) l i n s pa c e (maxVel /3 ,maxVel /3 , lenUturn ) l i n s pa c e (maxVel

/3 ,0 , lenUturn ) ] ;GalkaLin3=[ l i n s pa c e (maxVel /3 ,0 , lenUturn ) l i n s pa c e (0 ,maxVel /3 , lenUturn ) l i n s pa c e (maxVel /3 ,maxVel

/3 , lenUturn ) ] ;LinGalka3=[ l i n s pa c e (maxVel /3 ,maxVel /3 , lenUturn ) l i n s pa c e (maxVel /3 ,0 , lenUturn ) l i n s pa c e (0 ,maxVel

/3 , lenUturn ) ] ;Galka2=[ l i n s pa c e (maxVel /3 ,0 , lenUturn ) l i n s pa c e (0 ,maxVel /3 , lenUturn ) ] ;

batvelsTR1XY2 ( : , 1 ) =[DomTreug2 GalkaLin3 l i n s pa c e (0 ,−maxVel /2 , lenUturn ) DomTreug2 l i n s pa c e (0 ,maxVel /2 ,2∗ lenUturn ) −GalkaLin3 l i n s pa c e (maxVel /2 ,0 ,2∗ lenUturn ) ]−maxRandVel+randi (maxRandVel , [ 1 , Ntraj ] ) ;

Page 102: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

102 BIBLIOGRAPHY

batvelsTR1XY2 ( : , 2 ) =[LinGalka3 Galka2 −LinGalka3 l i n s pa c e (0 ,maxVel ,2∗ lenUturn ) Galka2 l i n s pa c e (−maxVel , maxVel ,1∗ lenUturn ) l i n s pa c e (maxVel,−maxVel ,2∗ lenUturn ) ]−maxRandVel+randi (maxRandVel, [ 1 , Ntraj ] ) ;

%batvelsTR1XY2 ( : , 3 ) =[DomTrap3 DomTreug2]−maxRandVel+randi (2∗maxRandVel , [ 1 , Ntraj ] ) ;%+maxXYZ/Ntraj;

batmtrsTR1XY2 ( 1 , : )=cent sens ;f o r i t r a j =2: NtrajbatmtrsTR1XY2( i t r a j , : )=batmtrsTR1XY2( i t r a j −1 , :)+(bat s e c s ( i t r a j )−bat s ec s ( i t r a j −1) ) .∗ (

batvelsTR1XY2 ( i t r a j , : )+batvelsTR1XY2 ( i t r a j −1 , :) ) /2 ;end ;

%plot3 (batmtrsTR1XY2 ( : , 1 ) , batmtrsTR1XY2 ( : , 2 ) , batmtrsTR1XY2 ( : , 3 ) ) ;

%−−−−Secs ( d i s t t o s e n s ) and Hz( v e l t o s en s ) rece ived−−−−−−f o r i s e n s =1:Nmicf o r i t r a j =1: Ntraj

vectosensTR1S2XY3 ( i t r a j , i s ens , : )=sensS1XY2 ( i s ens , : )−batmtrsTR1XY2( i t r a j , : ) ;absdisttosensTR1S2 ( i t r a j , i s e n s )=sq r t ( squeeze ( vectosensTR1S2XY3 ( i t r a j , i s ens , : ) ) ’∗ squeeze (

vectosensTR1S2XY3 ( i t r a j , i s ens , : ) ) ) ;arrsecsS1TR2 ( i s ens , i t r a j )=absdisttosensTR1S2 ( i t r a j , i s e n s ) /c ;

veltosensTR1S2 ( i t r a j , i s e n s )=−( f r eq0 /c ) ∗( batvelsTR1XY2 ( i t r a j , : ) ∗ squeeze ( vectosensTR1S2XY3 (i t r a j , i s ens , : ) ) ) / absdisttosensTR1S2 ( i t r a j , i s e n s ) ;

end ;end ;

%−−−−−TDOAsecsTR1S23 and FDODhzTR1S23−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−f o r i s e n s =1:Nmicf o r j s e n s =1:Nmic

TDOAsecsTR1S23 ( : , i s ens , j s e n s )=(arrsecsS1TR2 ( i s ens , : )−arrsecsS1TR2 ( j sens , : ) ) ’ ;FDODhzTR1S23 ( : , i s ens , j s e n s )=(veltosensTR1S2 ( : , i s e n s )−veltosensTR1S2 ( : , j s e n s ) ) ;

end ;end ;otsup=7;f o r i t r a j =2: Ntrajf i g u r e ;p lo t3 (batmtrsTR1XY2 ( 1 : i t r a j , 1 ) , batmtrsTR1XY2 ( 1 : i t r a j , 2 ) , batmtrsTR1XY2 ( 1 : i t r a j , 3 ) ) ;ax i s ( [ 0 maxXYZ 0 maxXYZ 0 maxXYZ] ) ;ax i s o f f ;view ( [ 0 0 1 ] ) ;TDOAcurr=ze ro s (Nmic , Nmic) ; FDODcurr=ze ro s (Nmic , Nmic) ;TDOAsum=0; FDODsum=0;f o r i s e n s =1:Nmic

text ( sensS1XY2 ( i s ens , 1 )−otsup , sensS1XY2 ( i s ens , 2 )−otsup , sensS1XY2 ( i s ens , 3 )−otsup , [ ’ SENS’num2str ( i s e n s ) ] ) ;

f o r j s e n s =1:Nmici f j s ens−i s e n s ˜=1 && jsens−i s e n s ˜=−3, cont inue ; end ; %TODELl i n e ( [ c ent sens (1)−otsup cent sens (1)+otsup ] , [ c ent sens (2 ) cent sens (2 ) ] , [ c ent sens (3 )

cent sens (3 ) ] ) ;l i n e ( [ c ent sens (1) cent sens (1) ] , [ c ent sens (2 )−otsup cent sens (2 )+otsup ] , [ c ent sens (3)

cent sens (3 ) ] ) ;TDOAcurr( i s ens , j s e n s )=round (TDOAsecsTR1S23( i t r a j , i s ens , j s e n s ) ∗1000) ;FDODcurr( i s ens , j s e n s )=round (FDODhzTR1S23( i t r a j , i s ens , j s e n s ) ) ;t ext ( ( sensS1XY2 ( i s ens , 1 )+sensS1XY2 ( j sens , 1 ) ) /2 −otsup . . .

, ( sensS1XY2 ( i s ens , 2 )+sensS1XY2 ( j sens , 2 ) ) /2 −otsup . . ., ( sensS1XY2 ( i s ens , 3 )+sensS1XY2 ( j sens , 3 ) ) /2 −otsup . . ., [ num2str (TDOAcurr( i s ens , j s e n s ) ) ’ms ’ num2str (FDODcurr( i s ens , j s e n s ) ) ’Hz ’ ] ) ;

TDOAsum=TDOAsum+TDOAcurr( i s ens , j s e n s ) ; FDODsum=FDODsum+FDODcurr( i s ens , j s e n s ) ;end ;

end ;text (4∗ otsup , ( sensS1XY2 (4 ,2 )+sensS1XY2 (1 ,2 ) ) /2 −4∗otsup , 0 , [ ’ Sum of TDOA( ’ num2str ( i t r a j ) ’ ) =’

num2str (TDOAsum) ’ms ’ ] ) ;t ext (4∗ otsup , ( sensS1XY2 (4 ,2 )+sensS1XY2 (1 ,2 ) ) /2 −5∗otsup , 0 , [ ’ Sum of FDOD’ num2str ( i t r a j ) ’ ) =’

num2str (FDODsum) ’Hz ’ ] ) ;t i t l e ( ’ TimeDif ference o f S i gna lAr r i va l , ms and FrequencyDi f f e rence o f Arr ivedSigna l , Hz ’ ) ;F( i t r a j −1) = getframe ( gc f ) ;%R = input ( [ ’ p r e s s ente r f o r time moment N’ num2str ( i t r a j ) ] )saveas ( gcf , [ globDirOUT globEXTpar .OUTsub ’28 m tra jPos i t i on ’ num2str ( i t r a j ) ’TRAJECT. jpg ’ ] ) ;c l o s e a l l ;end ;movie (F , 1 ) ;movie2avi (F , [ globDirOUT globEXTpar .OUTsub ’28m trajMovie ’ ] , ’ compression ’ , ’ None ’ )end ;Col={ ’g ’ , ’ c ’ , ’m’ , ’ r ’ , ’ b ’ , ’ y ’ } ;S ty l e ={ ’ − . ’ , ’ : ’ , ’ : ’ , ’ − . ’ , ’ − . ’ , ’ : ’} ;

Page 103: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 103

Mark={ ’∗ ’ , ’< ’ , ’ s ’ , ’ o ’ , ’ d ’ , ’+ ’} ;f o r C plotAntenne =[ ]hold on ;f o r iantenne=1:Nantennef o r i c =1:8

o=randperm (4) ;p lo t3 ( squeeze ( permute ( antenneBourgesPosMic{ iantenne }(o , 1 ) , o ) ) . . .

, squeeze ( permute ( antenneBourgesPosMic{ iantenne }(o , 2 ) , o ) ) . . ., squeeze ( permute ( antenneBourgesPosMic{ iantenne }(o , 3 ) , o ) ) . . ., ’ Color ’ , Col{ i antenne } , ’ L ineSty le ’ , S ty l e { iantenne } , ’ MarkerSize ’ , 1 0 , ’Marker ’ ,Mark{

iantenne } ) ;endend ;g r id on ;view (45 ,45) ;x l ab e l ( [ ’ anthena width ,m’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ anthena length ,m’ ] , ’ FontSize ’ , f s i z e ) ;z l a b e l ( [ ’ anthena height ,m’ ] , ’ FontSize ’ , f s i z e ) ;mins=min ( ce l l 2mat ( antenneBourgesPosMic ’ ) , [ ] , 1 ) ;maxs=max( ce l l2mat ( antenneBourgesPosMic ’ ) , [ ] , 1 ) ;xlim ( [ mins (1) maxs (1) ] ) ;ylim ( [ mins (2) maxs (2) ] ) ;z l im ( [ mins (3 ) maxs (3) ] ) ;l egend ( antenneStr ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub ’ pos mic . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub ’ pos mic . f i g ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub ’ pos mic . eps ’ ] , ’ psc2 ’ ) ;c l o s e a l l ;end ;maxAmpl=111;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−% CYCLE OVER ALL DATA (NOW ONLY ONE RECORDING ”oneforALLbatNums==ALLbatNums” IS USED)%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−f o r i chant=ALLbatNums %nb f i c h i e r :−1:1 %[29 :32 ] %[2:5 1 6 7 ] %1:7 %wrev ( [ 1 5 2 4 3 7 6 ] )[ ’ f o r i chant=’ globEXTcourt{ i chant } ’ C DivsMaxsPers=’ num2str ( C DivsMaxsPers ) ’

iSegmentTrajectory=’ num2str ( iSegmentTrajectory ) ]i f i chant==56, f e =312000; end ;

ovMYmsec=1000/(2∗maxClickFreqHz ) ;startMYmsec=AllSegmentTrajectoryMS{ iSegmentTrajectory }(1) ;otstupTOzero=(AllSegmentTrajectoryMS{ iSegmentTrajectory }(2)−AllSegmentTrajectoryMS{

iSegmentTrajectory }(1) ) /ovMYmsec ;otstup=4; otstup=0; %do 7okt bylo otstup=4;s i zeTrack=(AllSegmentTrajectoryMS{ iSegmentTrajectory }(2)−AllSegmentTrajectoryMS{

iSegmentTrajectory }(1)−otstup∗ovMYmsec) /ovMYmsec ; % s izeTrack=(4000−6∗ovMYmsec) /ovMYmsec ;

i f i chant==57, startMYmsec=7000; s i zeTrack=(AllSegmentTrajectoryMS{ iSegmentTrajectory }(2)−4∗ovMYmsec) /ovMYmsec ; end ;

nb secMYmsec=startMYmsec+s izeTrack ∗ovMYmsec ;vecTimesTracking=startMYmsec :1∗ovMYmsec : nb secMYmsec ; %vecTimesTracking=startMYmsec :1∗ovMYmsec :

nb secMYmsec−ovMYmsec ;t minMs= vecTimesTracking−windowSize∗ovMYmsec ; t maxMs=vecTimesTracking+windowSize∗ovMYmsec ;INDvecTimesTracking=vecTimesTracking∗ indINmsec ;%i f windowSize==1ALLdescrStrCour=[ ’ dt=’ num2str (ovMYmsec) ’ms ’ ] ;%e l s eALLdescrStr =[ ’ dt=’ num2str (ovMYmsec) ’ms , timeWindow=’ num2str ( windowSize∗ovMYmsec) ’ms ’ ] ;%end ;pos mic=antenneBourgesPosMic{anteneINDbat ( i chant ) } ;maxTDOAm=abs (max(max( pos mic ) )−min(min ( pos mic ) ) ) ;maxTDOAms=1000∗maxTDOAm/c ;f o r C 2DcorLIKEHOOD=[1]%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CORRELATION OF SPECTROGRAMS,TDOAiFD (C 2Dspect2DcorTDiFD ) , smooth AND plo t %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fo r C 2DcorTDOA=[1]

f o r C 2Dspect2DcorTDiFD=[1]i f datafrom0cyberio1dodo==0 %ichant<=57

[ globDirIN globEXTpath{ i chant } ]v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;

e l s eload ( [ globDirIN globEXTpar . INsubDODO globEXTpath{ i chant } ] ) ;v=tcu r de t ; c l e a r t cu r de t ;

end ;f o r imic=1:Nmic

s i g=v ( : , imic ) ;

Page 104: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

104 BIBLIOGRAPHY

[ ysAllTime , fsAllTime , tsAllTime , psAllTime ]= spectrogram ( s ig ,256 ,0 ,256 ,250000 , ’ yaxis ’ ) ;d i s t=abs ( fsAllTime−f minHz ( i chant ) ) ;indf min=f ind ( d i s t==min( d i s t ) , 1 , ’ f i r s t ’ ) ;d i s t=abs ( fsAllTime−f maxHz ( ichant ) ) ;indf max=f ind ( d i s t==min( d i s t ) , 1 , ’ l a s t ’ ) ;

f o r i t =1: l ength ( vecTimesTracking )d i s t=abs (1000∗ tsAllTime−t minMs ( i t ) ) ;indt min ( i t )=f i nd ( d i s t==min( d i s t ) , 1 , ’ f i r s t ’ ) ;d i s t=abs (1000∗ tsAllTime−t maxMs( i t ) ) ;indt max ( i t )=f i nd ( d i s t==min( d i s t ) , 1 , ’ l a s t ’ ) ;

end ;indt mid=round ( ( indt min+indt max ) /2) ;

i f p l o tSpec t r==1f i g u r e ;imagesc ( tsAllTime , fsAllTime , log10 ( abs ( psAllTime ) ) ) ;ax i s xy ; t i t l e ( ’ spectrogramme ’ , ’ FontSize ’ , f s i z eB i g ) ;y l ab e l ( ’ Frequences Hz ’ , ’ FontSize ’ , f s i z eB i g ) ;x l ab e l ( ’Temps en s ’ , ’ FontSize ’ , f s i z eB i g )colormap ( f l i p ud ( gray ) )saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’

num2str ( iSegmentTrajectory ) ’ allSPECT mic ’ num2str ( [ imic ] ) ’ . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’

num2str ( iSegmentTrajectory ) ’ allSPECT mic ’ num2str ( [ imic ] ) ’ . eps ’ ] , ’ psc2 ’ );

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’num2str ( iSegmentTrajectory ) ’ allSPECT mic ’ num2str ( [ imic ] ) ’ . f i g ’ ] ) ;

end ;

PercentShow (0 , 1 , ’ c a l c IM . . . ’ , [ ] , f a l s e ) ;f o r i t =1: l ength ( vecTimesTracking )

PercentShow ( i t , l ength ( vecTimesTracking ) , [ da t e s t r ( c l o ck ) ’ c a l c IM f o r ’globEXTcourt{ i chant } ] , [ ] , t rue ) ;

ps=psAllTime ( indf min : indf max , indt min ( i t ) : indt max ( i t ) ) ;ys=ysAllTime ( indf min : indf max , indt min ( i t ) : indt max ( i t ) ) ;f s=fsAl lTime ( indf min : indf max ) ;t s=tsAllTime ( indt min ( i t ) : indt max ( i t ) ) ;i f p l o tPar t sSpec t r==1

f i g u r e ;imagesc ( ts , f s , log10 ( abs ( ps ) ) ) ;ax i s xy ; t i t l e ( ’ spectrogramme ’ , ’ FontSize ’ , f s i z eB i g ) ;y l ab e l ( ’ Frequences Hz ’ , ’ FontSize ’ , f s i z eB i g ) ;x l ab e l ( ’Temps en s ’ , ’ FontSize ’ , f s i z eB i g )colormap ( f l i p ud ( gray ) )saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’

iSegm ’ num2str ( iSegmentTrajectory ) ’ partSPECT mic ’ num2str ( [ imic ] ) ’time=’ num2str ( [ indt min ( i t ) indt max ( i t ) ] ) ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’iSegm ’ num2str ( iSegmentTrajectory ) ’ partSPECT mic ’ num2str ( [ imic ] ) ’

time=’ num2str ( [ indt min ( i t ) indt max ( i t ) ] ) ’ . eps ’ ] , ’ psc2 ’ ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’

iSegm ’ num2str ( iSegmentTrajectory ) ’ partSPECT mic ’ num2str ( [ imic ] ) ’time=’ num2str ( [ indt min ( i t ) indt max ( i t ) ] ) ’ . f i g ’ ] ) ;

end ;

ntb=999; nfb=f c o e f ∗( indf max−indf min ) ;tb=l i n spa c e (min ( t s ) ,max( t s ) , ntb ) ;fb=l i n spa c e (min ( f s ) ,max( f s ) , nfb ) ;

[ tsg , f s g ] = meshgrid ( ts , f s ) ;[ tbg , fbg ] = meshgrid ( tb , fb ) ;pb = inte rp2 ( tsg , f sg , ps , tbg , fbg ) ;

IM{1 , imic , i t}=pb/max(max(pb) ) ;

H=[−1 −1 −1; 2 2 2;−1 −1 −1];V=[−1 2 −1;−1 2 −1;−1 2 −1];P45=[−1 −1 2;−1 2 −1;2 −1 −1];M45=[2 −1 −1;−1 2 −1;−1 −1 2 ] ;

IM{2 , imic , i t}=im f i l t e r (IM{1 , imic , i t } ,V) ;IM{3 , imic , i t}=abs (IM{2 , imic , i t}−mean(mean(IM{2 , imic , i t }) ) ) ;i f p l o tF i l t e r edPa r t sSpe c t r==1

f o r type=1:3f i gu r e ,imagesc ( tb , fb , IM{type , imic , i t }) ;

Page 105: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 105

ax i s xy ; t i t l e ( s t r type { type } , ’ FontSize ’ , f s i z eB i g ) ;y l ab e l ( ’ Frequences Hz ’ , ’ FontSize ’ , f s i z eB i g ) ; x l ab e l ( ’Temps en s ’ , ’

FontSize ’ , f s i z eB i g )colormap ( f l i p ud ( gray ) )saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

’ iSegm ’ num2str ( iSegmentTrajectory ) ’ f i ltSPECT mic ’ s t r type { type}’ mic=’ num2str ( [ imic ] ) ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }’ iSegm ’ num2str ( iSegmentTrajectory ) ’ f i ltSPECT mic ’ s t r type { type}’ mic=’ num2str ( [ imic ] ) ’ . eps ’ ] , ’ psc2 ’ ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }’ iSegm ’ num2str ( iSegmentTrajectory ) ’ f i ltSPECT mic ’ s t r type { type}’ mic=’ num2str ( [ imic ] ) ’ . f i g ’ ] ) ;

end ;end ;c l o s e a l l ;

end ;end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

iSegmentTrajectory ) ’ IM .mat ’ ] , ’ IM’ , ’ psAllTime ’ , ’ ysAllTime ’ , ’ fsAllTime ’ , ’ tsAllTime’ , ’ indt mid ’ , ’ indt min ’ , ’ indt max ’ , ’ indf min ’ , ’ indf max ’ ) ;

end ;%JAN load ( [ globDirOUT globEXTpar .OUTsub ’30m ’ globEXTcourt{ i chant } ’ IM .mat ’ ] ) ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

iSegmentTrajectory ) ’ IM .mat ’ ] ) ;

f o r C 2Dspect2DcorTDiFD=[1]de l tb=tb−tb ( round ( length ( tb ) /2) ) ;d e l f b=fb−fb ( round ( length ( fb ) /2) ) ;f o r imic=1:Nmic

f o r jmic=1: imic−1f o r type=1:3

dfmaxs{type , imic , jmic}=zero s ( l ength ( indt min ) ,Nmax) ;dtmaxs{type , imic , jmic}=zero s ( l ength ( indt min ) ,Nmax) ;PercentShow (0 , 1 , ’ xcorr2 dIM . . . ’ , [ ] , f a l s e ) ;f o r i t =1: l ength ( vecTimesTracking )

PercentShow ( i t , l ength ( vecTimesTracking ) , [ da t e s t r ( c l o ck ) ’ xcorr2 dIMfo r ’ globEXTcourt{ i chant } ’ type ’ num2str ( type ) ] , [ ] , t rue ) ;

dIM{ type , imic , jmic}=xcorr2 (IM{ type , imic , i t } ,IM{ type , jmic , i t }) ;maximax=−2∗max(max(dIM{type , imic , jmic }) )∗ones (1 , 3 ) ;dIMcurr=dIM{ type , imic , jmic } ;d f v o i s i n=round ( s i z e ( dIMcurr , 1 ) /30) ;d t vo i s i n=round ( s i z e ( dIMcurr , 2 ) /30) ;f o r imax=1:Nmax

maximax( imax )=max(max( dIMcurr ) ) ;[ fdIM{imax , type } , tdIM{imax , type}]= f i nd ( dIMcurr==maximax( imax ) ) ;f o r i d f=−d f v o i s i n : d f v o i s i nf o r i d t=−d tvo i s i n : d t vo i s i ncurd f=fdIM{imax , type}+id f ;curdt=tdIM{imax , type}+id t ;i f curdf>=1 && curdf<=s i z e ( dIMcurr , 1 ) && curdt>=1 && curdt<=s i z e (

dIMcurr , 2 )dIMcurr ( fdIM{imax , type}+id f , tdIM{imax , type}+id t )=−2∗maximax( imax ) ;endend ;end ;

end ;f o r imax=1:Nmax

percfdDV{imax , type}=100∗ fdIM{imax , type}/ s i z e (dIM{type , imic , jmic } ,1) ;perctdDV{imax , type}=100∗tdIM{imax , type}/ s i z e (dIM{type , imic , jmic } ,2) ;d o l f=fdIM{imax , type}/ s i z e (dIM{type , imic , jmic } ,1) ;do l t=tdIM{imax , type}/ s i z e (dIM{type , imic , jmic } ,2) ;herzfdDV{imax , type}=de l f b ( round ( do l f ∗ l ength ( de l f b ) ) ) ;timetdDV{imax , type}=de l tb ( round ( do l t ∗ l ength ( de l tb ) ) ) ;dfmaxs{type , imic , jmic }( i t , imax )=herzfdDV{imax , type } ;dtmaxs{type , imic , jmic }( i t , imax )=timetdDV{imax , type } ;dfmaxs{type , jmic , imic }( i t , imax )=−herzfdDV{imax , type } ;dtmaxs{type , jmic , imic }( i t , imax )=−timetdDV{imax , type } ;

end ;end ;

end ;end ;

end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

iSegmentTrajectory ) ’ dIM .mat ’ ] , ’ dfmaxs ’ , ’ dtmaxs ’ , ’ dIM ’ , ’ fdIM ’ , ’ tdIM ’ , ’ deltb ’ , ’ de l fb’ ) ;

save ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

Page 106: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

106 BIBLIOGRAPHY

iSegmentTrajectory ) ’ DopDel .mat ’ ] , ’ percfdDV ’ , ’ perctdDV ’ , ’ herzfdDV ’ , ’ timetdDV ’ , ’dfmaxs ’ , ’ dtmaxs ’ ) ;

end ;%JAN load ( [ globDirOUT globEXTpar .OUTsub ’30m ’ globEXTcourt{ i chant } ’ IM .mat ’ ] ) ; %10MAY

indt mid=round ( indt mid /2) ;%JAN load ( [ globDirOUT globEXTpar .OUTsub ’30m ’ globEXTcourt{ i chant } ’ dIM .mat ’ ] ) ;%JAN load ( [ globDirOUT globEXTpar .OUTsub ’30m ’ globEXTcourt{ i chant } ’ DopDel .mat ’ ] ) ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

iSegmentTrajectory ) ’ IM .mat ’ ] ) ; %10MAY indt mid=round ( indt mid /2) ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

iSegmentTrajectory ) ’ dIM .mat ’ ] ) ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ iSegm ’ num2str (

iSegmentTrajectory ) ’ DopDel .mat ’ ] ) ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

f o r C ou l i e rTresh =[1] %[999 0 . 0 01 ] %us ing dIMdisp ( [ da t e s t r (now) ’ C ou l i e rTresh=’ num2str ( C ou l i e rTresh ) ] ) ;f o r ism=1:Nmic

f o r jsm=1: ism−1f o r type=1:3

dfmaxsMall=mean( dfmaxs{ type , ism , jsm } ,1) ;dtmaxsMall=mean( dtmaxs{ type , ism , jsm } ,1) ;d fmaxsSal l=std ( dfmaxs{ type , ism , jsm } ,1) ;dtmaxsSal l=std ( dtmaxs{ type , ism , jsm } ,1) ;f o r i t =3: l ength ( indt min )−2

f o r imax=1:Nmaxi f dfmaxs{type , ism , jsm }( i t , imax )<dfmaxsMall ( imax )−dfmaxsSal l ( imax )∗

C oul i e rTresh | | dfmaxs{ type , ism , jsm }( i t , imax )>dfmaxsMall ( imax )+dfmaxsSal l ( imax )∗C oul i e rTresh

dfmaxsNeibs=(dfmaxs{ type , ism , jsm }( i t −1,imax )+dfmaxs{type , ism , jsm }( i t+1,imax )+dfmaxs{ type , ism , jsm }( i t −2,imax )+dfmaxs{type , ism , jsm }( i t+2,imax ) ) /4 ;

dfmaxsMaxsDist=abs ( dfmaxs{ type , ism , jsm }( i t , : )−dfmaxsNeibs ) ;dfmaxsMaxs=dfmaxs{type , ism , jsm }( i t , f i nd ( dfmaxsMaxsDist==min(

dfmaxsMaxsDist ) , 1 , ’ f i r s t ’ ) ) ;dfmaxs{type , ism , jsm }( i t , imax )=(dfmaxsNeibs+dfmaxsMaxs ) /2 ;end ;i f dtmaxs{type , ism , jsm }( i t , imax )<dtmaxsMall ( imax )−dtmaxsSal l ( imax )∗

C oul i e rTresh | | dtmaxs{ type , ism , jsm }( i t , imax )>dtmaxsMall ( imax )+dtmaxsSal l ( imax )∗C oul i e rTresh

dtmaxsNeibs=(dtmaxs{ type , ism , jsm }( i t −1,imax )+dtmaxs{type , ism , jsm }( i t+1,imax )+dtmaxs{ type , ism , jsm }( i t −2,imax )+dtmaxs{type , ism , jsm }( i t+2,imax ) ) /2 ;

dtmaxsMaxsDist=abs ( dtmaxs{ type , ism , jsm }( i t , : )−dtmaxsNeibs ) ;dtmaxsMaxs=dtmaxs{type , ism , jsm }( i t , f i nd ( dtmaxsMaxsDist==min(

dtmaxsMaxsDist ) , 1 , ’ f i r s t ’ ) ) ;dtmaxs{type , ism , jsm }( i t , imax )=(dtmaxsNeibs+dtmaxsMaxs ) /2 ;end ;

end ;f o r zz=vecPlotZoomsOfCorrs

f i gu r e ,imagesc ( deltb , de l fb , dIM{type , ism , jsm }) ;ax i s xy ; t i t l e ( [ s t r type { type} ’ d f=’ num2str ( [ dfmaxs{ type , ism , jsm }(

i t , : ) ] ) ’ dt=’ num2str ( [ 0 . 0 1∗ round (100∗dtmaxs{ type , ism , jsm }( i t, : ) ) ] ) ] , ’ FontSize ’ , f s i z e ) ;

y l ab e l ( ’ Frequences Hz ’ , ’ FontSize ’ , f s i z e ) ; x l ab e l ( ’Temps en s ’ , ’FontSize ’ , f s i z e )

colormap ( f l i p ud ( gray ) ) ; zoom( zz ) ;begde l fb=1+round ( length ( de l f b ) /2)−round ( length ( de l f b ) /2/ zz ) ;begde l tb=1+round ( length ( de l tb ) /2)−round ( length ( de l tb ) /2/ zz ) ;endde l fb=round ( length ( de l f b ) /2)+round ( length ( de l f b ) /2/ zz )−1;enddeltb=round ( length ( de l tb ) /2)+round ( length ( de l tb ) /2/ zz )−1;i f l abe l 0 range1 s imp l e==0y l abe l ( [ num2str (0 .01∗ round (100∗ de l f b ( begde l fb ) ) ) ’ < Freq ,Hz < ’

num2str (0 .01∗ round (100∗ de l f b ( endde l fb ) ) ) ] , ’ FontSize ’ , f s i z e ) ;x l ab e l ( [ num2str (0 .01∗ round (100∗ de l tb ( begde l tb ) ) ) ’ < Temps , s < ’

num2str (0 .01∗ round (100∗ de l tb ( enddeltb ) ) ) ] , ’ FontSize ’ , f s i z e ) ;e l s ey l ab e l ( [ ’ Freq ,Hz ’ ] , ’ FontSize ’ , f s i z e ) ;x l ab e l ( [ ’ Temps , s ’ ] , ’ FontSize ’ , f s i z e ) ;end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{

i chant } ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ ’ s t r type { type}’ t =’ num2str ( i t ) ’ SMOOTH mic1 , mic2 , thresh= ’ num2str ( [ ism jsmC oul i e rTresh ] ) ’ zoom ’ num2str ( zz ) ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{i chant } ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ ’ s t r type { type}

Page 107: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 107

’ t =’ num2str ( i t ) ’ SMOOTH mic1 , mic2 , thresh= ’ num2str ( [ ism jsmC oul i e rTresh ] ) ’ zoom ’ num2str ( zz ) ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{i chant } ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ ’ s t r type { type}’ t =’ num2str ( i t ) ’ SMOOTH mic1 , mic2 , thresh= ’ num2str ( [ ism jsmC oul i e rTresh ] ) ’ zoom ’ num2str ( zz ) ’ . jpg ’ ] ) ;

c l o s e a l l ;end ;

end ;end ;

end ;end ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−f o r C plotDopDelorigIsmooth =[ ]

d i sp ( [ da t e s t r (now) ’ C plotDopDelorigIsmooth=’ num2str ( C plotDopDelorigIsmooth ) ] ) ;f o r i p l =1:Nmic

%LineSty l eS t r ={ ’− ’ , ’−− ’ , ’− . ’ , ’ : ’} ; MarkerStr={ ’o ’ , ’ d ’ , ’+ ’ , ’ x ’ } ;f o r j p l =1: ip l −1

f o r type=1:3s c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;subplot (2 , 3 , 1 ) ; hold on ;f o r jmax=1:Nmax

p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dfmaxs{ type , i p l , j p l } ,1) ) , dfmaxs{ type , i p l , j p l } ( : , jmax ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , L ineSty l eS t r {1 , jmax } , ’ MarkerSize ’ , msize , ’ Marker’ , MarkerStr {1 , jmax}) ;% . . .

%p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dfmaxs{ type , i p l , j p l } ,1) ) , dfmaxs{ type , i p l , j p l } ( : , 2 ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , ’−− ’ , ’ MarkerSize ’ , msize , ’ Marker ’ , ’ d ’ ) ;% . . .

%p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dfmaxs{ type , i p l , j p l } ,1) ) , dfmaxs{ type , i p l , j p l } ( : , 3 ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , ’ − . ’ , ’ MarkerSize ’ , msize , ’ Marker ’ , ’+ ’ ) ;% . . .

%p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dfmaxs{ type , i p l , j p l } ,1) ) , dfmaxs{ type , i p l , j p l } ( : , 4 ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , ’ : ’ , ’ MarkerSize ’ , msize , ’ Marker ’ , ’ x ’ ) ;% . . .

end ;i f l abe l 0 range1 s imp l e==0

x l abe l ( [ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid (1) ) ) ) ’ < Temps , s< ’ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid ( end ) ) ) ) ] , ’FontSize ’ , f s i z e ) ;

y l ab e l ( [ num2str (0 .01∗ round (100∗min( dfmaxs{ type , i p l , j p l } ( 1 , : ) ) ) ) ’ <Hz( ends )< ’ num2str (0 .01∗ round (100∗max( dfmaxs{ type , i p l , j p l }( end, : ) ) ) ) ] , ’ FontSize ’ , f s i z e ) ;

e l s ex l ab e l ( [ ’ Temps , s ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ Hz( ends ) ’ ] , ’ FontSize ’ , f s i z e ) ;

end ;t i t l e ( ’ Doppler e f f e c t a l l maxs ’ , ’ FontSize ’ , f s i z e ) ;f o r imax=1:min (2 ,Nmax)

subplot (2 ,3 ,1+ imax ) ;p l o t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (

dfmaxs{ type , i p l , j p l } ,1) ) , dfmaxs{ type , i p l , j p l } ( : , imax ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , L ineSty l eS t r { imax } , ’ MarkerSize ’ , msize , ’ Marker ’ ,MarkerStr{ imax}) ;% . . .

%legend ( [ ’max ’ num2str ( imax ) ] , ’ Location ’ , ’ Best ’ , ’ FontSize ’ , f s i zeSm ) ;i f l abe l 0 range1 s imp l e==0ax i s ( [ min ( tsAllTime ( indt mid ) ) max( tsAllTime ( indt mid ) ) mean( dfmaxs{

type , i p l , j p l } ( : , imax ) )−std ( dfmaxs{type , i p l , j p l } ( : , imax ) ) mean(dfmaxs{ type , i p l , j p l } ( : , imax ) )+std ( dfmaxs{ type , i p l , j p l } ( : , imax ) )] ) ;

x l ab e l ( [ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid (1) ) ) ) ’ < Temps , s< ’ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid ( end ) ) ) ) ] , ’FontSize ’ , f s i z e ) ;

y l ab e l ( [ num2str (0 .01∗ round (100∗min( dfmaxs{ type , i p l , j p l } ( : , imax ) ) ) ) ’< Hz < ’ num2str (0 .01∗ round (100∗max( dfmaxs{ type , i p l , j p l } ( : , imax) ) ) ) ] , ’ FontSize ’ , f s i z e ) ;

e l s ex l ab e l ( [ ’ Temps , s ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ Hz ’ ] , ’ FontSize ’ , f s i z e ) ;end ;t i t l e ( [ ’ Doppler e f f e c t max ’ num2str ( imax ) ] , ’ FontSize ’ , f s i z e ) ;

end ;subplot (2 , 3 , 4 ) ; hold on ;f o r jmax=1:Nmax

p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dtmaxs{ type , i p l , j p l } ,1) ) , dtmaxs{ type , i p l , j p l } ( : , jmax ) , ’ LineWidth

Page 108: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

108 BIBLIOGRAPHY

’ , 2 , ’ L ineSty le ’ , L ineSty l eS t r {1 , jmax } , ’ MarkerSize ’ , msize , ’ Marker’ , MarkerStr {1 , jmax}) ;% . . .

%p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dtmaxs{ type , i p l , j p l } ,1) ) , dtmaxs{ type , i p l , j p l } ( : , 2 ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , ’−− ’ , ’ MarkerSize ’ , msize , ’ Marker ’ , ’ d ’ ) ;% . . .

%p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dtmaxs{ type , i p l , j p l } ,1) ) , dtmaxs{ type , i p l , j p l } ( : , 3 ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , ’ − . ’ , ’ MarkerSize ’ , msize , ’ Marker ’ , ’+ ’ ) ;% . . .

%p lo t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (dtmaxs{ type , i p l , j p l } ,1) ) , dtmaxs{ type , i p l , j p l } ( : , 4 ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , ’ : ’ , ’ MarkerSize ’ , msize , ’ Marker ’ , ’ x ’ ) ;% . . .

end ;i f l abe l 0 range1 s imp l e==0

x l abe l ( [ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid (1) ) ) ) ’ < Temps , s< ’ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid ( end ) ) ) ) ] , ’FontSize ’ , f s i z e ) ;

y l ab e l ( [ num2str (0 .01∗ round (100∗min( dtmaxs{ type , i p l , j p l } ( 1 , : ) ) ) ) ’ <s( ends )< ’ num2str (0 .01∗ round (100∗max( dtmaxs{ type , i p l , j p l }( end , : )) ) ) ] , ’ FontSize ’ , f s i z e ) ;

e l s ex l ab e l ( [ ’ Temps , s ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ s ( ends ) ’ ] , ’ FontSize ’ , f s i z e ) ;

end ;t i t l e ( ’ Delay a l l maxs ’ , ’ FontSize ’ , f s i z e ) ;f o r imax=1:min (2 ,Nmax)

subplot (2 ,3 ,4+ imax ) ;p l o t ( l i n s pa c e ( tsAllTime ( indt mid (1) ) , tsAllTime ( indt mid ( end ) ) , s i z e (

dtmaxs{ type , i p l , j p l } ,1) ) , dtmaxs{ type , i p l , j p l } ( : , imax ) , ’ LineWidth’ , 2 , ’ L ineSty le ’ , L ineSty l eS t r { imax } , ’ MarkerSize ’ , msize , ’ Marker ’ ,MarkerStr{ imax}) ;% . . .

%legend ( [ ’max ’ num2str ( imax ) ] , ’ Location ’ , ’ Best ’ , ’ FontSize ’ , f s i zeSm ) ;i f l abe l 0 range1 s imp l e==0ax i s ( [ min ( tsAllTime ( indt mid ) ) max( tsAllTime ( indt mid ) ) mean( dtmaxs{

type , i p l , j p l } ( : , imax ) ) −0.3∗ std ( dtmaxs{ type , i p l , j p l } ( : , imax ) )mean( dtmaxs{type , i p l , j p l } ( : , imax ) )+0.3∗ std ( dtmaxs{ type , i p l , j p l} ( : , imax ) ) ] ) ;

x l ab e l ( [ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid (1) ) ) ) ’ < Temps , s< ’ num2str (0 .01∗ round (100∗ tsAllTime ( indt mid ( end ) ) ) ) ] , ’FontSize ’ , f s i z e ) ;

y l ab e l ( [ num2str (0 .01∗ round (100∗min( dtmaxs{ type , i p l , j p l } ( : , imax ) ) ) ) ’< s < ’ num2str (0 .01∗ round (100∗max( dtmaxs{type , i p l , j p l } ( : , imax )) ) ) ] , ’ FontSize ’ , f s i z e ) ;

e l s ex l ab e l ( [ ’ Temps , s ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ s ’ ] , ’ FontSize ’ , f s i z e ) ;end ;t i t l e ( [ ’ Delay max ’ num2str ( imax ) ] , ’ FontSize ’ , f s i z e ) ;

end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

’ iSegm ’ num2str ( iSegmentTrajectory ) ’DopDel ’ s t r type { type} ’ mic1 ,mic2 , thresh= ’ num2str ( [ i p l j p l C ou l i e rTresh ] ) ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }’ iSegm ’ num2str ( iSegmentTrajectory ) ’DopDel ’ s t r type { type} ’ mic1 ,mic2 , thresh= ’ num2str ( [ i p l j p l C ou l i e rTresh ] ) ’ . f i g ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }’ iSegm ’ num2str ( iSegmentTrajectory ) ’DopDel ’ s t r type { type} ’ mic1 ,mic2 , thresh= ’ num2str ( [ i p l j p l C ou l i e rTresh ] ) ’ . eps ’ ] , ’ psc2 ’ ) ;

c l o s e a l l ;end

endend ;

end ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

end ;end ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LIKEHOOD %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fo r C likehood2D =[]

d i sp ( [ da t e s t r (now) ’ C likehood2D C likehood2D C likehood2D LIKEHOOD’ ] ) ;ca lcLikehood=1;% indf min=20; %25% indf max=85; %80% indt min= 900−(−1)∗200:2∗60:2300+(−1) ∗200;% indt max=1100−(−1)∗200:2∗60:2500+(−1) ∗200;delXY=maxXYZ/3 ;delV=(maxVel−minVel ) /6 ;

Page 109: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 109

vecXY=0.5∗delXY : delXY :3∗maxXYZ; NvecXY=length (vecXY) ;vecV=minVel : delV : maxVel ; NvecV=length ( vecV ) ;a r r i v e d f s=c e l l (NvecXY ,NvecXY ,NvecV ,NvecV , Nmic) ;a r r i v e d t s=c e l l (NvecXY ,NvecXY ,NvecV ,NvecV , Nmic) ;a r r i v edps=c e l l (NvecXY ,NvecXY ,NvecV ,NvecV , Nmic) ;a r r i v edy s=c e l l (NvecXY ,NvecXY ,NvecV ,NvecV , Nmic) ;a l l c o r r=c e l l (NvecXY ,NvecXY ,NvecV ,NvecV ,Nmic , Nmic) ;l i kehood=c e l l (NvecXY ,NvecXY ,NvecV ,NvecV) ;f o r i s e n s =1:Nmic

f o r ix =1:NvecXY ,f o r iy =1:NvecXY

fo r ivx=1:NvecV ,f o r ivy=1:NvecV

l ikehood { ix , iy , ivx , ivy}=zero s (NvecXY ,NvecXY ,NvecV ,NvecV , Nmic) ;end ;

end ;end ;

end ;end ;

ivar iantMic =1;%load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTpath0{ i chant } ’ALL.

wav a l l v a r s .mat ’ ] ) ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } ’ IM .mat ’ ] ) ;f o r i t =1: l ength ( vecTimesTracking )

i f ca lcLikehood==1f o r ix =1:NvecXY , [ da t e s t r (now) ’ ix=’ num2str ( ix ) ]

f o r iy =1:NvecXYfo r ivx=1:NvecV ,

f o r ivy=1:NvecV%load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( [ i var iantMic ] )

’ ’ globEXTcourt{ i chant } ’Time=’ num2str ( [ indt min ( i t ) indt max (i t ) ] ) ’ . mat ’ ] ) ;

ps=psAllTime ( indf min : indf max , indt min ( i t ) : indt max ( i t ) ) ;ys=ysAllTime ( indf min : indf max , indt min ( i t ) : indt max ( i t ) ) ;f s=fsAl lTime ( indf min : indf max ) ;t s=tsAllTime ( indt min ( i t ) : indt max ( i t ) ) ;f o r i s e n s =1:Nmicvec tosens=sensS1XY2 ( i s ens , : ) −[vecXY( ix ) vecXY( iy ) 0 ] ;ab sd i s t t o s en s=sq r t ( squeeze ( vec to sens )∗ squeeze ( vec to sens ) ’ ) ;dsec=ab sd i s t t o s en s /c ;dsec IndStar t=round ( dsec /mean( d i f f ( t s ) ) ) ; dsecIndLen=length ( t s )−abs (

dsec IndStar t )−1;i f dsecIndLen <0, e r r o r ( ’ dsecIndLen<0 : a r r i v a l dsec too big :

d i f f e r e n t s en so r s r e c e i v e d i f f e r e n t subspectrograms ’ ) ; end ;i f dsecIndStart >0newtsvec=dsec IndStar t : dsec IndStar t+dsecIndLen ;o ld t sv e c=1:1+dsecIndLen ;e l s enewtsvec=1:1+dsecIndLen ;o ld t sv e c=1+abs ( dsec IndStar t ) :1+abs ( dsec IndStar t )+dsecIndLen ;end

ve l t o s en s =[vecV ( ivx ) vecV ( ivy ) 0 ]∗ vectosens ’ / ab sd i s t t o s en s ;d f r eq=−( f r eq0 /c )∗ ve l t o s en s ;d f r eq IndSta r t=round ( d f r eq /mean( d i f f ( f s ) ) ) ; dfreqIndLen=length ( f s )−

abs ( d f r eq IndSta r t )−1;i f dfreqIndLen <0, e r r o r ( ’ dfreqIndLen<0 : a r r i v a l d f r eq too big : out

o f subspectrogram ’ ) ; end ;i f d f reqIndStart >0newfsvec=df r eq IndSta r t : d f r eq IndSta r t+dfreqIndLen ;o l d f s v e c=1:1+dfreqIndLen ;e l s enewfsvec=1:1+dfreqIndLen ;o l d f s v e c=1+abs ( d f r eq IndSta r t ) :1+abs ( d f r eq IndSta r t )+dfreqIndLen ;enda r r i v e d f s { ix , iy , ivx , ivy , i s e n s}=f s+df req ;a r r i v e d t s { ix , iy , ivx , ivy , i s e n s}=ts+dsec ;a r r i v edps { ix , iy , ivx , ivy , i s e n s}=ps ;%ar r i v edps { ix , iy , ivx , ivy , i s e n s}=imnoise ( imnoise ( imnoise ( imnoise (

imnoise ( imnoise ( imnoise ( ps , ’ poisson ’ ) , ’ poisson ’ ) , ’ poisson ’ ) , ’poisson ’ ) , ’ poisson ’ ) , ’ poisson ’ ) , ’ s a l t & pepper ’ , 0 . 0 6 ) ;

a r r i v edps { ix , iy , ivx , ivy , i s e n s }( newfsvec , newtsvec )=ps ( o ld f svec ,o l d t sv e c ) ;

%ar r i v edps { ix , iy , ivx , ivy , i s e n s }( newfsvec , newtsvec )=imnoise ( imnoise (imnoise ( imnoise ( a r r i v edps { ix , iy , ivx , ivy , i s e n s }( newfsvec , newtsvec) , ’ poisson ’ ) , ’ poisson ’ ) , ’ poisson ’ ) , ’ s a l t & pepper ’ , 0 . 0 2 ) ;

Page 110: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

110 BIBLIOGRAPHY

a r r i v edys { ix , iy , ivx , ivy , i s e n s}=ys ; a r r i v edy s { ix , iy , ivx , ivy , i s e n s }(newfsvec , newtsvec )=ys ( o ld f svec , o l d t sv e c ) ;

end ;end ;

end ;end ;

end ;[’−−−−−−−−−−−−−−−−−−−−−− s t a r t l i kehood cyc l e −−−−−−−−−−−−−−−−−−−−−−− ’ d a t e s t r (now)

]f o r i s e n s =1:Nmic

f o r ix =1:NvecXY , [ da t e s t r (now) ’ ix=’ num2str ( ix ) ]f o r iy =1:NvecXY ,

f o r ivx=1:NvecV ,f o r ivy=1:NvecV ,f o r jx=ix +1:NvecXY ,f o r jy=iy +1:NvecXYfo r jvx=ivx+1:NvecV ,f o r jvy=ivy+1:NvecV%tmp=max(max( xcorr2 ( a r r i v edps { ix , iy , ivx , ivy , i s e n s } , a r r i v edps { jx , jy ,

jvx , jvy , i s e n s }) ) ) ;tmp=dot ( reshape ( a r r i v edps { ix , iy , ivx , ivy , i s e n s } , 1 , [ ] ) , reshape (

a r r i v edps { jx , jy , jvx , jvy , i s e n s } , 1 , [ ] ) ) ;l i kehood { ix , iy , ivx , ivy }( jx , jy , jvx , jvy , i s e n s )=tmp ;l ikehood { jx , jy , jvx , jvy }( ix , iy , ivx , ivy , i s e n s )=tmp ;%tmpend ;end ;end ;end ;end ;

end ;end ;

end ;end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( [ i t ] ) ’ ’ globEXTcourt{ i chant } ’

ArrivedToALLS .mat ’ ] , ’ l ikehood ’ , ’ a r r i v ed f s ’ , ’ a r r i v ed t s ’ , ’ a r r ivedps ’ , ’ a r r ivedys ’ ) ;e l s e

load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( [ i t ] ) ’ ’ globEXTcourt{ i chant } ’ArrivedToALLS .mat ’ ] ) ;

end ;

i s e n s =1; ix=round (NvecXY/2) ; iy=round (NvecXY/2) ; ivx=round (NvecV/2) ; ivy=round (NvecV/2) ; jx=round (NvecXY/2) ; jy=round (NvecXY/2) ; jvx=round (NvecV/2) ; jvy=round (NvecV/2) ;

f o r i s e n s =1:Nmics c r s z=get (0 , ’ ScreenSize ’ ) ; f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ; i p l o t =0;f o r ix =1:NvecXY ,

f o r iy =1:NvecXY ,i p l o t=i p l o t +1; subplot (NvecXY ,NvecXY , i p l o t ) ;imagesc ( a r r i v e d t s { ix , iy , ivx , ivy , i s e n s } , a r r i v e d f s { ix , iy , ivx , ivy , i s e n s } , l og10 (

abs ( a r r i v edps { ix , iy , ivx , ivy , i s e n s }) ) ) ;colormap ( f l i p ud ( gray ) ) ; ax i s o f f ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ spectToS ’ num2str ( i s e n s ) ’XYw4m. jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ spectToS ’ num2str ( i s e n s ) ’XYw4m. eps ’ ] , ’ psc2 ’ ) ;end ;

end ;c l o s e a l l

end ;

i s e n s =1; ix=round (NvecXY/2) ; iy=round (NvecXY/2) ; ivx=round (NvecV/2) ; ivy=round (NvecV/2) ; jx=round (NvecXY/2) ; jy=round (NvecXY/2) ; jvx=round (NvecV/2) ; jvy=round (NvecV/2) ;

f o r i s e n s =1:Nmics c r s z=get (0 , ’ ScreenSize ’ ) ; f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ; i p l o t =0;f o r ix =1:NvecXY ,

f o r iy =1:NvecXY ,i p l o t=i p l o t +1; subplot (NvecXY ,NvecXY , i p l o t ) ;imagesc ( squeeze ( l ikehood { ix , iy , ivx , ivy } ( : , : , jvx , jvy , i s e n s ) ) ) ;ax i s o f f ; colormap ( f l i p ud ( gray ) ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ spectToS ’ num2str ( i s e n s ) ’XY−Likehoodw4m . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ spectToS ’ num2str ( i s e n s ) ’XY−Likehoodw4m . eps ’ ] , ’ psc2 ’ ) ;end ;

end ;c l o s e a l l

end ;

Page 111: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 111

i s e n s =1; ix=round (NvecXY/2) ; iy=round (NvecXY/2) ; ivx=round (NvecV/2) ; ivy=round (NvecV/2) ; jx=round (NvecXY/2) ; jy=round (NvecXY/2) ; jvx=round (NvecV/2) ; jvy=round (NvecV/2) ;

s c r s z=get (0 , ’ ScreenSize ’ ) ; f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ; i p l o t =0;f o r ix =[1 round (NvecXY/2) NvecXY ] ,

f o r iy =[1 round (NvecXY/2) NvecXY ] ,f o r i s e n s =1:Nmic

i p l o t=i p l o t +1; subplot ( 9 , (Nmic+1) , i p l o t ) ;imagesc ( a r r i v e d t s { ix , iy , ivx , ivy , i s e n s } , a r r i v e d f s { ix , iy , ivx , ivy , i s e n s } , l og10 (

abs ( a r r i v edps { ix , iy , ivx , ivy , i s e n s }) ) ) ;colormap ( f l i p ud ( gray ) ) ; ax i s o f f ;

end ;i p l o t=i p l o t +1; subplot ( 9 , (Nmic+1) , i p l o t ) ; imagesc ( squeeze ( l i kehood { ix , iy , ivx , ivy

} ( : , : , jvx , jvy , i s e n s ) ) ) ; ax i s o f f ;end ;

end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } num2str ( [ i t ] ) ’

a l lSpectToS ’ num2str ( i s e n s ) ’XY−Likehoodw4m . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } num2str ( [ i t ] ) ’

a l lSpectToS ’ num2str ( i s e n s ) ’XY−Likehoodw4m . eps ’ ] , ’ psc2 ’ ) ;c l o s e a l l ;

i s e n s =1; ix=round (NvecXY/2) ; iy=round (NvecXY/2) ; ivx=round (NvecV/2) ; ivy=round (NvecV/2) ; jx=round (NvecXY/2) ; jy=round (NvecXY/2) ; jvx=round (NvecV/2) ; jvy=round (NvecV/2) ;

f o r i s e n s =1:Nmics c r s z=get (0 , ’ ScreenSize ’ ) ; f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ; i p l o t =0;f o r ivx=1:NvecV ,

f o r ivy=1:NvecV ,i p l o t=i p l o t +1; subplot (NvecV ,NvecV , i p l o t ) ;imagesc ( a r r i v e d t s { ix , iy , ivx , ivy , i s e n s } , a r r i v e d f s { ix , iy , ivx , ivy , i s e n s } , l og10 (

abs ( a r r i v edps { ix , iy , ivx , ivy , i s e n s }) ) ) ;colormap ( f l i p ud ( gray ) ) ; ax i s o f f ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ SpectToS ’ num2str ( i s e n s ) ’VxVyw4m. jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ SpectToS ’ num2str ( i s e n s ) ’VxVyw4m. eps ’ ] , ’ psc2 ’ ) ;end ;

end ;c l o s e a l l

end ;

i s e n s =1; ix=round (NvecXY/2) ; iy=round (NvecXY/2) ; ivx=round (NvecV/2) ; ivy=round (NvecV/2) ; jx=round (NvecXY/2) ; jy=round (NvecXY/2) ; jvx=round (NvecV/2) ; jvy=round (NvecV/2) ;

f o r i s e n s =1:Nmics c r s z=get (0 , ’ ScreenSize ’ ) ; f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ; i p l o t =0;f o r ivx=1:NvecV ,

f o r ivy=1:NvecV ,i p l o t=i p l o t +1; subplot (NvecV ,NvecV , i p l o t ) ;imagesc ( squeeze ( l ikehood { ix , iy , ivx , ivy }( jx , jy , : , : , i s e n s ) ) ) ;max(max( l ikehood { ix , iy , ivx , ivy }( jx , jy , : , : , i s e n s ) ) )−min(min ( l ikehood { ix , iy ,

ivx , ivy }( jx , jy , : , : , i s e n s ) ) )ax i s o f f ; colormap ( f l i p ud ( gray ) ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ SpectToS ’ num2str ( i s e n s ) ’VxVy−Likehoodw4m . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant }

num2str ( [ i t ] ) ’ SpectToS ’ num2str ( i s e n s ) ’VxVy−Likehoodw4m . eps ’ ] , ’ psc2 ’ ) ;end ;

end ;c l o s e a l l

end ;i s e n s =1; ix=round (NvecXY/2) ; iy=round (NvecXY/2) ; ivx=round (NvecV/2) ; ivy=round (NvecV/2) ; jx=

round (NvecXY/2) ; jy=round (NvecXY/2) ; jvx=round (NvecV/2) ; jvy=round (NvecV/2) ;s c r s z=get (0 , ’ ScreenSize ’ ) ; f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ; i p l o t =0;f o r ivx=[1 round (NvecV/2) NvecV ] ,

f o r ivy=[1 round (NvecV/2) NvecV ] ,f o r i s e n s =1:Nmic

i p l o t=i p l o t +1; subplot ( 9 , (Nmic+1) , i p l o t ) ;imagesc ( a r r i v e d t s { ix , iy , ivx , ivy , i s e n s } , a r r i v e d f s { ix , iy , ivx , ivy , i s e n s } , l og10 (

abs ( a r r i v edps { ix , iy , ivx , ivy , i s e n s }) ) ) ;colormap ( f l i p ud ( gray ) ) ; ax i s o f f ;

end ;i p l o t=i p l o t +1; subplot ( 9 , (Nmic+1) , i p l o t ) ; imagesc ( squeeze ( l i kehood { ix , iy , ivx , ivy

}( jx , jy , : , : , i s e n s ) ) ) ; ax i s o f f ;end ;

end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } num2str ( [ i t ] ) ’

ALLSpectToS ’ num2str ( i s e n s ) ’VxVy−Likehoodw4m . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le globEXTcourt{ i chant } num2str ( [ i t ] ) ’

Page 112: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

112 BIBLIOGRAPHY

ALLSpectToS ’ num2str ( i s e n s ) ’VxVy−Likehoodw4m . eps ’ ] , ’ psc2 ’ ) ;c l o s e a l l ;

end ;end ;end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% BEGIN CORRELATION OF SIGNALS AND REFINE TDOA TIME CALCULATION%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fo r C cor =[0] %[−1 1 0 ]t i cd i sp ( [ da t e s t r (now) ’ C 1DcorTDOArefineIentropy C 1DcorTDOArefineIentropy CORRELATION OF SIGNALS

AND REFINE TDOA’ ] ) ;maxKHZ=100;plotTIME=c e l l ( nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;plotTDOA1=c e l l ( nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;plotTDOA=c e l l ( l ength ( vecALL percTDOArefine ) , nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;plotHmax1=c e l l ( nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;plotHmax=c e l l ( l ength ( vecALL percTDOArefine ) , nb f i c h i e r , l ength ( micro ) , l ength ( micro ) ) ;FFTindexKHZ=c e l l ( nb f i c h i e r , l ength ( micro ) ) ; dfmaxsSIG=c e l l ( s i z e ( dfmaxs ) ) ; dtmaxsSIG=c e l l ( s i z e (

dtmaxs ) ) ;f o r C INDpercTDOArefine=1: l ength ( vecALL percTDOArefine )

C percTDOArefine=vecALL percTDOArefine (C INDpercTDOArefine ) ;d e l a i = [ ] ; t d e l a i =0;micro gard=micro ;f o r imic=1: l ength ( micro gard )

FFTindexKHZ{ nb f i c h i e r , imic}=zero s ( l ength ( vecTimesTracking ) ,maxKHZ) ;f o r jmic=1: l ength ( micro gard )

f o r type=1:3dfmaxsSIG{ type , imic , jmic}=zero s ( l ength ( vecTimesTracking ) , nb td ) ;dtmaxsSIG{ type , imic , jmic}=zero s ( l ength ( vecTimesTracking ) , nb td ) ;

end ;end ;

end ;tr ALL=c e l l (1 , n b f i c h i e r ) ;tr AVER=c e l l (1 , n b f i c h i e r ) ;tr STD=c e l l (1 , n b f i c h i e r ) ;tr HISTx=c e l l ( nb f i c h i e r , nb td ) ;tr HISTy=c e l l ( nb f i c h i e r , nb td ) ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−f o r C ca lctdoa =[1]

d i sp ( [ da t e s t r (now) ’ C ca lctdoa C calctdoa C calctdoa ’ ] ) ;f o r i f i l e=ichant

tr ALL{ i f i l e }=[ ] ;PercentShow (0 , 1 , ’ ca l c tdoa . . . ’ , [ ] , f a l s e ) ; %h = waitbar ( 0 , [ ’ ca l c tdoa f o r ’

num2str ( i f i l e ) ] ) ;i n o f =0;f o r nof=vecTimesTracking

i n o f=i no f +1;PercentShow ( ino f , l ength ( vecTimesTracking ) , [ da t e s t r ( c l o ck ) ’ca l c tdoa f o r ’ globEXTcourt{ i f i l e } ] , [ ] , t rue ) ; %waitbar ( nof /( nb secMYmsec−startMYmsec ) ) ;

nofMid ind=nof∗ indINmsec ;no fS t a r t i nd=round ( nofMid ind−ovMYmsec∗ indINmsec ) ;nofEnd ind=round ( nofMid ind+ovMYmsec∗ indINmsec ) ;

nofMid indNEIB=nof∗ indINmsec+C cor∗ovMYmsec∗ indINmsec ;nofStart indNEIB=round ( nofMid indNEIB−ovMYmsec∗ indINmsec ) ;nofEnd indNEIB=round ( nofMid indNEIB+ovMYmsec∗ indINmsec ) ;

i f datafrom0cyberio1dodo==0 % ichant<=57eva l ( [ ’ vNEIB=wavread ( [ globDirIN globEXTpath{ i f i l e } ] , [ nofStart indNEIB

nofEnd indNEIB ] ) ’ ’ ; ’ ] ) ;eva l ( [ ’ v=wavread ( [ globDirIN globEXTpath{ i f i l e } ] , [ n o f S t a r t i nd nofEnd ind ] )

’ ’ ; ’ ] ) ;e l s e

load ( [ globDirIN globEXTpar . INsubDODO globEXTpath{ i chant } ] ) ;vNEIB=tcu r de t ( nofStart indNEIB : nofEnd indNEIB , : ) ; v=tcu r de t ( no fS t a r t i nd :

nofEnd ind , : ) ;c l e a r t cu r de t ;

end ;i f dotk==1

vor i g=v ; c l e a r yy ;f o r i i =1:4 ; yy ( : , i i ) = ( [ v ( i i , : ) 0 0 ] .∗ [ 0 v ( i i , : ) . ˆ2 0 ] .∗ [ 0 0 v ( i i

, : ) ] ) ; endv=yy ’ ; c l e a r v2 ;

Page 113: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 113

% fo r i i =1:4 ; v2 ( : , i i ) = conv ( [ 1 1 1 1 1 1 1 11 ] , v ( i i , : ) ) ; end ;

% v = v2 ’ ;e l s e i f dotk==2

vor i g=v ; c l e a r yy ;cut = 0 . 7 5 ; % cut a l l below 0.75∗FS/2[B,A] = BUTTER(6 , cut , ’ high ’ ) ; %des i gns a highpass f i l t e r .y = f i l t e r (B,A, v ) ;v= y ;

end ;nofStart ms=no fS t a r t i nd /indVms ;nofEnd ms=nofEnd ind/indVms ;nofMid ms=nofMid ind /indVms ;tdoa2ca l c=c e l l (1 , l ength ( cortype ) ) ; CorrOrderStr=c e l l (1 , Nraz ) ;f o r i i =1: l ength ( cortype ) , tdoa2ca l c { i i }=[ ] ; end ;CorrOrderStr {1}=’ Cor r e l a t i on o f r e co rd ing s ’ ; CorrOrderStr{2}=’Peaks o f

c o r r e l a t i o n ’ ;% ETAPE CALCUL TDOA%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%fo r i i=C cortype

i f plotCORiTDOA==1s c r s z=get (0 , ’ ScreenSize ’ ) ;hcor=f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;

end ;i s ubp l o t =0; Ni j=( length ( micro gard )−1)∗ l ength ( micro gard ) /2 ;f o r i =1: l ength ( micro gard )−1

f o r j=i +1: l ength ( micro gard )i f i i <=3tdoa2ca l c { i i }=[ tdoa2ca l c { i i } ; ones ( l ength ( dfmaxsSIG{ i i , i , j }( ino f , : ) )

,1 ) ∗ [ i f i l e nof ] ones ( l ength ( dfmaxsSIG{ i i , i , j }( ino f , : ) ’ ) , 1 ) ∗ [micro gard ( i ) micro gard ( j ) ] dfmaxsSIG{ i i , i , j }( ino f , : ) ’ 0∗ (1 :nb td ) ’ ] ;

e l s e i f i i <=3∗2tdoa2ca l c { i i }=[ tdoa2ca l c { i i } ; ones ( l ength ( dtmaxsSIG{ i i −3, i , j }( ino f

, : ) ) ,1 ) ∗ [ i f i l e nof ] ones ( l ength ( dtmaxsSIG{ i i −3, i , j }( ino f , : ) ’ ) , 1 )∗ [ micro gard ( i ) micro gard ( j ) ] dtmaxsSIG{ i i −3, i , j }( ino f , : ) ’0∗ (1 : nb td ) ’ ] ;

e l s evNEIBj=vNEIB( j , : ) ;v i=v( i , : ) ;LvNEIB=length (vNEIBj ) ; Lv=length ( v i ) ; minL=min ( [ LvNEIB Lv ] ) ;i f c a l cFFTip lo t i t==1NFFT = 2ˆnextpow2 (minL) ;f i g u r e ; hgc f=gc f ; hgca=gca ;

curFFTindexKHZ=c e l l ( 1 , 3 ) ;f o r i subp l =1:3subplot (3 ,1 , i s ubp l ) ; hold on ;t i t l e s t r =[ ’AmplitudeAtTime ’ num2str ( nof ) ’ms−micro ’ ] ;i f i s ubp l==1i j s i g=v( i , : ) ’ ; i j=i ;t i t l e ( [ t i t l e s t r num2str ( i ) ’ with average ’ ] , ’ FontSize ’ , f s i z e ) ;e l s e i f i s ubp l==2i j s i g=vNEIB( j , : ) ’ ; i j=j ;t i t l e ( [ t i t l e s t r num2str ( j ) ’ with average ’ ] , ’ FontSize ’ , f s i z e ) ;e l s ei j s i g=v( i , : ) ’−vNEIB( j , : ) ’ ;t i t l e ( [ t i t l e s t r ’DIF ’ num2str ( i ) num2str ( j ) ’ with average ’ ] , ’

FontSize ’ , f s i z e ) ;%i j s i g=cc ( round (minL/2)+1: round (minL/2)+minL) ;%t i t l e ( [ t i t l e s t r num2str ( i ) num2str ( j ) ’ c o r r e l a t i on ’ ’ with average

’ ] , ’ FontSize ’ , f s i z e ) ;end ;vFFT = f f t ( i j s i g ,NFFT)/minL ;absvFFT=2∗abs (vFFT( 1 :NFFT/2+1) ) ;fFFT = f e /2∗ l i n s p a c e (0 ,1 ,NFFT/2+1) ;FFTindexKHZ{ ichant , i j }( ino f , : )=ze ro s (1 ,maxKHZ) ;curFFTindexKHZ{ i s ubp l }=[ ] ;f o r iKHZ=1:maxKHZcurindFFT=f ind ( fFFT>(iKHZ−0.9) ∗1000 & fFFT<(iKHZ+0.9) ∗1000 ) ;curFFTindexKHZ{ i s ubp l }=[curFFTindexKHZ{ i s ubp l } mean(absvFFT(

curindFFT ) ) ] ;end ;i f i subpl <=2, FFTindexKHZ{ ichant , i j }( ino f , : )=curFFTindexKHZ{ i s ubp l } ;

end ;p l o t ( fFFT(fFFT<maxKHZ∗1000) /1000 ,absvFFT(fFFT<maxKHZ∗1000) , ’m: ’ ) ;maxFFTindexKHZ( i subp l )=max( curFFTindexKHZ{ i s ubp l }) ;i f i subpl<=2

Page 114: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

114 BIBLIOGRAPHY

p lo t ( 1 :maxKHZ, curFFTindexKHZ{ i s ubp l } , ’ k− ’) ;yl im ( [ 0 3∗maxFFTindexKHZ(1) ] ) ;e l s ep lo t ( 1 :maxKHZ, abs (FFTindexKHZ{ ichant , i }( ino f , : )−FFTindexKHZ{ ichant , j

}( ino f , : ) ) , ’ b− ’) ;p l o t ( 1 :maxKHZ, curFFTindexKHZ{ i s ubp l } , ’ k− ’) ;p l o t ( 1 :maxKHZ,0 . 0001∗ l og10 ( abs (FFTindexKHZ{ ichant , i }( ino f , : )−

FFTindexKHZ{ ichant , j }( ino f , : ) ) ) , ’ b−−’) ;p l o t ( 1 :maxKHZ,0 . 0001∗ l og10 ( curFFTindexKHZ{ i s ubp l }) , ’ k−−’) ;yl im ([−0 2∗maxFFTindexKHZ(3) ] ) ;end ;x l ab e l ( [ ’ kHz ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ amplitude ’ ] , ’ FontSize ’ , f s i z e ) ;l egend ( ’ Amplitude ’ , ’ Average ’ ) ;end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )

globEXTcourt{ i f i l e } ’ ’ t i t l e s t r num2str ( i ) num2str ( j ) ’ ’cortype { i i } ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i f i l e } ’ ’ t i t l e s t r num2str ( i ) num2str ( j ) ’ ’cortype { i i } ’ . eps ’ ] , ’ psc2 ’ ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i f i l e } ’ ’ t i t l e s t r num2str ( i ) num2str ( j ) ’ ’cortype { i i } ’ . f i g ’ ] ) ;

c l o s e ( gc f ) ;end ;i f TDOA0FD123type<0v i=in t e rp1 ( 1 :maxKHZ, curFFTindexKHZ{1} , l i n s p a c e (1 ,maxKHZ, Lv) ) ;vNEIBj=int e rp1 ( 1 :maxKHZ, curFFTindexKHZ{2} , l i n s p a c e (1 ,maxKHZ,LvNEIB) )

;end ;%LvNEIB=length (vNEIB( j , : ) ) ; Lv=length (v ( i , : ) ) ; minL=min ( [ LvNEIB Lv ] )

;cc=xcorr ( v i ( 1 : minL) /mean( v i ( 1 : minL) ) , vNEIBj ( 1 : minL) /mean(vNEIBj ( 1 :

minL) ) , StrCors ) ; %cc=xcorr (v ( j , : ) , v ( i , : ) , StrCors ) ; % ; SELON LAVERSION DE MATLAB ! ! !

cc=cc / cc ( round ( length ( cc ) /2) ) ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−f o r raz=1:C cortype −3∗2 %Nraz[ t r ordre ]= so r t ( cc ) ;ordre=ordre ( l ength ( cc ) : −1:1) ; t r=t r ( l ength ( cc ) : −1:1) ;ordre=ordre ∗4∗windowSize∗ovMYmsec/ length ( cc ) − 2∗ovMYmsec ;f o r k=1: nb tdordre1=ordre ;ordre=ordre ( [ 1 : k k+f ind ( abs ( ordre (k+1: l ength ( ordre ) )−ordre (k ) )>

e p r a i e ) ] ) ;t r=t r ( [ 1 : k k+f ind ( abs ( ordre1 (k+1: l ength ( ordre1 ) )−ordre1 (k ) )>e p r a i e )

] ) ;end ;tr ALL{ i f i l e }=[tr ALL{ i f i l e } ; t r ( 1 : nb td ) ] ;ordre temp=ordre ( 1 : nb td ) ;%MY ordre temp=ordre temp ( f i nd ( ordre temp<sq r t (sum( ( pos mic (

micro gard ( i ) , : )−pos mic ( micro gard ( j ) , : ) ) . ˆ 2 ) ) /c ) ) ;tdoa2ca l c {3∗2+raz }=[ tdoa2ca l c {3∗2+raz } ; ones ( l ength ( ordre temp ) ,1) ∗ [

i f i l e nof ] ones ( l ength ( ordre temp ) ,1) ∗ [ micro gard ( i ) micro gard (j ) ] ordre temp ’ t r ( 1 : nb td ) ’ ] ;

i f l ength ( cc )<nb td , break ; end ;pksmean=mean( cc ) ;[ pksmax , pksMax ind ] = max( cc ) ; pksMax ms=pksMax ind/indVms ;

pksMax ashydro=(pksMax ind−f en /nb sum) /( f e /nb sum) ;pksMid ind=round ( length ( cc ) /2) ; pksMid ms=pksMid ind/indVms ;

pksMid ashydro=(pksMid ind−f en /nb sum) /( f e /nb sum) ;pksmin = min( cc ) ;

i f plotCORiTDOA==1%[cc , l o c s ] = f indpeaks ( cc , ’MINPEAKDISTANCE’ , 1 , ’MINPEAKHEIGHT’ ,− Inf , ’

THRESHOLD’ , 0 , ’SORTSTR’ , ’ none ’ ) ;i s ubp l o t=i subp l o t +1; subplot ( Nij , Nraz∗(1+( hist0zoom1artzoom2no3 <3) ) ,

i s ubp l o t ) ; p l o t ( l i n s pa c e ( nofStart ms , nofEnd ms , l ength ( cc ) ) , cc ) ;x l ab e l ( [ num2str ( nofStart ms ) ’ < Temps ,ms < ’ num2str ( nofEnd ms ) ] , ’

FontSize ’ , f s i z e ) ;i f raz==1, strTDOA=[num2str ( pksMax ashydro−pksMid ashydro , ’%1.1 e ’ )

’ s ( ’ num2str ( [ ordre temp−pksMid ashydro ] , ’%1 .1 e ’ ) ] ;e l s e strTDOA=[num2str ( pksMax ashydro−pksMid ashydro , ’%1.1 e ’ )

Page 115: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 115

’ s ’ num2str ( pksMax ind−pksMid ind ) ’ i ’ num2str (pksMax ms−pksMid ms , ’%1.1 e ’ ) ’ms ’ ] ; end ;

t i t l e ( [ CorrOrderStr{ raz} num2str ( [ i j ] ) ’−mics . TDOA=’ strTDOA ] , ’FontSize ’ , f s i z e ) ;

%t i t l e ( [ CorrOrderStr{ raz} num2str ( [ i j ] ) ’−mics . ’ ] , ’ FontSize ’ , f s i z e) ;

ax i s ( [ nofStart ms nofEnd ms pksmin 1.05∗pksmax ] ) ;%axes o f f ;i f hist0zoom1artzoom2no3<3i subp l o t=i subp l o t +1; subplot ( Nij , Nraz∗(1+( hist0zoom1artzoom2no3 <3) ) ,

i s ubp l o t ) ;end ;i f hist0zoom1artzoom2no3==0h i s t ( cc , l i n s pa c e ( pksmin , pksmax , 5 0 ) ) ;x l ab e l ( [ num2str ( pksmin , ’%3.1 e ’ ) ’ < CorrPeaks Amplitude < ’ num2str (

pksmax , ’%3.1 e ’ ) ] , ’ FontSize ’ , f s i z e ) ;ax i s ( [ pksmin pksmax 0 10 ] ) ;e l s e i f hist0zoom1artzoom2no3==1p lo t ( l i n s pa c e ( nofStart ms , nofEnd ms , l ength ( cc ) ) , cc ) ;ax i s ( [ nofStart ms nofEnd ms pksmean−(pksmax−pksmean ) pksmean+(pksmax

−pksmean ) ] ) ;zoom(4) ; zoom xon 5 ; zoom xon 5 ; zoom xon 5 ; zoom xon 5 ; zoom xon 5 ;

zoom xon 5 ;e l s e i f hist0zoom1artzoom2no3==2delMaxMid ind=abs ( pksMax ind−pksMid ind ) ;indzoom=pksMid ind−4∗delMaxMid ind : pksMid ind+4∗delMaxMid ind ;p l o t ( l i n s pa c e ( indzoom (1) / indINmsec−nofMid ms , indzoom ( end ) / indINmsec−

nofMid ms , l ength ( cc ( indzoom ) ) ) , cc ( indzoom ) ) ;x l ab e l ( [ num2str ( indzoom (1) / indINmsec−nofMid ms ) ’ < Temps ,ms < ’

num2str ( indzoom ( end ) / indINmsec−nofMid ms ) ] , ’ FontSize ’ , f s i z e ) ;end ;%axes o f f ;end ;

[ cc , l o c s ] = f indpeaks ( cc , ’MINPEAKDISTANCE’ , 1 , ’MINPEAKHEIGHT’ ,− Inf , ’THRESHOLD’ , 0 , ’SORTSTR’ , ’ none ’ ) ;

i f 3∗2+raz==C cortypeALLordre temp{ i , j }( f i nd ( nof==vecTimesTracking ) , 1 : nb td )=ordre temp

( 1 : nb td ) ;ALLtr{ i , j }( f i nd ( nof==vecTimesTracking ) , 1 : nb td )=t r ( 1 : nb td ) ;end ;end ;end ;

endendi f plotCORiTDOA==1

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i f i l e } ’ CORiTDOA t=’ num2str ( nof ) cortype{ i i } ’ . jpg ’ ] );

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i f i l e } ’ CORiTDOA t=’ num2str ( nof ) cortype{ i i } ’ . eps’ ] , ’ psc2 ’ ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i f i l e } ’ CORiTDOA t=’ num2str ( nof ) cortype{ i i } ’ . f i g ’ ] );

c l o s e a l l ;end ;

end ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%tdoa=tdoa2ca l c {C cortype } ;i f isempty ( tdoa )==0

d e l a i =[ d e l a i ; tdoa ] ;end ;

end ; % f i n pour chaque f e n e t r e nof de 10 s%c l o s e (h) ; c l o s e a l l ;tr AVER{ i f i l e }=mean( tr ALL{ i f i l e } ,1) ;tr STD{ i f i l e }=std ( tr ALL{ i f i l e } , 1 ,1 ) ;%f i g u r e ;f o r imax=1: nb td

i f l ength ( tr HISTy{ i f i l e , imax})∗ l ength ( tr HISTx{ i f i l e , imax})==0tr HISTy{ i f i l e , imax}=0;tr HISTx{ i f i l e , imax}=0;

e l s e[ tr HISTy{ i f i l e , imax} , tr HISTx{ i f i l e , imax } ] = h i s t ( tr ALL{ i f i l e } ( : , imax ) ) ;

end ;end ;

end ; % f i n pour chaque f i c h i e r i f i l e

Page 116: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

116 BIBLIOGRAPHY

de l a i 1=d e l a i ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ . mat ’ ] , ’ tdoa ’ , ’de l a i ’ , ’ de la i1 ’ , ’ tr HISTx ’ , ’ tr HISTy ’ , ’ ALLtr ’ , ’ ALLordre temp ’ ) ;

end ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) num2str ( [ ovMYmsec s i zeTrack

C percTDOArefine ] ) ’ patTDOAinit mic=650K.mat ’ ] ) ;%save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ perc ’ ’ patTDOAinit mic=650K.mat ’ ] , ’ tdoa ’ , ’ de l a i ’ , ’ de la i1’ , ’ tr HISTx ’ , ’ tr HISTy ’ , ’ ALLtr ’ , ’ ALLordre temp ’ ) ;

load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ . mat ’ ] ) ;

%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% RECHERCHE DES QUADRUPLETS VERIFIANT LES SOMMES DES DELAIS%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%de l a i = [ ] ;p i k l 2 = [ ] ; p jh l 5 = [ ] ; p ih l 4 = [ ] ; do l j a = [ ] ; was3=4;ALLnof=startMYmsec :1∗ovMYmsec : nb secMYmsec ; Nnof=length (ALLnof ) ; min i f=i n f ∗ones (4 , Nnof ) ;

n o t r i p l e t=s i z e ( tdoa , 1 ) ; a l l i f = [ ] ; %prosto ctob by l i daze e s l i C re f i ne tdoa =[ ]%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−i f sum( s i z e ( d e l a i 1 ) )==0, break ; end ;

i f C percTDOArefine>0f o r C re f i ne tdoa =[1]

d i sp ( [ da t e s t r (now) ’ C re f i ne tdoa C re f ine tdoa RECHERCHE DES QUADRUPLETS VERIFIANTLES SOMMES DES DELAIS ’ ] ) ;

f o r i f i l e=ichantPercentShow (0 , 1 , ’ r e f i n e . . . ’ , [ ] , f a l s e ) ; %h1 = waitbar ( 0 , [ ’ r e f i n e t doa f o r ’

num2str ( i f i l e ) ] ) ;i n o f =0; ALLnof=startMYmsec :1∗ovMYmsec : nb secMYmsec ; Nnof=length (ALLnof ) ;min i f=i n f ∗ones (4 , Nnof ) ; a l l i f = [ ] ;f o r nof=startMYmsec :1∗ovMYmsec : nb secMYmsec

tdoa=de l a i 1 ( f i nd ( d e l a i 1 ( : , 1 )==i f i l e & de l a i 1 ( : , 2 )==nof ) , 3 : was3+2) ;tdoa ( : , was3+1)=ze ro s ( s i z e ( tdoa , 1 ) ,1 ) ;micro gard=micro ( f i nd (sum ( ( [ tdoa ( : , 1 ) ; tdoa ( : , 2 ) ]∗ ones (1 , l ength ( micro ) ) )==(

ones (2∗ s i z e ( tdoa , 1 ) ,1 ) ∗micro ) ) ˜=0) ) ;i n o f=i no f +1;PercentShow ( ino f , l ength ( startMYmsec :1∗ovMYmsec : nb secMYmsec ) , [

da t e s t r ( c l o ck ) ’ r e f i n e ’ globEXTcourt{ i f i l e } ’ gard ’ num2str ( micro gard )] , [ ] , t rue ) ; %waitbar ( nof /( nb secMYmsec−startMYmsec ) ) ;

i f l ength ( micro gard )==4i f C percTDOArefine<=0

n o t r i p l e t=s i z e ( tdoa , 1 ) ;tdoa ( : , end+1)=(1: n o t r i p l e t ) ’ ;d o l j a =[ do l j a 1 ] ;

e l s en o t r i p l e t =1;i =1;j =2;k=3;h=4;l 1=f ind ( tdoa ( : , 1 )==micro gard ( i ) & tdoa ( : , 2 )==micro gard ( j ) ) ;l 2=f ind ( tdoa ( : , 1 )==micro gard ( i ) & tdoa ( : , 2 )==micro gard (k ) ) ;l 3=f ind ( tdoa ( : , 1 )==micro gard ( j ) & tdoa ( : , 2 )==micro gard (k ) ) ;l 4=f ind ( tdoa ( : , 1 )==micro gard ( i ) & tdoa ( : , 2 )==micro gard (h) ) ;l 5=f ind ( tdoa ( : , 1 )==micro gard ( j ) & tdoa ( : , 2 )==micro gard (h) ) ;l 6=f ind ( tdoa ( : , 1 )==micro gard (k ) & tdoa ( : , 2 )==micro gard (h) ) ;i f 1=abs ( tdoa ( l1 , 3 )+tdoa ( l3 , 3 )−tdoa ( l2 , 3 ) ) ; min i f (1 , i n o f )=quant i l e (

i f 1 , C percTDOArefine /100) ;i f 2=abs ( tdoa ( l3 , 3 )+tdoa ( l6 , 3 )−tdoa ( l5 , 3 ) ) ; min i f (2 , i n o f )=quant i l e (

i f 2 , C percTDOArefine /100) ;i f 3=abs ( tdoa ( l2 , 3 )+tdoa ( l6 , 3 )−tdoa ( l4 , 3 ) ) ; min i f (3 , i n o f )=quant i l e (

i f 3 , C percTDOArefine /100) ;i f 4=abs ( tdoa ( l1 , 3 )+tdoa ( l5 , 3 )−tdoa ( l4 , 3 ) ) ; min i f (4 , i n o f )=quant i l e (

i f 4 , C percTDOArefine /100) ;a l l i f =[ a l l i f i f 1 i f 2 i f 3 i f 4 ] ;

f o r p i j=l1 ’f o r pjk=l3 ’f o r pik=l2 ’p i k l 2 =[ pik abs ( tdoa ( p i j , 3 )+tdoa ( pjk , 3 )−tdoa ( pik , 3 ) ) ] ;abs1=abs ( tdoa ( p i j , 3 )+tdoa ( pjk , 3 )−tdoa ( pik , 3 ) ) ; sq1=abs1∗abs1 ;i f abs1<=mini f (1 , i n o f )f o r pkh=l6 ’

Page 117: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 117

f o r pjh=l5 ’p jh l5 =[ p jh l5 abs ( tdoa ( pjk , 3 )+tdoa (pkh , 3 )−tdoa ( pjh , 3 ) ) ] ;abs2=abs ( tdoa ( pjk , 3 )+tdoa (pkh , 3 )−tdoa ( pjh , 3 ) ) ; sq2=abs2∗abs2 ;i f abs2<=mini f (2 , i n o f )f o r pih=l4 ’p ih l 4 =[ p ih l 4 abs ( tdoa ( pik , 3 )+tdoa (pkh , 3 )−tdoa ( pih , 3 ) ) abs ( tdoa ( p i j

, 3 )+tdoa ( pjh , 3 )−tdoa ( pih , 3 ) ) ] ;abs3=abs ( tdoa ( pik , 3 )+tdoa (pkh , 3 )−tdoa ( pih , 3 ) ) ; sq3=abs3∗abs3 ;abs4=abs ( tdoa ( p i j , 3 )+tdoa ( pjh , 3 )−tdoa ( pih , 3 ) ) ; sq4=abs4∗abs4 ;i f abs3<= mini f (3 , i n o f ) && abs4<=mini f (4 , i n o f )

t o t a lE r r o r ( ichant , iSegmentTrajectory , indC DivsMaxsPers )=to t a lE r r o r (ichant , iSegmentTrajectory , indC DivsMaxsPers )+sq1+sq2+sq3+sq4 ;

tota lErrorN ( ichant , iSegmentTrajectory , indC DivsMaxsPers )=tota lErrorN( ichant , iSegmentTrajectory , indC DivsMaxsPers )+1;

i f tota lErrorMin ( ichant , iSegmentTrajectory , indC DivsMaxsPers )>sq1+sq2+sq3+sq4 , tota lErrorMin ( ichant , iSegmentTrajectory ,indC DivsMaxsPers )=sq1+sq2+sq3+sq4 ; end ;

i f totalErrorMax ( ichant , iSegmentTrajectory , indC DivsMaxsPers )<sq1+sq2+sq3+sq4 , totalErrorMax ( ichant , iSegmentTrajectory ,indC DivsMaxsPers )=sq1+sq2+sq3+sq4 ; end ;

i f ( tdoa ( pik , end ) ˜=0) , tdoa ( pik , end+1)=n o t r i p l e t ;e l s e tdoa ( pik , was3+min( f i nd ( tdoa ( pik , was3+1:end )==0)) )=n o t r i p l e t ;

end ;i f ( tdoa ( p i j , end ) ˜=0) , tdoa ( p i j , end+1)=n o t r i p l e t ;e l s e tdoa ( p i j , was3+min( f i nd ( tdoa ( p i j , was3+1:end )==0)) )=n o t r i p l e t ;

end ;i f ( tdoa ( pjk , end ) ˜=0) , tdoa ( pjk , end+1)=n o t r i p l e t ;e l s e tdoa ( pjk , was3+min( f i nd ( tdoa ( pjk , was3+1:end )==0)) )=n o t r i p l e t ;

end ;i f ( tdoa ( pjh , end ) ˜=0) , tdoa ( pjh , end+1)=n o t r i p l e t ;e l s e tdoa ( pjh , was3+min( f i nd ( tdoa ( pjh , was3+1:end )==0)) )=n o t r i p l e t ;

end ;i f ( tdoa (pkh , end ) ˜=0) , tdoa (pkh , end+1)=n o t r i p l e t ;e l s e tdoa (pkh , was3+min( f i nd ( tdoa (pkh , was3+1:end )==0)) )=n o t r i p l e t ;

end ;i f ( tdoa ( pih , end ) ˜=0) , tdoa ( pih , end+1)=n o t r i p l e t ;e l s e tdoa ( pih , was3+min( f i nd ( tdoa ( pih , was3+1:end )==0)) )=n o t r i p l e t ;

end ;n o t r i p l e t=n o t r i p l e t +1;endendendendendendendendendNt r i p l e t s ( ichant , iSegmentTrajectory , indC DivsMaxsPers )=n o t r i p l e t ;do l j a =[ do l j a l ength ( l 1 )∗ l ength ( l 2 )∗ l ength ( l 3 )∗ l ength ( l 4 )∗ l ength ( l 5 )∗

l ength ( l 6 ) / n o t r i p l e t ] ;endt d e l a i 2=s i z e ( tdoa , 2 ) ;i f rou==0

i f ( tde l a i 2<t d e l a i ) , tdoa (1 , t d e l a i )=0; endi f ( tde l a i 2>t d e l a i ) , d e l a i (1 , t d e l a i 2 +2)=0; end

endrou=0;d e l a i =[ d e l a i ; ones ( s i z e ( tdoa , 1 ) ,1 ) ∗ [ i f i l e nof ] tdoa ] ;t d e l a i=s i z e ( de l a i , 2 ) −2;

e l s e%disp ( ’WARNING micro gard IS EMPTY

! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! WARNINGmicro gard IS EMPTY’ ) ;

end%save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) ’TDOA’ num2str

( [ C percTDOArefine ] ) ’ perc ’ ’ patTDOAafter mic=650K.mat ’ ] , ’ tdoa ’ , ’ de la i1’ , ’ d e l a i ’ ) ;

end ; % f i n pour chaque f e n e t r e nof de 10 s%c l o s e ( h1 ) ; c l o s e a l l ;

end ; % f i n pour chaque f i c h i e r i f i l esave ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ . mat’ ] , ’ tdoa ’ , ’ de la i1 ’ , ’ d e l a i ’ , ’ do l ja ’ , ’ mini f ’ , ’ n o t r i p l e t ’ , ’ a l l i f ’ , ’ t o ta lEr ro r ’ , ’

Page 118: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

118 BIBLIOGRAPHY

totalErrorN ’ , ’ totalErrorMin ’ , ’ totalErrorMax ’ ) ;end ;

end ;%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−%load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) num2str ( [ ovMYmsec s i zeTrack

C percTDOArefine ] ) ’ patTDOAafter mic=650K.mat ’ ] ) ;%save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ perc ’ ’ patTDOAafter mic=650K.mat ’ ] , ’ tdoa ’ , ’ de la i1 ’ , ’ d e l a i ’ );

i f C percTDOArefine>0load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ . mat ’ ] ) ;end ;i f e x i s t ( ’ ALLnof ’ )

f i g u r e ;p l o t (ALLnof ,mean( minif , 1 ) /1000) ;x l ab e l ( [ ’ Temps ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ Threshold ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;t i t l e ( [ globEXTcourt{ i chant } ’ percentage o f TDOA=’ num2str ( [ C percTDOArefine ] ) ’

Thresholds ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ Thresholds. jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ Thresholds. f i g ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ Thresholds. eps ’ ] , ’ psc2 ’ ) ;

c l o s e ( gc f ) ;f i g u r e ;h i s t ( a l l i f /1000) ;x l ab e l ( [ ’ Threshold ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;%y l abe l ( [ ’ Threshold ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;t i t l e ( [ globEXTcourt{ i chant } ’ percentage o f TDOA=’ num2str ( [ C percTDOArefine ] ) ’

Histogram of Thresh ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ HistThresh. jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ HistThresh. f i g ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’ HistThresh. eps ’ ] , ’ psc2 ’ ) ;

c l o s e ( gc f ) ;end ;micro gard=micro ; %8MAY%−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−i f s i z e ( de l a i , 2 ) <7, l i n e sESTt r i p l=ones ( s i z e ( d e l a i 1 ( : , 1 ) ) ) ; e l s e l i n e sESTt r i p l=( d e l a i ( : , 7 )

>=1) ; end ;i nd l i n e sESTt r i p l=f i nd ( l i n e sESTt r i p l ) ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%plotTDOAfromdelai1=1;%plotTDOAfromdelai1=s i z e ( de l a i , 2 )<7;%WAS BEFORE MARS20plotTDOA1fromdelai1=0;%WAS BEFORE MARS20f o r i f i l e=ichant

f o r i nd i =1: l ength ( micro gard )i=micro gard ( i nd i ) ;f o r i nd j=i : l ength ( micro gard )

j=micro gard ( i nd j ) ;i f i==j , cont inue ; end ; % i f i>=j , cont inue ; end ;plotTIME{ i f i l e , i , j}=− i n f ∗ones (1 , l ength ( vecTimesTracking ) ) ;plotTDOA1{ i f i l e , i , j}=− i n f ∗ones ( l ength ( vecTimesTracking ) , nb td ) ;plotTDOA{C INDpercTDOArefine , i f i l e , i , j}=− i n f ∗ones ( l ength ( vecTimesTracking ) , nb td

) ;plotHmax1{ i f i l e , i , j}=− i n f ∗ones ( l ength ( vecTimesTracking ) , nb td ) ;plotHmax{C INDpercTDOArefine , i f i l e , i , j}=− i n f ∗ones ( l ength ( vecTimesTracking ) , nb td

) ;f o r i n o f =1: l ength ( vecTimesTracking ) %=ind l i n e sESTt r i p l

plotTIME{ i f i l e , i , j }( i n o f )=vecTimesTracking ( i n o f ) ; %vecTimesTracking (l i n e sESTt r i p l ( i n o f ) ) ;

i f TDOA0FD123type<=0linesOurTime1=(de l a i 1 ( : , 1 )==i f i l e )&( d e l a i 1 ( : , 2 )==vecTimesTracking ( i n o f ) )

&( d e l a i 1 ( : , 3 )==i )&( d e l a i 1 ( : , 4 )==j ) ;i f plotTDOAfromdelai1

indl inesOurTime=f ind ( linesOurTime1 ) ;f o r i i =1: l ength ( indl inesOurTime )

Page 119: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 119

i f i s i n f ( d e l a i 1 ( indl inesOurTime ( i i ) ,5 ) )s d f s d f s d f =12;end ;

plotTDOA{C INDpercTDOArefine , i f i l e , i , j }( ino f , i i )=de l a i 1 (indl inesOurTime ( i i ) ,5 ) ;%/ovMYmsec ; %APR30 PODGON TDOA

plotHmax{C INDpercTDOArefine , i f i l e , i , j }( ino f , i i )=de l a i 1 (indl inesOurTime ( i i ) ,6 ) ;

end ;e l s e

l inesOurTime=( d e l a i ( : , 1 )==i f i l e )&( d e l a i ( : , 2 )==vecTimesTracking ( i n o f ))&( d e l a i ( : , 3 )==i )&( d e l a i ( : , 4 )==j )&l i n e sESTt r i p l ;

indl inesOurTime=f ind ( linesOurTime ) ;i f TDOA0FD123type<=0f o r i i =1: l ength ( indl inesOurTime )plotTDOA{C INDpercTDOArefine , i f i l e , i , j }( ino f , i i )=d e l a i (

indl inesOurTime ( i i ) ,5 ) ;%/ovMYmsec ; %APR30 PODGON TDOAplotHmax{C INDpercTDOArefine , i f i l e , i , j }( ino f , i i )=d e l a i (

indl inesOurTime ( i i ) ,6 ) ;end ;end ;

end ;i f plotTDOA1fromdelai1 %i f s i z e ( de l a i , 2 )>=6

plotTDOA1{ i f i l e , i , j }( ino f , : )=de l a i 1 ( linesOurTime1 , 5 ) ;%/ovMYmsec ; %APR30 PODGON TDOA

plotHmax1{ i f i l e , i , j }( ino f , : )=de l a i 1 ( linesOurTime1 , 6 ) ;end ;

e l s eplotTDOA{C INDpercTDOArefine , i f i l e , i , j }( ino f , : )=dfmaxs{TDOA0FD123type , i ,

j }( ino f , : ) ;end ;

end ;%plotTDOA{C INDpercTDOArefine , i f i l e , i , j } ( : , : )

plotTIME{ i f i l e , j , i}=plotTIME{ i f i l e , i , j } ;plotTDOA1{ i f i l e , j , i}=−plotTDOA1{ i f i l e , i , j } ;plotTDOA{C INDpercTDOArefine , i f i l e , j , i}=−plotTDOA{C INDpercTDOArefine , i f i l e , i , j

} ;plotHmax1{ i f i l e , j , i}=plotHmax1{ i f i l e , i , j } ;plotHmax{C INDpercTDOArefine , i f i l e , j , i}=plotHmax{C INDpercTDOArefine , i f i l e , i , j } ;

end ;end ;

end ;

f o r C calcIplotTDOAiHmax=[1]%LineSty l eS t r ={ ’ − ’ , ’ − − ’ , ’ − . ’ , ’ : ’ , ’ : ’} ;%MarkerStr={ ’o ’ , ’ d ’ , ’+ ’ , ’ x ’ , ’ . ’ } ;Nsubp lot l ine =4;xTDOAbefIaft=c e l l ( nb f i c h i e r , l ength ( micro gard ) , l ength ( micro gard ) ) ; %{ i f i l e , imic , jmic}=

plotTIME{ i f i l e , imic , jmic } ;yTDOAbefore=c e l l ( nb f i c h i e r , l ength ( micro gard ) , l ength ( micro gard ) ) ; %plotTDOA1{ i f i l e ,

imic , jmic } ( : , 1 : 4 ) ;yTDOAafter=c e l l ( nb f i c h i e r , l ength ( micro gard ) , l ength ( micro gard ) ) ; %plotTDOA{

C INDpercTDOArefine , i f i l e , imic , jmic } ( : , 1 : 4 ) ;f o r i f i l e=ichant

f o r imic=micro gardf o r jmic=micro gard

i f imic>=jmic , cont inue ; end ;t i t l e s t r ={ ’combTDOA before ’ , ’combTDOA af t e r ’ , ’ combHeight before ’ , ’ combHeight

a f t e r ’ , ’ sigTDOA ’ , ’ s igHeight ’ } ;u n i t s t r ={ ’ ms ’ , ’ ms ’ , ’ ’ , ’ ’ , ’ ms ’ , ’ Hz ’} ;range=[maxTDOAms, maxTDOAms, maxAmpl , maxAmpl , maxTDOAms, maxAmpl ] ;vecSubplots ={[1 2 ] , [ 3 4 ] } ;i f plotCORRS==1

f o r imegaplot=1: s i z e ( vecSubplots , 2 )s c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;i s ubp l o t =0;f o r i s u b p l o t l i n e=vecSubplots{ imegaplot}i f i s ubp l o t l i n e <=2, x=l i n spa c e ( vecTimesTracking (1) ,

vecTimesTracking ( end ) , s i z e (ALLtr{ imic , jmic } ,1) ) ;e l s e i f i s ubp l o t l i n e >=3, x=plotTIME{ i f i l e , imic , jmic } ;end ;i f i s u b p l o t l i n e==1, y1to5=plotTDOA1{ i f i l e , imic , jmic } ( : , 1 : nb td ) ;e l s e i f i s u b p l o t l i n e==2, y1to5=plotTDOA{C INDpercTDOArefine , i f i l e ,

imic , jmic } ( : , 1 : nb td ) ;

Page 120: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

120 BIBLIOGRAPHY

e l s e i f i s u b p l o t l i n e==3, y1to5=plotHmax1{ i f i l e , imic , jmic } ( : , 1 : nb td ) ;e l s e i f i s u b p l o t l i n e==4, y1to5=plotHmax{C INDpercTDOArefine , i f i l e ,

imic , jmic } ( : , 1 : nb td ) ;e l s e i f i s u b p l o t l i n e==5, y1to5=ALLordre temp{ imic , jmic } ( : , 1 : nb td ) ;e l s e i f i s u b p l o t l i n e==6, y1to5=ALLtr{ imic , jmic } ( : , 1 : nb td ) ;

end ;i s ubp l o t=i subp l o t +1; subplot ( l ength ( vecSubplots{ imegaplot }) ,3 ,

i s ubp l o t ) ; hold on ;f o r i p l o t =1: nb tdp lo t (x , y1to5 ( : , i p l o t ) , ’ LineWidth ’ , 2 , ’ L ineSty le ’ , ’ − ’ , ’ MarkerSize ’ ,

msize , ’ Marker ’ , ’ o ’ ) ;end ;ylim ([− range ( i s u b p l o t l i n e ) range ( i s u b p l o t l i n e ) ] ) ; xlim ( [ x (1) x ( end )

] ) ;%legend ( ’max1 ’ , ’max2 ’ , ’max3 ’ , ’max4 ’ , ’ Location ’ , ’ Best ’ , ’ FontSize ’ ,

f s i zeSm ) ;i f l abe l 0 range1 s imp l e==0x l abe l ( [ num2str (0 .01∗ round (100∗x (1) ) ) ’ < Temps ,ms < ’ num2str

(0 .01∗ round (100∗x ( end ) ) ) ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ num2str (0 .01∗ round (100∗min(min ( range ( i s u b p l o t l i n e ) ) ) ) ) ’< ’

u n i t s t r { i s u b p l o t l i n e } ’< ’ num2str (0 .01∗ round (100∗max(max( range (i s u b p l o t l i n e ) ) ) ) ) ] , ’ FontSize ’ , f s i z e ) ;

e l s ex l ab e l ( [ ’ Temps ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ t i t l e s t r { i s u b p l o t l i n e } un i t s t r { i s u b p l o t l i n e } ] , ’ FontSize ’ ,

f s i z e ) ;end ;t i t l e ( [ t i t l e s t r { i s u b p l o t l i n e } ’ a l l maxs ’ ] , ’ FontSize ’ , f s i z e ) ;f o r imax=1:min (2 ,Nmax)i subp l o t=i subp l o t +1; subplot ( l ength ( vecSubplots{ imegaplot }) ,3 ,

i s ubp l o t ) ;p l o t (x , y1to5 ( : , imax ) , ’ LineWidth ’ , 2 , ’ L ineSty le ’ , L ineSty l eS t r { imax } , ’

MarkerSize ’ , msize , ’ Marker ’ , MarkerStr{ imax}) ;ylim ([− range ( i s u b p l o t l i n e ) range ( i s u b p l o t l i n e ) ] ) ; xlim ( [ x (1) x ( end )

] ) ;%legend ( [ ’max ’ num2str ( imax ) ] , ’ Location ’ , ’ Best ’ , ’ FontSize ’ , f s i zeSm ) ;i f l abe l 0 range1 s imp l e==0x l abe l ( [ num2str (0 .01∗ round (100∗x (1) ) ) ’ < Temps ,ms < ’ num2str

(0 .01∗ round (100∗x ( end ) ) ) ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ num2str (0 .01∗ round (100∗min(min ( range ( i s u b p l o t l i n e ) ) ) ) ) ’< ’

u n i t s t r { i s u b p l o t l i n e } ’< ’ num2str (0 .01∗ round (100∗max(max( range (i s u b p l o t l i n e ) ) ) ) ) ] , ’ FontSize ’ , f s i z e ) ;

e l s ex l ab e l ( [ ’ Temps ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ t i t l e s t r { i s u b p l o t l i n e } un i t s t r { i s u b p l o t l i n e } ] , ’ FontSize ’ ,

f s i z e ) ;end ;t i t l e ( [ t i t l e s t r { i s u b p l o t l i n e } ’ max ’ num2str ( imax ) ] , ’ FontSize ’ , f s i z e

) ;end ;end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )

globEXTcourt{ i chant } ’TDOAiHmax’ num2str ( [ C percTDOArefine ] ) ’perc ’ ’Mics=’ num2str ( [ imic jmic ] ) ’ ’ t i t l e s t r {vecSubplots{imegaplot }(1) } t i t l e s t r {vecSubplots{ imegaplot }( end )} ’ iSegm ’num2str ( iSegmentTrajectory ) ’ . jpg ’ ] ) ;

%saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i chant } ’TDOAiHmax’ num2str ( [ C percTDOArefine ] ) ’perc ’ ’Mics=’ num2str ( [ imic jmic ] ) ’ ’ t i t l e s t r {vecSubplots{imegaplot }(1) } t i t l e s t r {vecSubplots{ imegaplot }( end )} ’ iSegm ’num2str ( iSegmentTrajectory ) ’ . f i g ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i chant } ’TDOAiHmax’ num2str ( [ C percTDOArefine ] ) ’perc ’ ’Mics=’ num2str ( [ imic jmic ] ) ’ ’ t i t l e s t r {vecSubplots{imegaplot }(1) } t i t l e s t r {vecSubplots{ imegaplot }( end )} ’ iSegm ’num2str ( iSegmentTrajectory ) ’ . eps ’ ] , ’ psc2 ’ ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor )globEXTcourt{ i chant } ’TDOAiHmax’ num2str ( [ C percTDOArefine ] ) ’perc ’ ’Mics=’ num2str ( [ imic jmic ] ) ’ ’ t i t l e s t r {vecSubplots{imegaplot }(1) } t i t l e s t r {vecSubplots{ imegaplot }( end )} ’ iSegm ’num2str ( iSegmentTrajectory ) ’ . t i f ’ ] ) ;

c l o s e a l l ;end ;

end ;xTDOAbefIaft{ i f i l e , imic , jmic}=plotTIME{ i f i l e , imic , jmic } ;yTDOAbefore{ i f i l e , imic , jmic}=plotTDOA1{ i f i l e , imic , jmic } ( : , 1 : nb td ) ;

Page 121: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 121

yTDOAafter{ i f i l e , imic , jmic}=plotTDOA{C INDpercTDOArefine , i f i l e , imic , jmic} ( : , 1 : nb td ) ;

yTDOAbefore{ i f i l e , jmic , imic}=−plotTDOA1{ i f i l e , imic , jmic } ( : , 1 : nb td ) ;yTDOAafter{ i f i l e , jmic , imic}=−plotTDOA{C INDpercTDOArefine , i f i l e , imic , jmic

} ( : , 1 : nb td ) ;end

endendsave ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’PLOTxyTDOAbefIaft . mat ’ ] , ’ xTDOAbefIaft ’ , ’ yTDOAbefore ’ , ’ yTDOAafter ’ ) ;

end ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory ) ’PLOTxyTDOAbefIaft .mat ’ ] ) ;

f o r C subplots1onep lot2 =[ ] %[2 1 ]f o r C plotBEFiAFT=[1 nb td ]

s c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;range=[maxAmpl , maxTDOAms, maxTDOAms, maxTDOAms, maxAmpl , maxAmpl ] ;i s u b p l o t l i n e =0;f o r i f i l e=ichant

f o r imic=micro gardf o r jmic=micro gard

i f imic>=jmic , cont inue ; end ;i f C subplots1onep lot2==1

i s u b p l o t l i n e=i s u b p l o t l i n e +1; subplot (3 ,4 , i s u b p l o t l i n e ) ;e l s e

subplot (1 , 2 , 1 ) ;end ;hold on ;f o r imax=1:C plotBEFiAFT

plo t ( xTDOAbefIaft{ i f i l e , imic , jmic } , yTDOAbefore{ i f i l e , imic , jmic } ( : ,imax ) , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , L ineSty l eS t r { imax } , ’ MarkerSize ’ ,msize /2 , ’Marker ’ , MarkerStr{ imax}) ;

end ;i f C subplots1onep lot2==1

t i t l e ( [ ’ a l l Ts , mics=’ num2str ( [ imic jmic ] ) ] ) ;ylim ([−maxTDOAms maxTDOAms] ) ;

e l s et i t l e ( [ ’ a l l Ts ’ ] ) ;ylim ([−maxTDOAms maxTDOAms] ) ; %ylim ( [ 0 . 0 7 5 0 . 1 3 5 ] ) ;

end ;

xlim ( [ xTDOAbefIaft{ i f i l e , imic , jmic }(1) xTDOAbefIaft{ i f i l e , imic , jmic }( end) ] ) ;

x l ab e l ( [ ’ time moments (Ts ) ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’TDOA,ms ’ ] , ’ FontSize ’ , f s i z e ) ;i f C subplots1onep lot2==1

i s u b p l o t l i n e=i s u b p l o t l i n e +1; subplot (3 ,4 , i s u b p l o t l i n e ) ;e l s e

subplot (1 , 2 , 2 ) ;end ;hold on ;f o r imax=1:C plotBEFiAFT

plo t ( xTDOAbefIaft{ i f i l e , imic , jmic } , yTDOAafter{ i f i l e , imic , jmic } ( : ,imax ) , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , L ineSty l eS t r { imax } , ’ MarkerSize ’ ,msize /2 , ’Marker ’ , MarkerStr{ imax}) ;

end ;i f C subplots1onep lot2==0

t i t l e ( [ ’ coherent Ts , mics=’ num2str ( [ imic jmic ] ) ] ) ;ylim ([−maxTDOAms maxTDOAms] ) ;

e l s et i t l e ( [ ’ coherent Ts ’ ] ) ;ylim ([−maxTDOAms maxTDOAms] ) ; %ylim ( [ 0 . 0 7 5 0 . 1 3 5 ] ) ;

end ;

xlim ( [ xTDOAbefIaft{ i f i l e , imic , jmic }(1) xTDOAbefIaft{ i f i l e , imic , jmic }( end) ] ) ;

x l ab e l ( [ ’ time moments (Ts ) ,ms ’ ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’TDOA,ms ’ ] , ’ FontSize ’ , f s i z e ) ;

endend

Page 122: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

122 BIBLIOGRAPHY

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{i chant } ’BEFiAFT type , perc , number ’ num2str ( [ C subplots1onep lot2C percTDOArefine C plotBEFiAFT ] ) ’Mics=’ num2str ( [ imic jmic ] ) ’ . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{i chant } ’BEFiAFT type , perc , number ’ num2str ( [ C subplots1onep lot2C percTDOArefine C plotBEFiAFT ] ) ’Mics=’ num2str ( [ imic jmic ] ) ’ . f i g ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{i chant } ’BEFiAFT type , perc , number ’ num2str ( [ C subplots1onep lot2C percTDOArefine C plotBEFiAFT ] ) ’Mics=’ num2str ( [ imic jmic ] ) ’ . eps ’ ] , ’ psc2’ ) ;

c l o s e a l l ;end

end ;end ;%−−−−−−−−−−−−−−−−−PLOT ENTROPY fo r va lues in vecALL percTDOArefine −−−−−−−−−−−−−−−−−−f o r C entropy =[ ]

maxtypesstr=c e l l (1 , nb td+3) ;f o r imax=1: nb td

maxtypesstr{ imax}=[num2str ( imax ) ’max ’ ] ;end ;maxtypesstr{nb td+1}= ’ a l l maxs ’ ;maxtypesstr{nb td+2}=’ a l l cohers ’ ;maxtypesstr{nb td+3}=’maxsXtripl ’ ;

f o r C delaiM6S6 =[ ]delaiM6 = [ ] ;d e l a iS6 = [ ] ;PercentShow (0 , 1 , ’ Compute delaiM6S6 . . . ’ , [ ] , f a l s e ) ;f o r i d e l a i =1: s i z e ( de l a i , 1 )

n t r i p l e t=length ( f i nd ( d e l a i ( i d e l a i , 7 : end )>0) ) ;PercentShow ( i d e l a i , s i z e ( de l a i , 1 ) , [ da t e s t r ( c l o ck ) ’ Compute delaiM6S6 f o r ’

globEXTcourt{ i f i l e } ] , [ ] , t rue ) ;i f n t r i p l e t >=1

de la iS6=[ de l a iS6 d e l a i ( i d e l a i , 7 ) ] ;end ;i f C percTDOArefine<100

f o r i t r i p l e t =1: n t r i p l e t%ide la iM=ide la iM+1;%delaiM=[delaiM ; d e l a i ( i d e l a i , : ) ] ;delaiM6=[delaiM6 n t r i p l e t ∗ones (1 , d e l a i ( i d e l a i , 7 ) ) ] ;

end ;end ;

end ;i f C percTDOArefine==100

delaiM6=de la iS6 ;end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

TDOA’ num2str ( [ C percTDOArefine ] ) ’ delaiM6S6 .mat ’ ] , ’ delaiM6 ’ , ’ de la iS6 ’ , ’ n t r i p l e t’ ) ;

end ;load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA’

num2str ( [ C percTDOArefine ] ) ’ delaiM6S6 .mat ’ ] ) ;

s c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;f o r i f i l e=ichant

f o r imax=1: nb tdsubplot (2 , nb td , imax ) ; entr ( i f i l e , C percTDOArefine , imax )=entropy (

tr HISTy{ i f i l e , imax}) ;bar ( tr HISTx{ i f i l e , imax} , tr HISTy{ i f i l e , imax}) ;x l ab e l ( [ num2str (0 .01∗ round (100∗min( tr HISTx{ i f i l e , imax}) ) ) ’<ms<’ num2str (0 .01∗

round (100∗max( tr HISTx{ i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ Number o f TDOAs,max ’ num2str ( imax ) ’< ’ num2str (0 .01∗ round (100∗max(

tr HISTy{ i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;t i t l e ( [ maxtypesstr{ imax} num2str ( C percTDOArefine ) ’% ’ ’ e=’ num2str (0 .01∗ round

(100∗ entr ( i f i l e , C percTDOArefine , imax ) ) ) ] , ’ FontSize ’ , f s i z e ) ;end

end

subplot (2 , nb td , nb td+[1 2 ] ) ;[ maxsBefore HISTy{ i f i l e , imax} , maxsBefore HISTx{ i f i l e , imax}]= h i s t ( d e l a i 1 ( : , 6 ) ,min ( d e l a i 1

( : , 6 ) ) : 0 . 3 : max( d e l a i 1 ( : , 6 ) ) ) ;i f l ength (maxsBefore HISTy{ i f i l e , imax})∗ l ength (maxsBefore HISTx{ i f i l e , imax})==0

maxsBefore HISTy{ i f i l e , imax}=0;maxsBefore HISTx{ i f i l e , imax}=0;

end ;

Page 123: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 123

bar (maxsBefore HISTx{ i f i l e , imax} , maxsBefore HISTy{ i f i l e , imax}) ; entr ( i f i l e ,C percTDOArefine , nb td+1)=entropy (maxsBefore HISTy{ i f i l e , imax}) ;

x l ab e l ( [ num2str (0 .01∗ round (100∗min(maxsBefore HISTx{ i f i l e , imax}) ) ) ’ <TDOA,ms< ’ num2str(0 .01∗ round (100∗max(maxsBefore HISTx{ i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;

y l ab e l ( [ ’ Number o f a l l maxs TDOAs< ’ num2str (0 .01∗ round (100∗max(maxsBefore HISTy{ i f i l e ,imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;

xlim ( [ min (maxsBefore HISTx{ i f i l e , imax}) (max(maxsBefore HISTx{ i f i l e , imax})+min (maxsBefore HISTx{ i f i l e , imax})+1e−9) /2 ] ) ;

ylim ( [ min (maxsBefore HISTy{ i f i l e , imax}) (max(maxsBefore HISTy{ i f i l e , imax})+min (maxsBefore HISTy{ i f i l e , imax})+1e−9) /2 ] ) ;

t i t l e ( [ maxtypesstr{nb td+1} num2str ( C percTDOArefine ) ’% ’ ’ e=’ num2str (0 .01∗ round (100∗entr ( i f i l e , C percTDOArefine , nb td+1) ) ) ] , ’ FontSize ’ , f s i z e ) ;

i f ˜ isempty ( de l a iS6 )%subplot (2 , nb td , ( ( n b f i c h i e r +1)∗nb td−2) : ( ( n b f i c h i e r +1)∗nb td−1) ) ;subplot (2 , nb td , nb td+[3 4 ] ) ;[ maxsAfter HISTy{ i f i l e , imax} , maxsAfter HISTx{ i f i l e , imax}]= h i s t ( de la iS6 , min ( de l a iS6 )

: 0 . 3 : max( de l a iS6 ) ) ;i f l ength (maxsAfter HISTy{ i f i l e , imax})∗ l ength (maxsAfter HISTx{ i f i l e , imax})==0

maxsAfter HISTy{ i f i l e , imax}=0;maxsAfter HISTx{ i f i l e , imax}=0;

end ;bar (maxsAfter HISTx{ i f i l e , imax} , maxsAfter HISTy{ i f i l e , imax}) ; entr ( i f i l e ,

C percTDOArefine , nb td+2)=entropy (maxsAfter HISTy{ i f i l e , imax}) ;x l ab e l ( [ num2str (0 .01∗ round (100∗min(maxsAfter HISTx{ i f i l e , imax}) ) ) ’ <TDOA,ms< ’

num2str (0 .01∗ round (100∗max(maxsAfter HISTx{ i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ Number o f a l l maxs TDOAs< ’ num2str (0 .01∗ round (100∗max(maxsAfter HISTy{

i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;xlim ( [ min (maxsAfter HISTx{ i f i l e , imax}) (max(maxsAfter HISTx{ i f i l e , imax})+min (

maxsAfter HISTx{ i f i l e , imax})+1e−9) /2 ] ) ;ylim ( [ min (maxsAfter HISTy{ i f i l e , imax}) (max(maxsAfter HISTy{ i f i l e , imax})+min (

maxsAfter HISTy{ i f i l e , imax})+1e−9) /2 ] ) ;t i t l e ( [ maxtypesstr{nb td+2} num2str ( C percTDOArefine ) ’% ’ ’ e=’ num2str (0 .01∗ round

(100∗ entr ( i f i l e , C percTDOArefine , nb td+2) ) ) ] , ’ FontSize ’ , f s i z e ) ;end ;

i f ˜ isempty ( delaiM6 )%subplot (2 , nb td , ( n b f i c h i e r +1)∗nb td ) ;subplot (2 , nb td , nb td+nb td ) ;h i s t ( delaiM6 , min ( delaiM6 ) : 0 . 3 : max( delaiM6 ) ) ;[ maxsXtriplet HISTy{ i f i l e , imax} , maxsXtriplet HISTx{ i f i l e , imax}]= h i s t ( delaiM6 , min (

delaiM6 ) : 0 . 3 : max( delaiM6 ) ) ;i f l ength ( maxsXtriplet HISTy{ i f i l e , imax})∗ l ength ( maxsXtriplet HISTx{ i f i l e , imax})==0

maxsXtriplet HISTy{ i f i l e , imax}=0;maxsXtriplet HISTx{ i f i l e , imax}=0;

end ;bar ( maxsXtriplet HISTx{ i f i l e , imax} , maxsXtriplet HISTy{ i f i l e , imax}) ; entr (

i f i l e , C percTDOArefine , nb td+3)=entropy ( maxsXtriplet HISTy{ i f i l e , imax}) ;x l ab e l ( [ num2str (0 .01∗ round (100∗min( maxsXtriplet HISTx{ i f i l e , imax}) ) ) ’ <TDOA,ms< ’

num2str (0 .01∗ round (100∗max( maxsXtriplet HISTx{ i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;y l ab e l ( [ ’ Number o f a l l maxs TDOAs< ’ num2str (0 .01∗ round (100∗max( maxsXtriplet HISTy{

i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;t i t l e ( [ maxtypesstr{nb td+3} num2str ( C percTDOArefine ) ’% ’ ’ e=’ num2str (0 .01∗ round

(100∗ entr ( i f i l e , C percTDOArefine , nb td+3) ) ) ] , ’ FontSize ’ , f s i z e )end ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA histDT ’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory )num2str (ovMYmsec) ’ s ta r t ’ num2str ( startMYmsec ) ’ s izeTrack ’ num2str ( s i zeTrack ) ’ . jpg’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA histDT ’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory )num2str (ovMYmsec) ’ s ta r t ’ num2str ( startMYmsec ) ’ s izeTrack ’ num2str ( s i zeTrack ) ’ . eps’ ] , ’ psc2 ’ ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOA histDT ’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory )num2str (ovMYmsec) ’ s ta r t ’ num2str ( startMYmsec ) ’ s izeTrack ’ num2str ( s i zeTrack ) ’ . f i g’ ] ) ;

c l o s e a l l ;

imagesc ( d e l a i ) ; colormap ( ’ bone ’ ) ; c o l o rba r ;t i t l e ( [ [ num2str (0 .01∗ round (100∗min( maxsXtriplet HISTy{ i f i l e , imax}) ) ) ’ <Number o f

maxsXtr ip lets 3D< ’ num2str (0 .01∗ round (100∗max( maxsXtriplet HISTy{ i f i l e , imax}) ) ) ] ] , ’FontSize ’ , f s i z e ) ;

x l ab e l ( [ num2str (0 .01∗ round (100∗min( maxsXtriplet HISTx{ i f i l e , imax}) ) ) ’ <TDOA,ms< ’num2str (0 .01∗ round (100∗max( maxsXtriplet HISTx{ i f i l e , imax}) ) ) ] , ’ FontSize ’ , f s i z e ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

Page 124: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

124 BIBLIOGRAPHY

TDOA hist3DDT ’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory )num2str (ovMYmsec) ’ s ta r t ’ num2str ( startMYmsec ) ’ s izeTrack ’ num2str ( s i zeTrack ) ’ .

jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

TDOA hist3DDT ’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory )num2str (ovMYmsec) ’ s ta r t ’ num2str ( startMYmsec ) ’ s izeTrack ’ num2str ( s i zeTrack ) ’ .

eps ’ ] , ’ psc2 ’ ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

TDOA hist3DDT ’ num2str ( [ C percTDOArefine ] ) ’ percSegm ’ num2str ( iSegmentTrajectory )num2str (ovMYmsec) ’ s ta r t ’ num2str ( startMYmsec ) ’ s izeTrack ’ num2str ( s i zeTrack ) ’ .

f i g ’ ] ) ;c l o s e a l l ;

s c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;hold on ;p l o t ( vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) , squeeze ( entr ( i f i l e ,

vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) , nb td+1) ) , ’ LineWidth’ , 1 , ’ L ineSty le ’ , ’ − ’ , ’ MarkerSize ’ , msize ∗2 , ’Marker ’ , ’ o ’ ) ;

p l o t ( vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) , squeeze ( entr ( i f i l e ,vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) , nb td+2) ) , ’ LineWidth’ , 1 , ’ L ineSty le ’ , ’−− ’ , ’ MarkerSize ’ , msize ∗2 , ’Marker ’ , ’ d ’ ) ;

%p lo t ( vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) , squeeze ( entr ( i f i l e ,vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) , nb td+3) ) , ’ LineWidth’ , 1 , ’ L ineSty le ’ , ’ − . ’ , ’ MarkerSize ’ , msize ∗2 , ’Marker ’ , ’∗ ’ ) ;

t i t l e ( [ ’ Entropy as percntage o f TDOA coherence ’ ] , ’ FontSize ’ , f s i z e ∗2) ;legend ( maxtypesstr{nb td+1} ,maxtypesstr{nb td+2} ,maxtypesstr{nb td+3} , ’ Location ’ , ’ Best

’ , ’ FontSize ’ , f s i zeSm ) ;x l ab e l ( [ num2str (min ( vecALL percTDOArefine ( vecALL percTDOArefine<=C percTDOArefine ) ) ) ’ <

coherentTDOAs/allTDOAs,% < ’ num2str (max( vecALL percTDOArefine (vecALL percTDOArefine<=C percTDOArefine ) ) ) ] , ’ FontSize ’ , f s i z e ∗2) ;

%y l abe l ( [ num2str (0 .01∗ round (100∗min(min (min ( entr ) ) ) ) ) ’ <entropy< ’ num2str (0 .01∗ round(100∗max(max(max( entr ) ) ) ) ) ] , ’ FontSize ’ , f s i z e ∗2) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOAENTROPY’ num2str ( [ C percTDOArefine ] ) ’ perc . jpg ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOAENTROPY’ num2str ( [ C percTDOArefine ] ) ’ perc . eps ’ ] , ’ psc2 ’ ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’TDOAENTROPY’ num2str ( [ C percTDOArefine ] ) ’ perc . f i g ’ ] ) ;

c l o s e a l l ;end ;

end ;

i f min ( s i z e (plotTDOA{1 , ichant , 1 , 2} ) .∗ s i z e (plotTDOA{1 , ichant , 1 , 3} ) .∗ s i z e (plotTDOA{1 , ichant , 1 , 4} ).∗ s i z e (plotTDOA{1 , ichant , 2 , 3} ) .∗ s i z e (plotTDOA{1 , ichant , 2 , 4} ) .∗ s i z e (plotTDOA{1 , ichant , 3 , 4} ) )==0. . . .

| | min( s i z e (plotTDOA{end , ichant , 1 , 2} ) .∗ s i z e (plotTDOA{end , ichant , 1 , 3} ) .∗ s i z e (plotTDOA{end, ichant , 1 , 4} ) .∗ s i z e (plotTDOA{end , ichant , 2 , 3} ) .∗ s i z e (plotTDOA{end , ichant , 2 , 4} ) .∗ s i z e (plotTDOA{end , ichant , 3 , 4} ) )==0

save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’ERRALL.mat’ ] ) ;

cont inue ;end ;

m1inCirc={[1 2 3 ] , [ 2 3 4 ] , [ 1 2 4 ] , [ 1 3 4 ] , [ 1 2 3 4 ] , [ 1 1 1 2 2 3 ] , [ 1 1 1 1 2 2 3 ] } ;m1ce l l ={{ ’microphon1 ’ , ’ microphon2 ’ , ’ microphon3 ’} ,{ ’ microphon2 ’ , ’ microphon3 ’ , ’ microphon4 ’} ,{ ’

microphon1 ’ , ’ microphon2 ’ , ’ microphon4 ’} ,{ ’ microphon1 ’ , ’ microphon3 ’ , ’ microphon4 ’} ,{ ’ microphon1’ , ’ microphon2 ’ , ’ microphon3 ’ , ’ microphon4 ’} ,{ ’ microphon1 ’ , ’ microphon2 ’ , ’ microphon3 ’ , ’microphon4 ’ , ’ microphon1 ’ , ’ microphon2 ’}} ;

m2inCirc=c e l l ( s i z e ( m1inCirc ) ) ;f o r i t r i p l =1: l ength ( m1inCirc )−2

m2inCirc{ i t r i p l } = c i r c s h i f t ( m1inCirc{ i t r i p l } ,[−1 −1]) ;end ;m2inCirc{ l ength ( m1inCirc )−1}=[2 3 4 3 4 4 ] ;m2inCirc{ l ength ( m1inCirc ) }=[2 2 3 4 3 4 4 ] ;f o r C p l o tTr i p l e t s =[ ]

f o r i t r i p l =1:4c l o s e a l ls c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;%v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;i f datafrom0cyberio1dodo==0 %ichant<=57

v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;e l s e

load ( [ globDirIN globEXTpar . INsubDODO globEXTpath{ i chant } ] ) ;v=tcu r de t ; c l e a r t cu r de t ;

end ;

Page 125: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 125

f o r indmic=1: l ength ( m1inCirc{ i t r i p l })imic=m1inCirc{ i t r i p l }( indmic ) ;[ ysAllTime , fsAllTime , tsAllTime , psAllTime ]= spectrogram (v ( : , imic ) ,256 ,0 ,256 ,250000 , ’

yaxis ’ ) ;

subplot (4 ,3 , indmic ) ; p l o t (v ( 1 : end , imic ) ) ;t i t l e ( [ ’ s i gna l , mic=’ num2str ( imic ) ] , ’ FontSize ’ , f s i zeSm ) ; ax i s o f f ;%y l abe l ( ’ amplitude ’ , ’ FontSize ’ , f s i zeSm ) ; x l ab e l ( ’Temps en s ’ , ’ FontSize ’ , f s i zeSm ) ;

subplot (4 ,3 ,3+ indmic ) ; imagesc ( tsAllTime ( 1 : end ) , fsAllTime , log10 ( abs ( psAllTime (1 :7∗end /8 , : ) ) ) ) ; ax i s xy ; colormap ( f l i p ud ( gray ) ) ;

t i t l e ( [ ’ spectr , mic=’ num2str ( imic ) ] , ’ FontSize ’ , f s i zeSm ) ;y l ab e l ( ’ f req ,Hz ’ , ’ FontSize ’ , f s i zeSm ) ; x l ab e l ( ’ time , s ’ , ’ FontSize ’ , f s i zeSm ) ;

end ;

MAXallTDOAline=−i n f ;MAXallHmaxline=−i n f ;MINallTDOAline=i n f ;MINallHmaxline=i n f ;f o r ind imic =1: l ength ( m1inCirc{ i t r i p l })

imic=m1inCirc{ i t r i p l }( ind imic ) ;jmic=m2inCirc{ i t r i p l }( ind imic ) ;% i f min ( s i z e (plotTDOA)>=[2 ichant imic jmic ] )==0% ERROR=1;% end ;% i f s i z e (plotTDOA{1 , ichant , imic , jmic } ,2)<5 | | s i z e (plotTDOA{1 , ichant ,

imic , jmic } ,2)<5% ERROR=1;% end ;MAXallTDOAline=max ( [ MAXallTDOAline max(max(plotTDOA{1 , ichant , imic , jmic } ( : , 1 : nb td ) ) )

max(max(plotTDOA{end , ichant , imic , jmic } ( : , 1 : nb td ) ) ) ] ) ; %??? Bad c e l l r e f e r e n c eoperat ion .

MAXallHmaxline=max ( [ MAXallHmaxline max(max( plotHmax{1 , ichant , imic , jmic } ( : , 1 : nb td ) ) )max(max( plotHmax{end , ichant , imic , jmic } ( : , 1 : nb td ) ) ) ] ) ;

MINallTDOAline=min ( [ MINallTDOAline min (min (plotTDOA{1 , ichant , imic , jmic } ( : , 1 : nb td ) ) )min (min (plotTDOA{end , ichant , imic , jmic } ( : , 1 : nb td ) ) ) ] ) ;

MINallHmaxline=min ( [ MINallHmaxline min (min ( plotHmax{1 , ichant , imic , jmic } ( : , 1 : nb td ) ) )min (min ( plotHmax{end , ichant , imic , jmic } ( : , 1 : nb td ) ) ) ] ) ;

end ;

i s ubp l o t =0;f o r ind imic =1: l ength ( m1inCirc{ i t r i p l })

imic=m1inCirc{ i t r i p l }( ind imic ) ;jmic=m2inCirc{ i t r i p l }( ind imic ) ;i s ubp l o t=i subp l o t +1; i f i subp lo t >=5, break ; end ;

allTDOAline=[plotTDOA{1 , ichant , imic , jmic } ( : , 1 : nb td ) plotTDOA{end , ichant , imic , jmic} ( : , 1 : nb td ) ] ;

a l lHmaxl ine=[plotHmax{1 , ichant , imic , jmic } ( : , 1 : nb td ) plotHmax{end , ichant , imic , jmic} ( : , 1 : nb td ) ] ;

subplot (4 ,3 ,6+ i subp l o t ) ; hold on ;f o r imax=1: nb td

p lo t ( plotTIME{ ichant , imic , jmic }/1000 ,plotTDOA{end , ichant , imic , jmic } ( : , imax ) , ’Color ’ , ’ green ’ , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , ’ : ’ , ’ MarkerSize ’ , msize /1 , ’Marker ’ ,MarkerStr{ imax } , ’ MarkerFaceColor ’ , ’ none ’ ) ;

end ;f o r imax=1: nb td

p lo t ( plotTIME{ ichant , imic , jmic }/1000 ,plotTDOA{1 , ichant , imic , jmic } ( : , imax ) , ’ Color’ , ’ black ’ , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , ’ − ’ , ’ MarkerSize ’ , msize /1 , ’Marker ’ ,MarkerStr{ imax } , ’ MarkerFaceColor ’ , ’ black ’ ) ;

end ;x l ab e l ( [ ’ time , s ’ ] , ’ FontSize ’ , f s i zeSm ) ; y l ab e l ( [ ’TDOA,ms ’ ] , ’ FontSize ’ , f s i zeSm ) ;t i t l e ( [ ’TDOA( ’ num2str ( vecALL percTDOArefine (1) ) ’ , ’ num2str ( vecALL percTDOArefine (

end ) ) ’%)mics=’ num2str ( [ imic jmic ] ) ] , ’ FontSize ’ , f s i zeSm ) ;%ylim ( [ MINallTDOAline MAXallTDOAline ] ) ; %xlim ( [ x (1) x ( end ) ] ) ;ylim ([−maxTDOAms maxTDOAms] ) ; %xlim ( [ x (1) x ( end ) ] ) ;

subplot (4 ,3 ,9+ i subp l o t ) ; hold on ;f o r imax=1: nb td

p lo t ( plotTIME{ ichant , imic , jmic }/1000 , plotHmax{end , ichant , imic , jmic } ( : , imax ) , ’Color ’ , ’ green ’ , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , ’ : ’ , ’ MarkerSize ’ , msize /1 , ’Marker ’ ,MarkerStr{ imax } , ’ MarkerFaceColor ’ , ’ none ’ ) ;

end ;f o r imax=1: nb td

p lo t ( plotTIME{ ichant , imic , jmic }/1000 , plotHmax{1 , ichant , imic , jmic } ( : , imax ) , ’ Color

Page 126: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

126 BIBLIOGRAPHY

’ , ’ black ’ , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , ’ − ’ , ’ MarkerSize ’ , msize /1 , ’Marker ’ ,MarkerStr{ imax } , ’ MarkerFaceColor ’ , ’ black ’ ) ;

end ;x l ab e l ( [ ’ time , s ’ ] , ’ FontSize ’ , f s i zeSm ) ; y l ab e l ( [ ’ Cor .Ampl ’ ] , ’ FontSize ’ , f s i zeSm ) ;t i t l e ( [ ’ Cor .Ampl ( ’ num2str ( vecALL percTDOArefine (1 ) ) ’ , ’ num2str (

vecALL percTDOArefine ( end ) ) ’%)mics=’ num2str ( [ imic jmic ] ) ] , ’ FontSize ’ , f s i zeSm ) ;%ylim ( [ MINallHmaxline MAXallHmaxline ] ) ; %xlim ( [ x (1) x ( end ) ] ) ;ylim ([−maxAmpl maxAmpl ] ) ; %xlim ( [ x (1) x ( end ) ] ) ;

end ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

SUMMARYtriplet ’ num2str ( i t r i p l ) ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . jpg ’ ] ) ;%saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

SUMMARYtriplet ’ num2str ( i t r i p l ) ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . f i g ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’

SUMMARYtriplet ’ num2str ( i t r i p l ) ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . eps ’ ] , ’ psc2 ’ );

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ’SUMMARYtriplet ’ num2str ( i t r i p l ) ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . pdf ’ ] ) ;

c l o s e a l l ;end ;

end ;

MarkerStyle ={ ’+ ’ , ’o ’ , ’∗ ’ , ’ x ’ , ’ s ’ , ’ d ’ , ’ ˆ ’ , ’ v ’ , ’ < ’ , ’ > ’ , ’ p ’ , ’ h ’ } ;LineCol={ ’ black ’ , ’ green ’ , ’ blue ’ , ’ red ’ , ’ magenta ’ , ’ black ’ , ’ green ’ , ’ blue ’ , ’ red ’ , ’ magenta ’ , ’ black ’ , ’

green ’ , ’ blue ’ , ’ red ’ , ’ magenta ’ } ;Ncols=3;LineSt={ ’none ’ , ’ − ’} ;x l s1 t27tdoa=NaN∗ones (1+ length ( m1inCirc{ i t r i p l }) , l ength ( vecTimesTracking ) ) ;meanmaxsTDOA=NaN∗ones (1 , l ength ( vecTimesTracking ) ) ; sumTDOAinRange=NaN∗ones (1 , l ength (

vecTimesTracking ) ) ;NtdoaInRange=ze ro s ( l ength ( micro ) , l ength ( micro ) ) ; NtdoaIndOK=zero s ( l ength ( micro ) , l ength ( micro ) ) ;AVtdoaInRange=ze ro s ( l ength ( micro ) , l ength ( micro ) ) ;i t r i p lMa in=length ( m1inCirc )−1;f o r C iLineSt =[1] %[1]

f o r i t r i p l =[ i t r i p lMa in ]%:−1:1c l o s e a l ls c r s z=get (0 , ’ ScreenSize ’ ) ;f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;ax i s o f f ;i s ubp l o t =0; iC patperc =0; phexist1mic=0; phexistALLmic=1;f o r C patperc=vecALL percTDOArefine

iC patperc=iC patperc +1;i s ubp l o t=i subp l o t +1;subplot (1+ length ( vecALL percTDOArefine ) , Ncols , [ 1 : ( Ncols −1) ] +Ncols ∗( i subp lo t −1) ) ;

hold on ; i l i n e =0;iLegendSty le =0; c l e a r LegendStyle ;LegendStyle=c e l l (1 , l ength ( m1inCirc{ i t r i p l }) ) ;f o r ind imic =1: l ength ( m1inCirc{ i t r i p l })

imic=m1inCirc{ i t r i p l }( ind imic ) ;jmic=m2inCirc{ i t r i p l }( ind imic ) ;i l i n e=i l i n e +1;f o r imax=nb td :−1:1

plotTDOAused=plotTDOA{ iC patperc , ichant , imic , jmic } ( : , imax ) ;plotTIMEused=plotTIME{ ichant , imic , jmic } ;indused=plotTDOAused>maxTDOAms/10 ;i f max( indused )>0

ph( i l i n e )=p lo t ( plotTIME{ ichant , imic , jmic }/1000 ,plotTDOA{ iC patperc ,ichant , imic , jmic } ( : , imax ) , ’ Color ’ , LineCol{ i l i n e } , ’ LineWidth ’ , 1 , ’L ineSty le ’ , LineSt{C iLineSt } , ’ MarkerSize ’ , msize /C iLineSt , ’ Marker ’ ,MarkerStyle{ i l i n e }) ;

phexist1mic=1;e l s e

phexistALLmic=0;end ;

end ;

iLegendSty le=iLegendSty le +1; LegendStyle{ iLegendSty le }=[ ’ microphones ’ num2str (imic ) ’ and ’ num2str ( jmic ) ] ;

maxstrictTDOAms=2.6; i f i chant==56, maxstrictTDOAms=2.4; end ;

maxsINplotrange= ( abs (plotTDOA{ iC patperc , ichant , imic , jmic })<maxTDOAms &plotTDOA{ iC patperc , ichant , imic , jmic }<2.4) ;

maxsOUTplotrange= ˜maxsINplotrange ;

Page 127: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 127

f o r i t =1: l ength ( vecTimesTracking )meanmaxsTDOA( i t )=mean(plotTDOA{ iC patperc , ichant , imic , jmic }( i t ,

maxsINplotrange ( i t , : ) ) ) ;sumTDOAinRange( i t )=sum(plotTDOA{ iC patperc , ichant , imic , jmic }( i t ,

maxsINplotrange ( i t , : ) )<maxTDOAms) ;end ;indOK=f ind ( ( abs (meanmaxsTDOA)<maxTDOAms) ) ;NtdoaIndOK( imic , jmic )=sum(indOK) ;NtdoaInRange ( imic , jmic )=sum(sumTDOAinRange) ;TDOAinplotrange=meanmaxsTDOA(indOK) ;AVtdoaInRange ( imic , jmic )=mean(mean(TDOAinplotrange ) ) ;TIMEinplotrange=plotTIME{ ichant , imic , jmic }( indOK) ;

i f i t r i p l==i t r i p lMa in && C patperc==vecALL percTDOArefine ( end )plotTIMEall{ ichant , imic , jmic} = [ plotTIMEall{ ichant , imic , jmic}

TIMEinplotrange ] ;plotTDOAall{ ichant , imic , jmic} = [ plotTDOAall{ ichant , imic , jmic}

TDOAinplotrange ] ;[ ’ imic , jmic=’ num2str ( imic ) num2str ( jmic ) ’ TIMEall : ’ num2str ( plotTIMEall{

ichant , imic , jmic }) ]end ;

i f l ength ( TIMEinplotrange )>=2xl s1 t27tdoa ( indimic , : )=in t e rp1 ( TIMEinplotrange , TDOAinplotrange , plotTIME{

ichant , imic , jmic } , ’ cubic ’ ) ;% , ’ extrap ’x l s1 t27tdoa ( 1 , : )=plotTIME{ ichant , imic , jmic } ;%PLOTLINES ph( i l i n e +1)=p lo t ( x l s1 t27tdoa (1 , indOK(1) : indOK( end ) ) /1000 ,

x l s1 t27tdoa ( indimic , indOK(1) : indOK( end ) ) , ’ Color ’ , LineCol{ i l i n e } , ’LineWidth ’ , 1 , ’ L ineSty le ’ , ’ − ’ , ’Marker ’ , ’ none ’ ) ;

end ;

end ;x l ab e l ( [ ’ time , s ’ ] , ’ FontSize ’ , f s i zeSm ) ; y l ab e l ( [ ’TDOA,ms ’ ] , ’ FontSize ’ , f s i zeSm ) ;xlim ( [ ( vecTimesTracking (1) −0.0001) /1000 ( vecTimesTracking ( end ) +0.0001) /1000 ] ) ;RecName=globEXTcourt{ i chant } ;RecName(RecName==’ ’ ) =’− ’; i f C patperc <99, s t rC patperc=num2str ( C patperc ) ; e l s e

s t rC patperc=num2str (100) ; end ;strNtdoa =[ ’ Ntdoa=’ num2str ( [ NtdoaInRange (1 ,2 ) NtdoaInRange (1 ,3 ) NtdoaInRange (1 , 4 )

NtdoaInRange (2 , 3 ) NtdoaInRange (2 , 4 ) NtdoaInRange (3 , 4 ) ] ) ] ;strIndOK=[ ’ Nseg=’ num2str ( [ NtdoaIndOK(1 ,2 ) NtdoaIndOK(1 ,3 ) NtdoaIndOK(1 ,4 )

NtdoaIndOK(2 ,3 ) NtdoaIndOK(2 ,4 ) NtdoaIndOK(3 ,4 ) ] ) ] ;t i t l e ( [ RecName ’ ’ ALLdescrStrCour ’ TDOA( ’ s t rC patperc ’%) Ant ’ num2str (maxTDOAm)

’m’ strNtdoa strIndOK ] ) ;ylim ([−maxTDOAms maxTDOAms] ) ;

endi subp l o t=i subp l o t +1; subplot (1+ length ( vecALL percTDOArefine ) , Ncols , [ 1 : ( Ncols −1) ] +Ncols ∗(

i subp lot −1) ) ;%v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;i f datafrom0cyberio1dodo==0 % ichant<=57

v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;e l s e

load ( [ globDirIN globEXTpar . INsubDODO globEXTpath{ i chant } ] ) ;v=tcu r de t ; c l e a r t cu r de t ;

end ;p l o t ( l i n s pa c e ( vecTimesTracking (1) /1 , vecTimesTracking ( end ) /1 , INDvecTimesTracking ( end )−

INDvecTimesTracking (1)+1)/1000 , v ( INDvecTimesTracking (1) : INDvecTimesTracking ( end ) ,m1inCirc{ i t r i p l }) , ’ k ’ ) ;

x l ab e l ( [ ’ time , s ’ ] , ’ FontSize ’ , f s i zeSm ) ; y l ab e l ( [ ’ Recording Amplitude ’ ] , ’ FontSize ’ , f s i zeSm) ;

xlim ( [ ( vecTimesTracking (1) −0.0001) /1000 ( vecTimesTracking ( end ) +0.0001) /1000 ] ) ;sh=subplot (1+ length ( vecALL percTDOArefine ) , Ncols , Ncols ) ;%: Ncols : Ncols∗(1+ length (

vecALL percTDOArefine ) ) ) ;p=get ( sh , ’ po s i t i on ’ ) ; %lh=legend ( sh , [ ph1 ; ph2 ] ) ;i f phexist1mic && phexistALLmic && length (ph)==length ( m1inCirc{ i t r i p l }) && length (

TIMEinplotrange )>=2 && length (TDOAinplotrange )>=2 % && max( ichant==[22 30 35 42 4648 57 ] )==0NcurvesOK=min( length (ph) , l ength ( LegendStyle ) ) ;lh=legend ( sh , ph ( 1 : NcurvesOK) , LegendStyle ( 1 : NcurvesOK) ) ; % %lh=legend ( LegendStyle ) ; %

% % % % % % %se t ( lh , ’ po s i t i on ’ , p ) ;ax i s ( sh , ’ o f f ’ ) ;

end ;

%PERVOE OK, OSTALNYJE SOHRANAJUTSA KAK PUSTYJE LEGENDY%strNtdoa = ’ ’ ; strIndOK= ’ ’ ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’

TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ iSegm ’ num2str (

Page 128: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

128 BIBLIOGRAPHY

iSegmentTrajectory ) ’ . jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’

TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ iSegm ’ num2str (iSegmentTrajectory ) ’ . eps ’ ] , ’ psc2 ’ ) ;

%saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ . f i g ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ iSegm ’ num2str (iSegmentTrajectory ) ’ . pdf ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ iSegm ’ num2str (iSegmentTrajectory ) ’ . t i f ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ iSegm ’ num2str (iSegmentTrajectory ) ’ . png ’ ] ) ;

c l o s e a l l ;x l sw r i t e ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStr ’TR’ num2str ( i t r i p l ) ’ vPerc ’ num2str ( vecALL percTDOArefine ) ’ t ’ num2str (C iLineSt ) ’ j13 . x l s ’ ] , x l s1 t27tdoa ) ;

endend

i f isempty ( C iLineSt )x l s1 t27tdoa = x l s r ead ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{

i chant } ALLdescrStr ’TR’ num2str ( i t r i p lMa in ) ’ vPerc ’ num2str ( vecALL percTDOArefine ) ’ t ’num2str ( C iLineSt ) ’ j13 . x l s ’ ] ) ;

end ;NlessANTEN=sum( abs ( x l s1 t27tdoa ( 2 : end , : ) )<maxTDOAms, 1 ) ;NlessANTENmore=sum( abs ( x l s1 t27tdoa ( 2 : end , : ) )<maxTDOAms & abs ( x l s1 t27tdoa ( 2 : end , : ) )>maxTDOAms

/10 ,1) ;% −− ranse b r a l i vse , a ne tak kak da l ee too lko NlessANTENmoreMeanMic=mean( x l s1 t27tdoa ( 2 : end , NlessANTENmore>0) ,1) ;StdMic=std ( x l s1 t27tdoa ( 2 : end , NlessANTENmore>0) ,1) ;%MaxMic=max( x l s1 t27tdoa ( 2 : end , NlessANTENmore>0) , [ ] , 1 ) ;%MinMic=min( x l s1 t27tdoa ( 2 : end , NlessANTENmore>0) , [ ] , 1 ) ;

totalTime ( ichant , iSegmentTrajectory , indC DivsMaxsPers )=toc ;

Ntdoa2D{1}( ichant , indC DivsMaxsPers )=sq r t ( t o t a lE r r o r ( ichant , iSegmentTrajectory , indC DivsMaxsPers) ) ;

Ntdoa2D{2}( ichant , indC DivsMaxsPers )=Nt r i p l e t s ( ichant , iSegmentTrajectory , indC DivsMaxsPers ) ;Ntdoa2D{3}( ichant , indC DivsMaxsPers )=sq r t ( tota lErrorMin ( ichant , iSegmentTrajectory ,

indC DivsMaxsPers ) ) ;

Ntdoa2D{4}( ichant , indC DivsMaxsPers )=sq r t ( totalErrorMax ( ichant , iSegmentTrajectory ,indC DivsMaxsPers ) ) ;

Ntdoa2D{5}( ichant , indC DivsMaxsPers )=tota lErrorN ( ichant , iSegmentTrajectory , indC DivsMaxsPers ) ;Ntdoa2D{6}( ichant , indC DivsMaxsPers )=sum(NlessANTENmore) / s i zeTrack ;Ntdoa2D{7}( ichant , indC DivsMaxsPers )=sum( abs (MeanMic) ) ; %BYLO: findC DivsMaxsPers=f ind (

C DivsMaxsPers==ALL5hz1w1maxs2pers2{ iSegmentTrajectory } , 1 , ’ f i r s t ’ ) ;Ntdoa2D{8}( ichant , indC DivsMaxsPers )=sum( StdMic ) ;Ntdoa2D{9}( ichant , indC DivsMaxsPers )=100∗sum(NlessANTEN==0)/ s i zeTrack ;Ntdoa2D{10}( ichant , indC DivsMaxsPers )=100∗sum(NlessANTENmore==0)/ s i zeTrack ;

Ntdoa2D{11}( ichant , indC DivsMaxsPers )=AVtdoaInRange (1 ,2 ) ;Ntdoa2D{12}( ichant , indC DivsMaxsPers )=AVtdoaInRange (1 ,3 ) ;Ntdoa2D{13}( ichant , indC DivsMaxsPers )=AVtdoaInRange (1 ,4 ) ;Ntdoa2D{14}( ichant , indC DivsMaxsPers )=AVtdoaInRange (2 ,3 ) ;Ntdoa2D{15}( ichant , indC DivsMaxsPers )=AVtdoaInRange (2 ,4 ) ;Ntdoa2D{16}( ichant , indC DivsMaxsPers )=AVtdoaInRange (3 ,4 ) ; %BYLO: findC DivsMaxsPers=f ind (

C DivsMaxsPers==ALL5hz1w1maxs2pers2{ iSegmentTrajectory } , 1 , ’ f i r s t ’ ) ;

Ntdoa2D{17}( ichant , indC DivsMaxsPers )=NtdoaInRange (1 ,2 )+NtdoaInRange (1 , 3 )+NtdoaInRange (1 ,4 )+NtdoaInRange (2 ,3 )+NtdoaInRange (2 , 4 )+NtdoaInRange (3 ,4 ) ;

Ntdoa2D{18}( ichant , indC DivsMaxsPers )=AVtdoaInRange (1 ,2 )+AVtdoaInRange (1 , 3 )+AVtdoaInRange (1 ,4 )+AVtdoaInRange (2 , 3 )+AVtdoaInRange (2 , 4 )+AVtdoaInRange (3 ,4 ) ;

Ntdoa2D{19}( ichant , indC DivsMaxsPers )=totalTime ( ichant , iSegmentTrajectory , indC DivsMaxsPers ) ;

%Ntdoa2D{20}( ichant , indC DivsMaxsPers )=std ( plotTDOAall{ ichant , imic , jmic }) ;%Ntdoa2D{21}( ichant , indC DivsMaxsPers )=std ( plotTIMEall{ ichant , imic , jmic }) ;end ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% END CORRELATION OF SIGNALS AND REFINE TDOA TIME CALCULATION%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Page 129: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 129

end ;

end ;

end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’

iSegm ’ num2str ( iSegmentTrajectory ) ’Ntdoa2D . perBYmax .mat ’ ] , ’ Ntdoa2D ’ , ’ t o ta lEr ro r ’ , ’totalTime ’ , ’ Nt r i p l e t s ’ , ’ totalErrorMin ’ , ’ totalErrorMax ’ , ’ totalErrorN ’ ) ;

load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’iSegm ’ num2str ( iSegmentTrajectory ) ’Ntdoa2D . perBYmax .mat ’ ] ) ;

f o r C plot2Darr DivsMaxsPers =[1]Ntdoa2Dstr={ ’ t o ta lEr ro r ’ , ’ Nt r i p l e t s ’ , ’ totalErrorMin ’ , ’ totalErrorMax ’ , ’ Nt r i p l e t s ’ , ’ refinedTDOA/

sizeTrack ’ , ’ MEANnotStatic over micros ’ , ’ STDnotStatic over micros ’ , ’ Percent o f l e s sAnt dts ,% ’ , ’ Percent o f void l e s sAntNotStat i c dts , % ’ , ’ refinedTDOA/ sizeTrack , notStat i c ’ , ’ ’ , ’ Rangeover a l l microphones ’ , ’ Range−STD over a l l microphones’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ , ’ ; ’ } ;

f o r i chant=ALLbatNumsf o r i o i =1:N2Darr DivsMaxsPersi i =0;MAXiAllmaxs=−i n f ∗ones (1 , N2Darr DivsMaxsPers ) ; MAXiAllperc=−i n f ∗ones (1 , N2Darr DivsMaxsPers ) ;

MAXii=−i n f ∗ones (1 , N2Darr DivsMaxsPers ) ; MAXvalue=−i n f ∗ones (1 , N2Darr DivsMaxsPers ) ;f o r iAl lmaxs=1: l ength (ALLmaxs)f o r iA l l p e r c =1: l ength (ALLperc )

i i= i i +1;ALLmaxsBYperc{ i o i , iSegmentTrajectory }( iAllmaxs , iA l l p e r c )=Ntdoa2D{ i o i }( ichant , i i ) ;i f MAXvalue( i o i )<ALLmaxsBYperc{ i o i , iSegmentTrajectory }( iAllmaxs , iA l l p e r c )

MAXiAllmaxs ( i o i )=iAllmaxs ; MAXiAllperc ( i o i )=iA l l p e r c ; MAXii( i o i )=i i ; MAXvalue( i o i )=ALLmaxsBYperc{ i o i , iSegmentTrajectory }( iAllmaxs , iA l l p e r c ) ;

end ;end ;end ;% imagesc (ALLmaxsBYperc{ i o i , iSegmentTrajectory }) ; c o l o rba r ;% x l abe l ( ’%TDOA+1 ’ , ’ FontSize ’ , f s i z eB i g ) ; %x l abe l ( ’ windowSize/ timeStep ’ , ’

FontSize ’ , f s i z eB i g ) ;% y l abe l ( ’numberTDOAmaxs/2 ’ , ’ FontSize ’ , f s i z eB i g ) ; %y l abe l ( ’ ClickFreq , 5Hz (5/

timeStep ) ’ , ’ FontSize ’ , f s i z eB i g ) ;% t i t l e ( Ntdoa2Dstr{ i o i } , ’ FontSize ’ , f s i z eB i g ) ;% saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } num2str ( i o i )

ALLdescrStrCour ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . perBYmaxALL . jpg ’ ] ) ;% %saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } num2str ( i o i

) ALLdescrStrCour ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . perBYmaxALL . f i g ’ ] ) ;% saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } num2str ( i o i )

ALLdescrStrCour ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . perBYmaxALL . eps ’ ] , ’ psc2 ’ ) ;% saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } num2str ( i o i )

ALLdescrStrCour ’ iSegm ’ num2str ( iSegmentTrajectory ) ’ . perBYmaxALL . pdf ’ ] ) ;% c l o s e a l l ;end ;end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’

iSegm ’ num2str ( iSegmentTrajectory ) ’ . perBYmax .mat ’ ] , ’ Ntdoa2D ’ , ’ ALLmaxsBYperc ’ , ’ MAXiAllmaxs’ , ’MAXiAllperc ’ , ’MAXii ’ , ’MAXvalue ’ ) ;

end ;cube ( iSegmentTrajectory , : , 1 )=ALLmaxsBYperc{3 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 2 )=ALLmaxsBYperc{11 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 3 )=ALLmaxsBYperc{12 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 4 )=ALLmaxsBYperc{13 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 5 )=ALLmaxsBYperc{14 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 6 )=ALLmaxsBYperc{15 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 7 )=ALLmaxsBYperc{16 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 8 )=ALLmaxsBYperc{6 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 9 )=ALLmaxsBYperc{17 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 1 0 )=ALLmaxsBYperc{5 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 1 1 )=ALLmaxsBYperc{18 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 1 2 )=ALLmaxsBYperc{2 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 1 3 )=ALLmaxsBYperc{1 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 1 4 )=ALLmaxsBYperc{19 , iSegmentTrajectory } ’ ;cube ( iSegmentTrajectory , : , 1 5 )=cube ( iSegmentTrajectory , : , 1 4 ) ;cube ( iSegmentTrajectory , : , 1 6 )=cube ( iSegmentTrajectory , : , 1 4 ) ;cube ( iSegmentTrajectory , : , 1 7 )=cube ( iSegmentTrajectory , : , 1 4 ) ;s t rLas t Ind={ ’minError ’ , ’TDOA(mic1−mic2 ) ’ , ’TDOA(mic1−mic3 ) ’ , ’TDOA(mic1−mic4 ) ’ , ’TDOA(mic2−mic3 ) ’ , ’

TDOA(mic2−mic4 ) ’ , ’TDOA(mic3−mic4 ) ’ , ’ sumNtdoa by sizeTrack ’ , ’ Ntdoa in Range ’ , ’N t r i p l e t s i n e r r o r c a l c u l a t i o n ’ , ’ sum of tdoa ’ , ’ Nt r i p l e t s ’ , ’ t o ta lEr ro r ’ , ’ totalTimeMean ’ , ’

Page 130: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

130 BIBLIOGRAPHY

totalTimeMin ’ , ’ totalTimeMax ’ , ’ totalTimeSum ’ , ’ ’ , ’ ’ } ;squareRes ( iSegmentTrajectory , 1 )=min ( cube ( iSegmentTrajectory , : , 1 ) , [ ] , 2 ) ;squareRes ( iSegmentTrajectory , 2 )=nanmean( cube ( iSegmentTrajectory , : , 2 ) ,2 ) ;squareRes ( iSegmentTrajectory , 3 )=nanmean( cube ( iSegmentTrajectory , : , 3 ) ,2 ) ;squareRes ( iSegmentTrajectory , 4 )=nanmean( cube ( iSegmentTrajectory , : , 4 ) ,2 ) ;squareRes ( iSegmentTrajectory , 5 )=nanmean( cube ( iSegmentTrajectory , : , 5 ) ,2 ) ;squareRes ( iSegmentTrajectory , 6 )=nanmean( cube ( iSegmentTrajectory , : , 6 ) ,2 ) ;squareRes ( iSegmentTrajectory , 7 )=nanmean( cube ( iSegmentTrajectory , : , 7 ) ,2 ) ;squareRes ( iSegmentTrajectory , 8 )=nanmean( cube ( iSegmentTrajectory , : , 8 ) ,2 ) ;squareRes ( iSegmentTrajectory , 9 )=nanmean( cube ( iSegmentTrajectory , : , 9 ) ,2 ) ;squareRes ( iSegmentTrajectory , 1 0 )=nanmean( cube ( iSegmentTrajectory , : , 1 0 ) ,2 ) ;squareRes ( iSegmentTrajectory , 1 1 )=nanmean( cube ( iSegmentTrajectory , : , 1 1 ) ,2 ) ;squareRes ( iSegmentTrajectory , 1 2 )=nanmean( cube ( iSegmentTrajectory , : , 1 2 ) ,2 ) ;squareRes ( iSegmentTrajectory , 1 3 )=nanmean( cube ( iSegmentTrajectory , : , 1 3 ) ,2 ) ;squareRes ( iSegmentTrajectory , 1 4 )=nanmean( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ;

i f i snan (nanmean(nanmin ( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ) )squareRes ( iSegmentTrajectory , 1 5 ) =0;e l s esquareRes ( iSegmentTrajectory , 1 5 )=nanmean(nanmin ( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ) ;end ;

i f i snan (nanmean(nanmax( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ) )squareRes ( iSegmentTrajectory , 1 6 ) =0;e l s esquareRes ( iSegmentTrajectory , 1 6 )=nanmean(nanmax( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ) ;end ;

i f i snan (nanmean(nansum( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ) )squareRes ( iSegmentTrajectory , 1 7 ) =0;e l s esquareRes ( iSegmentTrajectory , 1 7 )=nanmean(nansum( cube ( iSegmentTrajectory , : , 1 4 ) ,2 ) ) ;end ;

end ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’

CUBEmars ’ num2str (ALLmaxs) ’ . mat ’ ] ) ;

a l lNtdoa =[8:10 1 2 ] ;xlsTXTnew=ze ro s ( s i z e ( cube , 1 ) ,2∗ s i z e ( cube , 2 ) ) ;f o r i=al lNtdoaf o r time=1: s i z e ( cube , 1 )xlsTXTnew( time , : ) =[cube ( time , : , 1 ) cube ( time , : , i ) ] ;x l sw r i t e ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour s t rLas t Ind { i } ’TXTnew. x ls ’ ] , xlsTXTnew) ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour

s t rLas t Ind { i } ’TXTnew.mat ’ ] , ’ xlsTXTnew ’ ) ;endend

al lNtdoa = [ 1 : 1 3 ] ;xlsTXTcubsq=ze ro s ( s i z e ( cube , 1 ) ,2 ) ;f o r i=al lNtdoaf o r time=1: s i z e ( cube , 1 )xlsTXTcubsq ( time , : ) =[cube ( time , 1 , i ) squareRes ( time , i ) ] ;x l sw r i t e ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour s t rLas t Ind { i } ’TXTcubsq . x l s ’ ] , xlsTXTcubsq ) ;save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour

s t rLas t Ind { i } ’TXTcubsq .mat ’ ] , ’ xlsTXTcubsq ’ ) ;endend

f o r w i l lDe l=0f i g u r e ; bar ( squeeze ( cube ( : , : , 1 ) ) ./(1+ w i l lDe l ∗cube ( : , : , 8 ) ) /1000)bar l egends=c e l l (1 , l ength (ALLmaxs) ) ;f o r i l e g =1: l ength (ALLmaxs) , bar l egends { i l e g }=[num2str (ALLmaxs( i l e g ) ) ’max ’ ] ; end ;legend ( bar l egends ) ;t i t l e ( ’ Advantage o f us ing mul t ip l e maxs over s i n g l e max ’ ) ;y l ab e l ( ’ t o t a l TDOA error ,ms ’ ) ;x l ab e l ( [ ’ time−moment , s ∗ ’ num2str ( Lseg /1000) ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour num2str ( w i l lDe l ) ’TDOAerrorCUBE . jpg ’ ] ) ;c l o s e a l l ;end ;

Page 131: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 131

f i g u r e ; bar ( [ cube ( : , 1 , 1 ) squareRes ( : , 1 ) ] /1000)legend ( ’ s tate−of−the−art ’ , ’ our r e su l t ’ ) ;t i t l e ( ’ Comparison o f State−of−the−ar t with our r e su l t ’ ) ;y l ab e l ( ’ t o t a l TDOA error ,ms ’ ) ;x l ab e l ( [ ’ time−moment , s ∗ ’ num2str ( Lseg /1000) ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour num2str ( w i l lDe l ) ’TDOAerrorRESULT . jpg ’ ] ) ;c l o s e a l l ;

a l lNtdoa=[14 15 16 1 7 ] ;f o r j =1: l ength (ALLmaxs)f o r i=al lNtdoaf i g u r e ; bar ( [ cube ( : , j , i ) squareRes ( : , i ) ] )l egend ( ’ s tate−of−the−art ’ , ’ our r e su l t ’ ) ;t i t l e ( ’ Comparison o f State−of−the−ar t with our r e su l t ’ ) ;y l ab e l ( ’ t o t a l TDOA ca l c u l a t i o n time , s ’ ) ;x l ab e l ( [ ’ time−moment , s ∗ ’ num2str ( Lseg /1000) ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour ’ Nmaxs=’ num2str (ALLmaxs( j ) ) ’ ’ s t rLas t Ind { i } ’ TDOAtimeRESULT. png ’ ] ) ;c l o s e a l l ;end ;end ;

f o r imax=1: s i z e ( cube , 2 )f i g u r e ; f i g u r e ; p l o t ( squeeze ( cube ( : , imax , 2 : 7 ) ) , ’ marker ’ , ’ x ’ ) ; %bar ( squeeze ( cube ( : , imax , 2 : 7 ) ) , ’

stack ’ ) wlegend ( s t rLas t Ind {2 :7} ) ;t i t l e ( [ ’TDOAs of ’ num2str ( imax ) ’max , ’ ’N=’ num2str ( cube ( : , imax , 8 ) ’ ) ] ) ;y l ab e l ( ’TDOA,ms ’ ) ;x l ab e l ( [ ’ time−moment , s ∗ ’ num2str ( Lseg /1000) ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour ’TDOA’ num2str ( imax ) ’ m a xCUBE . jpg ’ ] ) ;c l o s e a l l ;end ;

f i g u r e ; p l o t ( squeeze ( squareRes ( : , 2 : 7 ) ) , ’ marker ’ , ’ x ’ ) ; %bar ( squeeze ( squareRes ( : , 2 : 7 ) ) , ’ stack ’ )legend ( s t rLas t Ind {2 :7} ) ;t i t l e ( [ ’TDOAs o f our r e s u l t s ’ ] ) ;y l ab e l ( ’TDOA,ms ’ ) ;x l ab e l ( [ ’ time−moment , s ∗ ’ num2str ( Lseg /1000) ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour ’TDOA’ ’ourRESULT . jpg ’ ] ) ;c l o s e a l l ;

f i g u r e ; p l o t ( squeeze ( cube ( : , 1 , 2 : 7 ) ) , ’ marker ’ , ’ x ’ ) ; %bar ( squeeze ( squareRes ( : , 2 : 7 ) ) , ’ stack ’ )legend ( s t rLas t Ind {2 :7} ) ;t i t l e ( [ ’TDOAs o f s t a t e o f the art ’ ] ) ;y l ab e l ( ’TDOA,ms ’ ) ;x l ab e l ( [ ’ time−moment , s ∗ ’ num2str ( Lseg /1000) ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant }

ALLdescrStrCour ’TDOA’ ’ baselineRESULT . jpg ’ ] ) ;c l o s e a l l ;

save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’ALLSegm . perBYmax .mat ’ ] , ’ Ntdoa2D ’ , ’ t o ta lEr ro r ’ , ’ totalTime ’ ) ;

load ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’ALLSegm . perBYmax .mat ’ ] ) ;

save ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStrCour ’CUBEmars ’ num2str (ALLmaxs) ’ maxfromDelai10 .mat ’ ] , ’ cube ’ , ’ squareRes ’ ) ;

MarkerStyle ={ ’+ ’ , ’o ’ , ’∗ ’ , ’ x ’ , ’ s ’ , ’ d ’ , ’ ˆ ’ , ’ v ’ , ’ < ’ , ’ > ’ , ’ p ’ , ’ h ’ } ;LineCol={ ’ black ’ , ’ green ’ , ’ blue ’ , ’ red ’ , ’ magenta ’ , ’ black ’ , ’ green ’ , ’ blue ’ , ’ red ’ , ’ magenta ’ , ’ black ’ , ’

green ’ , ’ blue ’ , ’ red ’ , ’ magenta ’ } ;Ncols=3;LineSt={ ’none ’ , ’ − ’} ;i t r i p l=i t r i p lMa in ;f o r i chant=ALLbatNumsc l o s e a l ls c r s z=get (0 , ’ ScreenSize ’ ) ;

Page 132: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

132 BIBLIOGRAPHY

f i g u r e ( ’ Pos i t ion ’ , [ 0 0 s c r s z (3 ) s c r s z (4 ) ] ) ;ax i s o f f ;i s ubp l o t =0; iC patperc =0; phexist1mic=0; phexistALLmic=1; al lTplotTIMEal l = [ ] ;f o r C patperc=vecALL percTDOArefine ( end )iC patperc=iC patperc +1;i s ubp l o t=i subp l o t +1;subplot (1+ length ( vecALL percTDOArefine ) , Ncols , [ 1 : ( Ncols −1) ] +Ncols ∗( i subp lot −1) ) ; hold on ; i l i n e

=0;iLegendSty le =0; c l e a r LegendStyle ;LegendStyle=c e l l (1 , l ength ( m1inCirc{ i t r i p l }) ) ;f o r ind imic =1: l ength ( m1inCirc{ i t r i p l })imic=m1inCirc{ i t r i p l }( ind imic ) ;jmic=m2inCirc{ i t r i p l }( ind imic ) ;i l i n e=i l i n e +1;i f s i z e ( plotTDOAall{ ichant , imic , jmic } ,2)∗ s i z e ( plotTIMEall{ ichant , imic , jmic } ,2) && ˜ isempty (

plotTDOAall{ ichant , imic , jmic }) && ˜ isempty ( plotTIMEall{ ichant , imic , jmic })ph1 ( i l i n e )=p lo t ( plotTIMEall{ ichant , imic , jmic }/1000 , plotTDOAall{ ichant , imic , jmic } , ’ Color ’ , LineCol

{ i l i n e } , ’ LineWidth ’ , 1 , ’ L ineSty le ’ , LineSt{C iLineSt } , ’ MarkerSize ’ , msize /C iLineSt , ’ Marker ’ ,MarkerStyle{ i l i n e }) ;

phexist1mic=1; al lTplotTIMEal l=[ al lTplotTIMEal l plotTIMEall{ ichant , imic , jmic } ] ;phexist1mic=1;e l s ephexistALLmic=0;end ;iLegendSty le=iLegendSty le +1; LegendStyle{ iLegendSty le }=[ ’ microphones ’ num2str ( imic ) ’ and ’

num2str ( jmic ) ] ;maxstrictTDOAms=2.6; i f i chant==56, maxstrictTDOAms=2.4; end ;end ;x l ab e l ( [ ’ time , s ’ ] , ’ FontSize ’ , f s i zeSm ) ; y l ab e l ( [ ’TDOA,ms ’ ] , ’ FontSize ’ , f s i zeSm ) ;xlim ( [ AllSegmentTrajectoryMS {1}(1) /1000 AllSegmentTrajectoryMS{end }( end ) /1000 ] ) ;RecName=globEXTcourt{ i chant } ;RecName(RecName==’ ’ ) =’− ’; i f C patperc <99, s t rC patperc=num2str ( C patperc ) ; e l s e s t rC patperc=

num2str (100) ; end ;strNtdoa = [ ’ ’ ] ;strIndOK = [ ’ ’ ] ;t i t l e ( [ RecName ’ ’ ALLdescrStrCour ’ on ’ num2str ( AllSegmentTrajectoryMS {1}) ’ : ’ s t r edge ’ on ’

num2str ( AllSegmentTrajectoryMS {2}) ’ : ’ strmid ’ on ’ num2str ( AllSegmentTrajectoryMS {3}) ’ : ’s t r edge ’ Ant ’ num2str (maxTDOAm) ’m’ ] ) ;

ylim ([−maxTDOAms maxTDOAms] ) ;endi subp l o t=i subp l o t +1; subplot (1+ length ( vecALL percTDOArefine ) , Ncols , [ 1 : ( Ncols −1) ] +Ncols ∗( i subp lot

−1) ) ;%v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;i f datafrom0cyberio1dodo==0 %ichant<=57v=wavread ( [ globDirIN globEXTpath{ i chant } ] ) ;e l s eload ( [ globDirIN globEXTpar . INsubDODO globEXTpath{ i chant } ] ) ;v=tcu r de t ; c l e a r t cu r de t ;end ;p l o t ( l i n s pa c e ( AllSegmentTrajectoryMS {1}(1) /1 , AllSegmentTrajectoryMS{end }( end ) /1 ,

INDvecTimesTracking ( end )−INDvecTimesTracking (1)+1)/1000 , v ( INDvecTimesTracking (1) :INDvecTimesTracking ( end ) , m1inCirc{ i t r i p l }) , ’ k ’ ) ;

x l ab e l ( [ ’ time , s ’ ] , ’ FontSize ’ , f s i zeSm ) ; y l ab e l ( [ ’ Recording Amplitude ’ ] , ’ FontSize ’ , f s i zeSm ) ;xlim ( [ AllSegmentTrajectoryMS {1}(1) /1000 AllSegmentTrajectoryMS{end }( end ) /1000 ] ) ;sh1=subplot (1+ length ( vecALL percTDOArefine ) , Ncols , Ncols ) ;%: Ncols : Ncols∗(1+ length (

vecALL percTDOArefine ) ) ) ;p1=get ( sh1 , ’ po s i t i on ’ ) ; %lh=legend ( sh , [ ph1 ; ph2 ] ) ;i f phexist1mic && phexistALLmic && length ( ph1 )==length ( m1inCirc{ i t r i p l }) && ˜ isempty (

al lTplotTIMEal l ) %e a r l i e r : && length ( TIMEinplotrange )>=2 && length (TDOAinplotrange )>=2NcurvesOK=min( length ( ph1 ) , l ength ( LegendStyle ) ) ;lh1=legend ( sh1 , ph1 ( 1 : NcurvesOK) , LegendStyle ( 1 : NcurvesOK) ) ; % %lh=legend ( LegendStyle ) ; % % % % %

% % %se t ( lh1 , ’ po s i t i on ’ , p1 ) ;ax i s ( sh1 , ’ o f f ’ ) ;end ;

%PERVOE OK, OSTALNYJE SOHRANAJUTSA KAK PUSTYJE LEGENDYsaveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’

num2str (maxTDOAm) strNtdoa strIndOK ’ALL. jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’

num2str (maxTDOAm) strNtdoa strIndOK ’ALL. jpg ’ ] ) ;saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’

num2str (maxTDOAm) strNtdoa strIndOK ’ALL. eps ’ ] , ’ psc2 ’ ) ;

%saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’ num2str (maxTDOAm) strNtdoa strIndOK ’ . f i g ’ ] ) ;

Page 133: KnowHow of UTLN Patents EP2235558/US8638641 [1] …sis.univ-tln.fr/~glotin/GLOTIN_etal2014_BAT_KNOWHOW_TRACKING_… · KnowHow of UTLN Patents EP2235558/US8638641 [1] and FR1454539

15. APPENDIX4: MATLAB CODE FOR SIMULATION 133

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’num2str (maxTDOAm) strNtdoa strIndOK ’ALL. pdf ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’num2str (maxTDOAm) strNtdoa strIndOK ’ALL. t i f ’ ] ) ;

saveas ( gcf , [ globDirOUT globEXTpar .OUTsub globEXTcourt{ i chant } ’ ’ ALLdescrStr ’ TDOAwithANTENNA’num2str (maxTDOAm) strNtdoa strIndOK ’ALL. png ’ ] ) ;

c l o s e a l l ;x l sw r i t e ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStr ’

TR’ num2str ( i t r i p l ) ’ vPerc ’ num2str ( vecALL percTDOArefine ) ’ t ’ num2str ( C iLineSt ) ’ j13 . x l s’ ] , x l s1 t27tdoa ) ;

x l sw r i t e ( [ globDirOUT globEXTpar .OUTsub BegFi le num2str ( C cor ) globEXTcourt{ i chant } ALLdescrStr ’TR’ num2str ( i t r i p l ) ’ vPerc ’ num2str ( vecALL percTDOArefine ) ’ t ’ num2str ( C iLineSt ) ’ j13 . x l s’ ] , x l s1 t27tdoa ) ;

end

end ;end ;

\end{verbatim}


Recommended