MEGN 536 – Computational Biomechanics
Download
Report
Transcript MEGN 536 – Computational Biomechanics
MEGN 536 – Computational Biomechanics
Prof. Anthony J. Petrella
Inverse Kinematics in Musculoskeletal Analysis
Need to know joint angles that
define model configuration at each
increment in the motion
Markers used to track motion and
match model to individual
We can then do dynamics calcs
to find joint reactions / torques
Muscle forces and joint contact
forces can also be estimated
Ali, et al., CMBBE, 2013
Inverse Kinematics in Musculoskeletal Analysis
Problems…
Model markers don’t perfectly
match subject
Multiple sources of exp. error
Segments may have multiple
markers over-determined
Cannot solve for model config
exactly (closed form)
Have to use alternate method,
such as optimization
Ali, et al., CMBBE, 2013
Optimization in Inverse Kinematics
We want to configure / orient the model so that the
model markers are as close as possible to the exp
marker measurements
We can use RMS error as an indication of the overall
error in all marker pairs (model-experiment)…
𝑒𝑟𝑟𝑜𝑟 =
𝑁
𝑖=1
2
𝑝𝑖𝑥 −𝑞𝑖𝑥 2 + 𝑝𝑖𝑦 −𝑞𝑖𝑦
𝑁
Where 𝒑𝑖 are exp coords and 𝒒𝑖 are model coords
The goal is to find the model configuration that
minimizes RMS error at each increment in the motion
Optimization Problem Statement
Find x that minimizes f(x), subject to A*x ≤ b
and Aeq*x = beq
x1
x= :
xn
f(x)
A*x ≤ b
Aeq*x = beq
design vector
objective function
inequality constraints e.g. -Fquad ≤ 0
equality constraints
e.g. SFx = 0
Optimization Problem Statement
Note that the goal is to minimize the objective
function in an absolute sense – not to make it small,
but to make it as negative as possible
If you are solving a problem in which you wish to
maximize a value (e.g., find the maximum volume of
a box using a fixed amount of material for the sides of
the box), then you simply minimize the negative of
the objective function…
f(x) = -fvol(x) = -(L * W * H)
Optimization Example
Given: the plane x1 + 2x2 + 4x3 = 7
Problem: find point on the plane closest to the origin
design vector
x1
x = x2
x3
obj. function f(x)= dist = sqrt(x12 + x22 +x32)
ineq. constraints
eq. constraints
A*x ≤ b
- none x1 + 2x2 + 4x3 = 7
(Aeq = [1 2 4]; beq = [7])
Optimization Example - Solution
10
8
6
Z-Axis
4
2
0
-2
-4
10
-6
-10
0
-5
0
5
10
-10
Y-Axis
X-Axis
Optimization in MATLAB
Type ‘doc fmincon’ at the MATLAB command line
All of the inputs and outputs of fmincon are
explained in the MATLAB documentation
To use fmincon you will need to write a MATLAB
function and use function handles