You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
You are viewing the article in preview mode. It is not live at the moment.
Home > Client Resources > (OLD) KPI Creator
(OLD) KPI Creator
print icon

KPI’s are Key Performance Indicators used to monitor the health and performance of your plant. KPIs are used throughout the system to generate reports, graphs and trigger alerts. All KPIs functions are accessible on the Brite and Genius levels of the Pani platform. The Base level KPI functions are a subset of Brite and Genius functions but can be upgraded via the Pani Sales Team.

 

KPI Creator allows operators and administrators to create their own KPIs. A KPI can be:

  • A single sensor reading.
  • Single/multiple sensors with arithmetic operations that calculate new metrics.
  • The combination of 2 or more KPIs.

By creating KPIs as an intermediate function for another KPI, more complex and potentially insightful KPIs can be created. KPIs are used to drive Overview and Interactive reporting, Analytics, Alerts and Home page dashboards.

 

The process for creating KPIs is as follows:

Step 1: Build performance KPIs that are important to your plant operations. (see Creating KPIs)
Step 2: Create KPIs to monitor specific assets.
Step 3: Use your KPIs to power reports and alerts etc.
Step 4: Preview your KPI and make adjustments as necessary. (see no data preview).

 

Expressions

In the Expression Builder section of KPI Creator you will find the the various KPI listed that you can utilize by clicking on the Expression "?" icon.

 

 

Arithmetic Operations

Before you can create any KPIs it is important to know the arithmetic operations that are allowed in the expressions and calculations. These include:

  • Basic operators - addition, subtraction, multiple, divide, exponents (+ - * / ^)
  • Parenthesis – ( )

Arithmetic Functions

KPIs can use the following arithmetic expressions to support normalized calculations:

 

In the nomenclature below, SIGNAL can mean a sensor, KPI, or an arithmetic equation featuring sensors and/or KPIs.

 

For example, Ln also referred to as "Natural logarithm":
Ln(Sensor_name)
Ln(KPI_name)
Ln(Sensor1+sensor2)

 

NOTE: All math functions must be in lower case. An example would be log10, and not Log10.

 

List of Expressions available: 

align_and_ffill mask sqrt (square root)
avg

max

stdev
filter min sum
Ln (log base e) shift var
Log10 (log base 10)    

 

 

Log10 (log base 10)- log10 calculation, often used in normalizing parameters.

  • USAGE – log10(SIGNAL)
  • SYNTAX -  log10(s1)
Example:
log10(s1) – will return the logarithm of the signal/sensor value.

 

Ln (log base e)- calculates the natural logarithm, often used in normalizing parameters.

  • USAGE – ln(SIGNAL)
  • SYNTAX - ln(s1)
Example:
ln(s1)

 

sqrt (square root) – square root calculation

  • USAGE – sqrt(SIGNAL)
  • SYNTAX - sqrt(s1)
Example:
sqrt(s1)

 

filter - this function allows a signal to be bound by upper and lower limits. It creates a range where the output of a signal is valid and will display data. This implies an AND operation that is greater than/equal to and less than/equal to (see operands).

  • USAGE – filter(SIGNAL,lower_limit,upper_limit)
  • SYNTAX - filter(s1, 123, 234), where 123 is the lower limit and 234 is the upper limit
Example:
filter(pHSensor,5,8) will only display values when the pH is greater than or equal to 5 and less than or equal to 8

 

mask - this function restricts the display of the sensor or KPI data to a range. it allows a signal to mask another signal/KPI. This is useful if you want to have one signal act as an on/off signal for another, so that reporting averages are only calculated when the plant is running, for example.

  • USAGE –  mask(SIGNAL1,SIGNAL2,argument), where the argument is any valid object or equation containing a <>= and a value.
  • SYNTAX - mask(s1,s2 OPERAND NUMBER), where s1 is the sensor driving the KPI, and s2 is the sensor that, when active, is masking the kpi. Active is defined by the argument being TRUE.
Example:
mask(s1, s2>600) will only provide data when s2 is above 600  (see operands)   
mask(k1,s2=1) k1 only provides data when s2 is 1, this is useful for plant on/off signals masking the sensor data when a plant is offline

 

 

Operands

The following operands are supported and are only used in the MASK function:

 

  < Less-than
  > Greater-than
  <= Less-than-or-equal
  >= Greater-than-or-equal
  <> Not equal
  = Equal

 

The FILTER and MASK functions require a sensor as the first argument in the expression and one or more sensors or KPIs for the right-hand argument. The output of these functions is a TRUE/FALSE result that acts upon the signal(s) being referenced in the equation.

 

 

shift - this function shifts the sensor value used in the KPI by a number of reporting periods. If the sensor is reading values once a day, the shift function will move the values back a number of days. If the sensor is reading once an hour, the shift function will move it back a number of hours, etc.

  • USAGE – shift(OBJECT, Integer), where Integer is any whole number. Positive values look back a number of reporting periods, negative values look ahead a number of reporting periods from the current value.
  • SYNTAX - shift(sensor_name, {shift value})
    • Where sensor_name is the name of any user sensor or KPI
    • Where shift value is the number of data entries to move, i.e., 1 = 1 reporting period back, 5 is 5 reporting periods back, -4 is 4 reporting periods forward)
Example:
shift(s1,1) , where s1 is an Energy meter
- If TODAY's energy reading is 1000kw/h and yesterday’s reading is 700kw/h, the above equation would be 1000-700=300kw/h used

 


Functions listed below are additional Brite/Genius Features

 

align_and_ffill - takes a signal and adds timestamps to align it with another signal. After alignment, the first signal is filled forward. This is useful if you want to create KPIs that use a manual reading and hourly SCADA data, for example, to use in a calculation.

  • USAGE – align_and_ffill(price_chemicals, daily_chemical_consumption) would transform the price of chemicals to a daily value, taking the latest price available and filling it forward.
  • SYNTAX - align_and_ffill(s1, s2), where s1 is the signal getting transformed and filled, and s2 is the signal with the desired frequency.
Example:

align_and_ffill(s1, s2)*s2,

This example takes a signal that changes infrequently like the price of chemicals s1 (monthly on a form) and aligns it with hourly chemical consumption s2 and then multiplies it by hourly chemical consumption to produce the KPI for Hourly Chemical Cost

 

avg - takes a signal and calculates the average across a time window.

  • USAGE – avg(flow_rate, 1D) would calculate the daily average flow rate
  • SYNTAX - avg(s1, time_window), where s1 is the signal and the time_window is one of : 1m, 1H, or 1D for 1 minute, 1 hour, or 1 day respectively.
Example:
avg(s1, 1H)
This example takes a signal like flow rate and finds the average over a one-hour time period

 

max - takes a signal and calculates the maximum across a time window.

  • USAGE – max(flow_rate, 1H) would calculate the hourly maximum flow rate
  • SYNTAX - max(s1, time_window), where s1 is the signal and the time_window is one of : 1m, 1H, or 1D for 1 minute, 1 hour, or 1 day respectively.
Example:
max(s1, 1D)
This example takes a signal like flow rate and finds the maximum over a one-day time period

 

min - takes a signal and calculates the minimum across a time window.

  • USAGE – min(flow_rate, 1H) would calculate the hourly minimum flow rate
  • SYNTAX - min(s1, time_window), where s1 is the signal and the time_window is one of : 1m, 1H, or 1D for 1 minute, 1 hour, or 1 day respectively.
Example:
min(s1, 1m)
This example takes a signal like flow rate and finds the minimum over a one-minute time period

 

stdev - takes a signal and calculates the standard deviation across a time window.

  • USAGE – stdev(flow_rate, 1H) would calculate the hourly standard deviation flow rate
  • SYNTAX - stdev(s1, time_window), where s1 is the signal and the time_window is one of : 1m, 1H, or 1D for 1 minute, 1 hour, or 1 day respectively.
Example:
stdev(s1,1D) 
This example takes a signal like flow rate and finds the standard deviation over a one-day time period

 

sum - takes a signal and calculates the sum across a time window.

  • USAGE – sum(flow_rate, 1H) would calculate the hourly sum flow rate
  • SYNTAX - sum(s1, time_window), where s1 is the signal and the time_window is one of : 1m, 1H, or 1D for 1 minute, 1 hour, or 1 day respectively
Example:
sum(s1, 1m)
This example takes a signal like flow rate and finds the sum over a one-minute time period

 

var - takes a signal and calculates the variance across a time window.

  • USAGE – var(flow_rate, 1D) would calculate the daily flow rate variance
  • SYNTAX - var(s1, time_window), where s1 is the signal and the time_window is one of : 1m, 1H, or 1D for 1 minute, 1 hour, or 1 day respectively.
Example:
var(s1, 1H)
Description – this example takes a signal like flow rate and finds the variance over a one-hour time period

 

Creating KPIs

KPI creation is easy, but does require that sensors, or Fields, be set up via FormBuilder. The data entered in FormBuilder will build that database for the KPIs.

 

 

To create KPIs in KPI Creator perform the following:


Step 1: Open the "KPI Creator" from the sidebar menu in the Data section. The default view in

             KPI Creator is to create a new KPI, or you can select a KPI from the menu.

  • Copy an existing KPI by selecting it in the "Base on existing KPI" pulldown field.

Step 2: Give the KPI a Name.


Step 3: Add sensors/fields. Select the sensors needed to create the KPI expression. If you just
             want to create a graph of a single sensor, select that sensor, and build the expression
             “=S1”, where S1 is whatever variable is designated to that sensor.

  • Keep adding sensors by selecting + Add sensor or KPI until you have all sensors required for the expression.

Step 4: Build the expression in the "Expression" field. 

  • After each sensor, or field is added to the "Expression Builder", a shortened variable name will appear to the left of it (S1, K1, etc.). Use this abbreviated name to create the expression.
  • Think of the Expression field as a spreadsheet cell. Simply type in the equation using the shortened variable name. For example: (S1*S2)/S3+S4.
  • The expression can be based on an existing KPI or could be a completely new entity. Base the expression on an existing KPI to speed up the creation of multiple RO trains, for example, or multiple pump KPIs.

Step 5: When you have your expression built, click on the "Update preview" to view the results in the "Preview" window.

 

Step 6: Once you are satisfied with your KPI, save it using the "Save" button locate in the upper right corner of the KPI Creator screen.

 

My KPI does not save in KPI Creator

Possible reasons that could prevent a KPI from saving in KPI Creator:

- invalid math in expression

- capitalization of a function (always use lower case for functions)

- missing parenthesis

- ensure the Unit field is not left blank, enter/select the dash ( ) this will signify no units are used for the expression.


 

 

 

 

NOTE: Variable names S1, S2, etc. are always Sensors and K1, K2 etc. are always KPIs .

 

Expressions can be up to 4 operators in length. If additional operations are needed, it is recommended to break the expression down to 2 or more KPIs and reference these interim KPIs as in the complex expression. For example, if trying to KPI Total water production from a 5-train RO system, calculate water production per RO train, then create a 3-train KPI and a 2-train KPI and add them together.

 

NOTE: As you build the expression generate a graph to provide feedback as to the validity of the expression and the KPI. Select the “Update Preview” button to update the graph settings. If the KPI has no historical data or has data that results in an invalid expression (denominator being zero, for example), the graph will show no data.

 

 

IMPORTANT! The resultant graph in KPI Creator is dependent on conditions set in both FormBuilder and KPI creator calculations. Ensure limits are not set outside of your entire dataset or the KPI calculations will fail. The result would be either no data exists, or the data exists outside of the senor limit.

 

I don't see a preview graph in KPI Creator

The resultant graph in KPI Creator is dependent on conditions set in both FormBuilder and  KPI creator calculations.

- ensure limits are not set outside of your entire dataset or the KPI calculations will fail. The result would be either no data exists or the data exists outside of the senor limit.

- ensure the Unit field is not left blank, enter/select the dash ( - ) this will signify no units used for the expression.


 

 

 

 

When changing the KPI the graph does not change

Check for the following:

- ensure to click the update button after revising you expression

- the equation may be invalid resulting in no change to the graph when update button is clicked

 

 

 

 

 

Raw KPIs

A Raw KPI refers to a KPI that is created using unprocessed raw sensor data. This is to prevent odd fractional step values (i.e.. 0 or 1 output) of data from when the plant is off. This is in contrast to a 'cleaned' KPI that is created using preprocessed sensor data.

 

NOTE: Raw KPIs are only used in Brite/Genius versions of the Pani Platform.

 

How raw KPIs are calculated

If a KPI has both automated and manual sensor data, the manual data backfills so that the KPI can be calculated for each of the sensor data points. This is also used for any sensor where the time bases do not align.

 

Interpolation between Sensor Readings:
Backfill: Take the most recent value and apply it over the entire period up until the reading prior.

 

Saving KPIs

Newly created KPIs can be saved using the “Save” button in the upper right-hand corner of the screen. This button becomes active after the KPI is named.

 

NOTE: If you are working with something that has no Units (like pH), you will have to declare no units for the "Unit" field.  Do this by selecting the dash ( ) , which will signify no units, allowing you to Save your KPI.

Editing/Uploading KPIs

KPIs can be edited by selecting the KPI from the list in the KPI builder. Once selected, the KPI parameters will appear in the Builder and can be edited there. You must Save the edited expression after editing by clicking on the “Update” button.

Deleting KPIs

KPIs can be deleted by selecting them in the KPI list and then pressing the Delete button.

Copying KPIs

KPIs can be copied by selecting the “Base on Existing KPI” feature when creating a KPI. This will copy the prior KPIs parameters into the expression builder. Copying KPIs is useful for generating multiple KPIs for different similar assets such as various stages in an RO train or similar pumps in different trains.

 

Was this useful?
0 out of 0 found this helpful

scroll to top icon