SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

Cumulative Moving Average?

Hi,

 

I would like to use Signal Express to create a cumulative moving average, running "every 100 data" points, from data point to data point until the end of my recorded signal.

 

So, for example, I would be producing a new signal from my initial signal; creating an average from data point 1 to 100, then an avearage of data point 2 to 101, 3 to 102, and so forth until the end of my recording. Is there a step in signal express that can accomplish such a task?

My hope is in the end to create a sort of running average of  the sums of squares, every 100 data points, from my initial recording.

I have first recorded a voltage signal, and then by using the Formula step I have squared each value of my recorded sample. Now all I seek to accomplish is the "running average" of this newly squared signal.

 

Seeking any and all advise. Many thanks.

 

GYepes

0 Kudos
Message 1 of 4
(5,702 Views)

I find the description of the task a little confusing.  The title is "cumulative moving average" which seems contradictory to me.  A moving average analysis is a statistical time-series method of smoothing a signal's frequencies with a wavelength equal to the time span of the average.  Frequencies greater or lesser are not smoothed.  The method does not accumulate anything, thus the contradiction.  If the task is to recalculate the average for all samples recorded for every project iteration, then that is more like a cumulative average?  From the more detailed description it seems the former is more likely the task.  Additionally I am unsure if the task is to "process" a signal in real time or to "analyze" a pre-recorded signal?

 

Let me encourage the exploration of the Process steps for real time signals, and Analysis steps for pre-recorded signals.  Signal Express has sophisticated numerical methods to meet most needs.  Take a look at "Processing - Analog Signals - Time Averaging" as a first guess to satisfy your needs.  I sincerely hope this helps to clarify the task - a problem well defined is half solved (anon.).

0 Kudos
Message 2 of 4
(5,680 Views)

Hi SOERJ,

 

I appologise if my question was a little confusing. Perhaps calling it a "cumulative moving average" is not the best term. I have tried the "time averaging step" and have not been able to get what I am looking for.

What I wish to accomplish with my signal (whether during recording or post signal recording playback) is to get an average of 100 consecutive samples throughout the length of the recording.

To achieve this I have been using excel with the formula: =(SUMSQ(Cell#1:Cell#100))/(COUNTA(Cell#1:Cell#100)), what I get is an average of 100 points for each data point in time throughout the entire lenght of my recording. What I am curious about is whether this sort of data processing can be done while recording or in playback/post recording.

I hope that this somewhat clarafies my question.

 

I appreciate your help.

 

Regards.

 

GYepes

0 Kudos
Message 3 of 4
(5,657 Views)

Perhaps the Subset & Resample step could help here.  Sample the signal with one additional measurement (100+1 measurements).  Pass the signal sample to Subset, and capture the entire current sample less the very first measurement and output as a "new" signal (measurements 2-101), then pass the new signal to the Statistics step for calculation of statistical mean.  Repeat the Subset and Statistics steps but for measurements 1-100.  Perhaps a Formula step could then be employed to calculate the difference in averages per standard Moving Average mathematics?  I have not fully thought through this scheme, but something like this that employs the Substep step in an unusual way.  Hope this gives to you some new ideas.

0 Kudos
Message 4 of 4
(5,641 Views)