# Exponential averaging with 2 time constants

Printable View

• May 31st 2012, 12:07 PM
Golan
Exponential averaging with 2 time constants
Hello,

let $\displaystyle f(t) = \sin^2(a \cdot t)$ with $\displaystyle a > 0$ some constant.

How do I calculate $\displaystyle x(t) = \int_{-\infty}^{t} f(t') e^{-\frac{t-t'}{\tau(t')}} \text{d}t'$ where $\displaystyle \tau(t) = \begin{cases} \tau_0, & f(t) \ge x(t)\\ \tau_1, & \text{else} \end{cases}$ with $\displaystyle \tau_0 \ge 0$ and $\displaystyle \tau_1 \ge 0$ constant? I am particularly interested in $\displaystyle \lim_{t \to \infty} \{ \max x(t) \}$ and in the respective minimum.

In words, we are exponentially averaging a function $\displaystyle f(t)$ with different smoothing constants for increasing and decreasing function values relative to the smoothing result. E.g., whenever $\displaystyle f(t_0) \ge x(t_0)$ for some $\displaystyle t_0$, the function is considered rising and the smoothing constant $\displaystyle \tau(t_0) = \tau_0$ is used.

Thank you for any hint.