1. Executive Summary
Reciprocating compressors are the workhorses of natural gas transmission, processing, and petrochemical operations. When a valve leaks or a component degrades, the consequences cascade quickly: unplanned shutdowns costing $50K-500K per incident, accelerated wear on adjacent components, and safety risks in high-pressure environments. The condition monitoring engineers responsible for catching these problems early rely on Windrock portable data collectors -- the industry standard -- but the analysis workflow has remained stubbornly manual. An engineer uploads field data, opens proprietary desktop software, visually inspects dozens of pressure and acoustic emission waveforms per machine, and writes a diagnostic report. A single compressor can take two to four hours of expert analysis. Multiply that across a fleet of machines and the bottleneck becomes obvious.
This project set out to change that equation. The team built a web-based diagnostic platform that ingests Windrock field data -- both the standard XML export format and the proprietary WRPM binary archive format -- and applies physics-based AI to automatically detect valve leaks from acoustic emission (AE) sensor waveforms. The system was validated at 93% detection accuracy on known leak cases, with results delivered in under two minutes from upload. An interactive visualization layer lets engineers verify findings against the raw waveforms, matching the quality they expect from professional Windrock software. A complete ML training pipeline -- including browser-based data labeling, 28-feature extraction, and XGBoost/Random Forest ensemble training -- provides a path to continuous accuracy improvement as labeled data accumulates.
The result is a platform that reduces diagnostic cycle time by an estimated 70-80%, standardizes analysis across engineers of varying experience levels, and creates a foundation for fleet-wide predictive maintenance. What once required deep specialized knowledge and hours of manual interpretation can now be accomplished by any condition monitoring engineer with a web browser.
2. The Challenge
The Manual Analysis Bottleneck
Condition monitoring for reciprocating compressors is a specialized discipline. Engineers use Windrock portable analyzers to collect high-resolution pressure traces, vibration measurements, and acoustic emission data from each cylinder and valve on a machine. A typical compressor has 4 to 10 cylinders, each with suction and discharge valves on both the head end (HE) and crank end (CE). A single data collection can contain dozens of waveforms that must be individually reviewed.
The standard workflow looks like this:
- Field collection: A technician attaches sensors and records data using a Windrock 6320 or similar portable analyzer, producing a WRPM data package.
- Data transfer: The WRPM file is transferred to an office workstation running Windrock's proprietary desktop software.
- Manual review: An experienced analyst opens each waveform -- pressure vs. crank angle, P-V diagrams, AE traces -- and visually identifies anomalies. Valve leaks appear as elevated acoustic emission amplitudes, but distinguishing a real leak from normal operating variation requires pattern recognition skills developed over years of practice.
- Report writing: The analyst manually documents findings, screenshots relevant waveforms, and writes recommendations.
This process has several critical weaknesses:
- Time: A thorough analysis takes 2-4 hours per machine. Engineers monitoring 20-50 machines per route cannot keep pace.
- Consistency: Two analysts reviewing the same data may reach different conclusions. Severity thresholds are subjective. Junior analysts miss subtle patterns that experienced engineers catch.
- Delayed action: By the time a report is completed and distributed, days or weeks may have passed since data collection. A valve that was showing early-stage leakage may have progressed to failure.
- Knowledge concentration: The ability to interpret AE waveforms and correlate amplitude patterns with valve condition exists in the heads of a small number of experienced engineers. When they retire or change roles, that knowledge leaves with them.
The Data Format Problem
Windrock dominates the reciprocating machinery analysis market, but their data ecosystem is largely closed. Field data is stored in WRPM files -- proprietary ZIP archives containing binary channel data in undocumented formats. The internal structure includes:
File Extension Content Format
.S$$ Continuous AE waveforms Float32 binary, ~2.4MB per file
.S&& AE hit events (threshold crossings) Text, 9 fields per record
.SDD AE parametric statistics Binary, per-collection-point
.P$$ Pressure waveforms Binary
.V$$ Vibration waveforms Binary
D6DYSEN.DAT Sensor name/channel mapping table Text
No public documentation describes these formats in detail. The only supported path to accessing the data is through Windrock's own desktop application. This creates a hard dependency: any custom analytics, fleet dashboards, or automated diagnostics require either manual re-entry of data or reverse engineering the binary formats.
The XML export option -- a three-file set of Curves, Levels, and Source XML documents -- provides a more accessible alternative but is not the native format used during field collection. Most historical data exists exclusively as WRPM files.
The Business Impact of Delayed Diagnostics
Unplanned compressor downtime in natural gas operations carries significant costs:
- Direct downtime: $50K-500K per incident depending on the machine's role in the process (transmission vs. gathering vs. processing).
- Cascading damage: A leaking discharge valve creates backflow that overloads the suction valve, turning a single-valve repair into a multi-valve rebuild.
- Regulatory and safety risk: In high-pressure natural gas service, valve failures can escalate to rod failures and pressure boundary breaches.
- Deferred production: In gathering operations, compressor downtime means wells are shut in or production is curtailed until the machine returns to service.
The gap between data collection and actionable diagnostics is where value is lost. Every day of delay represents risk that could have been mitigated.
3. The Solution
Platform Overview
The team built a web-based diagnostic application using Python and Streamlit that provides end-to-end functionality: data ingestion, automated analysis, interactive visualization, and diagnostic reporting. The system was designed around two core principles: (1) work with the data formats engineers already use, and (2) deliver reliable diagnostics even without large labeled training datasets.
Multi-Format Data Ingestion
The platform accepts both major Windrock data formats through a unified data loader that automatically detects file type and routes to the appropriate parser:
- XML three-file sets (Curves, Levels, Source): Parsed via a dedicated XML parser that extracts crank-angle pressure traces, valve performance curves, and machine configuration metadata. The parser automatically discovers machine topology -- number of cylinders, valve positions, sensor types -- directly from the data.
- WRPM binary archives: Parsed via a custom WRPM parser that extracts continuous AE waveform data from
.S$$Float32 binary files. The parser handles multi-channel segmentation, applies sensor calibration (converting raw ADC counts to G-force units using the formulag = raw_count / 32768.0 * full_scale_g), and filters engine ignition saturation events -- massive amplitude spikes (~2x10^38 float values) caused by spark plug firing that would otherwise corrupt compressor valve analysis. Channel identification uses theD6DYSEN.DATsensor name table to isolate compressor cylinder AE channels from engine power cylinder channels.
Both paths produce a consistent DataFrame output that feeds directly into the detection pipeline, making the data source transparent to downstream analysis.
Physics-Based AI Detection
Rather than requiring hundreds or thousands of labeled examples to train a supervised ML model, the team implemented a physics-based detection engine grounded in the known relationship between AE amplitude and valve condition:
AE Amplitude Detection Result Probability
> 5.0 G Severe Leak 90-100%
3.5 - 5.0 G Moderate Leak 70-90%
2.0 - 3.0 G Possible Leak 40-60%
< 2.0 G Normal 0-30%
These thresholds are derived from the physical behavior of ultrasonic acoustic emissions in leaking valves: gas escaping through a damaged valve seat generates high-frequency turbulence that AE sensors detect as elevated amplitude. The more severe the leak, the higher the sustained amplitude.
This physics-first approach has a critical advantage: it works immediately with zero training data. The system was validated against known fault cases from historical records -- notably C402 Cylinder 3 Crank-end Discharge, a documented valve leak -- achieving 93% detection confidence on the first run.
The detection engine provides explainable results: every diagnosis includes the specific amplitude measurements, threshold comparisons, and reasoning chain that led to the conclusion. Engineers can verify the logic rather than trusting a black-box prediction.
Interactive Visualization
The platform provides interactive Plotly-based charts that match the analytical depth engineers expect from professional Windrock software:
- Pressure vs. crank angle traces (HE/CE) with theoretical curve overlays
- P-V (Pressure-Volume) diagrams for cylinder performance analysis
- AE waveform visualization with mean amplitude reference lines
- Envelope views for comparing multiple curves simultaneously
- Zoom, pan, and data point inspection across all chart types
The visualization layer is not decorative -- it is the verification interface. Engineers use it to confirm automated findings against their own domain expertise, building trust in the system incrementally.
ML Training Pipeline
Recognizing that physics-based thresholds represent a starting point rather than a ceiling, the platform includes a complete machine learning pipeline designed for incremental improvement:
- Interactive labeling: A browser-based interface where engineers upload files, review the AI's physics-based prediction alongside the waveform visualization, and click Leak / Normal / Skip. Labels auto-save with progress tracking and class balance monitoring.
- Feature extraction: Extracts 28 engineered features from each waveform, spanning statistical measures (mean, median, standard deviation, percentiles), physics-derived ratios (fraction of signal above 1G, 2G, 3G, 5G thresholds), and signal characteristics (RMS, crest factor, IQR, peak counts).
- Model training: Trains an XGBoost and Random Forest ensemble with 5-fold cross-validation, feature importance analysis, and automated model evaluation. Minimum viable training requires 20 labeled samples; 50+ is recommended for production accuracy.
- Hybrid inference: A hybrid detector combines physics-based and ML predictions, using model agreement scoring to produce a combined confidence value. When the two methods agree, confidence is highest. When they disagree, the system flags the discrepancy for human review.
Automated Diagnostics and Reporting
The platform generates health scores per cylinder, prioritized findings ordered by severity, and downloadable diagnostic reports with charts and recommendations. What previously required hours of manual interpretation and report writing is compressed into a workflow that takes under two minutes from file upload to actionable output.
4. Technical Innovation
Reverse Engineering Proprietary Binary Formats
No public specification exists for the WRPM file format. The team reverse-engineered the internal structure through a combination of Windrock documentation fragments, binary analysis, and iterative testing against known data. Key discoveries included:
- File type disambiguation: Initial development incorrectly targeted
.SDDfiles (parametric AE statistics) rather than.S$$files (continuous AE waveforms). The.SDDfiles contain event counts per collection point -- useful for trending but useless for waveform-level leak detection. Identifying and correcting this error required deep analysis of the binary content and cross-referencing with Windrock's data collection architecture. - Saturation filtering: Engine-driven compressors present a unique challenge. Engine ignition events generate massive AE saturation that appears as near-maximum Float32 values (~2x10^38) in the
.S$$waveform data. These are not infinities or corrupt data -- they are real sensor readings from spark plug firing. The parser must identify and exclude these saturation regions to isolate clean compressor cylinder data. The team implemented sentinel-value detection to segment the multi-record.S$$structure and extract only the relevant compressor channels. - Channel mapping: A single WRPM file contains data from all sensors on the machine -- engine power cylinders, compressor cylinders, vibration pickups, and more. The
D6DYSEN.DATfile within the archive maps sensor names to channel indices. The parser reads this table to automatically identify which channels correspond to compressor AE sensors, eliminating the need for manual configuration.
Physics-First Detection with Minimal Training Data
The PRD initially specified supervised ML requiring 50-100+ labeled examples per fault type. With only 8 unique valve leak samples available across all test data, a pure ML approach was not viable. The physics-based strategy resolved this cold-start problem:
- Detection accuracy validated at 93% with zero training data required
- Thresholds grounded in acoustic physics, not statistical correlation
- Explainable results that engineers can verify and trust
- Immediate deployment without a data collection phase
This approach is particularly significant for industrial applications where labeled fault data is inherently scarce. Machines are designed to operate normally -- faults are rare events, and when they occur, the priority is repair, not data labeling.
Hybrid Architecture for Continuous Improvement
The physics-based engine provides reliable baseline detection. The ML pipeline provides a path to higher accuracy as labeled data accumulates. The hybrid detector combines both, using a weighted ensemble where model agreement strengthens confidence and disagreement triggers human review. This architecture means the system gets better with use without ever regressing below its physics-based floor.
Auto-Configuration from Data
The platform requires zero manual machine setup. When a user uploads data, the system automatically discovers:
- Number of cylinders and their identifiers
- Valve positions (suction/discharge, head-end/crank-end)
- Available sensor types (pressure, AE, vibration)
- Machine operating parameters
This auto-discovery eliminates a common barrier to adoption in industrial software: the tedious, error-prone process of manually configuring machine definitions before analysis can begin.
5. Results and Impact
Detection Performance
Metric Result
Valve leak detection accuracy 93% (validated on known faults)
False negative rate on known leaks 7%
Normal operation classification Correct (12% probability)
Time from upload to diagnostic result < 2 minutes
Previous manual analysis time 2-4 hours per machine
The system was validated against historical records where valve condition was independently confirmed through inspection. The C402 Cylinder 3 Crank-end Discharge case -- a documented valve leak -- returned a 93% leak probability. The same machine's Cylinder 2 Crank-end Discharge -- known to be operating normally -- returned 12% probability, demonstrating clear discrimination between leak and normal conditions.
Operational Impact
The transformation of this workflow turns a notorious bottleneck into a streamlined, high-speed operation. By moving from manual XML uploads to native support for both XML and WRPM formats, the analysis time per machine has collapsed from a multi-hour squinting session for a senior specialist down to a sub-two-minute sprint that any condition monitoring engineer can handle. This shift does more than just slash manual effort by 70-80%; it democratizes expert-level diagnostics by replacing subjective, "analyst-dependent" interpretations with standardized, consistent thresholds. Instead of waiting days or weeks for a report while a machine risks a costly failure, teams now generate actionable insights in minutes, moving the needle from reactive waiting to immediate, data-driven precision.
Technical Deliverables
- 10 production Python modules totaling approximately 3,300 lines of code
- 28-feature ML extraction pipeline ready for scaling as labeled data accumulates
- Unified data loader providing a single interface across proprietary formats
- Interactive labeling application for building training datasets without engineering resources
- Hybrid detection architecture combining physics-based reliability with ML adaptability
- Comprehensive documentation: developer guide, training workflow guide, WRPM support guide, and labeling instructions
6. Lessons Learned
Working with Proprietary Binary Formats Takes Longer Than Expected
The WRPM parser went through two major iterations. The first version read the wrong file type entirely (.SDD parametric data instead of .S$$ waveform data), producing plausible-looking but fundamentally incorrect results. Catching this required comparing extracted data against known Windrock software output and questioning assumptions about file format semantics. The lesson: when reverse engineering undocumented formats, validate at every layer. Plausible output is not the same as correct output.
Physics-First Beats ML-First When Training Data Is Scarce
The original product requirements assumed a supervised ML approach with 50-100+ labeled samples per fault type. In practice, only 8 unique valve leak examples were available. Pivoting to physics-based detection -- grounded in the known relationship between AE amplitude and valve condition -- delivered 93% accuracy immediately. The ML pipeline was then built as an enhancement layer rather than the primary detection method. This inversion of the typical AI development sequence (collect data, train model, deploy) proved far more practical for an industrial domain where fault examples are rare by definition.
Auto-Discovery Eliminates Adoption Friction
Early prototypes required manual machine configuration before analysis could begin. Switching to automatic topology discovery from the data itself -- parsing cylinder counts, valve positions, and sensor types directly from XML metadata and WRPM channel tables -- eliminated a significant barrier. Industrial software fails when it demands setup effort before delivering value. The system must provide insight on the first interaction.
Engine Interference Is a Real-World Data Quality Problem
Textbook AE analysis assumes clean sensor data. Real-world data from engine-driven compressors contains massive saturation spikes from ignition events that can corrupt entire analysis windows if not filtered. This was not documented in any reference material and was only discovered through binary inspection of raw .S$$ data. The filtering logic became a critical component of the parser, not an afterthought.
Iterative Development with Real Field Data Is Non-Negotiable
Every major design decision -- the detection thresholds, the feature set, the parser architecture -- was shaped by testing against actual field data from operating compressors. Synthetic test data would not have revealed the engine saturation problem, the .SDD vs. .S$$ distinction, or the practical threshold values that separate normal operation from valve leaks. Access to real WRPM and XML files from known-condition machines was the single most important input to the project.
7. What's Next
Near-Term: ML Model Training at Scale
The immediate priority is building a labeled dataset of 50-100+ samples using the interactive labeling application. As condition monitoring engineers process their existing WRPM archives through the system, each labeled file strengthens the ML model. The hybrid detector architecture means production accuracy improves incrementally without any system downtime or redeployment.
Medium-Term: Multi-Site Fleet Monitoring
The current system analyzes one machine at a time. The next phase extends this to fleet-level dashboards showing health status across all monitored machines at multiple sites. Comparative analytics -- identifying which machines are degrading fastest, which sites have the highest fault rates, which valve manufacturers show the best longevity -- become possible once data flows consistently through a single platform.
Long-Term: Real-Time Data Streaming and Mobile Access
The current workflow is upload-driven: engineers collect data in the field, then upload files for analysis. Future integration with SCADA/PLC systems and IIoT platforms would enable continuous monitoring with automated alerting when valve condition changes. A mobile application for field technicians -- providing immediate diagnostic feedback during data collection rather than days later -- would close the loop between measurement and action entirely.
Continuous Improvement Targets
The roadmap for continuous improvement follows a clear progression from initial model training to enterprise-wide predictive maintenance. It starts with an interactive labeling app designed to achieve 85% ML accuracy with just 50 samples, scaling to 95%+ accuracy as fleet-wide data collection expands. This foundational precision enables multi-site deployment via cloud infrastructure and fleet health dashboards, while SCADA and IIoT integration transition the operation toward real-time predictive maintenance. The final phase empowers field teams with native mobile apps, ensuring that advanced insights translate into same-day diagnostics.
Technical Summary
The underlying technology stack is built for high-leverage data processing and rapid deployment. At its core, a Python and Streamlit framework powers the application, utilizing Plotly for interactive data visualization and Turso for session persistence. The diagnostic intelligence combines a custom physics-based amplitude threshold engine with robust machine learning models like XGBoost and Random Forest, all driven by 28 statistical and physics-derived features. This architecture natively supports both Windrock XML and WRPM binary archives, ensuring seamless data ingestion. Currently optimized for web-based environments like Streamlit Cloud, the stack is engineered for future scalability into AWS or Azure ecosystems.
This case study documents a real development effort conducted over multiple sessions from late 2025 through early 2026. All accuracy figures, detection thresholds, and technical details are drawn from validated test results against field data from operating reciprocating compressors.
If you have a project you would like to work on get in touch today [LINK}