SmartSignal Expression Syntax

SmartSignal Expression Syntax

SmartSignal Expression Syntax is used in output tags, calculated estimates, mode expressions, rule conditions, and diagnostic rules.

Types of Expressions

Output Tags: The Output tags are specific types of SmartSignal tag aliases. The input tag aliases receive data from an external source, the output tags determine their value from a formula. Output tags can be used to derive non-measurable quantities. Other than how the data is acquired, output tags are treated the same as a measured quantity for modeling, rules, and diagnostics. A formula is required to evaluate an output tag to a numeric value.

Calculated Estimates: Calculated estimates can be used with both input and output SmartSignal tag alias. You can assign a tag with a calculated estimate to a model, evaluate an estimate during the runtime, and leverage by rules and diagnostics just like any other model tag alias. Instead of using SBM/VBM technology, a user specified formula will be evaluated to estimate the tag. A formula is required to evaluate the calculated estimate to a numeric value.

Mode Expressions: The mode expression specifies a required condition for modeling. Typically, templates have one mode of operation and the mode expression determines when the equipment is in operation. Some equipment may have multiple methods of operation and may require multiple modes with unique conditions for each method of operation. The mode expression is required to evaluate the mode expressions to a Boolean value (true or false).

Tag Rules: The tag rules evaluate the behavior of a tag to find a specific condition of interest. A tag rule can create an alert to notify that the tag behavior meets the specified condition or can be utilized by diagnostics. The rule condition is required to evaluate the tag rule to a Boolean value (true or false).

Diagnostic Rules: Diagnostics evaluate behavior to find a specific condition. A diagnostic can create an alert to notify that the behavior meets the specified condition. Diagnostics are intended to be more powerful and specific than rules. Diagnostics can specify multiple conditions across multiple tag aliases from any mode or model in the analytic template. Additionally, diagnostics can provide priority escalation (that is, the specification of multiple conditions with a variable importance in one alert).

Operators

Logical Operators

ValueArgument
Greater thanArgument1 > Argument2
Greater than or equalArgument1 >= Argument2
Less thanArgument1 < Argument2
Less than or equalArgument1 <= Argument2
Equal toArgument1 = Argument2
Not equal toArgument1 != Argument2

If( Argurment(T/F) )then result else alternative result //the ( ) are required.

Argument1(T/F) And Argument2(T/F)

Argument1(T/F) Or Argument2(T/F)

!Argument(T/F) //! is not

Mathematical Operators

ValueArgument
AdditionArgument1 + Argument2
SubtractionArgument1 - Argument2
NegationArgument1
DivideArgument1 / Argument2
MultiplyArgument1 * Argument2
PowerArgument1 ^ Argument2

Order of Operations

The Operations follow a standard mathematical procedure. The order in which the operations are evaluated can be modified with the use of parenthesis: ( )Tag attributes. Due to the Proficy SmartSignal architecture, there are three types of tag attributes:

  • Asset tag attributes
  • Model tag attributes
  • Internal tag attributes

To access a tag attribute use the syntax: TagAlias.Attribute (For example; Ambient_Temperature.SmoothedActual)

If no attribute is specified while writing a tag alias, *.actual will be assumed for externals and calculations, whereas *.DefaultValue will be assumed for internal tags.

Analytic Tag Attributes

The Analytic tag attributes are available to all the input and output tags in the template.

Runtime Attributes: The Runtime attributes are established during runtime along with the collection and processing of data. These attributes will update every time the data is collected. A maximum runtime history of 1024 data points are available.

Table 1. Runtime Attributes
Attribute Data TypeDescription
ActualFloatThe value collected from the data historian or evaluated from a formula for a tag.

Configured Attributes: The Configured attributes are established during model building or maintenance. These attributes will remain constant during runtime and can only be changed by user interaction.

Table 2. Configured Attributes
AttributeData TypeDescription
ActiveInAssetBooleanIf the Active in Asset column for the tag is selected, the value of the ActiveInAsset attribute is True. If the Active in Asset column for the tag is not selected, the value of this attribute is False.
TagAliasStringThe generic name of the tag that is established in Blueprint Center.
SourceTagStringFor external tags, the name of the tag in the data historian from which Actual values will be collected. For calculation, the field is not used and will be equivalent to the Tag Alias.
DescriptionStringUser configured text to describe the location and purpose of a tag. Will be displayed in Sentinel charts.
DisplayUnitsStringUser configured text to describe the units of measure of a tag. Will be displayed in Sentinel charts.
StandardUnitsMeasurementUnitStandardized units of measurement for the tag to be used for unit conversion of any tag attribute of float data type.
ActualHigh FloatA threshold typically used in rules and diagnostics representing the maximum value of the tag for normal operation.
ActualLowFloatA threshold typically used in rules and diagnostics representing the minimum value of a tag for normal operation.
AdaptationHighFloatA threshold used with automatic adaptation representing the maximum value of the tag that can be automatically adapted into a model.
AdaptationLowFloatA threshold used with automatic adaptation representing the minimum value of the tag that can be automatically adapted into a model.
StepHighThresholdFloatA threshold typically used in rules and diagnostics representing the maximum amount of acceptable instantaneous change in the positive direction for a tag.
StepLowThresholdFloatA threshold typically used in rules and diagnostics representing the maximum amount of acceptable instantaneous change in the negative direction for a tag.

Model Tag Attributes

The Model tag attributes are available to all Input and Output tags in a model. Model tag attributes are available to calculated estimates, rules, and diagnostics, and are not available to calculations and modes.

Note: Even if a tag is in multiple models, these attributes are unique to each model.
Table 3. Runtime Attributes
Attribute NameData TypeDescription
ActualSmoothed FloatThe Actual attribute smoothed by the smoothing algorithm
Estimate FloatThe SmartSignal estimate of the tag value for the current operational state of the equipment.
Residual FloatA measurement of the difference between the current and estimated value (Actual – Estimate) of the tag.
ResidualSmoothed FloatThe Residual attributed smoothed of the tag by the smoothing algorithm established in the Model tab of the advanced options of Asset Center.
ResidualIndicationPositiveFloatThe status of the residual indication of the tag in the positive direction. This attribute will
  • equal to 1: when there is a residual indication
  • equal to -1: when there is not residual indication
  • equal to 0: when a decision cannot be made
Residual indication criteria are established by selection of the Alarm Type of the tag.
ResidualIndicationNegativeFloatThe status of the residual indication of a tag in the negative direction.
  • equal to 1: when there is a residual indication
  • equal to -1: when there is not residual indication
  • equal to 0: when a decision cannot be made
Residual indication criteria are established by selection of the Alarm Type of the tag.
Table 4. Configured Attributes
AttributeData TypeDescription
ActiveInModelBooleanIf the Active in Model column for the tag is selected, the value of the ActiveInModel attribute is True. If the Active in Model column for the tag is not selected, the value of this attribute is False.
ResidualNegativeThreshold Float A threshold, typically used in rules and diagnostics representing the maximum residual value of a tag for normal operation in the negative direction.
ResidualPositiveThreshold Float A threshold typically used in the rules and diagnostics representing the maximum residual value of a tag for normal operation in the positive direction.
SPRTNegativeFloat The negative value for the sensitivity of the SPRT. This value is multiplied by the standard deviation of the nominal residual, which defines the negative threshold for aggregated SPRT probability measure, for the creation of residual indications.
SPRTPostiveFloat The positive value for the sensitivity of the SPRT. This value is multiplied by the standard deviation of the nominal residual, which defines the positive threshold for aggregated SPRT probability measure, for the creation of residual indications.
ActualMeanReferenceFloat The mean of the actual value of a tag included in the reference values. This attribute is automatically evaluated when creating a state matrix if it has not been manually overwritten.
ActualStandardDeviationReferenceFloat The standard deviation of the actual values of a tag included in the reference values. If it has not been manually overwritten, this attribute is automatically evaluated when creating a state matrix.
ResidualVarianceReferenceFloat The variance of the residual values of a tag included in the reference values. If it has not been manually overwritten, this attribute is automatically evaluated when creating a state matrix. Residual values are calculated by modeling the reference values not included in the state matrix.
StateMatrixMinimumFloat The maximum value of a tag in the state matrix.
StateMatrixMaximumFloat The minimum value of a tag in the state matrix.
OutlierNegativeFloat A threshold used in runtime representing the maximum actual value of a tag for normal healthy operation. Actual values exceeding this threshold will be replaced with a NaN for model processing.
OutlierPositiveFloat A threshold used in runtime representing the minimum actual value of a tag for normal healthy operation. Actual values exceeding this threshold will be replaced with a NaN for model processing.
IsIndependantBooleanTrue if the isIndependant column of a tag is checked otherwise false. When checked the tag will be treated as an independent variable in inferential modeling.

Constant Tag Attributes

Table 5. Configured Attributes
AttributeData TypeDescription
DefaultValueFloatThe value established for the tag in Asset Center.

Functions

Each functional input or argument will require a specific data type to be passed to the function. Based on the arguments of a function, you can decide the data type that is required.

Functional Inputs / Arguments

There are nine data types that can be requested by the various functions. Occasionally, a functional input requires a list of inputs.

Data TypeDescriptionExample
BooleanA True or False resultTrue, False.
IntegerA number without a decimal or fractional component-1, 0, 1, 2 ..
FloatA number with a decimal or fractional component3.14159
StringA sequence of text characters. Use of “ “ will cause all characters between the double quotes to be interpreted as a string.“Hello World”
ModelA reference to a model nameNA
TagA reference to a tag alias NA
TagRuleA reference to a tag rule nameNA
ModelTagRulesA reference to a model tag rule name NA
MeasurementUnitA unit of measurement for a tag. It must make use of a Standard Units Column of the tag.Tag.StandardUnits

Unit Conversions

Unit conversions can be done in SmartSignal by making use of the Standard Units columns and the Unit conversion functions specified in the following sections.

A standard unit of the tag should be configured to specify the unit of measure (for example, if the temperature tag is measured in ºC, the standard units should be set to Celsius). This provides SmartSignal a standardized and reconizable format for the units of measure.

While writing SmartSignal syntax, there are two ways to call a unit conversion function.

The first method allows a specific tag attribute to be converted. To use this method, specify a tag followed by the attribute to convert, which is then followed by the unit conversion function of the unit of measure. The attribute should be converted to TagAlias.TagAttribute.UnitConversionFunction.

Unit conversion will be from the unit of measure specified by the standard units of a tag to that of the specified unit conversion function. If the standard units of a tag are not configured (that is, set to None), or if the standard unit is not in the same unit category as the unit conversion function, then the attribute will not be converted. Any tag attribute (4) of data type float can be used in unit conversions, such as; Actual, Estimate, Residual, ActualHigh, ActualLow, ResidualPositiveThreshold, or ResidualNegativeThreshold.

The second method allows a quantity to be converted. To use this method, specify the unit conversion function of the unit of measure to which the quantity should be converted to UnitConversionFunction ( QuantityToConvert , StandardUnit ), followed by two function inputs:
  • Quantity to be converted
  • Standard unit of the quantity

Unit conversion will be from the unit of measure specified by the tag’s standard units to that of the specified unit conversion function. If the tag’s standard units are not configured (that is set to None), or if the standard unit is not in the same unit category as the unit conversion function, then the attribute will not be converted.