How-To Guides
Analytics Guides

Use the Statistical Prediction Function

6min

You can use the Statistical Prediction function to make future value predictions by applying the Fast Fourier Transform (FFT) on time-series signals.

User Scenario

Review the following scenario for the statistical prediction processor function. Then, using an input processor, you will simulate PLC data and predict future data from the window of generated values.

In a manufacturing plant, you can use the Statistical Prediction Function to predict future equipment failures. The function analyzes sensor data from the equipment and generates predictions based on past performance. The maintenance team uses these predictions to proactively schedule repairs and avoid costly downtime.

Step 1: Add a Device

Follow the steps to Connect a Device and configure the following parameters:

  • Device Type: Simulator
  • Driver Name: Generator
  • Enable Alias Topics: Select the checkbox.

Step 2: Add Tags

After connecting the device, add the following tags. See Add Tags to learn more.

Tag 1: input1

  • Name: Select S - Random value generator
  • Value Type: Select float64
  • Polling Interval: Enter 1
  • Tag Name: Enter input1
  • Min_value: Enter 1
  • Max_value: Enter 25

Step 3: Create Analytics Flows

You can now create the analytics flows using data from the device and tag you previously created.

To create an analytics flow with the Statistical Prediction Processor function:

  1. In Manufacturing Connect Edge, navigate to Analytics.
  2. On the analytics canvas, click Add processor. The Create a processor dialog box displays.

    The Add processor option
    The Add processor option
    
  3. Select DataHub Subscribe.
  4. In the Topic field, click the Search icon, select the device you previously created, and then select the alias topic for the input1 tag.

    Create a Processor dialog box
    Create a Processor dialog box
    
  5. Click Save.
  6. Click Add processor again and select the Statistical Prediction processor. The following information defines this function:
    • Window Size: Enter a value that represents the range to observe before making each prediction. For this example, we input a value of 10.
    • Number of Predictions: Enter a value to determine how many predictions you want. For this example, we input a value of 2.
    • Frequency Difference: Enter a value to represent the sampling rate of discretization. For this example, we input a value of 1.
    • Number of Harmonics: Enter a value to represent the number of waves added to the fundamental wave to reach the desired signal. For this example, we input a value of 4.
    • For now, the polling interval of the subscription tag is assumed to be 1 second.
    • Click Save.

      Edit a Processor dialog box
      Edit a Processor dialog box
      
  7. Connect the DataHub Subscribe processor (tag: input1) to the Statistical Prediction processor with a wire and use the events connection.
  8. On the analytics canvas, click Save. The configured analytics flows should look like the following:

    Completed Flows Canvas
    Completed Flows Canvas
    

Step 4: View Output of Processor

Click the View icon in the Statistical Prediction processor to view the output values.

Before you can see any output, the input window size needs to be filled. After that, the output will include the prediction along with its timestamp.

Output of Statistical Prediction
Output of Statistical Prediction