User Tools

Site Tools


visual3d:tutorials:modeling:bicycle_model

This is an old revision of the document!


Instrumental Pedal Tutorial

Overview

This tutorial outlines the process to build a model for a bike pedal and crank and how to assign force data from analog signals. This tutorial assumes your human model is already built. Follow this tutorial to create a model before continuing Building 6DOF Model. This tutorial will have two parts, the first part will show how to create the model for the bike pedal and crank, and the second will show the force data processing.

The following c3d files can be downloaded as a starting point: Bike Model c3d Starter

Full completed CMZ can be downloaded here: Bike Model CMZ Complete

Full built model with properly assigned forces.

Model Building

Building this model is very tedious as there are a lot landmarks and segments required. It is important to follow the order outlined below as certain landmarks and segments are build off previously defined items. To create a new landmark click on the Landmarks tab, select Add New Landmark, input the definitions below and press Apply. Not that when inpotting the definitions below the pedal landmarks and their iffsets are specific to this dataset and would need to adjusted for different data.

To build a new segment select the Segment tab input your desired segment name, ensure the segment type is Visual 3D, select Create, input the definitions for the segments shown below, and select Apply.

The first set of landmarks define a virtual position for the cranks

LandmarkStarting PointExisting Coordinate SystemML OffsetAP OffsetAXIAL Offset
VRCRKAXISRCRKAXISLAB-0.004500
VLCRKAXISLCRKAXISLAB0.004500

The following set of landmarks define virtual positions from the pedal markers in the LAB

LandmarkStarting PointExisting Coordinate SystemML OffsetAP OffsetAXIAL Offset
VRPED1_XRPED1LAB-0.300
VRPED1RPED1LAB-0.600
VRPED2RPED2LAB-0.300
VRPED3RPED3LAB-0.500
VLPED1_XLPED1LAB0.300
VLPED1LPED1LAB0.600
VLPED2LPED2LAB0.300
VLPED3LPED3LAB0.500
VRPED3_0RPED3LAB-0.200
VLPED3_0LPED1LAB0.200
VRPED2_X1RPED2LAB-0.0700
LandmarkStarting PointEnding PointProject From
MRPED1RPED1VRPED1_XVRCRKAXIS
MLPED1LPED1VLPED1_XVLCRKAXIS

The following set of landmarks are for the Bike Lab Coordinate systems.

LandmarkStarting PointExisting Coordinate SystemML OffsetAP OffsetAXIAL Offset
B_LAB_ZLCRKAXISLAB000.1
B_LAB_YLCRKAXISLAB00.10
B_LAB_XLCRKAXISLAB0.100
B_LAB_Z_RRCRKAXISLAB000.1
B_LAB_Z_RRCRKAXISLAB00.30
B_LAB_Z_RRCRKAXISLAB0.100

We can now define our first segments.

SegmentProximal JointDistal JointExtra SignalTracking Signals
Right Pedal 1Lateral: VRPED3_0 Radius:0.07lateral: RPED2 Radius:0.07 Medial: RPENDANTMRPED1, RPED2, RPED3
Left Pedal 1Lateral: VLPED3_0 Radius:0.07lateral: LPED2 Radius:0.07 Medial: LPENDANTMLPED1, LPED2, LPED3
Bike_Lab Joint Center: B_LAB_Z Radius:0.07Joint center: LCRKAXIS Radius:0.01 Anterior: B_LAB_YB_LAB_Z, B_LAB_Y, B_LAB_X, LCRKAXIS
R_Bike_Lab Joint Center: B_LAB_Z_R Radius:0.07Joint center: RCRKAXIS Radius:0.01 Anterior: B_LAB_Y_RB_LAB_Z_R, B_LAB_Y_R, B_LAB_X_R, RCRKAXIS
AXIS Joint Center: RCRKAXIS Radius:0.1Joint center: CRANK_Z Radius:0.01 Medial: LCRKAXIS Check Use Calibration signals for Tracking

We can now define the next group of Landmarks built using the segments created above.

LandmarkStarting PointExisting Coordinate SystemML OffsetAP OffsetAXIAL Offset
VRPED1_ZVRPED1Right Pedal 100.210
VRPED2_ZVRPED2Right Pedal 100.210
VRPED3_ZVRPED3Right Pedal 100.210
VLPED1_ZVLPED1Left Pedal 100.210
VLPED1_ZVLPED2Left Pedal 100.210
VLPED1_ZVLPED3Left Pedal 100.210
MRPED1_ZMRPED1Right Pedal 100.210
MLPED1_ZMLPED1Left Pedal 100.210
VRPED1_Z_XVRPED1_ZRight Pedal 1-0.3800
VRPED2_Z_XVRPED2_ZRight Pedal 1-0.3800
VLPED1_Z_XVLPED1_ZLeft Pedal 1-0.3800
VLPED2_Z_XVLPED2_ZLeft Pedal 1-0.3800

We now have all the required Landmarks to define the final 4 segments.

SegmentProximal JointDistal JointExtra SignalTracking Signals
Right Pedal Joint Center: VRPED1_Z_X Radius:0.038lateral: VRPED2_Z_X Radius:0.038 Lateral: VRPED1MRPED1_Z, RPED2, RPED30.01
Left Pedal Joint Center: VLPED1_Z_X Radius:0.038lateral: VLPED2_Z_X Radius:0.038 Lateral: VLPED1MLPED1_Z, LPED2, LPED30.01
Right Crank Joint Center: RCRKAXIS Radius:0.01lateral: MRPED1 Radius:0.01 Lateral: RPED1MRPED1, RCRKAXIS, RPED1 0.01
Left Crank Joint Center: LCRKAXIS Radius:0.01lateral: MLPED1 Radius:0.01 Lateral: LPED1MLPED1, LCRKAXIS, LPED1 0.01

You should now have all the landmarks and segments built for your model and you human and bike model should resemble the following.

Force Processing

Force data from bikes is often imported using analog signals not force plates. Data requires processing to interpret. The following steps will show the command pipeline used for this process. The completed pipeline can also be downloaded here. Not there are values specific to this data such as variable names and lever arms based on pedal size that will need to be changed based on the specific data.

The original force data is very noisy so a low-pass filter is used to smooth the data. The command Lowpass_Filter can be under Signal Filter press » to add to your pipeline.

Lowpass_Filter
/SIGNAL_TYPES= ANALOG
! /SIGNAL_FOLDER=ORIGINAL
! /SIGNAL_NAMES=
! /RESULT_FOLDER=PROCESSED
! /RESULT_SUFFIX=
! /FILTER_CLASS=BUTTERWORTH
 /FREQUENCY_CUTOFF=6.0
 /NUM_REFLECTED=6
! /NUM_EXTRAPOLATED=0
/TOTAL_BUFFER_SIZE=20
! /NUM_BIDIRECTIONAL_PASSES=1
;

Once smoothed the Evaluate_Expression command can be used to determine the Force in each pedal before using the Transform_Data_Coordinate_System to convert force values to the Lab.

Force

/Right

Evaluate_Expression
/EXPRESSION= VECTOR((-1.0*ANALOG::PROCESSED::Force.Fx_2),((1.0*ANALOG::PROCESSED::Force.Fy_3)+(1.0*ANALOG::PROCESSED::Force.Fy_4)),((1.0*ANALOG::PROCESSED::Force.Fz_3)+(1.0*ANALOG::PROCESSED::Force.Fz_4)))
/SIGNAL_TYPES=ANALOG
! /SIGNAL_FOLDER=PROCESSED
/SIGNAL_NAMES=Force.Fx_2+Force.Fy_3+Force.Fy_4+Force.Fz_3+Force.Fz_4
! /SIGNAL_COMPONENTS=
! /RESULT_TYPES=DERIVED
/RESULT_FOLDERS=FORCE_RIGHT
/RESULT_NAME= FORCE
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;

Transform_Data_Coordinate_System
/SIGNAL_TYPES= DERIVED
/SIGNAL_FOLDER=FORCE_RIGHT
/SIGNAL_NAMES= FORCE
! /FROM_SEGMENT_CS= Right Pedal
/TO_SEGMENT_CS= LAB
/RESULT_TYPES= DERIVED
/RESULT_FOLDERS= FORCE_LAB_RIGHT
!/RESULT_NAME=
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
/ORIENTATION_ONLY=TRUE
! /USE_DATA_RATE=FALSE
;

============
/Left
============

Evaluate_Expression
/EXPRESSION= VECTOR((-1.0*ANALOG::PROCESSED::Force.Fx),((1.0*ANALOG::PROCESSED::Force.Fy)+(1.0*ANALOG::PROCESSED::Force.Fy_2),((1.0*ANALOG::PROCESSED::Force.Fz)+(1.0*ANALOG::PROCESSED::Force.Fz_2)))
/SIGNAL_TYPES=ANALOG
! /SIGNAL_FOLDER=PROCESSED
/SIGNAL_NAMES=Force.Fx+Force.Fy+Force.Fy_2+Force.Fz+Force.Fz_2
! /SIGNAL_COMPONENTS=
! /RESULT_TYPES=DERIVED
/RESULT_FOLDERS=FORCE_LEFT
/RESULT_NAME= FORCE
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=FALSE
;

Transform_Data_Coordinate_System
/SIGNAL_TYPES= DERIVED
/SIGNAL_FOLDER=FORCE_LEFT
/SIGNAL_NAMES= FORCE
! /FROM_SEGMENT_CS= Left Pedal
/TO_SEGMENT_CS= LAB
/RESULT_TYPES= DERIVED
/RESULT_FOLDERS= FORCE_LAB_LEFT
!/RESULT_NAME=
! /APPLY_AS_SUFFIX_TO_SIGNAL_NAME=TRUE
/ORIENTATION_ONLY=TRUE
! /USE_DATA_RATE=FALSE
;

In order to change the force assignments the Center Of Pressure and Freemoment for each pedal are also required. First we must compute the moment, followed by the COP and finally the Freemoment.

Moment

Note that the decimal coefficients are lever arm measurements that will change based on pedal size.

============
/Right
============

Evaluate_Expression
/EXPRESSION=VECTOR((0.02845*DERIVED::FORCE_RIGHT::FORCE::Y),((0.01945*ANALOG::PROCESSED::Force.Fz_4-0.01945*ANALOG::PROCESSED::Force.Fz_3)-0.02845*ANALOG::PROCESSED::Force.FX_2),((0.01945*ANALOG::PROCESSED::Force.Fy_4-0.01945*ANALOG::PROCESSED::Force.Fy_3)))
/RESULT_NAME=MOMENT
/RESULT_TYPE=DERIVED
/RESULT_FOLDER=FORCE_RIGHT
;

============
/Left
============

Evaluate_Expression
/EXPRESSION=VECTOR((0.02845*DERIVED::FORCE_LEFT::FORCE::Y), ((-0.01945*ANALOG::PROCESSED::Force.Fz + 0.01945*ANALOG::PROCESSED::Force.Fz_2) - 0.02845*ANALOG::PROCESSED::Force.FX), ((0.01945*ANALOG::PROCESSED::Force.Fy - 0.01945*ANALOG::PROCESSED::Force.Fy_2)))
/RESULT_NAME=MOMENT
/RESULT_TYPE=DERIVED
/RESULT_FOLDER=FORCE_LEFT
;

Center Of Pressure

============
/Right
============

Evaluate_Expression
/EXPRESSION=VECTOR((-1 * DERIVED::FORCE_RIGHT::MOMENT::Y / DERIVED::FORCE_RIGHT::FORCE::Z), (DERIVED::FORCE_RIGHT::MOMENT::X / DERIVED::FORCE_RIGHT::FORCE::Z), (0.0*analog::processed::Force.Fx_2))
/RESULT_NAME=COP
 /RESULT_TYPE=DERIVED
 /RESULT_FOLDER=FORCE_RIGHT
;

Transform_Data_Coordinate_System
/SIGNAL_TYPES=DERIVED
/SIGNAL_NAMES=COP
/SIGNAL_FOLDER=FORCE_RIGHT
/FROM_SEGMENT_CS=Right Pedal
/TO_SEGMENT_CS=Lab
/RESULT_TYPE=Derived
/RESULT_FOLDER=FORCE_LAB_RIGHT
/RESULT_SUFFIX=
/ORIENTATION_ONLY=FALSE
! /USE_DATA_RATE=FALSE
;

============
/Left
============

Evaluate_Expression
/EXPRESSION=VECTOR((-1*DERIVED::FORCE_LEFT::MOMENT::Y / DERIVED::FORCE_LEFT::FORCE::Z), (DERIVED::FORCE_LEFT::MOMENT::X / DERIVED::FORCE_LEFT::FORCE::Z), (0.0*analog::processed::Force.Fx))
/RESULT_NAME=COP
 /RESULT_TYPE=DERIVED
 /RESULT_FOLDER=FORCE_LEFT
;

Transform_Data_Coordinate_System
/SIGNAL_TYPES=DERIVED
/SIGNAL_NAMES=COP
/SIGNAL_FOLDER=FORCE_LEFT
/FROM_SEGMENT_CS=Left Pedal
/TO_SEGMENT_CS=Lab
/RESULT_TYPE=Derived
/RESULT_FOLDER=FORCE_LAB_LEFT
/RESULT_SUFFIX=
/ORIENTATION_ONLY=FALSE
! /USE_DATA_RATE=FALSE
;

Freemoment

============
/Right
============

Evaluate_Expression
/EXPRESSION=VECTOR((0.0*analog::processed::Force.Fx_2),(0.0*analog::processed::Force.Fy_3),(Derived::FORCE_RIGHT::MOMENT::Z - Derived::FORCE_RIGHT::FORCE::Y * Derived::FORCE_RIGHT::COP::X + Derived::FORCE_RIGHT::FORCE::X * Derived::FORCE_RIGHT::COP::Y))
/RESULT_NAME=FREEMOMENT
 /RESULT_TYPE=DERIVED
 /RESULT_FOLDER=FORCE_RIGHT
;

Transform_Data_Coordinate_System
/SIGNAL_TYPES=DERIVED
/SIGNAL_NAMES=FREEMOMENT
/SIGNAL_FOLDER=FORCE_RIGHT
/FROM_SEGMENT_CS=Right Pedal
/TO_SEGMENT_CS=Lab
/RESULT_TYPE=Derived
/RESULT_FOLDER=FORCE_LAB_RIGHT
/RESULT_SUFFIX=
/ORIENTATION_ONLY=TRUE
! /USE_DATA_RATE=FALSE
;

============
/Left
============
Evaluate_Expression
/EXPRESSION=VECTOR((0.0*analog::processed::Force.Fx),(0.0*analog::processed::Force.Fy),(Derived::FORCE_LEFT::MOMENT::Z - Derived::FORCE_LEFT::FORCE::Y * Derived::FORCE_LEFT::COP::X + Derived::FORCE_LEFT::FORCE::X * Derived::FORCE_LEFT::COP::Y))
/RESULT_NAME=FREEMOMENT
 /RESULT_TYPE=DERIVED
 /RESULT_FOLDER=FORCE_LEFT
;

Transform_Data_Coordinate_System
/SIGNAL_TYPES=DERIVED
/SIGNAL_NAMES=FREEMOMENT
/SIGNAL_FOLDER=FORCE_LEFT
/FROM_SEGMENT_CS=Left Pedal
/TO_SEGMENT_CS=Lab
/RESULT_TYPE=Derived
/RESULT_FOLDER=FORCE_LAB_LEFT
/RESULT_SUFFIX=
/ORIENTATION_ONLY=TRUE
! /USE_DATA_RATE=FALSE
;

Modifying Force Assignments

With all values calculated the force assignments for the Right and Left feet can be set. Select Add/Modify Segment Assignment To Force under the Force tab in the upper toolbar.

Select Add Segment Assignment and enter the following values. Change the end frame to the last frame in your specific trial.

visual3d/tutorials/modeling/bicycle_model.1781544227.txt.gz · Last modified: by wikisysop