Before You Begin
This 15-minute tutorial shows you how to use metrics or Key Performance Indicators (KPIs) to help you track key asset data for your monitored assets and predict the need for maintenance using the Oracle Internet of Things (IoT) Asset Monitoring Cloud Service application.
Background
An airport has implemented an Oracle IoT Asset Monitoring Cloud Service application to monitor and manage its movable and fixed location assets. The tracked assets are rubber cleaning machines, HVAC units, generator units, and runway sweeping machines. The application is configured to locate assets, trigger incidents and alerts, display the historical and current values of the sensor data, and display the status of the incidents.
In this tutorial, you create KPIs by using the Visual Expression Builder feature of the Oracle IoT Asset Monitoring Cloud Service, you create a rule based on an anomaly, you also create a prediction and then a rule to take action on a prediction. You use a simulated sensor device that generates data about the runway sweeping machine.
What Do You Need?
- Access to an instance of Oracle IoT Cloud Service
- Access to an instance of Oracle IoT Asset Monitoring Cloud Service (version 18.3.5 or earlier)
- For the KPIs to work, you must define a place, an asset, a rule, and an anomaly. Complete these tutorials to define them: Configuring an Oracle IoT Asset Monitoring Cloud Service Application, Tracking Assets in an Oracle IoT Asset Monitoring Cloud Service Application, Monitoring Assets in an Oracle IoT Asset Monitoring Cloud Service Application
Use the Visual Expression Builder to Create a KPI
In this section, you create a custom KPI at the configuration level using the Visual Expression Builder to define an expression to calculate the average of the engine temperature of the runway sweeping machine.
- Sign in to your instance of the Oracle IoT Asset Monitoring Cloud Service application.
- Click Menu
and then click Configuration
. Click Metrics
if you are not already in that field and then Create Metric
.
- On the Create/Update Metric page, enter
Runway Sweeping Machine avg temp
, then click Entity Type field and select RunwaySweepingAssetType. - From the Metric Type drop-down list, select Query and from Calculation Schedule, select Live.
- On the Formula editor, click Click here to insert formula.
- On the popup, select the aggregation Average.
- Click the arrow between the parentheses to show the Formula menu popup and select Property, then Sensor and then engineTemperature.
- Click Validate Formula to see if the expression is valid.
- Click Save and then Republish. You need to wait a few minutes after clicking that button for the KPI to be available.
- Click Back.
![veb KPI](img/veb_1.png)
![veb KPI 2](img/veb_2.png)
If you click Advanced, you can edit the expression.
Add the Custom KPI to the Asset Dashboard
- Click Menu
and then click Assets.
- On the Assets page, for the Runway Sweeping Machine 1 asset, click View
.
- On the Runway Sweeping Machine 1 page, click Configure metrics
. Click
in the placeholder.
- On the Create Metric page, enter or select the following values:
- Type: Metrics
- Metric: Runway Sweeping Machine avg temp
- Label:
Avg temp
- Unit:
°
- Color: Orange
- On the metrics bar, notice the Avg temp KPI, and then click Save.
Description of the illustration kpi_avg_temp.png
Create an Anomaly Based Rule
In this section, you create a rule for the sweeping machine asset type, so that a warning is generated when the Fuel Level anomaly occurs.
- Access the Oracle IoT Digital Twin Simulator application at
https://your Oracle IoT Cloud Service instance name/ds.
- On the Simulator Model Dashboard page, click AirportRunwaySweeper.
- On the AirportRunwaySweeper page, select the Send Anomalous Spike check box for the device. The first anomalous spike will be sent in 10 minutes and the next after an hour.
- After 10 minutes, sign in to the instance of your Oracle IoT Asset Monitoring Cloud Service application.
- Click Menu
and then click Rules.
- On the Rules page, click Create New Rule
.
- On the Create New Rule page, in the Details section, enter or select the following values:
- Name:
Sweeper Engine failure warning
- Apply to: Asset Type then select RunwaySweepingAssetType
- Name:
- In the Condition section, select Fuel Level Anomaly then select Occurred.
- In the Fulfillment section, select the following values:
- Fulfill when: All Conditions Apply
- Generate: Warning
- In the Warning Details subsection, enter or select the following values, and click Save:
- Summary:
Sweeper machine engine failure
- Type: Outage
- Level: High
- Suppression: 10
- Description:
Sweeper machine engine failure
- Summary:
- Click Save and then Back.
- Click Menu
and then click Warnings.
- Look at the Status, Level, and Created Time values for the most recent warning. It was created because the simulated device triggered the Fuel Level anomaly. The warning indicates that the machine has a failure.
Description of the illustration warning.png
Create a Prediction
A prediction uses historical and transactional data to predict future asset parameters, and to identify potential risks to your assets. In this section, you create a prediction to warn you of impending sweeping machine failure in advance.
Note: For predictions to work, the data source must have at least 72 hours of historical data in it. This is required for predictive analytics to train the system.
- Click Menu
and then click Configuration and then Predictions
.
- Click Create New
.
- On the Configure New Prediction page, enter or select the following values:
- Name: Fuel Level prediction
- Metric Data Type: Continuous
- Asset Type: RunwaySweepingAssetType
- Attribute: fuelLevels
- In the Historical Data section, select the following values, and click Save:
- Training Data: Use internal Oracle IoT Cloud Service device data
- Next 24 hours
- Click Save and then click Republish. Ensure that the page displays the Activated status.
- Click Menu
and then click Assets.
- On the Assets page, for Runway Sweeping Machine 1, click View
.
- On the Runway Sweeping Machine 1 page, review the tab of Predictions.
Create a Rule to Take Action on a Prediction
In this section, you create a rule for the sweeping machine asset type, so that an incident is generated from a prediction allowing maintenance that prevent outages.
- Click Menu
and then click Rules.
- On the Rules page, click Create New Rule
.
- On the Create New Rule page, in the Details section, enter or select the following values:
- Name:
Sweeper Engine failure prediction
- Apply to: Asset Type then select RunwaySweepingAssetType
- Name:
- In the Condition section, select Fuel Level prediction then select Equal, then select Accuracy Start and then 80%.
- In the Fulfillment section, select the following values:
- Fulfill when: All Conditions Apply
- Generate: Incident
- In the Incident Details subsection, enter or select the following values, and click Save:
- Summary:
Sweeper Engine failure prevention
- Type: Maintenance
- Priority: High
- Description:
Sweeper machine engine needs maintenance
- Summary:
- Click Save and then Back.
- Click Menu
and then click Assets.
- On the Assets page, for Runway Sweeping Machine 1, click View
.
- On the Runway Sweeping Machine 1 page, review the tab of Incidents.
Note: you need to wait until a prediction occurs prior to verify this kind of incident.
Want to Learn More?
- Use Asset Metrics or Key Performance Indicators in Using Oracle Internet of Things Asset Monitoring Cloud Service