Table of Contents
Example - Gait Events using Kinematic Data
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.
When creating kinematic gait events, keep in mind that computing gait events from only kinematic data is challenging, especially for subjects with movement disorders.
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]
Download
Example scripts which create events using the three methods along with a sample workspace can be downloaded here.
Method 1: 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:
Compute_Model_Based_Data Command:
Data Name: LHeel_Wrt_Pelvis
Model Based Item Properties:
Function: SEG_PROXIMAL_JOINT
Segment: Left Foot
Reference Segment: Pelvis
Resolution Coordinate System: Pelvis
Right/Left Distal Position in Pelvis:
Compute_Model_Based_Data Command:
Data Name: LToe_Wrt_Pelvis Model Based Item Properties: Function: SEG_PROXIMAL_JOINT Segment: Left Foot Reference Segment: Pelvis Resolution Coordinate System: 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 know, 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.
Event_Maximum
/SIGNAL_TYPES=LINK_MODEL_BASED
/SIGNAL_NAMES=RHEEL_WRT_PELVIS
! /SIGNAL_FOLDER=ORIGINAL
/EVENT_NAME=RHS
! /SELECT_X=FALSE
/SELECT_Y=TRUE
! /SELECT_Z=FALSE
! /FRAME_WINDOW=8
! /START_AT_EVENT=
! /END_AT_EVENT=
! /EVENT_INSTANCE=
;
For LHS:
Select the same parameters as for RHS, but use the LHEEL_WRT_PELVIS signal.
Event_Minimum
/SIGNAL_TYPES=LINK_MODEL_BASED
/SIGNAL_NAMES=RTOE_WRT_PELVIS
! /SIGNAL_FOLDER=ORIGINAL
/EVENT_NAME=RTO
! /SELECT_X=FALSE
/SELECT_Y=TRUE
! /SELECT_Z=FALSE
! /FRAME_WINDOW=8
! /START_AT_EVENT=
! /END_AT_EVENT=
! /EVENT_INSTANCE=
;
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:
First_Derivative
/SIGNAL_TYPES=LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED+LINK_MODEL_BASED
/SIGNAL_FOLDER=ORIGINAL+ORIGINAL+ORIGINAL+ORIGINAL
/SIGNAL_NAMES=LHeel_Wrt_Pelvis+LToe_Wrt_Pelvis+RHeel_Wrt_Pelvis+RToe_Wrt_Pelvis
/RESULT_TYPES=DERIVED
/RESULT_FOLDERS=EVENTS
/RESULT_NAME=_Vel
/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
;
Calculate Heel Strike Events:
Event_Threshold
/RESULT_EVENT_NAME=RHS
/SIGNAL_TYPES=DERIVED
/SIGNAL_FOLDER=EVENTS
/SIGNAL_NAMES=RHeel_Wrt_Pelvis_Vel
! /SIGNAL_COMPONENTS=
! /FRAME_OFFSET=0
! /TIME_OFFSET=
! /EVENT_SEQUENCE=
! /EXCLUDE_EVENTS=
! /EVENT_SEQUENCE_INSTANCE=0
! /EVENT_SUBSEQUENCE=
! /SUBSEQUENCE_EXCLUDE_EVENTS=
! /EVENT_SUBSEQUENCE_INSTANCE=0
! /EVENT_INSTANCE=0
/SELECT_Y=TRUE
/THRESHOLD=0
! /ON_ASCENT=
/ON_DESCENT=TRUE
! /FRAME_WINDOW=8
/ENSURE_FRAMES_BEFORE=TRUE
/ENSURE_FRAMES_AFTER=TRUE
;
For LHS:
Select the same parameters as for RHS, but use the LHEEL_WRT_PELVIS_Vel signal.
Calculate Toe Off Events:
Event_Threshold
/RESULT_EVENT_NAME=RTO
/SIGNAL_TYPES=DERIVED
/SIGNAL_FOLDER=EVENTS
/SIGNAL_NAMES=RToe_Wrt_Pelvis_Vel
! /SIGNAL_COMPONENTS=
! /FRAME_OFFSET=0
! /TIME_OFFSET=
! /EVENT_SEQUENCE=
! /EXCLUDE_EVENTS=
! /EVENT_SEQUENCE_INSTANCE=0
! /EVENT_SUBSEQUENCE=
! /SUBSEQUENCE_EXCLUDE_EVENTS=
! /EVENT_SUBSEQUENCE_INSTANCE=0
! /EVENT_INSTANCE=0
/SELECT_Y=TRUE
/THRESHOLD=0
/ON_ASCENT=TRUE
/ON_DESCENT=FALSE
! /FRAME_WINDOW=8
/ENSURE_FRAMES_BEFORE=TRUE
/ENSURE_FRAMES_AFTER=TRUE
;
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:
Compute_Model_Based_Data Command:
Data Name: RHip_Angle
Model Based Item Properties:
Function: JOINT_ANGLE
Segment: Right Thigh
Reference Segment: Pelvis
Compute_Model_Based_Data Command:
Data Name: LHip_Angle
Model Based Item Properties:
Function: JOINT_ANGLE
Segment: Left Thigh
Reference Segment: Pelvis
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.
Event_Minimum
/SIGNAL_TYPES=LINK_MODEL_BASED
/SIGNAL_NAMES=LHip_Angle
! /SIGNAL_FOLDER=ORIGINAL
/EVENT_NAME=RHS
/SELECT_X=TRUE
! /SELECT_Y=FALSE
! /SELECT_Z=FALSE
! /FRAME_WINDOW=8
! /START_AT_EVENT=
! /END_AT_EVENT=
! /EVENT_INSTANCE=
;
For LHS:
Select the same parameters as for RHS, but use the RHip_Angle signal.
References