| name | multibody-dynamics |
| description | Multibody dynamics — Newton-Euler equations, Lagrangian mechanics, generalized coordinates, constraint equations, DAE systems, rigid body kinematics, MBD software (Adams, Simpack, Modelica). |
| metadata | {"priority":7,"promptSignals":{"phrases":["multibody","MBD","Lagrangian","Newton-Euler","generalized coordinates","rigid body","constraint","Adams","Simpack","equations of motion"],"minScore":3}} |
Multibody Dynamics — Complete Skill
Rigid Body Kinematics
Position, Velocity, Acceleration
For body with fixed point O:
v_P = v_O + ω × r_{OP}
a_P = a_O + α × r_{OP} + ω × (ω × r_{OP})
ω × (ω × r) = centripetal acceleration: magnitude ω²r, directed toward rotation axis
α × r = tangential acceleration: perpendicular to r
Rotation Matrices
Elementary rotations:
R_x(φ) = [1, 0, 0; 0, cosφ, -sinφ; 0, sinφ, cosφ]
R_z(θ) = [cosθ, -sinθ, 0; sinθ, cosθ, 0; 0, 0, 1]
Euler angles (Body 3-2-1, aerospace convention):
R = R_z(ψ) × R_y(θ) × R_x(φ)
ψ = yaw, θ = pitch, φ = roll
Gimbal lock: singularity at θ = ±90°
Quaternions (singularity-free):
q = [q₀, q₁, q₂, q₃] = [cos(θ/2), n̂ sin(θ/2)]
|q| = 1 (unit quaternion)
Rotation: v' = q ⊗ v ⊗ q*
ω = 2q* ⊗ q̇ (angular velocity from quaternion rate)
Preferred in software for integration
Newton-Euler Equations
Single Rigid Body
Translational: F = m × a_G (G = center of mass)
Rotational: M_G = I_G × α + ω × (I_G × ω)
I_G = inertia tensor [3×3] about G (symmetric, positive definite)
Principal moments: I₁, I₂, I₃ (diagonalized; off-diagonal = 0 at principal axes)
Euler's equations (principal axes):
M₁ = I₁α₁ - (I₂-I₃)ω₂ω₃
M₂ = I₂α₂ - (I₃-I₁)ω₃ω₁
M₃ = I₃α₃ - (I₁-I₂)ω₁ω₂
Parallel Axis Theorem
I_{P,xx} = I_{G,xx} + m(d_y² + d_z²)
d = distance from G to parallel axis P
Inertia of Common Shapes
Solid sphere: I = 2/5 mr²
Solid cylinder (about axis): I = ½ mr²
Thin rod (about center): I = (1/12)mL²
Rectangular plate (about center, axis ⊥ plate): I = (1/12)m(a²+b²)
Lagrangian Mechanics
Generalized Coordinates
Choose n generalized coordinates q = [q₁, q₂, ..., q_n] to describe configuration.
n = degrees of freedom (DOF) of unconstrained system
Lagrangian:
L = T - V (kinetic energy - potential energy)
Euler-Lagrange equations (for each q_i):
d/dt(∂L/∂q̇_i) - ∂L/∂q_i = Q_i
Q_i = generalized force corresponding to q_i (non-conservative forces)
Kinetic Energy T
Particle: T = ½mv²
Rigid body: T = ½mv_G² + ½ω·I_G·ω
System: T = ½q̇ᵀM(q)q̇ [M = mass matrix, q-dependent in general]
Potential Energy V
Gravity: V = mgh
Spring: V = ½kx²
Elastic body: V = ½qᵀKq [K = stiffness matrix]
Example — Double Pendulum
q = [θ₁, θ₂], lengths l₁, l₂, masses m₁, m₂
T = ½(m₁+m₂)l₁²θ̇₁² + ½m₂l₂²θ̇₂² + m₂l₁l₂θ̇₁θ̇₂cos(θ₁-θ₂)
V = -(m₁+m₂)gl₁cosθ₁ - m₂gl₂cosθ₂
Chaotic motion for large angles — requires numerical integration
Constrained Systems (DAE)
Constraint Equations
Holonomic: C(q, t) = 0 (position level)
Nonholonomic: C(q, q̇, t) = 0 (velocity level, not integrable to position)
Constraint Jacobian:
Φ_q = ∂C/∂q [m×n matrix, m = number of constraints]
Equations of Motion with Constraints
[M, Φ_qᵀ; Φ_q, 0] × [q̈; λ] = [Q - ∂(M q̇)/∂t + ...; γ]
λ = Lagrange multipliers = constraint forces/torques
γ = Φ̈ terms (acceleration-level constraint RHS)
Index of DAE: 3 (position-level constraints) — stiff numerical problem
Solution: reduce to index 1 (differentiate twice), or use Baumgarte stabilization
Baumgarte stabilization:
Φ̈ + 2α Φ̇ + β² Φ = 0 (add stabilization terms α=β=5-50)
Prevents constraint drift in numerical integration
Numerical Integration
ODE solvers: RK4 for unconstrained systems
DAE solvers: DASSL, DASPK, IDA (for index-3 DAEs)
Time step guidance: Δt ≤ T_min/(20-50) where T_min = period of highest mode
Common Joint Constraints
| Joint Type | Constraints | DOF Removed |
|---|
| Fixed | 6 | 6 (structure) |
| Revolute | 5 | 5 (1 rotational DOF) |
| Prismatic | 5 | 5 (1 translational DOF) |
| Cylindrical | 4 | 4 (1 rot + 1 trans) |
| Spherical | 3 | 3 (ball joint) |
| Universal | 4 | 4 (2 rotational DOF) |
| Planar | 3 | 3 |
DOF count: DOF = 6N - Σ constraints (N = number of bodies, not counting ground)
MBD Software Workflow
Adams (MSC Software)
Model: parts (geometry + mass properties) + joints + forces + motion drivers
Solver: FORTRAN integrator (Gear/Park); automatic constraint handling
Post: animation, X-Y plots of forces/torques/accelerations
Co-simulation: Adams-Simulink for control systems
Simpack (Dassault)
Rail vehicle, powertrain, wind turbine specialization
Modal flexible bodies (CMS: Craig-Bampton reduction)
Real-time capable export
Modelica/Dymola
Equation-based (acausal) modeling; library: Modelica.Mechanics.MultiBody
Symbolic manipulation before code generation → efficient simulation
Used in: automotive (Modelica), aerospace (Modelica)
MATLAB/Simscape Multibody
Block-diagram interface for rigid bodies
Simscape Multibody replaces legacy SimMechanics
Good for teaching, control integration; less suited for large mechanisms
Flexible Body Methods
Finite Segment / Floating Frame of Reference (FFR)
Body deformation described in local (floating) frame: u(x,y,z,t)
Global position: r_P = r_A + R(q_rigid) × (r_P,local + u_P)
EOM: coupled rigid-flexible (Shabana method)
Craig-Bampton Reduction (for linear elastic bodies)
Reduce FEA model to: interface DOF + modal superposition
q_flex = Φ_CB × η (η = modal coordinates, small set)
Import reduced model into MBD as flexible body
Use when deformation << body dimensions
Output
Provide: generalized coordinates definition, Euler-Lagrange EOMs (M(q)q̈ + C(q,q̇)q̇ + K(q)q = F), constraint Jacobian Φ_q, reaction forces (Lagrange multipliers λ), natural frequencies of linearized system, time history of key DOF.