This is an old revision of the document!
Table of Contents
Example: Gait Events using Kinematic Data
This tutorial explores how to use kinematic data to detect gait events in the absence of force/kinetic data.
Overview
Gait events refer to meaningful moments during walking movement, particularly:
- Heelstrike (HS) - when the foot makes contact with the ground.
- Toe-off - when the foot lifts off the ground.
The “Gold-Standard” method for identifying these events uses force thresholds on signals acquired from lab-based kinetic equipment such as force plates or instrumented treadmills.
To address this limitation, a number of published algorithms use only kinematic marker trajectories to approximate these events. These algorithms use features such as foot velocity, position relative to the pelvis, or hip joint angles to determine when heelstrike and toe-off likely occur.
This tutorial walks through the implementation of five published methods for kinematic gait event detection in Visual3D.
We will also calculate cycle durations for comparison to the standard kinetic-based method, this was explored in a research tutorial available here: Assessing Kinematic Methods of Structuring Gait
Methods Covered
The following methods are implemented using Visual3D pipelines. Each has a slightly different biomechanical rationale for estimating gait events.
Method 1A: Foot Position relative to Pelvis [REFERENCE: ZENI (2008)]:
This paper presents two methods. In the first, events are derived by locating peaks and troughs in the vertical position of the heel marker, relative to the pelvis coordinate system.
Method 1B: Foot Velocity relative to Pelvis [REFERENCE: ZENI (2008)]:
The second method in the paper is similar, but detects events based on the horizontal velocity of the heel and toe markers relative to the pelvis.
Method 2: Hip Kinematics [REFERENCE: DeASHA (2013)]:
Identifies gait events by locating zero-crossings and inflection points in the hip angle trajectory, specifically in the sagittal plane.
Method 3: Vertical Toe Velocity Minima [REFERENCE: Hreljac (2000)]:
Detects Toe-Off using the local minimum in vertical velocity of the toe marker just before it starts to ascend.
Method 4: Anterior Foot Trajectory [REFERENCE: OConnor (2007)]:
This method uses the forward-most vertical position of the foot marker to indicate heelstrike and the backward-most point to indicate toe-off.
NOTE- After applying the algorithm, the following steps will be included at the end of each pipeline:
- Cycles are defined using events created in the algorithm with Event_Define_Event_Sequence
- Calculate the time between successive events to generate cycle durations for cycle instances using Metric_Time_Between_Events.
Downloads/Data
FILL IN SECTION WITH SAMPLE DATA
Method 1A: Foot Position Relative to Pelvis
This implementation corresponds to the Zeni Paper's first method, and is referred to throughout this tutorial as the Foot Position Method.
This method uses the position of the Left Heel and Left Toe relative to the Pelvis coordinate system to identify gait events.
Specifically, Heelstrike is determined by the maximum forward position of the heel, and Toe-off is identified by the minimum forward position of the toe.
The pipeline follows the algorithm described in the literature and includes the following key steps:
- Compute the positions of the left heel and toe relative to the pelvis segment using Compute_Model_Based_Data.
- Detect Heelstrike events as maxima in the heel position using Event_Maximum
- Detect Toe-Off events as minima in the toe position signal using Event_Minimum
The full pipeline can be viewed below, as seen in the Visual3D Pipeline workshop:
Method 1B: Foot Velocity Relative to Pelvis
This implementation corresponds to the Zeni Paper's second method, and is referred to throughout this tutorial as Foot Velocity Method.
This method builds on the previous one by using the velocity of the left heel and toe relative to the pelvis coordinate system rather than position. It identifies heelstrike when the heel velocity signal crosses zero on the descent, and Toe-off when the toe velocity crosses zero on the ascent.
The pipeline uses the algorithm described in the literature to compute gait events from kinematic data and includes the following key steps:
- Like Method 1A, compute heel and toe positions relative to the pelvis using Compute_Model_Based-Data.
- Derive the velocity signals for both heel and toe using First_Derivative
- Detect Heelstrike and Toe-off based on zero-crossings in the velocity signal using Event_Threshold
A snapshot of the full pipeline can be seen below in the Visual3D pipeline workshop dialog:
Method 2: Contralateral Hip Extension
This method, introduced by DeAsha et al. (2013) identifies Left Heelstrike (LHS) events based on the peak extension of the contralateral hip- when the right hip reaches maximum extension in the sagittal plane. This corresponds with the point in gait where the opposite foot (left) is most likely contacting the ground.
The pipeline uses the algorithm described in the literature to compute gait events from kinematic data and includes the following key steps:
- Compute_Model_Based_Data calculates the Right Hip Joint Angle relative to the pelvis using the JOINT_ANGLE function. This generates a time series of hip motion in the sagittal plane (X component in this case), which will later be used to identify peak extension moments.
- Event_Minimum is used to identify left heelstrike (LHS)- defined as the minimum value of the right hip angle- this represents the peak extension point of the contralateral (right) hip.
An image of this pipeline in the Visual3D workshop dialog is included below to guide users through implementation:
Method 3: Foot Acceleration
This method was introduced by Hreljac et al. (2000), detecting gait events by analyzing the acceleration signals of specific foot markers during walking. It is based on the premise that certain peaks in foot acceleration correspond reliably to heelstrike and toe-off moments.
Specifically, this method uses the vertical acceleration of the Left Heel and the forward acceleration of the Left Fifth Metatarsal (MT5) to identify these events.
The pipeline uses the algorithm described in the literature to compute gait events from kinematic data and includes the following key steps:
- Before computing acceleration, the Lowpass_Filter command is used to filter the positional signals of the Left Heel and Left MT5 markers. This smoothing step reduces noise that would be amplified when differentiating.
- The Second_Derivative command outputs the acceleration signals. The outputs are saved in the DERIVED folder with the suffix _accel.
- Event Maximum: The Left Heelstrike (LHS) events are identified as local maxima in the y-component of the Left Heel's acceleration signal. This peak corresponds to the abrupt deceleration of the heel when it makes contact with the ground.
- Event_Maximum: The Left Toe-off (LTO) events are similarly identified as local maxima in the x-component of the Left MT5's acceleration signal. This reflects the propulsion phase, where the forefoot pushes off and leaves the ground.
An image of this pipeline in the Visual3D workshop dialog is included below to guide users through implementation:
Typically, creating gait events using force data is the most reliable method of gait event detection. However, if force data is not available, there are several methods for computing gait events using kinematic data.
This tutorial describes three methods to create gait events:
- Method 1A: Zeni using foot position relative to pelvis [1]
- Method 1B: Zeni using foot velocity relative to pelvis [1]
- Method 2: DeAsha using hip kinematics [2]
Alternative methods can also be implemented in Visual3D, although they are not described in this tutorial. [3] [4] [5] [6] Keep in mind that computing gait events from only kinematic data is challenging, especially for subjects with movement disorders.
Downloads
Example scripts which create events using the three methods along with a sample workspace can be downloaded here.
Method 1A + 1B: Zeni Paper
The Zeni paper describes two methods of creating kinematic gait events. Step 1 is the same in both methods, but the steps diverge in Step 2.
Step 1: Transform Heel and Toe Markers into Pelvis Coordinate System
Transform the proximal and distal ends of the feet into the pelvis coordinate system, this can be accomplished using the following functions in the Compute_Model_Based_Data command:
- SEG_PROXIMAL_JOINT: The proximal location of the foot in the pelvis coordinate system (the proximal end of the foot is essentially the heel)
- SEG_DISTAL_JOINT: The distal location of the foot in the pelvis coordinate system (the distal end of the foot is essentially the toe)
This tutorial explains implementing this method as a pipeline (v3s file), but it's also possible to create the events using a Meta-Command. An example of using a Meta-Command can be found here.
Right/Left Proximal Position in Pelvis:
Right/Left Distal Position in Pelvis:
Step 2: Create Events
The Zeni paper provides two examples of creating gait events, one using the position of the foot relative to the pelvis and the other using the velocity of the foot relative to the pelvis.
Up to now, the two methods have been identical, but the methods differ here in Step 2. You should follow either 2A OR 2B:
- Step 2A: Uses the position of the foot
- Step 2B: Uses the velocity of the foot
Step 2A: Create Events from Foot Position Max/Min
Create events based on the position of the foot in the pelvis coordinate system. The location of the foot in front/behind the pelvis is used to create the events. This means, SELECT_Y is set to TRUE, since the Y axis is the AP direction of the pelvis.
For LHS: Select the same parameters as for RHS, but use the LHEEL_WRT_PELVIS signal.
For LTO: Select the same parameters as for RTO, but use the LTOE_WRT_PELVIS signal.
Step 2B: Create Events from Foot Velocity
Create events based on the velocity of the foot in the pelvis coordinate system. The velocity of the foot in front/behind the pelvis is used to create the events. This means, SELECT_Y is set to TRUE, since the Y axis is the AP direction of the pelvis.
Calculate the Velocity of the Foot relative to the Pelvis:
The velocity of the foot can be calculated by taking the first derivative of position signals of interest.
Calculate Heel Strike Events:
Use the Event_Threshold command to place heelstrike events at points where the signal crosses the 0-value threshold on the descent.
For LHS: Select the same parameters as for RHS, but use the LHEEL_WRT_PELVIS_Vel signal.
Calculate Toe Off Events:
For LTO: Select the same parameters as for LTO, but use the LToe_Wrt_Pelvis_Vel signal.
Meta-Command
When writing your own kinematic gait algorithm, it may be useful to create the script as a Meta-Command. More information (and an example) can be found here.
Method 2: De Asha Paper
This method defines heel strike when the contralateral hip is in full extension.
Right/Left Hip Angle:
Right/Left Heel Strike Events:
IMPORTANT: The RHS event is created at the minimum of the LEFT hip angle so make sure the correct signal is selected.
For LHS: Select the same parameters as for RHS, but use the RHip_Angle signal.