54 Methods and Tools for Electrophysiological Monitoring of Recurrent Laryngeal Nerve Monitoring During Surgery on Neck Organs Mykola Dyvak1, Volodymyr Tymets1, Andriy Dyvak2, Oksana Huhul1, 1. Faculty of Computer Information Technologies, Ternopil National Economic University, UKRAINE, Ternopil, 8 Chekhova str., e-mail: mdy@tneu.edu.ua, volodymyrtymets@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 – Methods and tools for electrophysiological II. TASK STATEMENT monitoring and identification of recurrent laryngeal nerve (RLN) are considered in the paper. The method Let’s consider the functionality principles of existing hardware solution for RLN identification. The scheme of of identification and tools for stimulation of surgical the device is shown in Fig.1 [7]. wound tissues during surgery on neck organs are represented. Improved information technology of RLN identification and results of its application are shown. Keywords– neck organs surgery, recurrent laryngeal nerve, single-board computer, multi-functional electro- stimulator. I. 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. Other electrophysiological method of RLN stimulation 1 is respiratory tube, 2 is larynx, 3 is sound sensor, 4 are vocal and monitoring requires the alternating current with fixed cords, 5 is probe, 6 is surgical wound, 7 is multifunctional block frequency [7]. The methods and mathematical models for for RLN stimulation and visualize of RLN solving this problem are considered in [6-7]. Fig. 1. Scheme of device and method for RLN identification The main problem of the mentioned methods is a high risk of RLN damage. This risk is mainly caused by the In respiratory tube 1 that inserted into larynx 2, the accuracy of output information signal (result of surgery sound sensor 3 implemented and positioned above vocal wound tissues stimulation) processing. Methods of cords 4. spectral analysis of this signal [7] give an opportunity to Probe 5 connected to alternator. It performs the select the main spectral component and to classify the function of a current generator controlled by the single- surgery wound tissues. Methods of RLN location board computer 7. Surgical wound tissues are stimulated visualisation based on building the model of distribution by the alternating current with the fixed frequency via of amplitude of the information signal on the surgery probe. As a result, vocal cords 4 are stretched. wound allow to detect the high-risky area [7]. The Flow of air that passes through patient’s larynx, is combination of these method in one information modulated by stretched vocal cords. The result is technology of processing of signal (reaction on the surgery wound tissues stimulation) is an important task. registered by voice sensor 3. Obtained signal is amplified The paper is dedicated to this task. and is processed by single-board computer 7. The method of RLN monitoring is based on the task of For processing of obtained signal, special software is its stimulation as the first sub-task. Other aspect of the installed on a single-board computer. The main functions task is the processing of reaction on RLN stimulation. of the software are: After the processing, a conclusion about the RLN location - segmentation of information signal based on analysis in the surgery area is made. of its amplitude; ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 55 - analysis of amplitude spectrum using Fourier- main spectral component in Fig. 2 a). Fig. 2 b) reflects the transform; result of stimulation of the muscle tissue at a distance of - calculation of a spectral component with a maximal not more than 3 mm, with a specific distinguished main amplitude (let’s call it “the main spectral component” spectral component with a small amplitude value. Finally, further); the result of RLN stimulation with a specific main spectral - classification of tissues of surgical environment at component with a sufficiently high normalized amplitude the points of stimulation using threshold method. (6 times higher than in the previous case) is illustrated in Software for changing the frequency of RLN Fig. 2 c). stimulation is written in programming language Node.js. Node was created by Ryan Dahl. Now Node.js is a The described properties give a possibility to develop trademark of Joyent, Inc. and is used with its permission the method, mathematical model and to improve the RLN and maintained by the Node.js Foundation [8-9]. Node is identification technology in general. open-source platform and located on Github. III. MATHEMATICAL MODEL FOR RLN Block of processing and displaying information is IDENTIFICATION developed based on single-board computer Raspberry Pі 3 [10]. Let’s represent obtained set of stimulated points in Raspberry Pi 3 was selected because of two upgrades such form: made to it. The first one is a next generation Quad Core − + Broadcom BCM2837 64-bit ARMv8 processor making �𝑧𝑧𝑖𝑖,𝑗𝑗 � = �𝑧𝑧𝑖𝑖,𝑗𝑗 , 𝑧𝑧𝑖𝑖,𝑗𝑗 �, 𝑖𝑖 = 1, … , 𝐼𝐼, 𝑗𝑗 = 1, … , 𝐽𝐽, (1) the processor speed increased from 900 MHz in the Pi 2 to up to 1.2GHz in the Pi 3. where [ z i , j ] is an interval estimation of the normalized The second one is addition of the built-in BCM43143 Wi- amplitude of main spectral component; i, j are indices of fi chip. There is also Bluetooth Low Energy (BLE) discrete increments of coordinate values on X and Y axes module implemented on the board. relatively to some initially given point. Interval estimation At the same time, such an approach does not ensure a of the amplitude [ z i , j ] is caused by the fact that different significant decrease in the RLN damage risk. For values of main spectral component amplitude z i , j may be detection of high-risky area of surgery, it is expedient to build a mathematical model for RLN identification. obtained for equal values of i and j. In addition, there is For these purposes, we use the properties of surgical some error of detecting the point with coordinates i, j. wound tissues which are characterized by a different A mathematical model for RLN identification is reaction on the stimulation by alternating current with a considered as a discrete difference model (DDM), that is, fixed frequency. In Fig. 2, the fragments of amplified the difference scheme in such form [1, 7]: information signal obtained from the sound sensor and fragments of their spectral characteristics are shown. − �𝑣𝑣�𝑖𝑖+1,𝑗𝑗+1 � = �𝑣𝑣�𝑖𝑖+1,𝑗𝑗+1 + ; 𝑣𝑣�𝑖𝑖+1,𝑗𝑗+1 � = 𝑓𝑓⃗𝑇𝑇 (�𝑣𝑣�0,0 �, …, �𝑣𝑣�0,𝑗𝑗 �, … , �𝑣𝑣�𝑖𝑖,0 �, … , �𝑣𝑣�𝑖𝑖,𝑗𝑗 � ∗ 𝑔𝑔�⃗,  𝑖𝑖 = 𝑑𝑑 + 1, … , 𝐼𝐼, 𝑗𝑗 = 𝑑𝑑 + 1, … , 𝐽𝐽, (2) where f T (•) is a vector of unknown basis functions that  define the structure of DDM; vi , j is a predicted value of main spectral component amplitude in the point with  discrete specified spatial coordinates i, j; g is a vector of unknown parameters of DDM; d is order of DDM. Further, the model (2) will be called an interval discrete difference model (IDDM). To identify this model, the results of measurement of the main spectral component amplitude in the points of stimulation are used. Based on the requirements of ensuring the accuracy of the model within the accuracy of the experiment, the setting of IDDM (2) will be realized using such criterion [2]: − + − + �𝑣𝑣�𝑖𝑖,𝑗𝑗 ; 𝑣𝑣�𝑖𝑖,𝑗𝑗 � ⊂ �𝑧𝑧̂𝑖𝑖,𝑗𝑗 ; 𝑧𝑧̂𝑖𝑖,𝑗𝑗 �, ∀𝑖𝑖 = 1, … , ∀𝑗𝑗 = 1, … , 𝐽𝐽. (3) Fig. 2. Result of stimulation of RLN by alternating current with By substituting in the expression (3), the recurrent frequency of 300 Hz. − + expression (2) instead of the interval estimations [vi , j ; vi , j ] , We can see the result of stimulation of the muscle together with the defined initial interval values, we obtain tissue at a distance of more than 1 cm from RLN, with a the interval system of non-linear algebraic equations specific blurred spectrum, without a clearly distinguished (ISNAE) [12]: ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 56 �𝑣𝑣� − ; 𝑣𝑣� + � ⊆ �𝑧𝑧̂0,0− + ; 𝑧𝑧̂0,0 �; ⎧ 0,0 0,0 ⎪ − ⋮ + − + ⎪ �𝑣𝑣�𝑖𝑖−2,𝑗𝑗−2 ; 𝑣𝑣�𝑖𝑖−2,𝑗𝑗−2 � ⊆ �𝑧𝑧̂𝑖𝑖−2,𝑗𝑗−2 ; 𝑧𝑧̂𝑖𝑖−2,𝑗𝑗−2 �; ⎪ ⃗𝑇𝑇 ⎪ �𝑣𝑣�𝑖𝑖−1,𝑗𝑗−1 � = 𝑓𝑓 (�𝑣𝑣�0,0 �, … , �𝑣𝑣�𝑖𝑖−2,𝑗𝑗−2 �, ⎪ 𝑢𝑢 �⃗𝑜𝑜 ) ∗ 𝑔𝑔�⃗ ; − ⃗𝑇𝑇 ⎨ 𝑧𝑧𝑖𝑖,𝑗𝑗 ≤ 𝑓𝑓 ��𝑣𝑣�0,0 �, … , �𝑣𝑣�𝑖𝑖−1,𝑗𝑗−1 �, 𝑢𝑢�⃗𝑖𝑖,𝑗𝑗 , … , 𝑢𝑢 �⃗𝑖𝑖,𝑗𝑗 � ∗ ⎪ 𝑔𝑔�⃗ ≤ 𝑧𝑧𝑖𝑖,𝑗𝑗 + Fig.4. Scheme of information technology for information signal ⎪ (as a result of stimulation of surgical wound of tissues) − ⎪ 𝑧𝑧𝑖𝑖+1,𝑗𝑗 ≤ 𝑓𝑓⃗𝑇𝑇 ��𝑣𝑣�0,0 �, … , �𝑣𝑣�𝑖𝑖−1,𝑗𝑗−1 �, 𝑢𝑢 �⃗𝑖𝑖,𝑗𝑗 , … , 𝑢𝑢 �⃗𝑖𝑖,𝑗𝑗 � ∗ processing. ⎪ Step 1. Obtaining of information signal (as result of ⎪ 𝑔𝑔�⃗ ≤ 𝑧𝑧𝑖𝑖+1,𝑗𝑗 + stimulation of surgery wound tissues). ⎩𝑖𝑖 = 2, … 𝐼𝐼, 𝑗𝑗 = 2 At this step, the multifunctional block for surgical The solution of the obtained system is a vector of wound tissues stimulation is used. The result of  stimulation is recorded by the sound sensor. The obtained unknown parameters of IDDM g . Methods of solving of this system are described in the papers [11-12]. information signal is digitized and processed by the The obtained model in the form of IDDM (2) is single-board computer Raspberry Pi 3. The stimulation graphically represented in Fig. 3. results are processed in a real-time mode. Also, they may be stored on the external data storages. Step 2. Segmentation of information signal. This step is needed to highlight the patient reaction on tissues stimulation from sound signal taken during inhale or exhale. In Fig. 4, the information signal is displayed and the segmentation principle is visually represented. As we can see from the Fig. 2, there are two segments. Each of them is result of the stimulation of RLN. The intervals between the segments represent delay of a patient’s breath. These intervals are not informative for tissue classification method and named as the noise. Unlike existing method of segmentation “synchronization with the appearance of the current of stimulation”, main approach of automatic segmentation is based on the principle of threshold choice of an informative segment. Fig. 3. Visualization of RLN location using IDDM (2). As we see in Fig. 3, the distribution of values of Fig. 5 Illustration of the information signal segmentation. amplitude of the main spectral component of signals as the reaction on RLN stimulation and surgical wound Because information signal is represented in digital tissues stimulation is marked with grey color. The RLN form, for determining of segment beginning to estimate location is marked by black colored line on the plane. the energy threshold of current, n countdowns are proposed: IV. METHODS AND TOOLS OF ELECRTOPHYSIOLOGICAL MOMITORING RLN 𝐸𝐸 = ∑𝑛𝑛𝑖𝑖=1 𝑢𝑢𝑖𝑖2 , (4) where 𝑢𝑢𝑖𝑖 is і-th countdown of information signal. For RLN location identification in the surgery area during surgery on neck organs, we improved the If this energy exceeds the threshold, then, this is the information technology. This technology consists of 4 beginning of the segment: main steps, a detailed description of which is given below. The scheme of the information technology is shown in 𝐸𝐸 ≥ 𝐸𝐸𝑡𝑡𝑡𝑡 , then, 𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 𝑢𝑢𝑛𝑛 . (5) Fig. 4. If the energy of n counts is less than the threshold, then, this is the end of the segment: ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic 57 𝐸𝐸 ≤ 𝐸𝐸𝑡𝑡𝑡𝑡 , then, 𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 = 𝑢𝑢𝑛𝑛 . (6) tissues in surgical wound during surgery on the neck So, the resulting segment consists of a set of organs” (0117U000410). countdowns: REFERENCES 𝑈𝑈 = �𝑢𝑢𝑖𝑖 ∈ �𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 ; 𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 ��, (7) [1] Abstract book of First World Congress of Neural where �𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 ; 𝑢𝑢𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 � is interval of countdowns of Monitoring in Thyroid and Parathyroid Surgery, Krakow, Poland, 2015, 161 pp. determined signal. [2] M.C.D. Poveda, G. Dionigi, A. Sitges-Serra, M. Step 3. Selecting of the main spectral component. Barczynski, P. Angelos, H. Dralle, E. Phelan and G. After segmentation of information signal recorded by Randolph. “Intraoperative Monitoring of the sound sensor, it is necessary to select the main spectral Recurrent Laryngeal Nerve during Thyroidectomy: A component of the information signal. At first, the Fourier Standardized Approach (Part 2)”. World Journal of transform is used for this. Endocrine Surgery, vol. 4, no. 1, pp. 33-40, 2012. As it is shown in Fig. 2, the amplitude of the main [3] V.K. Dhillon and R.P. Tufano. “The pros and cons to spectral component depends on the distance from the real-time nerve monitoring during recurrent laryngeal stimulation point to the RLN. Therefore, the amplitude of nerve dissection: an analysis of the data from a series of thyroidectomy patients”. Gland Surgery, vol. 6, no. the selected spectral component is in inverse proportion to 6, pp. 608-610, 2017. this distance. [4] H.Y. Kim, X. Liu, C.W. Wu, Y.J. Chai and G. The obtained at this stage data array is represented in Dionigi. “Future Directions of Neural Monitoring in the form (1). Thyroid Surgery”. Journal of Endocrine Surgery, vol. Step 4. Modeling of distribution of the main spectral 17, no. 3, pp. 96-103, 2017. component amplitudes. [5] W.E. Davis, J.L. Rea, J. Templer. “Recurrent A mathematical model for RLN identification is laryngeal nerve localization using a microlaryngeal considered as an interval discrete dynamic model that is, electrode”. Otolaryngology – Head and Neck the difference scheme in form (2). For its identification, Surgery, vol, 87, no. 3, pp. 330-333, 1979. the method of structural and parametric identification [6] M. Dyvak, O. Kozak, A. Pukas. “Interval model for based on the behavioral model of artificial bee colony [13- identification of laryngeal nerves”. Przegląd 14] is used. Behavioral model of artificial bee colony Elektrotechniczny, vol. 86, no. 1, pp. 139-140, 2010. imitates the foraging behavior of the honeybee colony [7] M. Dyvak, N. Kasatkina, A. Pukas, N. Padletska. [13]. “Spectral analysis the information signal in the task of identification the recurrent laryngeal nerve in thyroid The application of this IDDM structural identification surgery”. Przegląd Elektrotechniczny, vol. 89, no. 6, method involves the implementation of activity phases of рр. 275- 277, 2013. all types of bees in the colony: onlooker bees, employed [8] M. Cantelon, M. Harter, T.J. Holowaychuk and N. bees and scout bees. Let's consider all stages of Rajlich. “Node.js in Action. Shelter Island,” NY: implementation of IDDM structural identification method Manning Publications, 2013, 416 pp. in more details. The result, at this stage, is the model that [9] P. Teixeira. “Professional Node.js: Building graphically represented in Fig. 3. Probable RLN location Javascript Based Scalable Software,” Indianapolis, is illustrated by black line. IN: John Wiley & Sons, Inc., 2012, 408 pp. [10] Bush, Steve (25 May 2011). "Dongle computer lets The test examples with sample of over 1500 kids discover programming on a TV,". Electronics stimulation points for different patients showed that using Weekly. Retrieved 11 July 2011.. presented technology allow to decrease the RLN damage [11] I. Voytyuk, M. Dyvak, V. Spilchuck, “Research of risk from 20% to 14%. So, the proposed methods and quality characteristics of models structure in kind of tools for electrophysiological RLN monitoring have a interval difference operator,” 11th International good perspective of development and application. Conference The Experience of Designing and Application of CAD Systems in Microelectronics VI. CONCLUSION (CADSM), pp. 87-87, 2011. [12] M. Dyvak, N. Porplytsya, Y. Maslyak, M. Shynkaryk The proposed methods and tools for “Method of Parametric Identification for Interval electrophysiological RLN monitoring and identification Discrete Dynamic Models and the Computational are realized using single-board computer Raspberry Pi 3. Scheme of Its Implementation,” Advances in Applying of this methods for previously obtained sample Intelligent Systems and Computing II: Selected of signals (reaction on stimulation of surgical wound Papers from the International Conference on tissue) showed good results. In particular, it was shown Computer Science and Information Technologies, CSIT 2017, рр.101- 112, 2018. that for sample of over 1500 stimulation points for [13] D. Karaboga, B. Gorkemli, C. Ozturk, N. Karaboga, different patients using this technology, the risk of RLN “A comprehensive survey: artificial bee colony damage is decreased from 20% to 14%. (ABC) algorithm and applications,” Artificial Intelligence Review, vol. 42, no.1, pp. 21-57, 2014. ACKNOWLEDGMENT [14] D. Karaboga, “An idea based on honey bee swarm for This research was supported by National Grant of numerical optimization,” Technical Report TR06, Ministry of Education and Science of Ukraine Computer Engineering Department, Engineering “Mathematical tools and software for classification of Faculty, Erciyes University, Turkey, 2005. ACIT 2018, June 1-3, 2018, Ceske Budejovice, Czech Republic