Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
|
The abstract class describes the basics for a musculoskeletal model. More...
Public Member Functions | |
function | extractControl (in obj, in type, in controlname) |
Function to obtain index of contol with a specific type (and name) | |
function | extractState (in obj, in type, in statename) |
Function to obtain index of state with a specific type (and name) | |
function | getCoP (in obj, in grf) |
Function to calculate the center of pressure. | |
virtual | getDynamics (in obj, in x, in xdot, in u) |
Abstract function to compute implicit differential equation for the model. | |
function | getErate_bhargava (in obj, in F_ce, in stim, in act, in l_ce, in v_ce, in t_stim) |
Model function to calculate the energy rate of a single time step using Bhargava et al. | |
function | getErate_Houdijk (in obj, in F_ce, in act, in l_ce, in v_ce) |
Model function to calculate the energy rate of a single time. | |
function | getErate_Lichtwark (in obj, in F_ce, in act, in l_ce, in v_ce, in t_stim) |
Model function to calculate the energy rate of a single time step using a continuous version of Lichtwark & Wilson's model. | |
function | getErate_margaria (in obj, in F_ce, in v_ce) |
Model function to calculate the energy rate of a single time step using Margaria's model. | |
function | getErate_Minetti (in obj, in act, in v_ce) |
Model function to calculate the energy rate of a single time. | |
function | getErate_uchida (in obj, in F_ce, in stim, in act, in l_ce, in v_ce) |
Model function to calculate the energy rate of a single time. | |
function | getErate_Umberger (in obj, in F_ce, in stim, in act, in l_ce, in v_ce) |
Model function to calculate the energy rate of a single time step with Umberger et al. | |
function | getEratec_bhargava (in obj, in F_ce, in stim, in act, in l_ce, in v_ce, in dFdx, in dFdxdot, in epsilon) |
Model function to calculate the energy rate of a single time step using a continuous version of Bhargava et al. | |
function | getEratec_Houdijk (in obj, in F_ce, in act, in l_ce, in v_ce, in dFdx, in dFdxdot, in epsilon) |
Model function to calculate the energy rate of a single time step using a continuous version of Houdijk et al. | |
function | getEratec_Lichtwark (in obj, in F_ce, in act, in l_ce, in v_ce, in dFdx, in dFdxdot, in epsilon) |
Model function to calculate the energy rate of a single time step using a continuous version of Lichtwark & Wilson's model. | |
function | getEratec_margaria (in obj, in F_ce, in v_ce, in dFdx, in dFdxdot, in epsilon) |
Model function to calculate the energy rate of a single time step using a continuous version of Margaria's model. | |
function | getEratec_Minetti (in obj, in act, in v_ce) |
Model function to calculate the energy rate of a single time step using Minetti's model. | |
function | getEratec_umberger (in obj, in F_ce, in stim, in act, in l_ce, in v_ce, in dFdx, in dFdxdot, in epsilon) |
Model function to calculate the energy rate of a single time step with the continuous version of Umberger et al. | |
virtual | getGRF (in obj, in x) |
Abstract function returning the ground reaction forces for the system in state x. | |
virtual | getJointmoments (in obj, in x, in u) |
Abstract function returns joint moments, for the system in state x. | |
function | getMetabolicRate_pernode (in obj, in x, in xdot, in u, in t_stim, in name, in getCont, in epsilon, in exponent) |
Model function to calculate metabolic cost of a movement. | |
virtual | getMuscleCEforces (in obj, in x, in xdot) |
Abstract function returning muscle forces of CE for the system in state x. | |
virtual | getMuscleCEpower (in obj, in x, in xdot) |
Abstract function returns power generated by muscle contractile elements, for the system in state x. | |
virtual | getMuscleforces (in obj, in x) |
Abstract function returning muscle forces for the system in state x. | |
function | setbodymass (in obj, in bodymass) |
Function to set body mass, does not influence the. | |
function | setMuscles (in obj, in muscles) |
Function to set the muscles table. | |
function | setSegmentMass (in obj, in segmentName, in segmentMass) |
Function to set segment mass. | |
function | setSegments (in obj, in segmentTable) |
Function to set segment Table. | |
virtual | showStick (in obj, in x) |
Abstract function to show model as stick figure. | |
virtual | simuAccGyro (in obj, in data, in q, in qd, in qdd) |
Abstract function to simulate acceleration and gyroscope signals. | |
Public Attributes | |
Property | CPs |
Table: Contact points. | |
Property | dofs |
Table: Degrees of freedom (Range of Dofs should not be changed here. | |
Property | drag_coefficient |
Double: Air drag coefficient in N/(m/s)^2 (default: 0.2128) | |
Property | gravity |
Double array: Gravity vector in m/(s^2) | |
Constant Property | GRFNAMES = {'rightFx', 'rightFy', 'rightFz', 'rightMx', 'rightMy', 'rightMz', 'leftFx', 'leftFy', 'leftFz', 'leftMx', 'leftMy', 'leftMz' } |
Cell array with string: Gives the names for the GRF vector returned by getGRF() | |
Property | joints |
Table: Joints. | |
Property | mExtraScaleFactor |
Double: Scale factor for extra torques in Nm (default: 100 since we used this in previous simulations. | |
Property | muscles |
Table: Muscles. | |
Property | torques |
Table: Torque actuators. | |
Property | wind_speed |
Double: Wind speed in direction of +X in m/s (default: 0) | |
Protected Member Functions | |
virtual | initMex (in obj) |
Abstract function to initialize model mex file. | |
virtual | initModel (in obj, in vargin) |
Abstract function to initialize with default parameters. | |
virtual | update_constraints (in obj) |
Abstract function defining the table Model.constraints. | |
virtual | update_controls (in obj) |
Abstract function defining the table Model.controls. | |
function | update_idxControls (in obj) |
Function defining Model.hidxControls. | |
function | update_idxForward (in obj) |
Function defining Model.idxForward. | |
function | update_idxForwardAll (in obj) |
Function defining Model.idxForwardAll. | |
function | update_idxSideward (in obj) |
Function defining Model.idxSideward. | |
function | update_idxSidewardAll (in obj) |
Function defining Model.idxSidewardAll. | |
function | update_idxStates (in obj) |
Function defining Model.hidxStates. | |
virtual | update_idxSymmetry (in obj) |
Abstract function defining Model.idxSymmetry. | |
function | update_idxTorqueDof (in obj) |
Function defining Model.idxTorqueDof. | |
function | update_idxUpward (in obj) |
Function defining Model.idxUpward. | |
virtual | update_mexParameter (in obj, in src, in evnt) |
Abstract function performed to update the parameter of the mex and the tables. | |
virtual | update_states (in obj) |
Abstract function defining the table Model.states. | |
Protected Attributes | |
Property | constraints |
Table: Information on constraints implemented in the mex and here. | |
Property | controls |
Table: Information on controls of the model. | |
Property | idxForward |
Double array: Indices for forward translation. | |
Property | idxForwardAll |
Double array: Indices for forward translation, speed, position of contact points and force at contact points. | |
Property | idxSideward |
Double array: Indices for sideward translation. | |
Property | idxSidewardAll |
Double array: Indices for sideward translation, speed, position of contact points and force at contact points. | |
Property | idxSymmetry |
Struct: Double arrays with indices for symmetry to map right to left. | |
Property | idxTorqueDof |
Double array: Indices of dofs of torque actuators. | |
Property | idxUpward |
Double array: Indices for upward translation. | |
Property | init |
Double: Showing if the mex model is initialized. | |
Property | nConstraints |
Double: Number of constraints (height of Model.constraints) | |
Property | nControls |
Double: Number of controls (height of Model.controls) | |
Property | nCPs |
Double: Number of contact points (height of Model.CPs) | |
Property | nDofs |
Double: Number of degree of freedoms (height of Model.dofs) | |
Property | nJoints |
Double: Number of joints (height of Model.joints) | |
Property | nMus |
Double: Number of muscles (height of Model.muscles) | |
Property | nSegments |
Double: Number of segments (height of Model.segments) | |
Property | nStates |
Double: Number of states (height of Model.states) | |
Property | nTor |
Double: Number of torque actuators (height of Model.torques) | |
Property | segments |
Table: Segments (Segment properties should not be changed) | |
Property | states |
Table: Information on states of the model. | |
The abstract class describes the basics for a musculoskeletal model.
function extractControl | ( | in | obj, |
in | type, | ||
in | controlname | ||
) |
Function to obtain index of contol with a specific type (and name)
obj | Model class object |
type | String: Type of the control |
controlname | (optional) String or cell array of strings: Name of the control |
iControl | Double array: Indices in Model.controls matching type (and name) |
function extractState | ( | in | obj, |
in | type, | ||
in | statename | ||
) |
Function to obtain index of state with a specific type (and name)
obj | Model class object |
type | String: Type of the state |
statename | (optional) String or cell array of strings: Name of the state |
iState | Double array: Indices in Model.states matching type (and name) |
function getCoP | ( | in | obj, |
in | grf | ||
) |
Function to calculate the center of pressure.
It solves the center of pressure (COP) coordinates from: COP x F + Ty = M, where COP is a point in the XZ plane and Ty is the "free moment" on the Y axis. expand the equation:
Use COPy = 0, to get COPx = Mz / Fy and COPz = -Mx / Fy
For 2D, COPz will be 0.
obj | Model class object |
grf | Double vector: Ground contact vector containing Fx, Fy, Fz, Mx, My, Mz (right), and Fx, Fy, Fz, Mx, My, Mz (left) (12) |
CoP_r | Double vector: Center of pressure in x, y and z direction for right foot (3) |
CoP_l | Double vector: Center of pressure in x, y and z direction for left foot (3) |
|
virtual |
Abstract function to compute implicit differential equation for the model.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
function getErate_bhargava | ( | in | obj, |
in | F_ce, | ||
in | stim, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce, | ||
in | t_stim | ||
) |
Model function to calculate the energy rate of a single time step using Bhargava et al.
's model
Function to calculate the energy rate at a single time step using a continuous version of Bhargava et al.'s model. Model paper: Bhargava et al., J Biomech, 2004
Inputs are muscle states of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
stim | Stimulation of the muscle (between 0 and 1) |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
t_stim | Duration of stimulation of muscle |
The output of getEratec_bhargava.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
function getErate_Houdijk | ( | in | obj, |
in | F_ce, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce | ||
) |
Model function to calculate the energy rate of a single time.
Function to calculate the energy rate at a single time step using Houdijk et al.'s model. Houdijk et al., J Biomech, 2006. The paper desription is not optimal, see comments
Inputs are muscle parameters of the specific muscle that is considered. Inputs are muscle states of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
The output of getErate_Houdijk.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
w | Muscle work during the current time step |
function getErate_Lichtwark | ( | in | obj, |
in | F_ce, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce, | ||
in | t_stim | ||
) |
Model function to calculate the energy rate of a single time step using a continuous version of Lichtwark & Wilson's model.
Function to calculate the energy rate at a single time step using Lichtwark & Wilson's model, described in the supplement of Lichtwark & Wilson, J Biomech, 2007. The exception in gamma (line 68), which is according to Lichtwark & Wilson, J Exp Biol, 2005, because results were better in the 2019 comparison paper
Inputs are muscle parameters of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
t_stim | Duration of stimulation of muscle |
The output of getErate_Lichtwark.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
function getErate_margaria | ( | in | obj, |
in | F_ce, | ||
in | v_ce | ||
) |
Model function to calculate the energy rate of a single time step using Margaria's model.
Function to calculate the energy rate at a single time step using Margaria's model: 25 % efficient during shortening, 120% during lengthening. Margaria, Int Z Angew Physiol Einschl Arbeitsphysiol, 1968
Inputs are muscle parameters of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
v_ce | Normalized velocity of the contractile element |
The output of getErate_margaria.m is a double which is equal to the energy rate of the time step in W/kg
Edot | is the energy expenditure during the current time step |
function getErate_Minetti | ( | in | obj, |
in | act, | ||
in | v_ce | ||
) |
Model function to calculate the energy rate of a single time.
Function to calculate the energy rate at a single time step using Minetti's model. Based on: Minetti & Alexander, J Theor Biol, 1997. Uses muscle-level work instead of torque-level
Inputs are muscle parameters of the specific muscle that is considered.
obj | Model object |
act | activation level of the muscle (between 0 and 1) |
v_ce | current velocity of the contractile element |
The output of getErate_Minetti is a double which is equal to the energy rate
Edot | is the energy expenditure during the current time step |
function getErate_uchida | ( | in | obj, |
in | F_ce, | ||
in | stim, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce | ||
) |
Model function to calculate the energy rate of a single time.
Function to calculate the energy rate at a single time step using Uchida's model: Uchida et al., PLOS ONE, 2016
Inputs are muscle states of the specific muscle that is considered
obj | Model class object |
F_ce | Double vector: Muscle force of CE returned by obj.getMuscleCEforces(x) (Model.nMus x 1) |
stim | Double vector: Stimulation of muscles = neural excitation u (Model.nMus x 1) |
act | Double vector: Activation of muscles a (Model.nMus x 1) |
l_ce | Double vector: Length of contractile element of muscles s (Model.nMus x 1) |
v_ce | Double vector: Velocity of contractile element of muscles (Model.nMus x 1) |
The output of getErate_uchida.m is a double which is equal to the energy rate of the time step in W/kg
Edot | Double vector: Energy expenditure during one time step (energy rate) in W (Model.nMus x 1) |
w_ce | Double vector: Mechanical work rate of contractile element in W/kg (normalized to muscle mass) (Model.nMus x 1) |
h_sl | Double vector: Heat rate due to shortening and lengthening of muscles in W/kg (normalized to muscle mass) (Model.nMus x 1) |
h_am | Double vector: Heat rate from the activation of muscles and its maintenance in W/kg (normalized to muscle mass) (Model.nMus x 1) |
function getErate_Umberger | ( | in | obj, |
in | F_ce, | ||
in | stim, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce | ||
) |
Model function to calculate the energy rate of a single time step with Umberger et al.
's model. Ross Miller's code was also used as a reference.
Function to calculate the energy rate at a single time step using Umberger's model. It uses the 2010 version (no negative work): Umberger, J R Soc Interface, 2010 2003 (original) Version: Umberger et al., "A model of human muscle energy expenditure," Computer methods in biomechanics and biomedical engineering, vol. 6, no. 2, pp. 99–111, 2003.
Inputs are muscle states of the specific muscle that is considered
obj | Gait2dc class object |
F_ce | Double vector: Muscle force of CE returned by Model.getMuscleCEforces(x) (Model.nMus x 1) |
stim | Double vector: Stimulation of muscles = neural excitation u (Model.nMus x 1) |
act | Double vector: Activation of muscles a (Model.nMus x 1) |
l_ce | Double vector: Length of contractile element of muscles s (Model.nMus x 1) |
v_ce | Double vector: Velocity of contractile element of muscles (Model.nMus x 1) |
The output of getErate_Umberger.m is a double which is equal to the energy rate of the time step in W/kg
Edot | Double vector: Energy expenditure during one time step (energy rate) in W (Model.nMus x 1) |
w_ce | Double vector: Mechanical work rate of contractile element in W/kg (normalized to muscle mass) (Model.nMus x 1) |
h_sl | Double vector: Heat rate due to shortening and lengthening of muscles in W/kg (normalized to muscle mass) (Model.nMus x 1) |
h_am | Double vector: Heat rate from the activation of muscles and its maintenance in W/kg (normalized to muscle mass) (Model.nMus x 1) |
function getEratec_bhargava | ( | in | obj, |
in | F_ce, | ||
in | stim, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce, | ||
in | dFdx, | ||
in | dFdxdot, | ||
in | epsilon | ||
) |
Model function to calculate the energy rate of a single time step using a continuous version of Bhargava et al.
's model
Function to calculate the energy rate at a single time step using a continuous version of Bhargava et al.'s model. Line 60, phi, was chosen based on graphs of phi as a function of t_stim, since t_stim cannot be differentiated. Model paper: bhargava et al., J Biomech, 2004
Inputs are muscle states of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
stim | Stimulation of the muscle (between 0 and 1) |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
dFdx | Derivative of CE forces with respect to the state |
dFdxdot | Derivative of CE forces with respect to the state derivative |
epsilon | Measure of the nonlinearity of the continuous functions |
The output of getEratec_bhargava.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
dEdot | The gradient of Edot with respect to all states and inputs |
function getEratec_Houdijk | ( | in | obj, |
in | F_ce, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce, | ||
in | dFdx, | ||
in | dFdxdot, | ||
in | epsilon | ||
) |
Model function to calculate the energy rate of a single time step using a continuous version of Houdijk et al.
's model
Function to calculate the energy rate at a single time step using a continuous version of Houdijk et al.'s model. Houdijk et al., J Biomech, 2006.
Inputs are muscle parameters of the specific muscle that is considered. Inputs are muscle states of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
dFdx | Derivative of CE forces with respect to the state |
dFdxdot | Derivative of CE forces with respect to the state derivative |
epsilon | Measure of the nonlinearity of the continuous functions |
The output of getEratec_Houdijk.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
dEdot | The gradient of Edot with respect to all states and inputs% |
function getEratec_Lichtwark | ( | in | obj, |
in | F_ce, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce, | ||
in | dFdx, | ||
in | dFdxdot, | ||
in | epsilon | ||
) |
Model function to calculate the energy rate of a single time step using a continuous version of Lichtwark & Wilson's model.
Function to calculate the energy rate at a single time step using a continuous version of Lichtwark & Wilson's model, described in the supplement of Lichtwark & Wilson, J Biomech, 2007.
Inputs are muscle parameters of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
dFdx | Derivative of CE forces with respect to the state |
dFdxdot | Derivative of CE forces with respect to the state derivative |
epsilon | Measure of the nonlinearity of the continuous functions |
The output of getEratec_Lichtwark.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
dEdot | The gradien |
function getEratec_margaria | ( | in | obj, |
in | F_ce, | ||
in | v_ce, | ||
in | dFdx, | ||
in | dFdxdot, | ||
in | epsilon | ||
) |
Model function to calculate the energy rate of a single time step using a continuous version of Margaria's model.
Function to calculate the energy rate at a single time step using a continuous version of Margaria's model: 25 % efficient during shortening, 120% during lengthening. Margaria, Int Z Angew Physiol Einschl Arbeitsphysiol, 1968
Inputs are muscle parameters of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
v_ce | Normalized velocity of the contractile element |
dFdx | Derivative of CE forces with respect to the state |
dFdxdot | Derivative of CE forces with respect to the state derivative |
epsilon | Measure of the nonlinearity of the continuous functions |
The output of getEratec_margaria.m is a double which is equal to the energy rate of the time step in W/kg
Edot | is the energy expenditure during the current time step |
dEdot | is the gradient of Edot with respect to all states and inputs |
function getEratec_Minetti | ( | in | obj, |
in | act, | ||
in | v_ce | ||
) |
Model function to calculate the energy rate of a single time step using Minetti's model.
No discsontinuities here, so it is the same as the original model.
Function to calculate the energy rate at a single time step using Minetti's model. Based on: Minetti & Alexander, J Theor Biol, 1997. Uses muscle-level work instead of torque-level
Inputs are muscle parameters of the specific muscle that is considered.
obj | Model object |
act | activation level of the muscle (between 0 and 1) |
v_ce | current velocity of the contractile element |
The output of getEratec_Minetti.m is a double which is equal to the energy rate of the time step in W/kg
Edot | is the energy expenditure during the current time step |
dEdot | is the gradient of Edot with respect to all states and inputs |
function getEratec_umberger | ( | in | obj, |
in | F_ce, | ||
in | stim, | ||
in | act, | ||
in | l_ce, | ||
in | v_ce, | ||
in | dFdx, | ||
in | dFdxdot, | ||
in | epsilon | ||
) |
Model function to calculate the energy rate of a single time step with the continuous version of Umberger et al.
's model
Function to calculate the energy rate at a single time step using a continuous version of Umberger's model. This one is published in Koelewijn, Dorscky et al., Comp Meth Biomed Biomech Eng, 2016, and uses the 2010 version (no negative work): Umberger, J R Soc Interface, 2010
Inputs are muscle states of the specific muscle that is considered.
obj | Model object |
F_ce | Force in the contractile element |
stim | Stimulation of the muscle (between 0 and 1) |
act | Activation level of the muscle (between 0 and 1) |
l_ce | Normalized length of the contractile element |
v_ce | Normalized velocity of the contractile element |
dFdx | Derivative of CE forces with respect to the state |
dFdxdot | Derivative of CE forces with respect to the state derivative |
epsilon | Measure of the nonlinearity of the continuous functions |
The output of getEratec_umberger.m is a double which is equal to the energy rate of the time step in W/kg
Edot | The energy expenditure during the current time step |
dEdot | The gradient of Edot with respect to all states and inputs |
|
virtual |
Abstract function returning the ground reaction forces for the system in state x.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
virtual |
Abstract function returns joint moments, for the system in state x.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
function getMetabolicRate_pernode | ( | in | obj, |
in | x, | ||
in | xdot, | ||
in | u, | ||
in | t_stim, | ||
in | name, | ||
in | getCont, | ||
in | epsilon, | ||
in | exponent | ||
) |
Model function to calculate metabolic cost of a movement.
Function to calculate the metabolic cost of a movement. Seven different models are currently implemented
obj | Model object |
x | Double vector: States of the current node |
xdot | Double vector: Derivatives of states |
u | Double vector: Controls of the current node |
t_stim | Double vector: how long each muscle was already stimulated |
name | (optional) String: name of the model that is being used. Options are umberger, lichtwark, bhargava, margaria, minetti, houdijk, and uchida |
getCont | (optional) Boolean: If true, get the continuous version which is needed if we use the output for simulation. (default: 0) |
epsilon | (optional) double parameter: Measure of nonlinearity of model, which is only used in the continuous model version. Default 0. |
exponent | (optional) integer: if metabolic cost is the objective, this number allows to minimize the square, cube, or nth-power of metabolic cost. Default is 1 |
Edot | Double vector: Energy expenditure during one time step (energy rate) in W (Model.nMus x 1) |
dEdotdx | Double vector: Derivative of Edot w.r.t to x (Model.nStates x 1) |
dEdotdu | Double vector: Derivative of Edot w.r.t to u (Model.nControls x 1) |
dEdotdT | Double: Derivative of Edot w.r.t to T |
|
virtual |
Abstract function returning muscle forces of CE for the system in state x.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
virtual |
Abstract function returns power generated by muscle contractile elements, for the system in state x.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
virtual |
Abstract function returning muscle forces for the system in state x.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protectedvirtual |
Abstract function to initialize model mex file.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protectedvirtual |
Abstract function to initialize with default parameters.
Reimplemented in Gait2dc.
function setbodymass | ( | in | obj, |
in | bodymass | ||
) |
Function to set body mass, does not influence the.
obj | Model class object |
segmentTable | Double: bodymass |
function setMuscles | ( | in | obj, |
in | muscles | ||
) |
Function to set the muscles table.
obj | Model class object |
segmentTable | Table: muscles |
function setSegmentMass | ( | in | obj, |
in | segmentName, | ||
in | segmentMass | ||
) |
Function to set segment mass.
obj | Model class object |
segmentName | String: Name of the segment |
segmentMass | Double: Mass of the segment in kg |
function setSegments | ( | in | obj, |
in | segmentTable | ||
) |
Function to set segment Table.
obj | Model class object |
segmentTable | Table: segmentTable |
|
virtual |
Abstract function to show model as stick figure.
|
virtual |
Abstract function to simulate acceleration and gyroscope signals.
|
protectedvirtual |
Abstract function defining the table Model.constraints.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protectedvirtual |
Abstract function defining the table Model.controls.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protected |
Function defining Model.hidxControls.
obj | Model class object |
|
protected |
Function defining Model.idxForward.
Provides the indices of state variables that have forward translation. States have to be updated before!
obj | Model class object |
|
protected |
Function defining Model.idxForwardAll.
Provides the indices of state variables that have forward translation, speed, position of contact points and force at contact points. States and idxForward have to be updated before!
obj | Model class object |
|
protected |
Function defining Model.idxSideward.
Provides the indices of state variables that have sideward translation. States have to be updated before!
obj | Model class object |
|
protected |
Function defining Model.idxSidewardAll.
Provides the indices of state variables that have sideward translation, speed, position of contact points and force at contact points. States and idxSideward have to be updated before!
obj | Model class object |
|
protected |
Function defining Model.hidxStates.
obj | Model class object |
|
protectedvirtual |
Abstract function defining Model.idxSymmetry.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protected |
Function defining Model.idxTorqueDof.
Searches for indices of dof which have torque actuators in Model.torques.
obj | Model class object |
|
protected |
Function defining Model.idxUpward.
Provides the indices of state variables that have upward translation. States have to be updated before!
obj | Model class object |
|
protectedvirtual |
Abstract function performed to update the parameter of the mex and the tables.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protectedvirtual |
Abstract function defining the table Model.states.
Reimplemented in Gait2d_osim, Gait2dc, and Gait3d.
|
protected |
Table: Information on constraints implemented in the mex and here.
|
protected |
Table: Information on controls of the model.
Property CPs |
Table: Contact points.
Property dofs |
Table: Degrees of freedom (Range of Dofs should not be changed here.
Set the bounds of the Problem instead.)
Property drag_coefficient |
Double: Air drag coefficient in N/(m/s)^2 (default: 0.2128)
Property gravity |
Double array: Gravity vector in m/(s^2)
Constant Property GRFNAMES = {'rightFx', 'rightFy', 'rightFz', 'rightMx', 'rightMy', 'rightMz', 'leftFx', 'leftFy', 'leftFz', 'leftMx', 'leftMy', 'leftMz' } |
Cell array with string: Gives the names for the GRF vector returned by getGRF()
|
protected |
Double array: Indices for forward translation.
|
protected |
Double array: Indices for forward translation, speed, position of contact points and force at contact points.
|
protected |
Double array: Indices for sideward translation.
|
protected |
Double array: Indices for sideward translation, speed, position of contact points and force at contact points.
|
protected |
Struct: Double arrays with indices for symmetry to map right to left.
|
protected |
Double array: Indices of dofs of torque actuators.
|
protected |
Double array: Indices for upward translation.
|
protected |
Double: Showing if the mex model is initialized.
Property joints |
Table: Joints.
Property mExtraScaleFactor |
Double: Scale factor for extra torques in Nm (default: 100 since we used this in previous simulations.
However, it's probably overwritten in the construction (see Gait3d.m)!)
Property muscles |
Table: Muscles.
|
protected |
Double: Number of constraints (height of Model.constraints)
|
protected |
Double: Number of controls (height of Model.controls)
|
protected |
Double: Number of contact points (height of Model.CPs)
|
protected |
Double: Number of degree of freedoms (height of Model.dofs)
|
protected |
Double: Number of joints (height of Model.joints)
|
protected |
Double: Number of muscles (height of Model.muscles)
|
protected |
Double: Number of segments (height of Model.segments)
|
protected |
Double: Number of states (height of Model.states)
|
protected |
Double: Number of torque actuators (height of Model.torques)
|
protected |
Table: Segments (Segment properties should not be changed)
|
protected |
Table: Information on states of the model.
Property torques |
Table: Torque actuators.
Property wind_speed |
Double: Wind speed in direction of +X in m/s (default: 0)