0
$\begingroup$

Smoothing algorithms implemented by me

  1. Exponential smoothing - https://www.openprocessing.org/sketch/771368
  2. Moving Mean - https://www.openprocessing.org/sketch/540696

For example - a1+a2+a3+a4+... aN = A/N ..... is an average of all the a's which isn't same as ---> (((a/1+a2)/2 + a3)/3 +a4)/2 .... so on...

can anyone explain me how wrong I am or explain me signal averaging correctly?

$\endgroup$

3 Answers 3

4
$\begingroup$

@Greyfrog. Here are the descriptions of four different kinds of averaging operations:

enter image description here

enter image description here

$\endgroup$
4
  • 1
    $\begingroup$ Regarding my above exponential averager, that network (block diagram) is the traditional network given in the DSP textbooks. In practice the 'multiply-by-alpha' operation should be performed on the output of the network instead of at the network's input. The reason for this is explained at: dsprelated.com/showarticle/1249.php $\endgroup$ Commented Feb 28, 2020 at 23:30
  • $\begingroup$ can you explain me how can I do realtime signal averaging? Thank you Richard :) $\endgroup$
    – Greyfrog
    Commented Feb 29, 2020 at 13:05
  • 2
    $\begingroup$ Mr Lyons’ description here is a pretty comprehensive review of real time averaging. He also has written the literal book on digital signal processing, which is an excellent resource and as I recall goes into this topic more extensively. If you are looking for something relatively lightweight and free, you might check out the scientist and engineers guide to DSP, or some of the free material on DSPRELATED. If you are still having trouble, you may want to rephrase your question to be a bit more specific. $\endgroup$
    – Dan Szabo
    Commented Feb 29, 2020 at 17:37
  • 1
    $\begingroup$ @Greyfrog. I am willing to help if I am able, but your question surprises me. Do you understand the meaning of the $y(n)$ time-domain and $H_{ma}(z)$ z-domain equations in my Answer's "Nonrecursive real-time N-point moving average" section? Are you able to implement the processing of the "Nonrecursive real-time N-point moving average" network? The "scientist and engineers guide" material mentioned by the helpful and gracious Dan Szabo can be found at: lad.dsc.ufcg.edu.br/DSP/ch15.pdf $\endgroup$ Commented Feb 29, 2020 at 18:39
1
$\begingroup$

Classically, an averager is supposed, when applied to a constant, to yield the same value as an output. Here, with:

$$ u_3=\left( \left(\left(a_1\right/1 ) + a_2\right)/2+a_3\right)/3$$

when you set $a_k=a$, then you get

$$ \left( \left(\left(a\right/1 ) + a\right)/2+a\right)/3 = a (2/2+1)/3 = 2a/3 $$

Indeed, you have $u_{n+1} = (u_{n}+a_{n+1})/(n+1)$. With constant $a_k$, this boils down to the series:

$$ v_{n+1} = (v_{n}+1)/(n+1)$$

with $v_1=1$. With a quick napkin check, this decreases roughly as $1/n$, and goes to zero. You would have better results with the recursion:

$$ u_3=\left( \left(\left(a_1\right/1 ) + (2-1)a_2\right)/2+(3-1)a_3\right)/3$$

or $$u_{n+1} = (u_{n}+na_{n+1})/(n+1)$$

I didn't know never it is useful, or if it even has a name. The recursive averager takes a "dual" form:

$$u_{n+1} = (nu_{n}+a_{n+1})/(n+1)$$

$\endgroup$
0
$\begingroup$

You could use incremental averaging. https://math.stackexchange.com/questions/106700/incremental-averageing

$\endgroup$
2
  • 1
    $\begingroup$ this doesn't seem to answer the question. $\endgroup$ Commented Mar 5, 2020 at 12:41
  • $\begingroup$ I had used once used incremental averaging for real time calculation. So I thought I could suggest that. $\endgroup$
    – DSP Novice
    Commented Mar 5, 2020 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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