The TimeAverage2 Aggregate defined in Table 18 uses Simple Bounding Values (see 3.1.9) to find the value of a point at the beginning and end of an interval. Starting at the starting bounding value a straight line is drawn between each value in the interval ending at the ending bounding value (see examples for illustrations). The area under the lines is divided by the length of the ProcessingInterval to yield the average. Note that this calculation uses a stepped or sloped line depending on what the value of the Stepped Property for the Variable; TimeAverage always uses a sloped line between points.
The time resolution used in this calculation is Server specific.
If any non-Good data exists in the interval, this data is omitted from the calculation and the time interval is reduced by the duration of the non-Good data; i.e. if a value was Bad for 1 minute in a 5-minute interval then the TimeAverage2 would be the area under the 4-minute period of Good values divided by 4 minutes. If a sub-interval ends at a Bad value then only the Good starting value is used to calculate the area of sub-interval preceding the Bad value.
The Aggregate StatusCode will be determined using the StatusCode Calculation (see 5.3).
Table 18 – TimeAverage2 Aggregate summary
TimeAverage2 Aggregate Characteristics |
|
Type |
Calculated |
Data Type |
Double |
Use Bounds |
Simple |
Timestamp |
StartTime |
|
|
StatusCode Calculations |
|
Calculation Method |
PercentTime |
Partial |
Set Sometimes If an interval is not a complete interval |
Calculated |
Set Always |
Interpolated |
Not Set |
Raw |
Not Set |
Multi Value |
Not Set |
|
|
StatusCode Common Special Cases |
|
Before Start of Data |
Bad_NoData |
After End of Data |
Bad_NoData |
No Start Bound |
Bound is Bad_NoData and treated as any other Bad value in the interval |
No End Bound |
Bound is Bad_NoData and treated as any other Bad value in the interval |
Bound Bad |
Treated as any other Bad value in the interval |
Bound Uncertain |
Treated as any other Uncertain value in the interval |