Flexible Solver For 1-D Cochlear Partition Simulations

0 downloads 0 Views 3MB Size Report
outcome is a highly optimized C++ code that carries on the numerical simulation. .... which allows selecting different integrators like fixed step Runge-Kutta 4 and.
Flexible Solver For 1-D Cochlear Partition Simulations Pablo E. Riera and , and Manuel C. Eguía

Citation: Proc. Mtgs. Acoust. 28, 050006 (2016); doi: 10.1121/2.0000437 View online: http://dx.doi.org/10.1121/2.0000437 View Table of Contents: http://asa.scitation.org/toc/pma/28/1 Published by the Acoustical Society of America

Volume 28

http://acousticalsociety.org/

22nd International Congress on Acoustics Acoustics for the 21st Century Buenos Aires, Argentina 05-09 September 2016

Psychological and Physiological Acoustics: Paper ICA2016 - 735

Flexible Solver For 1-D Cochlear Partition Simulations Pablo E. Riera and Manuel C. Eguía Laboratorio de Acstica y Percepcin Sonora, Escuela Universitaria de Artes, CONICET, Universidad Nacional de Quilmes, B1876BXD, Bernal, Argentina, [email protected], [email protected] There is a vast literature on cochlear modelling, much of it based on theoretical and numerical analysis of the hydromechanics of the canals and the physiology and micromechanics of the organ of Corti. During the past decades, many models have been developed from common theoretical grounds but with differences in the cochlear partition impedance, mainly because of the active mechanism adopted. This work presents a module for the Python language that allows to simulate and compare many different models in a simple manner, with the only need of writing the partition impedance expression. The outcome is a highly optimized C++ code that carries on the numerical simulation. The module can simulate models that fit in the long wave approximation of the cochlear fluid mechanics or, equivalently, a one dimensional transmission line.

Published by the Acoustical Society of America © 2017 Acoustical Society of America [DOI: 10.1121/2.0000437] Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 1

P. E. Riera and M. C. Eguia

1.

Flexible solver for 1-D cochlear partition simulations

INTRODUCTION

The cochlea is the main organ responsible for transducing sound into the electrical impulses conveyed by the auditory nerve to the brain. It is a complex structure with many mechanical, chemical and electrical mechanisms interweaved, that are not yet completely understood. It is generally agreed that the cochlea presents two distinctive phenomena: a passive behavior, namely the propagation of sound as a traveling wave through the spatial extension of the cochlea, and an active amplification mechanism. The former is responsible for segregating frequencies: the wave travels from high to low frequencies and two different frequencies resonate at different locations. The latter gives us the ability for hearing faint sounds, it contributes only at low intensities and is overridden by the passive mechanism at high intensities. Passive and active mechanisms are due to the hydromechanics and physiology of the cochlear partition, a flexible structure surrounded by fluid that supports the basilar membrane (BM), the tectorial membrane and the organ of Corti, where the inner and outer hair cells’ perform the transduction and amplification of the signal respectively. The passive travelling wave is a consequence of the stiffness gradient in the BM and the fluid pressure coupling. The active amplification mechanism is generated by the outer hair cells’ somatic electromotility, which is intrinsically nonlinear. Thus, it is also responsible for many other phenomena like compression, two tone suppression and distortion products, among others.1 The passive mechanism could be modeled by discretizing the continuous BM through an array of oscillators with varying damping and stiffness that are coupled to each other by the hydrodynamics of an incompressible fluid. This discretization is depicted in Figure 1; each oscillator corresponds to a section or site in the membrane. The active mechanism has its origin in the physiology and electro-mechanics of the outer hair cells, but its contribution to the dynamics of the oscillators could be modeled in several ways. For example, using lumped models with several degrees of freedom,9 tuned nonlinear oscillators,11 or time delayed or lateral forces,4 ,5 among others. This work presents a simple software tool (a Python module), which allows to simulate custom one dimensional cochlear models in a flexible fashion and allows straightforward comparisons of different models. There are works in the literature with similar efforts.2 The approach proposed in3 is adopted in this model. The module will be used to compare two types of active amplification mechanisms. The first one is made of two arrays of interconnected oscillators generating a positive feedback. This approach is common in many works, while in some cases the second array represents tuned non-linear oscillators11 or the tectorial membrane and the outer hair cells,9 .10 The second active mechanism relies on feed-forward and feed-backward forces. These forces can arise, for example, if the outer hair cells sense the vibration in one site of the partition and act on a neighbour site.13 Both models include a saturating non-linearity that generates a compression in the amplitude responses and other nonlinear phenomena. In the following section, the formulation of passive one dimensional cochlear mechanics and the discretization employed by the software module are introduced, then the features are discussed and finally the results obtained from the simulations of the two models are presented.

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 2

P. E. Riera and M. C. Eguia

Flexible solver for 1-D cochlear partition simulations

Figure 1: Array of oscillators immersed in an incompressible fluid A.

1D COCHLEAR MECHANICS

For many applications, it is sufficient to model the cochlea completely uncoiled and simplifying the fluid hydrodynamics to only one dimension. This is called the long wave approximation,7 and is valid primarily away from the resonance site. The laws of motion acting on the BM for the continuous one dimensional case are:6 ∂h(x, t) ∂ 2 h(x, t) + µ(x) + s(x)h(x, t) = −p(x, t) (1) 2 ∂t ∂t where h represents the displacement in the y direction of the BM, p the fluid pressure, m the mass, µ the damping factor and s the stiffness. The last three magnitudes are expressed per unit surface. All variables depend on position x, except the mass that could be considered as a constant.6 In the long wave approximation, the hydrodynamic coupling between the different sections of the BM is given by the following expression: m

2ρ ∂ 2 h(x, t) ∂ 2 p(x, t) = − (2) ∂x2 H ∂t2 where H is the height of the cavity and ρ is the fluid density. This expression is derived from the fluid momentum and fluid mass conservation equations for a one dimensional cavity.6 The corresponding boundary conditions are: ∂p(x, t) ∂ 2 h(0, t) ∂ 2 ws (t) = −2ρ − 2ρ (3) ∂x x=0 ∂t2 ∂t2 p(x, t)|x=L = 0

(4)

where ws (t) represents the displacement of the oval window or directly the input stimulus. The complete system is given by equations (1-4). This system has to be solved first for the pressure p. For the sake of clarity, in what follows the dependency on x and t is suppressed and equation (1) is rewritten as: ∂h + kh ∂t ∂ 2h p+g =− 2 ∂t m g=µ

(5a) (5b)

Now, this last equation can be merged with equation (2): Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 3

P. E. Riera and M. C. Eguia

Flexible solver for 1-D cochlear partition simulations

∂ 2p 2ρ ∂ 2 h = − ∂x2 H ∂t2 2 ∂ p 2ρ (p + g) = 2 ∂x mH ∂ 2p 2ρ 2ρ p= g − 2 mH  ∂x 2 mH  mH ∂ −1 p=g 2ρ ∂x2

(6a) (6b) (6c) (6d)

This last expression shows how to compute p knowing g, by inverting the left hand side operator. Continuing with the discretization of equations (5b, 6d) using finite differences: −pi (t) − gi (t) ∂ 2 hi (t) = 2 ∂t m mH pi−1 (t) − 2pi (t) + pi+1 (t) − pi (t) = gi (t) 2ρ dx2

(7a) (7b) (7c)

And, equivalently, for the boundary conditions (3, 4): m 2ρ



p2 (t) − p1 (t) dx

 − p1 (t) = g1 (t) − m pN (t) = 0

∂ 2 ws (t) ∂t2

(8a) (8b)

where 1 ≤ i ≤ N , y dx = L/N . The discretized system can be expressed in a matrix form: ∂ 2h −p − g = 2 ∂t m (D − I) · p = g + q

(9) (10)

2

∂ where D represents the matrix of the operator ∂x 2 and q is the vector of sources (oval window movement). The first step for obtaining the temporal evolution of the system is to solve the linear system of equations on p from the values of g and q (Equation 10). For the case of the one dimensional problem, this becomes a tridiagonal system and a Gaussian elimination method is used, which is linear in the number of oscillators. The second step is to integrate the temporal derivatives (Equation 9) and compute the next time values for g.

2.

FLEXIBLE SOLVER

The software module was designed to be flexible and fast. Flexibility is provided by the ability of writing custom cochlear partition impedance expressions and dynamical systems with arbitrary Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 4

P. E. Riera and M. C. Eguia

Flexible solver for 1-D cochlear partition simulations

Figure 2: Code example for a model with four dynamic variables corresponding to two arrays of oscillators. The equations should use C++ syntax and functions should be in the common math C++ library or added as extra functions.

Figure 3: Code example for a model with bilateral forces. The syntax shortcut h[s] represents the variable h at position x + s, where x is the current position. degrees of freedom. Once the equations are set, the program builds an optimized C++ code that runs the simulations. The main features are the following. The module uses the odeint8 library to integrate the dynamic equations which allows selecting different integrators like fixed step Runge-Kutta 4 and variable step DormandPrince or Cash-Karp. The equations should be written as an ordinary differential equation and using C++ syntax with functions from the common math C++ library or writing extra functions (Figure 2). The equation syntax accepts non local variables useful to feed-forward and feed-backward forces (Figure 3) In future versions, it is intended to add noise sources, time dependent parameters and a dynamic middle ear model coupled to the oval window. The module works with numpy arrays as input sound data and output data. Also, the module comes with an internal function to run threaded simulations for fast exploration of different sound inputs.

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 5

P. E. Riera and M. C. Eguia

Flexible solver for 1-D cochlear partition simulations

The work-flow starts by selecting a cochlear model and writing it down as a set of ordinary differential equations and explicitly defining the variable g (needed for the computation of the pressure p). Then, the parameters of the model must be specified. There are two classes of parameters allowed by the model, fixed and spatial. The fixed ones are the same for all the sites in the cochlea, and the spatial vary with the position along the BM. The initial condition values are given for each dynamic variable, and are all zero by default. The output of the module is the time evolution of each dynamic variable. In order to avoid large memory usage when high sampling frequencies are used, the module allows saving only decimated samples of the time evolution. The complete set of parameters needed to run a simulation can be modified, but the module has default values for the cavity height, BM mass, fluid density, sampling frequency and number of oscillators. The module is available at https://github.com/pabloriera/jitcochlea In Figures 2 and 3, are the sample codes used to run the simulations of Figures 4 and 5. The codes are not complete and displayed only for demonstrative purposes. Complete examples are available at the repository.

3.

SIMULATIONS

In this section are some results from simulations using the Python module for two models that present different approaches to the active amplification system. The results are analyzed with reference to classical cochlear mechanics experiments14 ,15 where cochlear response curves are either measured for different amplitudes and frequencies or different cochlear positions for one frequency (as in the current study). The first model of active amplification consists of two arrays of oscillators that are connected to each other, generating a closed-loop feedback. The code corresponding to this model is depicted in Figure 2. The equations are the following: ∂h =v ∂t ∂v = −p − g ∂t ω1 g = ω12 (h + y) + v Q1 ∂y =w ∂t ∂w ω2 = −ω22 (y − αh) − v (1 + βf (γw)) ∂t Q2 f (x) = 4/π 2 arctan2 x

(11) (12) (13) (14) (15) (16)

The model accounts for the BM oscillators array in the variables h and v (displacement and velocity), fluid coupling in the pressure p, and an extra oscillator array (variables y and w) with a different natural frequency and damping. The natural frequencies ω1 for the BM are spaced logarithmically from 16000 Hz in the base to 100 Hz in the apex, and the frequencies ω2 = 0.75ω1 . This frequency scaling (or shift in terms of the site in the cochlea) is a key factor to generate the proper feedback and amplification. The f function is a nonlinear saturating function that provokes

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 6

10 3 10 2 10 1 10 0 10 -1 10 -2 10 -3 10 -4

Flexible solver for 1-D cochlear partition simulations

(a)

100 dBSPL 90 80 70 60 50 40 30 20 10 0

0

5 10 15 20 25 30 35 Distance from base (mm)

RMS displacement (nm)

RMS displacement (nm)

P. E. Riera and M. C. Eguia

10 3 10 2 10 1 10 0 10 -1 10 -2 10 -3 10 -4 10 -5 10 -6

(b)

Cochlea site Peak position 19.1 mm 16.3 mm 4.8 mm

0

20 40 60 80 100 Stimulus intensity (dB)

Figure 4: Two arrays of oscillators model (a) RMS displacements of the BM for a pure tone of 1000 Hz and different amplitudes. (b) RMS displacements for four sites in the cochlea (gray vertical lines in (a) ) as a function of the stimulus intensity. Parameters: The natural frequencies ω1 for the BM are spaced logarithmically from 16000 Hz in the base to 100 Hz in the apex, ω2 = 0.75ω1 , Q1 = 4, Q2 = 10, γ = 5 × 108 m, β = 40, α = 0.05. a limited increase in the damping factor as the displacement increases and generates the compression in the curves of Figure 4.b. In the second model the active mechanism is applied with feed-forward and feed-backward forces from the outer hair cells. These kinds of models are sometimes called non-local or with bi-lateral coupling12 .13 The corresponding code is displayed in Figure 3 and the equations are the following: ∂h(x) = v(x) ∂t ∂v(x) = −p(x) − g(x) ∂t ω g = ω 2 (h(x) + αγ(arctan (h(x + s)/γ) − β arctan (h(x − s)/γ))) + v(x) Q

(17) (18) (19)

In this case, the spatial dependency on x is explicit in order to write the bi-lateral coupling as forces that depend on the displacement from the positions x + s and x − s, where s is a fixed value. Here again, there is a saturating function (arctan) to limit these lateral forces. Finally, to evaluate the response of the model with a richier input, Figure 6 represents the obtained cochleogram of a sinusoidally modulated tone. The parameters of the model, sampling rate and number of oscillators were adjusted to give a reasonable output in the shortest computational time possible, which was approximately 4 times slower than real time in an Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz.

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 7

10 3 10 2 10 1 10 0 10 -1 10 -2 10 -3 10 -4

Flexible solver for 1-D cochlear partition simulations

(a) 100 dBSPL 90 80 70 60 50 40 30 20 10 0

0

RMS displacement (nm)

RMS displacement (nm)

P. E. Riera and M. C. Eguia

5 10 15 20 25 30 35 Distance from base (mm)

(b)

10 2 10 1 10 0 10 -1 10 -2

Cochlea site Peak position 19.1 mm 16.3 mm 4.8 mm

10 -3 10 -4

0

20 40 60 80 100 Stimulus intensity (dB)

22

6.0 4.5 3.0 1.5 0.0 −1.5 −3.0 −4.5

BM displacements (nm)

Distance from base (mm)

Figure 5: Bi-lateral outer hair cells forces model (a) RMS displacements of the BM for a pure tone of 1000 Hz and different amplitudes. (b) RMS displacements for four sites in the cochlea (gray vertical lines in (a) ) as a function of the stimulus intensity. Parameters: The natural frequencies ω1 for the BM are spaced logarithmically from 16000 Hz in the base to 100 Hz in the apex, Q = 4,γ = 10nm,β = 0.3,α = 0.2,s = 140µm.

20 18 16 14 12 0

50

100

150 200 Time (ms)

250

300

Figure 6: Cochleogram for a sinusoidally frequency modulated tone with carrier frequency of 1000 Hz, modulation frequency of 5 Hz and modulation depth of 500 Hz at 40 dB SPL. Parameters are the same as Figure 4.

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 8

P. E. Riera and M. C. Eguia

4.

Flexible solver for 1-D cochlear partition simulations

CONCLUSIONS

This work introduced a Python module capable of simulating one dimensional hydrodynamic cochlear models with an arbitrary cochlear partition impedance. The main advantages of the module are performance and flexibility. The module provides a just-in-time C++ compilation of the model, allows to process numpy arrays with arbitrary inputs like sample sound files, and can incorporate different active mechanisms. Two active mechanisms were tested in order to show different types of input formulas. Both models yield reasonable outputs, when compared with experimental results, despite being simplified versions of more complex models from the literature. For the two cases, there is a noticeable amplification in the region of resonance. A simple explanation for the underlying amplification mechanism in both models can be found in the existence of a cycle-by-cycle positive feedback. In the first model, the feedback arises from the connection between the oscillators, while in the second model, the feedback loop is closed through the fluid coupling. Furthermore, in the first model, the second array of oscillators’ tuning is scaled down, so their responses will be similar to a feed-forward force.

ACKNOWLEDGMENTS This work was partially funded by CONICET, Argentina and Universidad Nacional de Quilmes, Argentina.

REFERENCES 1

VM Egu´ıluz, M Ospeck, Y Choe, AJ Hudspeth, and MO Magnasco. Essential nonlinearities in hearing. Physical Review Letters, 84:5232–5, 2000.

2

MJ Rapson, JC Tapson, and D Karpul. Unification and extension of monolithic state space and iterative cochlear models. The Journal of the Acoustical Society of America, 131:3935–3952, 2012.

3

RJ Diependaal and H Duifhuis. Numerical methods for solving one-dimensional cochlear models in the time domain. The Journal of the Acoustical Society of America, 82:1655–1666, 1987.

4

R Szalai, AR Champneys, M Homer, DO Maoil´eidigh, HJ Kennedy, and NP Cooper. Comparison of nonlinear mammalian cochlear-partition models. The Journal of the Acoustical Society of America, 133:323–36, 2013.

5

M Homer, R Szalai, AR Champneys, and B Epp. Comparing Longitudinal Coupling and Temporal Delay in a Transmission-Line Model of the Cochlea. AIP Conference Proceedings, 1403:625– 631, 2011.

6

H Duifhuis. Cochlear Mechanics: Introduction to a Time Domain Analysis of the Nonlinear Cochlea. Springer-Verlag, New York, 2012.

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 9

P. E. Riera and M. C. Eguia

Flexible solver for 1-D cochlear partition simulations

7

E de Boer. Auditory physics. Physical principles in hearing theory. I. Physics Reports, 62:87–174, 1980.

8

K Ahnert and M Mulansky. Odeint-solving ordinary differential equations in c++. AIP Conference Proceedings, 1389:1586–1589, 2011.

9

ST Neely and DO Kim. A model for active elements in cochlear biomechanics. The Journal of the Acoustical Society of America, 79:1472–1480, 1986.

10

R Nobili and F Mammano. Biophysics of the cochlea. II: Stationary nonlinear phenomenology. The Journal of the Acoustical Society of America, 99:2244–55, 1996.

11

TAJ Duke and F J¨ulicher. Active Traveling Wave in the cochlea. Physical Review Letters, 90:1–4, 2003.

12

Bo Wen and K Boahen. A linear cochlear model with active bi-directional coupling. Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, 3:1–5, 2003.

13

CD Geisler and C Sang. A cochlear model using feed-forward outer-hair-cell forces. Hearing Research, 86:132–146, 1995.

14

L Robles and MA Ruggero. Mechanics of the mammalian cochlea. Physiological Reviews, 81:1305–52, 2001.

15

JO Pickles. An Introduction to the Physiology of Hearing. Emerald Group Publishing Limited, Bingley, UK, 2012.

Proceedings of Meetings on Acoustics, Vol. 28, 050006 (2017)

Page 10