Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member183045
Contributor

1.  Motivation


The last years a lot of new "digital terms" rised in the IT industry. Internet of Things, Machine Learning and Cloud Computing are some of them. These technologies are not completely new.  Machine to Machine Communication, Neuronal networks or applications which are hosted outside a company exists since decades.

What seems to be changed in the recent years is that these technologies can be used without deep technical knowledge.

                     How easy is it really to bring your IoT device into the cloud?
Can Machine Learing replace self-coded algorithms to monitor machine behaviour?


To get an answer for this questions is the motivation for this blog where I describe how to build a simple running application containing the above mentioned technologies with things everybody has at home. So you should have everything at home to try this sample out by our self.

A main focus is to get a running example with the minimum necessary effort, but also fulfil a practical use case.
-> In short: To create the minimum viable product for monitoring a machine with the SAP Cloud Platform 😉

2. System overview


I realised the sample application with the trial account of the Cloud platform. I activated two services - Predictive Services and Internet of Things and as common data storage the HANA MDC (<trial>) database.

As sensor I used an Android phone with a simple self-created Android app to send the data. The rest of the application architecture resides in the cloud as you can see in the following picture.


System overview



(images from: https://www.sap.com/germany/developer)

The target is to monitor a production machine and identify machine failures by detecting “uncommon movements”. To identify this uncommon movements nowadays normally specific algorithms with a lot of design and implementation effort are used.

But as most of production machines repeat the same movements continuously wouldn't it be easier to compare the actual movements to movements in the past.  -> A perfect task for machine learning.

The sensor data in this example was received by fixing the mobile phone onto the turning part of a drilling machine nearly everybody has at home for small tasks like fixing pictures on the wall.

As each smart phone has an integrated accelerator sensor which delivers constantly the acceleration values for the x-value, y-value and z-value, it offers the perfect sensor to track the turnings of the drilling machine and create the base data to detect unusual movements.

There is a plenty amount of other sensors for temperature orientation, light or proximity in relative to the view screen. But for the beginning I kept it simple and used only the accelerator sensor.

3. Implementation


The sensor and configuration of the Internet of Things service


As mentioned above I used my Android phone as sensor. This is not the perfect sensor but it is one sensor everybody has at home.
The description of the necessary Android App and the necessary configuration of the Internet of Things service is described in the following document: Monitoring a production machine with SAP Cloud Platform, IoT service.

Setup of the HANA database


There are no special tasks needed while setting up the HANA MDC database. The only things to consider is to link the data source bindings of the two generated java applications (aac4paservices and iotmms) of the Internet of Things service and the Predictive services to this database.

Configuration of the predictive services


Within the predictive services there is a perfect service the Outliers API for detecting uncommon machine movements. This service returns all data points which do not correlate to the others. So if for example you have 10 minutes regular data points (values for x-, y- and z-Acceleration) and then you get an data point which does not correlate to the previous data points, the system returns an outlier and the user can be alerted. Details how to call the Outlier API can be found in the following document.
Monitoring a production machine with SAP Cloud Platform, predictive services

Visualisation and failure alert


For the visualisation of the data I wrote a simple SAP UI5 APP in the Cloud Platform. Well, I did not write it entirely on my own. There is already a very good blog which helped me a lot as starting point when visualising IoT data in the Cloud platform: Visualising iPhone sensor data with SapUI5.

In the following picture I visualised a sample testrun with my Android phone fixed on a drilling machine. At approximately the time point 54000 milliseconds from start I gave the drilling machine a kick. The outlier service gave me the first outlier result at nearly exactly this time point back - thus it detected perfectly the unregular machine movement.



5. Summary


I am really surprised how fast you get the SAP Cloud Platform, predictive services running and how intuitive the handling of the different API functions is. The setup of the Internet of Things services took me more time, especially because you have to delete and add a device if you want to change an already assigned message - which leads also to a change of the connection data on your sensor if you work with the bearer token.

The outlier service gives really good results if the sensor data trend is smoove and/or of course if the outliers have a significant distinction to the common trend.

The best results I got with sensor data correlating to a sinus function which you get for example from a turning machine part. With another machine that has a lot of noise in the sensor data I did not get satisfactory results but to be honest it would also not be easy to write an fault detection algorithm for this machine.

A major topic I excluded in this sample is security which would be the next step to a productive version. But due to the fact that except of the sensor everything else is in the Cloud security should be only a topic for the sensor to cloud connection.

My key take away of playing around with the Cloud Platform is that a solution of monitoring a production machine in the cloud could be a viable option for some special use cases.

If I am thinking about a production machine which is maintained completely inside a production plant I think an on-premise solution is the better choice.
But when I am thinking about machines or sensors which are distributed over different locations, moving around ie. inside cars or machines of third party suppliers which you do not want to integrate into your companys private network I think a cloud approach like the above shown could be the better choice.
2 Comments
Labels in this area