Written and maintained by CASRAI Editorial Board
Last updated
Short answer
OpenSim is an open-source software platform for modeling neuromusculoskeletal structures and creating dynamic simulations of movement. It enables researchers to calculate unmeasurable biomechanical variables—such as individual muscle forces, joint contact loads, and tendon strains—and to simulate movements under altered physiological conditions, assistive device interactions, or surgical interventions using forward and inverse dynamics.
Definition and scope
Developed at Stanford University within the National Center for Simulation in Rehabilitation Research (NCSRR) and Simbios (Delp et al. 2007; Seth et al. 2018), OpenSim is distributed under the Apache License 2.0. It provides open computational infrastructure for computational biomechanics, presented across meetings of the Biomedical Engineering Society (BMES) and the International Society of Biomechanics.
The core computational engine is built on Simbody, an open-source multibody mechanics library that formulates equations of motion in internal generalized coordinates using recursive O(N) algorithms. By representing articulated skeletons as topological trees of rigid bodies connected by kinematic joints, Simbody enforces constraints without numerical stiffness. OpenSim layers biological elements onto this engine: Hill-type muscle-tendon actuators with activation-contraction dynamics, passive ligaments, contact surfaces, and controllers.
The platform provides two primary working interfaces: a desktop application featuring a GUI with a WebGL 3D visualizer, and scriptable APIs in C++, Python, MATLAB, and Java. Native FileAdapter classes process standard data formats, including C3D motion capture files, TRC marker trajectories, MOT motion files, STO storage files, and XML-based OSIM model files.
How it works or how it is used in practice
Laboratory movement simulations follow an integrated six-stage computational pipeline converting experimental recordings into verified estimates of internal neuromuscular dynamics:
- Model Scaling (ScaleTool): Generic models—such as the 22-body, 80-muscle model of Rajagopal and colleagues—are scaled to match subject anthropometry. The tool resizes bone dimensions, mass, and inertia from a static standing trial, adjusting optimal muscle fiber and tendon slack lengths proportionally.
- Inverse Kinematics (InverseKinematicsTool): Solves a weighted least-squares optimization at each time frame to determine generalized coordinates (joint angles, q) that minimize Euclidean distances between experimental surface markers and virtual markers on the model.
- Inverse Dynamics (InverseDynamicsTool): Evaluates the Newton-Euler equations of motion:
M(q)q̈ + C(q, q̇) + G(q) = τ + τext
where M is the system mass matrix, C represents Coriolis and centrifugal terms, G is gravity, τ represents net internal joint moments, and τext represents external ground reactions.
- Residual Reduction Algorithm (RRATool): Resolves dynamic inconsistencies between marker kinematics and force-plate measurements. Measurement noise prevents exact force balance, creating fictitious “residual” forces at the pelvis. RRA adjusts torso center-of-mass and makes minor kinematic adjustments to drive residuals toward zero.
- Muscle Redundancy Resolution: Resolves muscle indeterminacy where multiple muscles cross each joint:
- Static Optimization (SO): Solves a frame-by-frame optimization minimizing sum of squared muscle activations while matching net joint torques.
- Computed Muscle Control (CMC): Couples proportional-derivative tracking with static optimization and muscle contraction dynamics to calculate continuous excitation trajectories.
Activations are cross-validated against experimental recordings from surface EMG electrodes.
- Forward Dynamics and Joint Reaction Analysis: Forward dynamics integrates equations of motion over time to predict movements. Joint reaction analysis computes cartilage contact forces (compression and shear) across articulating joint surfaces.
Types or related concepts
The OpenSim pipeline consists of specialized computational tools and standard file structures, detailed in the verified matrix below:
| Tool / Algorithm | Primary Mathematical Role | Input Data | Primary Output | Primary Verification Metric |
|---|---|---|---|---|
| ScaleTool | Anthropometric resizing of segment mass, inertia, and geometry | Static .trc markers, generic .osim | Scaled .osim model | Static marker RMS error < 1 cm |
| Inverse Kinematics (IK) | Weighted least-squares marker tracking optimization | Dynamic .trc, scaled .osim | Joint coordinates (.mot) | Kinematic RMS error < 2 cm; maximum error < 4 cm |
| Inverse Dynamics (ID) | Newton-Euler equations of motion solution | Joint angles (.mot), ground reactions (.mot) | Net joint moments (.sto) | Profile consistency with normative gait data |
| Residual Reduction Algorithm (RRA) | Torso mass adjustments and kinematic smoothing | Kinematics (.mot), ground reactions, .osim | Consistent kinematics (.mot) and model | Average residual force < 5% net external force; moment < 1% BW×height |
| Static Optimization (SO) | Frame-by-frame activation minimization (∑ am2) | Consistent .mot, ground reactions, .osim | Muscle forces and activations (.sto) | Temporal concordance with experimental EMG |
| Computed Muscle Control (CMC) | PD tracking control integrated with contraction dynamics | Kinematics, ground reactions, .osim | Continuous muscle excitations (.sto) | Reserve actuator forces < 5% joint moment; EMG timing |
| Joint Reaction Analysis | Articular contact force and load computation | Kinematics, muscle forces (.sto), loads | Cartilage contact forces and moments (.sto) | Agreement with instrumented implant data |
Where it matters for labs, clinics or supply decisions
Clinical Gait Analysis and Surgical Planning: In cerebral palsy and post-stroke rehabilitation, OpenSim differentiates primary neuromuscular impairments from compensations. Simulations identify whether stiff-knee gait stems from rectus femoris overactivity (supporting tendon transfer) or vastus intermedius braking, evaluating outcomes in silico.
Assistive Device and Wearable Robotics Design: Engineers developing exoskeletons, orthoses, and powered prostheses model human-device interaction. Evaluating metabolic cost alongside joint moments allows teams to optimize device mass, spring stiffness, and actuation timing before physical prototyping.
Orthopaedic Biomechanics: Joint reaction analyses quantify cartilage contact forces during daily activities, supporting implant wear testing, joint replacement alignment protocols, and fracture fixation evaluations.
Laboratory Infrastructure Requirements: Implementing OpenSim requires synchronized optical motion capture, multi-axis force platforms, surface electromyography, and multi-core workstations for optimization. Research using these pipelines regularly appears in computational venues such as PLOS Computational Biology.
Common misunderstandings
Confusing tracking simulations with predictive simulations: Standard OpenSim tools (IK, ID, RRA, CMC) track observed motion capture kinematics and force-plate data to calculate internal forces. In contrast, de novo predictive simulations generate movements from neural objective functions without kinematic tracking, requiring direct collocation optimal control frameworks.
Ignoring residual forces: Executing Static Optimization directly on raw Inverse Kinematics outputs without RRA introduces substantial error. Unmitigated residual forces at the pelvis act as artificial external supports that mask mechanical inconsistencies and distort muscle force estimates.
Assuming Static Optimization and CMC are equivalent: Static Optimization assumes rigid tendons and instantaneous activation without time-history integration. CMC accounts for first-order muscle activation dynamics and tendon compliance, which are essential when analyzing fast movements or stretch-shortening cycles.
Relying on unverified generic scaling: Scaling models solely on subject body mass without register-calibrated anatomical markers misplaces joint centers and moment arms, propagating geometric errors into all subsequent force calculations.
Frequently asked questions
What is OpenSim primarily used for in biomechanics research?
OpenSim quantifies biomechanical variables that cannot be measured directly in living humans, including individual muscle-tendon forces, joint contact forces, and metabolic energy consumption during dynamic movement.
What are the quantitative acceptance thresholds for OpenSim simulations?
Per the best-practice guidelines of Hicks and colleagues (2015), gait simulations should meet these thresholds: Inverse Kinematics RMS marker error under 2 cm (maximum under 4 cm); RRA average residual force under 5% of peak net external force; and RRA average residual moment under 1% of body weight times height.
Why is the Residual Reduction Algorithm necessary?
Measurement noise and anatomical simplifications cause slight discrepancies with Newton’s second law. RRA makes subtle adjustments to torso mass distribution and kinematics to restore dynamic consistency and minimize artificial pelvis residual forces.
How does Static Optimization differ from Computed Muscle Control?
Static Optimization resolves muscle redundancy frame-by-frame without accounting for tendon compliance or activation dynamics. Computed Muscle Control uses tracking control coupled with dynamic differential equations of muscle excitation and contraction.
Which file formats are native to OpenSim?
OpenSim utilizes XML-based model files (.osim), 3D marker coordinate files (.trc), motion trajectory files (.mot), and simulation time-series data storage files (.sto).
Sources
- Seth A, Hicks JL, Uchida TK, et al. OpenSim: Simulating musculoskeletal dynamics and neuromuscular control to study human and animal movement. PLOS Computational Biology. 2018;14(7):e1006223. doi:10.1371/journal.pcbi.1006223. PMCID: PMC6061994. Read: 2026-11-08.
- Rajagopal A, Dembia CL, DeMers MS, Delp DD, Hicks JL, Delp SL. Full-body musculoskeletal model for muscle-driven simulation of human gait. IEEE Transactions on Biomedical Engineering. 2016;63(10):2068-2079. doi:10.1109/TBME.2016.2586862. PMCID: PMC5507211. Read: 2026-11-08.
- Hicks JL, Uchida TK, Seth A, Rajagopal A, Delp SL. Is My Model Good Enough? Best Practices for Verification and Validation of Musculoskeletal Models and Simulations of Movement. Journal of Biomechanical Engineering. 2015;137(2):020905. doi:10.1115/1.4029304. PMCID: PMC4321112. Read: 2026-11-08.
- Delp SL, Anderson FC, Arnold AS, Loan P, Habib A, John CT, Guendelman E, Thelen DG. OpenSim: open-source software to create and analyze dynamic simulations of movement. IEEE Transactions on Biomedical Engineering. 2007;54(11):1940-1950. doi:10.1109/TBME.2007.901024. PMID: 18018689. Read: 2026-11-08.







