%23%20%2F%2F%2F%20script%0A%23%20requires-python%20%3D%20%22%3E%3D3.11%22%0A%23%20dependencies%20%3D%20%5B%22marimo%3E%3D0.23.9%22%5D%0A%23%20%2F%2F%2F%0A%0Aimport%20marimo%0A%0A__generated_with%20%3D%20%220.25.2%22%0Aapp%20%3D%20marimo.App()%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%20Matrix%20Formalism%20of%20the%20Newton-Euler%20equations%0A%0A%20%20%20%20%3E%20Renato%20Naville%20Watanabe%2C%20Marcos%20Duarte%3Cbr%3E%0A%20%20%20%20%3E%20%5BLaboratory%20of%20Biomechanics%20and%20Motor%20Control%5D(https%3A%2F%2Fbmclab.pesquisa.ufabc.edu.br%2F)%3Cbr%3E%0A%20%20%20%20%3E%20Federal%20University%20of%20ABC%2C%20Brazil%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20How%20to%20use%20this%20guide%0A%0A%20%20%20%20We%20will%20stack%20Newton%E2%80%93Euler%20equations%20while%20keeping%20laboratory%20and%20body-frame%20components%20explicit.%20The%20skew-symmetric%20cross-product%20operator%20turns%20the%20force%20and%20moment%20equations%20into%20a%20linear%20system%20for%20joint%20loads.%20Check%20signs%20at%20every%20action%E2%80%93reaction%20pair%20before%20solving%20the%20matrix.%0A%0A%20%20%20%20Try%20the%20distributed%20**Exercises**%20before%20opening%20their%20collapsed%20worked%20solutions.%20Then%20use%20the%20**Checkpoint%20questions**%20and%20attempt%20the%20**Problems**%20independently%3B%20their%20panels%20contain%20final%20answers%20only.%20Predict%20the%20effect%20of%20a%20parameter%20change%20before%20running%20it%2C%20and%20check%20units%20and%20limiting%20cases.%0A%0A%20%20%20%20**Opening%20challenge.**%20You%20know%20every%20segment%E2%80%99s%20motion%20and%20the%20ground%20reaction%20force%20during%20a%20step.%20Is%20that%20enough%20to%20infer%20a%20unique%20set%20of%20muscle%20forces%2C%20or%20only%20net%20joint%20loads%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Python%20setup%0A%0A%20%20%20%20The%20dependency%20declaration%20at%20the%20top%20of%20this%20file%20lists%20the%20packages%20used%20by%20this%20guide.%20Marimo%20runs%20cells%20in%20dependency%20order.%20Run%20the%20notebook%20in%20an%20editor%20to%20use%20its%20displays%20and%20controls%3B%20the%20computational%20examples%20below%20explain%20their%20inputs%20before%20using%20them.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20In%20this%20notebook%20will%20be%20shown%20two%20examples%20of%20how%20to%20use%20a%20matrix%20formalism%20to%20perform%20inverse%20dynamics%20analysis.%20It%20does%20not%20consist%20a%20comprehensive%20treatise%20about%20the%20subject.%20It%20is%20rather%20an%20introduction%20based%20on%20examples.%20Nevertheless%2C%20the%20reader%20of%20this%20notebook%20will%20have%20sufficient%20knowledge%20to%20read%20recent%20texts%20on%20biomechanics%20and%20other%20multibody%20dynamic%20analysis.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%201%20%E2%80%94%20Use%20the%20cross-product%20matrix.**%20For%20%24r%3D(1%2C2%2C3)%24%20m%20and%20%24F%3D(0%2C1%2C0)%24%20N%2C%20write%20%24S(r)%24%20and%20evaluate%20%24S(r)F%24.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Solution%20to%20Exercise%201%0A%0A%20%20%20%20%24S(r)%3D%5Cbegin%7Bbmatrix%7D0%26-3%262%5C%5C3%260%26-1%5C%5C-2%261%260%5Cend%7Bbmatrix%7D%24%20and%20%24S(r)F%3D(-3%2C0%2C1)%24%20N%20m.%20The%20matrix%20is%20skew-symmetric%20and%20represents%20%24r%5Ctimes%20F%24%2C%20not%20%24F%5Ctimes%20r%24.%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Inverse%20dynamics%0A%0A%20%20%20%20For%20the%20inverse%20dynamics%20analysis%2C%20we%20will%20obtain%20the%20joint%20torques%20and%20forces%2C%20from%20the%20joint%20kinematics%20and%20external%20forces.%0A%0A%20%20%20%20%3Cfigure%20aria-describedby%3D%22figure-caption-1%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fgithub.com%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fimages%2Finv.png%3Fraw%3D1%22%20width%3D600%20%2F%3E%20%3C%2Ffigure%3E%0A%0A%20%20%20%20%3Cspan%20id%3D%22figure-caption-1%22%20class%3D%22figure-caption%22%20style%3D%22display%3Ablock%3Btext-align%3Acenter%3Bfont-style%3Aitalic%22%3EAdapted%20from%20Erdemir%20et%20al.%20(2007)%3C%2Fspan%3E%0A%0A%0A%20%20%20%20%20%20As%20an%20example%2C%20we%20will%20consider%20the%20problem%20of%20estimating%20the%20forces%20and%20torques%20in%20the%20ankle%20and%20knee%20joints%20during%20the%20gait%2C%20considering%20a%203D%20movement.%20At%20this%20point%2C%20we%20consider%20that%20the%20%20accelerations%2C%20angular%20velocities%2C%20angular%20accelerations%2C%20masses%2C%20moments%20of%20inertia%20and%20rotation%20matrices%20necessary%20%20to%20compute%20the%20forces%20and%20moments%20are%20known.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20The%20free-body%20diagram%20of%20the%20gait%2C%20considering%20a%203D%20movement%20is%20very%20similar%20%5Bto%20the%202D%20case%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fgait_analysis_2d.py).%20The%20equations%20of%20forces%20and%20moments%20are%20described%20by%20the%20Newton-Euler%20equations%20(for%20a%20revision%20on%20Tridimensional%20Newton-Euler%20equations%20click%20%5Bhere%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinetics_3d_rigid_body.py))%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cbegin%7Baligned%7D%0A%20%20%20%20%5Coverrightarrow%7BF_A%7D%20%2B%20%5Coverrightarrow%7BGRF%7D%20%2B%20m_F%5Coverrightarrow%7Bg%7D%20%26%3D%20m_F%5Coverrightarrow%7Ba_%7Bcm_F%7D%7D%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BM_A%7D%20%2B%20%5Coverrightarrow%7BM_%7BGRF%7D%7D%2B%20%5Coverrightarrow%7BM_%7BFA%7D%7D%26%3DI_F%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_F%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%7D)%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BF_K%7D%20-%5Coverrightarrow%7BF_A%7D%20%2B%20m_S%5Coverrightarrow%7Bg%7D%20%26%3D%20m_S%5Coverrightarrow%7Ba_%7Bcm_S%7D%7D%5C%5C%0A%20%20%20%20%20%20%20%20%5Coverrightarrow%7BM_K%7D%20-%20%5Coverrightarrow%7BM_A%7D%20%2B%20%5Coverrightarrow%7BM_%7BFA%7D%7D%20%2B%20%5Coverrightarrow%7BM_%7BFK%7D%7D%20%26%3D%20I_S%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_S%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%7D)%0A%20%20%20%20%5Cend%7Baligned%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20where%0A%0A%20%20%20%20-%20%24%5Coverrightarrow%7Bg%7D%20%3D%20-9.81%5Chat%7Bj%7D%24%3B%0A%20%20%20%20-%20%24m_F%24%20and%20%24m_S%24%20are%20the%20masses%20of%20the%20foot%20and%20the%20shank%2C%20respectively%3B%0A%20%20%20%20-%20%24%5Coverrightarrow%7BGRF%7D%24%20is%20the%20ground%20reaction%20force%20being%20applied%20to%20the%20foot%3B%0A%20%20%20%20-%20%24%5Coverrightarrow%7Ba_%7Bcm_F%7D%7D%24%20and%20%24%5Coverrightarrow%7Ba_%7Bcm_S%7D%7D%24%20are%20the%20accelerations%20of%20the%20center%20of%20mass%20of%20the%20foot%20and%20the%20shank%2C%20respectively%3B%0A%20%20%20%20-%20%24%5Coverrightarrow%7B%5Comega_F%7D%24%20and%20%24%5Coverrightarrow%7B%5Comega_S%7D%24%20%20are%20the%20angular%20accelerations%20of%20the%20foot%20and%20shank%2C%20respectively%2C%20described%20at%20a%20basis%20attached%20to%20the%20segment%2C%20and%20%24%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%7D%7D%24%20and%20%24%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%7D%7D%24%20are%20their%20time-derivatives%3B%0A%20%20%20%20-%20%24I_S%24%20and%20%24I_F%24%20are%20the%20matrices%20of%20inertia%20of%20the%20shank%20and%20the%20foot%2C%20respectively%3B%0A%20%20%20%20-%20%24%5Coverrightarrow%7BF_K%7D%24%2C%20%24%5Coverrightarrow%7BF_A%7D%24%2C%20%24%5Coverrightarrow%7BM_A%7D%24%20and%20%24%5Coverrightarrow%7BM_A%7D%24%20are%20the%20forces%20and%20moments%20at%20the%20ankle%20and%20knee%20joints%2C%20respectively%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Note%20that%20each%20of%20these%20equations%20have%20components%20at%20each%20of%20the%20three%20directions.%20Additionally%2C%20note%20that%20the%20equations%20of%20the%20forces%20are%20described%20in%20the%20global%20basis%2C%20and%20the%20equations%20of%20the%20moments%20must%20be%20described%20in%20the%20basis%20attached%20to%20the%20segment%20relative%20to%20that%20equation.%20So%2C%20it%20is%20a%20good%20idea%20to%20make%20this%20clear%20with%20a%20more%20precise%20notation.%20We%20will%20denote%20as%20a%20superscript%20in%20the%20vectors%20the%20segment%20where%20the%20basis%20that%20we%20are%20describing%20the%20vector%20is%20fixed.%20So%20for%20example%2C%20%24%5Coverrightarrow%7BM_A%5EF%7D%24%20is%20the%20vector%20of%20the%20moment%20due%20to%20the%20muscle%20forces%20of%20the%20ankle%2C%20described%20in%20the%20basis%20fixed%20at%20the%20foot.%20So%2C%20the%20equations%20can%20be%20rewritten%20as%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cbegin%7Baligned%7D%0A%20%20%20%20%5Coverrightarrow%7BF_A%5EG%7D%20%2B%20%5Coverrightarrow%7BGRF%5EG%7D%20%2B%20m_F%5Coverrightarrow%7Bg%5EG%7D%20%26%3D%20m_F%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BM_A%5EF%7D%20%2B%20%5Coverrightarrow%7BM_%7BGRF%7D%5EF%7D%2B%20%5Coverrightarrow%7BM_%7BFA%7D%5EF%7D%26%3DI_F%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BF_K%5EG%7D%20-%5Coverrightarrow%7BF_A%5EG%7D%20%2B%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%26%3D%20m_S%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%0A%20%20%20%20%20%20%20%20%5Coverrightarrow%7BM_K%5ES%7D%20-%20%5Coverrightarrow%7BM_A%5ES%7D%20%2B%20%5Coverrightarrow%7BM_%7BFA%7D%5ES%7D%20%2B%20%5Coverrightarrow%7BM_%7BFK%7D%5ES%7D%20%26%3D%20I_S%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%0A%20%20%20%20%5Cend%7Baligned%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20where%20the%20superscript%20%24G%24%20denotes%20the%20global%20frame%20of%20reference%2C%20the%20superscript%20%24S%24%20denotes%20the%20frame%20of%20reference%20in%20the%20shank%20and%20the%20superscript%20%24F%24%20denotes%20the%20frame%20of%20reference%20at%20the%20foot.%0A%0A%20%20%20%20The%20moments%20due%20to%20the%20ground%20reaction%20force%2C%20the%20force%20at%20the%20ankle%20and%20the%20force%20at%20the%20knee%20are%20computed%20by%20cross-multiplying%20them%20by%20their%20moment-arms.%20As%20the%20forces%20and%20the%20moment-arms%20are%20described%20in%20the%20global%20basis%2C%20we%20must%20multiply%20them%20by%20the%20rotation%20matrix%20of%20the%20basis%20corresponding%20to%20the%20segment.%20So%2C%20the%20equations%20can%20be%20rewritten%20as%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cbegin%7Baligned%7D%0A%20%20%20%20%5Coverrightarrow%7BF_A%5EG%7D%20%2B%20%5Coverrightarrow%7BGRF%5EG%7D%20%2B%20m_F%5Coverrightarrow%7Bg%5EG%7D%20%26%3D%20m_F%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BM_A%5EF%7D%20%2B%20R_F(%5Coverrightarrow%7Br_%7Bcop%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BGRF%5EG%7D)%2B%20R_F(%5Coverrightarrow%7Br_%7BA%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_A%7D%5EG)%26%3DI_F%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BF_K%5EG%7D%20-%5Coverrightarrow%7BF_A%5EG%7D%20%2B%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%26%3D%20m_S%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BM_K%5ES%7D%20-%20%5Coverrightarrow%7BM_A%5ES%7D%20-%20R_S(%5Coverrightarrow%7Br_%7BA%2Fcm_S%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_A%5EG%7D)%20%2B%20R_S(%5Coverrightarrow%7Br_%7BK%2Fcm_S%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_K%5EG%7D)%20%26%3D%20I_S%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%0A%20%20%20%20%5Cend%7Baligned%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20where%20%24R_S%24%20is%20the%20rotation%20matrix%20of%20the%20basis%20attached%20to%20the%20shank%20and%20%24R_F%24%20is%20the%20rotation%20matrix%20of%20the%20basis%20attached%20to%20the%20foot.%0A%0A%20%20%20%20Now%2C%20we%20can%20note%20that%20the%20vectors%20%24%5Coverrightarrow%7BM_K%5ES%7D%24%20and%20%24%5Coverrightarrow%7BM_K%5EF%7D%24%20are%20the%20same%20vectors%20described%20in%20different%20basis.%20So%20we%20could%20use%20only%20one%20of%20the%20descriptions%20and%20use%20rotation%20matrices%20to%20convert%20from%20one%20to%20another.%20To%20pass%20the%20vector%20from%20the%20foot%20coordinates%20to%20the%20shank%20coordinate%2C%20we%20must%20first%20multiply%20it%20by%20the%20inverted%20rotation%20matrix%20of%20the%20foot%20and%20then%20multiply%20it%20by%20the%20rotation%20matrix%20of%20the%20shank.%20So%2C%20%24%5Coverrightarrow%7BM_A%5ES%7D%20%3D%20R_SR_F%5E%7B-1%7D%5Coverrightarrow%7BM_A%5EF%7D%24%20and%20the%20equations%20above%20can%20be%20rewritten%20as%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cbegin%7Baligned%7D%0A%20%20%20%20%5Coverrightarrow%7BF_A%5EG%7D%20%2B%20%5Coverrightarrow%7BGRF%5EG%7D%20%2B%20m_F%5Coverrightarrow%7Bg%5EG%7D%20%26%3D%20m_F%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BM_A%5EF%7D%20%2B%20R_F(%5Coverrightarrow%7Br_%7Bcop%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BGRF%5EG%7D)%2B%20R_F(%5Coverrightarrow%7Br_%7BA%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_A%7D%5EG)%26%3DI_F%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BF_K%5EG%7D%20-%5Coverrightarrow%7BF_A%5EG%7D%20%2B%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%26%3D%20m_S%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%0A%20%20%20%20%5Coverrightarrow%7BM_K%5ES%7D%20-%20R_SR_F%5E%7B-1%7D%5Coverrightarrow%7BM_A%5EF%7D%20-%20R_S(%5Coverrightarrow%7Br_%7BA%2Fcm_S%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_A%5EG%7D)%20%2B%20R_S(%5Coverrightarrow%7Br_%7BK%2Fcm_S%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_K%5EG%7D)%20%26%3D%20I_S%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%2B%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%0A%20%20%20%20%5Cend%7Baligned%7D%0A%20%20%20%20%24%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Now%2C%20we%20divide%20the%20equations%20above%20in%20the%20matrices%20defined%20previously%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cunderbrace%7B%5Cleft%5B%5Cbegin%7Barray%7D%7Bcccc%7D%20m_FI_3%26%20%5B0%5D%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20%5B0%5D%26%20I_F%20%20%26%20%5B0%5D%20%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%5B0%5D%20%26%20%20m_SI_3%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%20%5B0%5D%20%26%20%5B0%5D%20%26%20I_S%5Cend%7Barray%7D%5Cright%5D%7D_%7BM%7D%5Ccdot%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%5C%5C%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%5C%5C%20%5Cend%7Barray%7D%5Cright%5D%20%3D%20%5Cunderbrace%7B%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5B0%5D%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%20%20%5C%5C%20%5B0%5D%20%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%20%5Cend%7Barray%7D%5Cright%5D%7D_%7BC%7D%20%2B%20%5Cunderbrace%7B%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20m_F%5Coverrightarrow%7Bg%5EG%7D%5C%5C%20%5B0%5D%5C%5C%20%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%7D_%7BG%7D%20%2B%20%5Cunderbrace%7B%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20%5Coverrightarrow%7BF_A%5EG%7D%5C%5C%20%5Coverrightarrow%7BM_A%5EF%7D%2BR_F(%5Coverrightarrow%7Br_%7BA%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_A%7D%5EG)%5C%5C%20%20%5Coverrightarrow%7BF_K%5EG%7D%20-%20%5Coverrightarrow%7BF_A%5EG%7D%20%5C%5C%20%5Coverrightarrow%7BM_K%5ES%7D%20-%20R_SR_F%5E%7B-1%7D%5Coverrightarrow%7BM_A%5EF%7D%20-%20R_S(%5Coverrightarrow%7Br_%7BA%2Fcm_S%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_A%5EG%7D)%20%2B%20R_S(%5Coverrightarrow%7Br_%7BK%2Fcm_S%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BF_K%5EG%7D)%20%20%5Cend%7Barray%7D%5Cright%5D%7D_%7BQ%7D%20%2B%20%5Cunderbrace%7B%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%5Coverrightarrow%7BGRF%5EG%7D%5C%5C%20%20R_F(%5Coverrightarrow%7Br_%7Bcop%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BGRF%5EG%7D)%5C%5C%20%20%5B0%5D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%7D_%7BE%7D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20where%20%24I_3%24%20is%20the%20identity%20matrix%203x3.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20To%20perform%20the%20inverse%20dynamics%2C%20we%20still%20cannot%20isolate%20the%20vector%20of%20forces%20and%20moments.%20As%20the%20vector%20%24F%24%20has%20cross-products%20we%20must%20define%20the%20a%20new%20operator%20that%20performs%20the%20cross-product%20through%20a%20matrix%20multiplication.%0A%0A%20%20%20%20We%20can%20note%20that%20the%20cross-product%20between%20the%20vectors%20%24%5Cvec%7Bv%7D%24%20and%20%24%5Cvec%7Bw%7D%24%20has%20the%20following%20result%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7Bv%7D%20%5Ctimes%20%5Cvec%7Bw%7D%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7Dv_x%5C%5Cv_y%5C%5Cv_z%20%5Cend%7Barray%7D%5Cright%5D%20%5Ctimes%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7Dw_x%5C%5Cw_y%5C%5Cw_z%20%5Cend%7Barray%7D%5Cright%5D%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7Dv_yw_z%20-%20v_zw_y%5C%5Cv_zw_x%20-%20v_xw_z%5C%5Cv_xw_y%20-%20v_yw_x%20%5Cend%7Barray%7D%5Cright%5D%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D0%26-v_z%26v_y%5C%5Cv_z%260%26-v_x%5C%5C-v_y%26v_x%260%20%5Cend%7Barray%7D%5Cright%5D%5Ccdot%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7Dw_x%5C%5Cw_y%5C%5Cw_z%20%5Cend%7Barray%7D%5Cright%5D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20So%20we%20can%20define%20a%20new%20operator%20known%20as%20skew-symmetric%20matrix%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20S(%5Cvec%7Bv%7D)%20%5Ctriangleq%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D0%26-v_z%26v_y%5C%5Cv_z%260%26-v_x%5C%5C-v_y%26v_x%260%20%5Cend%7Barray%7D%5Cright%5D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Therefore%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cvec%7Bv%7D%20%5Ctimes%20%5Cvec%7Bw%7D%20%3D%20S(%5Cvec%7Bv%7D)%5Ccdot%5Cvec%7Bw%7D%0A%20%20%20%20%24%24%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20Now%2C%20we%20will%20use%20this%20operator%20in%20%20the%20equation%20we%20found%20previously%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bcccc%7D%20m_FI_3%26%20%5B0%5D%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20%5B0%5D%26%20I_F%20%20%26%20%5B0%5D%20%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%5B0%5D%20%26%20%20m_SI_3%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%20%5B0%5D%20%26%20%5B0%5D%20%26%20I_S%5Cend%7Barray%7D%5Cright%5D%5Ccdot%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%5C%5C%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%5C%5C%20%5Cend%7Barray%7D%5Cright%5D%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5B0%5D%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%20%20%5C%5C%20%5B0%5D%20%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%20%5Cend%7Barray%7D%5Cright%5D%20%2B%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20m_F%5Coverrightarrow%7Bg%5EG%7D%5C%5C%20%5B0%5D%5C%5C%20%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%20%2B%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20%5Coverrightarrow%7BF_A%5EG%7D%5C%5C%20%5Coverrightarrow%7BM_A%5EF%7D%2BR_F(S(%5Coverrightarrow%7Br_%7BA%2Fcm_F%7D%5EG%7D)%5Ccdot%5Coverrightarrow%7BF_A%7D%5EG)%5C%5C%20%20%5Coverrightarrow%7BF_K%5EG%7D%20-%20%5Coverrightarrow%7BF_A%5EG%7D%20%5C%5C%20%5Coverrightarrow%7BM_K%5ES%7D%20-%20R_SR_F%5E%7B-1%7D%5Coverrightarrow%7BM_A%5EF%7D%20-%20R_S(S(%5Coverrightarrow%7Br_%7BA%2Fcm_S%7D%5EG%7D)%5Ccdot%5Coverrightarrow%7BF_A%5EG%7D)%20%2B%20R_S(S(%5Coverrightarrow%7Br_%7BK%2Fcm_S%7D%5EG%7D)%5Ccdot%5Coverrightarrow%7BF_K%5EG%7D)%20%20%5Cend%7Barray%7D%5Cright%5D%20%2B%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%5Coverrightarrow%7BGRF%5EG%7D%5C%5C%20%20R_F(%5Coverrightarrow%7Br_%7Bcop%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BGRF%5EG%7D)%5C%5C%20%20%5B0%5D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20Now%20it%20is%20possible%20to%20write%20the%20vector%20%24F%24%20as%20multiplication%20of%20a%20matrix%20by%20a%20vector%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bcccc%7D%20m_FI_3%26%20%5B0%5D%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20%5B0%5D%26%20I_F%20%20%26%20%5B0%5D%20%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%5B0%5D%20%26%20%20m_SI_3%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%20%5B0%5D%20%26%20%5B0%5D%20%26%20I_S%5Cend%7Barray%7D%5Cright%5D%5Ccdot%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%5C%5C%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%5C%5C%20%5Cend%7Barray%7D%5Cright%5D%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5B0%5D%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%20%20%5C%5C%20%5B0%5D%20%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%20%5Cend%7Barray%7D%5Cright%5D%20%2B%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20m_F%5Coverrightarrow%7Bg%5EG%7D%5C%5C%20%5B0%5D%5C%5C%20%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%20%2B%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D%20%20I_3%26%20%5B0%5D%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20R_FS%5Cleft(%5Coverrightarrow%7Br_%7BA%2Fcm_F%7D%5EG%7D%5Cright)%26I_3%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20%20-I_3%26%20%5B0%5D%26%20I_3%20%26%20%5B0%5D%20%5C%5C%20-R_SS%5Cleft(%5Coverrightarrow%7Br_%7BA%2Fcm_S%7D%5EG%7D%5Cright)%26%20-%20R_SR_F%5E%7B-1%7D%20%26%20R_SS%5Cleft(%5Coverrightarrow%7Br_%7BK%2Fcm_S%7D%5EG%7D%5Cright)%20%26%20I_3%20%20%20%20%20%20%5Cend%7Barray%7D%5Cright%5D%5Ccdot%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20%5Coverrightarrow%7BF_A%5EG%7D%5C%5C%20%5Coverrightarrow%7BM_A%5EF%7D%5C%5C%20%20%5Coverrightarrow%7BF_K%5EG%7D%5C%5C%20%5Coverrightarrow%7BM_K%5ES%7D%5Cend%7Barray%7D%5Cright%5D%20%2B%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%5Coverrightarrow%7BGRF%5EG%7D%5C%5C%20%20R_F(%5Coverrightarrow%7Br_%7Bcop%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BGRF%5EG%7D)%5C%5C%20%20%5B0%5D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%0A%20%20%20%20%24%24%0A%0A%20%20%20%20So%2C%20the%20final%20equation%20to%20compute%20the%20forces%20and%20torques%20is%20obtained%20by%20multiplying%20everything%20by%20the%20inverse%20of%20the%20matrix%20multipliying%20the%20vector%20of%20forces%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20%5Coverrightarrow%7BF_A%5EG%7D%5C%5C%20%5Coverrightarrow%7BM_A%5EF%7D%5C%5C%20%20%5Coverrightarrow%7BF_K%5EG%7D%5C%5C%20%5Coverrightarrow%7BM_K%5ES%7D%5Cend%7Barray%7D%5Cright%5D%20%20%3D%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bccc%7D%20%20I_3%26%20%5B0%5D%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20R_FS%5Cleft(%5Coverrightarrow%7Br_%7BA%2Fcm_F%7D%5EG%7D%5Cright)%26I_3%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20%20-I_3%26%20%5B0%5D%26%20I_3%20%26%20%5B0%5D%20%5C%5C%20-R_SS%5Cleft(%5Coverrightarrow%7Br_%7BA%2Fcm_S%7D%5EG%7D%5Cright)%26%20-%20R_SR_F%5E%7B-1%7D%20%26%20R_SS%5Cleft(%5Coverrightarrow%7Br_%7BK%2Fcm_S%7D%5EG%7D%5Cright)%20%26%20I_3%20%20%20%20%20%20%5Cend%7Barray%7D%5Cright%5D%5E%7B-1%7D%5Ccdot%5Cleft(%5Cleft%5B%5Cbegin%7Barray%7D%7Bcccc%7D%20m_FI_3%26%20%5B0%5D%26%20%5B0%5D%26%20%5B0%5D%5C%5C%20%5B0%5D%26%20I_F%20%20%26%20%5B0%5D%20%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%5B0%5D%20%26%20%20m_SI_3%26%20%5B0%5D%20%5C%5C%20%5B0%5D%20%26%20%5B0%5D%20%26%20%5B0%5D%20%26%20I_S%5Cend%7Barray%7D%5Cright%5D%5Ccdot%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5Coverrightarrow%7Ba_%7Bcm_F%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_F%5EF%7D%7D%5C%5C%5Coverrightarrow%7Ba_%7Bcm_S%7D%5EG%7D%5C%5C%5Coverrightarrow%7B%5Cdot%7B%5Comega_S%5ES%7D%7D%20%5C%5C%20%5Cend%7Barray%7D%5Cright%5D%20-%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%5B0%5D%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_F%5EF%7D%20%5Ctimes%20(I_F%5Coverrightarrow%7B%5Comega_F%5EF%7D)%20%20%5C%5C%20%5B0%5D%20%5C%5C%20-%20%5Coverrightarrow%7B%5Comega_S%5ES%7D%20%5Ctimes%20(I_S%5Coverrightarrow%7B%5Comega_S%5ES%7D)%20%5Cend%7Barray%7D%5Cright%5D%20-%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%5Coverrightarrow%7BGRF%5EG%7D%5C%5C%20%20R_F(%5Coverrightarrow%7Br_%7Bcop%2Fcm_F%7D%5EG%7D%5Ctimes%20%5Coverrightarrow%7BGRF%5EG%7D)%5C%5C%20%20%5B0%5D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%20-%20%5Cleft%5B%5Cbegin%7Barray%7D%7Bc%7D%20%20m_F%5Coverrightarrow%7Bg%5EG%7D%5C%5C%20%5B0%5D%5C%5C%20%20m_S%5Coverrightarrow%7Bg%5EG%7D%20%5C%5C%20%20%5B0%5D%20%5Cend%7Barray%7D%5Cright%5D%5Cright)%0A%20%20%20%20%24%24%0A%0A%20%20%20%20With%20the%20last%20equation%2C%20we%20can%20obtain%20all%20the%20forces%20and%20moments%20using%20only%20one%20line%20of%20code.%20Computationally%2C%20it%20is%20less%20prone%20to%20errors%20and%20more%20efficient.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20So%2C%20generically%2C%20the%20steps%20to%20perform%20the%20analysis%20of%20inverse%20dynamics%20is%3A%0A%0A%20%20%20%20-%20write%20the%20equations%20of%20Newton-Euler%20for%20each%20segment.%20Write%20explicitly%20the%20basis%20at%20which%20%20each%20vector%20is%20described.%0A%0A%20%20%20%20-%20use%20the%20rotation%20matrices%20of%20the%20basis%20to%20pass%20the%20description%20of%20a%20vector%20to%20another%20basis.%20Use%20it%20in%20a%20way%20that%20the%20same%20vector%20is%20described%20at%20just%20a%20single%20frame%20of%20reference.%0A%0A%20%20%20%20-%20write%20the%20cross-products%20as%20a%20product%20between%20the%20skew-symmetric%20matrix%20%24S%24%20of%20the%20first%20vector%20and%20the%20second%20vector.%0A%0A%20%20%20%20-%20write%20the%20equations%20in%20the%20matrix%20format%2C%20repeated%20here%3A%0A%0A%20%20%20%20%24%24%0A%20%20%20%20M(q)%5Cddot%7Bq%7D%20%3D%20C(q%2C%5Cdot%7Bq%7D)%20%2B%20G(q)%20%2B%20Q%20%2B%20%20E%0A%20%20%20%20%24%24%0A%0A%20%20%20%20-%20write%20explicitly%20the%20vector%20containing%20the%20unknown%20forces%20and%20moments%20%24Q%24%2C%20as%20a%20multiplication%20of%20a%20matrix%20and%20vector%20containing%20only%20the%20unknown%20forces.%0A%0A%20%20%20%20-%20isolate%20the%20vector%20containing%20only%20the%20unknown%20forces%20by%20multiplying%20the%20whole%20equation%20by%20the%20inverse%20of%20the%20matrix%20multiplying%20the%20vector%20with%20the%20forces.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%202%20%E2%80%94%20Solve%20a%20distal%20force%20balance.**%20A%201%20kg%20distal%20segment%20has%20acceleration%20%24(2%2C0%2C0)%24%20m%2Fs%C2%B2%2C%20gravity%20%24(0%2C-9.81%2C0)%24%20m%2Fs%C2%B2%20and%20distal%20external%20force%20%24(0%2C20%2C0)%24%20N.%20Find%20the%20proximal%20joint%20force%20on%20the%20segment.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Solution%20to%20Exercise%202%0A%0A%20%20%20%20%24F_P%3Dm(a-g)-F_D%3D(2%2C-10.19%2C0)%24%20N.%20On%20the%20adjoining%20segment%20the%20interaction%20force%20is%20its%20negative.%20All%20vectors%20here%20are%20in%20the%20same%20laboratory%20frame.%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20**Exercise%203%20%E2%80%94%20Distinguish%20net%20load%20from%20recruitment.**%20Two%20extensor%20muscles%20have%20moment%20arms%200.02%20and%200.04%20m.%20A%20net%20extension%20moment%20of%208%20N%20m%20is%20required.%20Give%20two%20nonnegative%20force%20combinations.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Solution%20to%20Exercise%203%0A%0A%20%20%20%20Both%20%24(F_1%2CF_2)%3D(400%2C0)%24%20N%20and%20%24(0%2C200)%24%20N%20satisfy%20%240.02F_1%2B0.04F_2%3D8%24.%20Infinitely%20many%20combinations%20lie%20between%20them.%20Inverse%20dynamics%20alone%20does%20not%20select%20a%20recruitment%20pattern.%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell%0Adef%20_()%3A%0A%20%20%20%20import%20marimo%20as%20mo%0A%0A%20%20%20%20return%20(mo%2C)%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Checkpoint%20questions%0A%0A%20%20%20%201.%20Why%20must%20the%20same%20force%20use%20the%20same%20frame%20when%20equations%20are%20added%3F%0A%20%20%20%202.%20What%20cancels%20when%20two%20neighboring%20segment%20equations%20are%20combined%3F%0A%20%20%20%203.%20Which%20quantities%20make%20up%20the%20right-hand%20side%20of%20the%20joint-load%20solve%3F%0A%20%20%20%204.%20What%20additional%20assumptions%20are%20needed%20to%20infer%20muscle%20forces%3F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Checkpoint%20answers%0A%0A%20%20%20%201.%20Components%20in%20different%20bases%20cannot%20be%20added%20directly.%0A%20%20%20%202.%20Internal%20joint%20force%20and%20couple%20pairs.%0A%20%20%20%203.%20Inertial%20demands%20minus%20known%20gravity%20and%20external-load%20contributions%2C%20with%20the%20chosen%20gyroscopic%20convention.%0A%20%20%20%204.%20Muscle%20geometry%20and%20a%20recruitment%2Foptimization%20or%20activation%20model%2C%20among%20other%20constraints.%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Problems%0A%0A%20%20%20%202)%20Write%20the%20matrices%20to%20find%20the%20forces%20and%20torques%20in%20a%20tridimensional%20double%20pendulum%2C%20consisted%20of%20two%20cylindrical%20bars.%20Consider%20that%20you%20know%20all%20the%20masses%2C%20moments%20of%20inertia%2C%20rotation%20matrices%2C%20accelerations%2C%20angular%20velocities%20and%20angular%20accelerations%20necessary%20to%20solve%20the%20problem.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%2F%2F%2F%20details%20%7C%20Final%20answers%20to%20original%20Problems%0A%0A%20%20%20%202.%20Using%20only%20laboratory-frame%20vectors%2C%20let%20%24r_%7Bpj%7D%24%20and%20%24r_%7Bdj%7D%24%20be%20proximal%2Fdistal%20application%20points%20relative%20to%20the%20COM%20of%20link%20j%2C%20and%20%24S(r)v%3Dr%5Ctimes%20v%24.%20For%20unknown%20loads%20%24z%3D(F_1%2CT_1%2CF_2%2CT_2)%24%2C%20the%20block%20matrix%20is%0A%20%20%20%20%24%24A%3D%5Cbegin%7Bbmatrix%7DI%260%26-I%260%5C%5CS(r_%7Bp1%7D)%26I%26-S(r_%7Bd1%7D)%26-I%5C%5C0%260%26I%260%5C%5C0%260%26S(r_%7Bp2%7D)%26I%5Cend%7Bbmatrix%7D.%24%24%0A%20%20%20%20The%20corresponding%20right-hand%20side%20is%20%24(m_1(a_1-g)-F_%7Bext%2C1%7D%2C%5C%20I_1%5Calpha_1%2B%5Comega_1%5Ctimes%20I_1%5Comega_1-M_%7Bext%2C1%7D%2C%5C%20m_2(a_2-g)-F_%7Bext%2C2%7D%2C%5C%20I_2%5Calpha_2%2B%5Comega_2%5Ctimes%20I_2%5Comega_2-M_%7Bext%2C2%7D)%5ET%24.%20Here%20%24I_j%3DR_jI_%7BBj%7DR_j%5ET%24%2C%20all%20external%20moments%20are%20about%20each%20COM%2C%20and%20joint%202%20force%2Fcouple%20are%20defined%20as%20acting%20on%20link%202.%20The%20final%20joint%20loads%20solve%20%24Az%3Db%24.%0A%20%20%20%20%2F%2F%2F%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20Go%20deeper%0A%0A%20%20%20%20Use%20%5BKineticsFundamentalConcepts%5D(https%3A%2F%2Fmolab.marimo.io%2Fgithub%2FBMClab%2FBMC%2Fblob%2Fmaster%2Fnotebooks%2Fkinetics_fundamental_concepts.py)%20to%20connect%20this%20guide%20with%20the%20surrounding%20mechanics%20and%20modeling%20material.%20Return%20to%20the%20assumptions%20behind%20each%20equation%20when%20applying%20it%20to%20a%20new%20experiment.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Optional%20textbook%20investigations%0A%0A%20%20%20%20These%20original%20external%20assignments%20require%20the%20stated%20edition%20and%20its%20figures.%20They%20are%20retained%20as%20optional%20reading%3B%20the%20self-contained%20Problems%20above%20have%20answer%20panels.%0A%0A%20%20%20%201)%20Solve%20the%20problems%2018.3.20%20and%2018.3.24%20of%20the%20Ruina%20and%20Rudra's%20book%20by%20using%20the%20Lagrangian%20formalism%20(it%20is%20much%20easier%20than%20use%20the%20Newton-Euler%20formalism)%20and%20then%20use%20the%20matrix%20formalism%20to%20obtain%20the%20expressions%20of%20the%20angular%20accelerations.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%23%20Video%20lectures%20on%20the%20Internet%0A%0A%20%20%20%20%5BMIT%20OpenCourseWare%5D(https%3A%2F%2Focw.mit.edu%2Fcourses%2F2-003sc-engineering-dynamics-fall-2011%2Fpages%2Flagrange-equations%2F)%20%E2%80%94%20Lagrange%20equations%3A%20follow%20the%20energy-to-equation%20method%20in%20the%20lecture%20and%20worked%20examples.%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0A%40app.cell(hide_code%3DTrue)%0Adef%20_(mo)%3A%0A%20%20%20%20mo.md(r%22%22%22%0A%20%20%20%20%23%23%20References%0A%0A%20%20%20%20-%20YAMAGUCHI%2C%20G.%20T.%20Dynamic%20modeling%20of%20musculoskeletal%20motion%3A%20a%20vectorized%20approach%20for%20biomechanical%20analysis%20in%20three%20dimensions.%2C%202001%0A%0A%20%20%20%20-%20CRAIG%2C%20J.%20Introduction%20to%20robotics.%20%2C%201989%0A%0A%20%20%20%20-%20JAIN%2C%20A.%20Robot%20and%20multibody%20dynamics.%20%2C%202011%0A%0A%20%20%20%20-%20SPONG%2C%20M.%20W.%3B%20HUTCHINSON%2C%20S.%3B%20VIDYASAGAR%2C%20M.%20Robot%20modeling%20and%20control.%2C%202006%0A%0A%20%20%20%20-%20ERDEMIR%2C%20A.%20et%20al.%20Model-based%20estimation%20of%20muscle%20forces%20exerted%20during%20movements.%20Clinical%20Biomechanics%2C%20v.%2022%2C%20n.%202%2C%20p.%20131%E2%80%93154%2C%202007.%0A%0A%20%20%20%20-%20STANEV%2C%20D.%3B%20MOUSTAKAS%2C%20K.%20Simulation%20of%20constrained%20musculoskeletal%20systems%20in%20task%20space.%20IEEE%20Transactions%20on%20Biomedical%20Engineering%2C%20v.%2065%2C%20n.%202%2C%20p.%20307%E2%80%93318%2C%202018.%0A%0A%20%20%20%20-%20ZAJAC%20FE%2C%20GORDON%20ME%20%2C%20%5BDetermining%20muscle's%20force%20and%20action%20in%20multi-articular%20movement%5D(https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D0BxbW72zV7WmUcC1zSGpEOUxhWXM%26authuser%3D0).%20Exercise%20and%20Sport%20Sciences%20Reviews%2C%2017%2C%20187-230.%20%2C%201989%0A%0A%20%20%20%20-%20RUINA%20A%2C%20RUDRA%20P.%20%5BIntroduction%20to%20Statics%20and%20Dynamics%5D(https%3A%2F%2Fruina.tam.cornell.edu%2FBook%2Findex.html).%20Oxford%20University%20Press.%20%2C%202015%0A%20%20%20%20%22%22%22)%0A%20%20%20%20return%0A%0A%0Aif%20__name__%20%3D%3D%20%22__main__%22%3A%0A%20%20%20%20app.run()%0A
f93f63a0a18924b4380305a957157767