Talk:SOFA specifications

From Sofaconventions
Revision as of 20:45, 13 October 2014 by Tcarpent (talk | contribs)
Jump to navigation Jump to search

SimpleFreeFieldSOS : Simple Free Field Second Order Sections

Description

This convention is essentially the same as SimpleFreeFieldHRIR except that it is adapted to a parametric model of HRIR.

This parametric model consists of replacing HRIR (as FIR) with a monaural delay and second order sections filters.

Background

Being a causal and stable filter, an HRIR can be decomposed into a minimum phase part component and an all-pass component. The phase of each HRIR is thus decomposed into the minimum phase and the phase of the all-pass component i.e. the excess phase. The minimum phase is related to the magnitude spectrum through the Hilbert transform. The excess phase of HRIR is usually linear (up to approx 8 - 10 kHz). A simplified model of HRTF can thus be built where the all-pass component is replaced by a pure delay. This pure delay is referred to as monaural delay. Each HRTF is thus fully described by its magnitude spectrum and the monaural delay.

Several perceptual studies (e.g. Wightman 1992) have shown the validity of such simplified model (given the fact that the phase information of the higher frequencies -- that is neglected by the model -- is not used by the auditory system to estimate the directions of arrival). Finally the minimum phase part of HRTF can be modeled as an IIR filter. Many modeling techniques have been proposed. Anyway the resulting IIR digital filter needs to be represented as a cascade of first order or second order sections for numerical stability reasons.

Proposal for SimpleFreeFieldSOS

For the sake of simplicity, we consider that all the cascaded filters are second order filters (i.e. no first order filter). (anyway a first order filter can be represented with a second order filter).

The SOS is represented as follows:

H(z) = B1(z) / A1(z) . B2(z) / A2(z) . ... . Bp(z) / Ap(z)

where p is the number of second order sections. Each second order section is represented by 6 filter taps:

Bi(z) = bi0 + bi1 z^(-1) + bi2 z^(-2)

Ai(z) = ai0 + ai1 z^(-1) + ai2 z^(-2)

(even though the denominator is usually normalized such that ai0 = 1).

For each filter H(z), the filter taps are arranged as follows:

[ B1(z) A1(z) B2(z) A2(z) .... Bp(z) Ap(z) ] == [ b10 b11 b12 a10 a11 a12 b20 b21 b22 a20 a21 a22 .... bp0 bp1 bp2 ap0 ap1 ap2 ]


SimpleFreeFieldSOS convention : everything similar to SimpleFreeFieldHRIR except the following:

DataType is 'SOS' (standing for 'second order sections').

Data.SOS of size [ M R N ] contains the filter coefficients. N being the total number of coefficients, it is always a multiple of 6. (N = 6 * p).

The SimpleFreeFieldSOS does not impose any restriction on the filter coefficients contained in Data.SOS. Especially it is the user responsibility to check whether the filters are stable or not.

Data.Delay is [M R] and contains the monaural delay (expressed in samples).


We encourage to use the 'History' attribute to store informations relative to the modelization process (algorithm(s) used to derive the IIR model, method used to estimate the monaural delays, etc.)