Skip to Content
Product Information

How to create insights with SAP IoT Rules and Action Service and integrate them into other applications like the S/4HANA

SAP IoT’s Rules and Action services are core for automating business processes based on sensor data aka time series data. Since the launch of SAP IoT in March 2019 (named SAP Leonardo IoT at the time) the Rules service enables to create business insights on time series data in form of Events. These Events can then be forwarded via the Actions service e.g. to the SAP Business Suite, e.g. to trigger a replenishment process, a Service process, etc.

In the meantime, we have constantly evolved both, Rules and Action services and we are continuing the development here. In this blog we will give a few example scenarios for insights that can be realized with SAP IoT today.

Remote Monitoring of Assets and Maintenance Process

When assets are maintained, there is a benefit for costs as well as for availability when the maintenance process is switched from regular maintenance to condition-based maintenance. Condition-based maintenance can be implemented via SAP IoT Rules and Actions. We will use this scenario to also give a bit more background about SAP IoT Rules and Action services.

SAP IoT Rules service supports different kind of rules that are crucial for condition-based maintenance scenarios:

Streaming Rules – Event can be used to monitor the asset for any threshold violations, e.g. if vibrations become to strong, a temperature is exceeded, torque is exceeded, etc. Using the different execution modes for streaming rules Rule Events are created only when the threshold is violated for the x-time in a row or for longer than y minutes. This enables to neglect sensor measurement error or to create only an Event, when the situation is serious enough for reaction.

Scheduled Rules can be used to observe longer time periods and e.g. determine if the average of a sensor value has moved above or below a threshold.

Streaming Rules – Derivation enables to calculate derived time series, e.g. an incline by time. E.g. if the temperature incline is too steep, this could be detected via a Streaming Rule on the derived time series.

To react on a positive rule execution, the SAP IoT Action Service is used. It forwards insights to backend systems like S/4HANA, email, or notifies users on its Fiori Launchpad.

Actions are defined based on a specific rule and typically create maintenance notifications e.g. in S/4HANA Enterprise Asset Management (EAM). The Actions design time app allows to use all available data for a Thing: Basic masterdata, custom masterdata, time series data, thresholds (reference values of the time series data Property Sets), Event data like time, etc. E.g. the S/4HANA Equipment ID can be set as the Things’ External ID to create maintenance notifications.

In order to re-use actions, the same action can also listen to several Rules events.

Further, Actions can be chained. For example, in a condition-based maintenance app for assets, the result of the Action creating the maintenance notification – the maintenance notification ID – can be forwarded to the application or as Fiori Launchpad notification to a user. The user to be informed for this machine could be read from a basic masterdata field in the Thing Model.

Sometimes it is important to activate or deactivate rules for individual machines; e.g. during maintenance, rules should be deactivated. Directly after maintenance the machine should be put under special monitoring. This can be achieved by setting the thresholds of the time series Properties accordingly. E.g. by setting a threshold to “null” the rule using the threshold will not trigger an Event. Or the threshold values can be adapted to a tighter range after maintenance for special monitoring. Further, the now available APIs of the SAP IoT Rules service can be leveraged for automation.

In summary, it is easy and coding-free to extend Enterprise Asset Management processes and to implement condition-based maintenance using SAP IoT.

Automate Operation in Intelligent Factories

The first thought when thinking about automating shopfloor operations using Rules and Actions is typically into the direction of automating the production of goods. Here, typically a very quick response time is required, why we recommend for such scenarios the SAP Edge Services solution.

However, there are many more scenarios where running rules in the Cloud using SAP IoT is very beneficial. Two of such scenarios are e.g. handling units monitoring or continuous cycle counting with automatic replenishment.

Handlings units can be equipped with sensors to monitor environmental conditions like temperature, humidity, shock, etc. Here, similar monitoring rules like for remote monitoring of assets can be used. This can be used monitor the quality of the good while being moved through the shopfloor.

Further, handling units can be equipped with location sensors providing the position of the unit. Using SAP IoT Streaming Rules, it can be detected if a handling unit is moved into a not allowed area or is located longer than a specified duration in an area.

Any detected exceptions can be reported to S4/HANA using the SAP IoT Action service.

Cycle counting can be transformed from a manual process to an automated process using IoT. E.g. using electronic scales, the weight of goods in a storage location can be determined. Using SAP IoT Derivations, a new time series could be calculated stating the remaining number of goods at the storage location. A Streaming Rule can determine, if the remaining number of goods is below the refill threshold and an Action can trigger the replenishment process. The manufacturing process will not run out of good and production is not on-hold waiting for required goods to be made available again.

Cold Chain Monitoring

Cold chain monitoring is important for many products. Here, different complex rule conditions are applied. This can be a simple temperature threshold violation, e.g. if the product becomes warmer than 8°C the product is considered spoiled. A more complex rule is if the product is warmer than 8°C for more than 30 min. Both rules can be modelled using SAP IoT Streaming Rules; the later one uses the Duration execution mode.

The most complex condition uses so called Temperature Budgets. That is, the product gets a Budget assigned of e.g. 100 temperature minutes allowed threshold violations. Assuming again 8°C as threshold, if the temperature is 10°C for 1 minute, the budget would be decreased by 2. If the budget reaches 0 or below, the product is considered spoiled. Such a temperature budget rule can be achieved by a combination of Derivation Rule and Scheduled Rule. The Derivation Rule calculates if and what amount needs to be subtracted from the budget per ingested temperature measurement.  The Scheduled Rule sums up the derived time series and compares it against the temperature budget.

Intelligent Service of Products

Intelligent remote service is a field that gains more and more traction across the discrete industries OEMs. Here, OEMs sell premium remote condition monitoring and predictive maintenance service for their products.  Here, rules are a crucial functional piece. SAP IoT Rules and Actions enable the OEMs to detect anomalies or failures in time and enable to inform service technicians or the customer directly. Rules that can be applied here can be like the ones discussed for remote monitoring of assets. However, there is a difference. In remote monitoring of assets, mostly the rules apply for individual machines. When doing remote service of a fleet, the rules apply e.g. to all machines of the same model. However, these machines will typically be used in different production processes, in different environmental conditions, etc. by customer. Therefore, typically, the individual thresholds used to trigger a warning or alert need to be configured by machine. E.g. a pump’s critical temperature might be a one customer at 80°C but at another customer at 120°C. SAP IoT Rules supports this by considering the Thresholds set individually per Thing in the Thing Model’s Reference PropertySets. To maintain such thresholds the Thing Modeler app or SAP IoT APIs can be used.

Further, with this it can be easily controlled, if a customer should be able to remotely monitor the machine because the customer subscribed to the service, or not. By providing the customer access to its things via the instance-based authorizations of the Thing Model, the customer can set the Thresholds only for its owned Things. If the customer did not subscribe to the service, the customer does not get access to the Thing and the Thresholds are set to null; the rules will never throw warning or alert Events.

As OEM you can also provide preconfigure standard rules where the customer just sets the threshold for the rule according to the individual usage of the machine and the environmental conditions it is in; so, the customer decides what the pump’s critical temperature is. In parallel it is possible to have rules that cannot be adapted by the customer. E.g. Rules with fixed Thresholds can be used to determine if the pump was operated within or outside of the allowed parameters as basis for warranty decisions.

Movable Products and Geolocation Services

For movable products like Intermediate Bulk Containers (IBCs), vehicles, etc. geolocation service like geo-fencing are often relevant.  Using the SAP IoT Geolocations apps or API any relevant Areas of Interest can be defined, which can be used as geo-fence. Using the SAP IoT Geo-Fencing service, you can define reactions to any “Entry” or “Exit”-Events to those Geofences. E.g. when an IBC has been transported to a customer, the IBC could be automatically assigned to this Business Partner. When the IBC is picked-up again for refill, the association is removed again.

For vehicles Derivation rules can be used to calculate additional time series based on the transmitted geolocations, e.g. the distance travelled between the last and current location, or the average movement speed. Here, Derivation rules also takes into account out-of-order data for a time window of up to 5 days – a very important feature if you work with telemetry onboard units; onboard units cache data that cannot be sent out due to connectivity loss for a few days. Such older data is typically sent out in reverse order. Derivation rules detect such situations and correct previous calculated results automatically.

Gaining Insights into People’s behavior and Improving their Safety

Continuing with scenarios based on geolocation data, SAP IoT can be used to determine a driver score for trips taken with a vehicle. Here, streaming rules or the geo-fencing service are used to determine the start and end of trips. The SAP IoT Segmentation Service consumes the Rule Events or geo-fence Events and creates a list of trips performed by your vehicle fleet. Per Segment the start time, end time, duration can be retrieved. Further, using the SAP IoT Thing Time Series OData Service KPIs of the trip, like average or maximum speed, acceleration, etc. can be determined.

If there exist areas where hazardous situations might occur, such situations can be detected with environmental sensors and streaming rules that check if a threshold is violated for a specific duration. If persons working in such area are wearing body tags, the SAP Geofencing API can provide information, which persons are currently in the area, so they can be notified.

Similar, if there are areas where persons should not work longer than a specific time period due to hazardous conditions, it can be identified if persons exceed the allowed time in the area using SAP Streaming rules.

Conclusion

The above scenarios show the wide variety of use cases that can be realized with SAP IoT. Of course, we are continuing to evolve the services and capabilities mentioned in the is article. Important to highlight is, that all these scenarios can be realized using the easy to use design time editor apps of SAP IoT or its APIs. All the example can be realized without coding, without the need of an additional application.

There will be more technical blogs coming on the new developments in SAP IoT Rules service and SAP IoT Action service.

/
1 Comment
You must be Logged on to comment or reply to a post.