Home Tourism

Signal averaging

Description : Signal averaging is a signal processing technique applied in the time domain, intended to increase the strength of a signal relative to noise that is obscuring it. By averaging a set of replicate measurements, the signal-to-noise ratio, S/N, will be increased, ideally in proportion to the square root of the number of measurements.Assumed thatAssuming we sample the noise, we get a per-sample variance of V a r ( z ) = E [ z 2 ] = σ 2 {\displaystyle \mathrm {Var} (z)=E[z^{2... Page:s266


Signal averaging is a signal processing technique applied in the time domain, intended to increase the strength of a signal relative to noise that is obscuring it. By averaging a set of replicate measurements, the signal-to-noise ratio, S/N, will be increased, ideally in proportion to the square root of the number of measurements.

Deriving the SNR for averaged signals

Assumed that

  • Signal s ( t ) {\displaystyle s(t)} is uncorrelated to noise, and noise z ( t ) {\displaystyle z(t)} is uncorrelated : E [ z ( t ) z ( t τ ) ] = 0 = E [ z ( t ) s ( t τ ) ] t , τ {\displaystyle E[z(t)z(t-\tau )]=0=E[z(t)s(t-\tau )]\forall t,\tau } .
  • Signal power S = 0 T E [ s ( t ) 2 ] d t {\displaystyle S=\int _{0}^{T}{E[s(t)^{2}]dt}} is constant in the replicate measurements.
  • Noise is random, with a mean of zero and constant variance in the replicate measurements: E [ z ] = 0 = μ {\displaystyle E[z]=0=\mu } and 0 < E [ ( z μ ) 2 ] = E [ z 2 ] = σ 2 {\displaystyle 0<E[\left(z-\mu \right)^{2}]=E[z^{2}]=\sigma ^{2}} .
  • We (canonically) define Signal-to-Noise ratio as S N R = S σ 2 {\displaystyle SNR={\frac {S}{\sigma ^{2}}}} .

Noise power for sampled signals

Assuming we sample the noise, we get a per-sample variance of

V a r ( z ) = E [ z 2 ] = σ 2 {\displaystyle \mathrm {Var} (z)=E[z^{2}]=\sigma ^{2}} .

Averaging a random variable leads to the following variance:

V a r ( 1 n i = 1 n z i ) = 1 n 2 V a r ( i = 1 n z i ) = 1 n 2 i = 1 n V a r ( z i ) {\displaystyle \mathrm {Var} \left({\frac {1}{n}}\sum _{i=1}^{n}z_{i}\right)={\frac {1}{n^{2}}}\mathrm {Var} \left(\sum _{i=1}^{n}z_{i}\right)={\frac {1}{n^{2}}}\sum _{i=1}^{n}\mathrm {Var} \left(z_{i}\right)} .

Since noise variance is constant σ 2 {\displaystyle \sigma ^{2}} :

N avg = V a r ( 1 n i = 1 n z i ) = 1 n 2 n σ 2 = 1 n σ 2 {\displaystyle N_{\text{avg}}=\mathrm {Var} \left({\frac {1}{n}}\sum _{i=1}^{n}z_{i}\right)={\frac {1}{n^{2}}}n\sigma ^{2}={\frac {1}{n}}\sigma ^{2}} ,

demonstrating that averaging n {\displaystyle n} realizations of the same, uncorrelated noise reduces noise power by a factor of n {\displaystyle n} .

Signal power for sampled signals

Considering n {\displaystyle n} vectors V i , i { 1 , , n } {\displaystyle V_{i},\,i\in \{1,\ldots ,n\}} of signal samples of length T {\displaystyle T} :

V i = [ s i , 1 , , s i , T ] , s i , k K T {\displaystyle V_{i}=\left[s_{i,1},\ldots ,s_{i,T}\right],\quad s_{i,k}\in \mathbb {K} ^{T}} ,

the power P i {\displaystyle P_{i}} of such a vector simply is

P i = k = 1 T s i , k 2 = | V i | 2 {\displaystyle P_{i}=\sum _{k=1}^{T}{s_{i,k}^{2}}=\left|V_{i}\right|^{2}} .

Again, averaging the n {\displaystyle n} vectors V i , i = 1 , , n {\displaystyle V_{i},\,i=1,\ldots ,n} , yields the following averaged vector

V avg = 1 n k = 1 T i = 1 n s i , k = 1 n i = 1 n k = 1 T s i , k {\displaystyle V_{\text{avg}}={\frac {1}{n}}\sum _{k=1}^{T}\sum _{i=1}^{n}s_{i,k}={\frac {1}{n}}\sum _{i=1}^{n}\sum _{k=1}^{T}s_{i,k}} .

In the case where V n V m m , n { 1 , , n } {\displaystyle V_{n}\equiv V_{m}\forall m,n\in \{1,\ldots ,n\}} , we see that V avg {\displaystyle V_{\text{avg}}} reaches a maximum of

V avg, identical signals = P i {\displaystyle V_{\text{avg, identical signals}}=P_{i}} .

In this case, the ratio of signal to noise also reaches a maximum,

SNR avg, identical signals = V avg, identical signals N avg = n SNR {\displaystyle {\text{SNR}}_{\text{avg, identical signals}}={\frac {V_{\text{avg, identical signals}}}{N_{\text{avg}}}}=n{\text{SNR}}} .

This is the oversampling case, where the observed signal is correlated (because oversampling implies that the signal observations are strongly correlated).

Time-Locked Signals

Averaging is applied to enhance a time-locked signal component in noisy measurements; time-locking implies that the signal is observation-periodic, so we end up in the maximum case above.

Averaging Odd and Even Trials

A specific way of obtaining replicates is to average all the odd and even trials in separate buffers. This has the advantage of allowing for comparison of even and odd results from interleaved trials. An average of odd and even averages generates the completed averaged result, while the difference between the odd and even averages constitutes an estimate of the noise.

Algorithmic Implementation

The following is a MATLAB simulation of the averaging process:

 % create [sz x sz] matrix % fill the matrix with noise sz=256; NOISE_TRIALS=randn(sz); % create signal with a sine wave % divide the array SZ by sz/2 SZ=1:sz;   SZ=SZ/(sz/2);   S=sin(2*pi*SZ); for i=1:sz;   NOISE_TRIALS(i,:) = NOISE_TRIALS(i,:) + S; end; % create the average average=sum(NOISE_TRIALS)/sz;  odd_average=sum(NOISE_TRIALS(1:2:sz,:))/(sz/2); even_average=sum(NOISE_TRIALS(2:2:sz,:))/(sz/2); noise_estimate=odd_average-even_average; % create plot figure hold plot(NOISE_TRIALS(1,:),'g') plot(noise_estimate,'k') plot(average,'r') plot(S) xlabel('Trials') ylabel('Amplitude') title('Signal Averaging') gtext('Signal: Blue') gtext('Single trial: Green') gtext('Noise estimate: Black') gtext('Average: Red')

The averaging process above, and in general, results in an estimate of the signal. When compared with the raw trace, the averaged noise component is reduced with every averaged trial. When averaging real signals, the underlying component may not always be as clear, resulting in repeated averages in a search for consistent components in two or three replicates. It is unlikely that two or more consistent results will be produced by chance alone.

Correlated Noise

Signal averaging typically relies heavily on the assumption that the noise component of a signal is random, having zero mean, and being unrelated to the signal. However, there are instances in which the noise is not uncorrelated. A common example of correlated noise is a hum (e.g. 50 or 60 Hz noise originating from power lines). To apply the signal averaging technique, a few critical adaptations must be made, and the problem can be avoided by:

  • Randomizing the stimulus interval, or
  • Using a noninteger stimulus rate (e.g. 3.4 Hz instead of 3.0 Hz)
Copyright 2008-2017 www.21pw.com