sample_MU_contribs: Calculate the EMG and force contributions of a MU at the next...

View source: R/simulate_model.r

sample_MU_contribsR Documentation

Calculate the EMG and force contributions of a MU at the next sample.

Description

Take the previous simulation history into account; determine whether the MU has fired between the last and this sample, and determine the EMG and force contributions that this MU does in this measurement sample.

Usage

sample_MU_contribs(
  MU_obj,
  sim_state,
  force,
  excitation,
  rate_function,
  firing_response_fftvals,
  sampling
)

Arguments

MU_obj

A motor unit object containing information on force twitch characteristics.

sim_state

A list containing elements 'time_since_last_firing', 'Z_score', 'contribs' and 'future_contribs'. Describes the current state of the simulation of this MU, i.e., summarizes the simulation history.

rate_function

The rate coding function of this MU.

firing_response_fftvals

A list of num_electrodes vectors containing firing response fft values. The index of each vector indicates the corresponding electrode ID.

sampling

An object providing information on the sampling parameters chosen. Usually constructed by the function create_sampling.

load_val

Current value of the muscle load function; describes muscle activation.

Details

Examines the time since the last firing event, the current load value, the firing rate relationship of this MU and inter-spike variability to determine whether the MU has fired since the last measurement sample. Then, takes previous firing events and - if applicable - the current firing event into account to calculate the contributions of this MU to overall EMG and force measurements in this measurement sample.

Value

An updated 'sim_state' of this MU.


ime-luebeck/semgsim documentation built on April 14, 2022, 11:02 p.m.