Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Hill-Type Muscle Model in biomechanics #26443

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eh111eh
Copy link
Contributor

@eh111eh eh111eh commented Apr 2, 2024

References to other Issues or PRs

N/A

Brief description of what is fixed or changed

I implement a HillTypeMuscle class that inherits from a base musculotendon class.

The Hill muscle model consists of three elements: A contractile element (CE), A nonlinear passive element (PE), and A nonlinear passive element in series with the former two (SE).

The force equilibrium equation is
$$F = F_{SE} = (F_{CE}+F_{PE})*cos\alpha$$
where $F$ is the musculotendon force, $F_{CE}$, $F_{PE}$, $F_{SE}$ are the forces produced by the contractile, passive parallel, and passive serial element, respectively, and $\alpha$ is the pennation angle.

These forces are detailed as
$$F_{CE}=aF_0f_l(l_m)f_v(v_m)$$
$$F_{PE}=F_0f_p(l_m)$$
$$F_{SE}=F_0f_t(l_t)$$
where $a$ is the muscle activation, $F_0$ is the maximum isometric force, $f_l$ and $f_v$ are dimensionless force-length and force-velocity relationships, respectively, $f_p$ and $f_t$ are dimensionless force-length relationship of the passive parallel and passive serial element, respectively, $l_m$ and $l_t$ are the lengths of muscle and tendon, respectively, and $v_m$ is the velocity of muscle contraction.

Other comments

Reference

Release Notes

  • physics.biomechanics
    • Implement Hill Type Muscle Model

@sympy-bot
Copy link

sympy-bot commented Apr 2, 2024

Hi, I am the SymPy bot. I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • physics.biomechanics

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->
N/A

#### Brief description of what is fixed or changed
I implement a **HillTypeMuscle** class that inherits from a base musculotendon class.

The Hill muscle model consists of three elements: A contractile element (CE), A nonlinear passive element (PE), and A nonlinear passive element in series with the former two (SE).

The force equilibrium equation is 
$$F = F_{SE} = (F_{CE}+F_{PE})*cos\alpha$$
where $F$ is the musculotendon force, $F_{CE}$, $F_{PE}$, $F_{SE}$ are the forces produced by the contractile, passive parallel, and passive serial element, respectively, and $\alpha$ is the pennation angle.

These forces are detailed as
$$F_{CE}=aF_0f_l(l_m)f_v(v_m)$$ 
$$F_{PE}=F_0f_p(l_m)$$ 
$$F_{SE}=F_0f_t(l_t)$$
where $a$ is the muscle activation, $F_0$ is the maximum isometric force, $f_l$ and $f_v$ are dimensionless force-length and force-velocity relationships, respectively, $f_p$ and $f_t$ are dimensionless force-length relationship of the passive parallel and passive serial element, respectively, $l_m$ and $l_t$ are the lengths of muscle and tendon, respectively, and $v_m$ is the velocity of muscle contraction.

#### Other comments
Reference
- Lamas, M., Mouzo, F., Michaud, F. et al. Comparison of several muscle modeling alternatives for computationally intensive algorithms in human motion dynamics. Multibody Syst Dyn 54, 415–442 (2022). https://doi.org/10.1007/s11044-022-09819-y
- https://sanlab.psych.ucla.edu/wp-content/uploads/sites/38/2019/11/Morgenland_Venugopal_ECNS-with-Revised-Final.pdf
- Miller, R.H. (2018). Hill-Based Muscle Modeling. In: Müller, B., et al. Handbook of Human Motion. Springer, Cham. https://doi.org/10.1007/978-3-319-30808-1_203-2
- [Hill's muscle model - Wikipedia](https://en.wikipedia.org/wiki/Hill%27s_muscle_model)

#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers. Formerly, `log(-x)` incorrectly gave `-log(x)`.

* physics.units
  * Corrected a semantical error in the conversion between volt and statvolt which
    reported the volt as being larger than the statvolt.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* physics.biomechanics
  * Implement Hill Type Muscle Model
<!-- END RELEASE NOTES -->

@moorepants
Copy link
Member

Hi, great idea to add this!

As I've mentioned in the other PRs, you'll need unit tests and to show that this muscle works. You can use the model here to demonstrate that it works:

https://docs.sympy.org/dev/tutorials/biomechanics/biomechanics.html#a-simple-musculotendon-model

We'd also like the documentation to be similar in quality as the existing muscles. So use those as a template.

I suspect you'll need to introduce new curves for the Hill functions. I recommend making a copy of all the DeGroote2016 classes and then replacing them with the equivalent Hill models.

@eh111eh eh111eh marked this pull request as ready for review April 3, 2024 07:49
@eh111eh eh111eh requested a review from moorepants as a code owner April 3, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants