-
Notifications
You must be signed in to change notification settings - Fork 17
Home
Sucker pumps are a a mainstay of many oil companies. They run continually, extracting oil from wells in remote areas of the world.

Oil and Gas companies want to operate the sucker pumps in an efficient, safe and environmentally responsible manner. Companies use dynamometers (dyno) surveys to determine the condition of the pump operating beneath the ground or downhole. Medium to large oil companies can have thousands of these pumps scattered throughout remote areas of the world. It is very costly to inspect thousands of Dyno Cards individually.
A technology solution can be implemented to detect issues with the pump using data points captured from the Dyno Card, capture historical data, potentially stop the pump and alert field technicians.
The goal of this Dyno Card demo is to show how Azure technologies can be applied to meet this challenge. Azure IoT Edge technologies will be applied to:
1. Detect issues at the edge
2. Send both immediate and historical dyno card messages to the cloud. These messages can used to issue alerts.
3. Visualize both the surface and pump card
This github repo demostrates how to utilize:
1. Azure IoT Edge modules to retrieve Dyno Card data using both Modbus and OPC Server interfaces
2. Save Dyno Card data to a local SQL Server Data Store
3. Azure ML to detect issues with Sucker Pumps
4. Azure IoT Edge to send messages to IoT Hub
5. Use a Stream Analytics Jobs to save data to an Azure Data Lake
6. Use a Logic App to save data through a Web API into a database
7. User Power BI to visualize the Dyno Card data
Please note: There is only one custom IoT Edge module used to store, alert and respond to DynoCard anomalies. Ideally, each would be its own module that could be deployed independently. However, a base .NET container will be around 225 MB. The code adds little to the size of the container. We decided to combine the code into a single container to minimize container size which will minimize the impact to the local device and network bandwidth. Iot Edge Dyno Card Alert Module
This section will describe the Azure IoT Edge portion of the solution architecture.
This demo currently supports 1 simulator, Modbus Simulator.
The Modbus establishes a Modbus TCP/IP connection with the IoT Edge's Modbus Module and sends Dyno Card DataPoints to it.
The Modbus simulator is implemented as an Azure VM. The Azure VM contains Modbus simulator software and a .vbs script that is used to set DynoCard surface and pump card data points.
The Modbus Simulator Provisioning wiki page has more information about the tools used and provisioning process. https://github.com/BlueMetal/iot-edge-dynocard/wiki/6.-Modbus-Simulator-Provisioning
The IoT Edge Modbus module will detect that data points have been written to specific registers, capture that message and send it to the IoT Edge runtime route.
The Dyno Card Alert module will save all Dyno Card data points to a local SQL Express database also running as an IoT Edge module. The allows historical Dyno Card data points to be pulled and sent to IoT Hub.
The module will then reshape the message into a format that the Azure ML module can receive and sent it to the Azure ML module using IoT Edge routing.
The Azure ML module will receive the message, randomly determine whether an anomaly was detected and send an anomaly detected message if one is detected to the IoT Edge runtime.
It's designed to support a DynoCard anomaly detection module, but one is not provided as part of this demo. We expect that Oil & Gas companies will have their own module that they would want to plug into this architecture.
The last step of the process is to detect the anomaly and send messages both to IoT Hub and to the Modbus module. The Dyno Card Alert module subscribes to the Azure ML module anomaly message, retrieves the Dyno Card data points both for the card that caused the anomaly and historical data points and sends those cards to IoT Hub. In addition, it will send a message to the IoT Edge Modbus module to set a register which will stop the pump.
This portion will describe the Azure Portion of the solution
Azure IoT Hub is used as a Azure edge module registry and as an event aggregation point. A IoT Hub route is created to copy messages to a Azure Service Bus Queue which can be picked up for transactional processing.
The Azure Container Registry stores the IoT Edge modules including the Microsoft Modbus and SQL Server as well as the custom developed Dyno Card Alert and Azure ML modules.
Azure Stream Analytics reads Dyno Card events from IoT Hub and send them to Azure Data Lake for long term storage.
Azure Data Lake is used to store Dyno Card events over a long period of time.
The Azure Logic app will retrieve messages from the Azure Service Bus Queue (not pictured in arch document) and calls a Web API to save the Dyno Card data to a database.
The database will store the Dyno Card data and make it available to Power BI.
Power BI is used to visualize the Dyno Card data stored within the database.