scieee Open visual document viewer

Using conventional cell phones to recognize basic physical movements

Tormashova, Oxana

Abstract

[ANGLÈS] Human activity recognition system via wearable sensors can provide valuable information about person's life-style and can help to monitor human activities in order to improve person's interaction with environment. In current work we research possible approaches to development of an accelerometer sensor based system for human activity recognition. The movements are described with accelerometer data, gathered by means of sensor embedded in mobile phone. For each type of movements a feature vector is created and is further processed by a classification system to generate a classification rule. The result rule is used to recognize a particular human activity. The purpose is to develop a program that implements a human activity classification system for a mobile phone with sufficient accuracy.

Full text

Abs ac --Human ac i i y ecogni ion sys em ia wea able senso s can p o ide aluable in o ma ion abou pe son's li e- s yle and can help o moni o human ac i i ies in o de o imp o e pe son's in e ac ion wi h en i onmen . In cu en wo k we esea ch possible app oaches o de elopmen o an accele ome e senso based sys em o human ac i i y ecogni ion. The mo emen s a e desc ibed wi h accele ome e da a, ga he ed by means o senso embedded in mobile phone. Fo each ype o mo emen s a ea u e ec o is c ea ed and is u he p ocessed by a classi ica ion sys em o gene a e a classi ica ion ule. The esul ule is used o ecognize a pa icula human ac i i y. The pu pose is o de elop a p og am ha implemen s a human ac i i y classi ica ion sys em o a mobile phone wi h su icien accu acy. Index Te ms--Accele ome e , Human ac i i y ecogni ion, Adaboos , Gaussian Models, KNN, KMeans. I. INTRODUCTION N mode n ime o widely sp ead mobile de ices people do NOT imagine hei li e wi hou mobile de ices, such as PDAs, mobile phones, and o he po able pe sonal elec onic de ices. These de ices a e equipped wi h di e en ypes o senso s as a s anda d componen o he con ol. The in o ma ion om hese senso can be used in sys ems ha a e capable o au oma ic ecogni ion and classi ying specific physical ac i i ies o human beings. The aim o ac i i y ecogni ion sys em is o ecognize he ac i i y o i s use based on p e iously moni o ed and analyzed da a abou beha io o he pe son, and ake necessa y ac ions in esponse. I may help imp o ing he pe o mance o heal hca e moni o ing de ices o p omo ing he de elopmen o ad anced human-machine in e aces. I The accele a ion senso , i.e. accele ome e , in pa icula , now among he s anda d ea u es in mos mobile phones and en e ainmen de ices, can be used as a sou ce o in o ma ion abou i s owne ’s ac i i y and mo ion. An accele ome e measu es p ope accele a ion o a de ice and e u ns a eal- ime measu emen o accele a ion along he x-, y- o z-axis o be used as a human mo ion de ec o . Analysis o accele a ion signals enables ecogni ion o di e en ype o human mo ion ac i i ies such as walking, unning, s anding up, e c, which is a ich sou ce o con ex in o ma ion o a mobile applica ion. Accele ome e s ha e been widely accep ed due o hei compac size, hei low-powe equi emen , low cos , non- in usi eness and capaci y o p o ide da a di ec ly ela ed o he mo ion o people. Mos o he sys ems p oposed in he li e a u e u ilize da a om an accele ome e in combina ion wi h da a om o he sensing de ices like gy oscopes o EMG senso s in o de o enhance he sys em’s pe o mance. I inc eases he numbe o equi ed senso s o he classi ica ion sys em. The addi ional limi a ion is he numbe , loca ion and na u e o senso s ha people will ole a e. Tha 's why de elopmen o a single senso sys em o human ac i i ies ecogni ion is a challenging bu p omising esea ch a ea. Ac i i y ecogni ion equi es a echnique ha can achie e equi ed le el o eliabili y o ecogni ion while being used unde he condi ions o daily li ing. The aim o he cu en wo k is o esea ch a possibili y o building a ecogni ion sys em based solely on da a om a single 3-axis accele ome e and o de elop a so wa e ha implemen s he algo i hm o mo emen ecogni ion on a mobile phone. Fo a gene al analysis he signal p ocessing flow is shown in a ollowing igu e: Fig. 1. Signal p ocess low o accele ome e da a. II. APPROACHES TO HUMAN ACTIVITY RECOGNITION The e is a bulk o human mo ion analysis li e a u e. Many echniques ha e al eady been p oposed o ac i i y ecogni ion in specific en i onmen (e.g. labo a o y) using he coope a ion o se e al senso s. Th ee mainly u ilized app oaches o ac i i y ecogni ion a e: ideo based, en i onmen al senso based and wea able senso based. A. Video based sys ems This ype o sys em use ideo came as o ob ain in o ma ion abou human ac i i ies. These sys ems wo ks good enough in he specific en i onmen , bu ha e a signi ican d op o accu acy in eal home se ings [1]. Changes o he scene, a iable ligh , inc easing numbe o people in he scene e c, p o ides a signi ican challenges while p ocessing o he in o ma ion. The o he limi a ion o such sys ems is ha hey a e ied o a speci ic loca ion and can' be used o moni o ing ac i i ies o a pe son ou side o 1 Using con en ional cell phones o ecognize basic physical mo emen s Oxana To masho a, ETSETB UPC his loca ion. In addi ion, he cos o u ilized senso such as mic ophones and came a a e high enough. B. En i onmen al senso based sys ems The aim o hese sys em is o moni o he in e ac ion be ween use s and hei home en i onmen [1, 2]. They use a se o ambien senso s dis ibu ed h ough he pe son's li ing en i onmen . The sys em moni o he occupan s o he home all day. The da a ga he ed by hese senso s can be used in o de o in elligen ly adap he en i onmen o pe sons needs. Like he ideo based sys ems en i onmen al sys ems depend on loca ion and can' moni o ou side o he li ing en i onmen . They also a e in as uc u e dependen . C. Wea able senso based sys ems Such sys ems u ilize wea able du ing no mal daily ac i i y senso s. They con inuously moni o bio-mechanical and physiological da a o he pe son independen o his loca ion. This ype o senso s can be a ached o a pe son by means o clo hes, jewel y o wo n as independen wea able de ices. They can measu e physical pa ame e s ha can no be measu ed by o he ypes o senso sys ems and hus a e well sui ed o collec ing da a o human ac i i ies in o de o classi ie and ecognize ac i i y pa e ns. In addi ion his ype o senso s a e low-p iced and do no in ade as ac i ely peoples p i acy as ideo senso s o example. The e a e di e en ypes o body-a aches senso s, such as elec omechanical swi ches, goniome e s, accele ome e s, gy oscopes, pedome e s, and ac ome e s, ha can be used o moni o human mo emen s in ee-li ing en i onmen . O all hese accele ome e s we e conside ed o be a use ul ool o collec ing physical in o ma ion abou human mo emen s. By means o accele ome e s i 's possible o ga he in o ma ion abou bo h equency and in ensi y o mo emen . Some ype o accele ome e s can in addi ion measu e body il . Accele ome e s a e minia u e and low cos and is use ul o de elopmen o small ligh weigh , po able sys ems ha can be wo n by pe son du ing day wi hou oo much incon enience o he pe son. In his wo k we y o de elop and implemen in p og amming code a mo emen ecogni ion sys em based on a single i-axial accele ome e senso embedded in a mobile phone. III. RELATED WORK IN ACTIVITY RECOGNITION USING ACCELEROMETER Mos s udies on he use o wea able de ices in moni o ing ha e used mul iple senso s, ypically accele ome e s ixed o speci ic places on he body, usually a subse o he highs, w is s, a ms, s e num, wais and lowe legs[3, 4, 5]. The limi a ion o such app oach is numbe and loca ion o hese de ices. A smalle numbe o s udies ha e in es iga ed he use o a single accele ome y de ice a ached a he wais , s e num o back[6, 7]. A single senso can be in eg a ed in o a mobile de ice, such as cell phones o w is wa ches, and is mo e com o able o he pe son in daily use. In o de o compensa e o one senso i can be loca ed in di e en places on he pe son. Al hough he use o a la ge numbe o senso s is likely o p o ide a highe accu acy o mo emen classi ica ion, such a sys em may be uncom o able and incon enien du ing long- ime moni o ing o daily ac i i ies. In [13] was shown ha placing accele ome e a only wo loca ions (ei he he hip and w is o high and w is ) did no a ec ac i i y ecogni ion sco es signi ican ly (less han 5%) when compa ed o a sys em wi h i e senso s. The esea ches on mo emen classi ica ion om accele ome e da a implemen ed wide a ia ion o classifica ion algo i hm. In o de o implemen classifica ion algo i hm he so wa e has o lea n o ecognize and associa e ac i i y pa e ns. This is called machine lea ning. The e a e wo app oaches o such echniques[15]: supe ised o unsupe ised. In case o supe ised echnique he e is a se o ac i i y da a p e iously labeled and used o “ ain” classifica ion algo i hm. Once he aining phase is comple e, he classifie is able o assign an ac i i y label o an unknown example o senso da a. Wi h unsupe ised app oaches all he senso da a a e passed o he algo i hm which au oma ically iden ifies a numbe o s a es o da a clus e s, each o which may co espond o a pa icula ac i i y. The ange o classi ica ion me hodologies can be di ide in o he ollowing ypes[15]: A. Th eshold-based classifica ion The idea o he h eshold-based classifica ion is o compa e ob ained ea u e alue wi h he speci ied h eshold in o de o decide whe he a pa icula ac i i y is being pe o med. Due o i s implemen a ion his app oach is use ul o disc imina ion be ween s a ic pos u es and ansi ions be ween hem using angles de i ed om accele ome e s placed on di e en pa s o body. Some o he esea ches ha e also applied h eshold-based classifica ion o he p oblem o di e en ia ion be ween s a ic pos u es and dynamic ac i i y. In addi ion h eshold-based classifica ion has been success ully applied o he de ec ion o alls. A ange o ea u es can be used in o de o de ec all acciden . The mos common cha ac e is ic used o iden i y he p esence o a all is he apid decele a ion which occu s as he alle con ac s he g ound. The alue o he h eshold depends on loca ion o he senso . I is also possible o combine di e en h esholds in o de o achie e be e accu acy du ing classi ica ion[16, 17]. B. Hie a chical me hods A hie a chical classifica ion scheme cons uc a bina y decision s uc u e which is consis s o o a numbe o consecu i e nodes. A each node a decision ule is applied o inpu ea u es. The esul is ei he a inal classi ica ion o a 2 ansi ion alue o ea he classi ica ion p ocess. The disad an age o his app oach is ha he decision ules ha e o be de e mined be o e he es ing based o manual inspec ion and analysis o he aining da a. Fig. 2. Example o he hie a chical classifica ion scheme. Many esea ches u ilized hie a chical in combina ion wi h o he classifica ion schemes [7 , 19]. C. Decision ees The decision ee app oach is simila o hie a chical scheme. The di e ence is ha decision ees use s ic algo i hms in o de o de ine a se o ule o classi ica ion and hus au oma e he p ocess. These algo i hms examine ea u es one a a ime o de e mine he mos sui able ones o disc imina ion o he ac i i ies and de elop a se o ules ha will be la e used in a classifica ion sys em. Decision ees has been applied o sol e a wide ange o classifica ion p oblems[21, 22, 23, 46]. One o he mos ho ough s udies was ca ied ou in [20]. The au ho s combined ime and equency ea u es and used i e senso s o ecognize 20 ac i i ies wi h an accu acy o 86%. D. K-nea es neighbo K-nea es neighbo algo i hm (k-NN) is a me hod o classi ying objec s by cons uc ing mul idimensional ea u e space, in which each dimension co esponds o a di e en ea u e. Fi s aining da a is placed in a ea u e space based on closu e me ic. Fig. 3. Example o he KNN classifica ion. Then a new da a is classi ied by de ining he majo i y o he k-nea es neighbo s which co espond o a gi en ac i i y. The k alue is a ied om 1 o a small pe cen age o aining da a and is usually selec ed empi ically. E. A ificial neu al ne wo ks A i icial neu al ne wo k (ANN) is a ma hema ical model o compu a ional model ha ep esen s complex ela ionships be ween i s inpu s (independen a iables) and ou pu s (dependen a iables). ANN is an adap i e sys em ha cha ac e ized by some o m o op imiza ion p ocess ha pe mi s o ob ain he ou pu alues o gi en se o inpu s. Fi s ANN is un o e he aining se , a e ha i can hen be used o ob ain he ou pu s o any se o inpu s. Fig. 4. An a i icial neu al ne wo k is an in e connec ed g oup o nodes, akin o he as ne wo k o neu ons in he human b ain. In case o ac i i y classifica ion ANN inpu s usually a e he senso da a and ou pu s - di e en classes o ac i i ies. ANNs ha e been widely used wi hin he field o human mo emen esea ch. One o he mos common ANNs is e e ed o as a mul ilaye eed- o wa d neu al ne wo k o Mul i-Laye ed Pe cep on (MLP) desc ibed in [30, 31]. In i inpu and ou pu s a e in e connec ed h ough hidden laye s, he low o in o ma ion h ough he ne wo k is con olled by he weigh ing o he links be ween he nodes and he ans e unc ion wi hin each node. This ype o ne wo k is ained by i e a i ely op imizing he weigh s in o de o accu a ely p oduce he desi ed aining ou pu s om he co esponding inpu s. MLP was used in many esea ches, such as [32, 33, 34] . An al e na i e o he eed o wa d ANN is he p obabilis ic neu al ne wo k[35]. This ype o ne wo k assume o ha e a example pa e ns o classi ica ion s o ed in memo y and hus educe ime o aining. Spiking o pulsed neu al ne wo ks (PNN) [36, 37] wo k wi h much la ge numbe o bina y inpu ha no mal ANN and beha e ela i ely well wi h accele ome e -base da a[38]. F. Suppo ec o machines Suppo ec o machines (SVMs) [24] es ablish a popula machine lea ning me hod which is based on finding op imal sepa a ing decision hype planes be ween classes wi h he maximum ma gin be ween pa e ns o each class. In sho i cons uc s o gi en example a classi ica ion be ween wo classes, making i a non-p obabilis ic bina y linea classi ie . Fo a se o aining da a his algo i hm is implemen ed on each o he examples ma king i as belonging o one o wo ca ego ies. The esul model is used o assigning es da a o a speci ic ca ego y. 3 Fig. 5. A wo-dimensional example o SVM. The SVM analysis a emp s o ind a bes 1-dimensional hype plane (i.e. a line) ha sepa a es he cases based on hei a ge ca ego ies. The ec o s (poin s) ha cons ain he wid h o he ma gin a e he suppo ec o s. SVMs ha e only been applied in a small numbe o ac i i y classifica ion s udies[6, 25, 26]. Th ee s udies ha e used SVM echniques o di e en ia e be ween simula ed alls and o he ac i i ies. In [27] da a om accele ome e we e combine wi h da a om mic ophone in o de o di e en ia e be ween alls, walking and unning. In [28, 29] da a om om a i-axial accele ome e embedded in a mobile phone we e used o a all ecogni ion. G. Nai e Bayes and Gaussian mix u e models The Bayesian classifie is based on he es ima ed condi ional p obabili ies o likelihoods o he signal pa e ns a ailable om each ac i i y class. The p obabili y o unknown example being gene a ed by a specific ac i i y is es ima ed by means o likelihood unc ion. Wi h a nai e Bayes classifie , he inpu ea u es a e assumed o be independen o each o he . Unde his assump ion i is possible o p esen likelihood unc ion o each class as a mix u e o n simple p obabili y densi y unc ions, whe e n is he numbe o ea u es. In eali y he assump ion o independence be ween ea u es is o en iola ed bu his app oaches is popula due o i s simplici y and ease o implemen a ion[43, 44, 45]. The app oach was s udied in many esea ches bu some imes p oduce uns able esul s. In [3] au ho s sugges ed ha he eason o his poo pe o mance may ha e been he iola ion o assump ions ha accele a ion ea u es can be conside ed condi ionally independen and modeled by a no mal dis ibu ion. Fig. 6. Example o Bayesian classifie . The likelihood is measu ed by d awing a ci cle a ound X(whi e ci cle) which encompasses a numbe ( o be chosen a p io i) o poin s i espec i e o hei class labels. Then a new objec (whi e ci cle) is classi ied as a RED one, based on maximum likelihood alue. A Gaussian mix u e model (GMM) [10, 31, 9] is e y simila o Bayes classifie . Howe e , he likelihood unc ion is o be o unknown shape and unc ional o m and hus app oxima ed by a weigh ed mix u e o Gaussian unc ions. Fig. 7. Two-componen Gaussian mix u e model: da a poin s, and equi- p obabili y su aces o he model. To imp o e he quali y o GMM i is usual o i hese models many imes wi h di e en pa ame e s and choose he bes esul , as measu ed by he likelihood o some o he ex e nal c i e ion. One o he mos popula app oxima e in e ence algo i hms ha is used o calcula ed pa ame e s and mixing coe icien o Gaussian componen s is he expec a ion-maximiza ion algo i hm (EM). Expec a ion-maximiza ion is a well- undamen ed s a is ical algo i hm o ge a ound his p oblem by an i e a i e p ocess and i 's he as es algo i hm o lea ning mix u e models. Bu he e a e also o he app oaches. Fo example in [39] ime-domain ea u es we e used o cons uc sepa a ed GMMs o a numbe o mo emen s. Fo aining ins ead o EM hey employed a s a is ical es ima e p oposed in he field speech ecogni ion. Classifica ion o es da a was achie ed by selec ing he GMM (ac i i y) wi h he highes p obabili y o ha ing p oduced ha pa icula se o ea u es. H. Fuzzy logic Fuzzy logic is de i ed om uzzy se heo y and allows mapping om se o inpu s o one o mo e ou pu s u ilizing a se o i – hen s a emen s called ules. Fuzzy logic allows inpu da a o ha e a pa ial membe ship in mul iple se s. Du ing he aining p ocess a aining da a i s is assigned o uzzy se s. Then he ules is applied o p oduce a co esponding ou pu . In case o ac i i y classi ica ion he example wi h he maximum membe ship is selec ed. Fig. 8. Example o uzzy logic membe ship unc ions Al hough uzzy logic should be mo e sui able o dealing wi h eal-wo ld p oblems han no mally used hie a chical o decision ee classifica ion schemes i 's been applied o a limi ed numbe o ac i i y classifica ion p oblems .e. o iden i y di e en s a ic pos u es o o di e en ia e be ween 4 di e en mo emen s [40, 49], o iden i y si - o-s and and s and- o-si ansi ions [41], o iden i y alls [42]. I. Ma ko chains and hidden Ma ko models Fo speci ic mo emen s, some ansi ions be ween ac i i ies a e mo e likely o occu han o he s. Fo such p oblem can be used hidden Ma ko models (HMM), ha ep esen s Ma ko chains wi h unknown (o hidden) s a e o he model a any gi en ime. The s a es can only be de e mined om obse able pa ame e s which depend on he s a e. Fo classi ica ion pu pose he ea u es ob ained om senso da a a e de ined as obse able pa ame e s and di e en ac i i ies co espond o he s a e o he model. S a es in a HMM can co espond o mo e han one ac i i y. As p e iously desc ibe echniques HMM is i s ly ained wi h example da a. Then i can hen be used o de e mine wi ch sequence o s a e ansi ions is he mos likely could ha e esul ed om an obse ed sequence o ea u es. HMMs a e ained by de e mining s a e ansi ions along wi h he p obabili ies ha each possible se o obse a ions ( ea u es) will be obse ed o a gi en s a e. HMMs is one o he mos popula app oaches in li e a u e[47, 48, 50]. I can be used as a single classi ie jus like a pa o a wo-s age classifica ion scheme (e.g in combina ion wi h boos ing algo i hm[47]). J. Combining di e en classifie s Recen ly me a-s age schemes o classi ica ion analysis has gained popula i y. They imp o e pe o mance o single classi ie s by combining hei ou pu using di e en echniques. These include majo i y o ing (whe e he class wi h he majo i y o o es is accep ed), s acked gene aliza ion (which ains he base classifie s and hen uses hei p edic ions as da a o a new lea ning s age) o boos ing (which assigns weigh s o he aining pa e ns o combine he pe o mance o weak classifie s). In [23] i e base-le el classifie s in a boos ed scheme o eigh common ac i i ies we e s udied. In gene al, when an in e -subjec design was used, he boos ed SVM was shown o ou pe o m o he me a- le el classifica ion schemes. AdaBoos is a ype o adap i e boos ing ha adap mul iple weak classifie s o c ea e a single mo e eliable one. Fig. 9. Example o AdaBoos wi h wo weak hypo hesis. I combines wo lea ne s, h1 and h2, in o de o ob ain a “good” lea ne . Nei he h1 no h2 is a pe ec lea ne . Ini ially AdaBoos chooses he one ha classifies mo e da a co ec ly. Then he da a is e-weigh ed o educe he impac o he misclassified da a[51]. This p ocess con inues and a each s ep he weigh o each week lea ne among o he lea ne s is de e mined. The ob ained a he end o i e a ions combina ion o “weak” lea ne s will be a “good” lea ne , ha classifies he gi en da a mo e accu a ely ha each lea ne sepa a ely. IV. CLASSIFICATION PROCEDURE Classi ica ion p ocess consis s o aining phase and es phase. The aining phase includes p ocessing he labeled se o mo emen da a and gene a ing a classi ica ion ule o each mo emen as he esul . The aining we e ca ied ou using whole lea ning da a, gene a ing classi ica ion ule o each ype o mo emen . Tes phase we e conduc ed in wo s eps: o he se o da a ha we e p e iously included o gene a ing classi ica ion ule in aining phase; and o independen se o mo emen da a, ha we e no used o gene a ion o he classi ica ion ules. Accu acy was calcula ed as ollows: Tes da a is au oma ically labeled in o de o e alua e he ecogni ion accu acy o he es phase. V. ACCELERATION DATA Fo he cu en wo k was used a sma -phone wi h And oid OS and a a buil -in i-axial accele ome e . The accele ome e eco ds linea accele a ion in o ma ion along x, y, z axis ha is applied o a de ice i sel . Fig. 10. The coo dina e-sys em o he And oid-based mobile phone. I is de ined ela i e o he sc een o he phone in i s de aul o ien a ion. The axes a e no swapped when he de ice's sc een o ien a ion changes. When he mobile phone is placed in he up igh posi ion he y-axis accele a ion di ec ion e lec s he up and down body mo emen , o wa d mo emen was along he z-axis and side mo emen was assigned o he x-axis. In he expe imen pe o med in his esea ch, he mo emen da a collec ion he phone we e held in he hand while mo ing. Du ing collec ion he change o accele a ion was measu ed while he subjec was epea ing pos u es such as s anding, si ing, walking, alling, going ups ai s and downs ai s. The accele a ion da a was collec ed du ing a sho di ec ed ou ine pe o med by a pe son and was eco ded by a mobile phone 5 applica ion in a ex ile wi h co esponding i le in a ollowing o ma : ime-s amp, x accele a ion, y accele a ion, z accele a ion. The se o ins uc ions o da a collec ion can be summa ized as ollowing: 1. Selec mo emen ype. 2. P ess he bu on o s a he es ing. 3. Wai a ew seconds be o e he ecoding s a s. 4. Make he mo ion. 5. P ess s op o end eco ding. Di e en physical ac i i ies esul s in di e en pa e ns in da a p o ided by accele a ion senso s, and hus can be classi ied acco dingly. The example o ga he ed da a cap u ed by accele a ion senso s o e ime (samples) can be seen on he ollowing igu es: Fig. 11. The accele a ion alues o x, y, z di ec ion o each obse ed mo emen . Di e en ac i i ies has been placed on he igu es. As can be seen, he e is a signi ican di e ence in pa e n o accele a ion o di e en ac i i ies. Fo he pu pose o and in o de o emo e o emo e he dependence on phone sc een angle ga he ed da a was p ep ocessed by calcula ing in addi ion he angle o inclina ion wi h espec o he ho izon al plane o ga he ed da a. Da a p ocessing o aining da a was pe o med o fline, a e a eco ding had been comple ed. The esul o his was he classi ica ion o aining da a ha can be used la e in mobile applica ion in o de o classi y he new mo emen in eal- ime. VI. WINDOWING TECHNIQUES Mos classi ica ion me hods be o e p ocessing senso da a di ide he senso signal in o smalle ime segmen s by means o di e en windowing echniques. Then classi ica ion algo i hm is applied o each window da a sepa a ely. The in o ma ion hen combined in o de o gene a e an ac i i y p ofile o he whole signal. In ac i i y moni o ing h ee windowing echniques a e used: sliding windows, e en -defined windows and ac i i y- defined windows. In case o sliding widow he signal is di ided in o small windows o ixed leng h wi hou gaps be ween hem. As a a ia ion o sliding window exis o e lapping sliding widow app oach. Fig. 12. Example o sliding widow echnique: simple sliding window and o e lapping sliding window. This app oach doesn' equi e p ep ocessing o he senso signal and is e y simple in implemen a ion, hus can be used in eal- ime applica ions. Due o simplici y o his app oach i 's used by he mos o mo emen ecogni ion sys ems. In his wo k exac ly his app oach was used. In e en -defined app oach he signal is p ep ocessed in o de o loca e specific e en s as poin s o and de ined successi e windows. As e en s may no be uni o mly spaced in ime, he window size is no ixed. Fig. 13. Example o e en -defined widow echnique In case o ac i i y-defined windows he imes when ac i i ies changes is de e mined. These poin s de ine he de ini ion o senso da a in o windows, each o o which co espond o a di e en ac i i y. Fig. 14. Example o ac i i y-defined widow echnique VII. FEATURE SELECTION AND EXTRACTION Fo he pu pose o au oma ic classifica ion o accele a ion da a i should be p ep ocessed in o a subse o ea u e a iables wi h high in o ma ion con en . 6 S anding up mo 2.s a 3 *480c x y z 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341 361 381 401 421 441 461 481 -2 0 2 4 6 8 10 12 14 16 Si ing down mo 3.s a 3 *480c x y z 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341 361 381 401 421 441 461 481 -4 -2 0 2 4 6 8 10 12 14 Going ups ai s mo 4 3 *480c x y z 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341 361 381 401 421 441 461 481 -4 -2 0 2 4 6 8 10 12 14 16 Going downs ai s mo 5.s a 3 *480c x y z 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341 361 381 401 421 441 461 481 -4 -2 0 2 4 6 8 10 12 14 16 18 Walking mo 0.s a 3 *480c x y z 1 21 41 61 81 101 121 141 161 181 201 221 241 261 281 301 321 341 361 381 401 421 441 461 481 -4 -2 0 2 4 6 8 10 12 14 Fall mo 1 3 *96c x y z 1 5 9 13 17 21 25 29 33 37 41 45 4 9 53 57 61 65 69 73 77 81 85 8 9 93 97 -20 -15 -10 -5 0 5 10 15 20 In o de o mode a e apid and d ama ic change in ga he ed accele ome e alues a simple Kalman il e was implemen ed. The da a was p ocessed h ough il e be o e ex ac ion o he ea u es. The pa ame e s o he il e a e he ollowing: obse a ion H = 1, s a e ansi ion F = 1, noise co a iances Q = 5 and R = 5 , he con ol-inpu model B = 0 and ini ial co a iance = 0.1 Fig. 15. O iginal x-accele a ion and il e ed signal. The chosen pa ame e s o Kalman i e : H=1, F=1, R=5, Q=5, ini ial co a iance = 0.1. In addi ion o x, y and z accele ome e signals we e calcula ed a magni ude signal as ollows: Time domain ea u es a e ob ained di ec ly om accele ome e signals and usually ep esen s a is ical alues. In ime domain o each accele a ion and magni ude signals we e calcula ed: minimum and maximum alues, mean alues, s anda d de ia ion, co ela ion be ween axis, oo mean squa ed accele a ion, in e qua ile ange and ze o c ossings (numbe o sign changes in he segmen ). Fo equency domain ea u es ob ained om accele ome e da a ans o med in o he equency domain using a as Fou ie ans o m (FFT). The agg ega ed FFT signals and ene gy we e calcula ed in o de o cha ac e ize he spec al dis ibu ion. In he da ase , he accele a ion da a s eam om one mo emen was di ided using a sliding window app oach in o o e lapping ec angula windows 2.5 seconds each. O e each window a ec o o he p e iously desc ibed ea u es was calcula ed. The segmen a ion is done o all h ee accele a ion signals x, y, z. Fig. 16. Types o ea u es used in cu en s udy. The segmen s a his s age a e s ill ep esen ed as ime se ies. Then o each segmen one ea u e ec o is c ea ed ha consis s o all p e iously desc ibed ea u es. VIII. METHODS USED IN STUDY In his wo k we e used h ee me hods o classi ica ion in o de o speci y he mos sui able one o mo emen ecogni ion. A. K-Means Clus e ing Algo i hm K-means is a e y simple and as algo i hm o clus e ing da a. I compu es he geome ic cen e o samples belonging o he same ca ego y in aining se . The es sample is classi ied by inding he nea es cen e . I equi es e y li le esou ces o aining phase and hus is a possible candida e o a classi ica ion algo i hm ha can be used in a eal- ime mo emen ecogni ion sys em. In mo emen ecogni ion sys ems wi h wea able senso s K- means algo i hm mos ly used o il e ing o combining da a be o e p ocessing i h ough main classi ie . In [53] K-means algo i hm was used o ecognize ouch ges u e ypes in unsupe ised analysis. The o he s udy [54] used k-means o cons uc a comp essed da ase o he SVM classi ie in o de o educe edundan in o ma ion in he o iginal da a se . B. k-Nea es Neighbo s Classi ica ion The second algo i hm ha we e implemen ed in cu en s udy is k-Nea es Neighbo s classi ica ion. I is one o he mos well-known and widely used nonpa ame ic pa e n classifica ion me hods. The e a e wo basic p oblems ha a e ye o be esol ed by he esea ch communi y and can be iewed as se ious disad an ages. The i s issue is he selec ion o he bes numbe o neighbo s o conside . The second issue is he compu a ional and he s o age issue. The adi ional KNN algo i hm equi es he s o age o he whole aining se which may be an excessi e amoun o s o age o la ge da a se s and leads o a la ge compu a ion ime in he classifica ion s age. Despi e i s sho comings k-Nea es Neighbo s is one o he mos popula classi ica ion algo i hms as i 's simple in implemen a ion, e ec i e and as . C. AdaBoos Classifie The gene al idea o boos ing algo i hm is o y o build a “good” lea ning algo i hm based on a g oup o ”weak” classifie s. The one o he mos popula machine lea ning algo i hms AdaBoos was p oposed by F eund and Schapi e in 1995 [11]. As AdaBoos is an algo i hm ha wo ks unde supe ising, a aining se o da a has o be label p e iously. This labeled da a se should con ain bo h co ec samples labeled as “+1” and inco ec samples labeled as “ − 1.” One o he main ideas o he algo i hm is o main ain a dis ibu ion o se o weigh s o e he aining se . Fo each 7 Simple Kalman il e o iginal signal il e ed signal (R 5, Q 5) 1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 103 109 115 121 127 133 -1,0 -0,8 -0,6 -0,4 -0,2 0,0 0,2 0,4 0,6 0,8 1,0 example xi he weigh o his dis ibu ion is de ined. Ini ially, all weigh s a e se equally, bu on each ound, he weigh o inco ec ly classi ied examples inc eases and hus dec ease i s impac on he esul s ong classi ie . An indi idual weak classifie is simple and easy o implemen . I s classifica ion accu acy is ela i ely low. To imp o e accu acy a s ong classi ie is ob ained as a combina ion o weak classi ie s. The s ong classifie will ha e a highe classifica ion accu acy han each weak classifie . The implemen a ion o AdaBoos is simple and depends on choice o “weak” classi ie . As a weak classi ie in his wo k we use a simple h eshold-based classifica ion. The algo i hm o i is he ollowing: Gi en: Inpu sequence o N ea u e ec o s x(x1..xN), whe e each x∈Rd , numbe C o clus e s o pa i ion he da a se and maximum numbe o i e a ions T. 1. Fixed one o he ea u es. Selec and o de alues o a chosen ea u e in aining da ase . 2. Se h eshold. 3. Make hypo hesis o he co ec loca ion o he ea u e ega ding selec ed h eshold. 4. Find he h eshold ha p oduce minimum e o o he cu en ea u e unde ha assump ion. 5. Make in e se hypo hesis. 6. Selec he h eshold wi h minimum e o o he cu en ea u e. 7. Repea . The gene al algo i hm o AdaBoos is he ollowing [12]: A e ob aining he weak hypo hesis h AdaBoos chooses he pa ame e α . This pa ame e measu es he impo ance o hypo hesis. This alue is la ge he smalle is e o o he hypo hesis. The inal hypo hesis H is a weigh ed majo i y o e o he T weak hypo heses whe e a is he weigh assigned o h . The esul o unning AdaBoos o e aining da a is a se o h eshold o speci ic ea u es o each mo emen . To classi y es da a, o each example each hypo hesis is e i ied and he one wi h he minimum e o is selec ed. D. Gaussian Mix u e Models Gaussian Mix u e Models (GMMs) a e pa ame ic ep esen a ion o p obabili y densi y unc ions, based on a weigh ed sum o mul i a ia e Gaussian dis ibu ion. The Gaussian classi ie p oduces a mix u e o class-condi ional p obabili y densi y p(x|λi) o each class λi unde assump ion ha i has a a Gaussian dis ibu ion. Each clus e o aining da a is in e p e ed as a hype plane in a high dimensional space and is modeled as a GMM wi h speci ic pa ame e s. The aim o clus e ing is o ob ain pa ame e s o he clus e hype planes ha maximize a likelihood unc ion o da a membe ships. GMM pa ame e s a e es ima ed om aining da a using he i e a i e Expec a ion-Maximiza ion (EM) algo i hm. A Gaussian mix u e model is a weigh ed sum o M componen Gaussian densi ies as gi en by he equa ion, whe e x is a D-dimensional con inuous- alued da a ec o (i.e. ea u es), wi, i = 1 … M, a e he mix u e weigh s (mixing coe icien s), and g(x|µi, Σi), i = 1 … M, a e he componen Gaussian densi ies. Each componen densi y is a D- a ia e Gaussian unc ion o he o m, wi h mean ec o µi and co a iance ma ix Σi. The mix u e weigh s sa is y he cons ain ha The comple e Gaussian mix u e model is pa ame ized by he mean ec o s, co a iance ma ices and mix u e weigh s om all componen densi ies. These pa ame e s a e collec i ely ep esen ed by he no a ion, The example o he GMM is shown on he ollowing igu e. Fig. 17. Types o Gaussian Mix u e Models. 8 The co a iance ma ices, Σi, can be ull ank o cons ained o be diagonal. The choice o model configu a ion (numbe o componen s, ull o diagonal co a iance ma ices, and pa ame e ying) is o en de e mined by he amoun o da a a ailable o es ima ing he GMM pa ame e s and how he GMM is used in a pa icula biome ic applica ion. Acco ding o [10] because he componen Gaussian a e ac ing oge he o model he o e all ea u e densi y, ull co a iance ma ices a e no necessa y e en i he ea u es a e no s a is ically independen . The linea combina ion o diagonal co a iance basis Gaussians is capable o modeling he co ela ions be ween ea u e ec o elemen s. The e ec o using a se o M ull co a iance ma ix Gaussians can be equally ob ained by using a la ge se o diagonal co a iance Gaussians. The algo i hm implemen ed in cu en wo k a e he ollowing: Gi en: Inpu sequence o N ea u e ec o s x(x1..xN), whe e each x∈Rd , numbe C o clus e s o pa i ion he da a se , numbe K o Gaussians o each clus e and he maximum numbe o i e a ions T. 1. C = 0; 2. Ini ialize i e a ion = 0: Ini ialize Gaussian pa ame e s: means µi (ob ained om da a by unning K-means o e i ), co a iances Σi and wi =1/N o i =1...N. One o each Gaussian k. 3. E s ep. Fo each poin xi de e mine i s assignmen sco e o each Gaussian k: γ(znk) is called a “ esponsibili y”: how much is his Gaussian k esponsible o his poin xi 4. M s ep. Gi en sco es, adjus µi , wi, Σi o each Gaussian k. Mean o Gaussian k: Co a iance ma ix o Gaussian k: Mixing Coe icien (weigh s) o Gaussian k: 5. E alua e log likelihood. I likelihood o pa ame e s con e ge, s op. Else go o S ep 3 (E s ep). 6. Nex clus e C. The idea is o un a back-end EM-Gaussian classi ie o e da a o each speci ied mo emen . The ini ial pa ame e o each GMM was ob ained om K-means algo i hm. The esul o he classi ica ion is a se o GMMs ha desc ibe each class. Then his se o GMMs is used o ecogni ion o mo emen s. Fo each example in gi en es da a a likelihood unc ion o each ype o mo emen is calcula ed and he class ha p o ide a maximum likelihood is selec ed. IX. TEST RESULTS In cu en s udy each o he selec ed classi ica ion algo i hms was de eloped and es ed in he Ne Beans IDE 7.1.2 en i onmen , Ja a 1.6 pla o m and Windows 7 ope a ing sys em. Tes s we e made o he eaching and he ecogni ion phase sepa a ely. On mobile pla o ms And oid 4.1 he so wa e was de eloped in o de o ga he da a o obse ed mo emen s and es he esul s. The e we e obse ed six ypes o basic mo emen s, such as: walking, alling, s anding up, si ing down, going ups ai s and going downs ai s. T aining da a consis ed o iles wi h s o ed accele ome e in o ma ion o each obse ed mo emen . Tes da a consis ed o wo se s: da a ha we e included in aining se and da a ha wasn' used du ing aining phase espec i ely. The es s we e conduc ed o ea u es ob ained om o iginal da a and om il e ed da a. As il e was used simple Kalman il e desc ibed p e iously in VII pa . The esul agg ega ed accu acy o each classi ica ion algo i hm is p esen ed in he Tables I, II, III. He e K-means algo i hm was es ed in wo modes: o each es ed sample sepa a ely and o all es ed samples aken oge he . KNN algo i hm was es ed o di e en pa ame e o neighbo s aken in o accoun . And GMM algo i hm was es ed wi h se en ini ial numbe o Gaussians in he model. TABLE I ACCURACY OF CLASSIFICATION ALGORITHMS FOR ALL FEATURES 9 Algo i hm All ea u es Wi hou Kalman il e Wi h Kalman il e K-Means 0,37 0,53 0,29 0,48 K-Means All 0,38 0,54 0,3 0,49 KNN5 0,66 0,86 0,66 0,8 KNN9 0,68 0,73 0,64 0,77 KNN11 0,74 0,75 0,66 0,77 AdaBoos 0,72 0,9 0,83 0,88 GMM5 0,2 0,44 0,38 0,51 GMM9 0,44 0,64 0,42 0,6 GMM11 0,46 0,66 0,42 0,64 GMM13 0,35 0,44 0,55 0,62 GMM17 0,5 0,53 0,09 0,1 GMM19 0,18 0,06 0,4 0,4 GMM23 0,44 0,48 0,25 0,28 Accu acy o es iles excluded om aining Accu acy o es iles included in aining Accu acy o es iles excluded om aining Accu acy o es iles included in aining