# Patent

## Title
Human activity monitoring device with activity identification

## Abstract

A method or apparatus for monitoring human activity using an inertial sensor is described. The method includes monitoring accelerations, and identifying a current user activity from a plurality of user activities based on the accelerations. In one embodiment, each of the plurality of user activities is associated with one of a plurality of types of periodic human motions that are detectable by the portable electronic device, and wherein the identification of the current user activity is made based on detecting two or more instances of the periodic human motion associated with the user activity. The method further includes counting periodic human motions appropriate to the current user activity.

## Background
RELATED APPLICATIONS
This patent application claims the benefit under 35 U.S.C. §119(e) of U.S. provisional application No. 60/900,412, filed Feb. 8, 2007, which is herein incorporated by reference.


FIELD OF THE INVENTION
This invention relates to a method of monitoring human activity, and more particularly to identifying user activities and counting periodic human motions appropriate to the identified user activities.
BACKGROUND
The development of Micro-Electro-Mechanical Systems (MEMS) technology has enabled manufacturers to produce inertial sensors (e.g., accelerometers) of sufficiently small size, cost, and power consumption to fit into portable electronic devices. Such inertial sensors can be found in a limited number of commercial electronic devices such as cellular phones, portable music players, pedometers, game controllers, and portable computers.
Step counting devices (e.g., pedometers) are used to monitor an individual's daily activity by keeping track of the number of steps that he or she takes. Steps are counted by sensing accelerations caused by user motion. Step counting devices are not able to detect or count motions other than steps. Nor are step counting devices capable of differentiating between different user activities.
Some step counting devices may be attached to and receive input from external sensors (e.g., a bike cadence sensor) to detect a motion other than a step. However, such step counting devices rely on external sensors for such monitoring capability. These devices are not capable of detecting or counting motions other than steps without the input from external sensors.



BRIEF DESCRIPTION OF THE DRAWINGS
The present invention is illustrated by way of example, and not by way of limitation, and can be more fully understood with reference to the following detailed description when considered in connection with the following figures:
FIG. 1 is a block diagram illustrating an electronic device, in accordance with one embodiment of the present invention;
FIG. 2 is a block diagram illustrating a motion identification system, in accordance with one embodiment of the present invention;
FIG. 3A illustrates a first exemplary motion cycle graph that shows a user engaged in a first user activity;
FIG. 3B illustrates a second exemplary motion cycle graph 350 that shows a user engaged in a second user activity;
FIG. 4A illustrates a flow diagram for a method of monitoring human activity using an inertial sensor, in accordance with one embodiment of the present invention;
FIG. 4B illustrates a flow diagram for a method of recording a motion profile, in accordance with one embodiment of the present invention;
FIG. 5 shows a state diagram for the behavior of a system for monitoring human activity, in accordance with one embodiment of the present invention;
FIG. 6 illustrates a flow diagram for a method of operating an electronic device in sleep mode, in accordance with one embodiment of the present invention;
FIG. 7A illustrates a flow diagram for a method of operating an electronic device in entry mode, in accordance with one embodiment of the present invention;
FIG. 7B illustrates a flow diagram for a method of operating an electronic device in entry mode, in accordance with another embodiment of the present invention;
FIG. 8 illustrates a flow diagram for a method of operating an electronic device in an active mode, in accordance with one embodiment of the present invention;
FIG. 9 illustrates a flow diagram for a method of operating an electronic device in an exit mode, in accordance with one embodiment of the present invention;
FIG. 10 illustrates a flow diagram for a method of recognizing a periodic human motion, in accordance with one embodiment of the present invention; and
FIG. 11 illustrates a block diagram of a machine in the exemplary form of a computer system within which a set of instructions may be executed in accordance with an embodiment of the present invention.



DETAILED DESCRIPTION
Embodiments of the present invention are designed to monitor human activity using an inertial sensor. In one embodiment, accelerations are monitored, and a current user activity is identified from multiple recognizable user activities based on the accelerations. These activities include any activities based on periodic human motions, including, for example: walking, inline skating, bicycling, exercising on an elliptical machine, exercising on a rowing machine, and cross country skiing. Periodic human motions may then be counted that are appropriate to the current user activity. In one embodiment, the system provides user data on each of the activities that were performed. In this way, a user can monitor his or her overall activity level, as well individual activities.
FIG. 1 is a block diagram illustrating an electronic device 100, in accordance with one embodiment of the present invention. In one embodiment, the electronic device 100 is a portable electronic device that includes one or more inertial sensors. The inertial sensors may measure accelerations along a single axis or multiple axes. The inertial sensors may measure linear as well as rotational (angular) accelerations.
The electronic device 100 may be used to identify user activities and count periodic human motions appropriate to the identified user activities. In one embodiment, electronic device 100 operates in conjunction with a server (not shown) to identify user activities and count periodic human motions. In one embodiment, periodic human motions may be accurately counted regardless of the placement and/or orientation of the device 100 on a user. For example, the electronic device 100 may be carried in a backpack, pocket, purse, hand, or elsewhere, and accurate periodic human motions may still be counted. In one embodiment, the device 100 is placed in one of multiple locations on a human to facilitate accurate detection of periodic human motions. For example, the electronic device 100 may be placed in a pocket while bicycling to ensure the greatest accuracy in counting pedal motions. Periodic human motions may be accurately counted whether the electronic device 100 maintains a fixed orientation or changes orientation during operation.
The electronic device 100 in one embodiment comprises an acceleration measuring logic 105, an activity identification engine 110, a motion processor 120, and a motion log 125. The acceleration measuring logic 105 may be an inertial sensor or other acceleration sensitive instrument. The acceleration measuring logic 105 may continuously take measurements of acceleration data. The measurements of acceleration data are taken at a sampling rate that may be fixed or variable. In one embodiment, the acceleration measuring logic 105 receives a timing signal from a timer (not shown) in order to take measurements at the sampling rate. In one embodiment, the acceleration measuring logic 105 is coupled to the activity identification engine 110 and to the motion processor 120, and acceleration measurement data is sent to the activity identification engine 110 and to the motion processor 120 for processing.
In one embodiment, measurement data is processed by the activity identification engine 110 to identify a user activity. The activity identification engine 110 may identify the user activity from a plurality of identifiable user activities. The activity identification engine 110 may identify a user activity by monitoring for different events, each event indicative of a different type of activity. In one embodiment, when enough events indicative of a particular user activity are detected, the activity identification engine 110 notifies the motion processor 120 that the identified activity is being performed by the user.
The motion processor 120 may process acceleration measurement data to detect periodic human motions. In one embodiment, a series of motion criteria are applied to the acceleration measurement data. If each of the motion criteria are satisfied, a periodic human motion may be identified, and counted. In one embodiment, a different set of motion criteria may apply for each user activity. In one embodiment, criteria may include positive criteria (ones that must be met to classify a motion in a certain way) and negative criteria (ones that cannot be met to classify a motion in a certain way). Once the activity identification engine 110 has identified a user activity, the motion processor 120 may apply the set of motion criteria specific to the identified activity to detect appropriate periodic human motions. When an appropriate periodic human motion is detected, it may be recorded in the motion log 125.
If no user activity has been identified by the activity identification engine 110, in one embodiment possible periodic human motions are buffered by the motion processor 120. Once the activity identification engine 110 identifies the user activity, these buffered possible periodic human motions may be recorded in the motion log 125 as periodic human motions appropriate to the identified user activity.
The motion log 125 may maintain separate data sets for each type of periodic human motion. For example, the motion log 125 may have a first record of the number of steps walked in a day and a second record of the number of strides a user has inline skated in a day. The motion log 125 may also include additional statistics for different periodic human motions, for example the average walking speed, the length of time and time in a day during which a particular activity was performed, etc.
FIG. 2 is a block diagram illustrating a motion identification system 200, in accordance with one embodiment of the present invention. The motion identification system 200 in one embodiment may include an electronic device. In one embodiment, the electronic device is a portable electronic device that includes one or more inertial sensors. In another embodiment, the motion identification system 200 includes an electronic device coupled to a server. The distribution of the functionality between the portable device and the server may vary. In one embodiment, the motion identification system 200 comprises a filter 220, a cadence logic 232, a rolling average logic 235, a dominant axis logic 227, an activity identification engine 280, a motion processor 230 and a motion log 275.
The acceleration measuring logic 205 may be an inertial sensor or other acceleration sensitive instrument. The acceleration measuring logic 205 may continuously take measurements of acceleration data at a sampling rate that may be fixed or variable. In one embodiment, the acceleration measuring logic 205 receives a timing signal from a timer (not shown) in order to take measurements at the sampling rate. In one embodiment, the acceleration measuring logic 205 is a 3-dimensional accelerometer. In one embodiment, the sampling rate of the acceleration measuring logic 205 may be based on a level of activity detected. In one embodiment, for slower motions, the sampling rate is decreased.
In one embodiment, the acceleration measuring logic 205 is coupled to the filter 220. Measurement data may be processed by the filter 220 to remove noise. The filter 220 may be implemented in hardware, software, or both hardware and software. In one embodiment, the filter 220 includes multiple filters, and a determination of which filters to apply to the measurement data is made based upon the type of user activity detected. For example, a low pass filter may be used to remove high frequency noise that would interfere with step counting when a user is walking. In contrast, a high pass filter may be used when quick motions are to be monitored.
Many types of motions that are useful to keep track of have a periodic set of movements. Specific periodic human motions may be characteristic of different types of user activity. For example, to walk, an individual must lift a first leg, move it forward, plant it, then repeat the same series of motions with a second leg. In contrast, a person inline skating performs a repeated sequence of pushing, coasting and liftoff for each leg. For a particular individual, the series of walking motions will usually occur in about the same amount of time, and the series of skating motions will usually occur in about the same amount of time. The repeated set of motions can be considered a unit, and defines the motion cycle. The amount of time that it takes to complete one motion cycle defines the motion cycle's period, and the number of motion cycles that occur in a given unit of time define the motion cycle's cadence.
In one embodiment, filtered measurement data may be passed on to the cadence logic 232. The cadence logic 232 may determine a period and/or cadence of a motion cycle. The period and/or cadence of the motion cycle is generally based upon user activity (e.g. inline skating, biking, running, walking, etc). In one embodiment, the motion cycle's period is updated after each periodic human motion. The current motion cycle period may be a rolling average of the motion cycle periods over the previous set of motions of the same activity type. This rolling average data may be received from the rolling average logic 235, as discussed in more detail below.
In one embodiment, the cadence logic 232 maintains one or more cadence windows. A cadence window is a window of time since a last periodic human motion was counted that is looked at to detect a new periodic human motion. When motion criteria (e.g., threshold conditions) are met within a cadence window, a periodic human motion is detected, whereas when motion criteria are met outside of the cadence windows no periodic human motion is detected. A cadence window may be used to facilitate accurate measurement of a periodic human motion (e.g., a step, inline skating stride, bicycle pedal, rowing stroke, etc.).
A cadence window may be set based on the period and/or cadence of the actual motion cycle (e.g., a stepping period), on set limits, and/or on other determiners. In one embodiment, the cadence window is determined by measuring lengths of time since the most recent periodic human motion was counted. In one embodiment, the cadence window is a dynamic cadence window that continuously updates as a user's cadence changes during a particular activity. For example, using a dynamic cadence window, a new cadence window length may be set after each periodic human motion. If no previous periodic human motions have been detected, or if fewer than a set number of periodic human motions to determine a dynamic cadence window have been detected, a default cadence window may be used. Once enough periodic human motions have been detected to determine a dynamic motion cycle cadence or period, the cadence window may be set to the determined motion cycle period plus or minus an error factor. In one embodiment, a count of between about two to about ten periodic human motions is sufficient to set a dynamic cadence window.
In one embodiment, a separate cadence window may be maintained for each identifiable user activity. Each identifiable user activity may have, for example, a unique default cadence window. When no specific current user activity has yet been identified, these separate cadence windows may be maintained concurrently for each of the possible user activities. Periodic human motions that occur outside of a default cadence window may indicate that the associated user activity is currently not being performed.
Once the motion cycle's period is detected, the cadence logic 232 may set one or more sample periods for the rolling average logic 235 to use based upon the motion cycle's period. A sample period can include a specified time frame over which obtained measurements are used to perform a calculation. In one embodiment, the sample period(s) are set such that at least one sample period is approximately the length of, or longer than, the motion cycle's period. In one embodiment, a sample period is set such that it is a multiple of the motion cycle's period.
In one embodiment, the rolling average logic 235 may receive filtered measurement data from the filter 220 and one or more sample periods from the cadence logic 232. The rolling average logic 235 creates one or more rolling averages of accelerations as measured by the inertial sensor(s) over the sample period(s) set by the cadence logic 232. The rolling averages of accelerations may be used for determining an orientation of the electronic device, for determining thresholds to compare acceleration measurements against, and/or for other purposes. In one embodiment, the rolling average logic 235 creates one or more rolling averages of accelerations for determining an orientation of the electronic device 200, at least one rolling average having a period that is at least the motion cycle's period. In one embodiment, the rolling average logic 235 creates a rolling average of accelerations for determining a lower threshold to compare acceleration measurements against, the rolling average having a sample period that is at least twice the stepping period.
The rolling average logic 235 may create one or more rolling averages of data other than accelerations. In one embodiment, the rolling average logic 235 creates a rolling average of motion cycle periods, where the rolling average is the rolling average time between periodic human motions. In one embodiment, the rolling average of motion cycle periods is calculated over the past four counted periodic human motions. The rolling average of the motion cycle periods may be used by the cadence logic 232 to dynamically determine a cadence window and a current motion cycle cadence.
In one embodiment, rolling averages may be maintained in registries that keep track of rolling average values and the number of samples that were used to calculate current rolling average values. When a new measurement is taken, it can be incorporated into the rolling average value, and the registry can than be updated with a new rolling average value. Alternatively, the rolling averages may be maintained by buffering the measurements used to calculate the rolling averages. As the buffers fill, oldest measurement data can be discarded and replaced by new measurement data. The measurements in the buffer can be averaged after each measurement to determine a new rolling average.
In one embodiment, the dominant axis logic 227 receives at least filtered acceleration data from the filter 220, and rolling averages of accelerations from the rolling average logic 235. In one embodiment, the dominant axis logic 227 receives only rolling averages of accelerations from the rolling average logic 235. The dominant axis logic 227 may assign a dominant axis based on the received information.
In one embodiment, the dominant axis logic 227 determines an orientation of the electronic device and/or the inertial sensor(s) within the motion identification system 200. The orientation may be determined based upon the rolling averages of accelerations created by the rolling average logic 235. In one embodiment, once the orientation is determined, a dominant axis is assigned based upon the orientation. Determining an orientation of the electronic device may include identifying a gravitational influence. The axis with the largest absolute rolling average may be the axis most influenced by gravity, which may change over time (e.g. as the electronic device is rotated). Therefore, a new dominant axis may be assigned when the orientation of the electronic device and/or the inertial sensor(s) attached to or embedded in the electronic device changes.
In one embodiment, the axis with the largest absolute rolling average over the sample period is assigned as the dominant axis. In one embodiment, the dominant axis does not correspond to one of the actual axes of the inertial sensor(s) in a current orientation, but rather to an axis that is defined as approximately aligned to gravity. In one embodiment, the dominant axis corresponds to a virtual axis that is a component of a virtual coordinate system. In one embodiment, the dominant axis setting logic 240 assigns the dominant axis by performing a true gravity assessment, such as by doing trigonometric calculations on the actual axes based on the gravitational influence. In one embodiment, the dominant axis setting logic 240 assigns the dominant axis by comparing the gravitational influence to a data structure such as a lookup table, associative array, hash table, adjacency matrix, etc.
In one embodiment, the dominant axis is determined based on criteria other than a device orientation in relation to gravity. For example, the dominant axis may be determined based on an axis that has a greatest peak to peak variation within a motion cycle. In one embodiment, multiple dominant axes are assigned, each dominant axis being associated with a different user activity. Each of the dominant axes may be assigned based on criteria specific to an associated user activity. For example, a first dominant axis may be assigned to the user activity of walking based on an axis that is most influenced by gravity, and a second dominant axis may be assigned to the user activity of bicycling based on an axis that has the greatest peak to peak variance.
The activity identification engine 280 may receive as an input filtered acceleration measurement data from the filter 220. The activity identification engine 280 may also receive a cadence and/or period of a current motion cycle from the cadence logic 232, a current cadence window from the cadence logic 232, rolling averages (e.g., of accelerations) from the rolling average logic 235, and one or more dominant axes from the dominant axis logic 227.
In one embodiment, the activity identification engine 280 includes multiple activity identification logics 285. In one embodiment, each of the activity identification logics 285 is set up to determine whether the current acceleration data defines a particular activity. Alternatively, activity identification logic 285 may be capable of identifying two or more different activities. In one embodiment, the activity identification engine 280 includes only a single activity identification logic 285, which is used to identify all identifiable user activities. Alternatively, there may be separate activity identification logics 285 for each activity, there may be separate activity identification logics 285 for each activity type, or there may be separate activity identification logics 285 based on some other criteria.
An activity identification logic 285 identifies a specific user activity by monitoring for acceleration data indicative of that type of activity. The acceleration data is analyzed and the activity identification logic 285 may make its determination based on one or more of the received acceleration data, motion cycle cadence, motion cycle period, cadence windows, rolling averages, and dominant axes. In one embodiment, when enough events indicative of a particular user activity are detected by an activity identification logic 285, the activity identification engine 280 notifies the motion processor 230 that the identified activity is being performed by the user. In one embodiment, each time an activity identification logic 285 detects an event indicative of a particular type of activity, that event is forwarded to the motion processor 230. The motion processor 230 may then determine whether the user is performing the activity associated with the received event or received events. In one embodiment, the activity identification logics 285 also monitor for negative events that indicate that a user is not, performing a particular user activity. These negative events may also be used by the activity identification engine 280 and/or the motion processor 230 to identify a current user activity.
FIGS. 3A and 3B illustrate examples of motion data which may be used by an activity identification logic that identifies bicycling by monitoring for positive and negative bicycling events, in accordance with embodiments of the present invention. FIG. 3A illustrates a first exemplary motion cycle graph 300 that shows a user engaged in a first user activity as analyzed by an activity identification logic that identifies bicycling, in accordance with one embodiment of the present invention. The exemplary motion-cycle graph 300 shows acceleration data taken with a single tri-axis inertial sensor. The acceleration at a given period of time is represented for a first axis 303, a second axis 305, and a third axis 307.
The bicycling identification logic monitors for positive events and negative events that occur when certain motion criteria are satisfied. In one embodiment, the bicycling identification logic uses a dominant axis that is defined by measuring the axis with the largest peak to peak difference. In the illustrated figure, the first axis 303 is the dominant axis, because it has the greatest peak to peak difference. In one embodiment, the bicycling identification logic only examines acceleration data along the dominant axis.
In one embodiment, the bicycling identification logic uses a rolling average of accelerations 310 for the dominant axis to set a first threshold 315 and a second threshold 320. The first threshold 315 and second threshold 320 may be set based on offsets from the rolling average of accelerations 310. Alternatively, the first threshold 315 and second threshold 320 may be set based on a percentage of the peak to peak difference, on a percentage of the average of the peak to peak difference, on a percentage of half of the peak to peak difference, or on other criteria. For example, the first threshold 315 may be set at 25% of the peak to peak difference, and the second threshold 320 may be set at 75% of the peak to peak difference.
A first periodic human motion may be detected when the first threshold 315 is first crossed 325 (moving away from zero). This may trigger a positive bicycling event. A second periodic human motion may be detected when the first threshold 315 is crossed a second time 330 (moving away from zero). In one embodiment, if the first threshold 315 is crossed a second time 330 while within a cadence window 345, a positive bicycling event may be triggered. If the first threshold 315 is not crossed 330 while within the cadence window 345, a negative bicycling event may be triggered. The cadence window 345 has a cadence window minimum 343 that opens the cadence window 345 some period of time after the first threshold 315 is first crossed 325, and a cadence window maximum 347 that closes the cadence window 345 some period of time thereafter. In the illustrated example, the first threshold 315 is crossed within the cadence window 345, triggering a positive bicycling event.
The second threshold 320 may be used by the bicycling identification logic to determine a peak shape for the acceleration measurements along the first axis 303. In one embodiment, the bicycling identification logic notes each time the second threshold 320 is crossed. In one embodiment, if the time between when the second threshold 320 is first crossed 335 and second crossed 340 is less than a peak window 350, then a negative bicycling event may be triggered. If the time between when the second threshold 320 is first crossed 335 and second crossed 340 is greater than or equal to the peak window 350, then a negative bicycling event may not be triggered. In one embodiment, if the second threshold 320 is crossed within 25-35% or 65-75% of the average of the motion cycle's period, the peak is too steep, and a negative event is triggered. In one embodiment, if the second threshold 320 is crossed within certain percentages of the average of the motion cycle's cadence, a negative event is triggered. In the illustrated example, no negative bicycling events are triggered. Moreover, the illustrated example shows an embodiment in which a sufficient number of positive events are triggered to identify the current user activity as bicycling.
FIG. 3B illustrates a second exemplary motion cycle graph 350 that shows a user engaged in a second user activity as analyzed by an activity identification logic that identifies bicycling, in accordance with one embodiment of the present invention. The exemplary motion-cycle graph 350 shows acceleration data taken with a single tri-axis inertial sensor. The acceleration at a given period of time is represented for a first axis 353, a second axis 355, and a third axis 357.
The bicycling identification logic monitors for positive events and negative events that occur when certain motion criteria are satisfied. In one embodiment, the bicycling identification logic uses a dominant axis that is defined by measuring the axis with the largest peak to peak difference. In the illustrated figure, the second axis 355 is the dominant axis, because it has the greatest peak to peak difference.
In one embodiment, the bicycling identification logic uses a rolling average of accelerations 360 for the dominant axis to set a first threshold 365 and a second threshold 370. A first periodic human motion may be detected when the first threshold 365 is first crossed 375 (moving away from zero). This may trigger a positive bicycling event. A second periodic human motion may be detected when the first threshold 365 is crossed a second time 380 (moving away from zero). In one embodiment, if the first threshold 320 is crossed a second time 380 while within a cadence window 398, a positive bicycling event may be triggered. If the first threshold 365 is not crossed 380 while within the cadence window 398, a negative bicycling event may be triggered. In the illustrated example, the first threshold 365 is crossed within the cadence window 398, triggering a positive bicycling event.
The second threshold 370 may be used by the bicycling identification logic to determine a peak shape for the acceleration measurements along the second axis 355. In one embodiment, the bicycling identification logic notes each time the second threshold 370 is crossed. The time between when the second threshold 370 is first crossed 385 and second crossed 388 is less than a peak window 390, triggering a negative bicycling event. The negative bicycling event may reset a counter that counts a number of positive bicycling events. Each illustrated peak would trigger a negative bicycling event. Therefore, not enough positive bicycling events are triggered to identify the current user activity as bicycling.
Returning to FIG. 2, the motion processor 230 may receive positive and negative events from the activity identification logics 285 of the activity identification engine 280. The motion processor 230 may also receive dominant axis data from the dominant axis logic 227, rolling average data from the rolling average logic 235, a cadence and period for a current motion cycle from the cadence logic 232, cadence windows from the cadence logic 232, and filtered acceleration data from the filter 220. The motion processor 230 may include a counting logic 260, mode logic 255, and one or more count buffers 265.
In one embodiment, the mode logic 255 receives positive and negative events from the activity identification logics 285. The mode logic 255 may then determine an appropriate mode for the counting logic 260 based on the received events. The mode logic 255 may also determine an appropriate mode based on the count buffers 265. For example, in one embodiment, while in an entry mode, the first count buffer to reach a predetermined value determines which active mode to initiate. In one embodiment, the mode logic 255 includes a plurality of active modes, each active mode corresponding to a different activity. In one embodiment, the mode logic 255 includes an entry mode, an exit mode and a sleep mode. Operating modes are discussed in greater detail below in reference to FIG. 5.
The counting logic 260 may receive data from the dominant axis logic 227, rolling average logic 235, cadence logic 232 and filter 220. The counting logic 260 may use this data to count periodic human motions. In one embodiment, the behavior of the counting logic 260 is determined by its current operating mode.
The counting logic 260 may determine which measurements to use to determine if a periodic human motion has occurred. In one embodiment, the counting logic 260 may monitor accelerations relative to the dominant axis, and select only those measurements with specific relations to the dominant axis for measurement. For example, only accelerations that are approximately parallel to the dominant axis may be selected (e.g., in walking active mode), or alternatively, only accelerations that are approximately perpendicular to the dominant axis may be selected (e.g., in rowing active mode). In one embodiment, the counting logic 260 selects only measurements of acceleration data along the dominant axis. In alternative embodiments, measurements of acceleration data along other axes may also be used.
Selected measurements may be compared to motion criteria to determine whether a periodic human motion has occurred, and to determine what type of periodic human motion has occurred. Examples of motion criteria include comparisons of current measurements to previous measurements, comparisons of current measurements to threshold values, slope analysis, curve fitting analysis, peak analysis, etc. In one embodiment, the same criteria that are used to identify events by the activity identification logics are also used to count periodic human motions. Alternatively, different criteria may be used. In one embodiment, the motion criteria used are dependent on a current operating mode of the counting logic 260.
The count buffers 265 keep track of a probable count of periodic human motions. In one embodiment, the motion processor 230 includes a plurality of count buffers 265, each associated with a different user activity. Alternatively, a single count buffer may be used to buffer periodic human motions for two or more user activities. In one embodiment, a single count buffer 265 maintains buffers for all user activities.
The exact behavior of the count buffers 265 may depend on the operating mode of the counting logic 260. For example, in entry mode, a separate count buffer may be maintained for each possible user activity. When the system identifies a periodic human motion that meets the criteria of a particular user activity, the count buffer corresponding to that user activity may be incremented. A detected periodic human motion may meet the criteria for a number of different user activities. Until a current user activity is identified, in one embodiment such motion would be counted by each of the corresponding count buffers 265.
Depending on the current mode, when one of the count buffers 265 reaches a certain number, that count buffer may be emptied, and the motion log 275 updated by the count from the count buffer. This may also cause the motion logic 255 to place the counting logic 260 in an active mode appropriate to the count buffer that was emptied. The number of periodic human motions that must be counted by the a count buffer before they are moved to the motion log 275 may vary from one to ten or more, depending on the current operating mode. Moreover, count buffers corresponding to different user activities, may have different count requirements.
The motion log 275 keeps track of the total number of periodic human motions that have occurred, and the associated activities. In one embodiment, this data is transmitted to a server or remote database. The output of the motion log 275, in one embodiment, is made available to the user. In one embodiment, the user can view the various activities, and associated data through a web page.
FIG. 4A illustrates a flow diagram for a method 400 of monitoring human activity using an inertial sensor, in accordance with one embodiment of the present invention. The method may be performed by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as instructions run on a processing device), or a combination thereof. In one embodiment, method 400 is performed by the electronic device 100 of FIG. 1. In one embodiment, method 400 is performed by the motion identification system 200 of FIG. 2.
Referring to FIG. 4A, method 400 begins with monitoring accelerations (block 405). Accelerations may be monitored with an inertial sensor, or other acceleration monitoring device. The monitored acceleration may include filtered and processed acceleration data, as described above. At block 410, the motion is identified as corresponding to one of a plurality of user activities based on the accelerations. At block 415, periodic human motions are counted appropriate to the identified activity. Examples of identifiable user activities include, walking, running, inline skating, rowing, exercising on an elliptical machine, and bicycling. Other user activities may also be identified.
Periodic human motions corresponding to multiple different predetermined user activities may be identified in embodiments of the present invention. Moreover, in one embodiment, new user activities may be added to the list of recognized periodic human motions. To add such periodic human motions to the predetermined user activities, a user may record a new user activity.
FIG. 4B illustrates a flow diagram for a method 450 of recording a motion profile, in accordance with one embodiment of the present invention. Method 450 may be used to record new user activities, or to calibrate existing user activities to a particular user. Calibration of existing user activities may improve counting accuracy. The method 450 may be performed by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as instructions run on a processing device), or a combination thereof. Method 450 may be performed by the electronic device 100 of FIG. 1, and by the motion identification system 200 of FIG. 2.
Referring to FIG. 4B, the method 450 begins by receiving a command to record a motion profile (block 455). At block 460, input is received that indicates the user activity for which the motion profile will be recorded. In one embodiment, the system may enable the user to select one of a displayed list of existing user activities. In one embodiment, the user may select one of the displayed user activities or may choose to identify a new user activity to be associated with the motion profile. If a motion profile is to be recorded for a new user activity, the user may be prompted to enter a name for the new user activity.
At block 465, a command is received to begin recording. At block 470, measurements of accelerations are recorded. The measurements of accelerations are recorded while a user performs the user activity for which a motion profile is to be recorded.
At block 475, the process determines whether the recorded measurements define a unique pattern. In one embodiment, measurements of accelerations are recorded until a unique pattern can be determined. A unique pattern differentiates the recorded pattern from other motion profiles.
If a unique pattern has not yet been identified, the process determines if the user has stopped the recording and/or motion, at block 480. In one embodiment, if the user stops recording before such a unique pattern is identified, the system prompts the user to continue recording, at block 485. The process then returns to block 470 to continue recording motion data. If the user has not stopped the recording, the process continues directly to block 470. The time to determine a pattern may range from recording a single motion cycle, to recording many motion cycles, which may occur over a single second to minutes. In one embodiment, user input may be received to specify the period of a current motion cycle. For example, a user may push a button, make a certain movement, make a loud noise, etc. each time a new periodic human motion ends (e.g., each time a step is completed). This may reduce the number of motion cycles that need to be recorded in order to determine a pattern from the recorded measurements. Alternatively, the period of the motion cycle is determined without user input. In one embodiment, the system utilizes at least two full motion cycles to identify the pattern.
If at block 475, a unique pattern has been identified, the process continues to block 490. In one embodiment, the user is notified that the new activity pattern has been successfully identified. At block 490, in on embodiment a motion cycle average may be determined for the activity. Once a unique pattern of accelerations is determined for the activity, at block 495, the motion profile may be added to either an existing user activity or to a new user activity.
The unique pattern of accelerations may also be used to determine (set) positive and/or negative events for the activity. For example, if the unique pattern of accelerations shows a repeated sharp acceleration peak along a dominant axis, a sharp acceleration peak along the dominant axis may be added as a new positive event and/or a gradual peak along the dominant axis may be added as a new negative event. If method 450 was initiated to calibrate an existing user profile, the calibration may include adding new positive and/or negative events to the existing positive and/or negative events. If method 450 was initiated to record a new activity, new positive and/or negative events may be assigned to facilitate future identification of the new activity.
FIG. 5 shows a state diagram for the behavior 500 of a system for monitoring human activity, in accordance with one embodiment of the present invention. The system may have multiple operating modes (states) that are navigated between by processing logic that may comprise hardware (e.g., circuitry, dedicated logic, programmable logic, microcode, etc.), software (such as instructions run on a processing device), or a combination thereof. In one embodiment, behavior 500 is the behavior of the electronic device 100 of FIG. 1. In one embodiment, behavior 500 is the behavior of the electronic device or inertial sensor(s) within motion identification system 200 of FIG. 2.
The behavior 500 may include multiple operating modes for monitoring human activity: a sleep mode, an entry mode, one or more active modes, and an exit mode. In alternative embodiments, more or fewer modes may be used. In one embodiment, only two modes are used: active mode and non-active mode. The active mode is entered once periodic human motions are detected, while the non-active mode is used for all other states. In alternative embodiments, multiple inactive modes and/or active modes are used. To navigate between modes, certain conditions must be met. The conditions may include exit conditions for terminating an active mode and entry conditions for initiating inactive modes. Each mode has one or more exit and entry conditions.
Use of different conditions for different operating modes increases the reliability of the device that is monitoring the human activity. For example, once an object (e.g., a person) is moving, they are more likely to remain moving than to stop. Likewise, if a person is not moving, they are more likely not to move than to begin moving. Moreover, if a person is running, he is more likely to continue running than to begin bicycling. These principles can be applied by requiring more stringent conditions to be met for a device to initiate an active mode than to continue the active mode. The different modes may each have rules that reflect what is more likely to happen for subsequent measurements. This may reduce or eliminate the number of uncounted periodic human motions and/or false periodic human motion counts.
Referring to FIG. 5, operating modes in one embodiment include a sleep mode 505, an entry mode 515, an active mode 525, and an exit mode 535. In one embodiment, the power level of the system or device is linked to these modes.
The first mode initiated is the sleep mode 505. When no activity (acceleration) is detected, the system remains in sleep mode 505. When acceleration is detected, an entry mode 515 is initiated. In one embodiment, in sleep mode 505 the inertial sensor has a slow sample rate, thereby reducing power consumption of the system.
Once in entry mode 515, in one embodiment the sampling rate of the inertial sensor is increased to ensure that acceleration is monitored to detect periodic human motions. In entry mode 515, periodic human motions appropriate to all identifiable user activities may be monitored. Therefore, in one embodiment, the sampling rate is sufficiently high to properly detect the fastest possible activity. When entry conditions are satisfied for a particular user activity, an appropriate active mode 525 is initiated. The sampling rate is then adjusted to be appropriate for the activity being detected, in one embodiment. If no entry conditions for any of the identifiable user activities are detected in a period of time, sleep mode 505 is reinitiated. In one embodiment, sleep mode 505 is only initiated if no motion is detected.
Once in the appropriate active mode 525, acceleration data is monitored to count periodic human motions according to a predefined set of rules or motion criteria. According to one of these criteria, periodic human motions are expected to occur within a set interval (e.g., within a cadence window). When a periodic human motion is counted within the set interval, then the current active mode 525 is continued. When a periodic human motion is not detected within the set interval, an expected periodic human motion has not occurred, and an exit mode 535 is initiated.
In exit mode 535, processing logic determines whether re-entry conditions are met. When the re-entry conditions are met, the appropriate active mode 525 is reinitiated. If the re-entry conditions are not met within a certain time frame, the process initiates entry mode 515 again. From entry mode 515, any appropriate active mode 525 may again be entered into if certain entry conditions are satisfied, or the process may return to sleep mode 505.
FIG. 6 illustrates a flow diagram for a method 600 of operating an electronic device in sleep mode, in accordance with one embodiment of the present invention. In one embodiment, method 600 corresponds to the sleep mode 505 of FIG. 5. In one embodiment, the method 600 may begin when no relevant acceleration has been detected for a predetermined time interval, or when no periodic human motions have been detected for a predetermined time interval. In one embodiment, when no acceleration above a threshold value is detected for a set period of time, the sleep function is initiated. In another embodiment, when a motion signature indicative of an activity that does not need to be monitored is detected, the sleep function is initiated. For example, when the motion signature of driving is detected, the sleep function may be initiated. The time period that elapses before the sleep mode is initiated may be a fixed value, or it may be adjusted automatically by processing logic or based on user input (e.g. in response to a user selection of desired battery longevity versus desired performance, or based on the last measured cadence window).
Referring to FIG. 6, method 600 begins with setting a sleep mode sampling rate (block 605). In one embodiment, a low sampling rate is set. This reduces power consumption and prolongs battery life. In one embodiment, the sleep mode sampling rate is a fixed value. In alternative embodiments, the sleep mode sampling rate can be modified automatically by processing logic based on certain criteria such as time of day, user behavior patterns, etc., or based on user input.
In one embodiment, a sampling function is periodically executed in sleep mode, wherein the sampling function samples acceleration data at a set sampling rate for a set time period. For example, the sampling function may be executed every ten seconds for the duration of one second, and a sampling rate of fifty measurements per second may be set for that one second of operation. In one embodiment, the sampling function repeats at a relatively slow rate (e.g., once every 10 seconds), and the sampling rate within the sampling function is relatively high (e.g., 50 Hz). The sampling function may be used to detect unwanted motion signatures, or to maintain a device in low power sleep mode, for example, while a user is driving in a car.
In one embodiment, the sleep mode sampling rate is set to zero. The sleep mode sampling rate may be set to zero, for example, when an inertial sensor has ‘inertial wakeup’ functionality. Inertial wakeup functionality enables processing logic to switch from sleep mode to entry mode when an acceleration exceeding a set threshold is detected. The inertial wakeup may be used to simultaneously exit sleep mode and power-up additional functionality.
At block 610, measurements of acceleration data are taken. At block 615, processing logic determines whether or not relevant acceleration is detected. Relevant acceleration includes acceleration that meets certain criteria. In one embodiment, the criteria include a lower threshold and an upper threshold. In alternative embodiments, other criteria may also be used, such as a requirement that acceleration be continuously measured for a preset time period.
When no relevant acceleration is detected, or when the ‘inertial wakeup’ pin has not triggered (for inertial sensors having ‘inertial wakeup functionality’), sleep mode continues, and further measurements of acceleration data are taken at the set sleep mode sampling rate (block 610). When acceleration is detected, sleep mode is terminated and entry mode is initiated (block 620). In one embodiment, the acceleration that is detected and its rate of change must meet certain criteria to terminate sleep mode.
FIG. 7A illustrates a flow diagram for a method 700 of operating an electronic device in entry mode, in accordance with one embodiment of the present invention. In one embodiment, method 700 corresponds to the entry mode 515 of FIG. 5. The entry mode may be initiated when a user first begins an activity in which periodic human motions may be detected. In one embodiment, the method 700 begins when any relevant acceleration is detected. In one embodiment, entry mode is initiated when a measurement of acceleration that meets certain criteria has been detected. In one embodiment, method 700 is initiated when a sleep mode is terminated. In one embodiment, method 700 is performed concurrently by each of the activity identification logics 285 of FIG. 2 when the motion identification system 200 and/or the counting logic 280 of the electronic device are in entry mode.
Referring to FIG. 7A, method 700 begins by setting the sampling rate to an active sampling rate (block 704). The active sampling rate is set to facilitate accurate measurements of periodic human motions, and may be a fixed or a dynamically variable rate. A variable sampling rate may automatically adjust depending on a period of a detected motion cycle's cadence, may be user adjusted, may adjust based on applications being run by processing logic, or by other means. The active sampling rate may be set to anywhere between about 10 and about 200 Hz. In one embodiment, the active sampling rate is set to about 15 to 40 Hz.
At block 710, a first periodic human motion is recognized. Since no previous periodic human motions have been measured, and there is no cadence window, the first periodic human motion may be recognized at any time. Once a first periodic human motion is recognized, a default cadence window is set (block 714). The default cadence window may have a minimum and maximum such that periodic human motions will be counted for most or all possible motion cycle cadences. A different default cadence window may be set for each activity. In one embodiment, a separate instance of method 700 is run for each instance of an activity identification logic.
In one embodiment, an initial default value for the cadence window is set wide enough to accommodate all users. In one embodiment, the cadence window is then dynamically adjusted to match the specific user. Processing logic may ‘learn’ (adapt to) a particular user, and may become more accurate as periodic human motions are counted. Processing logic that has the ability to learn or adapt to different users may create an individualized profile for each user. Multiple profiles may also be created for each user, the different profiles reflecting different user activities. For example, a first profile might be created for a user's running and a second profile may be created for a user's walking. Processing logic may switch between different profiles automatically, or manually based on user input. In one embodiment, processing logic compares a current cadence and/or motion cycle pattern to stored profiles. When a current cadence or motion cycle pattern matches that of a stored profile, that profile may be activated.
At block 720, a buffered count is set to one. At block 724, processing logic determines whether an additional periodic human motion is recognized. An additional periodic human motion may be recognized if a particular measurement of acceleration meets all the necessary criteria. Different criteria may be necessary for each of the different user activities. One embodiment of these criteria is discussed below with reference to FIG. 10.
Returning to FIG. 7A, if an additional periodic human motion is recognized, method 700 continues to block 744. If no additional periodic human motions are recognized, then processing logic determines whether the time is still within the cadence window (block 730). If there is still time within the cadence window, the process returns to block 724. If the cadence window has closed, then the buffered count is reset to zero (block 734). The process then continues to block 740.
At block 740, processing logic determines whether any relevant acceleration is detected. If no relevant acceleration is detected, then sleep mode is initiated (block 742). If some relevant acceleration is detected, then processing logic returns to block 710 to await recognition of another periodic human motion. If at block 740 an additional periodic human motion was recognized, the process continues to block 744.
At block 744, an additional periodic human motion is added to the buffered count. Processing logic then checks whether any negative events have been recognized (745). A negative event is an indicator that the motion does not belong to the activity category being tested. If a negative event is recognized, then the process continues to block 734, and the buffered count is reset to zero. If a negative event is not recognized, then the process continues to block 746.
At block 746 the process determines whether another user activity associated with a different instance of method 700 has been identified. If another user activity has been identified, then the process ends. If no other user activity has been identified yet, then the process continues to block 748.
At block 748, processing logic checks whether there are N periodic human motions in the buffered count. When there are not yet N periodic human motions in the buffered count, the process returns to block 724 to continue in entry mode. When the number of periodic human motions in the buffered count reaches N, the buffered periodic human motions are added to a motion log, and an appropriate active mode is entered into (block 749).
FIG. 7B illustrates a flow diagram for a method 750 of operating an electronic device in entry mode, in accordance with another embodiment of the present invention. In one embodiment, method 750 corresponds to the entry mode 515 of FIG. 5. The entry mode may be initiated when a user first begins an activity in which periodic human motions may be detected. In one embodiment, the method 750 begins when any relevant acceleration is detected. In one embodiment, entry mode is initiated when a measurement of acceleration that meets certain criteria has been detected. In one embodiment, method 750 is initiated when a sleep mode is terminated.
Referring to FIG. 7B, method 750 begins by setting the sampling rate to an active sampling rate (block 754). The sampling rate, in one embodiment, depends on the highest sampling rate required by a potentially recognizable activity.
At block 757, a first periodic human motion is recognized for each identifiable user activity. Since no previous periodic human motions have been measured, and there is no cadence window, the first periodic human motion may be recognized at any time. Once a first periodic human motion is recognized, default cadence windows are set (block 760). Default cadence windows may be set for each type of identifiable user activity.
At block 763, a buffered count is set to one for each of the identifiable user activities. At block 765, processing logic determines whether additional periodic human motions are recognized for each of the identifiable user activities. Different criteria may be used to separately determine whether an additional periodic human motion is recognized for each of the user activities.
For user activities for which an additional periodic human motion is recognized, method 750 continues to block 783. Concurrently, for user activities for which no additional periodic human motion is recognized, the process continues to block 770. At block 770, the process determines whether the time is still within the appropriate cadence window for each appropriate user activity. If there is still time within the appropriate cadence window, the process returns to block 765 for that user activity. If the cadence window has closed, then the appropriate buffered count is reset to zero (block 775). The process then continues to block 777.
At block 777, processing logic determines whether any relevant acceleration is detected. If no relevant acceleration is detected for any of the user activities, then sleep mode is initiated (block 779). If some relevant acceleration is detected for any user activity, then processing logic returns to block 757 to await recognition of another first periodic human motion for the appropriate user activity.
If at block 765 an additional periodic human motion was recognized, the process continues to block 783 for the appropriate user activity, and an appropriate periodic human motion is added to an appropriate buffer count.
At block 788, processing logic checks whether any negative events have been recognized for each appropriate user activity. For user activities for which a negative event is recognized, the process continues to block 775, and the appropriate buffered count is reset to zero. For user activities for which no negative event is recognized, the process continues to block 790.
At block 790 the process determines whether sufficient periodic human motions have been recognized to identify a current user activity. If sufficient periodic human motions have been recognized for a particular user activity, the process continues to block 795. At block 795, the entries in the appropriate buffered count are added to the motion log, and an active mode is initiated for the identified activity.
FIG. 8 illustrates a flow diagram for a method 800 of operating an electronic device in an active mode, in accordance with one embodiment of the invention. In one embodiment, method 800 corresponds to the appropriate active mode 525 of FIG. 5. The active mode may be initiated when a particular user activity has been identified. In one embodiment, method 800 is initiated when an entry mode is terminated, and/or when an exit mode is terminated.
Referring to FIG. 8, method 800 begins by setting a cadence window (block 810). The cadence window may be set based on previous measurement data. In one embodiment, the cadence window is set based on a rolling average of motion cycle periods. In one embodiment, the cadence window may be identical to an appropriate cadence window used during entry mode. Once the cadence window is set, measurement data is checked to determine whether an additional periodic human motion is recognized (block 815). If an additional periodic human motion is recognized, then it is added to the motion log (block 820). If no additional periodic human motion is recognized, then the process determines whether a negative event has been recognized 822. If a negative event has been recognized, the process continues to block 830, and exit mode is initiated. If no negative event has been recognized, the process continues to block 825.
At block 825, the process determines whether the current measurement was taken within the cadence window. If the cadence window has not elapsed, the process returns to block 815. If the cadence window has elapsed, then an expected periodic human motion was not counted, and an exit mode is initiated (block 830).
FIG. 9 illustrates a flow diagram for a method 900 of operating an electronic device in exit mode, in accordance with one embodiment of the present invention. In one embodiment, method 900 corresponds to the exit mode 535 of FIG. 5. The exit mode may be entered into when an expected periodic human motion is not identified in an active mode.
In one embodiment, the requirement(s) for changing from exit mode to an active mode are less strict than the requirement(s) for switching from entry mode to an active mode. Processing logic may assume that when a user has recently performed a periodic human motion, the user is most likely repeat the same periodic human motion. For example, a user who is inline skating is much more likely to continue skating movements than to break into a jog. Processing logic may also assume that if a user is currently inactive, it is most likely that the user will remain inactive. These assumptions may be implemented by imposing more stringent requirements to switch from entry mode to an active mode than to change from exit mode to an active mode. The requirements to remain in an active mode may be even less stringent than the requirements to initiate the active mode, whether from the entry mode or from the exit mode.
An expected periodic human motion may not be identified, for example, when a user stops moving, when extraneous movements such as gestures are made that interfere with the periodic human motion count, or when a device orientation is changed as a periodic human motion occurs. In one embodiment, the exit mode assumes that a periodic human motion has been missed, so that if the exit mode determines that a user is still continuing the same activity, the originally uncounted periodic human motion is not missed.
The process begins by initiating a timer (block 905). The timer measures the amount of time that has passed since a periodic human motion has been identified. In one embodiment, the timer is a countdown timer that terminates exit mode when the timer reaches zero. In one embodiment, the timer starts counting when a cadence window minimum is reached, and stops counting when a cadence window maximum is reached. In an alternative embodiment, the timer starts counting as soon as the exit mode is initiated, and stops counting when a cadence window maximum is reached.
At block 910, a periodic human motion is added to a buffered count. At block 915, processing logic determines whether the buffered count is equal to X, where X is the number of identified periodic human motions that, when reached, return processing logic to an appropriate active mode. In one embodiment, X is between 3 and 8. In one embodiment, the value of X is dependent upon the specific active mode that exit mode was initiated from. If the buffered count is equal to X, then the buffered periodic human motions are added to motion log and the previous (appropriate) active mode is reinitiated (block 920). If the buffered count is not equal to X, then processing logic proceeds to block 925.
At block 925, processing logic determines whether the timer has timed out (allotted time has elapsed). In one embodiment, the timer times out when no periodic human motions are counted within a cadence window. In one embodiment, the timer times out when no periodic human motions are counted in two or more cadence windows. If the allotted time has elapsed, then the buffered count is cleared, and entry mode is initiated (block 930). If the allotted time has not elapsed, then processing logic determines whether a negative event has occurred (block 932). If a negative event has occurred, the method returns to block 930. If no negative event has occurred, the method proceeds to block 935.
At block 935, processing logic determines whether an additional periodic human motion is recognized. If an additional periodic human motion is recognized, then the timer is reset (block 905), the buffered count is incremented by one (block 910), and on the process continues to block 915. If a periodic human motion is not recognized, then processing logic returns to block 925 to determine whether the timer has elapsed.
FIG. 10 illustrates a flow diagram for a method 1000 of recognizing a periodic human motion, in accordance with one embodiment of the present invention. In one embodiment, method 1000 may be executed by blocks 710 and 724 of FIG. 7A, blocks 757 and 765 of FIG. 7B, block 815 of FIG. 8 and block 935 of FIG. 9. In one embodiment, method 1000 is performed by electronic device 100 of FIG. 1, or the motion identification system 200 of FIG. 2.
Referring to FIG. 10, the process begins with measurements of acceleration data being taken (block 1005). Measurements are taken according to a sampling rate, which may vary. In one embodiment, the sampling rate may range from one measurement per second to many measurements a second, depending on the operating mode being used.
At processing block 1010, in one embodiment measurements are filtered. Measurements can be filtered to remove high frequency data and/or low frequency data. In one embodiment, what data to filter depends on the type of user activity being detected. At processing block 1012, in one embodiment the inertial sensor is oriented by assigning a dominant axis. Assigning a dominant axis may include calculating rolling averages of acceleration and assigning the dominant axis based on the rolling averages of acceleration. Assigning the dominant axis may also include determining which axis has the largest peak to peak difference.
At block 1015, processing logic determines whether a measurement is within a cadence window. If the measurement is not within a cadence window, then no periodic human motion may be recognized or counted for that measurement (block 1040). If the measurement is within the cadence window, the process continues to block 1017.
At block 1017, processing logic determines whether motion criteria are met. For example, in one embodiment the process may determine whether acceleration along the dominant axis is greater than a lower threshold. In one embodiment, the process may determine whether the measurement exceeds the rolling average by a set margin. In one embodiment, processing logic may determine whether acceleration along the dominant axis is greater than previous measurements. Other criteria than those mentioned herein may also be used.
If all required motion criteria are met, then the appropriate periodic human motions are counted (block 1035).
FIG. 11 illustrates a block diagram of a machine in the exemplary form of a computer system 1100 within which a set of instructions, for causing the machine to perform any one or more of the methodologies discussed herein, may be executed. The exemplary computer system 1100 includes a processing device (processor) 1105, a memory 1110 (e.g., read-only memory (ROM), a storage device, a static memory, etc.), and an input/output 1115, which communicate with each other via a bus 1120. Embodiments of the present invention may be performed by the computer system 1100, and/or by additional hardware components (not shown), or may be embodied in machine-executable instructions, which may be used to cause processor 1105, when programmed with the instructions, to perform the method described above. Alternatively, the method may be performed by a combination of hardware and software.
Processor 1105 represents one or more general-purpose processing devices such as a microprocessor, central processing unit, or the like. More particularly, the processor 1105 may be a complex instruction set computing (CISC) microprocessor, reduced instruction set computing (RISC) microprocessor, very long instruction word (VLIW) microprocessor, or a processor implementing other instruction sets or processors implementing a combination of instruction sets. The processor 1105 may also be one or more special-purpose processing devices such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), a digital signal processor (DSP), network processor, or the like.
The present invention may be provided as a computer program product, or software, that may be stored in memory 1110. Memory 1110 may include a machine-readable medium having stored thereon instructions, which may be used to program exemplary computer system 1100 (or other electronic devices) to perform a process according to the present invention. Other machine-readable mediums which may have instruction stored thereon to program exemplary computer system 1100 (or other electronic devices) include, but are not limited to, floppy diskettes, optical disks, CD-ROMs, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, flash memory, or other type of media or machine-readable mediums suitable for storing electronic instructions.
Input/output 1115 may provide communication with additional devices and/or components. In one embodiment, input/output 1115 may transmit data to and receive data from, for example, networked computers, servers, mobile devices, etc.
In the foregoing description, numerous specific details have been set forth such as examples of specific systems, languages, components, etc. in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that these specific details need not be employed to practice the present invention. In other instances, well known materials or methods have not been described in detail in order to avoid unnecessarily obscuring the present invention. The invention has been described with reference to specific exemplary embodiments. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the invention as set forth in the appended claims. The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense.

## Claims

1. A method of monitoring human activity using an inertial sensor, comprising:
monitoring accelerations by a portable electronic device that includes the inertial sensor;
identifying a current user activity from a plurality of potential user activities based on the accelerations, wherein each of the plurality of potential user activities is associated with one of a plurality of types of periodic human motions that are detectable by the portable electronic device, the identifying comprising:
comparing the accelerations to a plurality of motion criteria sets, each of the motion criteria sets being associated with a particular user activity;
incrementing a plurality of buffers, each of the buffers associated with one of the plurality of potential user activities, when the motion criteria associated with the buffer are satisfied, wherein each buffer stores a periodic motion count for an associated user activity, such that a single periodic movement increments a plurality of buffers;
and identifying the potential user activity whose buffer has reached a threshold value as the current user activity;
resetting the buffers associated with activities other than the current user activity, such that the periodic human motions are only counted in one buffer associated with the current user activity;
counting the periodic human motions associated with the current user activity.

2. The method of claim 1, wherein the plurality of user activities comprise one or more of the following: walking, inline skating, bicycling, exercising on an elliptical machine, exercising on a rowing machine, and cross country skiing.

3. The method of claim 1, wherein monitoring accelerations comprises monitoring accelerations relative to a dominant axis.

4. The method of claim 3, further comprising:
continuously determining an orientation of the inertial sensor;
assigning the dominant axis; and
updating the dominant axis as the orientation of the inertial sensor changes.

5. The method of claim 1, further comprising:
maintaining separate data for each of the plurality of user activities.

6. The method of claim 1, wherein at least one of the motion criteria sets include a positive criterion that must be met to identify the associated user activity and a negative criterion that must not be met to identify the associated user activity.

7. The method of claim 6, wherein the at least one of the motion criteria sets further includes a cadence window within which the positive criterion must be met and the negative criterion must not be met to identify the associated user activity, the method further comprising:
for each user activity, resetting the associated buffer when the negative criterion is met within the cadence window.

8. The method of claim 1, wherein a single set of accelerations cause multiple buffers associated with different user activities to be incremented.

9. The method of claim 1, further comprising:
using one or more default cadence windows to count periodic human motions prior to identifying the current user activity; and
setting a new cadence window once the current user activity is identified.

10. The method of claim 1, wherein the current user activity is identified regardless of placement or orientation of the portable electronic device on a user.

11. An inertial sensor based device, comprising:
an activity identification engine to identify a current user activity from among a plurality of identifiable user activities based on motion data, wherein each of the plurality of identifiable user activities is associated with one of a plurality of types of periodic human motions that are detectable by a motion processor, and wherein the identification of the current user activity is made based on detecting two or more instances of the periodic human motion associated with the user activity, the activity identification engine comprising:
a plurality of buffers, each of the plurality of buffers associated with one identifiable user activity, each buffer to store a periodic motion count for the associated identifiable user activity;
a plurality of activity identification logics, wherein each of the plurality of activity identification logics is associated with one of the plurality of buffers, and each of the activity identification logics includes an associated motion criteria set, and each of the plurality of activity identification logics to compare
the motion data to the associated motion criteria set and increment the associated buffer when the criteria for the periodic motion identifiable user activity in the associated motion criteria set are satisfied, such that a single periodic movement increments a plurality of buffers;
the activity identification engine to identify the identifiable activity whose associated buffer has reached a predetermined count as the current user activity, and the activity identification engine to reset the buffers associated with activities other than the current user activity; and the motion processor, coupled to the activity identification engine, the motion processor to count the periodic human motions associated with the current user activity.

12. The device of claim 11, wherein the plurality of user activities comprise one or more of the following: walking, inline skating, bicycling, exercising on an elliptical machine, exercising on a rowing machine and cross country skiing.

13. The device of claim 11, further comprising:
a dominant axis logic, to continuously determine an orientation of the device, to assign a dominant axis, and to update the dominant axis as the orientation of the device changes; and
the motion processor further configured to count the periodic human motions by monitoring accelerations relative to the dominant axis.

14. The device of claim 11, further comprising:
a motion log to maintain separate data for each of the plurality of periodic human motions.

15. The inertial sensor based device of claim 11, wherein each of the motion criteria sets includes a positive criterion that must be met to identify the associated user activity and a negative criterion that must not be met to identify the associated user activity.

16. The inertial sensor based device of claim 15, wherein each of the motion criteria sets further includes a cadence window within which the positive criterion must be met and the negative criterion must not be met to identify the associated user activity, and wherein each of the plurality of activity identification logics to reset the associated counter when the negative criterion is met within the cadence window.

17. A non-transitory computer readable storage medium including instructions that, when executed by a processing system, cause the processing system to perform a method comprising:
monitoring accelerations by an inertial sensor based device; identifying a current user activity from a plurality of potential user activities based on the accelerations, wherein each of the plurality of potential user activities is associated with one of a plurality of types of periodic human motions that are detectable by the inertial sensor based device, the identifying comprising:
comparing the accelerations to a plurality of motion criteria sets, each of the motion criteria sets having an associated potential user activity;
for each potential user activity, incrementing a buffer associated with the potential user activity when the associated motion criteria for the periodic motion are satisfied, wherein the buffer is one of a plurality of buffers storing a periodic motion count for an associated user activity, such that a single periodic movement increments a plurality of buffers;
and identifying the potential user activity whose associated buffer has reached a threshold value as the current user activity;
resetting buffers associated with activities other than the current user activity; and
counting the periodic human motions associated with the current user activity.

18. The non-transitory computer readable storage medium of claim 17, wherein the plurality of user activities comprise one or more of the following: walking, inline skating, bicycling, exercising on an elliptical machine, rowing, and cross country skiing.

19. The non-transitory computer readable storage medium of claim 17, wherein monitoring accelerations comprises monitoring accelerations relative to a dominant axis.

20. The non-transitory computer readable storage medium of claim 19, the method further comprising:
continuously determining an orientation of the inertial sensor;
assigning the dominant axis; and
updating the dominant axis as the orientation of the inertial sensor changes.

21. The non-transitory computer readable storage medium of claim 17, the method further comprising:
maintaining separate data for each of the plurality of user activities.

22. The non-transitory computer readable storage medium of claim 17, wherein each of the motion criteria sets includes a positive criterion that must be met to identify the associated user activity, a negative criterion that must not be met to identify the associated user activity.

23. The non-transitory computer readable storage medium of claim 22, wherein each of the motion criteria sets further includes a cadence window within which the positive criterion must be met and the negative criterion must not be met to identify the associated user activity, the method further comprising:
for each user activity, resetting the associated buffer when the negative criterion is met within the cadence window.