Time Average Calculation|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Time Average Calculation
Avatar
SambsivaReddy Appireddygari
Member
Members
Forum Posts: 24
Member Since:
02/12/2016
sp_UserOfflineSmall Offline
1
05/25/2016 - 23:27
sp_Permalink sp_Print

Hello,

After exploring OPC UA Aggregates specification & samples given Time Average and Total, I have the following basic question.

Input data(quality=good)

12:00:00   - 10

12:00:02   - 12

12:00:05   - 15

Could you please explain me the formula to compute the time average for the above interval 12:00:00 to 12:00:05 ?

 

Thanks & Regards

Samba

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 109
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
2
06/07/2016 - 01:08
sp_Permalink sp_Print

Samba,

   TimeAverage is a slopped line between all of the points in the interval - in this case the line has the same slope - which makes it easy to calculate.  (10 + (15-10)/2).  Which would yield a result of 12.5.  technically it should be calculated by {([10 + (12-10)/2] * 2 ) + ([12 + (15-12)/2] * 3)} / 5  -> 12.5

In English, find the average value for the first sub interval - multiply it by the number of seconds (well actually milli-seconds - but since the time in the example is even second boundary - the calculation is identical) + find the average value for the second interval multiply by the number of seconds.  Add the two sub intervals together and then divide by the total time.  Note technically the number might be slightly different since the time stamps, might have more accurrancy in the clocks (milli-second time stamps) 

Paul

Paul Hunkar - DSInteroperability

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 21
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1347
Posts: 4567