Tutorial: Gait Profile Score and Movement Analysis Profile Pipeline

From Software Product Documentation
Jump to navigation Jump to search
Language:  English  • français • italiano • português • español 

This page is currently being updated.

Academic Background

Baker et al. published two papers defining the calculation and applications of the Gait Profile Score (GPS):

  1. Baker, R., McGinley, J.L., Schwartz, M.H., Beynon, S., Rozumalski, A., Graham, H.K., Tirosh, O. (2009). The gait profile score and movement analysis profile. Gait Posture, 30(3), 265–269.
  2. Baker, R., McGinley, J. L., Schwartz, M., Thomason, P., Rodda, J., & Graham, H. K. (2012). The minimal clinically important difference for the Gait Profile Score. Gait Posture, 35(4), 612-615.

This tutorial describes how to create a pipeline to compute the Gait Profile Score and Movement Analysis Profile as detailed in the papers published by Baker et al.

Relevant Links

Downloads

  • GPS_Tutorial.zip

GPS Description and Conventions

The Gait Profile Score (GPS) is a clinical index that can be used to measure the overall deviation of gait data relative to normative data. It is composed of Gait Variable Scores (GVSs) calculated from 9 key kinematic gait variables, which can be presented as a Movement Analysis Profile (MAP).

These kinematic variables are:

  • Knee Flexion/Extension
  • Ankle Dorsiflexion/Plantarflexion
  • Pelvic Tilt
  • Pelvic Rotation
  • Pelvic Obliquity
  • Hip Flexion/Extension
  • Hip Abduction/Adduction
  • Hip Rotation
  • Foot Progression

Each of these kinematic variables should be normalized to the gait cycle (as in above right image), and should be sampled every 2% of the gait cycle (such that each signal has 51 points).

The GPS score can be computed for the left and/or the right side. It can also be computed as a overall index for both sides.

Please note: Since the pelvic movement is not specific to a any side, the authors recommend only including it when computing the GPS for the left side (as a convention). This means that for the left side, a total of 9 variables are used to compute the GPS, instead of only 6 for the right side. The overall GPS for both sides would therefore include all 9 variables.

Equations

Although the Gait Profile Score was explained in the 2009 paper, the equations were not explicitly written. The 2012 paper contains explicit written equations but due to some formatting errors they are incorrect. The GPS Equations and Descriptions PDF has the correct version of these equations, which are also described below:

The Global Variable Scores (GVS) is the root mean square difference between a specific time normalized gait variable (x) and the mean data from the reference population calculated across the gait cycle (x ref).

caption

i = the number of kinematic variables used

t = the specific point in the gait cycle

T = total number of points in the gait cycle

xi,t = the value of gait variable i at point t

xi,t ref = the mean of gait variable i at point t in the reference population

If normalizing to every 2% of the gait cycle, T is equal to 51.

The Gait Profile Score (GPS) the root mean square average of all the Gait Variable Scores:

caption

i = the specific kinematic variable

T = total number of kinematic variables used

If using 15 kinematic variables, N is equal to 15.

As described in the previous section, the GPS can be calculated for the right side, the left side, or as an overall value. In Richard Baker's GPS Excel Sheet Calculator, there is also an added log transform to the final GPS value (this is optional).

Step 1: Model Creation and Joint Angle Definition

To calculate the GPS using the described kinematic variables, you must have a model with at least 7 segments:

  1. Pelvis
  2. Left/Right Thigh Segments
  3. Left/Right Shank Segments
  4. Left/Right Foot Segments

If you are unfamiliar with building models in Visual3D, the Model Building Tutorial is a good place to start. The zip files for this tutorial contain a workspace with a pre-built and pre-applied model.

Once a model has been created, the joint angles for each of the nine kinematic variables need to be calculated. Below is an example of calculating the Left Ankle Angle:

!--------Left Ankle Angle----------!
Compute_Model_Based_Data
/RESULT_NAME=L_Ankle_Angle
/SUBJECT_TAG=ALL_SUBJECTS
/FUNCTION=JOINT_ANGLE
/SEGMENT=LMF
/REFERENCE_SEGMENT=LSK
/RESOLUTION_COORDINATE_SYSTEM=
! /USE_CARDAN_SEQUENCE=FALSE
! /NORMALIZATION=FALSE
! /NORMALIZATION_METHOD=
! /NORMALIZATION_METRIC=
! /NEGATEX=FALSE
! /NEGATEY=FALSE
! /NEGATEZ=FALSE
! /AXIS1=X
! /AXIS2=Y
! /AXIS3=Z
! /TREADMILL_DATA=FALSE
! /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0)
! /TREADMILL_SPEED=0.0
;

The zip file download for this tutorial contains a pipeline that calculates joint angles for all nine kinematic variables.

Step 2: Create a Normalized Database

Step 3: Calculating GPS Values using Visual3D Pipeline

Example 1

Example 2



Old Tutorial

Summary

To calculate the GPS, a control database must be created (.vnd file) and a subject's CMO file must be created.

This tutorial describes step by step how to create a .vnd file and then create the GPS for a subject.

Starting out

This tutorial uses the 15 kinematic variables used in Richard Baker's first paper; pelvic tilt, pelvic obliquity and pelvic rotation and hip flexion, hip abduction, hip internal rotation, knee flexion, ankle dorsiflexion and foot progression. [1]

Since the pelvis is common to the left and right sides, only the left side is used to calculate the pelvic angles (so the pelvis is only analyzed from left foot strike to left foot strike (LHS+LHS). [1]

The tutorial also calculates the GVS at every 2% of the gait cycle, so the signal is normalized to 51 points [2].

Step 1. Create Model

To calculate the GPS using the specified kinematic variables [1], you must have a model with at least 7 segments in your model:

  1. A Pelvis
  2. Left/Right Thigh Segments
  3. Left/Right Shank Segments
  4. Left/Right Foot Segments

In addition to these segments, I also created Left/Right Virtual Feet segments and a virtual lab segment:

1. In order to calculate more meaningful ankle joint angles, I created a virtual foot using this method. The virtual feet are called Right/Left Virtual Foot (R/LMF).
2. Since my subject is walking in the +/- direction of the lab, I also created a dynamic virtual lab which changes direction based on the subject's direction of progression. The virtual lab is called Virtual Lab Pelvis. I then calculated the pelvis angle and foot progression angles relative to the virtual lab segment.

Step 2. Define Joint Angles

To calculate the kinematic variables [1], nine signals must be created. The signal name is user defined, but this tutorial uses the following names:

LFootProgression
LAnkleAngle
LKneeAngle
LHipAngle
LPelvisAngle
RFootProgression
RAnkleAngle
RKneeAngle
RHipAngle


Since the Recalc pipeline is stored in the Report template (.rgt), a report template which stores these signal definitions was created. This report template can be downloaded here.
NOTE: It is recommend that the left and right sides have the same convention for +/-.



Create Normal Database

The GPS requires some reference data to compare against. For this tutorial, the subject's data is compared against a control database. Instructions to create a normal database can be found in the GPS Normal Database Tutorial. This tutorial describes how to easily create the normal data script and how to save the control data as a .vnd file.

The script used to create the normal data can be found here.

To complete this tutorial, sample control data can be downloaded from here. Please note this "control database" was created from subject - so you should NOT use this as actual data.

Calculate GPS for a subject

1. Prepare Subject CMO

Make sure the subject's CMO has the same model template used for the control subjects and the same signals are defined.

Gait events must also be created in the CMZ file.

2. Create Subject Normalized Signals

First calculate the appropriate kinematic variables in the LINK_MODEL_BASED folder.

The normalized signals should be the same for the control and test subject. By the same, we mean the signals should be normalized to the same number of points (ex. 51 [2]) between the same events (ex. LHS+LHS).


A. Set the active file to ALL_FILES
B. Run the NormalizeSubjectData.v3s script

NOTE: The same script was used to normalize the subject's data as for the control database. The only change was that the result folder was changed from GPS_CONTROL to GPS_SUBJECT in Notepad++ and then the new script was saved.

3. Calculate GPS Signals

A. Run the CalculateGPS_2015_06_02.v3s (show below)
B. When prompted select the control database, an example database can be downloaded here

Script Requirements:

This script requires the subject data to be stored in the P2D::GPS_SUBJECT folder and the control data to be stored in the P2D::GPS_CONTROL folders. The names for the associated signals should be the same, for example the left dorsiflexion angle should be the LAnkleAngle_X_LHS_LHS in both the subject and control folders.

The script will use ALL signals in the GPS_SUBJECT folder for the calculations. The 2009 paper [1] used 15 kinematic variables, if you would like to do the same, only 15 signals should exist in your GPS_SUBJECT folder.

As long as your normalized signals are stored in the GPS_SUBJECT and GPS_CONTROL folders, and the signal names are consistent between both folders, you can use this script with signals that use a different naming convention or as many kinematic variables as you would like.

Script:

!=====================================================
! Gait Profile Score and Movement Analysis Profile Pipeline
! Date: 2015
! Need: A complete .cmo file with walking trials 
!       Normal data in .p2d format
! Purpose: Replicate the GPS and MAS as described in Baker et al., 2009,
! The Gait Profile Score and Movement ANalysis Profile, Gait and Posture, 30, 
! p.265.
!======================================================= 

File_Open
! /FILE_NAME=
! /SUFFIX=
/SET_PROMPT=Open Control Database for GPS
; 

Select_Active_File
/FILE_NAME=GLOBAL
! /QUERY=
;

Set_Pipeline_Parameter_To_List_Of_Signal_Names
! Get a list of the kinematic variables which will be used to calculate the GPS
! The normalized signals should be stored in the P2D::GPS_SUBJECT folder
! - ONLY signals to be included in the GPS should be in this folder
! - The signal names from this folder be identical to the corresponding control signals
! - Control signals should be stored in the P2D::GPS_CONTROL folder
/PARAMETER_NAME=SIGNAL_LIST
/SIGNAL_TYPES=P2D
/SIGNAL_FOLDER=GPS_SUBJECT
;

Get_Pipeline_Parameter_Count
! Calculate the number of kinematic variables to be used for the GPS
/PARAMETER_NAME=KIN_VARIABLES
/PARAMETER_VALUE=::SIGNAL_LIST
;

For_Each
/ITERATION_PARAMETER_NAME=SIGNAL
! Loop over each signal in the list
/ITEMS=::SIGNAL_LIST
;
	! -------------------------
	! Calculate GVS 
	! -------------------------
	 
	Subtract_Signals 
	! Calculate the difference between the Subject and Control Data
	/SIGNAL_TYPES=P2D
	/SIGNAL_FOLDER=GPS_SUBJECT+GPS_CONTROL
	/SIGNAL_NAMES=::SIGNAL
	! /COMPONENT_SEQUENCE=
	/RESULT_FOLDER=GVS_SIGNAL_DIFF
	/RESULT_NAME=&::SIGNAL&
	;
	
	Metric_Root_Mean_Squared
	! Calculate the GVS
	! 	 The GVS is the RMS of the difference between the Subject and Control Data
	/RESULT_METRIC_FOLDER=GVS
	/RESULT_METRIC_NAME=_RMS
	/APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
	/SIGNAL_TYPES=DERIVED
	/SIGNAL_FOLDER=GVS_SIGNAL_DIFF
	/SIGNAL_NAMES=&::SIGNAL&
	/COMPONENT_SEQUENCE=Y
	/EVENT_SEQUENCE=
	/EXCLUDE_EVENTS=
	/SEQUENCE_PERCENT_START=
	/SEQUENCE_PERCENT_END=
	/GENERATE_MEAN_AND_STDDEV=FALSE
	! /APPEND_TO_EXISTING_VALUES=FALSE
	;
	
	! -------------------------
	! Calculate GPS
	! -------------------------
	
	Evaluate_Expression
	! Square the GVS value for each variable
	/EXPRESSION= ( METRIC::GVS:&:&::SIGNAL&_RMS ) ^ 2
	! /SIGNAL_TYPES=
	! /SIGNAL_FOLDER=ORIGINAL
	! /SIGNAL_NAMES=
	/RESULT_TYPES=METRIC
	/RESULT_FOLDERS=GPS_MATH
	/RESULT_NAME=&::SIGNAL&_RMS_SQR
	! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
	;
	
End_For_Each
/ITERATION_PARAMETER_NAME=SIGNAL
;

Set_Pipeline_Parameter
! Update the signal list to reflect the suffixes added to the original signal names
/PARAMETER_NAME=SIGNAL_LIST2
/PARAMETER_VALUE=::SIGNAL_LIST
! /PARAMETER_VALUE_SEARCH_FOR=
! /PARAMETER_VALUE_REPLACE_WITH=
! /PARAMETER_VALUE_PREFIX=
/PARAMETER_VALUE_APPEND=_RMS_SQR
! /MULTI_PASS=FALSE
;

Add_Signals
! Sum the squared GVS for each variable
/SIGNAL_TYPES=METRIC
/SIGNAL_FOLDER=GPS_MATH
/SIGNAL_NAMES=::SIGNAL_LIST2
! /COMPONENT_SEQUENCE=
/RESULT_FOLDER=GPS_MATH
/RESULT_NAME=GPS_SUM
;

Evaluate_Expression
! Calculate the GPS 
!	The GPS is the RMS of the kinematic variables
!	Since the GVS of the kinematic variables were already squared and summed, the signal only needs to be divided by the number of variables and the square root taken
/EXPRESSION= SQRT ( (1 / &::KIN_VARIABLES&) * ( METRIC::GPS_MATH::GPS_SUM ) )
! /SIGNAL_TYPES=
! /SIGNAL_FOLDER=ORIGINAL
! /SIGNAL_NAMES=
/RESULT_TYPES=METRIC
/RESULT_FOLDERS=GPS
/RESULT_NAME=GPS
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;
  1. 1.0 1.1 1.2 1.3 1.4 Cite error: Invalid <ref> tag; no text was provided for refs named B1
  2. 2.0 2.1 Cite error: Invalid <ref> tag; no text was provided for refs named B3
Retrieved from ""