Document toolboxDocument toolbox

(8.D.2.5) GCCDOAV1

Overview

Estimates the direction of arrival in a 2d circle

Type Definition

typedef struct _ModuleGCCDOAV1 { ModuleInstanceDescriptor instance; // Common Audio Weaver module instance structure INT32 numMics; // Number of mics in the array INT32 numDirs; // Number of look directions INT32 maxNumSources; // Maximum number of sources to identify INT32 interpFactor; // Interpolation factor INT32 fftSize; // Size of FFT upstream from this module INT32 numBins; // Number of bins. This should be the input block size INT32 useInputWeightingPin; // Use input weighting pin INT32 numPairs; // Number of microphone pairs INT32 xCorrsZeroSamp; // 0th sample index in the xcorr data FLOAT32 noiseFloorDBOffset; // Offset, in DB, for noise floor weighting. Higher value will weight noise floor less. INT32 interpBS; // Block Size at interpolated rate FLOAT32 interpSR; // Sample rate at interpolated rate INT32 lookDirLow; // Min look direction, in degrees. The low end of the DOA look direction. INT32 lookDirHigh; // Max look direction, in degrees. The high end of the DOA look direction. FLOAT32 epsilon; // Small number FLOAT32 c; // Speed of sound in meters per sec FLOAT32 windowSize; // How much to extend the look window when comparing measured delays with theoretical time delays. This is relative number. INT32 removalWindowDelta; // Number of samples to remove when filtering DOA Peaks INT32 tauMaxMax; // Maximum theoretical time delays for all mic pair INT32 tauMinMin; // Minimum theoretical time delays for all mic pair INT32 tdZeroSamp; // windowed xcorr 0 delay sample index INT32 tdLength; // Length of the xcorr vector, after windowing FLOAT32* micArrayCoords; // Microphone geometry in cartesian coordinates and in meters. The vector going from (0,0) to (1,0) is considered 0 degrees. FLOAT32* noiseFloorVar; // Microphone noise floor measurement, in linear units. INT32* taus; // Theoretical time delays based on the mic geometry and other factors. FLOAT32* lookDirs; // Look directions, in degrees. INT32* tauMax; // Maximum theoretical time delays for each mic pair INT32* tauMin; // Minimum theoretical time delays for each mic pair FLOAT32* G; // Temporary variable from the processing function FLOAT32* doaValues; // Temporary variable from the processing function FLOAT32* td; // Temporary variable from the processing function FLOAT32* tdTmp; // Temporary variable from the processing function void * ifft_struct_pointer; // Points to an instance of an IFFT module } ModuleGCCDOAV1Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

numMics

int

const

0

6

Unrestricted

 

numDirs

int

const

0

360

Unrestricted

 

maxNumSources

int

const

0

3

Unrestricted

 

interpFactor

int

const

0

16

Unrestricted

 

fftSize

int

const

0

512

Unrestricted

 

numBins

int

const

0

257

Unrestricted

 

useInputWeightingPin

int

const

0

1

Unrestricted

 

numPairs

int

const

0

15

Unrestricted

 

xCorrsZeroSamp

int

const

0

128

Unrestricted

 

noiseFloorDBOffset

float

parameter

0

5

-20:20

 

interpBS

int

derived

0

4097

Unrestricted

 

interpSR

float

derived

0

196608000

Unrestricted

 

lookDirLow

int

parameter

0

0

0:360

 

lookDirHigh

int

parameter

0

360

0:360

 

epsilon

float

parameter

1

1e-16

Unrestricted

 

c

float

parameter

1

343

Unrestricted

 

windowSize

float

parameter

1

0

Unrestricted

 

removalWindowDelta

int

parameter

1

2

Unrestricted

 

tauMaxMax

int

derived

1

0

Unrestricted

 

tauMinMin

int

derived

1

0

Unrestricted

 

tdZeroSamp

int

derived

1

0

Unrestricted

 

tdLength

int

derived

1

1

Unrestricted

 

micArrayCoords

float*

parameter

0

[6 x 2]

Unrestricted

 

noiseFloorVar

float*

parameter

0

[257 x 1]

0:1

 

taus

int*

derived

1

[15 x 360]

Unrestricted

 

lookDirs

float*

derived

1

[1 x 360]

Unrestricted

 

tauMax

int*

derived

1

[15 x 1]

Unrestricted

 

tauMin

int*

derived

1

[15 x 1]

Unrestricted

 

G

float*

state

0

[4097 x 1]

Unrestricted

 

doaValues

float*

state

0

[360 x 1]

Unrestricted

 

td

float*

state

0

[1 x 15]

Unrestricted

 

tdTmp

float*

state

0

[8192 x 1]

Unrestricted

 

ifft_struct_pointer

void *

state

1

 

Unrestricted

 

Pins

Input Pins

Name: micIn

Description: Microphone array input - in frequency domain

Data type: float

Channel range: 6

Block size range: 257

Sample rate range: Unrestricted

Complex support: Complex

 

Name: weight

Description: Weighting of each microphone

Data type: float

Channel range: 6

Block size range: 257

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: estDirs

Description: Estimated directions, in degrees

Data type: float

 

Name: estEnergy

Description: Estimated relative energy for each estimated direction

Data type: float

Scratch Pins

Channel count: 1

Block size: 4097

Sample rate: 48000

 

Channel count: 1

Block size: 8192

Sample rate: 48000

 

Channel count: 1

Block size: 8192

Sample rate: 48000

MATLAB Usage

File Name: gcc_doa_v1_module.m

M = gcc_doa_v1_module(NAME, numMics, numDirs, maxNumSources, interpFactor, fftSize, useInputWeightingPin) Given the DOA output, this module finds the direction of the interference sound. Arguments: NAME - name of the module. numMics - number of microphones in the microphone array numDirs - number of look directions to sample maxNumSources - maximum number of sources to find interpFactor - how much to interpolate for better estimation at the cost of more MIPS fftSize - Size of the FFT operation done upstream from this module. The input blocksize is expected to be fftSize/2 + 1. useInputWeightingPin - If true, then a 2nd input pin will be used for the weighting. The input pin is expected to have numMics channels and same block size as the other input. The input pin is expected to be the microphone signals after processed with the WOLA Analysis filter bank. The first output pin contains maxNumSources channel of size 1. This is the estimated direction of arrival. This is in degrees, between 0 and 359. Direction 0 corresponds to The second output pin contains maxNumSources channel of size 1. This is the associated energy of the direction of arrival estimate (the first output). Copyright 2018. DSP Concepts, Inc. All Rights Reserved.

Â