Use the Statistical Prediction Function
You can use the Statistical Prediction function to make future value predictions by applying the Fast Fourier Transform (FFT) on time-series signals.
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.
Follow the steps to Connect a Device and configure the following parameters:
- Device Type: Simulator
- Driver Name: Generator
- Enable Alias Topics: Select the checkbox.
After connecting the device, add the following tag. See Add Tags to learn more.
- 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
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:
- In Litmus Edge, navigate to Analytics.
On the analytics canvas, click Add processor. The Create a processor dialog box displays.
- Select DataHub Subscribe.
In the Topic field, click the Search icon, select the device you previously created, and then select the alias topic for the input1 tag.
- Click Save.
- 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.
- Connect the DataHub Subscribe processor (tag: input1) to the Statistical Prediction processor with a wire and use the events connection.
- On the analytics canvas, click Save. The configured analytics flows should look like the following:
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.