User Tools

Site Tools


visual3d:documentation:pipeline:signal_commands:first_derivative

First Derivative

Overview

The First Derivative command can be used to calculate the first derivative of a signal at each point throughout the signal. This is can be useful when calculating the velocity of a signal that can't already be done using model based data or another rate of change.

Pipeline Command

The pipeline command can be found in the Pipeline Workshop under the Signal Math folder as so:

First_Derivative
/Signal_Types
/Signal_Names
/Signal_Folder
/Result_Types
/Result_Name
/Result_Folder
/Result_Suffix

Command Parameters

The parameters that can be modified for this command are as follows:

Signal TypesThe type of signal to be evaluated
Signal NameThe name of the signal to be evaluated
Signal FolderThe name of the signal folder
Result TypesThe type of the resulting signal
Result NameThe name of the resulting signal
Result FolderThe name of the resulting folder
Result SuffixThe result is given the same name as the original signal with the suffix added

Dialog

The dialog box that can be used to edit the command appears like so:

Notes

Derivatives are calculated using Finite Difference Algorithms.

Given the signal:
x(ti) for i=1, 2, ..., n

The first derivative is calculated using:
xDot(ti)= (x(ti+1)-x(ti-1))/( (ti+1)-(ti-1) )

Example: Joint Angular Acceleration from Joint Angular Velocity

This example shows how the First_Derivative command can be used to compute the angular acceleration of the left ankle from its angular velocity (found using the compute model based data command):

!First we find the left ankle angular velocity using Compute_Model_Based_Data
Compute_Model_Based_Data
/RESULT_NAME=LAnkeAngVel
/SUBJECT_TAG=ALL_SUBJECTS
/FUNCTION=JOINT_VELOCITY
/SEGMENT=LFT
/REFERENCE_SEGMENT=LSK
! /RESOLUTION_COORDINATE_SYSTEM=LAB
! /USE_CARDAN_SEQUENCE=FALSE
! /NORMALIZATION=FALSE
! /NORMALIZATION_METHOD=
! /NORMALIZATION_METRIC=
! /NEGATEX=FALSE
! /NEGATEY=FALSE
! /NEGATEZ=FALSE
! /AXIS1=X
! /AXIS2=Y
! /AXIS3=Z
! /INCLUDE_REMOTE_ANGULAR_MOMENTUM=FALSE
! /TREADMILL_DATA=FALSE
! /TREADMILL_DIRECTION=UNIT_VECTOR(0,1,0)
! /TREADMILL_SPEED=0.0
;

!Next we can find the angular acceleration using the First_Derivative command
First_Derivative
/SIGNAL_TYPES=LINK_MODEL_BASED
! /SIGNAL_FOLDER=ORIGINAL
 /SIGNAL_NAMES=LAnkleAngVel
/RESULT_TYPES=LINK_MODEL_BASED
! /RESULT_FOLDERS=PROCESSED
 /RESULT_NAME=Ankle_Derivative_Acc
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=
;

Example: Velocity of the Centre of Mass

The First_Derivative command is useful for calculating the velocity of targets, landmarks, etc. since velocity is the first derivative of position. The following example calculates the velocity of the center of mass using the First_Derivative command.

! Given a signal representing the center of mass's position as follows:
Compute_Model_Based_Data
/RESULT_NAME=COM
/FUNCTION=MODEL_COG
/SEGMENT=
/REFERENCE_SEGMENT=
! /RESOLUTION_COORDINATE_SYSTEM=LAB
! /USE_CARDAN_SEQUENCE=FALSE
! /NORMALIZATION=FALSE
! /NORMALIZATION_METHOD=
! /NORMALIZATION_METRIC=
! /NEGATEX=FALSE
! /NEGATEY=FALSE
! /NEGATEZ=FALSE
! /AXIS1=X
! /AXIS2=Y
! /AXIS3=Z
;

! The velocity of the center of mass can be computed as follows:
First_Derivative
/SIGNAL_TYPES=LINK_MODEL_BASED
/SIGNAL_NAMES=COM
! /SIGNAL_FOLDER=ORIGINAL
/RESULT_NAMES=COM_VELOCITY
/RESULT_TYPES=LINK_MODEL_BASED
/RESULT_FOLDER=VELOCITY
! /RESULT_SUFFIX=
;
visual3d/documentation/pipeline/signal_commands/first_derivative.txt · Last modified: by wikisysop