Optimal Gaussian Filter for Effective Noise Filtering

0 downloads 0 Views 244KB Size Report
Jun 12, 2014 - We show through curve fitting and later ... Step 1 For a fixed B, we fit a 3-D curve to relate So, Si and σ2 .... Available: http://www.zunzun.com/.
1

Optimal Gaussian Filter for Effective Noise Filtering Sunil Kopparapu and M Satish

Abstract In this paper we show that the knowledge of noise statistics contaminating a signal can be effectively used to choose an optimal Gaussian filter to eliminate noise. Very specifically, we show that the additive white Gaussian noise (AWGN) contaminating a

arXiv:1406.3172v1 [cs.OH] 12 Jun 2014

signal can be filtered best by using a Gaussian filter of specific characteristics. The design of the Gaussian filter bears relationship with the noise statistics and also some basic information about the signal. We first derive a relationship between the properties of the Gaussian filter, noise statistics and the signal and later show through experiments that this relationship can be used effectively to identify the optimal Gaussian filter that can effectively filter noise. Index Terms Filtering, Gaussian Smoothing, Noise removal

I. I NTRODUCTION Signal smoothing or noise filtering or denoising has been an area of active research and continues to hold the attention of researchers in various fields, for example, [1], [2], [3], [4], [5]. Noise is inherent in signals [6], [7] and a necessary first step is noise removal before any other processing can take place. A successful pre-processing step to remove noise improves the performance of the actual processing on the signal [8]. There are essentially two ways of taking care of noise in the signal, namely, (a) pre-processing of the signal to enable noise removal or (b) use of a set of robust algorithms that can compensate for the inherent noise. In signal processing literature pre-processing of the signal is the preferred approach.

A. Problem Let X = [x1 , x2 , · · · , xN ] be a band limited (B) digitized signal which is sampled at a sampling frequency of fs and Let N = [n1 , n2 , · · · , nN ] be the noise sequence. Further assume that {ni }N i=1 is Gaussian distributed with mean µN and variance 2 σN . Let

XN = X + N

(1)

ˆ such that the represent the signal X contaminated by AWGN N . Now the problem can be stated as, given XN estimate X error in the estimate is minimum, namely ˆ 2 minargXˆ ||X − X||

(2)

ˆ given the noise contaminated XN is called noise filtering or denoising. We will restrict Typically the process of estimating X our discussion, in this paper to the usage of a Gaussian smoothing filter for noise removal. We describe Gaussian filtering in Section II which is characterized by σf which determines the amount of smoothing. We build theory in Section III which Sunil Kumar Kopparapu and M Satish are with the TCS Innovation Labs - Mumbai, Yantra Park, Thane (West), Maharastra, INDIA. Email: [email protected]

2

allows identification of an optimal σfopt . We show experimentally how the identification of the actual Gaussian filter can be found in Section IV and conclude in Section V. II. G AUSSIAN S MOOTHING A Gaussian filter is parametrized by its means µf and variance σf2 and represented by 1

exp Gf (µf , σf2 , t) = q 2πσf2



n

(t−µf )2 2σ 2 f

o (3)

Note 1: Given µf and σf2 one can construct a Gaussian filter (3) with t running between [−∞, ∞]. Note 2: It is well known that spanning t between −3σf and 3σf covers 99.7 % of the total area under the Gaussian. So we can approximate Gf (µf , σf2 , t) from t = −∞ to ∞ as Gf (µf , σf2 , t) from t = −3σf to 3σf for the purpose of discussion and subsequent experimentation. Let the discrete version of Gf (µf , σf2 , t) from t = −3σf to 3σf be represented by Gf [µf , σf2 , 2

ˆ σf , namely, m] from m = −d3σf e to d3σf e, where d•e represents the ceil of •. Let XN smoothed with Gf [µf , σf2 , ·] result in X 2 ˆ σf X k

d3σf2 e+k

X

=

XNi Gf [µf , σf2 , i − k]

i=−d3σf2 e+k 3dσf2 e+k

X

=

(xi + ni )Gf [µf , σf2 , i − k]

i=−d3σf2 e+k

(4) for k = 1, 2, · · · , N . Let the error in the estimate be 2 N  1 X σf2 ˆ = Xk − Xk N

Eσf2

(5)

k=1

2

ˆ σf for some σ 2 such that Eσ2 is minimized. We further We hypothesize that one can achieve an optimal estimate X f k f hypothesize that σf2 is based on the variance of the noise affecting the signal and some properties of the signal. Specifically, 2 σf2 is dependent directly or indirectly on σN and B.

III. O UR A PPROACH In the frequency domain we can write (1) as XN (ω) = X(ω) + N (ω)

(6)

and the Gaussian filter as

G(ω) = exp

−ω 2 σf2 2

! (7)

3

ˆ N (ω) due to filtering by Gaussian filter can be written as The estimate of the signal X ˆ N (ω) = X(ω)G(ω) + N (ω)G(ω) X

(8)

The error in the filtered output is given by E(ω)

ˆ N (ω) = X(ω) − X = X(ω) [1 − G(ω)] + N (ω)G(ω) | {z } {z } | Signal Distortion Noise Smoothing

(9)

As seen in (9) the error in the estimate (E(ω)) due to filtering has two components namely, one due to distortion of signal (X(ω) [1 − G(ω)]) and the other due to the reminiscent noise (N (ω)G(ω)) in the signal after filtering. Let P• denote the power in the signal •, then input and output signal to noise (S) ratios are given by Si

=

PX PN

So

=

PX PX = PX − PXˆ PE

(10)

Note 3: For a certain σf2 , the Gaussian filter is able to filter the signal such that So > Si . Namely, simultaneously remove the noise and not distort the signal. Note 4: If we increase σf2 then the cutoff frequency and the bandwidth of Gaussian filter will decrease as seen in (7) and subsequently this will lead to more noise removal but on same account the signal distortion will also increase. In the limiting case when σf → 0, we have an all pass filter and hence So = Si . Let for some σf2 = σf2 R So = Si , such that if we increase σf2 further then So < Si . One can hypothesize that for σf2 in the range [0, σf2 R ], So > Si . We further hypothesize 2 that there exists a σf,opt (in the range [0, σf2 R ]) for which So peaks to achieve Somax . We show through curve fitting and later 2 experimentally that we can determine the optimal σf,opt such that So is maximized.

2 A. Determining σf,opt 2 With an aim to identify σf,opt the optimal choice of Gaussian filter to remove noise we constructed three different signals 2 (X) with different bandwidths (B). We constructed the noisy signal (XN ) by appending X with N with varying σN . For each

of this noisy signal we used different σf2 Gaussian to filter noise and for each of this So is computed. The band limited X is constructed by first generating a random sequence of length N having a normal distribution with mean zero and variance one. This random signal is smoothened using a filter of length M(