Power Plant Monitoring with EMQ* and Edge Insights for Industrial

ID 标签 762243
已更新 12/5/2022
版本 1.0
公共

author-image

作者

Overview

Power Plant Monitoring with EMQ* and Edge Insights for Industrial use case delivers a front-to-end solution of time series data collecting, distributing, processing, monitoring, and storage. It is a typical use case in the industrial environment where many industrial sensors (PLCs) generate time series data in different protocols. Industrial gateway software Neuron* can parse these protocols. Rules engine, eKuiper*, can set filters, algorithms to the data stream. EMQX, an MQTT message broker, provides a highly available, high performance messaging service. The data then flows into the TICK stack of Intel® Edge Insights for Industrial (Intel® EII) for data storage and monitoring.

Select Configure & Download to download Edge Insights for Industrial 4.0 with Time Series Use Case and then follow the steps below in Get Started.

Configure & Download

 

Icon for 3rd party Industrial

 


Target System Requirements 

Minimum System Requirements:  

  • 8th generation or higher Intel Atom® processor, Intel® Core™ processor, or Intel® Xeon® processor.
  • At least 4 GB RAM.  
  • At least 128 GB hard drive.  
  • An Internet connection.  
  • Ubuntu* 20.04

How It Works 

Edge Insights for Industrial uses the TICK stack for time-series data analytics. Telegraf*, InfluxDB* and Grafana* are parts of the TICK stack of Intel® EII. In this use case, industrial protocol gateway software Neuron, rules engine eKuiper, and MQTT message broker EMQX can ingest various industrial data before Telegraf in the TICK stack. 

The high-level flow of data is as follows: Modbus Simulator -> Neuron -> eKuiper -> EMQX -> Telegraf -> InfluxDB -> Grafana.

  • Modbus Simulator generates power plant’s time-series data in Modbus TCP.  
  • Neuron parses Modbus TCP data.  
  • eKuiper processes the data stream by adding rules and algorithms.  
  • EMQX republishes the message in the MQTT protocol in Pub/Sub mode.  
  • Telegraf is configured to input MQTT and subscribes data from EMQX.  
  • InfluxDB is connected to Telegraf to store the data.  
  • Grafana is used for data visualization and monitoring. 

When using EMQ IoT messaging software with Intel® EII, all the modules are running on the same node.

A complex architecture diagram showing the flow from Modbus Simulator to Grafana.
Figure 1: Architecture Diagram

Get Started 

Prerequisites 

Select Configure & Download to download Edge Insights for Industrial 3.0 with Time Series Use Case. For requirements and installation steps, refer to the Edge Insights for Industrial Get Started Guide.

Configure & Download

Step 1: Run EII Time Series with EMQ

  1. Generate EII time series deployment and configuration files: 
    cd [WORK_DIR]/IEdgeInsights/build 
    python3 builder.py -f usecases/time-series.yml

     

  2. Build ia_telegraf with new config. Replace [WORK_DIR]/IEdgeInsights/Telegraf/config/Telegraf/Telegraf.conf with Telegraf.conf. MQTT input plugin is configured. 
    cd [WORK_DIR]/IEdgeInsights/build
    docker-compose build ia_telegraf
  3. Get docker-compose.yml with EMQ software from docker-compose.yml, and replace [WORK_DIR]/IEdgeInsights/build/docker-compose.yml with the new one.
  4. Start EII time series use case with EMQX: 
    cd [WORK_DIR]/IEdgeInsights/build
    ./docker-compose up -d

     

  5. Check if all the services are up: 
    docker ps

    A terminal showing docker ps command and then the services and their status.

  6. Start Modbus simulator power_plant_modbus_simulator.py
    sudo pip3 install pymodbus==2.5.3
    sudo python3 ./power_plant_modbus_simulator.py

     

Step 2: Configure Neuron 

  1. Login to Neuron web console at http://localhost:7000 with username: admin and password: 0000.
  2. Add a south device named battery and a modbus-tcp plugin. Neuron screen with South Device, Add New Device selected. name is entered as "battery."
  3. Click on Device configuration on the battery tab to add configuration. Change the IP address to your host IP. A Neuron screen showing South Devices, Device Configuration with Host, Port and Timeout filled in.
  4. Click on the battery tab to add a group. Import a predefined list from upload-tag-template.xlsxNeuron screen showing South Devices, Group List, with a Device named "battery."
  5. Click on the data-stream-processing tab in North application. Add subscription to south device battery.  Neuron screen with North Application, Add Subscription screen with South device named "battery."

Step 3: Configure eKuiper 

  1. Install dependencies in the container: 
    sudo docker exec -it ekuiper /bin/bash 
    pip install numpy==1.22.3 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com 
    pip install scipy==1.8.0 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

     

  2. Download plugin from BatteryAlgs.zip and bcmath.zip. Copy them from host to the container. 
    sudo docker cp ./bcmath.zip ekuiper:/kuiper/bcmath.zip
    sudo docker cp ./BatteryAlgs.zip ekuiper:/kuiper/BatteryAlgs.zip

     

  3. Login to ekuiper web console at http://localhost:9082, with username: admin and password: public. 
  4. Add Service power_plant_demo. Use your host IP for Endpoint. eKuiper screen with Services, Edit Service selected.
  5. Click on service(power_plant_demo)->Extension->Portable->Create portable, add portable BatteryAlgs and bcmath. 
    file:///kuiper/bcmath.zip
    file:///kuiper/BatteryAlgs.zip

    eKuiper screen with Services, Create portable selected. Name is "BatteryAlgs" and zip file name is entered.

    eKuiper screen with Services, Create portable selected. Name is "bcmath" and zip file name is entered.

  6. Add Streams: NeuronStream, dt1StreameKuiper screen with Services, Source selected. NeuronStream is entered as Stream Name.

    eKuiper screen with Services, Source selected. dt1stream is entered as Stream Name.

  7. Add the rules at ekuiper_rules.mdeKuiper screen with Services, Rukes selected. Multiple IDs show on the screen with Start/Stop showing as "Start"

Step 4: Configure EMQX 

  1. Login to EMQX web console at http://localhost:18083, with username: admin and password: public.
  2. Add the rules at emqx_rules.mdEMQ screen with Rule selected. Three rules show as active.

Step 5: Configure Grafana

  1. Login to Grafana web console at https://localhost:3000, with username/password: root / eii23
  2. Import the dashboard. You can get a pre-defined demo dashboard from grafana_dashboard.jsonGrafana dashboard showing Import screen with options to load uploaded file.
  3. View Data in the demo dashboard. Grafana dashboard showing four types of data: battery health, mean voltage, working voltage, and open voltage.

Summary and Next Steps 

This use case showcases the typical workflow and usage of time-series data in the industrial solution.  

As a next step, add more rules and algorithms, such as anomaly detection in eKuiper, or add more industrial protocols in Neuron to explore more capabilities.


Learn More 

To continue learning, see the following guides and software resources: 


Troubleshooting 

  1. To check if the connections of the Modbus simulator and eKuiper are healthy, find the connection status in Neuron’s web console. A Neuron screen showing "south Devices" selected.

    A Neuron screen showing "North Application" selected.

  2. Monitor the data of the south device. A Neuron screen showing "Data Monitoring" selected.
  3. Check eKuiper rule status to find out rule execution status of each step. You can open the status window by click on the status icon of each rule. A Neuron screen showing "Services"  and "Rules" tab selected.
  4. Use websocket tool in EMQX to subscribe to a topic and to receive messages in real time. A Neuron screen showing "Websocket" selected.

    Terminal screen with "Websocket" selected and the option to select "Subscribe."

  5. Print the logs of ia_datastore: docker logs ia_datastore Terminal screen with logs of ia_influxdbconnector

 


Support Forum 

If you're unable to resolve your issues, visit Forum, Slack or GitHub for technical support of Neuron and EMQX.