b=middleearfilter(fs,varargin); b=middleearfilter(fs); b=middleearfilter;
middleearfilter(fs) computes the filter coefficients of a FIR filter approximating the effect of the middle ear.
The following parameter and flags can be specified additionally:
'order',order | Sets the filter order of the computed FIR filter. Default value is 512. |
'minimum' | Calculates a minimum phase filter. This is the default. |
'zero' | returns a filter with zero phase. Since Matlab shifts the symmetric impulse response due to no negative indices. This results in a linear phase and hence a delay in the signal chain. |
'lopezpoveda' | Use data from Lopez-Poveda and Meddis (2001). These data are in turn derived from Goode et al. (1994). This is the default. |
'jepsenmiddleear' | Use the data originally used for the Jepsen 2008 model. |
middleearfilter without any input arguments returns a table describing the frequency response of the middle ear filter. First column of the table contain frequencies and the second column contains the amplitude (stapes peak velocity in m/s at 0dB SPL) of the frequency like in figure 2b) of Lopez-Poveda and Meddis (2001).
middleearfilter is meant to be used in conjunction with the lopezpoveda2001 function, as the output is scaled to make lopezpoveda2001 work. If you are not using the lopezpoveda2001, you probably do not want to call this function. The following code displays the magnitude response of the filter:
fs=16000; x=erbspace(0,fs/2,100); b=middleearfilter(fs); H=freqz(b,1,x,fs); semiaudplot(x,10*log10(abs(H).^2)); xlabel('Frequency (Hz)'); ylabel('Magnitude (dB)');
R. Goode, M. Killion, K. Nakamura, and S. Nishihara. New knowledge about the function of the human middle ear: development of an improved analog model. The American journal of otology, 15(2):145--154, 1994.
E. Lopez-Poveda and R. Meddis. A human nonlinear cochlear filterbank. J. Acoust. Soc. Am., 110:3107--3118, 2001.