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.
Methods
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]
Downloads
Example scripts which create events using the three methods along with a sample workspace can be downloaded here.
Workflow Process
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.
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: RHeel_Wrt_Pelvis
Model Based Item Properties
Function: SEG_PROXIMAL_JOINT
Segment: Right Foot
Reference Segment: Pelvis
Resolution Coordinate System: Pelvis
Left-side Component:
Data Name: LHeel_Wrt_Pelvis
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: RToe_Wrt_Pelvis
Model Based Item Properties
Function: SEG_PROXIMAL_JOINT
Segment: Right Foot
Reference Segment: Pelvis
Resolution Coordinate System: Pelvis
Left-side Component
Data Name: LToe_Wrt_Pelvis
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 now, the two methods have been identical, but the methods differ here in Step 2. You should follow either 2A OR 2B:
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.
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.
The velocity of the foot can be calculated by taking the first derivative of position signals of interest.
 | First_Derivative
/SIGNAL_TYPES=LINK_MODEL_BASED
! /SIGNAL_FOLDER=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:
Use the Event_Threshold command to place heelstrike events at points where the signal crosses the 0-value threshold on the descent.
 | 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=FALSE
/ON_DESCENT=TRUE
! /FRAME_WINDOW=8
! /ENSURE_FRAMES_BEFORE=
! /ENSURE_FRAMES_AFTER=
;
|
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.
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
Left-side Component
Data Name: LHip_Angle
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