386

The ¬lter with weights

A AA ±1

1-A 4A(1-A) 2 for k = 0

ak = for k = 1

1 (17.46)

4

0.8

0 for k ≥ 2

is named the ˜(1-2-1)-¬lter™ since two units are

0.4

given to the central weight whereas only one unit is

given to each of the two outer weights. This ¬lter

may be seen as an ˜integrator™ since the integral

0.0 2

0 f (t) dt can be approximated as

0.0 0.1 0.2 0.3 0.4 0.5

1 f (0) + f (1) f (1) + f (2)

2

f (t) dt ≈ +

2 2 2

0

1.0

= a1 f (0) + a0 f (1) + a1 f (2).

K=2

K=3 The response function, shown in Figure 17.13a,

0.6

K=7 decreases smoothly from 1 at ω = 0 to zero at

ω = 1/2. The ˜half-power™ point at which the

spectral density of the output is half of that of the

0.2

input (i.e., |c(ω)|2 = 1/2) occurs at ω ≈ 0.18.

The running mean ¬lters, such as (17.39), have

-0.2

weights

0.0 0.1 0.2 0.3 0.4 0.5 for k ¤ K

1

2K +1

ak = (17.47)

for k > K .

0

Figure 17.13: Response functions of a number of The response functions for the three running mean

simple ¬lters. The abscissa is the frequency ω ∈ ¬lters with K = 2, 3, and 7 are shown in

[0, 1/2]. Figure 17.13b. Note that the frequency response

a) The plain low-pass (1-2-1)-¬lter A, the squared functions have strong side lobes and zeros at

(1-2-1)-¬lter A · A, the high-pass ˜1-(1-2-1)™-¬lter frequencies 2Kj+1 , j = 1, . . . , K . The running

1 ’ A and the band-pass ¬lter 4 — A · (1 ’ A). mean ¬lter suppresses all oscillatory components

b) Low-pass running mean ¬lters with K = 2, 3, with wavelengths such that the ˜¬lter length™

2K + 1 is an integer multiple of the wavelength.

and 7.

Residual amounts of all other waves remain after

averaging because the running mean does not

used to construct a complex ¬lter with desirable ˜sample™ the positive and negative halves of these

properties from simple building blocks such as waves symmetrically.

the (1-2-1)-¬lter. This approach is discussed in From (17.41) we see that the side lobes in

[17.5.4]. Speci¬c ¬lters that are frequently used Figure 17.13b have a signi¬cant effect on the

in atmospheric science are discussed in [17.5.5], spectral density of the output of the running mean

some examples are mentioned in [17.5.6], and we ¬lter. For example, if weakly persistent red noise

wind up the section by describing a technique that were input into the ¬ve-term running mean ¬lter,

can be used to custom design ¬lters. For further the output might appear to have a broad spectral

peak near ω = 0.3.

reading, see standard texts such as Brockwell

and Davis [68], Jenkins and Watts [195], or

Koopmans [229].

17.5.3 Combining Filters. Let A and B be two

¬lters with weights ak and bk , respectively. Then,

if Xt is an input series, we denote the output by

17.5.2 The (1-2-1)-Filter and the ˜Running

[A(X)]t =

Mean™ Filter. These two symmetric ¬lters ak Xt+k

are simple tools for suppressing high-frequency k

variability. They preserve the mean since their [B(X)]t = bk Xt+k .

weights add to 1. k

17.5: Time Filters 387

The corresponding response functions are denoted function of the (1-2-1)·(1-2-1)-¬lter is shown in

by cA and cB . The weighted sum ±A+βB is again Figure 17.13a. Using (17.48), we see that the ¬lter

a ¬lter with weights ±ak + βbk and weights pk of A · A are:

±

[(±A + βB) (X)]t = ± [A(X)]t + β [B(X)]t . a0 + 2a1 = 3 for k = 0

2 2

8

a a + a a = 1 for |k| = 1

Since ¬ltering is a linear operation, linearly ’1 0 01

pk = 4

a’1 a1

combining output from two ¬lters is equivalent = 16 for |k| = 2

1

to passing the input through the combined ¬lter.

0 otherwise.

Similarly, the response function of the combined

¬lter is the linear combination of response A high-pass ¬lter can be derived from the

(1-2-1)-¬lter by forming the ¬lter 1 ’ (1-2-1). Its

functions:

response function is a mirror image of the response

c±A+βB (ω) = ± cA (ω) + β cB (ω).

function of the low-pass ¬lter (Figure 17.13a) and

In particular, suppose that A is a low-pass ¬lter, its weights are

±1

that is, a ¬lter designed to remove high-frequency

2 for k = 0

variations. Also, suppose that B is the ˜do nothing™

¬lter that leaves the input unchanged. Filter B has bk = ’ 1 for |k| = 1

4

weights b0 = 1 and bk = 0 for k = 0, and 0 otherwise.

is denoted B = 1. A high-pass ¬lter C can be

Finally, a band-pass ¬lter B may be obtained

constructed from A and B by setting ± = ’1

and β = 1 to obtain C = 1 ’ A with weights by combining the (1-2-1)-¬lter A with the 1 ’

c0 = 1 ’ a0 and ck = 1 ’ ak for k = 0. Note that (1-2-1)-¬lter 1 ’ A and setting B = 4 · A(1 ’ A).

if cA (0) = 1, then c1’A (0) = 0, in which case the The response function cA (ω)c1’A (ω) has zeros at

both ends of the frequency interval [0, 1/2] and a

output of the high-pass ¬lter has time mean zero.