interp_expdecay

interp_expdecay(prev_data: Tensor, next_data: Tensor, sample_at: Tensor, step_time: float, *, time_constant: float, **kwargs) Tensor[source]

Interpolates by exponentially decaying value from previous state, parameterized by a time constant.

\[D(t_s) = D(0) \exp\left(-\frac{t_s}{\tau}\right)\]
Parameters:
  • prev_data (torch.Tensor) – most recent observation prior to sample time, \(D(t=0)\).

  • next_data (torch.Tensor) – most recent observation subsequent to sample time, \(D(t=\Delta t)\).

  • sample_at (torch.Tensor) – relative time at which to sample data, \(t_s\).

  • step_time (float) – length of time between the prior and subsequent observations, \(\Delta t\).

  • time_constant (float) – time constant of exponential decay, \(\tau\).

Returns:

interpolated data at sample time, \(D(t=t_s)\).

Return type:

torch.Tensor