Biomech-Sim-Toolbox 1
Toolbox for movement simulation and analysis
|
The class describes the Gait2dc 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 | Gait2dc (in varargin) |
Default constructor setting default Gait2dc object. | |
function | getCoP (in obj, in grf) |
Function to calculate the center of pressure. | |
function | getDynamics (in obj, in x, in xdot, in u) |
Function to compute implicit differential equation for 2D musculoskeletal 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. | |
function | getFkin (in obj, in x) |
Function returns position and orientation of all segments, for the system in position q. | |
function | getGRF (in obj, in x) |
Function returning the ground reaction forces for the system in state x. | |
function | getJointmoments (in obj, in x, in u) |
Function returns joint moments, for the system in state x. | |
function | getLCE (in obj, in x) |
Function returns length of contractile element, for the system in state x. | |
function | getLdotCE (in obj, in xdot) |
Function returns length change of contractile element, for the system in state x. | |
function | getLdotMTU (in obj, in x) |
Function returns length change of entire muscle-tendon-unit, for the system in state x. | |
function | getLdotSEE (in obj, in x, in xdot) |
Function returns length change of serial elastic element, for the system in state x. | |
function | getLMTU (in obj, in x) |
Function returns length of entire muscle-tendon-unit, for the system in state x. | |
function | getLSEE (in obj, in x) |
Function returns length of serial elastic element, 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. | |
function | getMomentArms (in obj) |
Function to extract moment arms matrix from muscle table. | |
function | getMuscleCEforces (in obj, in x, in xdot) |
Function returning muscle forces of CE for the system in state x. | |
function | getMuscleCEpower (in obj, in x, in xdot) |
Function returns power generated by muscle contractile elements, for the system in state x. | |
function | getMuscleforces (in obj, in x) |
Function returning muscle forces for the system in state x. | |
function | getMusclePower (in obj, in x) |
Function returns power generated by entire muscle-tendon-unit, for the system in state x. | |
function | getMuscleSEEpower (in obj, in x, in xdot) |
Function returns power generated by muscle serial elastic elements, 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. | |
function | setTreadmillSpeed (in obj, in speed) |
Function to set the speed of the ground, to model a treadmill. | |
function | showMarker (in obj, in x, in markerTable, in measuredMean) |
Function to plot marker positions. | |
virtual | showStick (in obj, in x) |
Abstract function to show model as stick figure. | |
function | showStick (in obj, in x, in range, in plotFeet, in plotGRF, in plotCPs, in plotJointCOSYs) |
Function to show model as stick figure. | |
function | showTreadmill (in obj, in x_points, in y_points, in xrange, in yrange, in durTrial, in nFrames) |
Function to visualize treadmill as moving scatter plot. | |
virtual | simuAccGyro (in obj, in data, in q, in qd, in qdd) |
Abstract function to simulate acceleration and gyroscope signals. | |
function | simuAccGyro (in obj, in variables, in q, in qd, in qdd, in idxSegment, in idxAcc, in idxGyro, in dlocalAll, in plocalAll) |
Function to simulate acceleration and gyroscope signals. | |
function | simuMarker (in obj, in variables, in q, in idxSegment, in plocalAll, in dlocalAll) |
Matlab function to simulates markers placed on 2D model. | |
Static Public Member Functions | |
function | getMexFiles () |
Function to make MEX functions. | |
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) | |
Constant Property | FOOTSOLEOFFSET = 0.0702 |
Double: Distance between foot sole and ankle joint in m. | |
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() | |
Constant Property | HEELDEFAULTOFFSET = 0.06 |
Double: Distance between heel and ankle joint for default body height in m. | |
Property | joints |
Table: Joints. | |
Property | lambda |
Double array: Lambda values (default: [0.01 0.1]) (1x2) | |
Property | mExtraScaleFactor |
Double: Scale factor for extra torques in Nm (default: 100 since we used this in previous simulations. | |
Property | muscles |
Table: Muscles. | |
Property | slope |
Double: Slope of ground in deg (positive is uphill) | |
Constant Property | TOEOFFSET = 0.05 |
Double: Distance between toe and CP toe in m. | |
Property | torques |
Table: Torque actuators. | |
Property | wind_speed |
Double: Wind speed in direction of +X in m/s (default: 0) | |
Protected Member Functions | |
function | getCoM (in obj, in x) |
Function to calculate the center of mass. | |
function | getFootAngle (in obj, in x) |
Function to calculate the angle between foot and ground. | |
function | getRandomParticipant (in obj, in SDmusParam) |
Function to generate a participant with random muscle parameters. | |
function | getSameRandomParticipant (in obj, in SDmusParamVector) |
Function to generate a participant with random muscle parameters. | |
function | initMex (in obj) |
Initialize model mex file. | |
function | initModel (in obj, in varargin) |
Function to initialize model with default parameters. | |
function | readParameter (in obj) |
Function to read parameter matrix into tables. | |
function | scaleParameters (in obj) |
Function to scale the parameters defined in the excelfile. | |
function | update_constraints (in obj) |
Function defining the table Gait2dc.constraints. | |
function | update_controls (in obj) |
Function defining the table Gait2dc.controls. | |
function | update_idxControls (in obj) |
Function defining Model.hidxControls. | |
function | update_idxcxCP (in obj) |
Function defining Gait2dc.idxcxCPleft and Gait2dc.idxcxCPright. | |
function | update_idxForward (in obj) |
Function defining Model.idxForward. | |
function | update_idxForwardAll (in obj) |
Function defining Model.idxForwardAll. | |
function | update_idxParamSections (in obj, in src, in evnt) |
Function performed to update start indices of sections in Gait2dc.parameter. | |
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. | |
function | update_idxSymmetry (in obj) |
Function defining Gait2dc.idxSymmetry. | |
function | update_idxTorqueDof (in obj) |
Function defining Model.idxTorqueDof. | |
function | update_idxUpward (in obj) |
Function defining Model.idxUpward. | |
function | update_mexParameter (in obj, in src, in evnt) |
Function performed to update the Gait2dc.parameter, the mex and the tables. | |
function | update_states (in obj) |
Function defining the table Gait2dc.states. | |
Protected Attributes | |
Property | bodyheight |
Double: Bodyheight in m (default: 1.80) | |
Property | bodymass |
Double: Bodymass in kg (default: 75) | |
Property | constraints |
Table: Information on constraints implemented in the mex and here. | |
Property | controls |
Table: Information on controls of the model. | |
Property | excelfile |
String: Filename of parameter file including path and extension. | |
Property | foot |
Table: Defining size of feet for visualization. | |
Property | idxcxCPleft |
Double array: Indices for x position of left contact points. | |
Property | idxcxCPright |
Double array: Indices for x position of right contact points. | |
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 | idxParamSections |
Double array: Start indices of sections in Gait2dc.parameter. | |
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 | parameter |
Double matrix: Entries of parameter excel file. | |
Property | segments |
Table: Segments (Segment properties should not be changed) | |
Property | speed_left |
Double: Speed of simulated additional Treadmill. | |
Property | speed_right |
Property | states |
Table: Information on states of the model. | |
The class describes the Gait2dc model.
Default constructor setting default Gait2dc object.
Initializes the model and builds and initializes the mex function.
The standard model can be called using:
The excelfile must be in the matlab path.
varargin | Variable length input with:
|
obj | Gait2dc class object |
|
inherited |
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) |
|
inherited |
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) |
|
protected |
Function to calculate the center of mass.
It solves the center of mass (CoM) coordinates from the locations of the individual centers of mass
obj | Model class object |
x | Double vector: joint angles (1xnStates or nStatesx1) |
CoM | Double vector: x, y location of center of mass |
|
inherited |
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 |
Function to compute implicit differential equation for 2D musculoskeletal model.
This function calls the mex file of gait2dc.c: [f, dfdx, dfdxdot, dfdumus, dfdMextra] = gait2dc('Dynamics',x,xdot,umus,Mextra);
with the neural excitation umus and the extra torques Mextra.
The dynamic residuals will be between fmin and fmax when inputs satisfy system dynamics: fmin <= f(x,dx/dt,umus,Mextra) <= fmax
The last four outputs are optional and some computation time is saved if you do not request all of them.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
xdot | Double array: State derivatives (Gait2dc.nStates x 1) |
u | Double array: Controls of the model (Gait2dc.nControls x 1) |
f | Double array: Dynamic residuals (Gait2dc.nConstraints x 1) |
dfdx | (optional) Double matrix: Transpose of Jacobian matrix df/dx (Gait2dc.nStates x Gait2dc.nConstraints) |
dfdxdot | (optional) Double matrix: Transpose of Jacobian matrix df/dxdot (Gait2dc.nStates x Gait2dc.nConstraints) |
dfdu | (optional) Double matrix: Transpose of Jacobian matrix df/du (Gait2dc.nControls x Gait3d.nConstraints) |
Reimplemented from Model.
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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) |
|
inherited |
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) |
|
inherited |
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 |
|
inherited |
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% |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
|
inherited |
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 |
function getFkin | ( | in | obj, |
in | x | ||
) |
Function returns position and orientation of all segments, for the system in position q.
This function can be used to plot the segments or for marker tracking. It calls the mex file of gait2d.c: FK = gait2dc('Fkin', x);
The order is the following for each segment:
px', 'py', 'R11', 'R12', 'R21', 'R22'
p can be obtained by:
R can be obtained by:
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
FK | Double array: position and orientation of all segments. Details see above. (Gait2dc.nSegments * 6) |
dFKdq | (optional) Double matrix: Jacobian of FK with respect to q (Gait2dc.nSegments * 6 x Gait2dc.nDofs) |
dFKdotdq | (optional) Double matrix: Jacobian of dFK/dt with respect to q (Gait2dc.nSegments * 6 x Gait2dc.nDofs) |
|
protected |
Function to calculate the angle between foot and ground.
Function uses gait2dc('Stick', x(:, iTime)) to get the position of the foot segment.
This implementation is only suited for our 2D model containing two contact points per foot (heel and toe)!
obj | Gait2dc class object |
x | Double matrice: State vector of model for n time points (Gait2dc.nStates x n) |
angle_r | Double vector: Angle between right foot and ground in degree. Angles ranges from -180 to 180 deg. (n x 1) |
angle_l | Double vector: Angle between left foot and ground in degree. Angles ranges from -180 to 180 deg. (n x 1) |
|
virtual |
Function returning the ground reaction forces for the system in state x.
This function calls the mex file of gait2dc.c: [grf, dgrfdx] = gait2dc('GRF', x);
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
grf | Double array (12x1) containing:
|
dgrfdx | (optional) Double matrix: Transpose of Jacobian matrix dgrf/dx (Gait2dc.nStates x 12) |
Reimplemented from Model.
|
virtual |
Function returns joint moments, for the system in state x.
This includes passive joint moments and muscle moments and extra moments.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
u | (optional) Double array: Controls of the model which are only needed if you want to apply extra moments (i.e. arm torques) (Gait2dc.nControls x 1) |
M | Double array: Moment for each DOF (Gait2dc.nDofs x 1) |
dMdx | (optional) Double matrix: Transpose of Jacobian matrix dM/dx (Gait2dc.nStates x Gait2dc.nDofs) |
dMdu | (optional) Double matrix: Transpose of Jacobian matrix dM/du (Gait2dc.nControls x Gait2dc.nDofs) |
Reimplemented from Model.
function getLCE | ( | in | obj, |
in | x | ||
) |
Function returns length of contractile element, for the system in state x.
This function simply scales s using lceopt.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
L_CE | Double array: CE length (m) of each muscle (Gait2dc.nMus x 1) |
function getLdotCE | ( | in | obj, |
in | xdot | ||
) |
Function returns length change of contractile element, for the system in state x.
This function simply scales sdot using lceopt.
obj | Gait2dc class object |
xdot | Double array: State derivatives (Gait2dc.nStates x 1) |
Ldot_CE | Double array: CE length change (m/s) of each muscle (Gait2dc.nMus x 1) |
function getLdotMTU | ( | in | obj, |
in | x | ||
) |
Function returns length change of entire muscle-tendon-unit, for the system in state x.
This function does not ensure that the order of muscle moment arms fit to the order of DoFs in qdot in the states. This must be ensured by the user. The order of muscle moment arms is defined in the excel file defining the model.
The same length is also computed in MusclePath() in gait2dc.c.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
Ldot_MTU | Double array: MTU length change (m/s) of each muscle (Gait2dc.nMus x 1) |
function getLdotSEE | ( | in | obj, |
in | x, | ||
in | xdot | ||
) |
Function returns length change of serial elastic element, for the system in state x.
This function computes the length change of the SEE as Ldot_MTU-Ldot_CE.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
xdot | Double array: State derivatives (Gait2dc.nStates x 1) |
Ldot_SEE | Double array: SEE length change (m/s) of each muscle (Gait2dc.nMus x 1) |
function getLMTU | ( | in | obj, |
in | x | ||
) |
Function returns length of entire muscle-tendon-unit, for the system in state x.
This function replicated the computation done in gait2dc.c.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
L_MTU | Double array: MTU length (m) of each muscle (Gait2dc.nMus x 1) |
function getLSEE | ( | in | obj, |
in | x | ||
) |
Function returns length of serial elastic element, for the system in state x.
This function uses the difference of the length of the entire muscle-tendon-unit and of the contracile element.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
L_SEE | Double array: SEE length (m) of each muscle (Gait2dc.nMus x 1) |
|
inherited |
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 |
|
static |
Function to make MEX functions.
Builds the MEX function from Autolev source code, and from gait2dc.c MEX wrapper.
function getMomentArms | ( | in | obj | ) |
Function to extract moment arms matrix from muscle table.
It extract the moment arm matrix which is defined by the model file (excel file) and saved in model.muscles. It is equal to the variable "MA" in gait2dc.c.
It is not ensured whether the order in obj.muscles fit to to the order of the joints.
obj | Gait2dc class object |
momentarms | Double matrix: Muscle moment arms in m (Gait2dc.nMus x Gait2dc.nJoints) |
|
virtual |
Function returning muscle forces of CE for the system in state x.
This function calls the mex file of gait2dc.c: [forces] = gait2dc('MuscleCEforces', x);
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
xdot | Double array: State derivatives (Gait2dc.nStates x 1) |
forcesCE | Double array: Muscle forces of CE (in N) (Gait2dc.nMus x 1) |
dforcesCEdx | Double array: Transpose of Jacobian matrix d force / d x (Gait2dc.nStates x Gait2dc.nMus) |
dforcesCEdxdot | Double array: Transpose of Jacobian matrix d force / d xdot (Gait2dc.nStates x Gait2dc.nMus) |
Reimplemented from Model.
|
virtual |
Function returns power generated by muscle contractile elements, for the system in state x.
xdot must be the state derivatives, such that the muscle balance equations are satisfied. It is up to the user to ensure that the muscle contraction balance f(x,xdot)=0 when this function is used.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
xdot | Double array: State derivatives (Gait2dc.nStates x 1) |
powers | Double array: CE power output (W) of each muscle (Gait2dc.nMus x 1) |
conDynRes | Double array: Contraction dynamics residuals (Gait2dc.nMus x 1) |
Reimplemented from Model.
|
virtual |
Function returning muscle forces for the system in state x.
This function calls the mex file of gait2dc.c: [forces] = gait2dc('Muscleforces', x);
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
forces | Double array: Muscle forces (in N) (Gait2dc.nMus x 1) |
dforcesdx | Double array: Transpose of Jacobian matrix d force / d x (Gait2dc.nStates x Gait2dc.nMus) |
Reimplemented from Model.
function getMusclePower | ( | in | obj, |
in | x | ||
) |
Function returns power generated by entire muscle-tendon-unit, for the system in state x.
This function calls Gait2dc:getLdotMTU() which does not ensure that the order of muscle moment arms fit to the order of DoFs in qdot in the states. This must be ensured by the user. The order of muscle moment arms is defined in the excel file defining the model.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
powers | Double array: MTU power output (W) of each muscle (Gait2dc.nMus x 1) |
function getMuscleSEEpower | ( | in | obj, |
in | x, | ||
in | xdot | ||
) |
Function returns power generated by muscle serial elastic elements, for the system in state x.
xdot must be the state derivatives, such that the muscle balance equations are satisfied. It is up to the user to ensure that the muscle contraction balance f(x,xdot)=0 when this function is used.
obj | Gait2dc class object |
x | Double array: State of the model (Gait2dc.nStates x 1) |
xdot | Double array: State derivatives (Gait2dc.nStates x 1) |
powersSEE | Double array: SEE power output (W) of each muscle (Gait2dc.nMus x 1) |
|
protected |
Function to generate a participant with random muscle parameters.
This function generates a new model object where muscle parameters were independenlty normally distributed around the muscle parameters of obj using the standard deviation SDmusParam. In Dorschky et al., "Optimal control simulation predicts effects of midsole materials on energy cost of running" (2019), we change fmax, lceopt, width, L0, kPEE, umax, vmax, tact, tdeact, gmax, arel, and the moment arms at each joint.
We use the same muscle parameters for right and left muscles (symmetric model). Otherwise it does not make sense to use the symmetry option in the simulation.
To generate this new model, we use the excelfile, bodyheight, and bodymass of obj. Other parameters which were changed in obj will not be copied since we have to create a new model object. If we would not create a new model object, but make a deep copy by inheriting from matlab.mixin.Copyable, this would cause problems with the listener callbacks (They would not be called after changes of the muscle parameters.). => If you find a better solution, please adapt this function.
This function does not shuffle or reset the random number generator (see https://de.mathworks.com/help/matlab/ref/rng.html).
obj | Gait2dc model object |
SDmusParam | Double: Standard deviation (SD) for distribution around default value in % of the default value. |
randModel | Gait2dc model object: New model generated using excelfile, bodyheight and bodymass of obj. Afterwards muscle parameters were changed randomly following a normal distribution. |
|
protected |
Function to generate a participant with random muscle parameters.
This function generates a new model object where muscle parameters were independenlty normally distributed around the muscle parameters of obj using the standard deviation SDmusParam. In Dorschky et al., "Optimal control simulation predicts effects of midsole materials on energy cost of running" (2019), we change fmax, lceopt, width, L0, kPEE, umax, vmax, tact, tdeact, gmax, arel, and the moment arms at each joint.
We use the same muscle parameters for right and left muscles (symmetric model). Otherwise it does not make sense to use the symmetry option in the simulation.
To generate this new model, we use the excelfile, bodyheight, and bodymass of obj. Other parameters which were changed in obj will not be copied since we have to create a new model object. If we would not create a new model object, but make a deep copy by inheriting from matlab.mixin.Copyable, this would cause problems with the listener callbacks (They would not be called after changes of the muscle parameters.). => If you find a better solution, please adapt this function.
This function does not shuffle or reset the random number generator (see https://de.mathworks.com/help/matlab/ref/rng.html).
obj | Gait2dc model object |
SDmusParamVector | Double vector: nParams (or larger) xnMus vector of normalized deviations from the mean. |
randModel | Gait2dc model object: New model generated using excelfile, bodyheight and bodymass of obj. Afterwards muscle parameters were changed randomly following a normal distribution. |
|
protectedvirtual |
Initialize model mex file.
This function calls the mex file of gait2dc.c [info] = gait2dc('Initialize', model)
This initializes the model. This is required before anything is done with the model.
Input: param Matric containing model parameters loaded from the excel file after scaling.
Output: xneutral Model state vector (Gait2dc.nStates x 1) for a neutral state where the model is in free fall with feet not quite touching the ground, but otherwise close to static equilibrium.
obj | Gait2dc class object |
Reimplemented from Model.
|
protectedvirtual |
|
protected |
Function to read parameter matrix into tables.
Function reads the parameters from the matrix Gait2dc.parameter and sets Gait2dc.segments, Gait2dc.joints, Gait2dc.dofs, Gait2dc.muscles and Gait2dc.CPs. If you change sth here, scaleParameters() should be also checked!!! Sets also the default range of Gait2dc.CPs. Gait2dc.bodymass and Gait2dc.bodyheight are set according to the input of the constructor (value in excelfile is ignored).
obj | Gait2dc class object |
|
protected |
Function to scale the parameters defined in the excelfile.
Uses bodymass and height according to Winter 2005. Bodymass and heigt have to be set during object initialization. Changes later changes are not possible. Please create a new object in this case.
obj | Gait2dc class object |
|
inherited |
Function to set body mass, does not influence the.
obj | Model class object |
segmentTable | Double: bodymass |
|
inherited |
Function to set the muscles table.
obj | Model class object |
segmentTable | Table: muscles |
|
inherited |
Function to set segment mass.
obj | Model class object |
segmentName | String: Name of the segment |
segmentMass | Double: Mass of the segment in kg |
|
inherited |
Function to set segment Table.
obj | Model class object |
segmentTable | Table: segmentTable |
function setTreadmillSpeed | ( | in | obj, |
in | speed | ||
) |
Function to set the speed of the ground, to model a treadmill.
This function allows you to model a treadmill. It can handle two types of inputs. If it is a double, the value will be set as the treadmill speed. If it is a struct, a split-belt treadmill can be modelled
obj | Gait2d_osim class object |
speed | Double or Struct: Treadmill speed in m/s. If it is a double, the value is used for the left and right belt. If is is a struct, speed.left and speed.right are used for the left and right belt, respectively. |
function showMarker | ( | in | obj, |
in | x, | ||
in | markerTable, | ||
in | measuredMean | ||
) |
Function to plot marker positions.
The motion in x and the matrix measured have to fit to each other. If you want to plot for example only a single node, markerTable.mean must be only the data of this single node.
You can use the function like this:
obj | Gait2dc class object |
x | Double matrix: State vector of model for n time points (Gait2dc.nStates x n) |
markerTable | Table: Variables table specifying markers with at least the columns: type, name, segment, position, direction to call Gait2dc.simuMarker. |
measuredMean | (optional) Double matrix: Measured marker data in meter(!) which will be plotted as reference. The matrix must have the same number of time points as the state vector x. Further, the matrix columns must correspond to the rows of the markerTable in the same order to be able to match coordinates of the markers. (n x height(markerTable)) (default: empty) |
|
virtualinherited |
Abstract function to show model as stick figure.
function showStick | ( | in | obj, |
in | x, | ||
in | range, | ||
in | plotFeet, | ||
in | plotGRF, | ||
in | plotCPs, | ||
in | plotJointCOSYs | ||
) |
Function to show model as stick figure.
obj | Gait2dc class object |
x | Double matrice: State vector of model for n time points (Gait2dc.nStates x n) |
range | (optional) Double matrice: Defining the range of the figure with [xmin, xmax; ymin, ymax]. (2 x 2) (default: [pelvisX-1, pelvisX+1; -0.2, 2]) |
plotFeet | (optional) Bool: If true, the undeformed feet are plotted independently from the CPs (default: 0) |
plotGRF | (optional) Bool: If true, it plots arrows for the GRFs (default: 0) |
plotCPs | (optional) Bool: If true, it plots spheres for the CPs (default: 0) |
plotJointCOSYs | (optional) Bool: If true, it plots the coordinate systems of the joints (default: 0) |
function showTreadmill | ( | in | obj, |
in | x_points, | ||
in | y_points, | ||
in | xrange, | ||
in | yrange, | ||
in | durTrial, | ||
in | nFrames | ||
) |
Function to visualize treadmill as moving scatter plot.
obj | Gait2dc class object |
xpoints | Double matrix: Defining the x - positions of scatter plot in current frame representing the treadmill |
ypoints | Double matrix: Defining the y - positions of scatter plot in current frame representing the treadmill |
xrange | Double matrix: Defining the range of the figure with [xmin, xmax]. (2 x 1) |
yrange | Double matrix: Defining the range of the figure with [ymin, ymax]. (2 x 1) |
durTrial | Double: duration of gait cycle |
nFrames | Integer: number of Nodes |
x_points | Double matrix: Updated x_points accrording to treadmill speed |
y_points | Double matrix: Updated y_points accrording to treadmill speed |
|
virtualinherited |
Abstract function to simulate acceleration and gyroscope signals.
function simuAccGyro | ( | in | obj, |
in | variables, | ||
in | q, | ||
in | qd, | ||
in | qdd, | ||
in | idxSegment, | ||
in | idxAcc, | ||
in | idxGyro, | ||
in | dlocalAll, | ||
in | plocalAll | ||
) |
Function to simulate acceleration and gyroscope signals.
Do not change "obj" or "variables" in this function! This will allow Matlab to "pass by reference" and avoid function call overhead.
Position has to given as X and Y position of sensor in segment coordinate system in m.
Direction has to be given in axis definition, e.g [1, 0, 0].
obj | Gait2dc class object |
variables | Table: Variable table containing the accelerometer and gyroscope data with at least the columns: type, name, segment, position, direction |
q | Generalized coordinates (Gait2dc.nDofs x 1) |
qd | First derivatives of generalized coordinates (Gait2dc.nDofs x 1) |
qdd | Second derivatives of generalized coordinates (Gait2dc.nDofs x 1) (use NaN to skip) |
idxSegment | (optional) Double array: Indices of segments fitting to respective IMU (variables.nVars.all x 1) => It is faster to pass them than to recalculate each time. |
idxAcc | (optional) Double array: Indices in variables that have type 'acc' (nAcc x 1) => It is faster to pass them than to recalculate each time. |
idxGyro | (optional) Double array: Indices in variables that have type 'gyro' (nGyro x 1) => It is faster to pass them than to recalculate each time. |
dlocalAll | (optional) Double matrix: Local direction of the IMU saved in variables (variables.nVars.all x 3) => It is faster to pass them than to extract them each time. |
plocalAll | (optional) Double matrix: Local position of the IMU saved in variables (variables.nVars.all x 3) => It is faster to pass them than to extract them each time. |
s | Simulated sensor signals (data.nVars.all x 1) |
ds_dq | Sparse Jacobian ds/dq (data.nVars.all x Gait2dc.nDofs) |
ds_dqd | Sparse Jacobian ds/dqd (data.nVars.all x Gait2dc.nDofs) |
ds_dqdd | Sparse Jacobian ds/dqdd (data.nVars.all x Gait2dc.nDofs) |
function simuMarker | ( | in | obj, |
in | variables, | ||
in | q, | ||
in | idxSegment, | ||
in | plocalAll, | ||
in | dlocalAll | ||
) |
Matlab function to simulates markers placed on 2D model.
Do not change "obj" or "variables" in this function! This will allow Matlab to "pass by reference" and avoid function call overhead.
Position has to given as X, Y (and Z) position of marker in segment coordinate system in m. Direction has to be given in axis definition, e.g [1, 0, 0]. For position and direction, we will use only the first two entries for the 2D model.
obj | Gait2dc class object |
variables | Table: Variable table containing the marker data with at least the columns: type, name, segment, position, direction |
q | Double array: Generalized coordinates (Gait2dc.nDofs x 1) |
idxSegment | (optional) Double array: Indices of segments fitting to respective markers (variables.nVars.all x 1) => It is faster to pass them than to recalculate each time. |
plocalAll | (optional) Double matrix: Local position of the markers saved in variables (variables.nVars.all x 2(or3)) => It is faster to pass them than to extract them each time. |
dlocalAll | (optional) Double matrix: Local direction of the markers saved in variables (variables.nVars.all x 2(or3)) => It is faster to pass them than to extract them each time. |
m | Simulated marker signals in meter (variables.nVars.all x 1) |
dm_dq | Sparse Jacobian dm/dq (variables.nVars.all x Gait2dc.nDofs) |
|
protectedvirtual |
Function defining the table Gait2dc.constraints.
Table lists type, name, equation (string), fmin and fmax
The constraints are composed of Gait2dc.nConstraints = 2* Gait2dc.nDofs + 2* Gait2dc.nMus + 4* Gait2dc.nCPs
obj | Gait2dc class object |
Reimplemented from Model.
|
protectedvirtual |
Function defining the table Gait2dc.controls.
Table lists type, name, xmin, xmax and xneutral
obj | Gait2dc class object |
Reimplemented from Model.
|
protectedinherited |
Function defining Model.hidxControls.
obj | Model class object |
|
protected |
Function defining Gait2dc.idxcxCPleft and Gait2dc.idxcxCPright.
obj | Gait2dc class object |
|
protectedinherited |
Function defining Model.idxForward.
Provides the indices of state variables that have forward translation. States have to be updated before!
obj | Model class object |
|
protectedinherited |
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 performed to update start indices of sections in Gait2dc.parameter.
obj | Gait2dc class object |
src | (optional) meta.property: Object describing the source of the event |
evnt | (optional) event.Propertyevent: Object describing the event |
|
protectedinherited |
Function defining Model.idxSideward.
Provides the indices of state variables that have sideward translation. States have to be updated before!
obj | Model class object |
|
protectedinherited |
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 |
|
protectedinherited |
Function defining Model.hidxStates.
obj | Model class object |
|
protectedvirtual |
|
protectedinherited |
Function defining Model.idxTorqueDof.
Searches for indices of dof which have torque actuators in Model.torques.
obj | Model class object |
|
protectedinherited |
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 |
Function performed to update the Gait2dc.parameter, the mex and the tables.
obj | Gait2dc class object |
src | meta.property: Object describing the source of the event |
evnt | (optional) event.Propertyevent: Object describing the event |
Reimplemented from Model.
|
protectedvirtual |
Function defining the table Gait2dc.states.
Table lists type, name, xmin, xmax and xneutral
obj | Gait2dc class object |
Reimplemented from Model.
|
protected |
Double: Bodyheight in m (default: 1.80)
|
protected |
Double: Bodymass in kg (default: 75)
|
protectedinherited |
Table: Information on constraints implemented in the mex and here.
|
protectedinherited |
Table: Information on controls of the model.
|
inherited |
Table: Contact points.
|
inherited |
Table: Degrees of freedom (Range of Dofs should not be changed here.
Set the bounds of the Problem instead.)
|
inherited |
Double: Air drag coefficient in N/(m/s)^2 (default: 0.2128)
|
protected |
String: Filename of parameter file including path and extension.
|
protected |
Table: Defining size of feet for visualization.
The x and y coordinates are defined relative to the ankle joint in m. The length of the foot is equal to the length of the foot segment defined in the table Gait2dc.segments. The size of the foot does not influence the ground contact.
Constant Property FOOTSOLEOFFSET = 0.0702 |
Double: Distance between foot sole and ankle joint in m.
|
inherited |
Double array: Gravity vector in m/(s^2)
|
inherited |
Cell array with string: Gives the names for the GRF vector returned by getGRF()
Constant Property HEELDEFAULTOFFSET = 0.06 |
Double: Distance between heel and ankle joint for default body height in m.
|
protected |
Double array: Indices for x position of left contact points.
|
protected |
Double array: Indices for x position of right contact points.
|
protectedinherited |
Double array: Indices for forward translation.
|
protectedinherited |
Double array: Indices for forward translation, speed, position of contact points and force at contact points.
|
protected |
Double array: Start indices of sections in Gait2dc.parameter.
|
protectedinherited |
Double array: Indices for sideward translation.
|
protectedinherited |
Double array: Indices for sideward translation, speed, position of contact points and force at contact points.
|
protectedinherited |
Struct: Double arrays with indices for symmetry to map right to left.
|
protectedinherited |
Double array: Indices of dofs of torque actuators.
|
protectedinherited |
Double array: Indices for upward translation.
|
protectedinherited |
Double: Showing if the mex model is initialized.
|
inherited |
Table: Joints.
Property lambda |
Double array: Lambda values (default: [0.01 0.1]) (1x2)
|
inherited |
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)!)
|
inherited |
Table: Muscles.
|
protectedinherited |
Double: Number of constraints (height of Model.constraints)
|
protectedinherited |
Double: Number of controls (height of Model.controls)
|
protectedinherited |
Double: Number of contact points (height of Model.CPs)
|
protectedinherited |
Double: Number of degree of freedoms (height of Model.dofs)
|
protectedinherited |
Double: Number of joints (height of Model.joints)
|
protectedinherited |
Double: Number of muscles (height of Model.muscles)
|
protectedinherited |
Double: Number of segments (height of Model.segments)
|
protectedinherited |
Double: Number of states (height of Model.states)
|
protectedinherited |
Double: Number of torque actuators (height of Model.torques)
|
protected |
Double matrix: Entries of parameter excel file.
It is linked to Gait2dc.bodyheight, Gait2dc.bodymass, Gait2dc.gravity, Gait2dc.drag_coefficient, Gait2dc.wind_speed, Gait2dc.slope, Gait2dc.dofs, Gait2dc.segments, Gait2dc.joints, Gait2dc.muscles and Gait2dc.CPs.
|
protectedinherited |
Table: Segments (Segment properties should not be changed)
Property slope |
Double: Slope of ground in deg (positive is uphill)
|
protected |
Double: Speed of simulated additional Treadmill.
|
protected |
|
protectedinherited |
Table: Information on states of the model.
Constant Property TOEOFFSET = 0.05 |
Double: Distance between toe and CP toe in m.
|
inherited |
Table: Torque actuators.
|
inherited |
Double: Wind speed in direction of +X in m/s (default: 0)