Biomedical Engineering Letters

, Volume 3, Issue 1, pp 39–46 | Cite as

COMETS: A MATLAB toolbox for simulating local electric fields generated by transcranial direct current stimulation (tDCS)

Original Article



Three-dimensional (3D) numerical computation of electric fields generated by transcranial direct current stimulation (tDCS) has widened our insight into the underlying mechanisms of current conduction, accelerated the development of novel electrode montages, and enabled more accurate field concentrations to targeted brain areas. However, there is no well-established field simulator specifically designed to analyze electric fields due to tDCS.


We developed a MATLAB-based toolbox, COMETS (COMputation of Electric field due to Transcranial current Stimulation), for simulating local electric fields generated by tDCS. Since COMETS has a simple and interactive graphical user interface, users can readily simulate various electrode configurations, sizes, and orientations without coding any MATLAB scripts. COMETS evaluates 3D cortical current distributions based on the electrostatic finite element method (FEM).


Although only a standard human head model is provided in the current version, users may import their own head model datasets for specific research. For advanced 3D visualization of the resultant cortical current distributions, output data can also be exported to readily accessible ASCII-format data files. The toolbox package is freely available at for noncommercial and academic uses.


It is expected that our toolbox COMETS can contribute to popularizing the numerical analysis of cortical stimulation current in the field of noninvasive electrical brain stimulation.


Transcranial direct current stimulation (tDCS) Finite element method (FEM) Electrostatic field MATLAB toolbox COMETS 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Antal A, Kincses TZ, Nitsche MA, Bartfai O, Paulus W. Excitability changes induced in the human primary visual cortex by transcranial direct current stimulation: direct electrophysiological evidence invest. Ophthalmol Vis Sci. 2004; 45:702–707.CrossRefGoogle Scholar
  2. [2]
    Fregni F, Boggio PS, Nitsche M, Pascual-Leone A. Transcranial direct current stimulation. Brit J Psychiat. 2005; 186:446–447.CrossRefGoogle Scholar
  3. [3]
    Nitsche MA, Doemkes S, Karakose T, Antal A, Liebetanz D, Lang N, Tergau F, Paulus W. Shaping the effects of transcranial direct current stimulation of the human motor cortex. Neurophysiol. 2007; 97:3109–3117.CrossRefGoogle Scholar
  4. [4]
    Williams JA, Imamura M, Fregni F. Updates on the use of noninvasive brain stimulation in physical and rehabilitation medicine. J Rehabil Med. 2009; 41:305–311.CrossRefGoogle Scholar
  5. [5]
    Kincses TZ, Antal A, Nitsche MA, Bartfai O, Paulus W. Facilitation of probabilistic classification learning by transcranial direct current stimulation of the prefrontal cortex in the human. Neuropsychologia. 2004; 42:113–117.CrossRefGoogle Scholar
  6. [6]
    Nitsche MA, Cohen LG, Wassermann EM, Priori A, Lang N, Antal A, Paulus W, Hummel F, Boggio PS, Fregni F, Pascual-Leone A. Transcranial direct current stimulation: state of the art 2008. Brain Stimul. 2008; 1:206–223.CrossRefGoogle Scholar
  7. [7]
    Boggio PS, Nunes A, Rigonatti SP, Nitsche MA, Pascual-Leone A, Fregni F. Repeated sessions of noninvasive brain DC stimulation is associated with motor function improvement in stroke patients restor. Neurol Neurosci. 2007; 25:123–129.Google Scholar
  8. [8]
    Schlaug G, Renga V, Nair D. Transcranial direct current stimulation in stroke recovery. Arch Neurol. 2008; 65:1571–1576.CrossRefGoogle Scholar
  9. [9]
    Nitsche MA, Boggio PS, Fregni F, Pascual-Leone A. Treatment of depression with transcranial direct current stimulation (tDCS): a review. Exp Neurol. 2009; 219:14–19.CrossRefGoogle Scholar
  10. [10]
    Fregni F, Thome-Souza S, Nitsche MA, Freedman SD, Valente KD, Pascual-Leone A. A controlled clinical trial of cathodal DC polarization in patients with refractory epilepsy. Epilepsia. 2006; 47:335–342.CrossRefGoogle Scholar
  11. [11]
    Fregni F, Freedman S, Pascual-Leone A. Recent advances in the treatment of chronic pain with non-invasive brain stimulation techniques. Lancet Neurol. 2007; 6:188–191.CrossRefGoogle Scholar
  12. [12]
    Ferrucci R, Mameli F, Guidi I, Mrakic-Sposta S, Vergari M, Marceglia S, Cogiamanian F, Barbieri S, Scarpini E, Priori A. Transcranial direct current stimulation improves recognition memory in alzheimer disease. Neurol. 2008; 71:493–498.CrossRefGoogle Scholar
  13. [13]
    Miranda PC, Lomarev M, Hallett M. Modeling the current distribution during transcranial direct current stimulation. J Clin Neurophysiol. 2006; 117:1623–1629.CrossRefGoogle Scholar
  14. [14]
    Wagner T, Fregni F, Fecteau S, Grodzinsky A, Zahn M, Pascual-Leone A. Transcranial direct current stimulation: a computerbased human model study. NeuroImage. 2007; 35:1113–1124.CrossRefGoogle Scholar
  15. [15]
    Datta A, Bansal V, Diaz J, Patel J, Reato D, Bikson M. Gyriprecise head model of transcranial direct current stimulation: improved spatial focality using a ring electrode versus conventional rectangular pad. Brain Stimul. 2009; 2:201–227.CrossRefGoogle Scholar
  16. [16]
    Datta A, Bikson M, Fregni F. Transcranial direct current stimulation in patients with skull defects and skull plates: highresolution computational FEM study of factors altering cortical current flow. NeuroImage. 2010; 52:1268–1278.CrossRefGoogle Scholar
  17. [17]
    Im CH, Jung HH, Choi JD, Jung KY, Lee SY. Determination of optimal electrode positions for transcranial direct current stimulation (tDCS). Phys Med Biol. 2008; 53:N219–N225.CrossRefGoogle Scholar
  18. [18]
    Im CH, Park JH, Shim M, Chang WH, Kim YH. Evaluation of local electric fields generated by transcranial direct current stimulation (tDCS) with an extracephalic reference electrode based on realistic 3D body modeling. Phys Med Biol. 2012; 57:2137–2150.CrossRefGoogle Scholar
  19. [19]
    Park JH, Hong SB, Kim DW, Suh M, Im CH. A novel arraytype transcranial direct current stimulation (tDCS) system for accurate focusing on targeted brain areas. IEEE T Magn. 2011; 47:882–885.CrossRefGoogle Scholar
  20. [20]
    Dmochowski JP, Datta A, Bikson M, Su Y, Parra LC. Optimized multi-electrode stimulation increases focality and intensity at target. J Neural Eng. 2011; 8:046011.CrossRefGoogle Scholar
  21. [21]
    Halko MA, Datta A, Plow EB, Scaturro J, Bikson M, Merabet LB. Neuroplastic changes flowing rehabilitative training correlate with regional electrical field induced with tDCS. NeuroImage. 2011; 57:885–891.CrossRefGoogle Scholar
  22. [22]
    Mendonca ME, Santana MB, Baptista AF, Datta A, Bikson M, Fregni F, Araujo CP. Transcranial DC stimulation in fibromyalgia: optimized cortical target supported by highresolution computational models. J Pain. 2011; 12:610–617.CrossRefGoogle Scholar
  23. [23]
    Miranda PC, Correia L, Salvador R and Basser PJ. Tissue heterogeneity as a mechanism for localized neural stimulation by applied electric fields. Phys Med Biol. 2007; 52:5603–5617.CrossRefGoogle Scholar
  24. [24]
    Holdefer RN, Sadleir R, Russell MJ. Predicted current densities in the brain during transcranial electrical stimulation. J Clin Neurophysiol. 2006; 117:1388–1397.CrossRefGoogle Scholar
  25. [25]
    Sadleir RJ, Vannorsdall TD, Schretlen DJ, Gordon B. Transcranial direct current stimulation (tDCS) in a realistic head model. NeuroImage. 2010; 51:1310–1318.CrossRefGoogle Scholar
  26. [26]
    Collins DL, Neelin P, Peters TM, Evans AC. Automatic 3D intersubject registration of MR volumetric data in standardized talairach space. J Comput Assist Tomo. 1994; 18:192–205.CrossRefGoogle Scholar
  27. [27]
    Si H. Adaptive tetrahedral mesh generation by constrained delaunay refinement. Int J Numer Meth Eng. 2008; 75:856–880.MathSciNetMATHCrossRefGoogle Scholar
  28. [28]
    Haueisen J, Ramon C, Eiselt M, Brauer H, Nowak H. Influence of tissue resistivities on neuromagnetic fields and electric potentials studied with a finite element model of the head. IEEE T Bio-Med Eng. 1997; 44:727–735.CrossRefGoogle Scholar
  29. [29]
    Fuchs M, Wagner M, Kohler T, Wischmann H-A. Linear and nonlinear current density reconstructions. J Clin Neurophysiol. 1999; 16:267–295.CrossRefGoogle Scholar
  30. [30]
    Jin J. The finite element method in electromagnetics. 2nd Ed. New York: John Wiley & Sons; 2002.MATHGoogle Scholar
  31. [31]
    Bikson M, Rahman A, Datta A, Fregni F, Merabet L. Highresolution modeling assisted design of customized and individualized transcranial direct current stimulation protocols. Nueromodulation. 2012; 15:306–315.CrossRefGoogle Scholar
  32. [32]
    Owen AM, McMillan KM, Laird AR, Bullmore E. N-back working memory paradigm: a meta-analysis of normative functional neuroimaging studies. Hum Brain Mapp. 2005; 25:46–59.CrossRefGoogle Scholar
  33. [33]
    Dasilva AF, Mendonca ME, Zaghi S, Lopes M, Dossantos MF, Spierings EL, Bajwa Z, Datta A, Bikson M, Fregni F. tDCSInduced analgesia and electrical fields in pain-related neural networks in chronic migraine. Headache. 2012; 52:1283–1295.CrossRefGoogle Scholar
  34. [34]
    Bikson M, Datta A. Guidelines for precise and accurate computational models of tDCS. Brain Stimul. 2012; 5:430–431.CrossRefGoogle Scholar

Copyright information

© Korean Society of Medical and Biological Engineering and Springer 2013

Authors and Affiliations

  1. 1.Department of Biomedical EngineeringFlorida International UniversityMiamiUSA
  2. 2.Department of Biomedical EngineeringHanyang UniversitySeoulKorea

Personalised recommendations