movement_primitives.dmp.phase#

movement_primitives.dmp.phase(t, alpha, goal_t, start_t)#

Map time to phase.

According to [1], the differential Equation

\[\tau \dot{z} = -\alpha_z z\]

describes the evolution of the phase variable z. Starting from the initial position \(z_0 = 1\), the phase value converges monotonically to 0. Instead of using an iterative procedure to calculate the current value of z, it is computed directly through

\[z(t) = \exp - \frac{\alpha_z}{\tau} t\]
Parameters:
tfloat

Current time.

alphafloat

Value of the alpha parameter of the canonical system.

goal_tfloat

Time at which the execution should be done.

start_tfloat

Time at which the execution should start.

Returns:
zfloat

Value of phase variable.

References

[1]

Ijspeert, A. J., Nakanishi, J., Hoffmann, H., Pastor, P., Schaal, S. (2013). Dynamical Movement Primitives: Learning Attractor Models for Motor Behaviors. Neural Computation 25 (2), 328-373. DOI: 10.1162/NECO_a_00393, https://homes.cs.washington.edu/~todorov/courses/amath579/reading/DynamicPrimitives.pdf