Explanation of frequency distinguishing in human ear (using computer model)

The inspiration for this model ware possibilities of the human ear to distinguish the frequency of sounds and a diffraction grating. Detection takes place after max. 15 length of the wave (arbitrary choice). The range of frequencies to detect for tests – 800-3200 Hz: detection every 5 Hz in the range 800-1600 Hz and 10 Hz in the range 1600-3200 Hz (arbitrary choice). It can explain the residual hearing effect (missing tone f is heard when harmonic tones 2f, 3f and 4f are played). The algorithm can be used as an alternative for FFT. Model uses only memory for delay line end for results, and adding operation, so it should be fast and cheep, and can work on-line in real-time. Testing program was written in Perl.

Frequency detection takes place on the second and third level. It looks strange, but frequencies to detect should be arbitrary chosen. This values decide which delayed values are added ("legs" of each adder in Fig.1). It was arbitrarily chosen, that 15 values will be taken into consideration for each adder. Notice, that highest frequencies are detected at the beginning of the delay-line, the lowest are more scattered along DL -to the end for lowest detected frequency (f n and f 1 in Fig.1 ). So after 15 periods of the frequency f n this frequency in the signal in the rest of the delay-line is useless -look at the explanation of residual hearing effect.
In the used testing program the le coef.sp2 is created. In it, it is possible to see the distribution of addresses along the DL, where the signals for adders are taken. This values are written as characters so it may be useful to look for similarities with connections of ortoneurons and spironeurons (or auditory nerve?) with hair cells in human ear. The Fig. 2 presents the answer of the program for single frequency. It can detect frequencies little higher than highest expected (ultra sounds by bones).
Pictures which show detected frequencies are presented by the program as the PostScript le, and so inserted to the paper (look description of the program). Frequency discriminator in presentation simply changes the order of presented frequencies. To determine, which frequency was on input simply chose the local maximum, or construct the neuronal net, as it is sometimes suggested [4]. /DL in the program is a vector, so is frequency discriminator -which reverts the order of frequencies (f 1 -f n )/

Residual Hearing Effect
The side effect of the presented method is detection of the "ghost frequencies" (f/2 and f/3) -look Fig.   3 ( and Fig. 4), but it can explain the residual hearing effect known in human hearing. After the time 15*1/f the signal has no meaning for f detection, but is still detected by f/2 and f/3 etc. adders -but only on a part of inputs of these adders. These detected signals are too strong. The solution of the problem can be the properties of a basilar membrane - Fig. 5 [3](presented here because the gure is very illustrative). Basilar membrane is light, thin and stiff at the beginning and heavier, thicker and more elastic at the end [4]. It can be considered as low-pass mechanical inertia lter distributed along the entire basilar membrane. It is not implemented in the program.
Notice, that for high frequencies input, "legs" for adders are all concentrated at the beginning of the DL, so the effect of low-pass lter is weak ( Fig. 1 & Fig.5) The effect of the "ghost frequencies" can explain how ultra sounds coming by skull-bones can be detected (e.g. 30 kHz will be detected as 15kHz). / Fig. 3 and 3a show the reason of the residual hearing effect -see conclusions; g. 3a shows the effect after short time -15 periods of frequency 3000 Hz/ The Alternative For Fft As shown above, the algorithm can be used for fast detecting of frequencies in the input signal. It uses only memory -as DL and frequency discriminator, and adders -which can work as separate tasks (Fig.  1). For one octave signal (e.g. 1 MHz-2 MHz) detection is very simple (no need of "ghost frequencies" correction - Fig. 2).The main difference is that at the beginning we must decide what frequencies we want to detect (or range of frequencies and its density).
The detected frequencies can be taken as the greatest local values (see Fig. 2, 3 and 4).The problem is with detected "ghost frequencies", but they can be removed in mathematical way: when frequency f is detected, "ghost frequencies" f/2, f/3 etc. have to appear, and it is known, how the detected signals look.
So is possible to subtract part of the values in f-adder and around it, from f/2 and around, and so for other "ghost frequencies". More, frequency f is detected 2 times faster than "ghost" f/2, and is 2 times smaller (when the basic signal is short < =15 wave periods in this example) so it can be used in real-time reaction (Fig. 3a and 4).
For the light, diffraction gratings have 120,000 lines to the inch (approx. 4,724 lines per mm). so for very high frequencies detection, more than 15 adders should be probably used.
The program is simple (idea is presented on Fig. 1) -for tests. It shows how the method works. It was written in Perl. Perl (as interpreter) is convenient to make changes and to see the result fast. Perl 5.6.0 (version for Windows 7 /but was tested on Windows 10 too/) was used, with the library Tk -for implementation of input and output. Perl is open source development, so it can be implemented for free. As the output, PostScript le is created. Each detected frequency is presented as the vertical line. On output maximum signal amplitude values from the summers are presented. On input a pure sinusoid is given (may be given few sinusoids). Amplitudes should be less than 1.5 -the reason is the results presentation. PostScript les can be viewed by IrfanView (or other PS viewer). The input is ampli ed. The main algorithm has about 30 lines (plus preparing the table of DL addresses of input values for each adder detecting the frequency).
The program ends, when signal from input comes to the end of DL. If it should work longer or in real-time, memory of a DL should be organized as a ring or such a ring can be simulated using modulo arithmetic (modulo DL-length) -for calculation of addresses in such DL-to avoid of shifting values in the DL.

Conclusions
The paper presents only a part of mechanism of frequency detection -to show, that it works. Algorithm is simple, fast, and can be used in general signal processing -alternatively to FFT. It can explain some possibilities of a human ear. I have tested detection of every frequency using 15 delayed signals. More signals will provide better distinguishing of frequencies. E.g. near frequency 1000Hz selectiveness should be 1Hz (in this model -5Hz). Does the same number of delayed signals should be added for all frequencies? Another question: in this model high frequencies are detected very fast, comparing with low frequencies (waiting for 15 wavelengths). Is it important, or can be used in other areas of frequencies detection?
The simulation of distributed low-pass lter along the DL is too complicated for me.
Competing interests: The author declares no competing interests.  Detection of two frequencies (2.8 & 3 kHz) without correction of the "ghost frequencies" Figure 5 The shape of the basilar membrane/ [4], [5]/ can explain how detection of the input frequency as the "ghost frequencies" visible on gures 3, 3a and 4 can be reduced (decreased) if membrane is low-pass lter along all its length.