The Main Principles of Monitoring of Recurrent Laryngeal Nerve Monitoring During Surgery on Neck Organs Mykola Dyvak1[0000-0002-9049-4993] Volodymyr Tymets1[0000-0002-4726-4797] Viktor Shidlov- sky2[0000-0001-8869-5780] 1 Faculty of Computer Information Technologies, Ternopil National Economic University, UKRAINE, Ternopil, 8 Chekhova str., e-mail: mdy@tneu.edu.ua, volodymyr- tymets@gmail.com, oksansggg@i.ua 2 Department of Surgery with Urology №1 by L.Ya. Kovalchuk, I. Horbachevsky Ternopil State Medical University, UKRAINE, Ternopil, 1 Maidan Voli, e-mail: dyvak_anmy@tdmu.edu.ua Abstract. The main principles of monitoring and identification of recurrent lar- yngeal nerve (RLN) are considered in the paper. The steps of identification and tools for stimulation of surgical wound tissues during surgery on neck organs are represented. Improved information technology of RLN. Keywords: neck organs surgery, recurrent laryngeal nerve, single-board com- puter, multi-functional electro-stimulator. 1 Introduction Recurrent laryngeal nerve (RLN) monitoring is very important procedure during the neck surgery. For this purpose, special neuro monitors are used. They work based on the principle of surgical wound tissues stimulation and estimation of results of such stimulation [1-5]. The main problem that arises during this process is the proper choice of stimulation methods. In [1] and [4], the latest results of researches related to RLN neuro-monitoring are represented. The alternating current with fixed frequency is required for other electrophysiologi- cal method of RLN stimulation and monitoring. We have reviewed the mathematical models and methods of dealing with this problem in [6-7]. However, the mentioned methods can lead to the RLN damage. The reason of this risk is mostly the accuracy of output information signal processing (the result of stim- ulation of surgery wound tissues). With the help of the method of this signal spectral analysis, we have an opportunity to choose the major spectral components and classify the surgery wound tissues. The high risky area can be detected by the methods of RLN location visualization that in- corporate the model of information signal amplitude on the surgery wound. It’s essential to combine all of these methods into one signal processing (its reaction on the stimulation of the surgery wound tissues) technology. In the paper, we concen- trate on exactly this task. The method of RLN monitoring is based on the task of its stimulation as the first sub-task. Other aspect of the task is the processing of reaction on RLN stimulation. After the processing, a conclusion about the RLN location in the surgery area is made. 2 Task Statement Let’s review the principles of functioning of the existing hardware solution designed to identify RLN [7]. The figure 1 below illustrates the scheme of this device. 1 the respiratory tube, 2 the larynx, 3 the sound sensor, 4 the vocal cords, 5 the probe, 6 the surgical wound, 7 the block of processing Fig. 1. Visualization of Recurrent Laryngeal Nerve deception process Larynx 2 with respiratory probe 1 inside and inside of this probe the sound sensor 3 placed vocal cords 4. Probe 5 is attached to the alternator and operates as a current generator that is con- trolled by a single-board computer 7. Alternating current stimulates the surgical wound tissues through the probe with the fixed iteration. Consequently, it makes the vocal cords 4 stretch. Stretched vocal cords modulate the air flow that goes through the patient’s larynx. The voice sensor 3 records the result. The single-board computer 7 processes and am- plifies the received signal. We have installed a special software on a single board com- puter to process the received signal. The major tasks of the software are:  Analyze the amplitude of the information signal and segment it accordingly  Examine the spectrum of the amplitude with the help of Fourier-transform  Calculate the spectral component with the maximal amplitude  Arrange the tissues of surgical environment at the stimulation points with the threshold method. The software aimed at changing the frequency of RLN stimulation was developed with Node JS programming language. Node was created by Ryan Dahl. Now Node.js is a trademark of Joyent, Inc. and is used with its permission and maintained by the Node.js Foundation [8-9]. Block for information processing and display is based on Raspberry PI 3 single- board computer [10]. This strategy doesn’t guarantee a weighty decrease in the RLN damage risk. To identify the high-risky area of the surgery, a mathematical model for identifying RLN should be built. Because of this, we use the surgical wound tissues that react on alternative current stimulation in different ways. 3 The main steps of monitoring of RLN We have invented the new algorithm of RLN allocation algorithm in the area of surgi- cal intervention. This algorithm consists of four main steps. A detailed description of all steps of our algorithm is given below. The figure depicts the visualization of our algorithm steps sequence. Fig. 2. Visualize the sequence of steps in the RLN allocation algorithm. Step 1. Record the sound signal of the reaction to stimulation of the area of surgical intervention As it’s known, the resistivity of surgery wound tissues with different structure may range from 0m to 1kOm. Concerning the nerve tissues, their resistance depends on their thickness. Moreover, the method of signal transmission in these issues is significantly different from current transmission in conductor (electron motion at selected voltage difference) The picture 2 illustrates the method of charge propagation in the nerve tis- sues, including RLN. Let’s inspect this method in more detail. RLN is the set of nerve fibers wrapped in the medullary sheath with the isolator electronic properties. Medullary sheath covers the axon lengthwise, however it is absent at the point of projection discharge from the neuroсyton in the areas of the axon divar- ication and gaps, that are called Node of Ranvier. The areas of these nodes contain ion channels with positively-charged sodions. There is no voltage difference between the neighbor nodes. When applying the voltage with the difference in any area, this area is stimulated. Because of the natrium channels opening and penetration of sodions into the tissue, the stimulated node becomes negatively-charged in comparison with contig- uous, not stimulated node. The result of the voltage difference between these areas is the ion flow through the tissue fluid in order to set an electrical equilibrium as shown in the figure 3. In such a way, we will receive reaction on the RLN stimulation. In the process of stimulation it is necessary to provide the relevant reaction on the surgery wounds stim- ulation. It is done to avoid the nerve fiber damage because of the current intensity and provide the traction of muscles, that stretch vocal cords. Fig. 3. The block for stimulating surgery wound tissues is one of the most complicated tech- nical solutions. This block should provide not only formation of direct current, alternating current and stimulation current in the form of rectangular impulses, but also the corresponding parameters of this current. The last turned out to be a difficult enough task. Schematic of impulse process in the myelin nerve. The main functions of electrostimulator are:  generating of direct current with strength in range from 0.5 to 2 mA inde- pendently on the type and structure of the surgical wound tissue;  generating of alternating current with the frequency range from 1 to 1000 Hz with the strength from 0.5 to 2 mA independently on the type and struc- ture of the surgical wound tissue;  generating of impulses with regulated duration from 1s to 1 ms, frequency range from 1 to 1000 Hz and regulated current strength from 0.5 to 2mA. Fig. 4. Schematic representation of the stimulation signal in form of rectangular impulses. Step 2. Conducting fragmentation of the sound signal. After sound signal recording we can proceed to this step. Its main purpose is to elim- inate the silence and redundant noise. As result, we get the part of the sound signal where we record the inhale and exhale of the patient. It’s extremely important for the further algorithm operation. If we select the improper fragment of the sound signal, we will get the wrong result in future steps. Fig. 5. Visualization of conducting fragmentation of the sound signal Because information signal is represented in digital form, for determining of seg- ment beginning to estimate the energy threshold of current, n countdowns are proposed: Because information signal is represented in digital form, for determining of seg- ment beginning to estimate the energy threshold of current, n countdowns are proposed:  𝐸 = ∑𝑛𝑖=1 𝑢𝑖2       where 𝑢𝑖 is і-th countdown of information signal. If this energy exceeds the threshold, then, this is the beginning of the segment: 𝐸 ≥ 𝐸𝑡𝑟 then,𝑢𝑠𝑡𝑎𝑟𝑡 = 𝑢𝑛       If the energy of n counts is less than the threshold, then, this is the end of the seg- ment: 𝐸 ≤ 𝐸𝑡𝑟 then,𝑢𝑠𝑡𝑜𝑝 = 𝑢𝑛       So, the resulting segment consists of a set of countdowns: 𝑈 = {𝑢𝑖 ∈ [𝑢𝑠𝑡𝑎𝑟𝑡 ; 𝑢𝑠𝑡𝑜𝑝 ]}      where [𝑢𝑠𝑡𝑎𝑟𝑡 ; 𝑢𝑠𝑡𝑜𝑝 ] is interval of countdowns of determined signal. Step 3. Spectral transformation of sound signal. This step is necessary for transforming the sound wave into the spectral form. The famous method of sound signal processing Fourier transform is used for this purpose. Step 4. Prediction of spreading spread amplitude of spectrum. A mathematical model for recurrent laryngeal nerve identification is considered as an interval discrete dynamic model. For prediction, we used the method of structural and parametric identification based on the behavioral model of artificial bee colony [13- 14]. Behavioral model of artificial bee colony imitates the foraging behavior of the honeybee colony [13]. As result, we have developed a device that recognizes the recurrent laryngeal nerve. This device implements a logic described above and is demonstrated below. 1 is sound sensor 2 is respiratory tube, 3 is negative needle clip, 4 is positive probe, 5 is power block, 6 is sound card, 7 is single-board computer, 8 is current stabilizing analog circuit Fig. 6. Device for RLN monitoring. The device was used during the operations under the doctor’s supervision. It allowed us to get the results of stimulation represented by sound files. We have processed these files and demonstrated the results in the next section. 4 Results of applying the tools of electro psychological monitoring We have conducted a number of operations with the device for RLN monitoring. These operations allowed us to analyze how different types of tissues respond to the stimula- tion. This response was recorded and processed. We have outlined the spectral compo- nents of more than 200 stimulation points: 134 of them are nerve stimulation and 80 - muscle tissue. We have also outlined and calculated the energy of each stimulation point. It allowed us to track the difference of reaction on different types of tissues. Table 1. Results of stimulation of nerve. Number of Normalized amplitude Calculated energy of Type of tissue point Stim- of the main spectral the main spectral ulation component component 1 0,460823977 0,971944721 nerve 2 0,546804881 1,142737017 nerve 3 0,522947842 1,199619272 nerve 4 0,174415538 0,950735889 nerve 5 0,288416452 0,302479812 nerve 6 0,216996177 0,348470201 nerve 7 0,453882674 1,107665359 nerve 8 0,286873816 1,076928574 nerve 9 0,36834112 0,909430922 nerve 10 0,368404502 0,884671695 nerve 11 0,35624509 0,90006498 nerve 12 0,178152121 0,484689097 nerve 13 0,211462636 0,540572562 nerve 14 0,470992005 1,120013139 nerve 15 0,414762358 0,783916271 nerve 16 0,244265797 0,596207752 nerve 17 0,271379822 0,663615117 nerve 18 0,216705181 0,861875304 nerve 19 0,206413221 0,62733553 nerve 20 0,19285882 0,504861419 nerve 21 0,255752665 0,551960348 nerve 22 0,206541859 0,738761809 nerve Table 1 provides the main spectral components of the nerve tissue stimulation. Be- low, we have graphically demonstrated the spectral stimulation points of the nerve. Fig. 7. Spectral components of nerve. The table 2 provides the main spectral components of the muscle tissue stimulation. Below are the graphical spectral components of muscle tissue stimulation points. As you can see from the table 1 and 2 - maximal spectra of nerve tissue are much higher than the maximum spectra of the muscle tissue. We have calculated the average indexes of the spectral components of all stimulation points of two tissue types. Table 2. Results of stimulation of muscle tissue Number of Normalized amplitude Calculated energy Type of tissue point Stim- of the main spectral of the main spectral ulation component component 1 0,088201161 0,259148092 muscle 2 0,088653809 0,211956357 muscle 3 0,035728174 0,113169272 muscle 4 0,099569663 0,214373633 muscle 5 0,078975006 0,208214698 muscle 6 0,067639249 0,191217165 muscle 7 0,098776194 0,155238075 muscle 8 0,065288859 0,072999695 muscle 9 0,064550774 0,173697833 muscle 10 0,058568736 0,137243888 muscle 11 0,066829555 0,142883841 muscle 12 0,066732937 0,058033972 muscle 13 0,07041373 0,178891542 muscle 14 0,051112402 0,209461871 muscle 15 0,049918614 0,144907478 muscle Fig. 8. Spectral components of muscle tissue. As we can see from the image below, the average maximum index is higher than the average component of the muscle tissue. 0,25 0,2 0,15 Nerve 0,1 Muscle 0,05 0 1 4 7 10 13 16 19 22 25 28 31 34 37 40 Fig. 9. .Mean values of spectral components of different types of tissue. Taking into account the foregoing, we counted the energy of all points and calculated their maximum and minimum thresholds. 2,5 Energy of Signal 2 1,5 1 Max Min 0,5 0 Nerve Muscle Fig. 10. . Maximum and minimum values of energy of different types of tissue As you can see on the next figure, the maximum threshold of the muscle tissue doesn’t reach the maximum threshold of the nerve. It allows us to determine the type of the stimulated tissue. The further research is dedicated to the improvement of the RLN identification method. 5 Conclusion For realizing of the proposed methods and tools for electrophysiological RLN monitor- ing and identification we used small device named as Raspberry Pi 3. After probation method of RLN identification in real patients we have got very optimistic results. We made surgery on sample of 200 points of simulations for many patients. And in this simple have shown for as the in 80 % cases we can correctly detect then main location of recurrent laryngeal nerve. As results we can decrease the risk of malignant interfer- ence with nerve activity from 21 % to 16% References 1. Abstract book of First World Congress of Neural Monitoring in Thyroid and Parathyroid Surgery, Krakow, Poland, 161 pp (2016) 2. Poveda, M.C.D., Dionigi, G., Sitges-Serra, A., Barczynski, M., Angelos, M., Dralle, N., Phelan, E, Randolph, G.: Intraoperative Monitoring of the Recurrent Laryngeal Nerve dur- ing Thyroidectomy: A Standardized Approach (Part 2). World Journal of Endocrine Sur- gery, vol. 4, no. 1, pp. 33-40, (2012). 3. Dhillon, V.K., Tufano, R.P.: The pros and cons to real-time nerve monitoring during recur- rent laryngeal nerve dissection: an analysis of the data from a series of thyroidectomy pa- tients. Gland Surgery, vol. 6, no. 6, pp. 608-610, 2017. 4. Kim, H.Y., Liu, X., Wu, C.W., Chai, Y.J., Dionigi G.: Future Directions of Neural Moni- toring in Thyroid Surgery. Journal of Endocrine Surgery, vol. 17, no. 3, pp. 96-103, (2017) 5. Davis, W.E., Rea, J.L., Templer, J.: Recurrent laryngeal nerve localization using a microlar- yngeal electrode. Otolaryngology – Head and Neck Surgery, vol, 87, no. 3, pp. 330-333, (1979) 6. Dyvak, M., Kozak, O., Pukas A.: Interval model for identification of laryngeal nerves. Prze- gląd Elektrotechniczny, vol. 86, no. 1, pp. 139-140, (2010) 7. Dyvak, M., Kasatkina, A, Pukas, A.,Padletska, N.: Spectral analysis the information signal in the task of identification the recurrent laryngeal nerve in thyroid surgery. Przegląd El- ektrotechniczny, vol. 89, no. 6, рр. 275- 277, (2013) 8. Cantelon, M., Harter, M., Holowaychuk, T., Rajlich N.: Node.js in Action. Shelter Island, NY: Manning Publications, 416 pp. (2013) 9. Teixeira, P.: Professional Node.js: Building Javascript Based Scalable Software, Indianap- olis, IN: John Wiley & Sons, Inc., 408 pp. (2012) 10. Bush, Steve (25 May 2011).: Dongle computer lets kids discover programming on a TV,. Electronics Weekly. Retrieved 11 July 2011 (2011) 11. Voytyuk, I., Dyvak, M., Spilchuck, V.: Research of quality characteristics of models struc- ture in kind of interval difference operator, 11th International Conference The Experience of Designing and Application of CAD Systems in Microelectronics (CADSM), pp. 87-87, (2011) 12. Dyvak, M., Porplytsya, N., Maslyak, Y., Shynkaryk, M.: Method of Parametric Identifica- tion for Interval Discrete Dynamic Models and the Computational Scheme of Its Implemen- tation, Advances in Intelligent Systems and Computing II: Selected Papers from the Inter- national Conference on Computer Science and Information Technologies, CSIT 2017, рр.101- 112, (2018) 13. Karaboga, D., Gorkemli, B., Ozturk, C., Karaboga, N.: A comprehensive survey: artificial bee colony (ABC) algorithm and applications, Artificial Intelligence Review, vol. 42, no.1, pp. 21-57, (2014) 14. Karaboga, D.: An idea based on honey bee swarm for numerical optimization, Technical Report TR06, Computer Engineering Department, Engineering Faculty, Erciyes University, Turkey, (2005).