# Residual-based multivariate exponentially weighted moving average control chart for statistical process control of water quality in Surabaya city utilizing generative adversarial network

**Authors:** Muhammad Ahsan, Raditya Widi Indarsanto, Kevin Agung Fernanda Rifki, Muhammad Hisyam Lee

PMC · DOI: 10.1016/j.mex.2025.103504 · 2025-07-12

## TL;DR

This study improves water quality monitoring in Surabaya by using a GAN to reduce autocorrelation in data, enhancing statistical process control.

## Contribution

A novel GAN-based residual analysis method is introduced to address autocorrelation in water quality time-series data.

## Key findings

- The GAN model effectively reduced autocorrelation with low MSE, RMSE, and MAE values.
- Phase I analysis identified and removed 33 out-of-control signals, stabilizing the process.
- Phase II monitoring detected eight new out-of-control signals, indicating potential instability over time.

## Abstract

This study proposes novel framework to enhance statistical process control (SPC) of water quality by addressing the pervasive issue of autocorrelation in time-series data. We investigate the characteristics of pH, turbidity, and KMnO₄ in Surabaya city's water, revealing significant autocorrelation that compromises statistical independence assumption crucial for reliable SPC. To overcome this, Generative Adversarial Network (GAN) model was developed to generate decorrelated residual time-series. The efficacy of GAN model in reducing autocorrelation was quantitatively validated, achieving Mean Squared Error (MSE) of 0.0054, Root Mean Squared Error (RMSE) of 0.0738, and Mean Absolute Error (MAE) of 0.0556. Subsequently, these GAN-derived residuals were integrated into Multivariate Exponentially Weighted Moving Average (MEWMA) control chart for process monitoring. Phase I analysis detected 33 out-of-control signals; after identifying and removing outliers, process was brought under statistical control with no further out-of-control signals detected. However, subsequent Phase II online monitoring detected eight statistically significant out-of-control signals, indicating a potential loss of process stability over time. Our findings underscore the significant utility of GAN-based residual analysis as a robust strategy for mitigating autocorrelation effects in environmental water quality data. This approach leads to improved process monitoring and enables early anomaly detection, crucial for proactive water quality management.

Image, graphical abstract

## Full-text entities

- **Chemicals:** water (MESH:D014867), KMnO4 (MESH:D011196)

## Figures

8 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12284534/full.md

---
Source: https://tomesphere.com/paper/PMC12284534