- Download
- Welcome to SOFiA
- Who is behind SOFiA
- Feature overview
- System overview
- Function reference
- readVSAdata
- mergeArrayData
- F/D/T
- gauss
- lebedev
- S/W/G
- S/T/C
- W/G/C
- S/F/E
- M/F
- R/F/I
- P/D/C
- I/T/C
- makeMTX
- makeIR
- visual3D
- Coordinate System
- Application Examples
- Example 1
- Example 2
- Example 3
- Example 4
- Example 5
- Example 6
- Example 7
- Example 8
- Array Datasets
- VariSphear system
- Groups and Mailinglists
- Contact and Support
- How to Reference
|
SOFiA Sampled Wave Generator Wrapper
The sampled wave generator emulates a full spectrum wave impact to a microphone array. The wave is sampled at discrete positions determined by a quadrature grid (e.g. from SOFiAlebedev() or SOFiAgauss()). The generator script can be modified to simulate errors like e.g. positioning or temperature deviation. Feeding the SOFiA chain with a S/W/G synthesized plane wave aliasing artifacts and errors can easily be simulated, visualized or auralized (see figures below). The S/W/G module (2nd generation) is a wrapper using the W/G/C wave generator core and the I/T/C inverse spatial fourier transform core. The internal generator order Ng should be (much) higher than the array order.
ARGUMENTS
Input
Name |
Type |
Purpose |
Default |
r |
float |
Microphone radius in m
Can also be a vector for rigid/dual sphere configurations:
(1,1) => rm Microphone Radius
(2,1) => rs Sphere Radius or Microphone2 Radius
! If only one radius (rm) is given using a Rigid/Dual Sphere Configuration:
rs = rm. In this case only one kr-vector is returned.
|
1 |
gridData |
float mtx |
Quadrature grid, positions and weights (W):
AZ1 EL1 W1 AZ2 EL2 W2 ... AZM ELM WM for M Positions |
Lebedev 110P |
ac |
int |
Array configuration
0: Open Sphere with p Transducers
1: Open Sphere with pGrad Transducers
2: Rigid Sphere with p Transducers
3: Rigid Sphere with pGrad Transducers
4: Dual Open Sphere with p Transducers |
0 |
FS |
int |
Sampling rate |
48000 |
NFFT |
int |
FFT Order (Number of bins) should be 2^x, x=1,2,3,… |
512 |
AZ |
float |
Azimuthal angle of the wave (Refer to
Coordinate System) |
0 |
EL |
float |
Elevation angle of the wave (Refer to
Coordinate System) |
pi/2 |
Nlim |
int |
Internal generator order |
120 |
t |
float |
Time delay in s |
0 |
c |
float |
Speed of sound in m/s |
343.0 |
wavetype |
int |
0: Plane wave, 1: Spherical wave |
0 |
ds |
float |
Source distance in m (For wavetype = 1, spherical wave only)
Warning: If NFFT is smaller than the time the wavefront needs
to travel from the source to the array, the impulse response will by
cyclically shifted (cyclic convolution) |
1m |
Angles AZ, EL are in RAD
Output
Name |
Type |
Purpose |
fftData |
complexfloat mtx |
Frequency domain data for
S/T/C |
kr |
float vec |
kr Values (k: wave number, r: radius)
Can also be a matrix krs for rigid sphere configurations:
[1,:] krm referring to the Microphone Radius
[2,:] krs referring to the Sphere/Microphone2 Radius |
ANALYSIS OF SPATIAL ALIASING USING SOFiA S/W/G
The figure shows array responses to a synhtesized plane wave from S/W/G for different kr-values. The left globe shows
the response for kr << N. Everything is fine. The globe in the middle is a response for kr = N (kr is slightly
higher than N). Some spatial alias artifacts can be observed. The right one shows a response for kr >> N. The spatial
aliasing has destroyed the plane wave response completely.
The figure above shows a reconstructed spectrum for a full-spectrum (FS 48KHz) plane wave synthesized with the S/W/G
module. The spectrum is perfectly reconstructed for all krN starting at 2-3KHz.
FILE(S):
File |
Type |
OS/Matlab |
sofia_swg.m |
Help header, Fuction |
All OS |
HEADER
/*
[fftData, kr] = sofia_swg(r, q_grid, ac, FS, NFFT, AZ, EL, Ng, t, c, wavetype, ds)
------------------------------------------------------------------------------------
|
fftData |
Complex sound pressures [(N+1)^2 x NFFT] |
kr
|
kr-Vector
Can also be a matrix [krm; krs] for rigid sphere configurations:
[1;:] => krm referring to the Microphone Radius
[2;:] => krs referring to the Sphere/Microphone2 Radius
|
------------------------------------------------------------------------------------ |
r |
Microphone Radius
Can also be a vector for rigid sphere configurations:
[1,1] => rm Microphone Radius
[2,1] => rs Sphere Radius (Scatterer)
|
gridData
|
Quadrature grid [default LEB110]
Columns: Position Number 1...M
Rows: [AZ EL Weight]
Angles AZ, EL in [RAD]
|
ac
|
Array Configuration
0 Open Sphere with p Transducers
1 Open Sphere with pGrad Transducers
2 Rigid Sphere with p Transducers
3 Rigid Sphere with pGrad Transducers (Thx to Nils Peters!)
4 Dual Open Sphere with p Transducers (Thx to Nils Peters!)
|
FS |
Sampling Frequency |
NFFT |
FFT Order (Number of bins) shhould be 2^x, x=1,2,3,... |
AZ |
Azimuth angle in [DEG] 0-2pi |
EL |
Elevation angle in [DEG] 0-pi |
Nlim |
Internal generator transform order limit. (Warning: Should be much
higher than typical microphone array order) |
c |
Speed of sound in [m/s] (Default: 343m/s) |
t |
Time Delay in s |
wavetype |
Type pf the Wave. 0: Plane wave (default); 1: Spherical Wave |
ds |
Distance of the source in [m] (For wavetype = 1 only) |
This file is a wrapper generating the complex pressures at the
positions given in 'q_grid' for a full spectrum 0-FS/2Hz (NFFT Bins)
wave impining to an awway. The wrapper involves the W/G/C wave
generator core and the I/T/C spatial transform core
|
*/ |
|
|