AP07_4-5.vp 1 Design of the switching device 1.1 Deep brain stimulation Deep brain stimulation is a curative method used for patients suffering from extrapyramide disorders. Parkinson’s disease, essential tremor and dystonia fall into the disorder category. This method involves brain electrical activity thus also the symptoms of these disorders too [1]. The symptoms are shakes, spasms and stiffness. No method is able to cure extrapyramide disorders, it can only suppress symptoms and improve the quality of life. Most patients use drugs, but drug treatment is unsuitable for some of them. Deep brain stimu- lation provides an opportunity for these patients. The brain areas, that provoke the symptoms, are stimulated by means of special electrodes. The rectangular stimulation signals sup- press the symptoms. The patient has to undergo surgery twice. During the first surgery electrodes are implanted into the patient's brain. The aim of the stimulation is chosen according to the symptoms. During the second surgery, a miniature neurostimulator is implanted below the collarbone. The parameters of the rect- angular stimulation signals are tuned for a period of roughly one year. The ranges of the parameters are: � amplitude 1–4 V, � pulse width 60–90 �s, � frequency 130–160 Hz. 1.2 Switching device Between the operations there is investigation with func- tional magnetic resonance. During the investigation the ex- ternal neubrostimulator is used and the stimulation signals are controlled from the control computer with the help of a switching device. The block diagram, Fig. 2, shows the situa- tion during this investigation. The switching device is controlled via an optical fibre from LPT (linear printer terminal) of the control computer. This is battery operated for the patient's safety. It switches eight stim- ulation signals independently from each other. It can also be operated manually without a control computer. The device consists of two parts. The first is placed next to the control computer, and codes the control signals from LPT to RS232. Then it sends the information along the optical fibre to the © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 59 Acta Polytechnica Vol. 47 No. 4–5/2007 Computer Controlled Switching Device for Deep Brain Stimulation J. Tauchmanová This paper has two goals. The practical part deals with the design of a computer controlled switching device for an external stimulator for deep brain stimulation. The switching device is used during investigations with functional magnetic resonance for controlling signals leading to the deep brain stimulation (DBS) electrode in the patient's brain. The motivation for designing this device was improve measured data quality and to enable new types of experiments. The theoretical part reports on early attempts to approach the problem of modeling and localizing the neural response of the human brain as a system identification and estimation task. The parametric identification method and real fMRI data are used for modeling the hemodynamic response. The project is in cooperation with 1st Faculty of Medicine, Charles University in Prague and Na Homolce hospital in Prague. Keywords: Deep brain stimulation, hemodynamic response, functional magnetic resonance, identification. Fig. 1: Deep brain stimulation components Fig. 2: Block diagram of experiment with fMRI and DBS patient next room. The second part of the device is in the room with the magnetic tomograph, and switches relays on the basis of control signals. These signals are generated according to the Evseng program (Electrical and Visual Stimulation Engine), which can write simple scripts. This part of the device is bat- tery–operated, so its dissipation must be low. A typical experi- ment with functional magnetic resonance alternates the calm period and the stimulation period. The use of a switching device will lead to new types of experiments and better quality of data. The device has designed, tested and used at Na Homolce hospital. Two patients have been investigated with fMRI using the switching device. The first patient with was suffering from cervical dystonia (unnaturally coiling of the neck) and the second patient was suffering from Parkinson’s disease. 2 Survey of hemodynamic models The best-known authors of articles about hemodynamics are Karl Friston and Richard Buxton, and most of their arti- cles are available on the SPM web. There are some simple linear models and also some nonlinear models, for example the Baloon model and the hemodynamic model. The models are presented in [4] and [2]. The linear convolution models are given in [5] and [6]. A quite new area in hemodynamics is dynamic casual modelling (DCM). The fundamental feature of DCM is the creation of area models which have some cross interaction. Karl Friston has also written about DCM, for example [7]. 3 Localization and modelling of hemodynamic response 3.1 The data We acquired a great deal of data from the investigations with fMRI. Matlab was used for the processing. The structure of the data is described on Fig. 4. During the investigation this patient alternated calm peri- ods and left hand motion periods, when motion stimulation was used. The time sequence of the images is shown in Analyze format. Each image maps over the whole brain at an instant in time. So, all the images represent the activity of partial brain areas depending on time. For preprocessing, the SPM toolbox (Statistical Parametric Mapping) was used. SPM corrected the undesirable motion artefact (Realign), interpolated waveform (Slice timing) and suppressed noise (Smoothing). Each scan is characterized by a cubic matrix in the workspace. The matrices were obtained by means of two functions of the SPM toolbox called spm_vol and spm_read_vols. 3.2 Localization of the hemodynamic response The hemodynamic response is a neural activity response. Our real fMRI data shows the left hand motion response. Lo- calization of the hemodynamic response involves finding the signal which agrees with the typical shape and marking of the brain area where the signal appears. The typical shape of hemodynamic response is shown in Fig. 5, and it is very simi- lar for all people and all brain areas. The hemodynamic response was localized by comparing the signals from many areas of the brain and the assumed hemodynamic response signal. The signal produced by convoluting the investigation time span and the typical shape of the hemodynamic response. 60 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 47 No. 4–5/2007 Fig. 3: The switching device Fig. 4: The fMRI data structure Fig. 5: Typical shape of the hemodynamic response Then one hundred nother signals were found which had the minimal deviation and these signals were marked. The localization is shown in Fig. 7. The verification of the validity of the signals is shown in Fig. 8 and Fig. 9 with partial slices. Localization hits off slices 18, 19, 20 and 21. The real fMRI data and the results from SPM toolbox processing were provided by MUDr. Robert Jech, Na Homolce hospital, see Fig. 9. 3.3 Identification of hemodynamic response The reason for using system theory for processing of fMRI data was that it describes the brain area as a system (for example, the transfer function). We consider the localized hemodynamic response, as a pulse response and we can use it for identification. The input signal was represented by time ordering of the fMRI experiment, and the output signal was a localized hemodynamic response. The System identification, toolbox was used for identification and two types of models were created. The first was ARX (AutoRegressive model with eXternal input) model Eq. 1, and the second was the OE (Output error) model, Eq. 2 [3]. a d y t b d u t e t( ) ( ) ( ) ( ) ( )� � , (1) a d y t b d u t a d e t( ) ( ) ( ) ( ) ( ) ( )� � . (2) The results from the System identification toolbox are in the form of transfer functions. The ARX model is a fourth order system and the OE model, Eq. 3, is a second order sys- tem. The OE model describes the hemodynamic response better, and it is of a lower order. The result of Identification toolbox for OE model: Discrete-time model: y t B q F q u t e t( ) ( ) ( ) ( ) ( )� � � � � � , B q q q( ) . � . �� �� �0 6487 0 14691 2, F q q q( ) . � . �� � �� �1 0 05194 0 080111 2. The identification results show that the methods of system theory can be used for fMRI data processing. However, for more perfect identification we would need a higher sampling frequency. In our experiment we had only 64 samples avail- able for identification. To acquire more samples we would © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 61 Acta Polytechnica Vol. 47 No. 4–5/2007 Fig. 7: Localization of the likeliest signals Fig. 6. The hemodynamic response from real data Fig. 8. The localization in partial slices Fig. 9: Localization using the SPM toolbox need to increase the sampling frequency or we use a more time optimal experiment. 4 The next stage of the project I hope to be able to continue cooperating with the 1st Faculty of Medicine. The first goal of this cooperation will be to provide technical support during investigations with fMRI on patients with DBS. It would be interesting to attempt online data processing during an investigation with func- tional magnetic resonance. It would also be interesting to design measurements which would be time optimal and the measured data would have better time resolution. A further goal will be to create model of the whole brain, including interrelationships among areas of the brain. This is known as Dynamic Casual Modeling. 5 Conclusion A computer-controlled switching device for deep brain stimulation was described in this paper. Then a curative method for deep brain stimulation was introduced, together with its use for extrapyramide disorders. The second part of paper dealt with localizing and modeling the hemodynamic response, using methods of system theory. Finally some future extensions of research collaboration are suggested. Acknowledgment This work has been supported by the Ministry of Educa- tion of the Czech Republic under Research Program No. MSM6840770038. References [1] Jech, R., Růžička, E., Urgošík, D.: Stereotaktická funk- ční neurochirurgie u extrapyramidových pohybových poruch. Časopis SANQUIS, 37/2005. [2] Friston, K. J., Glaser,D. E., Mechelli, A., Turner, R., Price, C. J.: Hemodynamic modeling. Human brain func- tion, 1998. [3] Havlena, V.: Odhadování a filtrace. Praha: ČVUT, 2002. [4] Buxton, R. B., Wong, E. G., Frank, L. R.: Dynamics of Blood Flow and Oxygenation Changes During Brain Activation: The Baloon Model. Magnetic resonance in medicine, 1998. [5] Boynton, G. M.,Engel, S. A., Glover, G. H., Heeger, D. J.: Linear Systems Analysis of Functional Magnetic Resonance Imaging in Human V1., The Journal of Neuro- science, 1996. [6] Kiebel, S., Holmes, A. M.: The General Linear Model. Human brain function, 1998. [7] Friston, K.: Dynamic Casual Models. Human brain func- tion, 1998. Ing. Jana Tauchmanová e-mail: tauchj1@fel.cvut.cz Department of Control Engineering Czech Technical University in Prague Faculty of Electrical Engineering Karlovo náměstí 13 121 35 Praha 2, Czech Republic 62 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 47 No. 4–5/2007 Fig. 10. The output error model of the hemodynamic response