Use MongoDB Atlas Vector Search and AWS Bedrock for advanced root cause diagnostics, integrating diverse data types for real-time analysis and proactive maintenance.
Use cases: Gen AI
Industries: Manufacturing and Mobility, Aerospace and Defense
Products: MongoDB Atlas, MongoDB Atlas Vector Search, MongoDB Change Streams, MongoDB Atlas Database, MongoDB Atlas Triggers, MongoDB Atlas Charts
Partners: Amazon Bedrock, NextJS, panns-inference
Solution Overview
A complex value chain supports the manufacturing industry, spanning from inventory management to connected equipment and products. Root-cause diagnostics help solve problems, improve processes, and boost the overall efficiency and quality of this value chain. Root-cause diagnostics identify the underlying sources of issues and ensure they are fixed permanently and do not recur.
Root-cause diagnostics offers the following benefits:
Eliminates recurring problems: It addresses the true root cause, removes the need for temporary fixes and prevents the problem from happening again, saving time, money, and resources.
Enhances process efficiency: It identifies bottlenecks and inefficiencies at their source, which leads to increased output and reduced production costs.
Promotes safety and environmental practices: It makes operations safer and more environmentally friendly through proactive interventions and risk prevention.
Drives continuous improvement: The systematic approach of root-cause diagnostics improves processes and fosters innovation.
Despite its benefits, implementing root-cause diagnostics can be challenging due to the large amounts of data from sensors and machines, as well as the variety of data types. Traditional methods depend heavily on human expertise, knowledge, and experience.
This solution explores the application of AI and MongoDB Atlas Vector Search for advanced root-cause diagnostics. It uses sound input and AWS Bedrock to generate real-time reports on detected anomalies. This implementation enhances real-time monitoring and maintenance.
Reference Architectures
This demo architecture uses the following components to capture, store, analyze, and report data.
Engine and Raspberry Pi
Engine control: The engine connects to Raspberry Pi.
Telemetry sensors: The Raspberry Pi is equipped with sensors to measure telemetry data such as temperature and humidity.
Car digital twin and mobile app
Virtual and physical integration: A car digital twin in JavaScript and an iPhone app connect to the setup. The apps send commands to MongoDB, which then streams these commands to the Raspberry Pi. This action triggers the relay to start the physical engine and the digital twin.
Audio diagnostics
Audio recording: Every second, the engine’s audio is recorded.
Vector conversion: An embedder converts the audio clips into vectors. These vectors are then stored in MongoDB.
Vector search: Using Atlas Vector Search, the system predicts the engine's status, such as whether it is off, running normally, or has detected a metallic or soft impact. It then displays this information in the apps, giving users real-time diagnostics.
AWS Bedrock integration
Automated reporting: When the system detects an anomaly, such as abnormal audio, Atlas triggers a function that sends telemetry data and sound analysis results to AWS Bedrock.
Report generation: AWS Bedrock generates a detailed report and sends it to the dashboard for review.
This architecture creates a feedback loop where edge devices generate data for real-time control and monitoring, now enhanced with audio diagnostics through vectors. The integration shows the advantages of utilizing Atlas Vector Search for root-cause diagnostics, which improves efficiency, reliability, and innovation in manufacturing operations.
Figure 1. Demo architecture
Build the Solution
To implement this solution, follow these steps:
Get your hardware ready
To replicate this demo, you need:
An engine to simulate the real use case of a machine. This tutorial uses the four-cylinder Teching DM13 engine replica, but you can run this demo with any piece of hardware that can run and make noise.
A Raspberry Pi 5, which is the bridge to host the software that communicates with the cloud.
To find the detailed information on how to set up these tools, visit this GitHub repository.
Alternatively, you can simulate this solution without the physical engine by following the instructions in this GitHub repository.
Set up MongoDB Atlas
Create a MongoDB cluster. If you don’t have an Atlas account, create an account following these steps.
After your cluster is ready, replicate the
application database. This database contains sample vehicle and sensor
data required to use the app. Download the dump
file from the GitHub repository
and use the mongorestore command to load it into your cluster.
Detect anomalies through sound input
Follow the instructions in this GitHub repository to enable real-time acoustic diagnostics. The instructions include how to set up the analytics dashboard, link it to the data source, and create a vector search index.
Integrate AWS Bedrock for AI-enhanced analytics
Use Atlas Triggers, AWS EventBridge and AWS Lambda Functions to integrate with AWS Bedrock. Follow the instructions in this GitHub repository.
Run the web portal UI
The web portal includes the vehicle's digital twin, an acoustic diagnostics interface for audio streaming and training, and the analytics dashboard. To set the UI, update the environment variables with your MongoDB cluster connection string and the URL of your Atlas Charts dashboard. Then, run the Next.js application.
Refer to the GitHub repository for additional setup details.
Bonus! Control your vehicle from a mobile device
For a more realistic connected vehicle experience, you can control the engine replica and digital twin from a mobile app. Open the Swift project in Xcode, update the environment variables, and run the app on an emulator or your own iOS phone or tablet.
Key Learnings
Obtain enhanced diagnostics: Integrate Atlas Vector Search with audio diagnostics to enable precise identification of engine statuses and anomalies, providing deeper insights into root causes.
Enable real-time monitoring: Use MongoDB and Atlas Vector Search to enable real-time data processing and immediate response to anomalies for a proactive maintenance approach.
Integrate different data types: MongoDB’s document model efficiently handles diverse data types, simplifying the integration of structured telemetry data and unstructured audio data.
Scale data management: Use MongoDB Atlas to handle increasing IoT data signals generated in manufacturing environments.
Generate automated reports: Automate the generation of detailed reports based on detected anomalies, simplifying the reporting process.
Authors
Humza Akthar, MongoDB
Rami Pinto, MongoDB
Ainhoa Mugica, MongoDB