Human body project

I analyzed a human leg and all the forces, moments, and accelerations acting on the joints and members of the leg. I used MATLAB to solve the system of equations representing the forces and moments at each joint, and then graphed these variables over time period of a single stride of the leg

Untitled

IMG_20220225_203038.jpg

MATLAB code

clear clc, close all
format short 

%  declare variables

% masses (kg)
m_f = .86;
m_s = 2.73;
m_t = 8.92;

% intertias (kg*m^2)
I_f = .0037;
I_s = .0237;
I_t = .1903;

% x accelerations (m/s^2)
a_fx = .0328;
a_sx = 1.5369;
a_tx = 1.6365;

% z accelerations (m/s^2)
a_fz = .3992;
a_sz = -.2395;
a_tz = -.7012;

% angular accelerations (rad/s^2)
al_f = -2.9752;
al_s = -5.6388;
al_t = 2.7077;

% ground forces (N)
GRF_x = 18.53;
GRF_z = 595.9;

% distances between joints and center of 
%       gravities of segments (meters)

% for foot
d_fcopx = abs(.225 - .307);
d_fcopz = abs(.063 - 0);
d_fx = abs(.225 - .189);
d_fz = abs(.063 - .121);

% for shank
d_sax = abs(.246 - .189);
d_saz = abs(.322 - .121);
d_skx = abs(.246 - .292);
d_skz = abs(.322 - .483);

% for thigh
d_tkx = abs(.3308 - .292);
d_tkz = abs(.7385 - .483);
d_thx = abs(.3308 - .3577);
d_thz = abs(.7385 - .9183);

% other constants
g = 9.81; % (m/s^2)

syms R_ax R_az M_a R_kx R_kz M_k R_hx R_hz M_h 
% for foot
eqn1 = R_ax + GRF_x == m_f * a_fx;
eqn2 = -m_f * g + GRF_z + R_az == m_f * a_fz;
eqn3 = (GRF_z * d_fcopx) - (-GRF_x * d_fcopz) - (R_ax * d_fz) - (R_az * d_fx) + M_a == I_f * al_f;

% for shank
eqn4 =  -R_ax + R_kx == m_s * a_sx;
eqn5 = -R_az + R_kz - m_s*g == m_s * a_sz;
eqn6 = (R_az * d_sax) + (R_kz * d_skx) - (R_ax * d_saz) - (R_kx * d_skz) + M_k - M_a == I_s * al_s;

% foor thigh
eqn7 =  -R_kx + R_hx == m_t * a_tx;
eqn8 =  -R_kz + R_hz - m_t*g == m_t * a_tz;
eqn9 =  (R_hz * d_thx) + (R_kz * d_tkx) - (R_hx * d_thz) - (R_kx * d_tkz) + M_h - M_k == I_t * al_t;

sol = solve([eqn1, eqn2, eqn3, eqn4, eqn5, eqn6, eqn7, eqn8, eqn9], [R_ax, R_az, M_a, R_kx, R_kz, M_k, R_hx, R_hz, M_h]);
R_ax_sol = vpa(sol.R_ax, 5)
R_az_sol = vpa(sol.R_az, 5)
M_a_sol = vpa(sol.M_a, 5)

R_kx_sol = vpa(sol.R_kx, 5)
R_kz_sol = vpa(sol.R_kz, 5)
M_k_sol = vpa(sol.M_k, 5)

R_hx_sol = vpa(sol.R_hx, 5)
R_hz_sol = vpa(sol.R_hz, 5)
M_h_sol = vpa(sol.M_h, 5)

<aside> <img src="/icons/home_blue.svg" alt="/icons/home_blue.svg" width="40px" /> Home

</aside>

<aside> <img src="/icons/document_green.svg" alt="/icons/document_green.svg" width="40px" /> Resume

</aside>

© Jesse Gilbert 2024

Untitled