Usng a Wavelet Representaton for Classfcaton of Movement n Bed Adrana Morell Adam Depto. de Matemátca e Estatístca Unversdade de Caxas do Sul Caxas do Sul RS E-mal: amorell@ucs.br André Gustavo Adam Depto. de Informátca Unversdade de Caxas do Sul Caxas do Sul RS E-mal: agadam@ucs.br Sleep s a basc necessty of lfe that s very mportant to our health. Gettng enough contnuous qualty sleep contrbutes to how we perform the next day and also has an mpact on the overall qualty of our lfe. Body movements are generally used as an ndcator of sleep qualty and depth [9]. Durng sleep major changes n motor actvty depend on the sleep state [ 9]. Low motor actvty levels and prolonged epsodes of unnterrupted mmoblty are assocated wth ncreasng sleep depth whereas hgh actvty levels are related to ntermttent wakefulness durng sleep and arousals are often assocated wth movement [5]. Therefore ncreased moblty n bed can be a sgn of dsrupted sleep because t s assocated wth arousals that may reduce sleep qualty. In addton movement n bed may tself be an ndcator of health problems.e. changes n the pattern or amount of motor actvty can be a dsease marker [ 9]. There are also motor dsturbances that are trggered by sleep such as restless legs syndrome (RLS) and perodc lmb movements durng sleep (PLMS). Patents wth restless leg syndrome report feelngs of dscomfort n the legs and they feel compelled to move to relef the dscomfort [6]. Such symptoms dsrupt sleep and cause daytme tredness and sleepness.. Assessment of Moblty n Bed The assessment of moblty n bed durng sleep s based on understandng of the nature of the movements. The exstng metrcs used for assessment nclude the type of movement frequency and duraton. It s tradtonally performed by obtanng nformaton about the nature of the movements from the patent overnght polysomnograph recordng through vdeopolysomnography (VPSG) or actgraphy. Informaton provded by the patent suffers from subjectvty and t s known to be unrelable. VPSG combnes the tradtonal PSG recordng (contnuous recordngs of physologcal measures such as bran waves electrcal actvty of muscles and eye movement) wth smultaneous audovsual montorng. It s a costly and labor-ntensve technology that nvolves a full nght s stay n a sleep laboratory and therefore t can be very dsruptve and very dfferent than sleepng at home. Actgraphs are actvty montors (accelerometers) that can be attached to a person s leg ankle or feet to assess nocturnal actvty []. The patent has to wear the advce when gong to bed and have to keep records of bedtmes and getup tmes as well as tmes out of bed durng the nght (the devce cannot dfferentate between tmes n bed from out of bed). Snce the conventonal methods are costly or ntrusve researchers have been studyng dfferent approaches to assess moblty n bed. One approach that have been studed s the use of mattresses nstrumented wth sensor pads [ 3 ]. The advantage of ths approach s that the patent does not have to wear a specal devce nor sleep n a dfferent and strange place. Despte of such advantages most of the work s focused on the detecton of movements. Gven the advantages of nstrumentng a bed wth sensors we propose the use of load cells under the bed (one cell each at each corner) to detect and classfy movements. The well-proven load cell technology based on stran gauge sensors provdes stable and relable data and therefore t s a practcal soluton for longterm montorng. Ths paper focuses on the algorthm for the classfcaton of the type of movement usng a pattern recognton approach. A
feature representaton based on temporal decomposton of the load cell sgnals s nvestgated wth features extracted usng wavelet-based multresoluton analyss (MRA). We use Gaussan Mxture Models (GMMs) to represent each class of movement and to capture the subject-dependent feature dstrbuton. It s assumed that the tme ntervals when a movement n bed occurs are known a pror through an automatc movement detecton system (a detaled descrpton of such system can be found n []).. Movement Classfcaton Approach The problem of movement classfcaton conssts of determnng the type of movement performed n a gven tme nterval. Dfferent movement descrptons have been suggested to analyze the dstrbuton of movements durng sleep [ 9]. Accordngly n ths work movements n bed are dvded nto 3 classes: Class - major posture shfts: changes n body poston that nvolve a torso rotaton larger than 5 degrees. These movements may represent movements related to gettng nto or out of bed or large movements assocated wth wakefulness. Class - small and medum ampltude movements that may represent restlessness or poston changes assocated wth NREM sleep stage I. Class 3 - leg movements: solated movement of lower lmbs (thghs legs and feet). These movements can be assocated wth PLMS or RLS. The movement classfcaton approach can be dvded nto four steps. Frst durng pre-processng the sgnals from the load cells are converted nto the trajectores of the center of mass of the body. Second a feature representaton of the trajectores s estmated usng wavelet MRA. Thrd snce a large feature set s produced by the wavelet analyss a feature subset selecton method s used to reduce the feature set dmensonalty. Fnally a model for each subject s estmated usng the reduced feature set. GMMs are used to model each class of movement and to capture the subject-dependent feature dstrbuton. Detals about the steps nvolved n our approach are descrbed next. A. Pre-processng Although our approach s subjectdependent the attempt s to use features that would be as much as possble ndependent of the subjects heght and weght. We therefore represent the raw load cell sgnal by the trajectory of the body center of mass n terms of the coordnates x CM and y CM of the body center of mass at a gven tme t accordng to the followng equatons: () [ w ( t) w ( t )] + [ w3 () t w3 ( t )] x CM t = xmax w t w t y CM () t ( () ( )) = [ w ( t) w ( t )] + [ w () t w ( t )] 3 3 = ymax ( w () t w ( t )) = The constant terms t w 3 t and w correspond to the proporton of the ( ) w ( ) ( ) t bed weght measured by corners 3 and at tme t just before the person goes to bed. x max and y max represent respectvely the length and wdth of the bed. B. Feature Extracton The classfcaton of each movement s concentrated around a gven tme nterval [t t ] that defnes the start and end of the movement. Snce dfferent movements can have dfferent duratons the dscrete wavelet transformaton cannot be appled drectly on the nterval [t t ] because the wavelet analyss produces dfferent number of coeffcents for sgnals wth dfferent duratons. The transformaton s appled over a fxed-length nterval contanng most of the ntensty of the movement. The ntensty of a movement refers here to the effort made to make a certan movement. For each movement the algorthm frst fnds a segment S of length T n seconds whch corresponds to the nterval where the ntensty of the movement s the largest. The wavelet transformaton s then appled to the sgnals x CM and y CM only over the nterval defned by S. Many successful applcatons of the wavelet transform n pattern classfcaton problems have been reported [6 7]. Englehart [6] uses a wavelet packet based feature set for T
dscrmnaton of four classes of upper lmb motons from two-channel myoelectrc sgnals. Let w be the functon that represents the load cells sgnal for a gven movement defned over a tme nterval [t t ] for = 3. The segmentaton conssts of the followng steps:. Compute the square dfferences for each load cell sgnal at tme t as follows: SD t) = w ( t) w t t t t ( ( )) ( where w (t ) s the load cell sgnal measured at prevous samplng tme. The square dfferences are used to capture the ntensty of a movement because the magntude of the changes n the sgnals s related to the force appled at each tme t.. Compute the sum of the square dfferences across all load cell sgnals at tme t as follows: SSD( t) = SD ( t) t t t. = 3. Estmate a segment of length T that s centered at tme nstant t C whch corresponds to the t-coordnate of the centrod of the regon below SSD on the nterval [t t ]. The x-coordnate of the centrod of a regon bounded by two curves f(x) and g(x) on the nterval [a b] s gven by x b a = b ( f ( x) g( x) ) ( f ( x) g( x) ) a x dx dx In ths case the t-coordnate of the centrod of the regon below SSD corresponds to t C = t t= t t t= t tssd( t) SSD( t) t. t C t. The segment S s thus defned over the nterval T T t t +. () C C Fgure shows an example of the computaton of the segment S for a class- movement. The load cell sgnals w n pounds for = 3 are shown n the top plot and the correspondent square dfferences SD are shown n the mddle plot. The sum of the square dfferences across all load cell sgnals SSD s shown n the bottom plot where the vertcal dotted lnes represent the nterval n Equaton () wth length T = 3 seconds and the sold vertcal lne shows the poston of the center of the segment t C. The sgnals x CM and y CM from the segment S are then decomposed usng the Dscrete Wavelet Transform (DWT) wth J levels of decomposton []. The dscrete wavelet transform can be thought of as a judcous subsamplng of the contnuous wavelet transform n whch t deals wth just dyadc scales j j = 3. The contnuous wavelet transform (CWT) s defned as follows: Ψ ( a τ) = x( t) ψ t dt ( a τ () ) As seen n Equaton () the CWT decomposes a sgnal n the tme doman nto a two-dmensonal functon n the tme-scale plane (aτ). The wavelet coeffcent Ψ(aτ) measures the tme-frequency content n a sgnal ndexed by the scale parameter a and the translaton parameter τ that ndcates the translaton n tme. The wavelet analyss s a measure of smlarty between the bass functon ψ aτ and the sgnal tself. Here the smlarty s n the sense of smlar frequency content. The wavelet bass functonψ aτ s also known as the mother wavelet. From each decomposed sgnal the followng set of features s extracted: The energy of the detals coeffcents at the frst decomposton level E : ths feature has been chosen to capture the energy dstrbuton of the hgh frequency components of the movements. The energy of the detal coeffcents at the frst level s estmated by E J = D n n= where J / s the number of elements n the vector D for a sgnal wth length J. In ths case J corresponds to the segment length T. The wavelet detal coeffcents vectors for the remanng levels D j for j = 3 J : the coeffcents correspondng to the slower varyng components of the movements. Gven that the trajectory of the center of mass sgnal s sampled at Hz the detal
w lbs 6 8 w w w 3 w 3 5 6 SD 8 6 SD SD SD 3 SD 3 5 6 5 SSD 5 3 5 6 Tme (secs) Fgure : Load cell sgnals w n pounds (top) and square dfferences SD (mddle) for = 3 durng a class- movement. Correspondent SSD s shown n the bottom plot. Vertcal dotted lnes n the bottom plot show the boundares of the segment S wth length T = 3 seconds and the sold vertcal lne shows the center of the segment located at t C. coeffcents n the frst level D represent the sgnal n the approxmately.5-5 Hz range D n the range.5-.5 Hz D 3 n the.65-.5 Hz range and so on. After that features from each sgnal are concatenated nto a sngle feature vector to form a hgh-dmensonal vector. C. Feature Subset Selecton The goal of the feature selecton step s to reduce the number of features by selectng the best subset of the orgnal feature set accordng to some crteron. Our approach uses the classfcaton rate calculated on the tranng data as the selecton crteron. The tranng data are splt nto n approxmately equally szed parttons and for a gven subset of features the statstcal model s estmated usng n- parttons and the remanng partton s used as test set. The classfcaton results from each of the n runs (n s equal to 3 n ths case) are summed to produce the estmated classfcaton rate. The Sequental Forward Selecton (SFS) s the algorthm used as the search method [5]. D. Parameters Optmzaton The selecton of the feature subset depends on the choce of the segment length T the wavelet mother ψ and the number of decomposton levels J. Snce the feature selecton s performed n conjuncton wth the classfer the choce of the fnal subset also depends on the number of mxture components of the GMMs M and the feature subset dmenson. The dmenson of the feature subset s defned last based on the performances resultng from the optmzed parameter values of T ψ J and M. The parameters optmzaton s performed through a restrcted search of the parameter space accordng to the parameter values defned by data analyss and by restrctons of the classfer. The optmal values were found to be: T = 8 seconds the wavelet mother ψ s db6 J = 5 and M =. E. Statstcal Modelng Lkelhood Estmaton and Decson We use GMMs to represent each class of movement and to capture the subject-
dependent feature dstrbuton. A Gaussan mxture model descrbes the probablty dstrbuton of a gven data set as a lnear combnaton of several Gaussan denstes [5]. A lnear combnaton of Gaussan bass functons s capable of formng smooth approxmatons of arbtrarly shaped denstes. GMMs have been used successfully for smlar problems such as the task of dscrmnatng sx classes of lmb motons from myoelectrc sgnals [8]. In ths model each d-dmensonal random vector x s assumed to be drawn ndependently from a mxture densty gven by the equaton p M ( xθ ) = ϖ p ( xµ Σ ) ϖ ϖ = and M = ϖ = where defnes the mxng weght of the th Gaussan component (for all = M) wth mean and covarance Σ gven by µ ( x µ ) ( ) ( ) Σ x µ p x µ = Σ e d ( π) Σ where Θ = { ϖ K ϖm µ K µ M Σ K ΣM } represents the mxture densty parameters whch are estmated usng the expectaton maxmzaton algorthm [5]. In the lkelhood estmaton and decson step the lkelhood of each class s estmated and a class label s assgned based on the maxmum lkelhood decson rule cˆ = arg max p( x c ). k c k k 3. Results In ths secton we present the classfcaton performance of our approach. Pror to presentng the performance results we present detals about the subjects sensors data collecton and preparaton as well as the performance measure. A. Subjects and Data Collecton Ffteen adults (7 men and 8 women) years or older (ages to 5 years mean age 3. ± 6.7 years old) wth no moblty problems partcpated n the study. Data were collected n the laboratory and the subjects were awake durng the experment. Because of that data were collected usng two dfferent protocols free movement and fxed movement to allow both dversty and unformty of movements. In the free movement protocol each subject was asked to le n bed and freely move tmes. Subjects were nstructed to move accordngly to the types of movements typcally seen durng sleep. In the fxed movement protocol each subject performed 5 trals composed of predefned movements based on the movement classes defned. B. Sensors Data from load cells nstalled under the bed at each corner of a bed were collected at Hz. Snce ths work only ncluded assessment of voluntary movements whch rarely exceeds 3- Hz [3] the sgnal was further downsampled to Hz. C. Assessment of Actual Movements We used a vdeo technque as the ground truth for ths experment. A camera was mounted on the celng m above the bed to record mages of the whole bed. Images were recorded at a rate of frames per second smultaneously wth the load cells for offlne analyss. To allow a quanttatve measure of body movement usng vdeo subjects wore cloth bands of dfferent colors on the head arms legs and torso. The actual movement ntervals were estmated by trackng the trajectores of the cloth bands usng the template matchng technque [5]. D. Data Preparaton The classfcaton approach s evaluated ndvdually for each of the 5 subjects. For each subject movement data from the trals are randomly splt nto sets: tranng (3/5 of the dataset) and testng (/5 of the dataset). The classfer s desgned usng the tranng set and the performance s evaluated on the test set. The tranng data contan a total of 7 movements and the testng data contan 7 movements. E. Performance Measure The performance measure used n ths work s the classfcaton rate across all subjects whch s the proporton of test samples from all subjects that are correctly
classfed. The classfcaton rate across all subjects s used because we want to measure the overall performance of the classfer ndependently of the subject. The classfer performance s reported based on knowledge of the true movement ntervals. F. Results from Optmal Parameter Values The best classfcaton performance on the tranng data s obtanng usng a feature subset wth 6 dmensons. The performance for a 6-dmensonal feature subset s 9.9% and the addton of features beyond 6 dmensons does not mprove the performance. The performance on the test data s 8.% and the correspondent confuson matrx s presented n Table. True Estmated Large Medum Legs Large 3 8 7 Medum 8 386 9 Legs 53 3 Table : Confuson matrx for the wavelet-based representaton for the 3-class classfcaton problem: large medum and leg movements. An analyss of the selected features for each subject shows that the energy of the detals coeffcents at the frst decomposton level of y CM appears at the top 3 best features for 6% of the subjects. Such feature represents the hgh-frequency components of the movement along the y-drecton (sde to sde of the bed). Thus how the movement s performed along the y-axs s mportant for dscrmnatng the type of movement. Another smlarty observed across subjects s that the wavelet coeffcents that correspond to the extremtes or the mddle of the decomposed segment are commonly selected for classfcaton. Gven that a long segment (8 seconds) was chosen and class and 3 are on average seconds long ths mples that those coeffcents are beng selected because they can dscrmnate class from class -3 movements just by usng the nformaton at the extremtes of the segments. However the long segment does not contan suffcent nformaton n the extremtes to better dscrmnate between class- and class-3 movements. Therefore we can speculate that the coeffcents from the mddle of the segment are selected to mnmze the confuson between class and class 3.. Conclusons and Future Work We descrbed an approach for classfcaton of the type of movement usng load cells nstalled under a bed. Movements n bed were classfed accordng to the followng classes: major posture shfts medum ampltude movements and leg movements. The dstrbuton of the feature vectors extracted from a person s movement data was modeled by GMMs. The features extracted usng wavelet-based multresoluton analyss explored the fact that a movement can be decomposable nto a seres of smaller movements wth dfferent ntensty. Snce the number of wavelet coeffcents vares wth the length of a sgnal and each detected movement sgnal has a specfc duraton the dscrete wavelet transformaton s appled only over a fxedlength nterval contanng most of the ntensty of the movement. Tme-frequency representatons have relatvely hgh dmenson whch requred the use of a feature subset selecton technque to reduce the dmensonalty of the orgnal feature vector. The technque used n ths work was the sequental forward selecton algorthm. The classfcaton rate calculated on the tranng data was used as the selecton crteron. The classfcaton approach was evaluated usng data from a small set of healthy subjects under controlled laboratory condtons. The overall classfcaton rate on the test data for a 6-dmensonal feature vector s 8.%. As future work data collected n realstc settngs from a wder range of subjects must be collected to evaluate the proposed approach. In addton snce only voluntary movements were used for evaluaton an extenson of ths work s to study how the system can be mproved to detect abnormal movements durng sleep perods. One of the aspects that could most beneft from further study s to dfferentate RLS and PLMS patents from controls.
References [] S. T. Aaronson S. Rashed M. P. Bber and A. Hobson Bran State and Body Poston Archves of General Psychatry 39 33-335 (98). [] A. M. Adam Assessment and Classfcaton of Movements n Bed Usng Unobtrusve Sensors (Ph.D. thess Oregon Health & Scence Unversty 6) pp. 53. [3] S. Ancol-Israel R. Cole C. Aless M. Chambers W. Moorcroft and C. P. Pollak The Role of Actgraphy n the Study of Sleep and Crcadan Rhythms Sleep 6 3 3-39 (3). [] S. Chokroverty W. A. Henng and A. S. Walters Sleep and Movement Dsorders Frst ed. Phladelpha PA: Elsever Scence 3. [5] R. O. Duda P. E. Hart and D. G. Stork Pattern Classfcaton Second ed. New York NY: John Wley & Sons Inc.. [6] K. Englehart Sgnal Representaton for Classfcaton of the Transent Myoelectrc Sgnal (Ph.D. thess Unversty of New Brunswck 998) pp. 36. [7] T. Ganchev M. Safarkas and N. Fakotaks Speaker Verfcaton Based on Wavelet Packets n Proceedngs of 7th Internatonal Conference on Text Speech and Dalogue) pp. 99-36 [8] Y. Huang K. B. Englehart B. Hudgns and A. Chan A Gaussan Mxture Model Based Classfcaton Scheme for Myoelectrc Control of Powered Upper Lmb Prostheses IEEE Transactons on Bomedcal Engneerng 5 8-8 (5). Congress on Sleep Research (Szeged Hungary) pp. 3-3 986 [] D. B. Percval and A. T. Walden Wavelets Methods for Tme Seres Analyss Frst ed. Cambrdge UK: Cambrdge Unversty Press. [] T. Rachwalsk S. Irvne J. W. T. Steeper D. R. Inkster and C. Wells Poor Qualty of Sleep s a Precursor of Moblty-Related Adverse Events n Proceedngs of Evdence-based strateges for Patent Falls and Wanderng (Clearwater FL) pp. NA 5 [] A. Sadeh and C. Acebo The Role of Actgraphy n Sleep Medcne Sleep Medcne Revews 6 3- (). [3] T. Tamura J. Zhou H. Mzukam and T. Togawa A System for Montorng Temperature Dstrbuton n Bed and Its Applcaton to the Assessment of Body Movement Physologcal Measurements 33- (993). [] H. F. M. Van der Loos N. Ullrch and H. Kobayash Development of Sensate and Robotc Bed Technologes for Vtal Sgns Montorng and Sleep Qualty Improvement Autonomous Robots 5 67-79 (3). [5] J. J. van Hlten H. A. M. Mddelkoop E. A. M. Braat E. A. v. d. Velde G. A. Kerkhof G. J. Lghart A. Wauquer and H. A. C. Kamphusen Nocturnal Actvty and Immoblty across Agng (5-98 Years) n Healthy Persons Journal of the Amercan Geratrcs Socety 837-8 (993). [6] A. S. Walters Toward a Better Defnton of the Restless Legs Syndrome Movement Dsorders 5 63-6 (995). [9] A. Muzet Dynamcs of Body Movements n Normal Sleep n Proceedngs of Eghth European