Deploying the test data generator

In order to have a simple framework for creating data, we started writing a test data creator, which will be part of a bigger time series and machine learning toolkit. This tool is running on the open source data flow platform called Node-RED--a graphical flow editor on top of Node.js. This is quite handy since Node.js is very lightweight and can, therefore, run on nearly any device, even IoT gateways such as the Raspberry Pi or BeagleBone.

We covered Node-RED and how to use it for generating test data in Chapter 6, Structured Streaming. So, in this case, we'll use it in order to implement the Lorenz attractor model, as explained previously.

The final idea is that this becomes part of the time series toolkit as well, with the capability of generating data by sampling various physical models, and you can decide on the degree of noise and also switch between different states of the physical model for anomaly detection and classification tasks.

But, for now, we've implemented the Lorenz attractor model only. This is a very simple but interesting physical model. Lorenz was one of the pioneers of the chaos theory, and he was able to show that a very simple model consisting only of three equations and four model parameters can create chaotic behaviour, a system highly sensitive to initial conditions and also oscillating between multiple semi-stable states, where state transitions are very hard to predict.

As the simulator is completely implemented as a Node-RED flow, we can just create a Node-RED IoT Starter Boilerplate on the IBM Cloud (of course, it runs on any Node-RED instance, even on a Raspberry Pi, where it can be used to simulate sensor data on the edge) or on your local machine.

The steps to get the simulator up and running are as follows:

  1. Deploy the Node-RED IoT Starter Boilerplate to the IBM Cloud.
  2. Deploy the test data generator flow.
  3. Test the test data generator.
  4. Get the IBM Watson IoT platform credentials in order to consume the data via MQTT from any place in the world.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.123.189