Investigation of Modeling Differences between OpenSim and Visual3D for Gait Analysis of Healthy Gait

This study compares the biomechanical results of healthy individuals walking straight using OpenSim and Visual3D which differ in their optimization and modeling approaches for kinematics and kinetics calculation. The motion capture data of nine healthy subjects were processed on OpenSim and Visual3D according to each software's recommended approach and their kinematics and kinetics information was analyzed. Our analysis shows that some of the differences in the kinematics and kinetics between the two software can be attributed to the modeling difference of the pelvis, hip and ankle.


INTRODUCTION
Human gait is a complex motion involving the coordination of multiple joints, muscles, and tendons.Biomechanical studies often turn to advanced tools such as OpenSim [1] and Visual3D [2] to obtain gait kinematics and kinetics to use in various applications such as sport science, rehabilitation, and robotics.Understanding the gait kinematics and kinetics of a person is a key tool for clinicians to assess the quality of the gait of the person and provide clinical guidance to gait-impaired individuals.There is substantial research in the gait analysis of various impaired individuals but to our knowledge, there is little research that directly compares the biomechanical results of different biomechanical tools.Thus, this study focuses on the differences in the estimation of kinematic and kinetic outputs for the lower extremity when healthy subjects are performing a straight walking task.
Visual3D is primarily known for its ability to provide full visibility into biomechanical processes.It is often used in the analysis of motion capture data and is widely recognized for its accuracy and reliability.In addition, Visual3D has been extensively validated across a range of papers available on their website, making it a popular choice for researchers and clinicians.On the other hand, OpenSim is primarily known for its musculoskeletal simulation capability.It is a powerful software that allows researchers to simulate the mechanics of the musculoskeletal system, including the muscles, bones, and joints.OpenSim also provides visibility over the mathematical formulations, making it an ideal choice for researchers who want to understand the underlying mechanics of the simulations.
The key difference between OpenSim and Visual3D lies in their optimization approaches in kinematics computation as summarized by Ana et al. [3] Visual3D uses segment optimization, which computes the position and orientation of each individual body segment of a model [3].The segments are independent of each other with unconstrained joints where each joint has six degrees of freedom (DoF), three rotation DoFs and three translation DoFs.In contrast, OpenSim uses global optimization where each joint is constrained by anatomical linkage constraints according to the model of choice [3].However, it is critical to note that users have the option to apply constraints to individual joints in Visual3D.Existing comparative literature between OpenSim and Visual3D fails to mention this point and it can be inferred that these studies did not apply joint constraints in their kinematics calculations [3].This imposition of joint constraints largely depends on the context.Excessive constraints lead to loss of information of the constrained axis of movement [4].This is especially applicable in subjects where markers shift during the motion capture session or in gait-impaired individuals.In this work, the joints in Visual3D are not constrained to ensure the most precise tracking of markers.Another notable difference between OpenSim and Visual3D as highlighted is that the pelvis is defined as one body in our selected model in OpenSim as compared to two bodies, left and right pelvis, for Visual3D [5].Compared to existing literature, our study focuses more on how the different model definitions across OpenSim and Visual3D results in a difference in the kinematic and kinetic output of the two platforms.

METHOD
For this study, the open-source motion capture data from Rehabilitation Research Institute of Singapore (RRIS) is used [6].We utilize only the walking tasks in the motion capture data.The motion capture data from RRIS were recorded at 200Hz using a mixture of Qualisys Aqus and Miqus three-dimensional infrared motion capture system (Qualisys AB, Sweden).Marker position follows a modified Calibrated anatomical systems technique (CAST) [7], [8] as recommended by the Qualisys system.

Visual3D Model
Post processing was done in Visual3D using a six DoFs biomechanics model [6] following joint coordinate recommendation from the International Society of Biomechanics (ISB) [9].We followed the standard Visual3D workflow of defining proximal and distal joint of each segment.No inverse kinematic (IK) constrain was used.Process is further detailed in the published paper [6].

OpenSim Model
OpenSim has many open-source models available, but for this study, we use the full body skeletal model provided by Rajagopal et al. [10].To convert C3D motion data to OpenSim compatible file formats, an open-source biomechanical toolkit (BTK) [11] was used.In this step, the global lab coordinate system (YZX) is also reordered to match the global OpenSim coordinate (XYZ).For the scaling, inverse kinematics and inverse dynamics of the motion capture data, we largely follow the recommended guidelines from OpenSim [12].
To create a scaled model, the RRIS marker set is mapped onto the model to determine the scaling factor to each body segment.The static pose is used where the subject has their shoulders abducted to 45 degrees with elbows fully extended.Higher weights are assigned to bony landmarks such as the lower limb markers as compared to tracking markers which are prone to shifting during movement.
To extract kinematic information, the inverse kinematics process was used to compute the joint coordinate values to position the model in a pose that best matches the experimental markers from the motion capture data in every timeframe.OpenSim uses global optimization and this solves a weighted least squares problem to minimize marker errors between the experimental and virtual markers [12].Relative weights of tracking and toe markers were set to 50, pelvis markers to 100 and anatomical markers to 25.The tracking and toe markers were assigned the 2 nd highest weight as they play a critical role in tracking the motion during inverse kinematics process.Pelvis has the highest weight as it plays the critical role in determining the position of the whole model in the global coordinate system.Conversely, anatomical markers were assigned the lowest weight as bony landmarks are not very involved in movement.Through this setting, we ensure that the inverse kinematic process produces the most accurate joint coordinate values that reflect the motion capture data.
To extract kinetics information, OpenSim uses inverse dynamics which requires the kinematic information and external load if available.The motion capture data used contains ground reaction forces which are used as the external load.The low-pass cut-off frequency was also set to a commonly used value of 6 Hz.An inverse dynamics approach is used to solve the mass-dependent equations of motion (F=ma) to determine the unknown generalized forces.The resulting output provides net forces and torques at each joint that contributes to the observed motion [12].

RESULTS
For gait analysis of straight walking, we focus only on the joints in the lower extremity, and we plot the various results against percentage of the subject's gait cycle as per gait analysis convention.To normalize the plot with gait cycle, the right and left limb will be synced.However, this requires gait event detection to detect the start and end of each gait cycle which OpenSim does not have as an in-built function.As such, gait event detection was first implemented in OpenSim.As there might be multiple gait cycles for each dynamic trial, only the gait cycle where initial heel strike of the subject occurs on the force plate is taken.This ground reaction force data is used to provide valuable information about the timing of gait cycle events such as heel-strike and toe-off.However, this can be insufficient to determine the second heel strike time, as both feet would have left the force plates before this point.To address this, another method was implemented using the height of markers on the calcaneus to determine the timeframe of each heel strike.The height of the markers was used as it is close to the ground at every heel strike event, causing the markers' height to be at a minimum value.To ensure that we only take the gait cycle during initial contact with the force plate, we combine both methods to extract the starting timeframe closest to the first heel strike event detected with the ground reaction force.

Lower Limb Joint Kinematics
The kinematic results from OpenSim and Visual3D have similar shapes but show some variation in value ranges at certain time frames as seen in Figure 1.
We observe that the pelvis rotation is very similar but there is a large difference in the pelvis tilt and large difference in the range of values of pelvis obliquity.Additionally, there is approximately 10 degrees more hip flexion from Visual3D as compared to OpenSim which is in line with existing literature [3].As for the hip adduction, we note that both shapes are similar but the range of values of Visual3D is smaller than OpenSim.For hip rotation, the shape is similar but with a phase difference across the two software.In general, angles in the sagittal plane such as hip flexion, knee flexion  and ankle dorsiflexion of both software exhibit shapes that are very similar to one another as compared to other planes.

Lower Limb Joint Kinetics
Normalized joint moments at the hip, knee and ankle joints were plotted against the percentage of gait cycle in Figure 2. The kinetics results of both OpenSim and Visual3D are visually similar but closer inspection reveals differences in the peaks of certain moments at different times and magnitudes.Both Visual3D and OpenSim human models are rigid body dynamic systems and relate the motion of the system to forces and torques acting on its rigid components.The difference in results is likely due to the differences that propagated from the different kinematic results, as most of the timeframe of the kinetics graphs with more significant difference between the OpenSim and Visual3D results corresponds to the timeframe of the kinematic graphs with significant differences of value ranges.Additionally, we observe that the ankle evertor moment of OpenSim and Visual3D are both visually different at the initial 30% of the gait cycle with Visual3D posting a much lower moment than OpenSim.

DISCUSSION 4.1 Differences in Pelvis and Hip
The difference between pelvis obliquity range of values could be attributed to how the pelvis body is defined in OpenSim and Vi-sual3D.The pelvis is a complex structure that is comprised of many bony structures and synovial joints in which intrapelvic movement between these bony structures can occur [13], thus there is not one predetermined way to represent the pelvic body in biomechanical studies.OpenSim defines their pelvis as one body where the pelvis moves and rotates as one rigid structure and Visual3D defines as two separate bodies corresponding to the motion of the right and left lower limbs.This definition of pelvis directly affects the accuracy of tracking the movement of the actual pelvis markers, potentially explaining the difference of the pelvis obliquity.Future work should analyze the effect of this definition of the pelvis on biomechanical outputs.
The difference in pelvic tilt may be attributed to the variation in the definition of neutral position in OpenSim and Visual3D.The OpenSim model is oriented such that at 0-degree pelvic tilt, the two anterior-superior iliac spines (ASIS) and pelvic tubercles are in the frontal (y-z) plane as seen in Figure 3 [10], which is also known as the anterior pelvic plane where it is an anatomical reference plane containing both ASIS, pelvic tubercles (PT) and pelvic symphysis (PS) [14].
Hence, the neutral position of zero pelvic tilt is where this anterior pelvic plane aligns with the frontal plane of the body [16].In Visual3D, the (x-y) plane of the pelvis coordinate system is defined as the plane passing through the right and left ASIS markers and the mid-point of the right and left PSIS markers of the actual subject as seen in Figure 3. Hence, the zero pelvic tilt is determined to be At neutral position defined by our selected OpenSim model where the plane containing both ASIS and the pelvis symphysis is aligned with the coronal plane of the body, it is reported for the ASIS-PSIS angle to have a mean 13 degrees with a standard deviation of 5 degrees as seen in Figure 4, which could be the possible explanation to the large downshift of values observed in the pelvic tilt graphs of OpenSim as compared to Visual3D [17].
The difference in hip joints between OpenSim and Visual3D is likely attributed to the different methods of hip joint estimation.Visual3D uses Bell Al et al [18] method of anthropometrical mathematical estimation to determine the hip joint whereas our selected OpenSim model utilizes functional hip joint center estimation [10].This difference in hip joint estimation is likely the cause of the difference in hip joint angles in flexion, adduction and rotation.

Differences in Ankle
The difference in ankle evertor moments at the initial 30% of the gait cycle could be due to how the subtalar inversion and eversion ankle angle is constrained to zero in OpenSim, whereas Visual3D allows for free motion.Furthermore, the axis defined for ankle inversion-eversion movement differs between OpenSim and Vi-sual3D as illustrated in Figure 5.
In OpenSim, ankle inversion-eversion movement occurs in the subtalar axis where the subtalar axis lies superiorly to the sagittal plane and medially to the transverse plane of the ankle joint [19].In Visual3D, ankle inversion-eversion movement occurs in the yaxis of the ankle coordinate system [20].Therefore, the differences in the ankle evertor moments observed could be attributed to the difference in the kinematic motion of the subtalar ankle and the axis defined for the ankle inversion and eversion moment.

CONCLUSION
In conclusion, our results demonstrate notable differences between the kinematic and kinetic output of OpenSim and Visual3D.Whilst our analysis focuses on healthy gait, we anticipate that utilizing pathological gait could accentuate kinematic disparities.Pathological and healthy gaits exhibit significant distinctions, leading to increased information loss in OpenSim's global optimization compared to Visual3D's segment optimization.Visual3D's utilization of six DoFs per segment enables closer mocap matching, resulting in enhanced kinematic accuracy.However, OpenSim's reliance on the model for global optimization allows it to overcome information loss if an appropriate model accurately represents the subject's pathological gait.Ultimately, the choice of software depends on user requirements, as each has its own strengths and weaknesses.Nevertheless, users should exercise caution when interpreting results, emphasizing an understanding of the complete processing pipeline.

Figure 1 :
Figure 1: Mean and standard deviation of kinematic results of nine subjects from OpenSim and Visual3D

Figure 2 :
Figure 2: Mean and standard deviation of kinetic results of nine subjects from OpenSim and Visual3D

Figure 4 :
Figure 4: Difference in neutral position of pelvic tilt in Open-Sim

Figure 5 :
Figure 5: Subtalar axis of ankle in OpenSim (left) and ankle coordinate system of Visual3D (right)