ISSN: 1693-6 930                                                       73      A Novel Ap proach for Co nfigurin g The S t im ulat or of a  BCI Fram ewo r k…… (Ind ar  Sugiarto A NOVEL APPROACH FOR CONFIGURING THE  STIMULATOR OF A BCI FRAMEWORK USI N G XM L       Indar Sugiar to   Dep a rtme nt of Electrical En ginee ring – P e tra Ch ri stian  University  Jl. Siwalan k e r to 121 -13 1 , phon e: +62 - 3 1 -29 834 42   Email: indi@petra.a c.id       Abs t rak   Dalam  BCI (Brain -Com puter Interfa c e),  setiap  asp e k h a ru s diperh a tika n dem keb e rh asil an  operasio nal  dari si stem  BCI terse b u t. Term asu k  didal am nya adala h  prose s   pem buatan stim ulator BCI yang h and al  dan fleksibel , terutam a  stim ulator yan g  berkaitan e r at  deng an um p an bali k  d a l a m  bentuk  aplikasi  dari  sistem  BCI .  Makala h i n i m enjelaskan   pend ekatan b a ru  untu k  m e m buat stim ulator  vis ual  ya ng fle ksi bel d enga n m e m anfaatka n form at  XML  (E xten sible  Ma rkup  Lang uage ) yang dap at  di terap k an  pa d a  sebu ah  un it sistem  BCI.  Den gan m e n ggun akan form at XML untuk m engatu r   konfigu r a s i dari stim ulator  vi sual seb u a h   unit BCI, kit a  dap at m engem bang ka n apli k a s i B C I ya ng m a m pu m engakom odasi b a n y a k   strategi  pe rcobaa n d a lam  pen elitian te ntang B C I. Unit BCI da n p l atform  konfig ura s in ya  dibu at  deng an m enggun akan ba hasa pem rog r am an C++ d an m e m anfaatkan XML p a rser d a ri Qt yan g   bern a m a  QX m l Stream . Dari h a sil im pl em entasi d a n  pen gujia n t e rlihat  bah wa file konfigu r asi  XML da pat d i ekse ku si d e ngan  bai ol eh  sistem  B C I yang  dig u nakan. Selai n  kem a m puannya  dalam  m enghasil ka n fre k uen si ke dipa n yan g  fl eksibel se rta pe ngaturan form at teks untuk  sistem  BCI berbasi s SS VEP, file konfigurator  tersebut juga  m e m berikan  pilihan pem a kaian  hingg a 3 ben tuk bang un, 16 wa rna, da n 5 indikato r um pan balik  yan g  berbed a. Metode ya ng   dipap arkan  d a lam  m a kala h ini da pat di perg una ka untuk m enin g katkan  keg u n aan d a ri u n it BC yan g  telah ad a saat ini sep e rti BF++ Toys dan BCI 20 00.      Kata kunci Stim ulator BCI, file konfig ura s i, XML       A b st r a ct  In a  workin BCI fram ewo r k,  all a s pe ct s m u st  be  co nsid ere d  a s   an inte gral  p a rt that   contri bute s  to  the succe s sful operation  of a BCI  system . This also  incl ud es the  developm ent of  robu st but flexible  stim ulator, esp e ci ally the  one that closely relat ed to the feedba ck of a BCI   system . This  pape r d e scrib es  a n o vel a p p roa c h  in  pro v idin g fle x ible  vi sual  stim ulator u s in g X M L   whi c h ha s be en appli ed fo r a BCI (b rai n -com puter i n terface) fra m ework. Usi n g XML file form a t   for config uri n g the visual st im ulator of a BCI  system we can de vel op BCI appli c ations  whi c h can  accom m odate m any  exp e rim ent strategie s  in B C I  re sea r ch. T he BCI f r am ewo r k an d it s   config uratio n  platform  is  develop ed using C ++ p r og ram m i ng languag e whi c h  incorporate Qt’ s   m o st powerf u l XML pa rser n a m ed Q X m l Stream The im plem entation an exp e rim ent shows   that  the  XML config uratio n file  can be well  exec uted  within the  pro posed BCI fram ework. Be side  its capability  in presenting flexibl e  flickering  frequencies and text   form atting for SSVEP-based  BCI, the  confi guratio n pl atform  also p r o v ide s   sha p e s, 1 6   colo rs, and  5  distin ct feedba ck b a rs.  It is not  ne ce ssary to  incre a se  the  num ber of  sh ape nor  col o rs  sin c e th ose p a ra m e ters a r e l e ss  im portant for  the BCI  stimulator. Th e p r opo se d m e thod  can  then  be e x ten ded  to enh an ce t h e   usa b ility of cu rre ntly e x iste d BCI fram ework  su ch a s  BF++ Toys an d BCI 2000.     Key w ords : B C I Stim ulator, Configu r atio n File, XML       1. INTRO DUCTIO N   One of the most pro m isi n g  applications  of  biomedi cal  electro n ics i n  the area of  human - ma c h in e in te ra c t io n is th s o -c a l le d  BC I ( b r a in-c o m pu te r  in te r f ac e) . T h e BC I s y s t e m   c o mp r i se s   of many  com pone nts in clu d ing h a rdwares,  softwa r e s  and  protocols. The  protocol in the  BCI  will   be u s ed  to d r ive the  syst em in o r d e r t o  en su re  that  the brain  elicite ne ce ssa r y signal s to  be  Evaluation Warning : The document was created with Spire.PDF for Python.
                                 ISSN: 16 93-6 930     TELKOM NIKA   Vol. 7, No. 2,  Agustus 2 009 :  73 - 82   74 acq u ire d  by t he sy stem.  Dep endin g  o n  the type  of  the BCI, the  pre s ent  of a  stimulato r  a s  a   mean  of the   proto c ol  impl ementation   may be  man dat ory. Th stimulator  play s vital  role  in  BCI    s y s t em, es pec ially for B C Is  which operate ex ogenous ly. The  s o -c all ed  VEP (vis ual evoked   potential) is a  sp eci a l p o te ntial which  can b e  eli c ited  usi ng vi sual   stimulato r . S o me  re sea r ches  sho w  th at ce rtain p a ttern  on thi s  stim ul ator m a pro duce differen t  results, thu s  p r ovidin g e x tra  flexibilities for the stimulator will enri c h t he BCI re search. It is also  preferabl e that the number o f   trials  in every   BCI system  must be set  as sm a ll a s   possibl e a nd  it mean s th at the  stimulat or,  esp e ci ally the  one  which p r ovides the vi sual  stimu li,   mus t   operate in the very  exac t time  and in   the pred etermined fashio n.   These  con d itions,  whi c are rel a ted to t he ma nipul ation of visual  stimulator p a ra meters,  need  to b e   well  defined   and  adju s ted  to fit the g eneral  requi rements in th e BCI p r o g ram.  Unfortu nately ,  most of the resea r ch gro ups involv e d  with BCI “do  it in different ways a c cord ing  to not only the system s an d platform s u s ed b u t al so  to data file formats. Mo reo v er, these a r e   relative not  o n ly to the ele c trop hysiol ogi cal p r o c e s se d data  (e.g.  EEG, ERP si gnal s) b u t also to   config uratio n  setting s (e. g . feedba ck rule, stim ul ator be havior,  etc). Thi s  fa ct rep r e s ent s an  obsta cle i n  tools  exch ang e amon g different la bo rat o rie s  which  perfo rm si mil a r BCI resea r ch.  Also, it is practically imp o ssible to  si mulate  the b ehavior  of a system  a nd t o  optimize it by  assembli ng  module s  from  different gro ups a s  a uni q ue way for de scribin g  their  cha r a c teri stics.   A typical  situ ation i s  a  group  whi c h  is involv ed i n  t he impl eme n tation of  spel lers that  woul d like to simul a te t he pe rform a nce s  of  syst ems  built by  assem b ling  their d e velo ped   module s   with  othe r o n e s  a v ailable from  the literat ure.  A re ce nt  stu d y [2] ha de monst r ated  that  unde ce rtain  co ndition s it  is  po ssibl to relia bl y predict th e be havior  of   a system built by  assembli ng  different mod u les if a wel l -define d  and  relatively si mple de scrip t ion of them  is  available. Th is will all o the optimization of  many  BCI system s with out the  need of  rea lly  building the m : a way to b r ea k the inte rdep end en ce  of the modules and thu s  of the various  resea r ch g r o ups. A n  effo rt of p r ovidin su ch  “b ridg e” in th e B C I re sea r ch  are a   has be en  sta r ted  by [5] which  describ e file formats ba sed on t he XML techn o lo gy for storin g some e n tities  freque ntly encou ntere d  a m ong the BCI community as  well as  so me free tool s (BF++ Toys) that  use th em a n d  that were  d e velope d to  optimize   the  perfo rman ce s of com p lete  system s a nd  to   document th em. Unfo rtun ately, they only focu s ed t heir p r op ose d  method fo r only stori n g  th e   experim ent data. Indeed, in orde r to be fully access i b le to a wide  audien ce, h o weve r, it is  also   necessa ry to  provide  an ef ficient an d ex tensibl e  file format pl atform for the  sti m ulator  part  of a   BCI pro g ram  in order to fulfill the nee d s  of virt ually  any scienti s and to  provid e tools that a r able to  han dl e the  situatio n. Also, a s   p o inted  out by  Wen k e  Burde  [3], most B C I re sea r ch te nds  to improve B C I pe rform a n c e th rou gh  d e veloping  bet ter si gnal  p r o c e ssi ng  algo rithms b u t onl y a   few whi c h consi der the  aforementio ned bri dging  mecha n ism  between in depe ndent B C I   resea r chers  as  chall engi n g  opp ortu nity. Maybe it  is quite difficult for BCI researche r s to fi nd  approp riate  method s o r  p r otocols  which provide the  necessa ry pl atform for  bui lding a  wo rki ng  BCI framework .    This pa pe r d eals  with this issue, i.e. prov idin g a platform for  config urin g the visual   stimulato r  of a BCI system  in the form of XM L (eXtensible Ma rkup  Lang uage ) file format. In our  prop osed pl atform, we  store the  sti m ulator  conf iguratio n dat a (the num bers of stim uli,  freque nci e s,  etc.) in XML files in order t o  a llow fa st and simpl e  interchan ging of  them, even on  Web,  and  at  the same  time a  ro bust  a nd  cu stomiza b le  way of fo rmatting th e m . This pa pe r i s   written i n  the  followin g  sy stemati c . After a  br i e f introdu ction a b o u t the ba ckground  situatio n, a  review  abo ut the BCI fra m ewo r k will  be de scrib e d  and the X M L sh ort introdu ction  will be   provide d  pri o r to the expl anation  abou t the prop os e d  platform. A fterwa r d, issu es o n  softwa r impleme n tation and te stin g will be expl ained. Finally , the paper wi ll be clo s ed  with con c lu sion s.       2. METHO D   2.1. XML and the Dev e lopment of the  BCI Frame w ork   Extensible M a rkup  Lang u age  (XML) i s  a g ene ral - purp o se spe c ificatio n for creating   person a l m a rkup  lan gua ge s, which m a kes  use of t ags . It d e s c r i bes  da ta  an d   d i s t r i b u t es th em in   a form at, whi c h i s  i nde pen dent from the  platform.  Thi s  in dep end en ce  co me s fro m  the fa ct th at   XML do es no t use  a  sp ecif ic la ngu age: i n  fact,  XML  t ags are  not p r edefin ed,  so  that eve r yon e   can  write hi own p e rson al  tags. XML is very  similar  to HTML (Hy per Text Ma rkup L ang uag e)   but it is not it s sub s titute a s  its ai m is  di fferent: XML  wa s de sig n e d  for  storin and ex cha ngi n g   Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOMNI KA   ISSN:  1693-6930         A Novel App r oa ch for  Con f iguring T he  Stim ulator of  a BCI Fram ework… … (Ind ar Sugia r to)   75 data, while  HTML  wa s created fo r sh owin g data  i n  a format e a sily re adabl e even if ha rdly  adju s table d u ring time. In this way, it is ve ry comfortable  sh aring d a ta a c ro ss differe nt  laboratori e as eve r y re searche r  i s  fre e  to ext end t hem with th e  results of a n  analysi s  wit hout  disturbing the  activity of th e other o n e s  that c an recei v e the new d a ta and  conti nue to wo rk with   the previou s l y  developed t ools. The e ssential ch ara c t e risti c  of XML  is that data are inde pen de nt.  The  co ntent  of a file  is ke pt se pa rate f r om its  p r e s en tation, so  that  one   can  sto r e the  content  in   an XML  file o n ly on ce  and  then  extra c and vi suali z e  it in th e d e si red  form at (a ccordi ng to  t h e   final format, there i s  an ap prop riate XM L techn o logy  that allows its generation, called XSLT).   BCI syste m   tries to  creat e a di re ct b r idge  bet wee n  hum an  CNS (ce n tral  nervou s   system ) with  a com puter  o r  machine th rough n europ hysiolo g ic  sig nals g ene rate d by the brain .  It  then cre a tes  a ne w path w ay for the  brain to  carry  its me ssag e. At some  extent, it is better to   descri be a BCI system a s  a hybrid sy stem in whi c h all of its com pone nts coll a borate tog e th er to  form an integrated  sy stem, as written i n   IEEE  Signal Processing  M agazi ne Volume 25 Number  1, Jan uary 2 008: “A b r ain  comp uter int e rface is   a sy stem that in cl ude s a me an s for me asuri ng  neural  sign al s fro m  the  brain, a m e thod /algorit hm  for  decodin g  the s sig nals an d a m e thod ol ogy  for mappi ng this de co ding  to a behavior or actio n ”.  T h is de scriptio n of BCI system sou n d s  m o re   techni cal  sin c e it emph asize s  the imp o rtan ce  of m easure m ent-decodin g -ma pping inte ra ction  within the  system. The follo wing di ag ram  sho w ho w those thre e co mpone nts  wo rk to  con s truct  a BCI syste m  [6]. As Fig 1 sho w , the  measurem e n t task i s  pe rformed  within  the Source  sub - system, de coding is p e rf orme d by Signal  Pro c e s sing sub - syst em and ma pping tasks are  perfo rmed b y  the User  Applicatio n. Operator  mo dule a c ts as a central relay for syst em   config uratio n and onli ne prese n tation  of results to the  investigato r           Fig 1. Mech a n ism of a BCI  system in ge neral . Duri ng  operation, informatio n (i.e., signal s,  para m eters, or event markers) is  comm unicated  from  source to  sig nal pro c e s sin g , to user  appli c ation, a nd ba ck to so urce.      Those thre e core compo n ents of any BCI syst em  re quire  spe c ific amount of compute r   pro c e ssi ng  re sou r ce in  ord e r to  work  as  ideal a s  p o ssi b le a s  in  “dre am” B C I. In orde r to mai n tain   its com p lexity, it is necessary to develo p  a fr ame w o r k whi c h e n ca psul ates all t hose three  core   comp one nts  and provide s  standa rd p r otocol s for  their commu n i cation. An importa nt re mark   about this fra m ewo r k is th at, as we al ready  kn ow, t he hum an n e rvou s sy ste m  (incl udin g   th e   brain )  i s  the  most  compl e x and a dap tive system  i n  the world.  This title is  reflected  by the  phen omen on  that eve r y h u man  brain  may re act  differently to th e same  BCI  system. T h e r e a r e   subj ect s  who  have go od resp on se o n  certain type  of  BCI system  but the othe one s do n’t ha ve  it. For  som e   subj ect  oscill ations in th alpha  an d b e t a ban d d u rin g  moto r im ag ery  work  better  than the  evo k ed p o tential  a ppro a ch a nd  vice ve rsa.  T h is i n ter-subj ect va riability co rrespon ds to  spatial   patte rns and  spe c trotemp o ral  chara c te rist i c s of b r ain  si g nals. A  go od  BCI frame w ork  sho u ld also address this  issue. An example of  excellent app roa c h for this m a tter is given  by  BCI2000 p r o g ram [6], whi c h can be vie w ed a s  a BCI framewo r as well. The BCI2000  syst em  tries to  ma ke  a flexible B C I fram ework by co ll abo ra tion of ma ny user  define d  su b-p r og ram s Unfortu nately ,  this sy stem  requi re s eve r y su b - prog ra m to be  hard-cod ed a nd e m bedd ed into  the  main progra m  using lo w-level  inter-p roce ss com m unication (IP C ) pa ram e ters before one  can  use the BCI2 000 in the re al application .  This  “not so use r-fri endl y” appro a ch will become  an  Evaluation Warning : The document was created with Spire.PDF for Python.
                                 ISSN: 16 93-6 930     TELKOM NIKA   Vol. 7, No. 2,  Agustus 2 009 :  73 - 82   76 obsta cle i n  b r idging i ndep e ndent  system s of ea ch  BC I laborat orie s.  Thu s  in thi s   pape r, in o r d e r   to acco mmod a te the futu re  onlin e-b a sed  BCI  system,  we  develo p  t he BCI  fram e w ork usi ng th s a me approac h  as  [5].                     (a)           (b)     Fig 2. Block d i agra m  of the BCI frame w ork. (a) in   syste m  setup  scen ario, (b ) for d a ta abst r actio n       Since th e dev elopme n t of  BCI frame w o r k requi re s ex ce ssive  pa rt of pro g ra m code s, the  explanation  i n  this p ape will be fo cu sed on th e vi sual  stimulat or p a rt of th e BCI fram e w ork.  Based  on the human  capability to res pond to external  stimuli, we  c an expect that BCI could  gi ve   feedba ck in  many ways.  Sometimes it is quite   difficult to determine which type of feedb ack i s   best for  ce rta i n appli c ation  of a BCI system.  Even p r esenting m o re than  one t y pe of stimul us  woul d help  subj ect to improve hi s/her ability  to control his/ her own EE G. For example,  combi n ing b o t h rando m pa ttern and flickering p a ttern  will provid e a  multimodal a ppro a ch for the   BCI system  e nhan cem ent. Fig 2 sho w our p r op os ed  BCI frame w ork i n  sy stem  setup  scena rio   and the data  abstractio n  le vel. As it can be se en in  Fi g 2, there a r e  at least three  comp onent of  sub - sy stem s in the BCI framework system se tup scenari o  whi c h  work simult aneo usly: da ta   recorder,  sig nals vi suali z ation (analy s is tool s), a n d  ope rato r i n terface. But  in the d a ta   abstractio n  l a yer, there  are at lea s t  seven maj o r com pon ent s whi c are  requi red to  be   synchro n ized : data acqui sition, signal s databa se/s t o rag e , feature pro c e ssi ng  (extractio n and  cla ssifi cation ), visuali z ation  (in c ludi ng  sti m ul ator), co mmand  ge ne ration fo act uator,  com m and   databa se, an d the feedba ck acqui sition.   Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOMNI KA   ISSN:  1693-6930         A Novel App r oa ch for  Con f iguring T he  Stim ulator of  a BCI Fram ework… … (Ind ar Sugia r to)   77 This  re sea r ch modifie s  th e [7] and [5]  method s in o r de r to compl y  with our  propo sed   method  and  the e n tire  syst em works a s   follows. Sinc e  it is p o ssibl e   to pre d ict  collectio n of  CIs  (co n trol inte rface s ), given  a colle ction o f  TRs (t ra ns d u ce rs ), the p e rform a n c e s  of all the system  that is p o ssibl e  to buil d  by  combi n ing  all  the T R s with  all the  CIs ca n be  cle a rly u s ed  to optimi z e   BCI system becau se it wi ll be suffi cien t to choo se t he mo st effici ent com b inati on of TRs a n d   CIs.  All the  entities u s ed  for  the de scri ption of TRs  and  CIs w ill  be written in  XML format  both  for storage  necessity and for eas ily managi ng th e simulatio n s for the computation of  the   perfo rman ce s indicato rs.    The  T R   i s  co mposed by  th a c qui sition stage, whi c h  deal s with  th ele c tro physiologi cal  sign als, a nd  by the Cl assif i er, form ed  b y  the F eatu r e  Extraction  a nd the  Featu r e Cla s sificati on,  w h os e ta sk  is  to e x tr ac t th e  fe a t ur es   of in te r e s t  fro m  the  sig nal s a nd to  trans late them into a   logical sym b o l  (LS) whi c h  b e long s to th cla ssifie r  lo gi cal al pha bet (LA). The  LS,  in gen eral, ha s   no sem antic  meanin g  but is just a map p i ng with  som e  subj ect’ s p e rform a n c e (e.g. the character  sele ction in t he sp elling p r ogra m  [8]), the sele ct ion of  a row in P3 00 virtual keyboard task [4 ]).  The  CI en cod e seq uen ce s of LS s a nd  turns them i n to sem antic  symbols  (SS) t hat belo ng to  a  sema ntic  alp habet  (SA) b y  the Actuato r  pa rt that  ca n be u s e d  to  drive a n  external  pe riph e r al  (e.g. virtual  keyboards,  ro bots, n e u r op rosthe se s).   As an  exampl e, if we  have  a  logi cal  alph a bet  of four symb ols  α β γ δ   the CI  ca n i m pleme n t an  en codi ng fo r a virtu a key board a ppli c a t ion   that asso ciat es the  seque nce  αα α  to th e se manti c  sy mbol A, then  ααβ  to the  se mantic  symb ol B  and so on (u sually one of the LSs  is re served  for  the UNDO key).   In this way 27  semanti c  sy mbols  can be  encod ed wit h  3 LSs-lo ng seq uen ce s so that the   26 cha r a c ters of the English alphab et plus t he sp ace  one can b e  mappe d. In addition to these   symboli c  parameters,  the  so-cal l e d  Extende Confu s ion  Matrix  (ECM) metri c   for the  evalu a tion   and  optimization of th e p e rforman c e s   of  BCI sy st ems  whi c com b in es th e info rm ation a bout th entities p r evi ously d e scri b ed (LA, SA, Encod e rs ) wit h  those de riv ed from  a n e w  comp onent , is   use d . We u s e d  XML for sto r ing LA s, SAs,  ECMs and  Encod e rs in the followi ng format:       <?xml version="1.0" encoding="UTF-16"?>   <DOC>   <Type Name="Subject_01" SubType="Session_01"/>   <ECM>   <Row>   <In> α </In>   <C1>393</C1>   <C2>4</C2>   <C3>4</C3>   <C4>4</C4>   <Abstentions>45</Abstentions>   </Row>   <Row>   <In> β </In>   <C1>8</C1>   <C2>381</C2>   <C3>8</C3>   <C4>8</C4>   <Abstentions>45</Abstentions>   </Row>   <Row>   <In> γ </In>   <C1>16</C1>   <C2>16</C2>   <C3>357</C3>   <C4>16</C4>   <Abstentions>45</Abstentions>   </Row>   <Row>   <In> δ </In>   <C1>32</C1>   <C2>32</C2>   <C3>32</C3>   <C4>309</C4>   <Abstentions>45</Abstentions>   </Row>   </ECM>   </DOC>     Evaluation Warning : The document was created with Spire.PDF for Python.
                                 ISSN: 16 93-6 930     TELKOM NIKA   Vol. 7, No. 2,  Agustus 2 009 :  73 - 82   78 In the visuali z ation  pa rt, the EEG  sig n a ls  ca n b e  d i splaye spo n taneo usly  (i n time  domain )  o r  b e ing inte rpol a t ed for spatia l visualizat ion .  After the feature s  a r e ex tracted,  ce rta i n   transl a tion al gorithm i s  re quire d to de code the fe atu r e into exe c u t able comma nds fo r a c tua t or.  In order to  re cord th e a c tivity of the a c tu at or, a  comm and  datab ase  progr am i s   required t o   ke ep  track an d store the comm a nds. After a certain me nt al task h a s b e e n  given, the subje c t brain  will   rea c t in a certain manne r whi c h will pro duce spe c ific rhythmic sig nals.  The s e feedb ack sig n a ls  are then b e in g re corded a nd/or p r o c e s sed for furt he analysi s . In orde r to synch r oni ze all works  in the fram e w ork, we de velop a  synchroni za tio n  p r otocol which  gene rate ti ming si gnal s and  requ est/a ckn o wle dge  sign als for data in terch ang e bet wee n  su b-systems.     2.2. The Proposed Platfo rm for Stimulator Co nfig uration   Whe n  wo rki n g with exoge nou s BCI system, an ex ternal  stimulat or is re qui red  to elicit  certai n EEG  pattern. In   a visu al-b ased BCI  stim ulator, the r e  are  ge ne ral  req u irement s for  displ a ying the cues. F o example i n   SSVEP-based  BCI, the general param e ters will  be the  flicke ring  ani mation fre q u enci e s,  sizes,  colo rs , sh ap es, po sition s,  feedba ck  style, and p a tterns  (soli d  or textu r ed ). To acco mmodate the s e, we  d e velo p the XML file format as foll ows.      <?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE ssvep_p300>  <ssvep_p300 version="2.0">     <define  shape= user_defined_shape     <self  user_defined_parameters ></self>      <bar  user_defined_parameters ></bar>      <label  user_defined_parameters ></label>      <texture  user_defined_parameters ></texture>     </define>  </ssvep_p300>      As the lab e name im plies (i.e. ssvep_ p300 ), we   de velop the  stimulator  so th at it can   work for SSV EP- and P30 0 -ba s e d  BCI or  co mbin atio n of both BCI types.     De sc ription   The XM L fil e  mu st h a ve do cum ent  ID a s   ssve p_p3 00  and  it mu st co ntain attrib ute   versio n=”2.0 ”. The first  line, which con s i s ts of statement <?xml  versio n=”1. 0 ”  encodin g =”UTF-8 ? >  may be omitted bu t it is not reco mmend ed.     Every ‘define’  element will  start a ne w flicke rin g  anim a tion definitio n and its sha pe is mu st  be spe c ified i n  the ‘ s hap e’  attribute. Th e followi ng p o ssible val u e s  for ‘ s h ape’  attribute a r e:   recta ngle, tria ngle, and  circle. Note that t he attribute’ s value is case inse nsitive.     After defining  flickeri ng ani mation’s  sha pe, the  next step is creatin g four elem e n ts within the   ‘define’ elem ent. These four elem ents a r ‘self’, ‘ba r ’, ‘label’, and ‘texture’.     ‘self’ elem ent  will be  used  to descri be t he flic keri ng  animation it self and it con t ains  several   attributes. Th ese attri bute s , whi c h resi de in an ele m ent definition, may be spe c ified i n   rand om orde r. The followin g  attributes a r e valid for ‘sel f’ element:   o  siz e    will determine the physical si ze of the animation in pixels;   o  posx  and   po sy   will  det ermin e  the  to p-left  corner f o squ a re a n d  ci rcle flicke ring  animation a n d  determi ne the first point f o r trian g le ani mation;   o   posx2, po sy2 ,  posx3, posy 3    will be used ex clusively for determi ning the second   and the third  points of a tri angle flicke rin g  animation;    o  freq    will de termine the freque ncy of flickerin g  anim a tion;  o  colo  will determi ne  flickeri ng animat i on’s col o r;  possible  val u es  are: white, red,  gree n, blu e cyan, ma gent a, yellow,  gra y , darkre d , d a rkgreen,  darkblu e, da rkcy an,  darkma genta,  darkyell o w,  d a rkgray, and lightgray   o  texture   will  determin e  if the flickeri n g  animation h a s  texture or n o t;      ‘bar’ elem ent will be used to spe c ify the appe ara n ce and beh avior of feedback bar for ea ch   flicke ring a n i m ation. The followin g  attrib utes are valid  for ‘bar’ elem ent:  o  type   will  determin e  the style of feedba ck ba r; possi ble v a lue s  are: none,  individual, hal fleft, halfright, and com b ination  Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOMNI KA   ISSN:  1693-6930         A Novel App r oa ch for  Con f iguring T he  Stim ulator of  a BCI Fram ework… … (Ind ar Sugia r to)   79 o  colo   will  determi ne th e color of fe edba ck b a r;  possibl e valu es  are: white ,  red,   gree n, blu e cyan, ma gent a, yellow,  gra y , darkre d , d a rkgreen,  darkblu e, da rkcy an,  darkma genta,  darkyell o w,  d a rkgray, and lightgray    o  bru s  will  determi ne the filling rule for the bar ; possible values are solid and line  o  siz e     will determine the width of t he bar; the height of the bar i s  f o llows the  size of  the  flicke ring animation;   o  frame   will  determi ne if the feedba ck bar is di splay ed with a fra m e or not, so  the   possibl e values are yes o r  no   o  frame c olo r    if the  feedba ck b a r ha s a frame, t hen this attribute  will determi n e  its  colo r; the possible value s   are the same  with  anothe r colo r definitio n; if this attribute  is ignored, then the fram color will be  set the same  color with its parent   o  blinki ng    will determin e  wheth e r the f eedb ack ba sho u ld al so  blinki ng with  the   same f r eq uen cy as th e flickering  animati on itself; ho wever, it is recommen ded to  set  this value a s  no to avoid p e rform a n c e d egra dation  when u s ing ma ny animation o  threshold    will determine  the threshol d  value of feedback ba r;             Fig 3. Severa l possible fee dba cks di spla ys : (a) NO_FEEDBACK_B A R, (b) INDIVIDUAL, (c HALF_ R IG HT, (d) HAL F _ L EFT, (e)  CO MBINATIO N, and (f) a  re su lt for combini ng seve ral  feedba ck types.             (a)   (b)     Fig 4. Two po ssi ble ap pea rances  of feed back ba r: soli d (left) or di screte (right).         ‘label’ elem e n t will be used to spe c ify flicke ri ng a n i m ation’s la be l and it will b e  displ a yed  anywh ere o n  the scree n , depen ding on t he sp ecifie d value s  belo w :   o  text   any ASCII text in th is  attribute is   valid  as a flickeri ng a n imat ion’s la bel; if this  attribute is NULL, then the  flickeri ng ani mation will be  displaye d wit hout label   o  siz e    will d e t ermine the fo nt size of the  label;   o  colo   will specify the col o r of the text; the  possible  values are the same  with the  other colo r’s  attribute abov o  posx  a nd  po sy   will  dete r mine the  exa c t po sition  of  the text; if these  attribute s   are   negative, the n  the text will  be displayed  on  the ce nter  of the flicke ring animatio n ;   Evaluation Warning : The document was created with Spire.PDF for Python.
                                 ISSN: 16 93-6 930     TELKOM NIKA   Vol. 7, No. 2,  Agustus 2 009 :  73 - 82   80     ‘texture’ ele m ent will  be  use d  to  spe c i f y fli ckeri ng  a n imation’ s te xture. If textures a r e g o ing  to be u s e d  fo r flicke ring  an imation a n im ations, th e te xture attrib ute  in the ‘ s elf’  el ement m u st  be s e t as  ‘on’ firs t. The following a ttribut es  are valid for this  element:  o  firs   sp ecify the full-p a th lo cation   of the first t e xture im ag e filena me;  any  recogni za ble  image by Qt may be use d   o  se con d     sp ecify the full -path lo cation  of t he  se con d  texture i m a ge filen a me;  any  recogni za ble  image by Qt may be use d      Every eleme n t must be  clo s ed  with  approp ri ate  clo s ing tag.  Otherwise, it will not be  recogni ze d a s  a n  ele m ent  in the XML  d o cum ent fo rm at. This XM document  mu st be  save in stand ard A S CII format (with extensi o n .xml).  In our proposed m e thod,  we al so  devel op several t y pe of f eedback bars for  SSVEP- based BCI.  Usi ng the  co nfiguratio n file explain ed  above, the fo llowing  feed b a ck ba rs can  be  ins e rted toget her with the flic ke ring  s t imulator for SS VEP-based B C I (c an be  s e en in Fig 3  an Fig 4).       3.  IMPLEMENTA TION A ND DISCUS SION   The pro g ram  is develope d using  C++ in Qt ’s ope n sou r ce fra m ewo r k. The  current  versio n of  Qt  bein g  u s e d  i n  this pa pe r i s  Qt  4.3.3. Si nce  the f r ee -l icen se  Qt i s   use d , Mi cro s oft  Visual Studi o  can not be  u s ed  as an I D E (Integr ated  Develo pmen t Environme n t ) for d e velop i ng   the prog ram,  inste ad, Ecli pse  version   3.3.1.1 (E u r o pa versio n)  with Qt-Inte g r ation  plug -in  is  use d . As a n   open -sou rce  mandato r y of  Qt and E c lip se, g + + versi on 3.4.5  of M i nGW i s   used  as   the compil er.  Whe n  usi ng g ++ a s  compil er, gdb  can b e  use d  as the  debug ger.    Qt supports t w o m odel s of  XML implem entat ion: SAX (Simple AP I for XML) and DOM  (Document Object Model).  The main  different  of SAX and DOM is  SAX report s  "parsing  event s"  dire ctly to the application throu gh virtual  functi on s, wh ile DOM conv erts an XML  document int o  a   tree st ru cture ,  which the a pplication  ca n then n a viga te. Qt also p r ovides it s o w n way to rea d  or  write XML which i s  calle d QXml module (whi ch  con s i s ts of several u s eful  class such as  QXmlAttributes, QXml StreamRead er, QXml S t ream Write r, etc). I n  this p aper,   QXmlStream Rea der i s  used for re adin g  config uratio n file.    After compili ng the BCI framework p r o g ram,  we  p r o v ide the XML  configu r atio n  file for   config urin g th e stimulato r For exam ple,  the  followin g  XML script  will define  BCI appli c ati o n   whi c h con s ist s  of four flickering a n imati ons: tw squ a re -shap e (e. g . the first one with texture  and  feedba ck bar and the second one  with  neither text ure nor fee d b a ck bar), one  textured circle- sha pe with fe edba ck bar, a nd one textured triangl e sh ape with fee d back ba r.      <?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE ssvep_p300>  <ssvep_p300 version="2.0">    <define shape="rectangle">  <self size="100" posx="0" posy="0" posx2="" posy2="" posx3="" posy3=""   freq="13.5" color="white" texture="no"></self>  <bar type="none" color="white" brush="solid" size="20" frame="no"   framecolor="ignore" blinking="no" threshold=""></bar>      <label text="" size="" color="" posx="" posy=""></label>      <texture first="" second=""></texture>    </define>    <define shape="rectangle">      <self size="100" posx="200" posy="0" posx2="" posy2="" posx3=""   posy3="" freq="15.0" color="yellow" texture="yes"></self>      <bar type="halfleft" color="white" brush="line" size="20" frame="yes"   framecolor="red" blinking="yes" threshold="0"></bar>      <label text="two" size="20" color="green" posx="200" posy="50"></label>      <texture first="default_texture1.bmp" second="default_texture2.bmp">     </texture>    </define>    <define shape="triangle">      <self size="100" posx="0" posy="200" posx2="100" posy2="200"   posx3="50" posy3="300" freq="17.5" color="blue" texture="yes">     </self>      <bar type="individual" color="red" brush="solid" size="20" frame="yes"   framecolor="red" blinking="no" threshold="200"></bar>      <label text="three" size="20" color="green" posx="0" posy="250"></label>  Evaluation Warning : The document was created with Spire.PDF for Python.
TELKOMNI KA   ISSN:  1693-6930         A Novel App r oa ch for  Con f iguring T he  Stim ulator of  a BCI Fram ework… … (Ind ar Sugia r to)   81     <texture first="default_texture1.bmp" second="default_texture2.bmp">     </texture>    </define>    <define shape="circle">  <self size="100" posx="200" posy="200" posx2="" posy2="" posx3=""   posy3="" freq="10" color="red" texture="yes"></self>      <bar type="halfright" color="red" brush="solid" size="20" frame="yes"   framecolor="red" blinking="no" threshold="200"></bar>      <label text="this is a circle LED" size="20" color="yellow" posx="100"   posy="200"></label>      <texture first="default_texture1.bmp" second="default_texture2.bmp">     </texture>    </define>  </ssvep_p300>      Fig 5 sho w s the re sult for t he  above con f iguration scri pt.        Fig 5. Displ a y result fro m  e x perime n t wi th the given XML config uration script.           Fig 6. The co mplete BCI framework in a c tion. T he BCI framewo r k u s e s  XML file config uratio n to  control all wid gets on the  scre en.   Evaluation Warning : The document was created with Spire.PDF for Python.
                                 ISSN: 16 93-6 930     TELKOM NIKA   Vol. 7, No. 2,  Agustus 2 009 :  73 - 82   82 The p r op ose d  method  ha s be en p r e - e v aluated a n d  impleme n ted  in real  appli c ation  of  BCI system f o r spellin g progra m  ap plication. It  has b een d e mon s t r ated  su ccessfully as  rep o rted   by [8] and [1]  as  a result  of publi c  exp e rime nt  in th e event of  CeBIT 2008  in  Han nove r . F i g 6   sho w s the screen shot re sul t  of the propo sed  BCI fra m ewo r k a nd its configu r ation  platform.      4. CONCL U S I ON   A novel approach in provi d ing flexible  vis ual stimul a t or usin g XM L has b een p r esented  and a pplied f o r devel opm ent of a BCI  (brain-co m p u ter inte rface )  frame w o r k. Usi ng XML  file   format  fo r co nfigurin the  visual stimula t or  of   a B C system,  we  can d e velop  B C I ap plicatio ns  whi c ca n a c comm odate   many expe ri ment st rat egi es i n  BCI  re search. T he B C I fram ework and  its co nfigu r ati on platfo rm i s  develop ed u s ing  C++ pro g rammi ng la n guag e which  inco rpo r ate  Q t ’s   most p o werf ul XML pa rser n a med  Q X mlStr eam.  The impl eme n tation an experim ent shows   that  the  XML config uratio n file  can be well  exec uted within  the pro posed  BCI framework. Be side  its capability in presenting flexible flickering  frequencies and text   formatting for SSVEP-based  BCI, the con f iguration  pla tform only li mited to p r o v iding 3  sh a pes,  16  colo rs, an d 5  dist inct  feedba ck ba rs. It is not n e ce ssary to i n crea se  the  numbe r of shape s no r co lors  sin c e th ose  para m eters  are le ss imp o rtant for th e BCI  stimul ator. The p r opo sed m e th od can then  be  extended to  enha nce the  usa b ility of  currently exist ed BCI fram e w ork su ch as  BF++  Toys and  BCI 2000.       REFERE NC ES   [1]  Allison, BZ  et  al.,  “BCI De mographics   I: Ho w   ma n y  (an d   w h a t  ki nds o f ) pe op le can  us e   an SSVEP BCI?” , Procee ding of  4 th  Internatio nal B r ain-Com put er Interface  Wo rksho p  a nd  Traini ng Course 20 08, Verl ag der T e chni sc hen  Universität Gra z  – Austria, 20 08.   [2]  Bianchi  L,  Quitadam L R , Ga rreffa  G, Ca rd arilli  GC,  Ma rci a ni MG.,  “Pe r forman ces  ev aluation and optimiza t ion of Brain - Compu t er In terface sy stems in a cop y  spellin g   task IEEE Transactions on Neural  Sy stem and Rehabilitation Engi neering, 15(2):  207- 216, 200 7.  [3]  Burde  W, an d Blankert z  B.,  “Is the locus o f  con t rol of r e inforcemen t a  predictor o f   brain-c o mpu t er inte rfa c e  performa nc e?” , Pro c e e d ing s  of the 3rd Internatio nal Brain- Computer Interfac Works h op and Training Cours e  2006, Verlag  der Tec h nisc hen  Universität Graz: 76-77, 20 06.  [4] Millán,  J .,  “Adap t iv e Brain Inter f a ces  for  Co mmunicatio n and  Con t rol” , 10th  Internation a l Confe r en ce o n  Huma n- Co mputer Inte ra ction, Gree ce , 2003.  [5]  Quitadam o L R , Marciani  MG, Bianchi  L.,  “Optimizatio n of Br ain Computer Interface   s y stems by   means of XML a nd BF ++  To y s , Internation a l Jo urnal  of  Bioelect r oma gnetism, 9 ( 3):  172- 18 4, 20 07.  [6]  Schal k G,  M c Farla nd DJ, Hinterbe rge r  T,  Birba u me r N, Wolpa w   JR.,  BCI2 000 : a  gen e ral- purpos e bra i n–computer  interface  (BCI) s y stem” , IEEE Trans a c t ion  on  Biomedic a Enginee ring, 51(6 ) :10 34– 4 3 2004.   [7]  Sugiarto I, and Handoyo  I.,  “Applicati on of Distributed  Sy stem in Neuroscience, A  Cas e  Stud y  of BCI Fra m e w o r k ,   Proceedi ng of  The First Internatio nal  Seminar  on  Scien c e an d Tech nolo g y (ISSTEC 2009 ), Universita s Islam Indon e s ia, Jo gja k art a , 2009.   [8]  Sugiarto I, Allison BZ, Gräser A.,  O ptimiz ation  Strateg y  for SSVEP-Based BCI in   Spelling Program Applic ation , Proceedin g  of Internatio nal Confere n ce on  Compute r   Enginee ring   and T e chnol ogy 200 9 (I CCET 2 009 ),  Internatio nal  Asso ciatio n o f  Comp uter  Scien c e an d Informatio n Tech nolo g y (IACSIT), Singa pore, 20 09.       Evaluation Warning : The document was created with Spire.PDF for Python.