An excellent answer to this post explains how to do $1/n$ octave energy smoothing and mentions complex smoothing can be done as well, but it's tricky business because of phase wrapping.

How is phase wrapping solved in $1/n$ complex smoothing?

  • $\begingroup$ One possible approach is to do magnitude smoothing via energy smoothing as described in the post, and then just keep the phase of each of original unsmoothed entries. But would that be correct? $\endgroup$ – SpeedCoder5 Jun 2 '14 at 23:36

In smoothing, each data point is replaced by some kind of local average of surrounding data points. When the size of smoothing window is defined in terms of octave, e.g., 1/3th Oct., 1/6th Oct etc., it is called fractional-octave smoothing.

Let $Z[i]$ be the complex valued frequency spectrum, where $i$ is the frequency index (FFT bin) and $0 \le i \le N - 1; N$ is the length of frequency bins. Then smoothed spectrum is given by $$ Z_s[i] =\sum\limits_{j=i-\Delta/2}^{i+\Delta/2} W[j] * Z[j] $$ where $\Delta$ is the smoothing window and $W[j]$ is the smoothing coefficients. Here, $Z[j]$ is in complex form ($a + ib$) and $W[j]$ is real. So smoothed spectrum, $Z[i]_s$, contains both magnitude and phase information.

In general smoothing coefficients are normalized, such that, $\sum\limits_{j=0}^{n} W[j] = 1;$ where $n$ number of smoothing coefficients defined by $\Delta$.

There are different methods for choosing these smoothing coefficients. For example, Rectangular, Savitzky-Golay, Gaussian, Binomial, etc. All the methods are some kinds of moving weighted average. The idea is to give the most weight to the data points nearest the point of estimation and the lest weight to the data points that are furthest away.

In signal processing, the aim of smoothing is to enhance the S/N by reducing the noise as much as possible, but distorting the original shape as small as possible. There is a trade-off between reducing the noise and preserve the original shape.

You also have to handle the edging data points. There are several possible ways to deal with the boundary values, e.g., repeating the last value, zero padding, shortening the window size.

| improve this answer | |

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.