1
$\begingroup$

Double exponential smoothing a.k.a. Holt-Winters smoothing tracks level and trend of a time series in coupled IIRs:
$\qquad$ In: $Y_t$, t = 0 1 2 ...
$\qquad$ State: $L_t, T_t \quad$ -- level and trend
$\qquad$ Out: estimate $\hat{Y}_{t+1}$
$\qquad$ Parameters: a, b (a.k.a. $\alpha, \beta$)
$\qquad$ Step equations:
$\qquad$ $\qquad L_t = a Y_t + (1 - a) (L_{t-1} + T_{t-1}) \quad$ -- level
$\qquad$ $\qquad T_t = b (L_t - L_{t-1}) + (1 - b) T_{t-1} \quad$ -- trend
$\qquad$ $\qquad \hat{Y}_{t+1} = L_t + T_t$

How can I calculate the transfer function of this smoother, for given $a$ and $b$ ?

(Two possible approaches:

  • manipulate the step equations into ratio-of-polynomials form
  • brute force iterate with input $e^{2 \pi i f t}$: converges slowly for small $a, b$.

The first of these is beyond me, the second unsatisfactory.)

$\endgroup$
1
$\begingroup$

I would use the $\mathcal{Z}$-transform. Let me change the notation slightly by using $n$ as the discrete time index, lower case letters for time domain quantities, $x[n]$ as the observed input data sequence, and $y[n]$ as the output sequence, which is an estimate of $x[n+1]$. With this notation, the time domain equations are

$$\tag{1}\begin{align} l[n]&=ax[n]+(1-a)(l[n-1]+t[n-1])\\ t[n]&=b(l[n]-l[n-1])+(1-b)t[n-1]\\ y[n]&=l[n]+t[n] \end{align}$$

Taking the $\mathcal{Z}$-transform of these 3 equations gives

$$\begin{align}\tag{2} L(z)&=aX(z)+(1-a)z^{-1}(L(z)+T(z))\\ T(z)&=b(1-z^{-1})L(z)+(1-b)z^{-1}T(z)\\ Y(z)&=L(z)+T(z) \end{align}$$

From the second equation in (2) we can express $T(z)$ in terms of $L(z)$:

$$T(z)=\frac{b(1-z^{-1})}{1-(1-b)z^{-1}}L(z)\tag{3}$$

Plugging (3) into the first equation of (2), we can express $L(z)$ in terms of $X(z)$:

$$L(z)\left[1-(1-a)z^{-1}\left(1+\frac{b(1-z^{-1})}{1-(1-b)z^{-1}}\right)\right]=aX(z)$$

from which, after some algebra, you get

$$L(z)=\frac{a\left[1-(1-b)z^{-1}\right]}{1+[a(1+b)-2]z^{-1}+(1-a)z^{-2}}X(z)\tag{4}$$

Finally, plugging (3) into the last equation of (2) gives

$$Y(z)=\left[1+\frac{b(1-z^{-1})}{1-(1-b)z^{-1}}\right]L(z)=\frac{1+b-z^{-1}}{1-(1-b)z^{-1}}L(z)$$

and combining with (4) results in a relation between the output $Y(z)$ and the input $X(z)$:

$$Y(z)=\frac{a(1+b-z^{-1})}{1+[a(1+b)-2]z^{-1}+(1-a)z^{-2}}X(z)=H(z)X(z)\tag{5}$$

where $H(z)$ is the desired transfer function, which is of course a second order IIR filter.

$\endgroup$
  • $\begingroup$ Thanks ! Fwiw, an example using your answer in Python / numpy / scipy.signal is under gist.github.com/denis-bz . $\endgroup$ – denis Apr 8 '15 at 15:02
  • $\begingroup$ @denis: OK, great, hope it works as expected. $\endgroup$ – Matt L. Apr 8 '15 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.