fgen_get_activation: Get Force Generator Activation Level

Description Usage Arguments Value Examples

View source: R/fgen.R

Description

Due to the Force Generator Force-Time characteristic, it takes time to activate the Force Generator. fgen_get_activation is a function that represents the activation level at current_time

Usage

1
2
3
4
5
fgen_get_activation(
  current_time,
  initial_activation = 0,
  time_to_max_activation = 0.3
)

Arguments

current_time

Numeric vector

initial_activation

Numeric vector between 0 and 1. Default is 0

time_to_max_activation

Numeric vector. Time it takes to reach maximal activation from 0. Default is 0.3s.

Value

Numeric vector. Activation level at current_time

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
x <- seq(0, 1, length.out = 1000)

y1 <- fgen_get_activation(
  current_time = x,
  initial_activation = 0,
  time_to_max_activation = 0.5
)

plot(x, y1, "l")

y2 <- fgen_get_activation(
  current_time = x,
  initial_activation = 0.2,
  time_to_max_activation = 0.5
)

lines(x, y2, col = "red")

y3 <- fgen_get_activation(
  current_time = x,
  initial_activation = 0,
  time_to_max_activation = 0.4
)

lines(x, y3, col = "blue")

mladenjovanovic/vjsim documentation built on Aug. 7, 2020, 10:10 p.m.