Transformation and conversion to Eng Units

Transformation and conversion to Eng Units


Configuring an Arithmetic Virtual Stream

An Arithmetic Virtual Stream is used when a data stream's final value requires complex calculations beyond the capabilities of a standard linear stream. It applies an arithmetic formula to the parent stream's Final Values (found in the Samples Table) to generate new Final Values for the virtual stream.

Supported Arithmetic Functions

  • Operations: Addition (+), Subtraction (-), Multiplication (*), Division (/), Percentages

  • Mathematical Functions:

    • Trigonometric: Sin, Cos, Tan, Asin, Acos, Atan

    • Logarithmic: Log, Log10

    • Power/Roots: Sqrt, Pow

    • Conditional: If

    • Other: Abs, Ceiling, Floor, Round, Max, Min, Trunc

  • Constants: pi

Note: Arithmetic expressions are case-sensitive (e.g., abs(x) will fail, but Abs(x) works).

Steps to Configure an Arithmetic Virtual Stream

  1. Access Devices:

    • In the left pane, click Devices and select Fleet Management.

  2. Select Input Stream:

    • Choose the device and the stream you want to use as input.

  3. Create the Virtual Stream:

    • Go to the Configuration & Threshold tab.

    • Click Create Virtual Stream and select Arithmetic Expression as the transformation type.

  4. Edit the Arithmetic Expression:

    • Select the newly created virtual stream.

    • In the Convert to Engineering Units section, click the pencil icon.

    • In the Edit Arithmetic Expression window, enter the formula, including x to represent the raw value.

      • Example: 1 + Sqrt(x) * 4x

  5. Submit:

    • Click Submit to apply the configuration.

Examples of Arithmetic Expressions

Name
Description
Format
Example
Result

Abs

Absolute value

Abs(x)

Abs(-1)

1

Sqrt

Square root

Sqrt(x)

Sqrt(4)

2

If

Conditional expression

If(condition, a, b)

If(x > 0, 1, 0)

1 (if x > 0)

Pow

Power

Pow(x, y)

Pow(3, 2)

9

Round

Rounds to specified digits

Round(x, decimals)

Round(1.567, 2)

1.57

For the complete list of supported functions and operators, visit NCalc Documentation.

Final Notes

  • Ensure your formula uses x to represent raw values from the parent stream.

  • The Final Values of the virtual stream are derived directly from the applied arithmetic formula.

Last updated