90 likes | 281 Views
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
E N D
MEGN 536 – Computational Biomechanics Prof. Anthony J. Petrella
Inverse Kinematics in Musculoskeletal Analysis • Need to know joint angles thatdefine model configuration at eachincrement in the motion • Markers used to track motion andmatch model to individual • We can then do dynamics calcsto find joint reactions / torques • Muscle forces and joint contactforces can also be estimated Ali, et al., CMBBE, 2013
Inverse Kinematics in Musculoskeletal Analysis Problems… • Model markers don’t perfectlymatch subject • Multiple sources of exp. error • Segments may have multiplemarkers over-determined • Cannot solve for model configexactly (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)… • Where are expcoords 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≤band Aeq*x = beq x = design vector f(x) objective function A*x≤b inequality constraints Aeq*x = beq equality constraints x1 : xn e.g. -Fquad ≤ 0 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 x = obj. function f(x)= dist = sqrt(x12 + x22 +x32) ineq. constraints A*x≤b- none - eq. constraints x1 + 2x2 + 4x3 = 7 (Aeq = [1 2 4]; beq = [7]) x1 x2 x3
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