OPC 10000-3 and OPC 10000-5 standards define the representation of Aggregate historical or buffered real time data in the OPC Unified Architecture. This includes the definition of Aggregates used in processed data retrieval and in historical retrieval. This definition includes both standard Reference types and Object types.

OPC UA Servers can support several different functionalities and capabilities. The following standard Objects are used to expose these capabilities in a common fashion, and there are several standard defined concepts that can be extended by vendors.

The AggregateConfigurationType defines the general characteristics of a Node that defines the Aggregate configuration of any Variable or Property. AggregateConfiguration Object represents the browse entry point for information on how the Server treats Aggregate specific functionality such as handling Uncertain data. It is formally defined in Table 2.

Table 2 – AggregateConfigurationType Definition

Attribute

Value

BrowseName

AggregateConfigurationType

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the BaseObjectType defined in OPC 10000-5

HasProperty

Variable

TreatUncertainAsBad

Boolean

PropertyType

Mandatory

HasProperty

Variable

PercentDataBad

Byte

PropertyType

Mandatory

HasProperty

Variable

PercentDataGood

Byte

PropertyType

Mandatory

HasProperty

Variable

UseSlopedExtrapolation

Boolean

PropertyType

Mandatory

Conformance Units

Aggregate Master Configuration

The TreatUncertainAsBad Variable indicates how the Server treats data returned with a StatusCode severity Uncertain with respect to Aggregate calculations. A value of True indicates the Server considers the severity equivalent to Bad, a value of False indicates the Server considers the severity equivalent to Good, unless the Aggregate definition says otherwise. The default value is True. Note that the value is still treated as Uncertain when the StatusCode for the result is calculated.

The PercentDataBad Variable indicates the minimum percentage of Bad data in a given interval required for the StatusCode for the given interval for processed data request to be set to Bad. (Uncertain is treated as defined above.) Refer to 5.4.3 for details on using this Variable when assigning StatusCodes. For details on which Aggregates use the PercentDataBad Variable, see the definition of each Aggregate. The default value is 100.

The PercentDataGood Variable indicates the minimum percentage of Good data in a given interval required for the StatusCode for the given interval for the processed data requests to be set to Good. Refer to 5.4.3 for details on using this Variable when assigning StatusCodes. For details on which Aggregates use the PercentDataGood Variable, see the definition of each Aggregate. The default value is 100.

The following calculations are used to detemine the StatusCode which will be used to calculate the value of the aggregate. Refer to 5.4.3 for details on using these Variables when assigning StatusCodes. The PercentDataGood and PercentDataBad shall follow the following relationship PercentDataGood ≥ (100 – PercentDataBad). If they are equal the result of the PercentDataGood calculation is used. If the values entered for PercentDataGood and PercentDataBad do not result in a valid calculation (e.g. Bad = 80; Good = 0) the result will have a StatusCode of Bad_AggregateInvalidInputs The StatusCode Bad_AggregateInvalidInputs will be returned if the value of PercentDataGood or PercentDataBad exceed 100.

The UseSlopedExtrapolation Variable indicates how the Server interpolates data when no boundary value exists (i.e. extrapolating into the future from the last known value). A value of False indicates that the Server will use a SteppedExtrapolation format, and hold the last known value constant. A value of True indicates the Server will project the value using UseSlopedExtrapolation mode. The default value is False. For SimpleBounds this value is ignored.

This Object is used as the browse entry point for information about the Aggregates supported by a Server. The content of this Object is already defined by its type definition. All Instances of the FolderType use the standard BrowseName of ‘AggregateFunctions’. The HasComponent Reference is used to relate a ServerCapabilities Object and/or any HistoryServerCapabilitiesType Object to an AggregateFunction Object. AggregateFunctions is formally defined in Table 3.

Table 3 – Aggregate Functions Definition

Attribute

Value

BrowseName

AggregateFunctions

References

Node

Class

BrowseName

DataType

TypeDefinition

ModellingRule

HasTypeDefinition

Object

Type

FolderType

Defined in OPC 10000-5

Conformance Units

Historical Access Aggregates

Each ServerCapabilities and HistoryServerCapabilitiesType Object shall reference an AggregateFunction Object. In addition, each HistoricalConfiguration Object belonging to a HistoricalDataNode may reference an AggregateFunction Object using the HasComponent Reference.

This ObjectType defines an Aggregate supported by a UA Server. This Object is formally defined in Table 4.

Table 4 – AggregateFunctionType Definition

Attribute

Value

BrowseName

AggregateFunctionType

IsAbstract

False

References

Node

Class

BrowseName

DataType

TypeDefinition

Mod.Rule

Subtype of the BaseObjectType defined in OPC 10000-5

Conformance Units

Historical Access Aggregates

For the AggregateFunctionType, the Description Attribute (inherited from the Base NodeClass), is mandatory. The Description Attribute provides a localized description of the Aggregate.

Table 5 specifies the BrowseName and Description Attributes for the standard Aggregate Objects. The description is the localized “en” text. For other locales it shall be translated.

Table 5 – Standard AggregateType Nodes

BrowseName

Description

Interpolation Aggregate

Interpolative

At the beginning of each interval, retrieve the calculated value from the data points on either side of the requested timestamp.

Average

Retrieve the average value of the data over the interval.

TimeAverage

Retrieve the time weighted average data over the interval using Interpolated Bounding Values.

TimeAverage2

Retrieve the time weighted average data over the interval using Simple Bounding Values.

Total

Retrieve the total (time integral) of the data over the interval using Interpolated Bounding Values.

Total2

Retrieve the total (time integral) of the data over the interval using Simple Bounding Values.

Minimum

Retrieve the minimum raw value in the interval with the timestamp of the start of the interval.

Maximum

Retrieve the maximum raw value in the interval with the timestamp of the start of the interval.

MinimumActualTime

Retrieve the minimum value in the interval and the timestamp of the minimum value.

MaximumActualTime

Retrieve the maximum value in the interval and the timestamp of the maximum value.

Range

Retrieve the difference between the minimum and maximum value over the interval.

Minimum2

Retrieve the minimum value in the interval including the Simple Bounding Values.

Maximum2

Retrieve the maximum value in the interval including the Simple Bounding Values.

MinimumActualTime2

Retrieve the minimum value with the actual timestamp including the Simple Bounding Values.

MaximumActualTime2

Retrieve the maximum value with the actual timestamp including the Simple Bounding Values.

Range2

Retrieve the difference between the Minimum2 and Maximum2 value over the interval.

Count

Retrieve the number of raw values over the interval.

DurationInStateZero

Retrieve the time a Boolean or numeric was in a zero state using Simple Bounding Values.

DurationInStateNonZero

Retrieve the time a Boolean or numeric was in a non-zero state using Simple Bounding Values.

NumberOfTransitions

Retrieve the number of changes between zero and non-zero that a Boolean or numeric value experienced in the interval.

Start

Retrieve the value at the beginning of the interval.

End

Retrieve the value at the end of the interval.

Delta

Retrieve the difference between the Start and End value in the interval.

StartBound

Retrieve the value at the beginning of the interval using Simple Bounding Values.

EndBound

Retrieve the value at the end of the interval using Simple Bounding Values.

DeltaBounds

Retrieve the difference between the StartBound and EndBound value in the interval using Simple Bounding Values.

DurationGood

Retrieve the total duration of time in the interval during which the data is Good.

DurationBad

Retrieve the total duration of time in the interval during which the data is Bad.

PercentGood

Retrieve the percentage of data (0 to 100) in the interval which has Good StatusCode.

PercentBad

Retrieve the percentage of data (0 to 100) in the interval which has Bad StatusCode.

WorstQuality

Retrieve the worst StatusCode of data in the interval.

WorstQuality2

Retrieve the worst StatusCode of data in the interval including the Simple Bounding Values.

AnnotationCount

Retrieve the number of Annotations in the interval (applies to Historical Aggregates only).

StandardDeviationSample

Retrieve the standard deviation for the interval for a sample of the population (n-1).

VarianceSample

Retrieve the variance for the interval as calculated by the StandardDeviationSample.

StandardDeviation Population

Retrieve the standard deviation for the interval for a complete population (n) which includes Simple Bounding Values.

VariancePopulation

Retrieve the variance for the interval as calculated by the StandardDeviationPopulation which includes Simple Bounding Values.

The default values used for MonitoredItem Aggregates are the same as those used for historical Aggregates. They are defined in 4.2.1.2. For additional information on MonitoredItem AggregateFilter see OPC 10000-4.

When calculating MonitoredItem Aggregates that require the use of Bounding Values, the bounds may not be known. The calculation is done in the same manner as a historical read with the Partial Bit set. The historian may wait some amount of time (normally no more than one processing interval) before calculating the interval to allow for any latency in data collection and reduce the use of the Partial Bit.

A historical read done after data collection and the data from the MonitoredItem over the same interval may not be the same.

Figure 1 outlines a possible representation of Aggregate information in the AddressSpace. In this example, although the Server at the highest level may support Aggregate functionality for Interpolative, Total, Average, and others, DataVariable X only supports Interpolative, Total and Average, while DataVariable Y supports Average, a vendor defined Aggregate and other (unstated) Aggregates.

image004.png

Figure 1 – Representation of Aggregate Configuration information in the AddressSpace