PROJECT FLOW
Objective:
Implement a real-time, in-situ etch-depth prediction and control system during plasma etching of
silicon wafers. Leverage combined sensor data and imaging with ANN/BNN models to estimate
depth,and automatically adjust process parameters mid-run.
Flow:
the plasma etching machine begins a new wafer process cycle, sensors embedded around the
chamber start streaming real-time data such as RF power, chamber pressure, gas composition, and
temperature. These signals are captured continuously by industrial-grade PLCs and pushed into an
OPC-UA gateway. Simultaneously, a high-frame-rate industrial camera captures visual frames of the
wafer surface, and each frame is timestamped and streamed via RTSP into the system. A
synchronization module aligns these incoming data streams using timestamp correction logic,
ensuring sensor readings and images are paired correctly within the same processing window. Once
synchronized, the combined data enters a Kafka pipeline. Sensor data flows through the sensor.raw
topic, and image frames pass through image.raw. A downstream stream processor listens to both
topics, joins the data temporally, and emits unified messages into the sync.frame topic.
The frame processor service then takes over. It normalizes raw sensor values using predefined
calibration curves and statistical scaling. The image frame is run through a lightweight CNN that
extracts both low-level statistics,like color channel histograms and edge density,and higher-level
features derived from pretrained convolutional layers. These features, combined with the sensor
vector, form a complete real-time representation of the wafer environment at that moment. This
feature vector is temporarily cached in Redis for immediate access, while also being stored in a
MongoDB archive for longer-term traceability and retraining.
This prepared feature vector is then forwarded to the inference engine. This engine is deployed
either using FastAPI or TorchServe, depending on the current deployment mode. The engine loads
the latest production model,a neural network trained to estimate the plasma etch depth given the
environment features. The inference returns a predicted depth, and if the Bayesian version is used,
an uncertainty score is also included. The model response is logged, along with its latency and
confidence metrics, and written to a time-series database for performance tracking.
The predicted etch depth is then passed to the control logic engine. This engine compares the
predicted depth against the expected trajectory for the current wafer and calculates the necessary
adjustment to the RF power or gas mix to keep the process within optimal bounds. These
adjustments are constrained by a safety policy engine, which prevents commands that exceed known
safe operational thresholds. If the adjustments are valid, the control module issues actuation
commands via MQTT or directly into the OPC-UA control interface to alter the machine parameters
in real time. This closed-loop control operates continuously, completing every decision cycle in under
500 milliseconds.
Parallel to this live loop, a training pipeline runs periodically,triggered by schedule or model drift
detection. When activated, it extracts recent data windows from the MongoDB archive, preprocesses
them, and retrains the neural networks using PyTorch or TensorFlow. Models are versioned and
logged in MLflow along with their training metrics. A CI/CD pipeline automatically tests new models
for integrity and performance. If they meet deployment criteria, the model is canary-deployed to a
staging inference endpoint, where a portion of real traffic is mirrored for performance comparison. If
the new model performs well, an API call promotes it to production. In case of degradation or
anomaly, a rollback is triggered immediately to a previous stable model.
Meanwhile, all components emit metrics and logs. Prometheus scrapes inference latency, prediction
accuracy, actuation frequency, and system health. Logs are routed to an ELK or Loki stack, which
feeds Grafana dashboards and alert rules. Alerts fire when prediction error rates rise above
thresholds, control commands are missed, or system components fail health checks. The system also
tracks and logs every manual override, model deployment event, and control action for full
traceability. The result is a highly responsive, real-time, ML-powered etch depth management
pipeline tailored for semiconductor manufacturing environments, built for robustness, explainability,
and performance.
- Data Pipeline (Sensor → Inference)
Sources:
• PLC streams (via OPC-UA)
• Industrial cameras (via frame grabber or RTSP)
• Synchronization module (timestamp-aligns data)
Ingestion:
• Kafka topics:
o sensor.raw
o image.raw
o sync.frame
Feature Extraction:
• Sensor parsers → normalized features
• Image processor → statistical + deep features
• Output: unified feature vector
Feature Store (Optional layer):
• Write to Redis (for real-time)
• Archive to MongoDB or S3
- Inference Pipeline
Model Server (FastAPI / TorchServe):
• Takes feature vector
• Responds with:
o Predicted etch depth
o Uncertainty score (if BNN)
Latency Budget:
• Sensor → Feature → Inference → Actuation < 500ms
- Control & Actuation Pipeline
Feedback Loop:
• Compare predicted depth vs. target
• Generate actuation signal (Δ RF power, Δ gas mix)
• Write command to OPC-UA or MQTT interface
Safety Layer:
• Rule-based engine to clamp values
• Manual override API route
• Watchdog for failure detection
- Training & Re-Training Pipeline
Trigger:
• Daily/weekly scheduled retraining
• Or performance drift triggers (MSE > threshold)
Steps:
- Pull last 7 days of feature+label pairs
- Preprocess + augment
- Train models (ANN + optionally BNN)
- Validate on holdout set
- Push to MLflow registry
- CI/CD for Models
Trigger:
• New model registered in MLflow → GitHub Actions trigger
Flow:
- Run unit + integration tests
- Validate performance metrics
- Deploy to staging endpoint (/predict/etch-depth?env=staging)
- Run canary A/B testing (10% traffic)
- Promote to production or rollback via /model/deploy
- Monitoring & Observability
Metrics (Prometheus):
• inference_latency_ms
• model_accuracy_windowed
• depth_prediction_mse
• plc_actuation_failure_rate
Logging (ELK / Loki):
• Sensor ingestion failures
• Actuation command errors
• Prediction outliers
Alerting (Grafana/Alertmanager):
• MSE spike > threshold
• No actuation in last N seconds
• Anomaly rate > baseline
- Security & Access
• JWT token enforcement at API layer
• Service mesh (Istio or Linkerd) to isolate ML model from direct external access
• RBAC for model registry and control overrides
Product Summary:
Layer Tooling / Tech
Ingestion Kafka, OPC-UA, RTSP
Processing Python, NumPy, OpenCV, PyTorch
Model Serving FastAPI, TorchServe, Redis
CI/CD GitHub Actions, Docker, MLflow
Monitoring Prometheus, Grafana, Loki
Control Interface MQTT/OPC-UA, Safety Rules, Redis
Artifact Storage S3, MongoDB, PostgreSQL
Phase Description Rol