====== 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 [[#cite_note-Zeni-1|[1]]] * **Method 1b:** Zeni using foot velocity relative to pelvis [[#cite_note-Zeni-1|[1]]] * **Method 2:** DeAsha using hip kinematics[[#cite_note-DeAsha-2|[2]]] Alternative methods can also be implemented in Visual3D, although they are not described in this tutorial. [[#cite_note-Leitch-3|[3]]] [[#cite_note-DeWitt-4|[4]]] [[#cite_note-Ghoussayni-5|[5]]] [[#cite_note-Handsaker-6|[6]]] ===== Download ===== Example scripts which create events using the three methods along with a sample workspace can be [[http://c-motion.com/download/examples/Events/Kinematic_Gait_Events.zip|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 [[Visual3D:Documentation:Pipeline:Model_Based_Data_Commands:Compute_Model_Based_Data|Compute_Model_Based_Data command]]: * [[Visual3D:Documentation:Pipeline:Model_Based_Data_Commands:SEG_PROXIMAL_JOINT|SEG_PROXIMAL_JOINT]]: The proximal location of the foot in the pelvis coordinate system (the proximal end of the foot is essentially the heel) * [[Visual3D:Documentation:Pipeline:Model_Based_Data_Commands:SEG_DISTAL_JOINT|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 [[Visual3D:Documentation:Pipeline:Meta_Commands:Meta_Commands_Overview|Meta-Command]]. [[Visual3D:Documentation:Pipeline:Meta_Commands:Zeni_MetaCommand|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 | {{:RightHeelWrtPelvis.png}}| **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:** RToe_Wrt_Pelvis\\ \\ **Model Based Item Properties:**\\ \\ **Function:** SEG_PROXIMAL_JOINT\\ \\ **Segment:** Right Foot\\ \\ **Reference Segment:** Pelvis\\ \\ **Resolution Coordinate System:** Pelvis | {{:RightToeWrtPelvis.png}}| **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. |{{:RightHeelWrtPelvis_RHS_Max.png}} |\\ 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. |{{:RightHeelWrtPelvis_RTO_Min.png}} |\\ 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: === |{{:RightHeelWrtPelvis_Vel.png}} |\\ 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: === |{{:RightHeelWrtPelvis_Vel_RHS.png}} |\\ 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: === |{{:RightHeelWrtPelvis_Vel_RTO.png}} |\\ 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 [[Visual3D:Documentation:Pipeline:Meta_Commands:Meta_Commands_Overview|Meta-Command]]. More information (and an example) can be [[Visual3D:Documentation:Pipeline:Meta_Commands:Zeni_MetaCommand|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 | {{:DeAsha_RHipAngle.png}}| **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. |{{:DeAsha_RHS.png}} |\\ 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 ===== - ↑ [[#cite_ref-Zeni_1-0|1.0]] [[#cite_ref-Zeni_1-1|1.1]] [[http://www.ncbi.nlm.nih.gov/pubmed/17723303|**Zeni JA, Richards JG, Higginson JS** (2008) Two simple methods for determining gait events during treadmill and overground walking using kinematic data. Gait & Posture 27, 710-714]] - [[#cite_ref-DeAsha_2-0|↑]] [[http://www.ncbi.nlm.nih.gov/pubmed/22704579|De Asha AR, Robinson MA, Barton GJ. A marker based kinematic method of identifying initial contact during gait suitable for use in real-time visual feedback applications. Gait Posture. 2012 Jun 13]] - [[#cite_ref-Leitch_3-0|↑]] [[http://www.ncbi.nlm.nih.gov/pubmed/21084195|Leitch J, Stebbins J, Paolini G, Zavatsky AB. (2011) "Identifying gait events without a force plate during running: a comparison of methods." Gait Posture. 2011 Jan;33(1):130-2.]] - [[#cite_ref-DeWitt_4-0|↑]] [[http://www.ncbi.nlm.nih.gov/pubmed/20801452|De Witt JK. (2010) "Determination of toe-off event time during treadmill locomotion using kinematic data." J Biomech. 2010 Nov 16;43(15):3067-9.]] - [[#cite_ref-Ghoussayni_5-0|↑]] [[http://www.ncbi.nlm.nih.gov/pubmed/15531173|Ghoussayni S, Stevens C, Durham S, Ewins D.(2004) "Assessment and validation of a simple automated method for the detection of gait events and intervals." Gait Posture. 2004 Dec;20(3):266-72.]] - [[#cite_ref-Handsaker_6-0|↑]] [[https://dspace.lboro.ac.uk/dspace-jspui/handle/2134/23028|Handsaker JC, Forrester SE, Folland JP, Black MI, Allen SJ (2016) A kinematic algorithm to identify gait events during running at different speeds and with different footstrike types. Volume 49, Issue 16, Pages 4128–4133]]