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
Value | Argument |
---|---|
Greater than | Argument1 > Argument2 |
Greater than or equal | Argument1 >= Argument2 |
Less than | Argument1 < Argument2 |
Less than or equal | Argument1 <= Argument2 |
Equal to | Argument1 = Argument2 |
Not equal to | Argument1 != 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
Value | Argument |
---|---|
Addition | Argument1 + Argument2 |
Subtraction | Argument1 - Argument2 |
Negation | Argument1 |
Divide | Argument1 / Argument2 |
Multiply | Argument1 * Argument2 |
Power | Argument1 ^ 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.
Attribute | Data Type | Description |
---|---|---|
Actual | Float | The 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.
Attribute | Data Type | Description |
---|---|---|
ActiveInAsset | Boolean | If 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 . |
TagAlias | String | The generic name of the tag that is established in Blueprint Center. |
SourceTag | String | For 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. |
Description | String | User configured text to describe the location and purpose of a tag. Will be displayed in Sentinel charts. |
DisplayUnits | String | User configured text to describe the units of measure of a tag. Will be displayed in Sentinel charts. |
StandardUnits | MeasurementUnit | Standardized units of measurement for the tag to be used for unit conversion of any tag attribute of float data type. |
ActualHigh | Float | A threshold typically used in rules and diagnostics representing the maximum value of the tag for normal operation. |
ActualLow | Float | A threshold typically used in rules and diagnostics representing the minimum value of a tag for normal operation. |
AdaptationHigh | Float | A threshold used with automatic adaptation representing the maximum value of the tag that can be automatically adapted into a model. |
AdaptationLow | Float | A threshold used with automatic adaptation representing the minimum value of the tag that can be automatically adapted into a model. |
StepHighThreshold | Float | A threshold typically used in rules and diagnostics representing the maximum amount of acceptable instantaneous change in the positive direction for a tag. |
StepLowThreshold | Float | A 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.
Attribute Name | Data Type | Description |
---|---|---|
ActualSmoothed | Float | The Actual attribute smoothed by the smoothing algorithm |
Estimate | Float | The SmartSignal estimate of the tag value for the current operational state of the equipment. |
Residual | Float | A measurement of the difference between the current and estimated value (Actual – Estimate) of the tag. |
ResidualSmoothed | Float | The Residual attributed smoothed of the tag by the smoothing algorithm established in the Model tab of the advanced options of Asset Center. |
ResidualIndicationPositive | Float | The status of the residual indication of the tag in the positive direction. This attribute will
|
ResidualIndicationNegative | Float | The status of the residual indication of a tag in the negative direction.
|
Attribute | Data Type | Description |
---|---|---|
ActiveInModel | Boolean | If 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. |
SPRTNegative | Float | 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. |
SPRTPostive | Float | 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. |
ActualMeanReference | Float | 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. |
ActualStandardDeviationReference | Float | 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. |
ResidualVarianceReference | Float | 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. |
StateMatrixMinimum | Float | The maximum value of a tag in the state matrix. |
StateMatrixMaximum | Float | The minimum value of a tag in the state matrix. |
OutlierNegative | Float | 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. |
OutlierPositive | Float | 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. |
IsIndependant | Boolean | True 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
Attribute | Data Type | Description |
---|---|---|
DefaultValue | Float | The 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 Type | Description | Example |
---|---|---|
Boolean | A True or False result | True, False. |
Integer | A number without a decimal or fractional component | -1, 0, 1, 2 .. |
Float | A number with a decimal or fractional component | 3.14159 |
String | A sequence of text characters. Use of “ “ will cause all characters between the double quotes to be interpreted as a string. | “Hello World” |
Model | A reference to a model name | NA |
Tag | A reference to a tag alias | NA |
TagRule | A reference to a tag rule name | NA |
ModelTagRules | A reference to a model tag rule name | NA |
MeasurementUnit | A 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.
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.