Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
A TENS DEVICE FOR ACTIVITY MONITORING, GAIT ANALYSIS, AND BALANCE ASSESSMENT
Document Type and Number:
WIPO Patent Application WO/2018/089916
Kind Code:
A1
Abstract:
Apparatus for transcutaneous electrical nerve stimulation in a user, the apparatus comprising: a housing; an application unit for providing mechanical coupling between the housing and the user's body; a stimulation unit mounted to the housing for electrically stimulating at least one nerve with at least one stimulation pulse during a therapy session; and a determination unit mounted to the housing and configured to perform at least one of: (i) determining an activity level of the user; (ii) determining a gait characteristic of the user; (iii) determining a balance function of the user; and (iv) determining apparatus placement position on the user.

Inventors:
KONG XUAN (US)
MOYNIHAN MARTIN J (US)
GOZANI SHAI N (US)
Application Number:
PCT/US2017/061351
Publication Date:
May 17, 2018
Filing Date:
November 13, 2017
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
NEUROMETRIX INC (US)
International Classes:
A61B5/00; A61B5/11; A61N1/04; A61N1/32; A61N1/36
Domestic Patent References:
WO2015123373A12015-08-20
Foreign References:
US20160144174A12016-05-26
US20160151628A12016-06-02
US20140371814A12014-12-18
US6611789B12003-08-26
US20150272511A12015-10-01
US20080009772A12008-01-10
US20160242646A12016-08-25
US20080172102A12008-07-17
US4290431A1981-09-22
US20070203435A12007-08-30
US20120303077A12012-11-29
US20060251334A12006-11-09
US20160113551A12016-04-28
US20160189371A12016-06-30
Other References:
See also references of EP 3537955A4
Attorney, Agent or Firm:
PANDISCIO, Mark J. (US)
Download PDF:
Claims:
What Is Claimed Is:

1. Apparatus for transcutaneous electrical nerve stimulation in a user, the apparatus comprising: a housing;

an application unit for providing mechanical coupling between said housing and the user's body;

a stimulation unit mounted to the housing for electrically stimulating at least one nerve with at least one stimulation pulse during a therapy session; and

a determination unit mounted to the housing and configured to perform at least one of: (i) determining an activity level of the user; (ii) determining a gait characteristic of the user; (iii) determining a balance function of the user; and (iv) determining apparatus placement position on the user.

2. Apparatus according to claim 1 wherein the determination unit uses output from at least one electromechanical sensor to perform its function.

3. Apparatus according to claim 2 wherein said at least one electromechanical sensor comprises an accelerometer .

4. Apparatus according to claim 2 wherein said at least one electromechanical sensor comprises a gyroscope .

5. Apparatus according to claim 1 wherein said application unit is a flexible band.

6. Apparatus according to claim 1 wherein said stimulation unit determines whether said housing is electrically coupled with the user's body.

7. Apparatus according to claim 1 wherein said application unit determines whether said housing is mechanically coupled with the user's body.

8. Apparatus according to claim 7 wherein a mechanical element determines whether said housing is mechanically coupled to the user's body.

9. Apparatus according to claim 8 wherein said mechanical element is a tension gauge.

10. Apparatus according to claim 7 wherein a thermoelectrical element determines whether said housing is mechanically coupled to the user's body.

11. Apparatus according to claim 10 wherein said thermoelectrical element is a temperature sensor.

12. Apparatus according to claim 1 wherein the output of said determination unit is used to modify operation of said stimulation unit.

13. Apparatus according to claim 12 wherein modification of the operation of said stimulation unit comprises modification of at least one from the group consisting of (i) stimulation pulse amplitude, (ii) stimulation pulse width, (iii) stimulation pulse frequency, (iv) therapy session duration, and (v) therapy session onset.

14. Apparatus according to claim 1 wherein said determination unit provides an output, and further wherein said output of said determination unit is communicated to the user.

15. Apparatus according to claim 14 wherein said output of said determination unit is communicated to the user through a connected device.

16. Apparatus according to claim 1 wherein said activity level is the number of strides taken by the user .

17. Apparatus according to claim 1 wherein said activity level is the amount of time walked by the user .

18. Apparatus according to claim 1 wherein said activity level is the average cadence of the user.

19. Apparatus according to claim 1 wherein said gait characteristic is the coefficient of variation of a sequence of stride durations.

20. Apparatus according to claim 19 wherein said gait characteristic is a histogram of coefficients of variation of all sequences of stride durations.

21. Apparatus according to claim 19 wherein said gait characteristic is the minimum of coefficients of variation of all sequences of stride durations within a time period.

22. Apparatus according to claim 21 wherein said time period is a 24-hour day.

23. Apparatus according to claim 1 wherein said balance function is measured by at least one parameter selected from the group consisting of: (i) body sway amplitude, (ii) body sway frequency, and (iii) body sway path distance.

24. Apparatus according to claim 1 wherein said balance function is measured when said user is

standing and under at least one condition selected from the group consisting of: (i) eyes open, (ii) eyes closed, (iii) feet in parallel, (iv) feet in tandem, (iv) both feet on the ground, and (v) only one foot on the ground.

25. Apparatus according to claim 1 wherein said balance function is measured under at least one disturbance condition of (i) electrical stimulation, and (ii) mechanical vibration.

26. Apparatus according to claim 25 wherein said balance function is measured by comparing data

gathered under said at least one disturbance condition and data gathered without said at least one

disturbance condition.

27. Apparatus according to claim 1 wherein said balance function is measured as the time for the user to transition from sitting to walking.

28. Apparatus according to claim 1 wherein said balance function is measured as the time for the user to reach steady gait after transitioning from sitting to walking.

29. Apparatus according to claim 1 wherein said apparatus placement position is the rotational angle of the apparatus on a leg of the user.

30. Apparatus according to claim 1 wherein said apparatus placement position is the limb of the user on which apparatus is attached.

31. Apparatus according to claim 1 wherein said activity level is the time spent by the user while standing .

32. Apparatus according to claim 1 wherein said activity level is the time spent by the user while sitting .

33. A method for applying transcutaneous

electrical nerve stimulation in a user, the method comprising the steps of:

securing a stimulation unit and a determination unit to the user's body;

using the stimulation unit to deliver electrical stimulation to the user to stimulate at least one nerve with at least one stimulation pulse during a therapy session; and

using the determination unit to perform at least one of: (i) determining an activity level of the user; (ii) determining a gait characteristic of the user;

(iii) determining a balance function of the user; and

(iv) determining apparatus placement position on the user .

34. A method according to claim 33 wherein the determination unit uses output from at least one electromechanical sensor to perform its function, and further wherein the at least one electromechanical sensor comprises at least one from the group

consisting of an accelerometer and a gyroscope.

35. A method according to claim 33 wherein said stimulation unit determines whether said housing is electrically coupled with the user's body.

36. A method according to claim 33 wherein said application unit determines whether said housing is mechanically coupled with the user's body.

37. A method according to claim 33 wherein the output of said determination unit is used to modify operation of said stimulation unit.

38. A method according to claim 37 wherein modification of the operation of said stimulation unit comprises modification of at least one from the group consisting of (i) stimulation pulse amplitude, (ii) stimulation pulse width, (iii) stimulation pulse frequency, (iv) therapy session duration, and (v) therapy session onset.

39. A method according to claim 33 wherein said activity level is at least one chosen from the group consisting of the number of strides taken by the user, the amount of time walked by the user, and the average cadence of the user.

40. A method according to claim 33 wherein said gait characteristic is at least one chosen from the group consisting of the coefficient of variation of a sequence of stride durations, a histogram of

coefficients of variation of all sequences of stride durations, and the minimum of coefficients of

variation of all sequences of stride durations within a time period.

41. A method according to claim 33 wherein said balance function is measured by at least one parameter selected from the group consisting of: (i) body sway amplitude, (ii) body sway frequency, and (iii) body sway path distance.

42. A method according to claim 33 wherein said apparatus placement position is at least one selected from the group consisting of the rotational angle of - li the apparatus on a leg of the user and the limb of the user on which apparatus is attached.

Description:
A TENS DEVICE FOR ACTIVITY MONITORING, GAIT

ANALYSIS. AND BALANCE ASSESSMENT

Reference To Pending Prior Patent Application

This patent application claims benefit of pending prior U.S. Provisional Patent Application Serial No. 62/420,728, filed 11/11/2016 by NeuroMetrix, Inc. and Xuan Kong for APPARATUS AND METHODS FOR ACTIVITY

MONITORING, GAIT ANALYSIS, AND BALANCE ASSESSMENT OF USERS OF A TRANSCUTANEOUS ELECTRICAL NERVE STIMULATION DEVICE (Attorney's Docket No. NEURO-84 PROV) , which patent application is hereby incorporated herein by reference .

Field Of The Invention

This invention relates generally to

Transcutaneous Electrical Nerve Stimulation (TENS) devices that deliver electrical currents across the intact skin of a user via electrodes to provide

symptomatic relief of pain. More specifically, this invention relates to apparatus and methods for

analyzing gait characteristics, monitoring activity levels, assessing balance functions, and determining device placement positions based on motion-tracking sensor data such as that provided by an accelerometer incorporated within the TENS device. One or more aspects of gait, activity level, balance and device placement assessment may also be used to modify the operation of the TENS device.

Background Of The Invention

Transcutaneous electrical nerve stimulation (TENS) is the delivery of electricity (i.e., electrical stimulation) across the intact surface of a user's skin in order to activate sensory nerve fibers. The most common application of TENS therapy is to provide analgesia, such as for alleviation of chronic pain. Other applications of TENS therapy include, but are not limited to, reducing the symptoms of restless leg syndrome, decreasing nocturnal muscle cramps, and providing relief from generalized pruritus.

People suffering from chronic pain often have a reduced level of activity, unsteady gait, and poor balance. A sedentary lifestyle can lead to a

worsening of pain. Unstable gait and poor balance is predictive of falls. The side effects of certain pain medications can also lead to a reduced activity level, unsteady gait, and poor balance.

A conceptual model for how sensory nerve

stimulation leads to pain relief was proposed by

Melzack and Wall in 1965. Their theory proposes that the activation of sensory nerves (Αβ fibers) closes a "pain gate" in the spinal cord that inhibits the transmission of pain signals carried by nociceptive afferents (C and Αδ fibers) to the brain. In the past 20 years, anatomic pathways and molecular mechanisms that may underlie the pain gate have been identified. Sensory nerve stimulation (e.g., via TENS) activates the descending pain inhibition system, primarily the periaqueductal gray (PAG) and rostroventral medial medulla (RVM) located in the midbrain and medulla sections of the brainstem, respectively. The PAG has neural projections to the RVM, which in turn has diffuse bilateral projections into the spinal cord dorsal horn that inhibit ascending pain signal

transmission .

TENS is typically delivered in short discrete pulses, with each pulse typically being several hundred microseconds in duration, at frequencies between about 10 and 150 Hz, through hydrogel

electrodes placed on the user's body. TENS is

characterized by a number of electrical parameters including the amplitude and shape of the stimulation pulse (which combine to establish the pulse charge), the frequency and pattern of the pulses, the duration of a therapy session, and the interval between therapy sessions. All of these parameters are correlated to the therapeutic dose. For example, higher amplitude and longer pulses (i.e., larger pulse charge) increase the dose, whereas shorter therapy sessions decrease the dose. Clinical studies suggest that pulse charge and therapy session duration have the greatest impact on therapeutic dose.

To achieve maximum pain relief (i.e.,

hypoalgesia) , TENS needs to be delivered at an

adequate stimulation intensity. Intensities below the threshold of sensation are not clinically effective. The optimal therapeutic intensity is often described as one that is "strong yet comfortable". Most TENS devices rely on the user to set the stimulation intensity, usually through a manual intensity control comprising an analog intensity knob or digital

intensity control push-buttons. In either case (i.e., analog control or digital control), the user must manually increase the intensity of the stimulation to a level that the user believes to be a therapeutic level. Therefore, a major limitation of current TENS devices is that it may be difficult for many users to determine an appropriate therapeutic stimulation intensity. As a result, the user may either require substantial support from medical staff or they may fail to get pain relief due to an inadequate

stimulation level.

A newly-developed wearable TENS device (i.e., Quell ® , Neurometrix, Inc., Waltham, MA, USA) uses a novel method for calibrating the stimulation intensity in order to maximize the probability that the TENS stimulation intensity will fall within the therapeutic range. With the Quell ® device, the user identifies their electrotactile sensation threshold and then the therapeutic intensity is automatically estimated by the TENS device based on the identified electrotactile sensation threshold.

Pain relief from TENS stimulation usually begins within 15 minutes of the stimulation onset and may last up to an hour following the completion of the stimulation period (which is also known as a "therapy session") . Each therapy session typically runs for 30-60 minutes. To maintain maximum pain relief (i.e., hypoalgesia) , TENS therapy sessions typically need to be initiated at regular intervals. Newly-developed wearable TENS devices, such as the aforementioned Quell ® device, provide the user with an option to automatically restart therapy sessions at predetermined time intervals.

Assessments of the therapeutic benefits of TENS therapy are often subjective, infrequent, and

incomplete, such as those measured by responses to clinical questionnaires or pain diaries. Furthermore, the perception of pain (i.e., the subject's self- evaluation of pain levels) is only one of many

important aspects of effective pain relief. A more active lifestyle, steadier gait, and better balance are important examples of an improved quality of life and health. These improvements can be attributed to a reduction of pain as a result of TENS therapy. The same level of pain relief can also be achieved with a reduced intake of pain medication coupled with TENS therapy. A reduction in the use of pain medication may mitigate the side effects of pain medications and lead to a better quality of life and improved health, such as an increase in activity levels, a reduction in gait variability, and an improvement in balance.

Over time, a preferred TENS therapy dose may differ, depending upon perceived pain levels and the interference of pain on quality of life and health metrics. The perceived pain and interference levels may change with the progression of pain relief after a period of TENS therapy. TENS therapy dose adjustment is often lacking or arbitrary in the absence of an objective and real-time assessment of the impact of TENS therapy. To maintain a stable and uniform therapeutic effectiveness of TENS therapy for a particular user, objective and measurable biomarkers (e.g., activity levels, gait stability, and ability to maintain balance) can be utilized. By monitoring activity, gait, and balance continuously and objectively, a TENS therapy dose may be further optimized for each individual user.

Summary Of The Invention

The present invention comprises the provision and use of a novel TENS device which comprises a

stimulator designed to be placed on a user's upper calf (or other anatomical location) and a pre- configured electrode array designed to provide electrical stimulation to at least one nerve disposed in the user's upper calf (or other anatomical

location) . A three-axis accelerometer incorporated into the TENS device measures the motion and

orientation of the user's lower limb in order to continuously and objectively measure activity, gait, and balance. A key feature of the present invention is that the novel TENS device automatically adjusts its stimulation parameters according to the

aforementioned activity, gait, and balance

measurements in order to reduce pain and in order to minimize the interference of pain with one or more aspects of quality of life. Another key feature of the present invention is that the novel TENS device automatically determines the limb upon which the device is placed and the rotational position of the device on the upper calf of the user. In one preferred form of the invention, there is provided apparatus for transcutaneous electrical nerve stimulation in a user, the apparatus comprising:

a housing;

an application unit for providing mechanical coupling between said housing and the user's body; a stimulation unit mounted to the housing for electrically stimulating at least one nerve with at least one stimulation pulse during a therapy session; and

a determination unit mounted to the housing and configured to perform at least one of: (i) determining an activity level of the user; (ii) determining a gait characteristic of the user; (iii) determining a balance function of the user; and (iv) determining apparatus placement position on the user.

In another preferred form of the invention, there is provided a method for applying transcutaneous electrical nerve stimulation in a user, the method comprising the steps of:

securing a stimulation unit and a determination unit to the user's body;

using the stimulation unit to deliver electrical stimulation to the user to stimulate at least one nerve with at least one stimulation pulse during a therapy session; and

using the determination unit to perform at least one of: (i) determining an activity level of the user; (ii) determining a gait characteristic of the user;

(iii) determining a balance function of the user; and

(iv) determining apparatus placement position on the user .

Brief Description Of The Drawings

These and other objects and features of the

present invention will be more fully disclosed or rendered obvious by the following detailed description of the preferred embodiments of the invention, which is to be considered together with the accompanying drawings wherein like numbers refer to like parts, and further wherein:

Fig. 1 is a schematic view showing a novel TENS device formed in accordance with the present invention, wherein the novel TENS device is mounted to the upper calf of a user, and also showing the coordinate system of an accelerometer incorporated in the novel TENS device ;

Fig. 2 is a schematic view showing the novel TENS device of Fig. 1 in greater detail;

Fig. 3 is a schematic view showing the electrode array of the novel TENS device of Figs. 1 and 2 in greater detail;

Fig. 4 is a schematic view of the novel TENS device of Figs. 1-3, including a processor for

analyzing activity, gait, and balance, and for

analyzing device position; Fig. 5 is a schematic view showing the stimulation pulse train generated by the stimulator of the novel TENS device of Figs. 1-4;

Fig. 6 is a schematic view showing the on-skin detection system of the novel TENS device shown in

Figs. 1-5, as well as its equivalent circuits when the novel TENS device is on and off the skin of a user;

Fig. 7 is schematic view showing an example of the accelerometer data waveform from the y-axis of an accelerometer incorporated in the TENS device, with the accelerometer data waveform showing various

characteristic events associated with walking activity;

Fig. 8 is a schematic view showing exemplary filter operations performed on the exemplary

accelerometer data waveform, and the waveform changes due to the filter operations;

Fig. 9 is a schematic view showing processing steps for determining gait variability metrics based on a stride duration time series;

Fig. 10 is a schematic view showing accelerometer measurements in the x- and z- axis directions for assessing the balance of a user under exemplary test conditions ;

Fig. 11 is a schematic view showing an exemplary coordinate system transformation and its utility to determine the rotational position of the novel TENS device based on forward motion acceleration during a walking period; and Fig. 12 is a schematic flowchart showing

exemplary operation of the novel TENS device,

including functionalities for activity monitoring, gait analysis, balance assessment, and device

placement position determination.

Detailed Description Of The Preferred Embodiments

The TENS Device In General

The present invention comprises the provision and use of a novel TENS device which comprises a

stimulator designed to be placed on a user's upper calf (or other anatomical location) and a pre- configured electrode array designed to provide

electrical stimulation to at least one nerve disposed in the user's upper calf (or other anatomical

location) . A key feature of the present invention is that the novel TENS device automatically tracks

activity, gait, and balance functions and adjusts stimulation parameters according to biomarkers derived from the activity, gait, and balance measures obtained from the user. The novel TENS device also determines the rotational placement position of the device on the leg of a user.

More particularly, and looking now at Fig. 1, there is shown a novel TENS device 100 formed in

accordance with the present invention, with novel TENS device 100 being shown worn on a user's upper calf 140. A user may wear TENS device 100 on one leg or on both legs (either one at a time or simultaneously), or a user may wear a TENS device 100 on another area of the body separate from, or in addition to, a TENS device 100 worn on one leg (or both legs) of the user.

Looking next at Fig. 2, TENS device 100 is shown in greater detail. TENS device 100 preferably

comprises three primary components: a stimulator 105, a strap 110, and an electrode array 120 (comprising a cathode electrode and an anode electrode appropriately connected to stimulator 105) . As shown in Fig. 2, stimulator 105 may comprise three mechanically and electrically interconnected compartments 101, 102, and 103. Compartments 101, 102, 103 are preferably interconnected by hinge mechanisms 104 (only one of which is visible in Fig. 2), thereby allowing TENS device 100 to conform to the curved anatomy of a user's leg. In a preferred embodiment of the present invention, compartment 102 houses the TENS stimulation circuitry (except for a battery) and user interface elements 106 and 108. Compartment 102 also houses an accelerometer 132 (see Fig. 4), preferably in the form of a MEMS digital accelerometer microchip (e.g.,

Freescale MMA8451Q) , for detecting (i) user gestures such as taps to central compartment 102, (ii) user leg and body orientation, and (iii) user leg and body motion. Compartment 102 also houses a vibration motor 134 (Fig. 4), a real-time clock 135 (Fig. 4), an indoor/outdoor position system 136 (e.g., a global positioning system of the sort typically referred to as a "GPS"), a temperature sensor 137 (Figs. 2 and 4), and a strap tension gauge 138 (Figs. 2 and 4) .

In one preferred form of the invention,

compartments 101 and 103 are smaller auxiliary

compartments that house a battery for powering the TENS stimulation circuitry and other circuitry, and other ancillary elements, such as a wireless interface unit (not shown) of the sort well known in the art for allowing TENS device 100 to wirelessly communicate with other elements (e.g., a hand-held electronic device 860, such as a smartphone, see Fig. 2) .

In another form of the invention, only one or two compartments may be used for housing all of the TENS stimulation circuitry, battery, and other ancillary elements of the present invention.

In another form of the invention, a greater number of compartments are used, e.g., to better conform to the body and to improve user comfort.

And in still another form of the invention, a flexible circuit board is used to distribute the TENS stimulation circuitry and other circuitry more evenly around the leg of the user and thereby reduce the thickness of the device.

Still looking at Fig. 2, interface element 106 preferably comprises a push button for user control of electrical stimulation by TENS device 100, and interface element 108 preferably comprises an LED for indicating stimulation status and providing other feedback to the user. Although a single LED is shown, interface element 108 may comprise multiple LEDs with different colors. Additional user interface elements (e.g., an LCD display, audio feedback through a beeper or voice output, haptic devices such as a vibrating element, a smartphone running an appropriate "app", etc.) are also contemplated and are considered to be within the scope of the present invention.

In one preferred form of the invention, TENS device 100 is configured to be worn on the user's upper calf 140 as is shown in Fig. 1, although it should also be appreciated that TENS device 100 may be worn on other anatomical locations, or multiple TENS devices 100 may be worn on various anatomical

locations, etc. TENS device 100 (comprising the aforementioned stimulator 105, electrode array 120, and strap 110) is secured to upper calf 140 (or other anatomical location) of the user by placing the apparatus in position against the upper calf (or other anatomical location) and then tightening strap 110. More particularly, in one preferred form of the invention, electrode array 120 is deliberately sized and configured so that it will apply appropriate electrical stimulation to the appropriate anatomy of the user regardless of the specific rotational position of TENS device 100 on the leg (or other

anatomical location) of the user.

Fig. 3 shows a schematic view of one preferred embodiment of electrode array 120. Electrode array 120 preferably comprises four discrete electrodes 152, 154, 156, 158, each having an equal or similar size (i.e., an equal or similar size surface area) .

Electrodes 152, 154, 156, 158 are preferably connected in pairs so that electrodes 154 and 156 (representing the cathode of TENS device 100) are electrically

connected to one another (e.g., via connector 155), and so that electrodes 152 and 158 (representing the anode of TENS device 100) are electrically connected to one another (e.g., via connector 157) . It should be appreciated that electrodes 152, 154, 156, 158 are preferably appropriately sized, and connected in pairs, so as to ensure adequate skin coverage regardless of the rotational position of TENS device 100 (and hence regardless of the rotational position of electrode array 120) on the leg (or other anatomical location) of a user. Furthermore, it should be appreciated that electrodes 152, 154, 156, 158 are not connected in an interleaved fashion, but rather are connected so that the two inside electrodes 154, 156 are connected to one another, and so that the two outside electrodes 152, 158 are connected to one another. This electrode connection pattern ensures that if the two outer

electrodes 152, 158 should inadvertently come into contact with one another, an electrical short of the stimulation current flowing directly from cathode to anode will not occur (i.e., the electrode connection pattern ensures that the therapeutic TENS current is always directed through the tissue of the user) .

Electrical current (i.e., for therapeutic

electrical stimulation to the tissue) is provided to the electrode pairs 154, 156 and 152, 158 by

connectors 160, 162 (Fig. 3) which mate with

complementary connectors 210, 212 (Fig. 4),

respectively, on stimulator 105. Stimulator 105 generates electrical currents that are passed through electrodes 154, 156 and electrodes 152, 158 via connectors 160, 162, respectively.

In one preferred embodiment of the present invention, the skin-contacting conductive material of electrodes 152, 154, 156, 158 is a hydrogel material which is "built into" electrodes 152, 154, 156, 158. The function of the hydrogel material on the

electrodes is to serve as an interface between the electrodes 152, 154, 156, 158 and the skin of the user (i.e., within, or adjacent to, or proximal to, the portion of the user's body in which the sensory nerves which are to be stimulated reside) . Other types of electrodes such as dry electrodes and non-contact stimulation electrodes have also been contemplated and are considered to be within the scope of the present invention . Fig. 4 is a schematic representation of the current flow between TENS device 100 and the user. As seen schematically in Fig. 4, stimulation current 415 from a constant current source 410 flows into the user's tissue 430 (e.g., the user's upper calf) via an anode electrode 420 (which anode electrode 420 comprises the aforementioned electrodes 152, 158) . Anode electrode 420 comprises a conductive backing (e.g., silver hatch) 442 and hydrogel 444. The current passes through the user's tissue 430 and returns to constant current source 410 through cathode electrode 432 (which cathode electrode 432 comprises the aforementioned electrodes 154, 156) . Cathode electrode 432 also comprises a conductive backing 442 and hydrogel 444. Constant current source 410 preferably provides an appropriate biphasic waveform (i.e., biphasic stimulation pulses) of the sort well known in the art of TENS therapy. In this respect it should be appreciated that the designation of "anode" and "cathode" electrodes is purely notational in the context of a biphasic waveform (i.e., when the

biphasic stimulation pulse reverses its polarity in its second phase of the biphasic TENS stimulation, current will be flowing into the user's body via

"cathode" electrode 432 and out of the user's body via "anode" electrode 420) .

Fig. 5 is a schematic view showing a pulse train 480 provided by stimulator 105 during a TENS therapy session, and the waveform 490 of two individual biphasic pulses, wherein each individual biphasic pulse comprises a first phase 491 and a second phase 492. In one form of the invention, each pulse

waveform is charge-balanced across the two phases 491 and 492 of the biphasic pulse, which prevents

iontophoretic build-up under the electrodes of the electrode array 120 that can lead to skin irritation and potential skin damage. In another form of the invention, the individual pulses are unbalanced across the two phases of the biphasic pulse, however, charge- balancing is achieved across multiple consecutive biphasic pulses. Pulses of fixed or randomly-varying frequencies are applied throughout the duration of the therapy session 482. The intensity of the stimulation (i.e., the amplitude 493 of the current delivered by stimulator 105) is adjusted in response to user input and for habituation compensation, as will hereinafter be discussed in further detail.

In prior U.S. Patent Application Serial No.

13/678,221, filed 11/15/2012 by Neurometrix, Inc. and Shai N. Gozani et al . for APPARATUS AND METHOD FOR RELIEVING PAIN USING TRANSCUTANEOUS ELECTRICAL NERVE STIMULATION (Attorney's Docket No. NEURO-5960), issued as U.S. Patent No. 8,948,876 on February 3, 2015, and which patent is hereby incorporated herein by

reference, apparatus and methods are disclosed for allowing a user to personalize the TENS therapy stimulation intensity according to the electrotactile perception threshold of the user at the time of the setup of the TENS device. The aforementioned U.S. Patent No. 8,948,876 also discloses apparatus and methods to automatically restart additional therapy sessions after an initial manual start by the user.

In prior U.S. Patent Application Serial No.

14/230,648, filed 03/31/2014 by NeuroMetrix, Inc. and Shai Gozani et al . for DETECTING CUTANEOUS ELECTRODE PEELING USING ELECTRODE-SKIN IMPEDANCE (Attorney's Docket No. NEURO-64), issued as U.S. Patent No.

9,474,898 on October 25, 2016, and which patent is hereby incorporated herein by reference, apparatus and methods are disclosed which allow for the safe delivery of TENS therapies at night when the user is asleep. These methods and apparatus allow the TENS device to be worn by a user for an extended period of time, including 24 hours a day.

In order to deliver consistently comfortable and effective pain relief to a user throughout both the day and the night, it may not be appropriate to deliver a fixed TENS stimulation level, since the effect of circadian or other time-varying rhythms can mitigate the effectiveness of TENS stimulation.

Parameters impacting TENS stimulation effectiveness include, but are not limited to, stimulation pulse amplitude 493 (Fig. 5) and pulse width 494 (Fig. 5), pulse frequency 495 (Fig. 5), and therapy session duration 482 (Fig. 5) . By way of example but not limitation, higher amplitude and longer pulses (i.e., larger pulse charges) increase the stimulation

delivered to the user (i.e., the stimulation "dose"), whereas shorter therapy sessions decrease the

stimulation delivered to the user (i.e., the

stimulation "dose") . Clinical studies suggest that pulse charge (i.e., pulse amplitude and pulse width) and therapy session duration have the greatest impact on the therapeutic stimulation delivered to the user (i.e., the therapeutic stimulation "dose") .

Assessments of the therapeutic benefits of TENS therapy are often subjective, infrequent, and

incomplete, such as those measured by responses to clinical questionnaires or pain diaries. Furthermore, the perception of pain (i.e., the subject's self- evaluation of pain levels) is only one of many

important dimensions of effective pain relief. More active lifestyle, steadier gait, and better balance are important examples of improved quality of life and health. These improvements can be attributed to a reduction of pain as a result of TENS therapy.

Therefore, one object of the invention is to provide one or more biomarkers that are objectively and automatically measured and are based on assessing the activity, gait, and balance of the user wearing TENS device 100. Another object of the present invention is to permit TENS device 100 to automatically adjust its operations based on the results obtained from monitoring the activity, gait, and balance of the user. A third object of the present invention is to

determine the exact placement of TENS device 100 on the upper calf of the user, with placement being

determined in terms of the particular limb upon which the TENS device is placed (i.e., left or right leg), and the particular rotational angle Θ (see 402 in Fig. 11) at which the TENS device is positioned.

On-Skin Detector

In one preferred form of the invention, TENS device 100 may comprise an on-skin detector 265 (Figs. 4 and 12) to confirm that TENS device 100 is firmly seated on the skin of the user.

More particularly, the orientation and motion measures from accelerometer 132 (Fig. 4) and/or

gyroscope 133 (Fig. 4) of TENS device 100 only become coupled with the orientation and motion of a user when the TENS device is secured to the user. In a

preferred embodiment, an on-skin detector 265 (Fig. 4) may be used to determine whether and when TENS device 100 is securely placed on the user's upper calf.

In the preferred embodiment, and looking now at Fig. 6, an on-skin detector 265 may be incorporated in TENS device 100. More particularly, in one preferred form of the invention, a voltage of 20 volts from voltage source 204 is applied to anode terminal 212 of TENS stimulator 105 by closing the switch 220. If the TENS device is worn by the user, then user tissue 430, interposed between anode electrode 420 and cathode electrode 432, will form a closed circuit to apply the voltage to the voltage divider circuit formed by resistors 208 and 206. More particularly, when TENS device 100 is on the skin of the user, the equivalent circuit 260 shown in Fig. 6 represents the real-world system and equivalent circuit 260 allows the anode voltage V a 204 to be sensed through the voltage divider resistors 206 and 208. The cathode voltage measured from the amplifier 207 will be non-zero and close to the anode voltage 204 when TENS device 100 is secured to the skin of the user. On the other hand, when TENS device 100 is not secured to the skin of the user, the equivalent circuit 270 represents the real-world system and the cathode voltage from amplifier 207 will be zero.

On-skin detector 265 is preferably employed in two ways .

First, if on-skin detector 265 indicates that electrode array 120 of TENS device 100 has become partially or fully detached from the skin of the user, TENS device 100 can stop applying TENS therapy to the user .

Second, if on-skin detector 265 indicates that electrode array 120 of TENS device 100 has become partially or fully detached from the skin of the user, processor 515 (Fig. 4) of TENS device 100 will

recognize that the data from accelerometer 132 and/or gyroscope 133 may not reliably reflect user leg orientation and leg motion. In this respect it should be appreciated that when the on-skin detector 265 indicates that TENS device 100 is secured to the skin of the user, such that accelerometer 132 and/or gyroscope 133 is closely coupled to the lower limb of the user, the data from accelerometer 132 and/or gyroscope 133 may be considered to be representative of user leg orientation and user leg motion. However, when the on-skin detector 265 indicates that TENS device 100 is not on the skin of the user,

accelerometer 132 and/or gyroscope 133 is not closely coupled to the lower limb of the user, the data from accelerometer 132 and/or gyroscope 133 cannot be considered to be representative of user leg

orientation and user leg motion.

An on-skin condition is necessary for the TENS device to stimulate the user inasmuch as a closed electrical circuit is needed for the stimulation current to flow. However, the on-skin condition is not necessary for the TENS device to monitor the user activity, gait, and balance. The TENS device can still perform these monitoring functions and determine placement position of the TENS device as long as the device is positioned on the body. In one preferred form of the invention, a strap tension gauge 138 (Figs. 2 and 4) on the TENS device measures the tension of the strap 110. When the strap tension meets a pre-determined threshold, the TENS device 100 is considered "on-body" and the monitoring functions can continue even if the on-skin condition may not be met. In another embodiment, the tension gauge value while the on-skin condition is true is used as the on-body tension threshold. When the on- skin condition becomes false, as long as the tension gauge value is above the on-body tension threshold, the on-body status remains true. All activity, gait, and balance functions can still be performed as long as the on-body status is true. Furthermore, position of the TENS device placement on the body can also be performed as long as the on-body status is true.

In one preferred form of the invention, a temperature sensor 137 (Figs. 2 and 4) incorporated in the TENS device 100 measures the skin temperature and the skin temperature measurement is used to determine on-body status of the TENS device 100. In a preferred embodiment, the skin temperature measurements during the on-skin condition are averaged and stored as a reference. When the on-skin condition transitions from true to false, the skin temperature is

continuously monitored. If the measured skin

temperature remains similar to the reference skin temperature, the on-body status is set to true to indicate that the TENS device 100 is still on the user's body. Consequently, all activity, gait, and balance functions can still be monitored. Furthermore, position of the TENS device placement on the body can also be performed as long as the on-body status is true .

Accelerometer Data Sampling

In one preferred form of the invention, TENS device 100 samples accelerometer 132 at a rate of 400 Hz, although a different sampling rate can be utilized.

Device Orientation Determination

In one preferred form of the invention, TENS device 100 (comprising accelerometer 132) is strapped on a user's upper calf 140, e.g., in the manner shown in Fig. 1. The three axes of the accelerometer 132 are shown in Fig. 1 as well. The y-axis of

accelerometer 132 is approximately aligned with the anatomical axis of the leg, thus the gravitational force g 148 ("gravity" for short) is approximately parallel to the y-axis of accelerometer 132 when the user is standing. When TENS device 100 is placed on the leg with an "upright" orientation, accelerometer 132 will sense an acceleration value of -g, but when TENS device 100 is placed on the leg with an "upside down" orientation, accelerometer 132 will sense an acceleration value of +g. In one preferred embodiment, the orientation of TENS device 100 is assessed through device orientation detector 512 (Fig. 12) once on-skin detector 265 determines that TENS device 100 is "on-skin". The y- axis values of accelerometer 132 are accumulated for a period of ten seconds, and then the mean and standard deviation for the y-axis values are calculated. If the standard deviation is below a pre-determined threshold, it suggests that the user has had no activities during that time period (i.e., the ten second time period under review) . The mean value is checked against a set of pre-determined threshold values. If the mean value is smaller than -0.5*g, then the device orientation is deemed to be upright. If the mean value is larger than +0.5*g, then the device orientation is deemed to be upside down. If the mean value (i.e., acceleration along the y-axis) is between -0.5g and +0.5g, the leg is likely to be in a recumbent position and the device orientation cannot be reliably determined. In this case, a new set of y- axis values will be collected and the above process repeated until the device placement orientation can be reliably determined. Once the device placement orientation is determined, the orientation status of the device stays the same (i.e., upright or upside down) until the on-skin condition becomes "false" (i.e., until the TENS device is determined to no longer be "on-skin") and the device placement

orientation returns to an undefined state.

In one preferred form of the invention, the on- skin status will also set the on-body status to true. Temperature sensor 137 and tension gauge 138 can be used to assess the on-body status as disclosed earlier. When the on-skin status becomes "false" due to the loss of electrical contact between the TENS device 100 and the user's skin, the on-body status is assessed based on measurements from temperature sensor 137 or tension gauge 138 or both. The measurement values are compared with a fixed reference threshold or a

threshold established during the on-skin period. The device placement orientation status is maintained as long as the on-body status is true.

In one preferred form of the invention,

accelerometer measurements acquired from a TENS device placed upside down are mapped to values as if they were collected from a TENS device placed upright in order to simplify data analysis for subsequent

activity, gait, and balance assessment. In another embodiment, the data analysis methods are developed separately for data acquired under the two different device orientations (i.e., device upright and device upside down) .

In one preferred form of the invention, the

activity, gait, and balance assessments (see below) are not performed until the device orientation is determined. In another form of the invention, the activity, gait and balance assessments are performed under the assumption that the device orientation is upright when the device orientation state is undefined. Results obtained under such an assumption are adjusted if the actual device orientation is later determined to be upside down. In yet another form of the

invention, the activity, gait and balance assessments are performed under the assumption that the device orientation is the same as the device orientation determined in a previous on-skin session. In yet another form of the invention, the activity, gait and balance assessments are performed under the assumption that the device orientation is the same as the

majority of device orientations observed in the past. Regardless of the basis of the assumptions, once the actual device orientation is determined, the activity, gait and balance assessment results are adjusted as needed .

For the sake of clarity, subsequent descriptions will assume that the device placement orientation is upright or that the accelerometer data are mapped to values corresponding to an upright device placement.

Vertical Alignment Compensation

Under the ideal condition (i.e., upright device placement, no external movements such as those

experienced on a traveling train, etc.), the y-axis signal from accelerometer 132 stays at the -l*g level (i.e., the static acceleration value caused by earth gravity) when a subject is standing still. The y-axis acceleration value from accelerometer 132 goes above and below this value depending upon leg activities.

However, the relative position of the y-axis direction of accelerometer 132 and the direction of earth

gravity may not be perfectly aligned (e.g., due to leg anatomy and device placement variations) so the zero activity acceleration value may be different from -l*g.

To determine the exact alignment relationship between the y-axis of accelerometer 132 and earth gravity direction ( ( 146 in Fig. 1), each time TENS device 100 is placed on the leg of a user (and the

"on-skin" condition transitions from false to true), an automated calibration algorithm is preferably used to determine and compensate for any misalignment

between the directions of the y-axis of accelerometer 132 and earth gravity. The axes 145 of the

accelerometer 132 are shown in Fig. 1. This automated calibration algorithm is shown as device vertical alignment unit 514 in Fig. 12.

In the preferred embodiment, an initial segment of accelerometer data corresponding to the user

standing upright (i.e., the y-axis acceleration mean y mean value being greater than a pre-determined

threshold) and the user being still (i.e., the y-axis acceleration standard deviation y st dev value smaller than a pre-determined threshold) is analyzed to determine an average of the static gravitational acceleration value. This value is compared with the expected static gravitational acceleration value and the angle ( 146 in Fig. 1) between the two axis directions (i.e., the y-axis acceleration of accelerometer 132 and earth gravity g) can be calculated. The angle a 146 (which essentially identifies misalignment between the y-axis of accelerometer 132 and earth gravity) is then used to compensate for any effects of

misalignment of these two axes.

In one preferred form of the invention, the acceleration values from the y-axis of accelerometer 132 are accumulated over a period of ten seconds and the mean is calculated: this value is defined as y mea n · The angle a 146 (Fig. 1) between the y-axis of

accelerometer 132 and the gravity g 148 (Fig. 1) can be estimated with the formula = cos _1 (y mean / i g r ) .

In another embodiment, multiple estimates of the angle a 146 are averaged and used in subsequent data analysis .

It is often desirable to remove the static gravitational acceleration value from the activity, gait, and balance assessments. Instead of removing —g from the y-axis acceleration measurement, the exact projection of the static gravitation acceleration — g * cos(a) is removed to improve the accuracy of the assessments (i.e., the activity, gait and balance assessments) . The purpose of this approach is to obtain a better reference to the zero-activity level for the accelerometer data.

Background noise may cause the y-axis

acceleration values of accelerometer 132 to fluctuate around the zero-activity level. To compensate for background noise, two times the standard deviation

stdev (see above) is added to, and subtracted from, this zero-activity level in order to create a "zero- activity band". In the preferred embodiment, although the device orientation will only be determined one time for each device "on-skin" session, this zero- activity band is updated whenever a new estimation of { mean ' stdev) becomes available. The upper bound 314 (Fig. 7) of the zero-activity band is referred to as the

"positive zero-crossing threshold" and the lower bound 312 (Fig. 7) of the zero-activity band is referred to as the "negative zero-crossing threshold".

Filtering Operation

Filtering operations are designed to preserve waveform features critical to gait analysis while suppressing noise and other inconsequential features. The filter unit 516 (Fig. 12) takes input from

accelerometer 132 and setup parameters from device vertical alignment unit 514 to produce output suitable for further processing by swing event identification unit 518 (Fig. 12) .

Looking now at Fig. 7, the open circles connected with dotted lines 310 represent the accelerometer y- axis values after the gravity bias y mean has been

removed. The two horizontal lines are the negative zero-crossing threshold 312 and the positive zero- crossing threshold 314. The solid discs connected with solid lines 318 (overlapping lines 310 in many samples) are the filtered accelerometer y-axis values.

In one preferred embodiment, a selective "median" filter is used to filter the original accelerometer data. The effect of the median filter can be seen in Fig. 7 on waveform samples near or within the zero- activity band (i.e., the region between thresholds 312 and 314) while waveform samples with a larger

amplitude are not affected. The median filter is applied selectively to individual waveform samples based on its immediate neighbor sample magnitude. Fig. 8 illustrates the four cases when waveform samples are subject to the median filter operations. The median filter operates on one waveform sample at a time. In case 322, original waveform sample 352 is subject to the median filter operation. The filter examines the two immediate neighboring samples 351 and 353. One of samples 351 has a large amplitude outside the boundary line 316 (e.g., +0.5*g) . The filter modifies (i.e., filters) the sample 352 by changing its amplitude to the median of the original amplitude of the three samples 351, 352, and 353. In this case, the median value is that of sample 353. Therefore, the output of the selective median filter for sample 352 will be 354, taking the amplitude value of 353. Median filter operations for case 326 work similarly as that for case 322. In case 324, current waveform sample 356 and its immediate neighbors 355 and 357 are all

within a region bounded by boundary line 316 (e.g., +0.5*g) and 317 (e.g., -0.5*g) . However, the

transition from sample 355 to sample 356 causes

waveform to cross the zero activity region (from above to below the region) . Additionally, the amplitude difference between the current sample 356 and either neighbor sample exceeds a threshold 0.75*g. Under these conditions, the filter modifies the amplitude of the current sample 356 to the median of the original amplitudes of the three samples 355, 356, 357. In this case, the median value is that of sample 357.

Therefore, the output of the selective median filter for sample 356 will be 358. Median filter operations for case 328 work similarly as that for case 324.

Median filter operations for case 328 work similarly as that for case 324. In other cases, the current sample retains its original amplitude value. It is noted that a threshold crossing event could still occur even after application of the median filter depending upon the exact value of the neighboring sample points. It is also noted that the values of +0.5*g (which is used to set boundary line 316), - 0.5*g (which is used to set boundary line 317), and 0.75*g (which is used to help determine applicability of median filter operations on the current sample) are those chosen for one preferred form of the invention, other values may be used and are considered to be within the scope of the present invention.

Swing Event Identification

Swing event identification unit 518 (Fig. 12) identifies leg swing events based on specific

characteristics of accelerometer waveforms. The following characteristics are evident for the filtered y-axis accelerometer data waveform 318 (Fig. 7) associated with a leg swing event 336 (i.e., a stride) (Fig. 7) when the user is making a stride: a segment (negative phase, 332 in Figure 7) of the waveform is below the negative zero-crossing threshold 312, followed immediately by a larger segment (positive phase, 334 in Figure 7) of the waveform being above the positive zero-crossing threshold 314. Areas of the positive and negative phases are calculated. For the purpose of area calculation, the magnitude of each sample is limited to l*g to minimize the effect of large acceleration spikes. The area of the smallest rectangle that covers the magnitude-limited positive phase (i.e., "the positive rectangular area") is also calculated. A stride (e.g., leg swing event 336 in Fig. 7) is recognized if all of the following

conditions are met:

1. the positive phase duration is no greater than a first threshold Thl;

2. the positive phase duration is no shorter than a second threshold Th2;

3. the swing event is not too close to a

previously-detected swing event (i.e., the difference in the timings of the two events is greater than a pre-determined threshold) ;

4. the area of the positive phase (334 in Fig. 7) is no smaller than a third threshold Th3;

5. the "positive rectangular area" is no smaller than a fourth threshold Th4, or the combined area of the positive and negative phases (332 and 334 in Fig. 7) is no smaller than 1.5 times the threshold Th4; and

6. the maximum amplitude of the positive phase (334 in Fig. 7) is no smaller than a fifth threshold Th5, or the peak-to-peak amplitude (i.e., the positive phase peak waveform value minus the negative phase peak waveform value) is no smaller than a sixth threshold Th6.

Each leg swing event 336 (Fig. 7) which is identified adds one stride to a stride count (which is recorded in a counter or register) through a stride counter 520 (Fig. 12) . The step count is defined as twice the stride count for any measurement period. The timing for each stride is anchored to a "toe-off" event, which is the time instance 338 (Fig. 7)

associated the valley of the waveform 318. The "toe- off" event corresponds to the time instance when one foot is moving off the ground immediately prior to the swinging of the leg forward. The time difference between two consecutive toe-off events (340 in Fig. 7) is called the stride duration if the time difference is below a threshold (e.g., 3 seconds) . Cadence is calculated by dividing the step count by the time interval corresponding to the steps taken.

In another embodiment, gyroscope data (from

gyroscope 133, Fig. 4) are used to detect and quantify leg swing activities. Gyroscope 133, incorporated in TENS device 100 (which is attached to the leg of the user), can measure the angular acceleration and

velocity of the leg during leg swing periods.

WalkNow Status Indicator

In one preferred form of the invention, TENS device 100 also comprises a walk detector 522 (Fig. 12) to set the "WalkNow status indicator". The WalkNow status indicator is set to FALSE by default. When five or more strides are detected, the average stride duration is calculated if no two consecutive strides are separated by more than a pre-determined threshold time interval (e.g., 5 seconds) . If the average

stride duration is no greater than the pre-determined threshold time interval, then the WalkNow status indicator is set to TRUE. If at any time two

consecutive strides are separate by more than the threshold time interval, then the WalkNow status indicator is reset to FALSE. The cumulative time intervals during which the WalkNow status is set to TRUE form the Walk Duration value (which is also stored in a counter or register) .

Gait Analysis

The primary objective of gait analysis is to assess and characterize gait variability. Gait variability is an effective predictor of fall risk (Hausdorff et al, Gait variability and fall risk in community-living older adults: a 1-year prospective study. Arch Phys Med Rehabil., 2001 ; 82 ( 8 ): 1050-6 ) . In one preferred form of the invention, stride

duration variability is measured. Stride durations are obtained when the TENS user is in his or her natural walking environment. This is in contrast to most gait variability measurements that are done in a laboratory setting. A coefficient of variation (CoV) value is calculated for each qualified walk segment. A walk segment is a sequence of consecutive strides when the WalkNow status remains true. A qualified walk segment is a walk segment whose stride

characteristics meet certain criteria, such as the number of strides exceed a minimum threshold. Because the walking environment may influence gait variability, the daily distribution of CoV (percentile values) is updated and reported to the user whenever a qualified walk segment becomes available. The major functional blocks of gait analyzer unit 524 (Fig. 12) include:

1. toe-off event detection;

2. gait segment determination; and

3. gait variability estimation.

A flowchart summarizing gait analysis is shown in Fig. 9.

Toe-Off Event Timing Detection

Walking involves periodic movements of legs. Any readily identifiable event of leg movement can be used to mark the period of the periodic movements (stride duration) . Two events, the "heel strike" and toe-off events, are commonly used for stride duration

estimation and gait variability analysis. The "heel strike" event is the time instance when the heel of a foot makes the initial contact with the ground during walk. The "toe-off" event corresponds to the time instance when a foot is moving off the ground

immediately prior to the swinging of the leg forward. In one preferred embodiment, toe-off events are used in gait analysis. Exact toe-off event timing is

traditionally obtained through examining force-mat or force sensor measurements. However, measurements from accelerometer 132 incorporated in the TENS device (which is attached to upper calf of the user) provide distinct features that are highly correlated with actual toe-off events. In one preferred form of the invention, the timing of negative peaks 338 (Fig. 7) prior to the positive phase 334 (Fig. 7) are used to approximate the timing of the toe-off events.

Although the timing of negative peaks 338 may not coincide precisely with the actual toe-off time, the relationship between the two is strong and provide a high correlation. Stride durations derived from a force-sensor (for actual toe-off events) and those derived from accelerometer 132 using negative peaks 338 also exhibit very high correlation under various gait conditions (e.g., walk at normal pace, walk at faster pace, walk at slower pace, etc.) .

Once a stride (336, a positive phase 334

following a negative phase 332) is detected, recorded negative peaks 338 are examined within a time window prior to the stride detection event. In one preferred embodiment, the negative peak 338 with the largest amplitude is identified and its timing is used as the toe-off event time. If no negative peak 338 exists within the search window, then the timing of the negative peak 338 that is closest to stride detection event is used.

In yet another embodiment, similar features of the accelerometer signal from an axis other than the y-axis are used to determine toe-off events. The difference between two consecutive toe-off events is recorded as a stride duration.

Stride Duration Series Segmentation

Stride duration time series 342 (Fig. 9) is accumulated for the duration of each walk segment. If the number of stride duration measurements exceeds a maximum count, the stride duration series is divided into a plurality of segments (each up to the maximum count) . In one preferred embodiment, the mean and standard deviation for each segment of the stride duration series are calculated and an outlier

threshold is set based on calculated mean and standard deviation values. Stride durations are flagged as outliers if the absolute values of the differences from the mean exceed the outlier threshold. These outliers, if any, divide the original series into smaller segments of consecutive stride durations for gait variability assessment. Fig. 9 shows three such segments 344, 345, and 346 derived from a stride duration time series 342.

Stride Duration Segment Trimming

Still looking at Fig. 9, for each segment having a segment length (segment length is the number of stride durations in the segment) exceeding a minimum segment length (e.g., 30 strides), the segment becomes an eligible gait variability assessment segment 345. Statistics of the duration time series are calculated for each eligible gait segment. Before calculation, the first and last five stride duration samples of the segment are temporally trimmed to form a middle

segment. The maximum absolute difference of the

samples from the middle segment mean is calculated.

The middle segment is then expanded, sample by sample, to include contiguous adjacent samples from the first five until the sample difference from the mean exceeds the maximum absolute difference. The expansion to include durations from the last five samples proceeds similarly. As a result of this operation, each

segment 347 (Fig. 9) and 348 (Fig. 9) contains a

series of stride durations suitable for gait

variability estimation.

Gait Variability Estimation

For each eligible segment 347 and 348, the mean and standard deviation values of the stride duration samples are calculated. The coefficient of variation (CoV) is also calculated. In one preferred embodiment, the daily minimum CoV is maintained for each user as the gait variability metric. In another embodiment, the gait variability metric is a histogram 349 (Fig. 9) of the CoV (in percentage values) with the following bins: <2.5%, 2.5%-3.5%, 3.5%-4.5%, 4.5%-5.5%, 5.5%- 6.5%, 6.5%-7.5%, and >7.5%. The gait variability metrics are reported through a gait variability reporter unit 526 (Fig. 12) to the user whenever an eligible gait analysis segment becomes available. In another embodiment, gait variability metrics is reported under different step cadence conditions. For example, gait variability of slow leisure walking is reported separately from the gait variability of brisk walking .

Balance Monitoring

The ability to maintain balance is an important health indicator. Balance can be assessed under various conditions. Both population-based comparisons and subject-based comparisons can be performed. In one preferred embodiment, the three-axis accelerometer 132 is used to measure leg movement with its y-axis parallel to the anatomical axis of the leg. Leg motions caused by body sway in the transverse planes are sensed by the x- and z-axis components of

accelerometer 132. The accelerometer data from x- and z-axis are used to quantify the balance of the subject through a body sway estimator unit 532 (Fig. 12) .

In one preferred form of the invention, when a subject is standing still on a flat and solid surface with their eyes open, x/z-axis sample pairs are traced as a function of time, e.g., as shown in plot 361 of Fig. 10. In one preferred embodiment, the standing duration is set at 10 seconds. Body sway (i.e., trajectories of the x- and z-axis accelerometer data) is quantified by the standard deviation along the x- axis and the z-axis. In another preferred embodiment, a linear combination of the two directional standard deviations (i.e., the standard deviations of the x- and z-axis data) is used to quantify the data

variability. This variability serves as the baseline reference internal to the TENS user. Then the user attempts the same balance test, but with their eyes closed (plot 362 in Fig. 10) . The variability in the accelerometer data is calculated in a similar manner and the ratio between the variability measures under the "eye closed" case and the "eye open" case serves as a balance metric for the user. The "eye open" and "eye closed" conditions can be tagged with user input 850 (Fig. 4) or via smart device 860 (Fig. 4) which is connected to the TENS device 100 (e.g., via Bluetooth) .

In another embodiment, the two feet of the user are positioned in tandem. Variability measurements under "eye open" and "eye closed" conditions can be compared with each other to determine the balance ability of the user (plots 363 and 364 of Fig. 10) .

Additionally, variability measurements from the "feet in tandem" condition and the "feet in parallel"

condition can also be compared to quantify the balance of the user.

In yet another embodiment, only a single foot of the user (i.e., the foot at the end of the leg

carrying the TENS device) is on the ground and variability measures under "eyes open" and "eyes

closed" conditions are compared with each other and are compared with both feet on the ground in parallel condition (plots 365 and 366 in Fig. 10) .

In another embodiment, the sway path length (i.e., the summation of the sample-to-sample distances in the aforementioned two-dimensional plots) is used as the variability measure. The sample-to-sample distances are the Euclidian distance, or any other distance measures, which quantify the spatial distance between two points. In yet another embodiment, the maximal sway amplitude (i.e., the largest distance between any two samples within a given time interval) is used as the measure of balance variability. In yet another embodiment, the frequency of body sway is calculated for use as a measure of balance variability. In yet another embodiment, the variability of body sway

frequency is used as a measure of user balance.

In another embodiment, an electrical stimulation is given to the user as a disturbance after a baseline variability measure without electrical stimulation has been obtained. The "worst" (i.e., largest)

variability within a given time period immediately following the electrical stimulation is estimated, and the ratio between the two variability measures is used as a balance metric for the user. In another

embodiment, the time it takes for the body sway variability to return to a baseline value prior to a disturbance is used as a balance metric.

In another embodiment, the disturbance is a mechanical stimulation such as a vibration from a vibration motor 134 (Fig. 4) incorporated in TENS device 100.

In another embodiment, the "getting up and go" events of the user (i.e., the transition from a sitting position to taking a step) are monitored using the accelerometer data from accelerometer 132. The time interval that the user takes to complete the "getting up and go" event is tracked as another balance metric.

In yet another embodiment, the number of strides needed to achieve a steady gait (using the user's own gait stability metrics as a reference) is measured as a balance metric.

Significantly, with the present invention, balance metrics can be obtained and tracked during normal use of the TENS device. Typically, the TENS device (e.g., Quell ® , Neurometrix, Inc., Waltham, MA, USA) is worn by its user at least several hours a day while the user engages in routine daily activities. In one preferred embodiment, accelerometer data from accelerometer 132 are monitored continuously and sections of the data corresponding to "standing still" are identified, segmented, and analyzed. Body sway parameters based on these segments are estimated and a histogram of parameter values is constructed to determine daily balance metrics. In another

embodiment, transitions from sitting to walking are tracked, and transition time intervals are recorded, in order to construct a daily profile for assessing balance functions.

In another embodiment, the user can tag his or her conditions (e.g., "about to stand up from a sitting position", "walking on an uneven surface", etc.) manually via a connected device 860 (Fig. 4) such as a Bluetooth-enabled smartphone or through direct gesture to the TENS device (user input 850 in Fig. 4) so that specific activity, gait, and/or balance metrics can be interpreted accordingly. In yet another embodiment, contextual tags can also be applied automatically to the activity, gait and/or balance metrics, e.g., the time of the day, the time since waking up (when sleep monitoring functionality is incorporated into the TENS device), the time before or after a certain amount of activities (e.g., after walking 5000 steps), the user location (e.g., via the indoor/outdoor position system 136 in Fig. 4, which may be a GPS), etc. With the contextual information, gait variability patterns over a period of days can be constructed to determine the gait variability trend. For example, gait variability during the early morning walk along the same walk path can be tracked and compared to determine whether an improvement in gait variability is evident when the TENS user utilizes the TENS therapy daily.

Rotational Position Determination Another aspect of the present invention is to automatically determine the rotational position of TENS device 100 on the leg of a user through device position detector unit 528 (Fig. 12) . Once TENS device 100 is placed on the leg of a user, it stays in position until it is removed from the body. The placement and removal events can be detected via on- skin detector 265 in the manner previously disclosed.

Fig. 11 shows a cross-section (transverse plane) of leg 140 and an exemplary rotational position of TENS device 100 on the leg. The rotational position of TENS device 100 is defined by the angle 402

(denoted as Θ in Fig. 11) between TENS device 100 and the "forward motion" direction 404 (Fig. 11) . It should be noted that the aforementioned stride

detection algorithm based on the y-axis accelerometer data from accelerometer 132 functions fully without requiring knowledge of the rotational angle Θ.

During the positive phase 334 (Fig. 7) identified by the aforementioned stride detection algorithm, the acceleration associated with forward leg movement (i.e., when the y-axis acceleration value is above the positive zero-crossing threshold 314) is projected onto the x- and z-axis coordinate system 406 (Fig. 11) of accelerometer 132. By way of example but not

limitation, if the angle is Θ 402 is 90 degrees (i.e., TENS device 100 is placed on the right side of a limb), the forward acceleration A F 404 will have zero

projection on the x-axis (i4 F * cos 0 = 0) and maximum projection on the z-axis (A F * sin Θ = Ap) . By way of further example but not limitation, if TENS device 100 is placed at the posterior position (i.e., on the back of the leg) with an angle Θ = 180 , the forward

acceleration A F 404 will have a negative projection on the x-axis (A F * cos Θ =—Ap) and a zero projection on z- axis (A F * sin Θ = 0) .

In one preferred embodiment, the x- and z-axis acceleration measurements are acquired during the positive phase 334 (Fig. 7) of leg swing motions. The averages of the x- and z-axis acceleration data over 20 consecutive strides are obtained: these are defined as A x and A z . The rotational angle Θ 402 is estimated via Θ = tan _1 (i4 z /Αχ) . Because the periodicity of the tangent function is 180 degrees, the ambiguity of an estimated angle Θ belonging to the 0-90 degree range, or belonging to the 180-270 degree range, is resolved based on the signs of A x and A z . When the signs of A x and A z are both positive, Θ belongs in the 0-90 degree range; otherwise Θ belongs in the 180-270 degree range.

In one preferred embodiment, an individual

estimate of angle Θ, once it becomes available, is used as the current rotational position of TENS device 100. In another embodiment, the rotational position is a cumulative average of all available individual

estimates of the angle obtained since the on-skin event starts. In yet another embodiment, the

rotational position of TENS device 100 is a weighted average of the individual angle estimates obtained since the on-skin event starts. In this form of the invention, the angle estimates obtained more recently are given a higher weight factor in the weighted

average .

With the knowledge of the rotational position of TENS device 100, the measured accelerations in the coordinate system 406 (Fig. 11) of the x- and z-axis of accelerometer 132 can be mapped to the coordinate system 408 (Fig. 11) of the leg with an x'-axis

considered to be in the medial-lateral direction (i.e., the coronal plane) and the z'-axis considered to be in the anterior-posterior direction (i.e., the sagittal plane) through the well-known "rotation of axes"

translation :

A Xl = A x sin Θ— A z cos Θ and A z , =—A x cos Θ + A z sin Θ .

The mapped values A x , and A z , in the x'-z' axes coordinate system, provide a direct measure of

lateral-medial sway (A x , and anterior-posterior sway (A z , of the leg and the body. The magnitude and frequency of direction-specific sways allow TENS device 100 to further determine the state of the leg wearing TENS device 100 for balance assessment.

Under the general condition of zero activity of the y-axis accelerometer data, defined as the

acceleration values A Y (after the static gravitational value me an is removed) within the zero-activity band bounded by positive and negative zero-crossing

thresholds 312 and 314 (Fig. 7), it can be assumed that the user is either standing or sitting (with feet on the ground) . Sitting standing classifier unit 530 (Fig. 12) is designed to differentiate between sitting and standing states of the TENS device user.

When sitting, the legs of a user tend to be either quiet or in short periods of smooth motions in lateral-medial directions. Such smooth motions of legs with feet anchored on the floor will result in acceleration along the x'-axis direction (positive or negative) . Additionally, either leg could be

positioned, in a steady state, at an angle not

perpendicular to the ground (e.g., leaning laterally) . To determine such a case, the acceleration data in y- axis direction are analyzed in overlapping time windows. If the standard deviation is small (i.e., steady) and mean is smaller than the estimated y mea n i- n absolute value, then the user is likely to be in a sitting position during the time window. A different set of feature characteristics can be expected when the user is standing. More particularly, a short period of minimum activities in the y-axis direction, sandwiched between two walking segments, is likely to be a standing period. Periodic and small forward-backward motions in the z'-axis direction is also indicative of standing. If periodic motion is present in both the x'- and z'-axis directions, the x'-axis direction motion is expected to be smaller than the z'-axis direction motion as people tend to stabilize themselves with two feet apart (in the

lateral-medial x'-axis direction) .

In one preferred form of the invention, TENS device 100 continuously monitors and processes, in the background, accelerometer data in the y-axis direction to differentiate between periods of high activity and low activity. High activity periods typically

correspond to walking, running, or other activities involving feet on/off the ground (thus a high activity in the direction parallel to gravity) . Low activity periods typically correspond to standing and sitting where the y-axis accelerometer data maintain a mean value close to gravity but with small variations. To discriminate between standing and sitting, relative activities in the x'- and z'- axis directions (the coordinate system invariant to TENS device rotational placement) are examined. Large amplitude and low frequency acceleration elements in x'-axis direction, when compared to that of z'-axis direction data, are indicative of sitting, with most likely leg movement of swaying laterally with feet anchored on the floor. High frequency and small amplitude elements are indicative of body sways while standing, particularly if activities in the coronal plane (the medial-lateral direction) are lower than those in the sagittal plane (the anterior-posterior direction) .

With the identification of standing and sitting states, the apparatus disclosed in this application can measure balance metrics automatically without user interventions. In one preferred embodiment, when standing is detected, body sway metrics such as standard deviation of 10-second acceleration data in the x'- and z'-axis directions are calculated. In one preferred embodiment, the standard deviations are averaged to obtain a daily average to determine the standing balance metric. In another preferred

embodiment, a linear combination of the two

directional standard deviations is used to quantify the data variability as a biomarker for balance.

When sitting is detected, TENS device 100 enters into a mode to measure the "timed up and go" (TUG) time through a TUG estimator unit 534 (Fig. 12) . In one preferred embodiment, the time difference between the first stride and the first sudden movement

immediately prior to the first stride is tracked automatically. During the sitting state, a sudden spike in acceleration measurement in the x'- and z'- axis directions is indicative a sudden leg movement. Timing of the detected spike events is stored in a circular buffer. When the first stride during a walk segment is detected, the timing of the last detected spike event marks the start of the TUG event. Timing of the first detected stride marks the end of the TUG event. In one preferred embodiment, the stride detection time is the time of the toe-off event (338 in Fig. 7) associated with the stride. Timing of other identifiable events associated with a stride can also be used, such as the heel strike time (local minimum after the swing phase, 339 in Fig. 7) . In one preferred embodiment, the median of daily TUG time is used as a biomarker to quantify balance functions of the user. In another embodiment, the minimum of daily TUG time is used as the biomarker to quantify the balance functions of the user. In yet another

embodiment, a histogram of daily TUG time is used as the biomarker for the balance function of the user.

Limb Classifier

The determination of the rotational position of the TENS device 100, as disclosed above, works equally well regardless of on which leg the device is placed. However, limb determination can also be achieved with the present invention through a limb classifier unit 552 (Fig. 12) . More particularly, and looking now at Fig. 11, the position of TENS device 100 can be on the lateral side of the right leg or the medial side of the left leg. In one preferred embodiment, gravity projection on the x'-axis is constantly monitored during a sitting period to resolve ambiguity of which limb has the TENS device thereon (i.e., left leg versus right leg) . While sitting and relaxed, a user tends to lean one or both legs outwards. By

monitoring gravity projection during a sitting period, one can estimate the leg on which TENS device 100 is placed. If the gravity projection along the x'-axis is positive for a majority of a sitting duration, then it is likely that TENS device 100 is placed on the right leg laterally. If gravity projection along x'- axis is negative for a majority of a sitting period, then it is likely that TENS device 100 is placed on the left leg medially.

Controller For Modifying Stimulation Parameters The results of the activity, gait, and balance function assessments of the TENS user can be presented to the user or the caregivers of the user via

smartphone 860 or similar connected devices. A more active lifestyle, steadier gait, and better balance are important examples of an improved quality of life and health. These improvements can be attributed to a reduction of pain as a result of TENS therapy.

Changes in these functions are usually gradual and difficult to quantify. When the TENS users are provided with objective and background measurements of these important health metrics, they are more likely to continue with the TENS therapy.

A key feature of the present invention is that the novel TENS device automatically adjusts its stimulation parameters according to the aforementioned activity, gait, and balance measurements through controller unit 452 (Figs. 4 and 12). When the TENS user experiences a reduction in daily activity levels and the reduction is associated with a reduced TENS therapy amount, the TENS device can be programmed to prompt the user or caregivers of the user to increase the TENS therapy amount via connected device 860. If the user enables the TENS device for an automatic increase of TENS therapy, the TENS device 100 can gradually increase the number of therapy sessions, individual therapy session duration, and/or

therapeutic stimulation intensity.

Similarly, when gait or balance functions regress to lower levels, an increase in TENS therapy (in frequency, duration, and/or intensity) may increase the efficacy of its analgesic effect and improve gait and balance functions.

Knowledge of the limb and the rotational position of the TENS device placement allows automatic

adjustment of therapeutic intensity levels used by the TENS device to deliver effective therapy. Depending upon the exact placement position of the TENS device on the body, optimal therapeutic stimulation intensity levels may be different. By automatically correlating preferred stimulation intensity levels with exact placement locations based on manual adjustments by the user in prior uses, the TENS device can adjust

stimulation intensity automatically through machine learning once its placement location is estimated.

Exemplary Operation

In one preferred form of the invention, TENS device 100 comprises a stimulator 105 (Fig. 2), an on- skin detector 265 (Fig. 4), a device position detector 528 (Fig. 12), a controller 452 (Fig. 4) for modifying stimulation parameters, and a processor 515 (Fig. 4) for analyzing activity, gait, balance, and device position. TENS device 100 is preferably

configured/programmed to operate in the manner shown in Figs. 4 and 12, among others.

More particularly, when TENS device 100 is secured to the upper calf 140 of the user, on-skin detector 265 communicates with gyroscope 133 and/or accelerometer 132 to indicate that an on-skin session has started and data from gyroscope 133 and/or

accelerometer 132 are processed to determine the user's activity, gait, and balance measurements. The data will also be used to determine the placement position (including the limb) of TENS device 100 on the user.

At the onset of an on-skin session, the

orientation of TENS device 100 is set to assume an upright orientation by device orientation detector 512. Based on accelerometer y-axis data, device orientation detector 512 will update the device orientation to either a confirmed upright status or a confirmed

upside-down status. The confirmed status (upright or upside-down) will then be persistent until the on-skin session ends. A confirmed upside-down device

orientation will cause accelerometer values in x- and y-axis to reverse their signs. With the sign-reversal, the data stream from gyroscope 133 and/or

accelerometer 132 can be processed in the same manner for either device orientation status.

Although the y-axis of accelerometer 132

(incorporated in the TENS device) is approximately along the same direction as gravity when the user is standing, the alignment may not be perfect. As a result, the static gravity projected on the y-axis may not be exactly the same as -l*g. Device vertical alignment unit 514 (Fig. 12) determines the exact alignment relationship between the y-axis and gravity, and alignment results are used to remove static

gravity to obtain net activity acceleration for

activity and gait analysis. The alignment results can be updated periodically during the on-skin session. In addition to alignment, device vertical alignment unit 514 (Fig. 12) also determines negative zero- crossing threshold 312 (Fig. 7) and positive zero- crossing threshold 314 (Fig. 7) to define a zero- activity region. The zero-activity region may be updated continuously during the on-skin session.

Filter operation 516 (Fig. 12) applies filters to the y-axis data by removing the static gravity

component and smoothing out rapid changes near the zero-activity region. Filtered y-axis data are used to determine the user's activity levels and types. Filter operations such as low-pass filters to remove high-frequency noise can also be applied to x-axis and z-axis accelerometer data.

Leg swing is a critical and necessary component in walking and running. Swing event identification unit 518 (Fig. 12) identifies components in the acceleration or gyroscope data waveforms

characteristic to leg swings. The timing of events like toe-off and heel strike associated with each leg swing is extracted from the waveform features.

Stride counter 520 (Fig. 12) counts the number of strides cumulatively within a specific time period (such as 24-hour period) and results are reported to the user either as a display on TENS device 100 or through a connected device 860 (Fig. 4) linked to the TENS device (such as a smartphone connected to the TENS device via Bluetooth) . Walk detector 522 (Fig. 12) determines whether the user is walking by monitoring timing patterns of detected swing events. Regular occurrences of swing events with occurrence intervals between one-half second and 2 seconds are indicative of a walking

period. It should be noted that the occurrence

interval can be adapted to determine jogging or

running .

Gait analyzer 524 (Fig. 12) receives input from swing event identification 518 (stride duration

defined as time difference between consecutive toe-off events), stride counter 520 (the number of strides in a walk segment), and walk detector 522 (walking status) to determine whether a sufficient number of strides have been accumulated to perform gait variability analysis. If a sufficient number of stride durations are collected and the stride duration sequence has a sufficient length without outliers, stride variability measures are calculated for the walk segment. One such measure is the coefficient of variation (CoV) , defined as the standard deviation divided by the mean of the stride duration sequence (expressed as a

percentage value) .

Gait variability reporter 526 (Fig. 12) tracks stride variability measures for individual walk

segments. For each 24-hour day, the distribution of stride variability measures is constructed.

Characterization of stride variability measures, such as minimum, median, and maximum, are reported to the user. Stride variability measures can also be used by controller 452 to modify stimulation parameters in order to reduce gait variability.

Device position detector 528 (Fig. 12) determines the rotational position of TENS device 100 on leg 140. During a swing phase, detector 528 estimates the forward motion acceleration vector direction in the plane defined by the x- and z-axis of accelerometer 132 based on the x- and z-axis data. The rotational angle Θ 402 (Fig. 11) is estimated based on the projection of the acceleration vector A F 404 (Fig. 11) onto the x- and z-axes. The rotational position angle Θ 402 can be continuously refined as more measurement data became available. The total duration of the same device position across multiple on-skin sessions within a set period of time (such as a 24-hour day) can be used to inform the user to prevent skin

irritation. This is because it is generally advisable to air-out the skin under the TENS device from time to time to minimize the risk of skin irritation. Device position can also be used to control stimulation parameters as the nerve sensitivity at different locations of upper calf may be different.

Sitting-standing classifier 530 (Fig. 12)

determines whether the user is in standing state or in sitting state during the time period when the user is not in a walking state. Sitting-standing classifier 530 uses the device rotational angle information to map the x- and z-axis accelerometer data to a new coordinate system 408 (Fig. 11), with the x'-axis in the body's medial-lateral direction and z'-axis in the body's anterior-posterior direction. Acceleration data in x'-z' coordinate system 408 allows sitting- standing classifier 530 to sense small leg motions in either the medial-lateral direction or the anterior- posterior direction when the acceleration in the y- axis direction has no activity and uses the relative magnitude of acceleration along the x'- and z'-axis directions to determine the standing and sitting state.

Body sway estimator 532 (Fig. 12) is a part of the balance assessment system incorporated in TENS device 100. Under the standing condition, body sway estimator 532 quantifies body sway using metrics such as total sway length and standard deviation of

acceleration along the x'- and z'- axis. Body sway estimator 532 can also compare the body sway metrics under conditions without and with electrical

stimulation disturbance.

TUG (Timed Up and Go) estimator 534 (Fig. 12) is another component of the balance assessment system.

TUG estimator 534 monitors the transition time from sitting to taking the first strike in a walking

segment .

Limb classifier 552 (Fig. 12) determines on which limb TENS device 100 is disposed. Limb classifier 552 is activated when the user is in sitting state. Limb classifier 552 takes advantage of the fact that each lower leg is likely to lean outwards (laterally) more often when the user's feet are resting on the floor while the user is sitting. The limb determination and rotational angle information together provide precise location information of the TENS device on the user.

Modifications Of The Preferred Embodiments

It should be understood that many additional changes in the details, materials, steps and

arrangements of parts, which have been herein

described and illustrated in order to explain the nature of the present invention, may be made by those skilled in the art while still remaining within the principles and scope of the invention.