1. Trang chủ
  2. » Luận Văn - Báo Cáo

The development of a classification system for moniitoring physical activity using a miniaturized 3 axis accelerometer

81 11 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 81
Dung lượng 1,61 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

The developed system have given encouraging results with a 100% success rate of classification of the three basic classes of activities, and a 84% success rate for the lower level of dif

Trang 1

MASTER THESIS

The development of a classification system for monitoring physical activity using a miniaturized 3-axis accelerometer

Hanh Ngoc Dang

This work has been carried out at Institute of Micro and Nano Systems Technology,

under the supervision of

Dr Erik A Johannessen, Vestfold University College Prof Lars Hoff, Vestfold University College

Dr Nourddine Bouhmala, Vestfold University College

Dr Erik Årsand, Norwegian Center for Telemedicine

Horten, 25 May 2012

Trang 2

A miniaturized ambulatory motion detection system that aims to record the different levels of activity from a person has been developed The aim of this study was to construct a novel k-means based classification algorithm that was able to interpret signals generated from a standard 3-axis silicon accelerometer and to translate these signals into a recognizable cluster of pre-defined activities

The system has focused on identifying three basic classes of activities based on resting, walking and running These have been extended to lower level sub-classes such as different postures of resting (lying, sitting and standing), different pace of walking (slow, moderate, fast, up and down stairs) and running (jogging, slow, moderate and full speed)

The developed system have given encouraging results with a 100% success rate of classification of the three basic classes of activities, and a 84% success rate for the lower level of different pace of walking and running It also showed that different postures of resting as well as walking forward and walking up and down stairs can be distinguished with an accuracy of 90%

The potential extension towards self monitoring systems for people suffering from diabetes mellitus has been considered by converting the activities into metabolic equivalents that will help predict the associated energy expenditure By calculating the energy consumption over a given time interval, the motion detection system could

be used as a supplementary tool that help predicts the glucose level as a function of energy intake and energy spent

Trang 3

I would like to thank my supervisors, Erik Johannessen, Lars Hoff, and Nourddine Bouhmala for your support, advices and inspiration Further I would also like thank Eirik Årsand at the Norwegian Centre for Telemedicine, for valuable input on the potential application side

I did also appreciate the support of the five people who participated in the experiment

of collecting data for our project I want to say thank you to all of them

Finally I also have to thank my family and my boyfriend for being with me through all this tough time

Trang 4

 

a acceleration

ANN artificial neural networks

ASK Amplitude-shift keying

BG blood glucose

BMR Basal metabolic rate

corr cross-axis correlation

GFSK Gaussian Frequency-Shift Keying

GPS Global Positioning System

MEMS micro-electromechanical systems

MET Metabolic equivalent of a task

RMR resting metabolic rate

SPI synchronous peripheral interface

SMA signal-magnitude area

SNR signal-to-noise ratio

SSE error Sum of Square

SVM support vector machines

SVs support vectors

TA, θ tilt angle

USCI universal serial communication interface

v velocity

Trang 5

 

Abstract 1 

Preface 2 

Abbreviations 3 

Contents 4 

1.  Introduction 6 

1.1  Motion detectors 7 

1.2  Signal analysis 9 

1.3  Energy expenditure 11 

1.4  Summary 13 

2.  Instrumentation 14 

2.1  Technology Solution 14 

2.1.1  Sensors – 3‐axis CMA 3000‐D01 14 

2.1.2  Microcontroller ‐ CC430F6137IRGC 16 

2.1.3  Wireless Communication ‐ CC1101 sub‐1‐GHz 16 

2.1.4  Power supply 17 

2.1.5  Computer and Software 17 

2.2  Proposed prototype 18 

2.2.1  Development Platform 18 

2.2.2  Proposed prototype 18 

3.  Materials and Methods 21 

3.1  Motion classifier 21 

3.2  Pre‐processing 22 

3.2.1  Calibration protocol 22 

3.2.2  Noise reduction 23 

3.2.3  Features Extraction 23 

3.3  Classification Algorithm 29 

3.3.1  K‐nearest neighbour 29 

3.3.2  Enhanced K‐means clustering 30 

3.4  Estimation of Energy Consumption 31 

3.5  Experimental protocol 32 

3.6  Matlab Routine 35 

Trang 6

4.  Results 37 

4.1  Pre‐processing 37 

4.1.1  Signals collection 37 

4.1.2  Calibration step 37 

4.1.3  Noise reduction results 38 

4.1.4  Features extraction results 39 

4.2  Classification of motion 42 

4.2.1  Trial system‐ classify 3 classes of activities 42 

4.2.2  Trial system 2‐classify different pace of walking and running 45 

4.2.3  Trial system 3‐classify different postures of resting 49 

4.2.4  Trial system 4 ‐distinguish walk up/down stairs from walk straight forward 52 

4.3  Estimated Energy Consumption 54 

5.  Discussions 56 

5.1  Results versus Objectives 56 

5.2  Limitation of the device 56 

5.3  Limitations of the system 57 

5.4  Limitation of the MET model 59 

5.5  Comparison to prior art/literature 59 

5.6  Future prospects 60 

5.6.1  Extend the range of activities 60 

5.6.2  Free‐living performance test 60 

5.6.3  Sensor signals 60 

5.6.4  Improve the algorithm 61 

5.6.5  Packaging and assembly 61 

5.6.6  Implementation into an electronic diabetes diary 62 

6.  Conclusions 63 

References 64 

Appendix A.  Matlab code 68 

A.1  Load waveform signals into Matlab 68 

A.2  Calibration step 69 

A.3  Pre‐processing 69 

A.4  Features extraction 70 

A.5  Trial System 1 74 

A.6  Trial System 2, 3 and 4 76 

Trang 7

1 Introduction  

Motivation: Lifestyle related chronical diseases have in part been related to the lack

of physical activity from which our bodies were originally designed to endure The combination with unhealthy diets is further corroborating to the global burden of disease, death and disability Combating lifestyle related diseases have been based on both diet and exercise, in which the latter have focused on step counters, pedometers and heart rate sensors as a tool of self-monitoring However, the technology holds the potential for future integration together with other sensor technologies as part of a therapeutic regime MEMS and BioMEMS have a prerogative for miniaturisation and automation to such an extent that it can be integrated in wearable devices based on watches and ultimately miniaturised implantable sensor systems

A target user group is the growing number of people suffering from diabetes mellitus

in which physical activity is paramount of maintaining a healthy glycaemic control that reduce long term detrimental effects, as well as preventing the onset of the disease in people diagnosed with prediabetes and impaired glucose tolerance Diabetes is a metabolic disorder that results in abnormally elevated or suppressed blood glucose (BG) values due to the inability or reduced ability of the body to

metabolize glucose Diabetes is classified into Type 1 which is affecting 5-10% of the

diabetic population as well as 1 in 500 children under the age of 18 [1] The autoimmune destruction of the β-cell of the pancreas [2], result in insulin not being produced This type of diabetes require frequent daily monitoring of the BG level as

well as daily injections of insulin Type 2 is the most common type of diabetes which

affects around 90- 95% of the diabetic population This type is characterized by insulin production still being sustained, but where the hormone has either lost its ability to regulate BG or that its production has become too low Quite often are both conditions present at the same time [3] The development of the Type 2 condition is governed by genetic factors, ethics, overweight, decreased physical activity, an aging population and diet [4]

Therapeutic regimes that treats diabetes aims to maintain a constant level of BG that targets the level in healthy subjects of approximately 90 mg/dl (5 mM) This is achieved by taking frequent measurements with an external blood glucose monitor that samples a drop of blood from the fingertip Insulin is used to reduce an elevated level of BG (hyperglycemia) which is a result of nutritional intake, whereas extra sugar (nutritional) intake is used to raise the BG if the level is found to be too low (hypoglycaemia) However, in order to avoid the occurrence of hyper- and hypoglycaemic events, a functional therapeutic regime would need to predict a potential rise or fall in BG before it actually occurs

Hypothesis: Although diet plays an important role in maintaining stable levels of BG,

physical activity has the added benefit of preventing an unwanted rise in BG by burning off excess glucose available in the blood stream By monitoring physical activity one can seek to estimate the energy consumption per unit mass at a given time This instant energy consumption can be integrated over a desired time interval that relates the consumption with the energy intake This represents a powerful tool that may enable a prediction of the current BG value as well as illustrating potential trends of this BG value is rising or falling if the current level of activity is maintained

Trang 8

Problem: Single 1-axis step counters will only provide static information of an

estimated distance and are unable to distinguish if you have been running, walking or cycling this distance More sophisticated motion detectors that are able to distinguish between different classes of activities in real time would provide a much more comprehensive picture of the activity which can be related to a given energy consumption The therapeutic effect of the motion detector will only be effective if this device can be integrated with a system that also monitors the nutritional intake and performs direct measurements of the BG as control Hence the motion detector should be ultra compact and portable in nature in order to enable this integration Current standard MEMS based motion sensors from the silicon microfabrication industry have size constraints in the mm regime and could be potential low cost candidates for such a device

Aim: The aim of this project is to investigate if motion data from a standard 3-axis

accelerometer may form the basis for a simple classification algorithm that is able to

distinguish between a number of preset classes of activities such as standing, walking

and running, and thereby extending the range of activities compared to that achieved

in prior art After performing the initial classification, the algorithm will attempt

grading these activities from e.g slow, normal and brisk walk/run, and walking

up/down stairs and different postures of resting The different classes of activity will

be related to a preset value of energy consumption per unit weight By adding the

body weight of the person, the total work (energy consumption) related to a series of activities within a given time frame will be presented as the final output The project will seek to (i) integrate the components of the application protocol into a suitable

package, and (ii) translate the data from the accelerometer using an algorithm calibrations to prevent sensor-drift induced errors will be performed before using the

Re-device The project builds on existing activities in biomedical microsystems at Vestfold University College (HVE) and in physical activity monitoring for people with diabetes at Norwegian Centre for Telemedicine (NST)

1.1 Motion detectors 

This project will target a miniaturised motion detector suitable for integration with related sensor applications such as blood glucose monitoring and dietary intake as support of a therapeutic regime The evolution of motion detectors is reviewed from the basic mechanical pedometer to the electronic accelerometer

 

Fig 1 The final prototype; front view and side view [5]

Trang 9

Single axis motion sensors: Pedometers were originally designed on 1-axis motion

sensors that both minimized the power consumption and the microcontroller based programming efforts that was implemented in step counters [5, 6] or pedometers [7, 8] These are on-body sensing devices that typically measure the number of “steps” an individual takes in a continuous manner Those devices are usually attached to the belt

on the hip [5, 6] and have a built-in LCD panel that displays the number of steps taken, or are included in MP3 players or mobile phones that can estimate the distance walked and as well as a crude approximation of the energy expenditure For example, prior art (see Fig 1) designed by the Norwegian Centre for Telemedicine (NST) were based on a 1-axis step counter featuring an integrated microcontroller harvesting data,

a Bluetooth adapter for wireless data transfer and a battery capable of delivering the peak power demand of 40 mA, all packaged into an enclosure measuring 6x4x1 cm3 [5, 6]

Although these devices are small and inexpensive and have been widely used in healthcare research and clinical experiments, they have their own limitations They can only record a limited set of activities (i.e distinguishing walking from resting) Most pedometers estimate the energy expenditure by multiplying the number of steps with an energy coefficient Therefore these devices will not be able to estimate the user’s energy expenditure from a wide range of different activities

Micromachined accelerometers offer an appropriate alternative for the assessment of daily physical activities to that of step counters [9-29] Modern accelerometers belong

to the family of micro electro-mechanical systems (MEMS) and are an electromechanical device designed to measure acceleration caused by gravity or relative body movement This enables the sensors to not only count the steps taken, but also sense the force that is applied to the respective motion Silicon batch fabrication results in a comparatively low cost per unit, and permit the development of small, inexpensive, reliable and unobtrusive wearable devices that is practical for clinical adoption [30]

Biaxial motion sensors: The use of accelerometers enables a more complex pattern

to be recorded and several human-activity recognition systems have been developed that measure body movements and determines the activity type Since 1-axis accelerometers needs to be aligned in a correct position in order to record a detectable signal, commercial products such as the Omron HJ 112 and HJ 720‐ITC [31] uses a

dual axis accelerometer that detect not only vertical but also horizontal movements These devices can be placed in the pocket or a bag to record the motion Several studies have evaluated the efficiency of a position/activity monitoring system based

on a dual-axis accelerometer [26, 32] The result of activity score well correlated with treadmill speed and changes in position and activity were detected with a mean error

of less than 3 s [32]

Triaxial motion sensors: Free-living physical activities can be recorded using a

triaxial accelerometer (or the combination of two dual-axis accelerometers) that are able to measure three degrees of freedom alone This makes the device less dependent

on the orientation of the device with respect to the user Some studies have

Trang 10

investigated the use of acceleration signals to analyze and classify different subsets of the same physical activity (e.g walking along a corridor, as well as up and down stairs [11, 12]) Others have employed them for recognizing a wide set of daily physical activities such as lying, sitting, standing, walking, and running [13-17] as well as cycling [33] They have been used to indirectly assess metabolic energy expenditure [23, 34] by comparing the number of counts or integral of the modulus of body acceleration (IMA) to the energy cost These devices have also formed part of smart personal alarm systems for elderly persons’ fall detection and prevention [18,

20, 22] The use of single waist mounted triaxial accelerometers have been reported to improve the successful classification rate ranging from 90.8% [28] to 98.7% [18]

Multiple sensor platforms: Multiple accelerometers can be used in parallel on

different locations on a persons body (e.g., wrist, ankle, thigh, knee, elbow and hip [21, 25]) in order to extend the range of physical activities that is monitored Wrist and arm sensors have been employed to improve the classification rate of upper body movements such as typing and martial arts movements [13], and some research prototypes such as Consolvo’s UbiFit Garden [35], uses a combination of on-body sensing, activity inference, and a novel personal mobile display to encourage physical activity While this approach is known to generate a high degree of accuracy such a 88.1% rate of recognizing the 13 activity types which is 12.3% higher than using a hip accelerometer alone [21], it is not feasible in everyday use because of two or more sensor-attachment sites and the associated cable connections that would interfere with normal activities

There are other ways of measuring the physical activity such as heart rate monitors [36], global positioning systems (GPS) [37] and computer vision [38] The heart rate monitor requires the user to wear a transmitter chest belt to record the heart rate during exercise and is relatively obtrusive in daily monitoring While GPS provides

an accurate means of tracking position during outdoor activities to provide insight into how people interact with the environment, it does not work indoors due to the missing signals from its orbiting satellites The general power consuming nature of the GPS system deems an additional short operating time and the need for frequent recharging underscores the unpractical nature of the GPS as an activity monitoring system Computer vision that makes use of multiple vision sensors, e.g., cameras, for tracking and recognizing an activity, often works in the laboratory but becomes difficult in real home settings due to cluttered living space that block the camera from view, variable lighting, and the subject moving between rooms and between floors

1.2 Signal analysis 

The acquired motion signals from the accelerometer are normally stored in the memory of the device or transmitted to a host computer via a wireless link for subsequent feature extraction and pattern recognition The features are normally extracted by fast Fourier transform (FFT) and wavelet transform [12, 39] which changes the signals from a time domain to a frequency domain that provides information about the frequency spectrum However, some posture patterns lasts too short to employ Fourier transforms efficiently so wavelet transforms have been adopted to extract posture features for pattern recognition [39] in which the low-frequency components are successfully extracted to obtain useful features Others studies used the signal-magnitude area (SMA) [17, 28] and tilt angle (TA) [17, 28] or

Trang 11

parameters such as averages, energy, entropy, standard deviation, or correlations [40, 41]

The features are then used in a pattern recognition protocol that should decide, with a certain accuracy, which movement is being performed Some studies have incorporated the idea of using simple heuristic classifiers [42], whereas others have employed more generic and automatic methods such as advanced computational techniques from the machine learning literature including decision trees [18, 28, 29, 33], k-nearest neighbor or “k-means clustering” (KNN) [43, 44], Bayesian networks [29, 44], support vector machines (SVM) [21], artificial neural networks (ANN) [17, 33], etc

Heuristic analysis methods are through the analysis on the raw sensor data or the features from data, such as the average and the deviation of the acceleration signal [42] Since the characteristics may vary from each individual, this method does not guarantee for general observation On the contrary, using discriminative methods and generative methods of machine learning algorithms, the parameters have been trained using data from different individuals lead to a system with independents of the person Decision trees divide the motion features into different classes and subclasses that are grouped in different hierarchical levels Whereas a classifier based on a decision tree has to be completely re-built if the activity set is changed or new features incorporated, a Bayes classifier permits the expansion or modification of the target activities by only small adjustments in retraining and software update

SVM generates a small amount of support vectors (SVs) as a representation of the specific classes as separate boundaries in feature space for discriminating patterns and classes SVs are obtained automatically for SVM model in the training process, and then SVM is capable of both classifying patterns and estimating specific values Since SVM is only directly applicable of two-class tasks, the system needs to be developed with hierarchal tree of movements With its high dimension, another drawback of SVM is the lack of transparent of the results

ANN, exactly its name, is a feed-forward network that consists of artificial processing units (“neurons”) and connections between neurons Training phase is a supervised process to learn from training data and build the knowledge into the ANN structure (the weight of connections between neurons), where each input pattern is accompanied with the desired output class Although the classification using ANN is

a straightforward process, the training phase is computationally demanding

K-nearest neighbor (KNN) is an intuitive method that classifies patterns based on their similarity to patterns in a training set KNN is fast in implement and it usually improves the results since it employs more data for comparison (multidimensional feature vectors of the training dataset) However, this method demands more memory space to store all reference training vectors and a lot computations in comparing steps The combination of different classifiers with a majority voting scheme have been found to improve the recognition performance [16, 19] For example customized decision-tree models, have been combined with an ANN using data from two accelerometers and one GPS sensor [33] Other proposed a human-activity recognition method using a hierarchical scheme of different level [24] Here, the lower level activities are recognized by means of statistical signal features and ANNs,

Trang 12

whereas the upper level recognition uses the autoregressive (AR) modeling of the acceleration signals This incorporates the derived AR-coefficients along with the signal-magnitude area and tilt angle to form an augmented feature vector This feature vector is finally processed by linear-discriminant analysis and ANNs to recognize a particular human activity

The classification protocols have been built into algorithms that have been specifically designed to deal with a particular domain of activities It has therefore been found that it is not easy to adapt the methods that have been presented in relation

to a specific work environment with a set of movements from a different work environment

1.3 Energy expenditure 

The energy expenditure (EE) of a human over a whole day includes: (i) the minimum amount of energy required for lying in physiological and mental rest, known as basal metabolic rate (BMR); (ii) the amount of energy utilized in the digestion, absorption and transportation of nutrients, named as Diet Induced Thermogenesis (DIT); and (iii) the energy spent in physical activity (PA) While PA is the most variable component

of EE in humans, it strongly depends on the type and level of activities (speed and incline for example) However, the physical activity level is difficult to measure, and the equations currently in use for predicting energy consumption have not been validated

A current method used to evaluate the energy expenditure includes the employment of direct and indirect calorimeters that estimates the energy production by measuring the oxygen uptake and/or heart rate However, these methods require large supporting instrumentation that is stationary and performed in a hospital or lab setting, and are therefore not feasible for home monitoring and does not provide information about the type of physical activity undertaken Portable systems based on pedometers estimates the calorie consumption during walking by multiplying the number of steps with an energy coefficient determined by the gender and the age of the user Neither are these devices capable of estimating a user’s energy expenditure from a wide range of activities In contrast, the recent use of accelerometers has enabled a more precise estimation of energy consumption by detecting the acceleration of each stride The estimate has been shown to correlate well with true energy expenditure [34] There are two ways of estimating the total EE; (i) direct calculations or (ii) using the metabolic equivalent of a task

Direct calculation: The total energy expenditure is calculated using the following

expression:

The PA is here translated into work (W) which integrated with respect to time is equal

to the energy consumed during the work process (Joules per second) The physics

reveals that for a free-moving frictionless body of mass m starting at rest, the energy

W required to accelerate it to a velocity v is:

(2)

Trang 13

Thus, the energy consumed is proportional to the integral of the acceleration a

squared

The acceleration parameter can be directly integrated in the time domain in order to

convert the measured acceleration into a corresponding displacement signal

Alternatively, by dividing the Fourier transformed acceleration signal by a scale factor

of –ω2 and taking the inverse transform When the acceleration is measured with the

sampling rate whose Nyquist frequency is much higher than the significant frequency

components of the signal, the time history of the displacement signal can be nicely

retrieved by directly integration [45]

Metabolic equivalent of a task: The metabolic equivalent of a task (MET) is

expressed as the energy cost of physical activities related to the resting metabolic rate

(RMR) This have by convention been set to 3.5 ml O2·kg−1·min−1 or the equivalent of

1 kcal·kg−1· h−1 or 4.184 kJ·kg−1· h−1 [46, 47] Thus, one MET is considered as the

resting metabolic rate (RMR) obtained during quiet sitting, and the total amount of

energy consumed by individuals depends on the level of activity and on their body

weight The more active and heavier a person is, the more energy he/she requires

(Table 1) The MET values range from 0.9 to 18 corresponding to a person sleeping

or running at 17.5 km/h The compendium of physical activities and their MET values

was first published in 1993 and updated later in 2000 [47, 48]

Tab le 1 M ETABOLIC EQUIVALENT OF A TASK (MET) RELATED TO A SPECIFIC ACTIVITY [ MODIFIED FROM

T ABLE 2 [47, 48]]

sleeping 0.9

walking, 1.7 mph (2.7 km/h), level ground, strolling, very slow 2.3

calisthenics, home exercise, light or moderate effort, general 3.5

bicycling, <10 mph (16 km/h), leisure, to work or for pleasure 4.0

calisthenics (e.g pushups, situps, pullups,jumping jacks), heavy, vigorous effort 8.0

Energy expenditure: 1.0 MET = 4.184x10 -3 J kg -1 h -1

By knowing the type of activity undertaken, the MET can be derived and combined

with a person’s weight to yield the total EE as the following formula

Trang 14

EE (calories/minute) = 0.0175 x MET x weight (in kilograms) (3)

1.4 Summary 

Thus, the existing literature on physical-activity recognition using accelerometers varies in approach, intention, and outcome Individual researchers have employed their own device(s) to collect the data for a particular set of movement(s) with a wide variety of algorithms and methods using multiple sensor platforms

In this project, we aim to develop a miniaturized stand alone system a system that can detect a wide range of daily activities based on a single integrated consumer 3-axis accelerometer; a microcontroller and a power supply It also offers a wireless protocol making it more unobtrusive in nature First, considering the basic daily activity, we made an analysis of measured acceleration signals of different activities and then some particular features was extracted as a presentation of each activity such as the standard deviation, the principle frequency, or the tilt angle, etc Based on the selected set of features, the computational complexity of KNN is reduced; the KNN gives a promising approach for our system Once each different movement can be automatically identified by KNN method, the EE was estimated based on the MET conversion model

Trang 15

2 Instrumentation 

The system will be designed to incorporate the following three important attributes required for the motion detection system of tomorrow: (i) Firstly, it will be light in weight and of a small physical size (ii) Secondly, in order to save the battery, the power consumption must be kept at a minimum, which means that the device should spend most of its time in a sleep modus and be woken only when performing a measurement (iii) Thirdly, the device should be universally calibrated with no need for any user initiated setups and where the data is wirelessly transferred to a computer that automatically presents the data in a readable format All the functionalities and user adjustments should be controlled from the users’ terminal

2.1 Technology Solution 

This project will focus on using a single triaxial accelerometer to develop a system that is capable of recognizing a broad set of daily physical activities (see Fig 2) In contrast to prior art, we are employing the world’s smallest 3-axis commercial accelerometer (VTI CMA 3000 series) to capture body movement in three orthogonal directions combined with a data recording protocol that cancels out the orientation dependent signals from the user A miniaturized microcontroller (CC430F6137) drives the accelerometer and the signals are transmitted through a wireless interface (CC1111F32) to a mobile computer The unobtrusive nature of the system makes it suitable for implementation into an implantable device, but currently the eZ430 application protocol from Texas Instruments have been used as the appropriate platform for this project

Fig 2 Schematic overview of the activity monitoring system

2.1.1 Sensors – 3­axis CMA 3000­D01 

In order to assess the daily physical activity, the accelerometer must be able to

measure accelerations up to ±12g in general, and up to ±6g if they are attached at

waist level, in addition to a frequency response between 0 and 20 Hz [18] The 3-axis accelerometer used in this project, the CMA3000-D01 (VTI Technologies, Finland) provide a selectable measurement range of ±2g or ±8g acceleration, a sensitivity of 56 counts/g and a frequency response of 0-100 Hz with a low noise level of 13x10-3g rms [49] It consist of a piezoelectric micro machined accelerometer with an integrated signal conditioning front end circuitry featured in a small 2x2x0.95 mm

Sensors 

Microcontroller 

Battery 

Processingand  Display Wireless 

transmitter

Trang 16

chip scale package with 8 I/O terminals (see Fig 3) The current consumption at a 3 volt supply has been rated to 10 µA

The CMA3000 provides both a synchronous peripheral interface (SPI) and an Integrated Circuit (I2C) digital interface for wireless communication (see Fig 4 for recommended schematics) The descriptions of its pins can be found on Table 2 It is recommended that a filter capacitor is connected at the input port to remove any unwanted low frequency noise while a non-polarized capacitor connected at the output port shorts high frequency noise spikes to the ground (set the −3dB low-pass filter frequency for each sensor output)

Inter-Fig 3 The CMA3000 attached to a prototype board (left) shown with the package dimensions (centre

and right) given in mm with 50µm tolerance [49]

SPI VDD 1 VSS 2 DVIO 3 MISO 4 SCK_SCL 5MOSI_SDA 6CSB 7INT 8

I2C VDD 1 VSS 2 DVIO 3 MISO 4 SCK_SCL 5MOSI_SDA 6CSB 7INT 8

5 SCK_SCL SPI Serial Clock (SCK)/ I 2 C Serial Clock (SCL)

6 MOSI_SDA SPI Serial Data Input (MOSI)/I 2 C Serial Data

(SDA)

8 INT Interrupt

Trang 17

The universal serial communication interface (USCI) supports multiple serial communication modes with one hardware module E.g the USCI_Bx modules support both the I2C mode and the SPI mode operated in a full-duplex mode with the model of master/slave communication In spite of limitation of more pins requirement than I2C, the SPI bus has been chosen in this project because of its advantages such as higher throughput than I2C, extremely simple hardware interfacing and low power requirement

The technical details and a more detailed performance specifications and pin descriptions is presented in the datasheet of the CMA 3000-D01 [49]

2.1.2 Microcontroller ­ CC430F6137IRGC 

The microcontroller employed in this project is based on the CC430F6137 (Texas Instruments, US) which belongs to the CC430 family of ultralow-power microcontroller system-on-chip [50] These devices come with an integrated RF transceiver core and “intelligent” peripherals for low-power wireless communication applications The microcontroller offers the industry’s lowest power CPU (MSP430™) with a 16-bit RISC architecture, 20 MHz processor, 16-bit registers, 32

kB of programmable flash memory, 4 kB of RAM that contribute to a maximum code efficiency The CC430 comes with one active mode and five software selectable low-power modes of operation that permit extended battery life in portable measurement applications An interrupt event can wake up the device from any of the low-power modes, and restore the low-power mode on return from the interrupt program The microcontroller is packaged in a 64 Quad-flat no-leads (QFN) Pin Package measuring 9.1 mm x 9.1 mm, with Ultralow Power Consumption of 160 μA at Active Mode (AM), 2.0 μA at Standby Mode (LPM3 RTC Mode) and only 1.0 μA at Off Mode (LPM4 RAM Retention)

The technical specifications and functional block or recommended schematic can be found in the datasheet of the CC430F6137IRGC microcontroller [50]

2.1.3 Wireless Communication ­ CC1101 sub­1­GHz 

The wireless transmission protocol is based on the CC1101 sub-1-GHz Radio frequency (RF) transceiver integrated in the CC430 The CC1101 offers high transmission efficiency combined with a low current consumption (14.7 mA in RX, 1.2 kBaud, 868 MHz and only 200 nA at sleep mode), excellent blocking performance with flexible data rate (from 0.6 to 600 kbps) and modulation format (2-FSK, 4-FSK, GFSK, and MSK supported as well as OOK and flexible ASK shaping), and the integrated nature requires the use of few external components [50] The technical specifications and block diagram can be found in the RF Front End part of the CC430 datasheet [50]

For wirelessly communicating with the Chronos directly from your PC, the RF Dongle access point allows you to download data, sync information, or control programs running on your computer (see Fig 5) It is based on the CC1111F32 controller, which features an integrated USB controller in addition to a <1-GHz radio [50]

Trang 18

Fig 5 eZ430-Chronos RF Access Point [51]

2.1.4 Power supply 

The 3 volt CR 2032 lithium-manganese-dioxide “coin” battery (Maxell, Japan) was chosen as the power supply since it offers a high single cell voltage, a stable discharge voltage and a good capacity for storage (225 mAh) given its compact external dimensions of 20 mm diameter and 3.1 mm thickness (see Fig 6) [52] For continuous acceleration measurement of the eZ430 (containing the sensor, microcontroller and transmitter) used in the study, the CR2032 battery can last for 1.5 months with an average supply current of 166.0 μA

Fig 6 The CR2032 lithium-manganese-dioxide “coin” battery used to power the motion detection system

2.1.5 Computer and Software 

The motion (acceleration) signals were streamed to a mobile computer due to the limited capability of internal data storage With the additional storage that a computer provides, it is possible to maintain long‐term physical activity data and perform

extensive statistical analysis using PC software that these devices provide

The mobile computer was based on a HP-Probook 4410s (Hewlett-Packard, US) running a 32-bit Window 7 operating system An embedded C-compiler was used to program the microcontrollers to perform data logging, data conditioning and to interface with the RF transmitter to wirelessly transfer the sensor data to the mobile

PC A Labview application “ez430 Acquire and Store” was used to capture and record the acceleration data sent by the measurement system via the RF module to the COM port of the PC This application streamed the waveform data to a file for further processing It also permitted the visualization and annotation of the data Finally, a Matlab routine was developed to implement and process the classification algorithm

as well as displaying the results of the different type and level of activities, also the energy expenditure of those physical activities (see Appendix 0 for Matlab code sample)

Trang 19

2.2 Proposed prototype 

2.2.1 Development Platform 

The motion detection system was based on the TI eZ430-Chronos (Texas Instruments, US), development platform which is a highly integrated, wearable wireless system contained in a sports watch package that measures 48x33x16 mm3 and weights 100 g This development tool features the CMA3000 accelerometer, the CC430F6137 microcontroller and the CC1101 sub-1-GHz RF transceiver [51] used in this project

It is supplied with a USB-based CC1111 wireless receiver that is connected to the PC The accelerometer data was sampled at 50 Hz, before transmission to the receiver Although the Chronos can be used as a reference platform for watch systems, it can also be used as for personal area networks, and as a wireless sensor node for remote data collection Disassembling the unit permits reprogramming for customized applications using the eZ430 USB programming interface

x. dosoventral direction  

z. vertical direction 

y. mediolateral direction 

Trang 20

Fig 8 Schematic layout, modified from [51]

Fig 9 Battery supplier, modified from [51]

CMA3000 

RF Front End for 433MHzMicrocontroller

Trang 21

The Chronos development platform was modified to a motion detection module by attaching it to a leather belt (see Fig 10) First the wrist strap was removed and eight 1

mm holes were drilled in the back plate of the instrument This enabled attachment to the belt by four industrial 24x10 mm staples The inside of the belt was taped to provide protection from the staples and reinforced using thermoplastic glue The instrument was then attached by the 4 screws securing the housing to the back plate The location of the instrument was such that it would rest on the left hand side (LHS) hip of the user wearing it

Fig 10 Modification of the development tool into a waist mounted motion detection module

The detection module (left figure) and its location on body for monitoring activity (right figure) The positioning of the module at the waist made it closer to the centre of the body [53] and rendered the most convenient way of extracting useful information about the movement of the whole body It was also a location that was found to be comfortable

by the test people Although placing the device on the wrist require less subject compliance as it never needs to be removed, it would not be able to provide reliable information on the whole body movement and would be more susceptible to artifact (such as accelerations due to swinging or knocking against other objects even if the body is at rest)

Trang 22

3 Materials and Methods 

3.1 Motion classifier 

In order for motions to be considered by a classification algorithm, they need to be ordered hierarchically from the most general motion through to a specific feature Once a structure of motion has been established, an algorithm will be developed for classification The algorithm will depend on the choice of instrumentation, and the generated input signals that are received The signal signature for a specific movement will be used to develop a template pattern which the generic input signal will be compared with Once the classifier has been developed, its performance will

be evaluated by comparing the classification results with the annotation of acceleration signals It is important to check that the classification algorithm is able to include the full scope of the movements that will be monitored This evaluation should occur in the test environment using human subjects to which the classifier has been designed, and which will permit the overall accuracy of the classification algorithm to be determined

The system will be used for unsupervised monitoring of daily activities defined into 3 basic motion classes of activities of resting, walking and running Resting includes the specific sub-classes of sleeping, sitting, standing Walking includes the sub-classes of slow, normal and brisk walk, whereas running are selected into the sub-classes of slow, normal and fast run at full speed The illustration of the system architecture for monitoring basic daily movements can be seen in Fig 11

Fig 11 Block diagram for our proposed recognition technique

First, raw acceleration signals from eZ430-Chronos are wirelessly collected and streamed it into a binary file from the COM port of PC using the “ez430 Acquire and Store” Labview application Three directions of acceleration of human body were measured simultaneously with X-axis for back forth direction, Y-axis for up and down direction, and Z-axis for right and left direction of the acceleration signals (see Fig 17) Next, at the terminal, Matlab is the language used to analyze the signals The inference method is briefly divided into two steps of pre-processing and classification Some pre-processing steps need to be applied to the measured acceleration signals in order to improve the accuracy and efficiency of the classification model, including the process of removing or reducing noisy data, and signal pre-conditioning where relevant feature values are extracted from the acceleration signals to form a set of features of each activity, that is efficiency for classification The classification method

of KNN is then implemented to identify the activities and estimate the energy expenditure during time doing those activities

  Physical   

Feature  extraction 

EE  estimation  eZ430 

Trang 23

More details of the system implement are presented as the following sections

3.2 Pre­processing 

In our study, accelerometer features were calculated from each axis providing insight into the dynamics of activities in each direction along the axes, thus improving the discrimination of activities that have a similar vector length such as walk up/down stairs vs normal walk The vertical acceleration is obvious the most useful signal to distinguish many activities, but combination with other two is now examined to see the improvement of classification

3.2.1 Calibration protocol 

The first step to improve the accuracy of the measured data is the calibration process For many MEMS inertial sensors, calibration provides opportunity to improve accuracy in their sensing solutions From the measured acceleration signals, we found that the accelerometer is not sufficiently calibrated from the manufacturer, and an extra calibration step was added

Calibration procedure can be done very simply in the gravitational field to get stable results by lying the device at rest on a flat surface and the acceleration of 1g is registered; or putting the device in free fall and registering 0g acceleration But in commercial process, a typical circuit for providing calibrated accelerometer performance looks like the diagram in Fig 12 [54], that includes the amplifiers, Analog/Digital converter, multiplexer, and passive components

Fig 12 Typical Calibrated Accelerometer Circuit [54]

Those way are used by the manufactures With this product that non-linearity is stated

to be less than 1.5% of full scale as our accelerometer [49], an easy approach based on ideal linear-line of gravity acceleration can help us to do the calibration The acceleration in each axis can be calibrated in the earth’s gravitational field The device

is put face up/down and get the up/down acceleration (a max and a min) The ideal calibration should make the acceleration to be 1g and -1g respectively Hence, the acceleration signal can be calibrated as following calculation steps

(4)

The a s and a 0 are denoted as the slope and the offset correction factors in our

calibration step

Trang 24

3.2.2 Noise reduction 

As mentioned above, the real-time output of an accelerometer contains some noise that are significant considered in a miniaturized system and should be filtered out before used as input of the activity recognition system

The output of an ideal accelerometer worn on the human body originates from not only body movement, but also gravitational acceleration, and external vibrations that

is not produced by the body itself (e.g., resulting from vehicles) or due to bouncing of the sensor against other objects or jolting of the sensor on the body due to loose attachment, eventually resulting in mechanical resonance [55] Baseline wander which is the extragenoeous low-frequency high bandwidth components, can be caused

by vibration of floor/machine, respiration, etc., may add “noise” to the accelerometer output It can cause problems to analysis the acceleration signals, so should be attenuated by adequate filtering techniques (if the frequency range of the noise does not interfere with the frequency range of human body acceleration) Other source of noise can be electrical noise of random fluctuations within physical system such as thermal noise, shot noise or flicker noise; or mechanical noise of vibration of the structure in the chip such as thermo-mechanical noise Therefore, to improve signal-to-noise ratio, fast ripple should be blocked and low-frequency noise should be cancelled off Since the frequency of human activities ranges from 0.3 to 3.5 Hz [56],

a band-pass filter with cut-off frequency of 0.3-5Hz can be applied for noise reduction

According to study in analysis of filtering methods for 3D acceleration signals [57], three typical filters for acceleration signals are Kalman filter with the largest signal-to-noise ration (SNR); Wavelet package shrinkage and median filter with similar in terms of SNR; and Butterworth low-pass filter had the lowest SNR

However for simple implement, in our study, the noise reduction unit, shown in Fig

11, will incorporate a Butterworth band-pass filter to cancel out the signal outliers

3.2.3 Features Extraction 

Basic activities in daily routine are firstly considered in this project An illustration of the studied activities is shown in Fig 13, which descriptions of each activity are given

in Table 3

The movements were first divided into activity and rest The activities were classified

as walking, running with different in pace, while the postural orientations during rest were classified as sitting, standing or lying down

Fig 13 Illustration of measurements of different human activities [58]

Trang 25

Table 3 H UMAN A CTIVITIES UNDER M ONITORING

Lying down  The act of lying down in a bed. 

Sitting  The act of sitting in a chair with slight fidgeting movements. Resting 

Standing  The act of standing without movements of lower body.  

Slow  The act of walking forward slowly (3.5 km/h). 

Normal  The act of walking forward while moving arms and legs (4.8 km/h). Fast  The act of walking forward quickly (7 km/h). 

Fast  The act of running forward at full speed (13‐18 km/h) 

Some understandings of different activities can be explained as follows

Resting: Piezoresistive accelerometer changes the DC value of the signal according

to the incline difference with regard to gravity direction Therefore, classification of 3 static activities is possible by applying DC value difference due to the difference of body incline which originates from posture change Standing up DC value is different for each subject because body standing posture is different for each subject standing

posture Hence, we applied a reference of standing DC signal to make a decision of

the algorithm [14]

Walking: For various exertion levels walking on a treadmill, the acceleration

frequency for each axis was linearly related to the step frequency (number of times the foot hits the surface per second) Harmonics of the step frequency are also significant, but usually less than the fundamental step frequency Walking was found

to be around 1.5-2.2 Hz oscillations in the vertical acceleration signal (see Table 8, feature of fundamental frequency of walking)

Running: Same as walking, running have nearly constant frequency, which did not

vary much between test persons either, can be seen as 2.5-3.2 Hz oscillation in the vertical acceleration signal (see Table 8, feature of fundamental frequency of running) Among dynamic activities, running signal is much larger than other

dynamic activities

Stair ascent/descent: In vertical direction, going down the stairs signal is larger than

other dynamic activities except running signal, and high level walking At the action

of going up the stairs, upper body inclines at front of body Therefore, DC level of axis signal increases in the action of going up the stairs and acceleration signal level also increases Hence, negative peak of going up the stairs signal is relatively increases compared to other walking or going down the stairs signals

X-3.2.3.1 Considered features 

From each interval of raw acceleration signals (a x , a y and a z), some particular features need to be interpreted into a feature vector as the input for the classification system The challenge in this stage is to find the features of the acceleration signals which describe and discriminate each activity the best At first attempt, several features have been investigated

The already measured acceleration signals were divided into windows containing 500 samples (10s at 50 Hz) From each one of these windows, a set of several features of 3

Trang 26

axes signals was calculated The features considered had previously been used to solve activity recognition problems [40, 41] including mean values, standard deviations, peak frequencies and FFT magnitudes, cross-axis correlations, spectral energy in subband (0.3–5 Hz), spectral entropy, SMA and TA Those basic features is chosen because it is simple and fast to calculate; and not requires heavy computing Mean value (mean) (feature 1‐3) 

The DC component (average value) of the signal over the sample window is the mean acceleration value

1

1[ ]

Standard deviation is the range capture of possible acceleration values differ from different activities such as walking, running, etc., are used as features for classifying dynamic activities (i.e., walking, running and jumping)

During running, Bhattacharya et al [59] observed absolute vertical peak accelerations

ranging from 0.9-5.0 g at the low back by using their skin-mounted accelerometers Mean and standard deviation of the PA signals provide a general description of the activity intensity levels

Signal Magnitude Areas (SMA) (feature 7) 

The SMA has been found to be a suitable measure for distinguishing between static

vs dynamic activities using triaxial accelerometer signals [16, 17, 28, 60] Signal magnitude area was calculated using the area under the absolute magnitude of the entire three axis pre-processed acceleration data in examined time

where ax (i) , a y (i) , and a z (i) indicate an acceleration signal of each axis, N is the

window length over which the SMA value is calculated

Trang 27

TA refers to the relative tilt of the body in space (angle change in vertical direction of sensor - y axis) and helps in distinguishing postures different in angle such as standing and lying [28, 60] Using the DC component of the signals, the angle of each axis of the acceleration sensor relative to the gravity is determined It can be defined as the angle between the positive y-axis and the gravitational vector g and can be calculated according to

Fig 14 Method for determining the postural orientation of the user [28]

Fig 14 illustrates an overview of how the tilt angle relates to the various postural orientations From that, it determined that a tilt angle between 20 and 600 is definitely

sitting, and angles of 0 to 200 may be either sitting or standing, depending on various

other parameters of particular person [28] Thus sitting and standing may sometimes

be incorrectly classified

Change in speed or in incline is hardly identifiable in raw acceleration signals We therefore transform these raw signals into frequency domain to remove all dependence on time and get the visible characteristics of the dynamic activities A change in speed corresponds to a change in frequency while change in incline rather involves a change in magnitudes of the harmonics The frequency-domain features were obtained from spectral analysis, including dominant frequency, spectral energy and entropy of the accelerometer [25]

Fundamental Frequency (freq‐feature 9‐11) 

The obtained frequency spectrum from applying FFT determines how much of each

frequency component is required to synthesize the original time-domain signal x using

complex sinusoidal components And peak frequency is the frequency with the highest power (FFT magnitude) of the computed power spectrum, known as the dominant frequency of the activity For example, if the sliding window contains accelerometer data from running, the frequency is higher than that from walking, because of a higher step rate during running

Trang 28

(9)

where k is the serial number of each window of signals, f is the sub-band frequency,

w a and w b are window frequencies (0.3-5Hz) The sum was then divided by the

window length for normalization Additionally, the DC component of the FFT was excluded in this sum since the DC characteristic of the signal is already measured by another feature

Spectral entropy (feature 18) 

Spectral entropy is calculated as the normalized information entropy of the discrete FFT component magnitudes of the signal except the DC component The following equation is for getting information entropy

(10)

We can get the probability p(x) by counting the number of magnitude in a specific

frequency-band This feature may support discrimination of activities with similar energy values For instance, biking and running may result in roughly the same amounts of energy in the hip acceleration data However, because biking involves a nearly uniform circular movement of the legs, a discrete FFT of hip acceleration in the vertical direction may show a single dominant frequency component at 1 Hz and very low magnitude for all other frequencies, result in low spectral entropy Whereas, running result in complex hip acceleration and many major FFT frequency components between 0.3 Hz and 3.5 Hz, which would result in higher spectral entropy

Cross‐axis correlation (corr‐feature 19‐21) 

These features that measure correlation or acceleration between all pairwise combinations of axes of accelerometer can improve recognition of activities involving movements of multiple body parts and not translation in just one dimension For example, walking and running can be differentiated from stair climbing

The correlation information is calculated by the normalized cross product between

Trang 29

each axis value

is in contact with the ground with different forces To go through this case, the information of the steps is taken into account by counting the peaks of acceleration signals over the experimental time frame

Net acceleration (rms‐feature 23) 

The performance of accelerometers will be dependent on its orientation relative to the direction of acceleration as well as the gravitation field In order to make the motion detector insensitive to the gravitation field, and thereby the orientation of the device relative to the user, the advantage of a 3-axis system was taken by summing the squared of all projected accelerations into a common signal denoted net acceleration The vector magnitude of an accelerometer signal is given by:

(12)

where a x , a y , a z are the outputs corresponding to the three axes of the accelerometers, respectively This is sometimes useful in case people are doing activities that also triggers change of acceleration in different directions such as running at full speed

3.2.3.2 Feature selection 

In practical situations there are far too many attributes for learning step to handle and some of them are irrelevant or redundant In this step irrelevant and redundant attributes are removed from the data set A reduced version of the data set, which contains only the relevant attributes, is used to build the classifier In order to reduce the feature space, the method Minimum Redundancy Maximum Relevance (MRMR) was used for feature selection in some studies [61] The minimum mutual information between features is used as criteria for minimum redundancy and the maximal mutual information between the classes and features is used as criteria for maximum relevance

In another approach, feature selection could be done based on visual and statistical analysis [33] The features were visually compared against annotation to find good candidate features The plots of each feature will show how the distribution of each feature signal changes between different activities The more the distribution moves between activities and the less the distributions overlap, the better it is for discrimination of activities If the distributions show considerable overlap with one another, means that it is not an easy task to construct a classifier to distinguish the

Trang 30

activities From analysis of features distribution, some features will be chosen as the input for our classification algorithm (see Fig 15) as will be described in details in each trial system

Fig 15 Block diagram, showing components of the features extraction and selection

3.3 Classification Algorithm  

3.3.1 K­nearest neighbour 

Cluster analysis is dividing groups of data based on their similarity to patterns in a training set [62] KNN is a partitional clustering approach that divides data into non-overlapping subsets KNN is also known as center-based clustering algorithm, means that each cluster is associated with a centroid (or center point - the average of all the points in the cluster) and each point is assigned to the cluster with the minimum distance from it to the centroid of that cluster When computing the distance from an unlabeled pattern to training patterns, different distance metrics can be used such as Euclidean distance, cosine similarity, correlation, etc The Euclidean distance is most commonly used as equation below

2 1

Raw 3‐axis acceleration 

Basic features   Selected features  

mean (x) freq (x)

TA 

Trang 31

Fig 16 The flow chart of KNN algorithm

The high accuracy of the KNN classifier is proven when training data are representative and large enough In the training phase of the basic KNN algorithm, all training patterns are just stored for comparison in the classification phase and all computation is done during the classification phase And the complexity of KNN is O(n*K*I*d) where n = number of points, K = number of clusters, I = number of iterations, d = number of attributes This method is not efficient in the classification phase since it requires a lot of memory and a lot of computations

No centroids move ?

No 

Yes

Trang 32

method to improve the accuracy and efficiency of the k-means algorithm is combining

a systematic method for finding initial centroids and an efficient way for assigning data points to clusters [63] In this project, initial centroids can be assigned by trained features sets from processing step

Practically in our system, the main steps in classification system are as the following stages In the training stage, multidimensional feature vectors were established in time-frequency domain corresponds to a particular activity For each movement, some training cycles are performed using different data of same activity The mean values

of these ones are used as the signature of that activity In the classification stage, activity signal points are divided into clusters using the KNN algorithm The majority

of data points in clusters which correspond to a given class decide the label of that cluster (resting, walking or running) The majority is the highest percentage of data points have the minimum distance to the features set represented for that activty

3.4 Estimation of Energy Consumption 

Using above classification algorithm, knowing of which movements have been done would help to measure more accurate values of caloric consumption

Table 4 MET VALUES FOR DAILY PHYSICAL ACTIVITY ASSESSMENT [ MODIFIED FROM [47, 48]]

Definition from the Compendium of Physical activities [47,

Standing Standing –arts and crafts, light effort 1.8

Resting

Lying down

Lying quietly, done nothing, lying in bed awake, listening to music (not talking or reading)

walking, 2.8 to 3.2 mph, level, moderate

Putting the individuals’ weight, classified activities during a certain time into equation

3 (see section 1.3), the total energy expenditure can be estimated

Trang 33

3.5 Experimental protocol 

For the generation of data, measurements are collected in the sport centre using our device (see more details in section 2.2.2) The device recorded the raw acceleration signals in three directions with a sampling frequency of 50 Hz The measurement setup can be shown in Fig 17 Each person was equipped with our sensor fastened around the waist, was asked to perform a short list of walk and run on a treadmill Different twelve recorded activities are shown in Table 6

The characteristics of the five people are shown in Table 5 with large diversity in age, weight and height which gave the generality in evaluating our system

of one particular movement or posture occurrence only

Activities were also continuously recorded for 20 minutes in a supervised setting for testing the performance of system in long time monitoring During this experiment, the speed of the treadmill was changed every 1 minute (which give 20 durations of stable activity) A typical annotation of monitored signals is presented on Table 7

Table 6 A CTIVITIES INCLUDED IN THE DATA COLLECTING

Activity type label Activity task Number of datasets (x60s)

z. mediolateral direction 

x. dosoventral direction 

y. vertical direction 

Trang 34

End minute Level walk at 3.5km/h  0:00  1:00  Level walk at 3.5km/h  10:00  11:00 Level walk at 4.8 km/h  1:00  2:00  Level walk at 4.8 km/h  11:00  12:00 Level walk at 7 km/h  2:00  3:00  Level walk at 7 km/h  12:00  13:00 Level run at 9.1km/h  3:00  4:00  Level run at 9.1km/h  13:00  14:00 Level run at 11km/h  4:00  5:00  Level run at 11km/h  14:00  15:00 Level run at 13‐18km/h  5:00  6:00  Level run at 13‐18km/h  15:00  16:00 Level run at 11km/h  6:00  7:00  Level run at 11km/h  16:00  17:00 Level run at 9.1km/h  7:00  8:00  Level run at 9.1km/h  17:00  18:00 Level walk at 7 km/h  8:00  9:00  Level walk at 7 km/h  18:00  19:00 Level walk at 4.8 km/h  9:00  10:00  Level walk at 4.8 km/h  19:00  20:00 

In general, data classification is a two-phase process as follows

Phase 1-Training phase A model that describes a predetermined set of classes was

built by analyzing a set of training data The half of data library was used as a training dataset They were first segmented into 10s and each segment were features calculated All features of all dataset were then analysed some were chosen for representing each classes of activities These mean values of features of each class are the trained features vectors for recognition stage

Phase 2-Classification phase The classification algorithm was implemented and

evaluated the performance using another half of data library, known as test dataset The results of classification process are respected to be type and level of each activity

in a certain time

The classified result from an activity classification algorithm was compared to the annotation of recording and the activity classification rate of the system was evaluated The rate is expressed as percentage using following formula

(14) And then an estimation of the energy expenditure can be done based on classified activities

Trang 35

(Motion signals from 

waist‐worn 

accelerometer) 

Signals Collection (Labview “eZ430 Acquire and Store” application) 

Pre‐processing (Calibration & Filtering) 

& Features Extraction (Time‐Frequency  domain) 

Clustering (KNN algorithm) Labeling (based on majority) 

Activity Type & Level Estimation of Energy Expenditure 

Fig 18 Illustration of the practical classification system

Walking 

 

  Running 

Trang 36

3.6 Matlab Routine 

Fig 18 illustrates our practical system corresponding to proposed technique in Fig 11 while Fig 19 below presents the Matlab test bench used in our classification system

In pre-processing step, in which the calibration and noise reduction are applied to

improve the accuracy of the measured signals (pre_pro.m), the signals then was gone through the features extraction step to get set of features (feat_ext.m) A Matlab

routine was written to extract those selected features automatically by processing data over a 10-s time window in time-domain as well as in 0.3-5Hz frequency domain The routine of training data was denoted as the dash-line while the solid-line indicated the routine of test data The training and test data were gone through pre-processing and features extraction, but their features were separated into two next different steps The mean of features of each activity from training database was then employed to label classes of clusters or as initial centroids of k-means clustering algorithm in classification system The main step is the classification process, where the signals

were assigned into clusters using KNN algorithm (k_clus.m) and then each cluster was labelled (label_act.m) with the name of classified activities

KNN are available in the Matlab bioinformatics and statistics toolboxes and Euclidean distance was chosen as the distance metric for classification processes

Trang 37

 Fig 19 Test bench in Matlab The routine of training data was denoted as the dash-line and routine of testing data routine was denoted as the solid-line

 

Classification process 

     

Trang 38

standing sitting

Trang 39

180 degree Y-axis Acceleration signal

x y z

-1 0 1 Calibrated 180 degree Y-axis Acceleration signal

Fig 21 Y-axis calibration result The upper plots show the raw acceleration signals when put the sensor up/down under gravitational field The lower plots show the calibrated ones using the linearity characteristic of the sensor

4.1.3 Noise reduction results 

For the noise reduction, a 6-order Butterworth band-pass filter of 0.1 to 5 Hz have been developed and applied on acceleration signals Fig 22 shows the frequency spectrum of an example running signals before and after filtering, while Fig 23 show the time-domain signals before and after filtering The DC values and high frequencies have been clear out of the acceleration signals

 

Fig 22 Frequency spectrum of acceleration signals before (a) and after noise reduction (b)

Trang 40

e of Fig 24 The plots have the red line at median value while the box has lines at lower and upper quartile; the whiskers show the extent of the rest of the data, and outliers for data beyond the ends of the whiskers

Ngày đăng: 29/01/2021, 14:14

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN