LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Averaged DC-RMS.vi" odd behaviour

I am using the "Averaged DC-RMS" vi (LabView 8.0.1) and there is an odd
behaviour that I do not understand.

When dealing with low scan rates I have remarked that the timestamp of
the returned average waveform can be higher than the timestamp of the
last value of the input waveform. For example:

Average type=Linear
Average time=20

Signal In

t0=16:10:00
dt=10
Y[0]=1.0
Y[1]=2.0


DC value Waveform

t0=16:10:20
dt=20
Y[0]=1.5

How is that possible? Shouldn't the timestamp of the returned waveform
be the same that the timestamp of the last value of the input waveform=
16:10:10?

 

 

0 Kudos
Message 1 of 6
(2,718 Views)

To me it looks as an 'expected' behaviour.

 

You have speciofied averaging time as 20 sec. So the first value will be available after 20 seconds from the start time. So if your start time is 16:00:00, average will start coming after 20Sec. Hence the start time will be 16:00:20.

Message Edited by kikiduu on 01-21-2009 04:36 AM
------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 2 of 6
(2,708 Views)

I do not agree, the first value is already available after 10 seconds.

 

 

The extreme case is if you average a single value.

 

Signal In

t0=16:10:00
dt=10
Y[0]=1.0

DC value Waveform

t0=16:10:10
dt=10
Y[0]=1.0

Input time:16:00:00    -> Output time 16:00:10

 

You get the first "average" value at initialisation time, not after 10 seconds.

 

 

0 Kudos
Message 3 of 6
(2,701 Views)
I agree with Kikiduu. Because data is averaged up to your last data point. As an example. If I have sampled data with 1KHz but want to do a downsample to 50 Hz by averaging. My first sample will appear at t=0.02 sec, not t=0. But if you do not like it build your own VI and use the "AC & DC Estimator.vi" as base function
Message Edited by t06afre on 01-21-2009 12:35 PM


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 6
(2,697 Views)

The help for Averaged DC_RMS VI says this...

 

DC value waveform indicates DC values of signal in computed over averaging time seconds and time stamped continuously from the last reset. 

 

This means that if t0 is the start time, first result will be available after 't0+ averaging time'. So the first point of the averaged data will be at 't0+averaging time'. Hence that waveform's start time will be 't0 + averaging time' and not t0 since at t0 that (averaged) value was not available. In your first example, averaging time is 20sec, hence t0 of result will be (initial t0 +20). In the second example that you mentioned, averaging time is 10sec, so t0 of result will be (initial t0 + 10).

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 5 of 6
(2,695 Views)

Thank you for your replies.

 

You all are right, but from my point of view there is still an inconsistency. According to the help :

 

DC value waveform indicates DC values of signal in computed over averaging time seconds and time stamped continuously from the last reset.

 

you should get the data after the computed averaging time so if t0 is the start time, the first result should be available after  't0+ averaging time'. The timestamp of the first point of the averaged data is 't0+ averaging time' but it is returned at t0 and not t0+averaging time.

In my second example, shouldn't I get the average at the second call when t=t0+10 time instead of the first one t0?

What disturbs me is that I get data with a "future" timestamp!

 

0 Kudos
Message 6 of 6
(2,675 Views)