Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2024 R2)

Learn about future data and analyses

  • Last UpdatedJan 08, 2025
  • 3 minute read

You can use future data as input to an analysis. You can also use an analysis to produce future data by specifying a future time stamp for the output from an analysis.

Expressions can use values from future events as input to an analysis. However, if an analysis uses event-triggered scheduling, inputs with future data can generate analysis evaluations. If a trigger attribute has future events, an evaluation occurs as each event becomes current, when the clock time coincides with the time of that event.

The following sections show two uses of future data in analyses. The first example shows how to use future data as an input to an analysis. The second example shows how to use an analysis to produce future data.

Example: Input future data to evaluate forecast values

Suppose you need to evaluate forecast values for the outside temperature provided by a third-party service. To do that, create an analysis that finds the difference between forecast and actual values.

The analysis needs two input attributes:

  • ActualTemp

    Stores near real-time temperature readings from an outside thermometer.

  • ForecastTemp

    Stores future data, in this case forecast values for the outside temperature each day at 6 a.m., 2 p.m., and 10 p.m.

The analysis calculates the difference between the ActualTemp and ForecastTemp values and writes results to an output attribute named DeltaTemp.

Choose event-triggered scheduling for the analysis with the ForecastTemp attribute as the only triggering input attribute. With event-triggered scheduling, an evaluation occurs when the analysis detects a new event for a trigger attribute. Because this trigger attribute stores future data, the analysis detects a new event three times a day, when the clock time reaches 6 a.m., 2 p.m., and 10 p.m.; this triggers an evaluation and a new result for the DeltaTemp attribute.

Example: Output future data to calculate weekly emissions goals

Suppose you need to set weekly goals for emissions at a cement plant that operates under a voluntary annual CO2 cap. The weekly goal will likely change every week in response to the actual emission levels of the past week and to the amount remaining under the voluntary annual cap.

At the end of every week, you know actual emissions since the beginning of the year and can calculate a new weekly emissions goal. You want the time stamp for the new goal to be exactly one week from the calculation time, which coincides with the calculation time of the actual emissions for the next week.

In PI AF, create attributes for the parameters the calculations require, such as the annual cap.

Next, create a new expression analysis that calculates an output attribute named WeeklyGoal. The analysis completes the following steps:

  1. Find the actual emissions since the beginning of the year.

  2. Find the difference between the year-to-date total and the annual cap.

  3. Divide the difference by the number of days remaining under the annual cap and multiply by seven to calculate the WeeklyGoal attribute.

  4. Save the WeeklyGoal attribute as a future PI point, which preserves history and allows for trending and other uses.

When creating the analysis, choose periodic scheduling for every day at 12:00 a.m. The syntax of the analysis ensures the calculations only run on Sunday.

Finally, specify the time stamp for the analysis outputs. Enter the expression * + 7d to set the time stamp to exactly seven days from the trigger time. The WeeklyGoal attribute will have a time stamp that is one week in the future (that is, the following Sunday at 12:00 a.m.).

In This Topic
TitleResults for “How to create a CRG?”Also Available in