SignalExpress

cancel
Showing results for 
Search instead for 
Did you mean: 

averaging output over one second while taking a 5Hz sample

Aloha Everyone,

I'm a engineering student tasked with understanding how to use SignalExpress2013 with a USB-6341 device. This is my situation. I have an anemometer that feeds a voltage to the USB device betwee 0-4V. I am taking this data at 5Hz. I need to then have this data averaged to 1Hz, i.e. take the average of every 5 values and the result is the data for that 1 second in time. Therefore, on the time averaging step settings I chose the following:

 

Input signal: ai0

Weighting mode: linear Block avg.

Number of avg.: 5

 

However I don't understand how to interpret the data below. Can someone please explain how SignalExpress arrives with the values in the "time_avg_signal.txt" file?

Download All
0 Kudos
Message 1 of 5
(5,611 Views)

I'm a little confused about what you are asking. The text file seems to give you five values with a corresponding timestamp and dt value.

Matt W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(5,588 Views)

Sorry, the original files were the wrong ones. I have attached a new set. This is what I need:

 

Given these values with dt = 0.2 seconds (these are the first 10 in the VoltageNew.txt set): -0.5991051, -0.6234424, -0.6560018, -0.6711304, -0.6767214, -0.6734326, -0.6661971, -0.6665260, 8.590291, 7.792382

 

I need the average over a second like this (dt= 1 second): -0.50994, 2.875303

In other words, average the first 5 values, then average the next 5 values, rinse and repeat.

 

I felt that I had the settings properly inputted as shown in my previous message, but instead I'm getting what's shown in the "time_avg_signalNew.txt" file. My questions are:

 

1) What algorithm is SE using to come up with new numbers such as the values listed in the 2nd quintuple-set of values?

2) is there a way to format these files to have the timestamps running down the spreadsheet instead of just giving a start time and a dt value?

 

Download All
0 Kudos
Message 3 of 5
(5,581 Views)

The way I do this is by setting the acquisition mode to "N samples", number of samples to 5, and rate to 5 Hz. Then I add a Statistics step (Analysis->Time-domain measurements) and check the "Mean" box. You can then log that value and/or plot it on your graph.

 

I don't know how to add a time-stamp for every data point. It's a topic that is quite popular on this forum but I don't know if there's a solution. One thing is for sure, you can't trust that a nominally 1Hz data rate will correspond exactly to one data point every 1 second. There will be some lag after a few minutes.

 

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

hi cdamo808

 
I do not understand pretty well your application.
 
Which tasks did you configure in SE?
 
Are you using Time Average?

For the second questions, there is a way to save with timestamp as you may see in the image I attached.

I used Save to ASCII/VLM for it and a path to a .txt file
0 Kudos
Message 5 of 5
(5,559 Views)