THE AUDITORY MODELING TOOLBOX

Applies to version: 1.6.0

View the code

Go to function

lyon2024_design
Provides default coefficients needed to run the model

Usage:

CF = lyon2024_design(n_ears, fs, one_cap, ihc_high_pass, CF_CAR_params, CF_AGC_params, CF_IHC_params)

Input parameters:

n_ears Number of audio channels, i.e, ears.
fs Sampling frequency (in Hz) of the model and the audio signals.
one_cap Optional flag for using a single capacitor in the network. Default: 0 (i.e., use two capacitors). Used only if CF_IHC_params is not set.
ihc_high_pass

Optional flag showing how the AC will be coupled, Used only if CF_IHC_params is not set.

  • 1: AC coupling will be done at the IHC stage. Default.
  • 0: AC coupling will be done in the CAR stage as in lyon2011.
CF_CAR_params

Structure with the pole-zero filter cascade parameters with the following fields:

  • velocity_scale: Velocity nonlinearity. Default: 0.1.
  • v_offset: Offset gives a quadratic part. Default: 0.04.
  • min_zeta: Minimum damping factor in mid-freq channels. Default: 0.10.
  • max_zeta: Maximum damping factor in mid-freq channels. Default: 0.35.
  • first_pole_theta: Meaning unclear. Default: \(0.85\pi\).
  • zero_ratio: Distance of a zero above a pole. Default: \(\sqrt(2)\).
  • high_f_damping_compression: Scaling (between 0 and 1) of the zeta compression. Default: 0.5.
  • ERB_per_step: Number of frequency channels per EERB. Default: 0.5.
  • min_pole_Hz: Lowest frequency (in Hz). Default: 30 Hz.
  • ERB_break_freq: Greenwood map's break frequency (Unit unclear). Default: 165.3.
  • ERB_Q: Glasberg and Moore's high-CF ratio. Default: 1000/(24.7*4.37).
  • ac_corner_Hz: Corner frequency (in Hz) of the high-pass filter in the CAR stage (e.g., at basilar membrane). Set ac_corner_Hz to a non-zero to enable the filter in CAR stage. Set ac_corner_Hz to 0 to disable the filter. Default: 0 (i.e., enabled in the CAR stage).
CF_AGC_params

Structure with the automatic gain control parameters:

  • n_stages: Number of AGC stages. Default: 4.
  • time_constants: Time constants of the AGC stages. Default: \(0.002 \cdot 4^{([0, 1, 2, 3])}\).
  • AGC_stage_gain: Gain of each stage to next slower stage. Default: 2.
  • decimation: How often to update the AGC states. Default: [8, 2, 2, 2].
  • AGC1_scales: Scales (in units of channels) of the AGC1 stages. Default: \({\sqrt 2} ^ {([0, 1, 2, 3])}\).
  • AGC2_scales: Scales (in units of channels) of the AGC2 stages. Default: \({1.65 \cdot \sqrt 2} ^ {([0, 1, 2, 3])}\).
  • AGC_mix_coeff: Mix of the AGCs (meaning unclear). Default: 0.5.
CF_IHC_params

Structure with the inner hair cell parameters:

  • just_hwr: The mode of the IHC processing:
    • 0: Normal IHC processing as described in Lyon et al. (2024). Default.
    • 1: Simplified IHC processing by using a simple half-way rectification.
  • one_cap: As in the input parameter one_cap.
  • ac_corner_Hz: Corner frequency (in Hz) of the IHC. If 0, it the high-pass will be done in the CAR stage. Default: If ihc_high_pass is 0, ac_corner_Hz will be 0 Hz. If ihc_high_pass is 1, ac_corner_Hz will be 20 Hz.
  • tau_lpf: Meaning unclear (in s). Default: 80 microseconds.
  • tau_out: Depletion, meaning unclear (in s). Default: 0.5 ms.
  • tau_in: Recovery, meaning unclear (in s). Default: 0.01.
  • tau1_out: Depletion, meaning unclear (in s). Default: 0.5 ms.
  • tau1_in: Recovery, meaning unclear (in s). Default: 0.2 ms.
  • tau2_out: Depletion, meaning unclear (in s). Default: 1 ms.
  • tau2_in: Recovery, meaning unclear (in s). Default: 10 ms.

Output parameters:

CF

Structure containing all filter coefficients:

  • fs: Sampling frequency (in Hz).
  • max_channels_per_octave: Number of frequency channels per octave.
  • CAR_params: Structure with the pole-zero filter cascade parameters. Fields as in CF_CAR_params.
  • AGC_params: Structure with the automatic gain control parameters. Fields as CF_AGC_params.
  • IHC_params: Structure with the inner hair cell parameters. Fields as in CF_IHC_params.
  • n_ch: Number of frequency channels.
  • pole_freqs: Vector with center frequencies (in Hz). Length: n_ch.
  • ears: Structure array containing the parameters and states. Per ear, the following fields are output:
  • n_ears: Number of ears to be processed.
  • open_loop: 0, meaning unclear.
  • linear_car: 0, meaning unclear.

References:

R. F. Lyon, R. Schonberger, M. Slaney, M. Velimirović, and H. Yu. The carfac v2 cochlear model in matlab, numpy, and jax. arXiv preprint arXiv:2404.17490, 2024.