Skip to contents

Computes net ankle, knee and hip joint moments (and the joint reaction forces) with a proper distal-to-proximal recursive Newton-Euler chain (foot -> shank -> thigh). The ground reaction force and free moment enter at the foot; each segment contributes its inertia and gravity. Segment linear and angular accelerations are obtained by numerical differentiation of the marker-derived centre-of-mass and orientation trajectories.

Usage

inverseDynamicsRNE(
  joints,
  grf,
  inertia,
  sampling_rate,
  dims = c("2D", "3D"),
  gravity = .GRAVITY,
  vertical = c("y", "z")
)

Arguments

joints

A matrix/data.frame of joint-centre coordinates over time with columns ankle_x, ankle_y, knee_x, knee_y, hip_x, hip_y and the foot distal end toe_x, toe_y (for dims = "3D" add the _z columns).

grf

A matrix/data.frame with the ground reaction force fx, fy (and fz for 3D), the centre of pressure cop_x, cop_y (and cop_z), and an optional free moment: tz in 2D, or any of tx/ty/tz in 3D (each defaulting to 0).

inertia

A segment inertia table as returned by estimateSegmentInertia() (rows foot, shank, thigh).

sampling_rate

Sampling rate in Hz.

dims

"2D" (sagittal plane, default) or "3D".

gravity

Gravitational acceleration (default 9.80665 m/s^2).

vertical

Which coordinate axis points up: "y" (the default, matching the sagittal x-y convention) or "z". Only meaningful for dims = "3D"; a 2D chain must use "y". Gravity acts along the negative of this axis, so getting it wrong silently mis-signs every gravitational moment.

Value

A data.frame with time, the net joint moments (ankle_moment, knee_moment, hip_moment) and the proximal joint reaction forces for each joint.

References

Winter DA (2009). "Biomechanics and Motor Control of Human Movement." 4th ed. Wiley. Featherstone R (2008). "Rigid Body Dynamics Algorithms."

Examples

n <- 50
joints <- data.frame(
  ankle_x = rep(0, n), ankle_y = rep(0.08, n),
  toe_x = rep(0.15, n), toe_y = rep(0.03, n),
  knee_x = rep(0, n),   knee_y = rep(0.48, n),
  hip_x = rep(0, n),    hip_y = rep(0.90, n))
grf <- data.frame(fx = rep(0, n), fy = rep(0, n),
                  cop_x = rep(0, n), cop_y = rep(0, n))
inertia <- estimateSegmentInertia(body_mass = 70, body_height = 1.75)
inverseDynamicsRNE(joints, grf, inertia, sampling_rate = 100)
#>    time ankle_moment knee_moment hip_moment      ankle_fx ankle_fy
#> 1  0.00    0.7465312   0.7465312  0.7465312 -1.408595e-13  9.95375
#> 2  0.01    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 3  0.02    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 4  0.03    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 5  0.04    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 6  0.05    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 7  0.06    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 8  0.07    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 9  0.08    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 10 0.09    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 11 0.10    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 12 0.11    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 13 0.12    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 14 0.13    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 15 0.14    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 16 0.15    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 17 0.16    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 18 0.17    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 19 0.18    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 20 0.19    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 21 0.20    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 22 0.21    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 23 0.22    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 24 0.23    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 25 0.24    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 26 0.25    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 27 0.26    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 28 0.27    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 29 0.28    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 30 0.29    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 31 0.30    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 32 0.31    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 33 0.32    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 34 0.33    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 35 0.34    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 36 0.35    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 37 0.36    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 38 0.37    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 39 0.38    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 40 0.39    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 41 0.40    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 42 0.41    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 43 0.42    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 44 0.43    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 45 0.44    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 46 0.45    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 47 0.46    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 48 0.47    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 49 0.48    0.7465312   0.7465312  0.7465312  0.000000e+00  9.95375
#> 50 0.49    0.7465312   0.7465312  0.7465312 -1.408595e-13  9.95375
#>          knee_fx knee_fy        hip_fx   hip_fy
#> 1  -1.408595e-13 41.8744 -1.408595e-13 139.0779
#> 2   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 3   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 4   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 5   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 6   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 7   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 8   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 9   0.000000e+00 41.8744  0.000000e+00 139.0779
#> 10  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 11  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 12  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 13  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 14  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 15  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 16  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 17  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 18  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 19  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 20  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 21  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 22  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 23  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 24  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 25  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 26  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 27  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 28  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 29  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 30  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 31  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 32  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 33  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 34  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 35  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 36  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 37  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 38  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 39  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 40  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 41  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 42  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 43  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 44  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 45  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 46  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 47  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 48  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 49  0.000000e+00 41.8744  0.000000e+00 139.0779
#> 50 -1.408595e-13 41.8744 -1.408595e-13 139.0779