KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
models.motorunit.SHSystem Class Reference

SHSystem: The global dynamical system used within the Shorten motorunit model. More...

Detailed Description

SHSystem: The global dynamical system used within the Shorten motorunit model.

Author
Daniel Wirtz
Date
2014-01-16
New in 0.7:
(Daniel Wirtz, 2014-01-16) Added this class.

This class is part of the framework

KerMor - Model Order Reduction using Kernels

Definition at line 19 of file SHSystem.m.

Public Member Functions

 SHSystem (models.BaseFullModel model)
 Call superclass constructor. More...
 
function  prepareSimulation (colvec< double > mu,integer inputidx)
 Limits the mean input current to a maximum value depending on the fibre type, so that the frequency of 60Hz is not exceeded. More...
 
function  setConfig (colvec< double > mu,integer inputidx)
 Sets the configuration for the upcoming simulation of the model. More...
 
function status = singlePeakModeOutputFcn (unused1,matrix< double > y, flag)
 
- Public Member Functions inherited from models.BaseFirstOrderSystem
 BaseFirstOrderSystem (models.BaseFullModel model)
 Creates a new base dynamical system class instance. More...
 
function rsys = getReducedSystemInstance (models.ReducedModel rmodel)
 Creates a reduced system given the current system and the reduced model. More...
 
function  setConfig (mu, inputidx)
 Sets the dynamical system's configuration. More...
 
function  prepareSimulation (colvec< double > mu,integer inputidx)
 
function dx = ODEFun (double t,colvec< double > x)
 Debug variant for single evaluation. Commented in function above. More...
 
function y = computeOutput (matrix< double > x,colvec< double > mu)
 Computes the output \(y(t) = C(t,\mu)Sx(t)\) from a given state result vector \(x(t)\), using the system's time and current mu (if given). More...
 
function  updateSparsityPattern ()
 
function J = getJacobian (double t, xc)
 Computes the global jacobian of the current system. More...
 
function matrix
< double > x0
getX0 (rowvec< double > mu)
 Gets the initial state variable at \(t=0\). More...
 
function MgetMassMatrix ()
 For first order systems, only algebraic constraints need to be catered for. More...
 
function ModelParam p = addParam (char name, default, varargin)
 Adds a parameter with the given values to the parameter collection of the current dynamical system. More...
 
function pidx = getParamIndexFromName (paramname)
 Gets the index within the parameter vector \(\mu\) for a given parameter name. More...
 
function pt = getParamInfo (colvec< double > mu)
 
function  plotInputs (pm)
 
- Public Member Functions inherited from KerMorObject
 KerMorObject ()
 Constructs a new KerMor object. More...
 
function  display ()
 disp(object2str(this)); More...
 
function bool = eq (B)
 Checks equality of two KerMor objects. More...
 
function bool = ne (B)
 Checks if two KerMorObjects are different. More...
 
function cn = getClassName ()
 Returns the simple class name of this object without packages. More...
 
- Public Member Functions inherited from DPCMObject
 DPCMObject ()
 Creates a new DPCM object. More...
 
 DPCMObject ()
 

Public Attributes

 d = "[]"
 debug output More...
 
 noiseGen
 The NoiseGenerator to obtain the inputs u(t) More...
 
 upperlimit_poly
 The upper limit polynomial for maximum mean current dependent on the fibre type. More...
 
- Public Attributes inherited from models.BaseFirstOrderSystem
dscomponents.ACoreFun f
 The core f function from the dynamical system. More...
 
dscomponents.LinearCoreFun A = "[]"
 Represents a linear or affine-linear component of the dynamical system. More...
 
dscomponents.AInputConv B = "[]"
 The input conversion. More...
 
dscomponents.LinearOutputConv C
 The output conversion Defaults to an LinearOutputConv instance using a 1-matrix, which just forwards the state variables and supports projection. More...
 
dscomponents.AInitialValue x0 = "[]"
 Function handle to initial state evaluation. More...
 
dscomponents.AMassMatrix M = "[]"
 The system's mass matrix. More...
 
dscomponents.ACoreFun g = "[]"
 The system's algebraic constraints function. More...
 
 Inputs = {""}
 The system's possible input functions. A cell array of function handles, each taking a time argument t. More...
 
 Params = data.ModelParam.empty
 The parameters usable for the dynamical system. More...
 
integer DependentParamIndices = -1
 Indices of the parameter vector that are effectively used in the system's core function. More...
 
double MaxTimestep = "[]"
 The maximum timestep allowed for any ODE solvers. More...
 
colvec StateScaling = 1
 The scaling for the state vectors. More...
 
 SparsityPattern
 The global sparsity pattern for the entire RHS. More...
 
 mu = "[]"
 The current parameter \(\mu\) for simulations, [] is none used. More...
 
 u = "[]"
 The current input function \(u(t)\) as function handle, [] if none used. More...
 
 inputidx = "[]"
 The current inputindex of the function \(u(t)\). More...
 
 NumStateDofs = "[]"
 
 NumAlgebraicDofs = 0
 
 NumTotalDofs = "[]"
 
 InputCount
 The number of inputs available. More...
 
 ParamCount
 The number of the system's parameters. More...
 
 Model
 The Model this System is attached to. More...
 
- Public Attributes inherited from DPCMObject
 WorkspaceVariableName = ""
 The workspace variable name of this class. Optional. More...
 
 ID = "[]"
 An ID that allows to uniquely identify this DPCMObject (at least within the current MatLab session/context). More...
 
 PropertiesChanged = "[]"
 The Dictionary containing all the property settings as key/value pairs. More...
 
- Public Attributes inherited from handle
 addlistener
 Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More...
 
 notify
 Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More...
 
 delete
 Handle object destructor method that is called when the object's lifecycle ends. More...
 
 disp
 Handle object disp method which is called by the display method. See the MATLAB disp function. More...
 
 display
 Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More...
 
 findobj
 Finds objects matching the specified conditions from the input array of handle objects. More...
 
 findprop
 Returns a meta.property objects associated with the specified property name. More...
 
 fields
 Returns a cell array of string containing the names of public properties. More...
 
 fieldnames
 Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More...
 
 isvalid
 Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More...
 
 eq
 Relational functions example. See details for more information. More...
 
 transpose
 Transposes the elements of the handle object array. More...
 
 permute
 Rearranges the dimensions of the handle object array. See the MATLAB permute function. More...
 
 reshape
 hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More...
 
 sort
 ort the handle objects in any array in ascending or descending order. More...
 

Static Public Attributes

static const  dm = 6
 Dimension of motoneuron part. More...
 
static const  dsa = 56
 Dimension of single sarcomer cell part. More...
 
static const ::double C_m_slow = 0.58
 Membrane capacitance. Different values for different fibre types, due to different action potential propagation speeds C_m is computed parameter-dependent. These constants are for both slow and fast muscle models and are also used in the first entry of the sarcomere constants computed in models.muscle.FibreDynamics.initSarcoConst. More...
 
static const  C_m_fast = 1
 
static const ::rowvec< doubleForceOutputScalingPolyCoeff = 1e5*"[0.072141692014344 -0.456658053996476 1.274105896595146 -2.041231359447655 2.058191740934228 -1.353159489096666 0.584711952400098 -0.164458365881107 0.029358733675881 -0.003174883073694 0.000165817182406 0.000048348565452 0.000012193246968]"
 Coefficients of the polynomial used for force output scaling. More...
 

Additional Inherited Members

- Protected Member Functions inherited from models.BaseFirstOrderSystem
function  updateDimensions ()
 
function ad_ic = getAlgebraicDofsInitialConditions ()
 The default is to return all zeros. More...
 
function  validateModel (models.BaseFullModel model)
 Validates if the model to be set is a valid BaseModel at least. Extracting this function out of the setter enables subclasses to further restrict the objects that may be passed, as is being done in models.ReducedSystem, for example. More...
 
- Protected Member Functions inherited from KerMorObject
function  checkType (obj, type)
 Object typechecker. More...
 
- Protected Member Functions inherited from DPCMObject
function  registerProps (varargin)
 Call this method at any class that defines DPCM observed properties. More...
 
function  registerProps (varargin)
 
- Static Protected Member Functions inherited from DPCMObject
static function obj = loadobj (obj, from)
 Re-register any registered change listeners! More...
 
static function obj = loadobj (obj, from)
 

Constructor & Destructor Documentation

Member Function Documentation

function models.motorunit.SHSystem.prepareSimulation ( colvec< double mu,
integer  inputidx 
)

Limits the mean input current to a maximum value depending on the fibre type, so that the frequency of 60Hz is not exceeded.

See Also
models.motoneuron.ParamDomainDetection upperlimit_poly
Parameters
muThe currently used parameter \(\vmu\). Set to \([]\) if not used.
inputidxThe index \(i\) of the currently used input function \(u_i(t)\). Set to \([]\) if not used.

Definition at line 200 of file SHSystem.m.

References models.BaseFirstOrderSystem.mu, polyval(), and upperlimit_poly.

Here is the call graph for this function:

function models.motorunit.SHSystem.setConfig ( colvec< double mu,
integer  inputidx 
)

Sets the configuration for the upcoming simulation of the model.

Parameters
muThe currently used parameter \(\vmu\). Set to \([]\) if not used.
inputidxThe index \(i\) of the currently used input function \(u_i(t)\). Set to \([]\) if not used.

Definition at line 220 of file SHSystem.m.

References models.BaseFirstOrderSystem.MaxTimestep, models.BaseFirstOrderSystem.Model, models.BaseFirstOrderSystem.mu, and noiseGen.

function status = models.motorunit.SHSystem.singlePeakModeOutputFcn (   unused1,
matrix< double y,
  flag 
)

Definition at line 239 of file SHSystem.m.

References dm, and models.BaseFirstOrderSystem.f.

Member Data Documentation

const models.motorunit.SHSystem.C_m_fast = 1
static

Definition at line 85 of file SHSystem.m.

models.motorunit.SHSystem.C_m_slow = 0.58
static

Membrane capacitance. Different values for different fibre types, due to different action potential propagation speeds C_m is computed parameter-dependent. These constants are for both slow and fast muscle models and are also used in the first entry of the sarcomere constants computed in models.muscle.FibreDynamics.initSarcoConst.


Default: 0.58

Definition at line 72 of file SHSystem.m.

models.motorunit.SHSystem.d = "[]"

debug output

Note
This property has the MATLAB attribute Transient set to true.
Matlab documentation of property attributes.
Default: "[]"

Definition at line 40 of file SHSystem.m.

models.motorunit.SHSystem.dm = 6
static

Dimension of motoneuron part.


Default: 6

Definition at line 54 of file SHSystem.m.

Referenced by SHSystem(), and singlePeakModeOutputFcn().

models.motorunit.SHSystem.dsa = 56
static

Dimension of single sarcomer cell part.


Default: 56

Definition at line 63 of file SHSystem.m.

Referenced by SHSystem().

models.motorunit.SHSystem.ForceOutputScalingPolyCoeff = 1e5*"[0.072141692014344 -0.456658053996476 1.274105896595146 -2.041231359447655 2.058191740934228 -1.353159489096666 0.584711952400098 -0.164458365881107 0.029358733675881 -0.003174883073694 0.000165817182406 0.000048348565452 0.000012193246968]"
static

Coefficients of the polynomial used for force output scaling.

The scaling is applied to the resulting forces, so that the force generated on a single peak is the same for every fibre type.

Old version with original initial values and 1000ms simulation

time
ForceOutputScalingPolyCoeff = 1e5*[0.142559788512870 -1.052260908967481 3.446953882000253 -6.597894914676725 8.180848326826332 -6.875124492949854 3.967796548608296 -1.549518903381187 0.388781656140931 -0.054972337733183 0.002625376146421 0.000246831617001 0.000019186970434];
See Also
models.motorunit.experiments.SarcoScaling


Default: 1e5*"[0.072141692014344 -0.456658053996476 1.274105896595146 -2.041231359447655 2.058191740934228 -1.353159489096666 0.584711952400098 -0.164458365881107 0.029358733675881 -0.003174883073694 0.000165817182406 0.000048348565452 0.000012193246968]"

Definition at line 88 of file SHSystem.m.

models.motorunit.SHSystem.noiseGen

The NoiseGenerator to obtain the inputs u(t)

Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 110 of file SHSystem.m.

Referenced by setConfig(), and SHSystem().

models.motorunit.SHSystem.upperlimit_poly

The upper limit polynomial for maximum mean current dependent on the fibre type.

This polynomial has been computed using the models.motoneuron.Model (which is also included here, but has been established as single model for speed and exemplatory purposes), where the fibre type and mean activation current along the 60Hz-contour have been used to fit a polynomial that yields the maximum mean input current for any fibre type.

See Also
models.motoneuron.Model.FibreTypeDepMaxMeanCurrent models.motoneuron.experiments.ParamDomainDetection
Note
This property has non-standard access specifiers: SetAccess = Private, GetAccess = Public
Matlab documentation of property attributes.

Definition at line 123 of file SHSystem.m.

Referenced by prepareSimulation(), and SHSystem().


The documentation for this class was generated from the following file: