0% found this document useful (0 votes)
27 views11 pages

Intelligent Assessment of Harmonic Distortion Compliance in Reverse Osmosis Systems

This study explores the critical challenge of harmonic distortion compliance in reverse osmosis (RO) desalination systems, with a focus on aligning with international standards, specifically IEC 61000, IEEE 519, and EN 50160. High-power equipment, particularly high-pressure pumps (HPP), introduces significant harmonic distortions, threatening power quality and operational reliability. To address this issue, we integrated advanced machine learning (ML) algorithms, namely decision tree (DT), random forest (RF), support vector machine (SVM), and multi-layer perceptron (MLP) to assess harmonic compliance and predict total harmonic distortion (THD) under four operational scenarios. All data used for training and testing were obtained from real-time measurements taken at a large-scale desalination plant using a power quality analyzer (QUALISTAR CA 8336), which guarantees the practical relevance of the analysis. The models were trained on harmonic order and amplitude data and evaluated using accuracy, precision, recall, and F1-score metrics. Among the models, MLP demonstrated superior performance, achieving an accuracy of 99.11% and an F1-score of 98.9%, making it a robust tool for harmonic compliance assessment. SVM and RF also showed commendable results, while DT proved effective for basic analysis. This research underscores the potential of AI-driven approaches in mitigating harmonic-related challenges, optimizing power quality, and enhancing operational efficiency in RO plants. These findings offer a pathway toward more reliable and energy efficient industrial operations.

Uploaded by

IAES IJAI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

Intelligent Assessment of Harmonic Distortion Compliance in Reverse Osmosis Systems

This study explores the critical challenge of harmonic distortion compliance in reverse osmosis (RO) desalination systems, with a focus on aligning with international standards, specifically IEC 61000, IEEE 519, and EN 50160. High-power equipment, particularly high-pressure pumps (HPP), introduces significant harmonic distortions, threatening power quality and operational reliability. To address this issue, we integrated advanced machine learning (ML) algorithms, namely decision tree (DT), random forest (RF), support vector machine (SVM), and multi-layer perceptron (MLP) to assess harmonic compliance and predict total harmonic distortion (THD) under four operational scenarios. All data used for training and testing were obtained from real-time measurements taken at a large-scale desalination plant using a power quality analyzer (QUALISTAR CA 8336), which guarantees the practical relevance of the analysis. The models were trained on harmonic order and amplitude data and evaluated using accuracy, precision, recall, and F1-score metrics. Among the models, MLP demonstrated superior performance, achieving an accuracy of 99.11% and an F1-score of 98.9%, making it a robust tool for harmonic compliance assessment. SVM and RF also showed commendable results, while DT proved effective for basic analysis. This research underscores the potential of AI-driven approaches in mitigating harmonic-related challenges, optimizing power quality, and enhancing operational efficiency in RO plants. These findings offer a pathway toward more reliable and energy efficient industrial operations.

Uploaded by

IAES IJAI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

IAES International Journal of Artificial Intelligence (IJ-AI)

Vol. 14, No. 5, October 2025, pp. 4371~4381


ISSN: 2252-8938, DOI: 10.11591/ijai.v14.i5.pp4371-4381  4371

Intelligent assessment of harmonic distortion compliance in


reverse osmosis systems

Cherki Lahlou1, Belaid Bouikhalene2, Jamaa Bengourram1, Hassan Latrache1


1
Department of Industrial Engineering and Surface Engineering, Faculty of Sciences and Technology, Sultan Moulay Slimane
University, Beni Mellal, Morocco
2
Laboratory of Mathematics Innovation and Information Technology, Faculty of Polydisciplinary Beni Mellal, Sultan Moulay Slimane
University, Beni Mellal, Morocco

Article Info ABSTRACT


Article history: This study explores the critical challenge of harmonic distortion compliance
in reverse osmosis (RO) desalination systems, with a focus on aligning with
Received Apr 14, 2025 international standards, specifically IEC 61000, IEEE 519, and EN 50160.
Revised Aug 9, 2025 High-power equipment, particularly high-pressure pumps (HPP), introduces
Accepted Sep 7, 2025 significant harmonic distortions, threatening power quality and operational
reliability. To address this issue, we integrated advanced machine learning
(ML) algorithms, namely decision tree (DT), random forest (RF), support
Keywords: vector machine (SVM), and multi-layer perceptron (MLP) to assess
harmonic compliance and predict total harmonic distortion (THD) under
Artificial intelligence four operational scenarios. All data used for training and testing were
Desalination plant obtained from real-time measurements taken at a large-scale desalination
Machine learning plant using a power quality analyzer (QUALISTAR CA 8336), which
Multi-layer perceptron guarantees the practical relevance of the analysis. The models were trained
Reverse osmosis on harmonic order and amplitude data and evaluated using accuracy,
Total harmonic distortion precision, recall, and F1-score metrics. Among the models, MLP
demonstrated superior performance, achieving an accuracy of 99.11% and
an F1-score of 98.9%, making it a robust tool for harmonic compliance
assessment. SVM and RF also showed commendable results, while DT
proved effective for basic analysis. This research underscores the potential
of AI-driven approaches in mitigating harmonic-related challenges,
optimizing power quality, and enhancing operational efficiency in RO
plants. These findings offer a pathway toward more reliable and energy-
efficient industrial operations.
This is an open access article under the CC BY-SA license.

Corresponding Author:
Cherki Lahlou
Department of Industrial Engineering and Surface Engineering
Faculty of Sciences and Technology, Sultan Moulay Slimane University
B.P. 523, 23000, Beni Mellal, Morocco
Email: cherki.lahlou@gmail.com

1. INTRODUCTION
The rise of reverse osmosis (RO) desalination plants represents a significant trend in engineering
over the last few decades, addressing the increasing demand for freshwater. By 2022, operational seawater
desalination plants worldwide exceeded 21,000, nearly double the figure recorded a decade ago [1].
Centrifugal high-pressure pumps (HPP) are critical components in RO systems, and their performance, such
as operating pressure, flow rate, feed pressure, and energy efficiency, directly impacts freshwater production
and the overall reliability of the desalination process [2]. These pumps, or pump-motor units, are typically
powered by electric motors, often three-phase or single-phase induction motors, coupled with static power

Journal homepage: http://ijai.iaescore.com


4372  ISSN: 2252-8938

converters like variable frequency drives (VFD) to regulate speed and pressure [3]. Due to the nonlinear
nature of HPP, harmonic phenomena are frequently observed in electrical systems [4]. The severity of these
harmonic disturbances in current signals is quantified by the total harmonic distortion of current (THDi).
When harmonic currents circulate through a finite system impedance, the vector sum of all individual voltage
drops leads to an increase in the total harmonic distortion of voltage (THDu) [5].
The rapid advancement of artificial intelligence (AI) is transforming how we monitor and optimize
complex systems. Machine learning (ML), a subset of AI, has demonstrated remarkable success in modeling
nonlinear systems across diverse fields, including healthcare, sports, industry, environmental sciences, and
water treatment [6]–[15]. AI techniques hold immense potential for tackling complex, nonlinear challenges,
particularly in studies related to water treatment processes and beyond.
Over the past few decades, the issue of total harmonic distortion (THD) has become a critical
concern in industrial power systems, particularly in RO desalination plants. The increasing reliance on
high-power equipment, such as HPP, has led to significant harmonic distortions, adversely affecting power
quality and operational efficiency [16]. Ensuring compliance with international standards like IEC 61000,
IEEE 519, and EN 50160 is essential to mitigate these challenges and maintain reliable plant operations
[17], [18]. Recent studies have emphasized the significant impact of harmonics in industrial systems, where
the increasing use of non-linear loads and high-power equipment has led to elevated levels of THD. These
distortions can severely affect power quality, causing issues such as equipment overheating, reduced
efficiency, and premature failure of electrical components. To address these challenges, researchers have
focused on developing advanced mitigation techniques, including active and passive filters, adaptive control
strategies, and AI-based solutions. These approaches aim to reduce harmonic distortions and ensure
compliance with international standards, such as IEEE 519 and IEC 61000, which set strict limits on THD
levels to maintain system reliability and performance [19], [20]. Traditional harmonic mitigation methods,
such as passive and active filters, require manual adjustments and struggle to adapt to dynamic operating
conditions [21]. Traditional monitoring systems also rely on fixed thresholds, making them ineffective in
detecting complex harmonic interactions in real time.
To address the challenges of THD in RO plants, this study leverages AI to automate the
classification and prediction of harmonic compliance, ensuring adherence to IEC 61000, IEEE 519, and
EN 50160 standards. Using advanced ML techniques such as decision tree (DT), random forest (RF), support
vector machine (SVM), and multi-layer perceptron (MLP), we analyze the impact of harmonic distortions on
plant performance and propose mitigation strategies. This study introduces a novel AI-based framework
specifically tailored to the dynamics of RO desalination systems, which have not been extensively explored
in the context of harmonic compliance. This AI-driven framework enhances real-time monitoring, improves
predictive accuracy, and enables adaptive control strategies, optimizing power quality and preventing
harmonic-related failures in industrial RO plants. Ultimately, this research highlights the potential of AI in
maintaining system reliability and advancing efficient energy management in desalination facilities.

2. METHOD
2.1. Electrical system under study
The RO system is powered through a high-voltage/low-voltage (HV/LV) transformer, supported by
a backup transformer, each with a capacity of 1,600 kVA. Additionally, a 40 kVAr self-anti-harmonic (SAH)
vacuum compensation system is connected to the grid via an 80 A circuit breaker installed on the low-voltage
side of each HV/LV transformer. The electrical network supplies four HPP (in a 3+1 configuration), which
are the plant's primary energy consumers. Each pump is driven by a 450 kW VFD motor. Figure 1 provides a
schematic diagram of the electrical system supplying the HHP in a desalination plant in Morocco.
Complementing this, Table 1 presents the technical characteristics of the 1,600 kVA transformers used in the
RO system, detailing key parameters such as rated power, voltage, current, losses, and winding configuration.

2.2. International norms


The normative analysis evaluates the compliance of the RO plant’s electrical system with
international standards for harmonic distortion. This section examines the limits for voltage and current
harmonics as defined by IEEE 519, IEC 61000, and EN 50160, ensuring the system operates within
acceptable power quality thresholds. The analysis focuses on harmonic levels at both high-voltage (22 kV)
and low-voltage (0.4 kV) sides of the transformer.

2.2.1. IEEE 519


The IEEE 519 standard applies to both high-voltage and low-voltage systems. The limits for voltage
harmonics are determined according to Table 2. Since the transformer is supplied with 22 kV, the current
harmonics must comply with the limits specified in Table 3 [19].

Int J Artif Intell, Vol. 14, No. 5, October 2025: 4371-4381


Int J Artif Intell ISSN: 2252-8938  4373

Figure 1. Schematic diagram of the electrical system supplying HPP in the RO plant

Table 1. Technical characteristics of the 1,600 kVA Transformers in the RO system


Parameter Symbol Value Unit
Rated power S 1,600 kVA
Primary voltage UHV 22 kV
Secondary voltage UBT 0.4 kV
Rated primary current IHV 41.99 A
Rated secondary current IBT 2309.4 A
Short-circuit voltage* %Ucc 6±10% %
Winding connection --- Dyn11 ---
Tap changer --- ±2*2.5 % UHV
Load losses* Pj 19 (+15%) kW
No-load losses* Pv 2.6 (+15%) kW

Table 2. Voltage harmonic limits (IEEE 519)


Bus voltage V at PCC Individual harmonic (%) Total harmonic distortion (%)
V≤1.0 KV 5.0 8.0
1 KV<V≤69 KV 3.0 5.0
69 KV<V≤161 KV 1.5 2.5
161 KV<V 1.0 1.5a

Table 3. Current harmonic limits for systems rated 120 V through 69 KV (IEEE 519)
𝐈𝐒𝐂 Maximum harmonic current distortion in percent of IL TDD required
𝐈𝐋 Individual harmonic order (odd harmonics)a, b
3≤h<11 11≤h<17 17≤h<23 23≤h<35 35≤h<50
<20c 4.0 2.0 1.5 0.6 0.3 5.0
20<50 7.0 3.5 2.5 1.0 .05 8.0
50<100 10.0 4.5 4.0 1.5 0.7 12.0
100<1,000 12.0 5.5 5.0 2.0 1.0 15.0
>1,000 15.0 7.0 6.0 2.5 1.4 20.0
a
Even harmonics are limited to 25% of the odd harmonic limits above.
b
Current distortions that result in a dc offset, e.g., half wave converters, are not allowed.
c 𝐈
All power generation equipment is limited to these values of current distortion, regardless of actual 𝐒𝐂
𝐈𝐋
Where, ISC maximum short circuit current at PCC, and IL maximum demand load current

2.2.2. IEC 61000


The IEC 61000 standard addresses electromagnetic compatibility (EMC) in low-voltage systems.
It recommends harmonic limits applicable to low and medium voltage systems. In most cases, it can also be
applied to the input terminals of equipment supplied by low-voltage networks [22]. The voltage harmonic
levels for each order are provided in Table 4, with a maximum THD of 8%.

Intelligent assessment of harmonic distortion compliance in reverse osmosis systems (Cherki Lahlou)
4374  ISSN: 2252-8938

Table 4. Harmonic voltage limits per IEC 61000-2-2 and 61000-2-12 standards
Odd harmonics (Not multiple of 3) Odd harmonics (Multiple of 3) Even harmonics
h Lh (%) h Lh (%) h Lh (%)
5 6 3 5 2 2
7 5 9 1.5 4 1
11 3.5 15 0.4 6 0.5
13 3 21 0.3 8 0.5
17 10
17<h≤49 2.27· − 0.27
h
21<h≤45 0.2 10<h≤50 0.25· h + 0.25

2.2.3. EN 50160
The EN 50160 standard sets limits for voltage harmonic amplitudes in low-, medium-, and
high-voltage networks under normal operating conditions [23]. These limits are designed to ensure the quality
and reliability of the power supply, thereby reducing potential disturbances in electrical equipment.
The individual harmonic voltage levels specified by this standard are presented in Table 5, which provides
detailed values for both odd and even harmonics up to the 25th order.

Table 2. Individual harmonic voltage values at supply terminals (orders up to 25, % of fundamental U1)
Odd harmonics
Even harmonics
Not multiple of 3 Multiple of 3
h Lh (%) h Lh (%) h Lh (%)
5 6.0 3 5.0 2 2.0
7 5.0 9 1.5 4 1.0
11 3.5 15 0.5 6< h ≤24 0.5
13 3.0 21 0.5
17 2.0
19 1.5
23 1.5
25 1.5

2.3. Data collection


2.3.1. Measurement equipment
The data for this study were collected using a high-precision power quality analyzer, the
QUALISTAR CA 8336 from Chauvin Arnoux. The main features of this advanced power network analyzer
are presented in Table 6. This device was installed to measure the levels of THDi and THDu on the
high-voltage (22 kV) and low-voltage (0.4 kV) sides of the transformer feeding the RO system. The
measurements were analyzed for the four operating scenarios of the RO system: i) scenario 1: 0 RO trains in
operation; ii) scenario 2: 1 RO train in operation; iii) scenario 3: 2 RO trains in operation; and iv) scenario 4:
3 RO trains in operation.
The measurement campaign was conducted over the entire month of May 2024 (31 consecutive days).
To minimize disruption to plant operations, data were collected for 1 full day under scenario 1, 1 full day
under scenario 2, and 1 day under scenario 3. The remaining 28 days were dedicated to scenario 4, which
reflects the plant’s typical operating conditions. Measurements were recorded every 5 minutes, resulting in a
complete dataset of approximately 8,700 samples. This high-resolution and time-distributed dataset ensures
statistical robustness for training and evaluating ML models under realistic operational conditions. For each
operating scenario, the spectrum of maximum harmonic amplitudes for both voltage and current is recorded
and compared against the relevant normative standards.

Table 3. Key features of the QUALISTAR CA 8336 power quality analyzer


Feature Specification
Accuracy ±0.5% for voltage, ±1% for current
Frequency range Measures harmonics up to the 50th order
Data logging Real-time recording with high resolution
Measurement parameters Voltage, current, power, energy, harmonics (up to 50th order), THD, power factor
Compliance Meets IEC 61000-4-30 class A standards for power quality measurements

2.3.2. Measured parameters


To evaluate power quality, several indicators are commonly used to quantify the level of harmonic
distortion in both current and voltage signals.
‒ THDi calculated as the ratio between the sum of harmonic currents to the fundamental current.

Int J Artif Intell, Vol. 14, No. 5, October 2025: 4371-4381


Int J Artif Intell ISSN: 2252-8938  4375

√∑𝐻 2
ℎ=2 𝐼ℎ
𝑇𝐻𝐷𝑖 = × 100%
𝐼1

Where, 𝐼ℎ represents the harmonic current of order h, 𝐼1 is the fundamental current (1st order) and H is
the maximum harmonic order measured (e.g., 25).
‒ THDu calculated as the ratio of the sum of the harmonic voltages to the fundamental voltage.

√∑𝐻 2
ℎ=2 𝑉ℎ
𝑇𝐻𝐷𝑢 = × 100%
𝑉1

Where, 𝑉ℎ represents the harmonic voltage of order h, 𝐼𝑉 is the fundamental voltage (1st order).
‒ Harmonic amplitudes, the amplitudes of harmonic currents and voltages, represent the magnitude of
each harmonic component relative to the fundamental.
𝐼ℎ 𝑉ℎ
𝐼ℎ (%) = × 100%, 𝑉ℎ (%) = × 100%
𝐼1 𝑉1

2.4. Harmonic classification


2.4.1. Classification process
This section describes the methodology used for harmonic classification and presents the results for the
four operating scenarios of the RO plant. Each harmonic was classified as “compliant” or “non-compliant”
based on the following rule:
‒ If the measured harmonic amplitude≤standard limit → “compliant”.
‒ If the measured harmonic amplitude>standard limit → “non-compliant”.
Among the 8,700 collected samples, approximately 51.3% belong to the compliant class and 48.7% to the
non-compliant class. This near-even distribution was verified during data preprocessing. Therefore, no
resampling techniques such as oversampling (e.g., SMOTE) or undersampling were required.

2.4.2. Machine learning models for harmonic classification


To automate the classification process, a DT, random forest (RF), SVM, and neural network (MLP)
were trained on the harmonic data. These models used the harmonic order and measured amplitude as input
features to predict the compliance status (“compliant” or “non-compliant”). To ensure model generalizability
and avoid overfitting, a 70/15/15 split was applied to divide the dataset into training, validation, and testing
sets, respectively. Additionally, a 5-fold cross-validation technique was employed during training to provide
a robust estimation of model performance across different subsets of the data. Table 7 provides a clear and
concise summary of the AI models used for harmonic classification and evaluation metrics.

Table 4. ML models for harmonic classification


Model Description Equation Reference Evaluation metrics
DT A supervised learning algorithm that Gini impurity = 1 − ∑ni=1 Pi2 [24] Accuracy=
TP + TN
TP + FP + FN + TN
divides data into branches based on feature where 𝑃𝑖 is the probability of class i. TP
values, creating a tree-like model of Recall=
TP + FN
decisions. TP
Precision=
RF An ensemble of DT that improves Prediction [25] TP + FP
2 × Recall × Precision
accuracy and reduces overfitting by = mode(T1 (x), T2 (x), … , Tn (x))n F1score=
Recall + Precision
averaging the results of multiple trees. Here, where Ti (x) represents the
prediction of the i-th tree.
SVM A supervised learning model that finds the F(x) = sign(w ⋅ x + b) [26]
optimal hyperplane to separate data into Where w is the weight vector, x is
classes, maximizing the margin between the input, and bb is the bias.
classes.
MLP A deep learning model that uses layers of y = 𝜎 ∑ni=1 𝑤𝑖 𝑥𝑖 + 𝑏 [27]
interconnected neurons to learn complex Where 𝜎 is the activation function,
patterns in the data. 𝑤𝑖 are weights, 𝑥𝑖 are inputs, and b
is the bias.

3. RESULTS AND DISCUSSION


3.1. Analysis of voltage harmonics against applicable standards
This section presents the normative analysis of THDu and THDi at high-voltage (22 kV) and
low-voltage (0.4 kV) levels, measured in the RO plant under four operating scenarios. Figure 2 illustrates the
variations in the maximum harmonic amplitudes across the four operating scenarios, corresponding to the

Intelligent assessment of harmonic distortion compliance in reverse osmosis systems (Cherki Lahlou)
4376  ISSN: 2252-8938

number of RO trains in service. The limits defined by IEC 61000, IEEE 519, and EN 50160 standards are
overlaid on the measurements to assess compliance.
Figure 2(a) displays the THDu under the four scenarios, that figure correspond to a specific
operating condition. The harmonic spectrum and standard limits (IEC 61000, IEEE 519, EN 50160) are
plotted to assess voltage distortion compliance. While all scenarios are within the IEC 61000 and EN 50160
thresholds at 22 kV, certain harmonic orders, particularly the 5th, 7th, and 11th, exceed IEEE 519
recommendations. At the 0.4 kV level, most values remain below the IEC limit, except for the 15th harmonic
in scenarios 2 and 4, indicating non-compliance in these specific cases. Figure 2(b) presents the THDi results
under the same four scenarios, that figure show current harmonic amplit.

(a)

(b)

Figure 2. Evolution of maximum harmonic voltage amplitudes across different operating scenarios of the RO
Plant at (a) high voltage (22 kV) and (b) low voltage (0.4 kV) levels

Int J Artif Intell, Vol. 14, No. 5, October 2025: 4371-4381


Int J Artif Intell ISSN: 2252-8938  4377

3.2. Analysis of current harmonics against applicable standards


Figure 3 illustrates the variations in THDi at high-voltage (22 kV) and low-voltage (0.4 kV) levels
under four operating scenarios, compared to IEEE 519 limits. Significant harmonic amplitudes are observed at
22 kV as shown in Figure 3(a), particularly for the 3rd, 5th, 7th, and 11th orders, with exceedances noted in
scenarios 2 and 4. The highest THDi values occur at lower fundamental currents, highlighting an inverse
relationship. At 0.4 kV, as shown in Figure 3(b), we observe that the 5ᵉ harmonic far exceeds the IEEE 519 limit
in all scenarios, with maximum amplitudes reaching over 40%. The 3ᵉ and 7ᵉ harmonics are also significant, but
remain below the limit in some cases. The harmonic distribution indicates high harmonic distortion, particularly
marked in scenarios 2 and 4. These harmonic distortions can lead to overheating, increased vibration, and
premature wear of the HPP, adversely affecting their reliability and overall performance.

(a)

(b)

Figure 3. Evolution of maximum harmonic current amplitudes in different RO plant operating scenarios at
(a) high voltage (22 kV) and (b) low voltage (0.4 kV) levels

Intelligent assessment of harmonic distortion compliance in reverse osmosis systems (Cherki Lahlou)
4378  ISSN: 2252-8938

3.3. Machine learning-based classification of harmonic compliance


The analysis of the figures effectively demonstrates harmonic variations, emphasizing the impact of
excessive harmonic distortion on HPP performance in RO plants. Overheating, increased vibrations, and
insulation degradation can lead to higher maintenance costs and unexpected failures, affecting operational
reliability. To mitigate these issues, this study applies ML models for harmonic classification, automating
compliance assessment against IEC 61000 and IEEE 519 standards. Four ML models were trained on
harmonic data. Table 8 summarizes the performance of each model. The MLP achieved the highest accuracy
(99.11%), proving to be the most effective model for precise classification. Its superior performance is
attributed to a deep architecture with two hidden layers (64 and 32 neurons) and rectified linear unit (ReLU)
activation, which allowed it to capture complex non-linear relationships between harmonic orders. Dropout
regularization was also applied to prevent overfitting, while SVM (96.29%) and RF (96.0%) also
demonstrated strong performance. DT, though slightly less accurate (92.5%), remains a viable option for
simpler applications. Figure 4 illustrates the precision-recall (PR) curves for all four models. The MLP
exhibits a near-perfect PR curve, maintaining high precision across a wide range of recall values. This
highlights its robustness in correctly identifying harmonic compliance even in more uncertain prediction
zones. SVM and RF models follow closely but show a slight drop in precision as recall increases, indicating a
growing number of false positives under broader detection scopes. The DT, while performing adequately,
presents a more pronounced decline in precision with increasing recall, confirming its relatively lower ability
to generalize across diverse harmonic conditions. These results confirm that AI-driven approaches enhance
real-time harmonic compliance monitoring, optimizing power quality and reducing the risk of equipment
failures in desalination plants.

Table 8. Performance comparison of ML models for harmonic compliance classification


Model Accuracy (%) Precision (%) Recall (%) F1-score (%)
DT 92.5 91.0 90.5 90.7
RF 96.0 95.5 95.0 95.2
SVM 96.29 96.0 95.8 95.9
MLP 99.11 99.0 98.9 98.9

Figure 1. Precision-recall curves of the four ML models for harmonic compliance classification

3.4. Discussion of the results


The results of this study demonstrate the effectiveness of ML models in classifying harmonic
compliance and predicting THD levels in RO desalination plants. The superior performance of the MLP
model confirms its ability to capture complex, nonlinear relationships between harmonic orders thanks to its
multilayer architecture and nonlinear activation functions. This makes it particularly effective in scenarios
involving fluctuating loads and diverse harmonic profiles, as found in RO desalination plants. Compared to
SVM and RF, which also performed well, MLP’s higher accuracy and F1-score underline its robustness for
detailed harmonic compliance assessment. Moreover, the computational efficiency of the selected models,
especially MLP and RF, enables their integration into industrial systems with moderate hardware, such as
edge computing units or industrial PCs, ensuring suitability for real-time deployment [28]. This AI-based
approach offers a scalable, proactive solution for monitoring and mitigating harmonic distortions in industrial
environments.

Int J Artif Intell, Vol. 14, No. 5, October 2025: 4371-4381


Int J Artif Intell ISSN: 2252-8938  4379

4. CONCLUSION AND PERSPECTIVES


This study highlights the effectiveness of ML models, particularly MLP, in analyzing harmonic
compliance and predicting THD levels in RO desalination plants. The results demonstrate the potential of
AI-driven approaches to ensure power quality and adherence to international standards like IEC 61000,
IEEE 519, and EN 50160. Regarding computational efficiency, the MLP model demonstrates superior
accuracy but requires higher inference time and computational resources due to its deeper architecture and
dense parameter space. This may limit its applicability in highly time-constrained environments. However,
the deployment remains feasible on industrial embedded systems with moderate computational power
(e.g., industrial PCs supporting TensorFlow Lite or ONNX Runtime). Framework for platform independent
ML model execution. In contrast, simpler models such as DT or RF provide much faster inference times,
making them more suitable for real-time scenarios where latency is critical. A trade-off between model
accuracy and computational cost should be considered based on operational constraints. Moving forward, the
installation of active harmonic filters, tailored to the harmonic profiles identified in this study, is a critical
next step. Integrating these filters with real-time monitoring systems, powered by AI models, could enable
predictive maintenance and adaptive control, enhancing operational efficiency and sustainability. Future
work should explore the economic and environmental benefits of such implementations, paving the way for
smarter and more sustainable industrial energy systems. Additionally, integrating this AI-powered framework
into SCADA systems could enable a fully autonomous power quality management system, enhancing
resilience, efficiency, and adaptability in industrial energy networks.

ACKNOWLEDGMENTS
The authors want to thank the Maintenance and laboratory teams at the MAROC CENTRAL
demineralization station, Kasba Tadla, Morocco, for their invaluable help and support.

FUNDING INFORMATION
Authors state no funding involved.

AUTHOR CONTRIBUTIONS STATEMENT


This journal uses the Contributor Roles Taxonomy (CRediT) to recognize individual author
contributions, reduce authorship disputes, and facilitate collaboration.

Name of Author C M So Va Fo I R D O E Vi Su P Fu
Cherki Lahlou ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
Belaid Bouikhalene ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓
Jamaa Bengourram ✓ ✓ ✓ ✓ ✓ ✓
Hassan Latrache ✓ ✓ ✓ ✓ ✓ ✓

C : Conceptualization I : Investigation Vi : Visualization


M : Methodology R : Resources Su : Supervision
So : Software D : Data Curation P : Project administration
Va : Validation O : Writing - Original Draft Fu : Funding acquisition
Fo : Formal analysis E : Writing - Review & Editing

CONFLICT OF INTEREST STATEMENT


As part of the interests associated with this publication, the authors declare that they have no financial
conflicts of interest or personal relationships likely to have influenced the work presented in this paper.

DATA AVAILABILITY
The data supporting the results of this study are available on request from the corresponding author.

REFERENCES
[1] N. Sadek, M. Attia, and I. El-Gafy, “Experimental performance analysis for reverse osmosis pilot plant subjected to different
brackish salinity spectrum,” Journal of King Saud University-Engineering Sciences, vol. 36, no. 7, pp. 438–445, Sep. 2024,
doi: 10.1016/j.jksues.2023.09.002.
[2] T. A. El-Sayed and A. A. A. Fatah, “Investigating the performance of reciprocating high-pressure pumps in constant recovery
small ro desalination plants,” Desalination and Water Treatment, vol. 143, pp. 78–87, 2019, doi: 10.5004/dwt.2019.23550.
[3] H. Zhao, “Neural network with data augmentation in multi-objective prediction of multi-stage pump,” arXiv–Electrical
Engineering and Systems Science, pp. 1–13, 2020, doi: 10.48550/arXiv.2002.02402.
Intelligent assessment of harmonic distortion compliance in reverse osmosis systems (Cherki Lahlou)
4380  ISSN: 2252-8938

[4] P. S. Georgilakis and N. D. Hatziargyriou, “A review of power distribution planning in the modern power systems era: models,
methods and future research,” Electric Power Systems Research, vol. 121, pp. 89–100, 2015, doi: 10.1016/j.epsr.2014.12.010.
[5] Ł. Michalec, M. Jasiński, T. Sikorski, Z. Leonowicz, Ł. Jasiński, and V. Suresh, “Impact of harmonic currents of nonlinear loads
on power quality of a low voltage network-review and case study,” Energies, vol. 14, no. 12, 2021, doi: 10.3390/en14123665.
[6] A. Sircar, K. Yadav, K. Rayavarapu, N. Bist, and H. Oza, “Application of machine learning and artificial intelligence in oil and
gas industry,” Petroleum Research, vol. 6, no. 4, pp. 379–391, 2021, doi: 10.1016/j.ptlrs.2021.05.009.
[7] M. Bertolini, D. Mezzogori, M. Neroni, and F. Zammori, “Machine learning for industrial applications: a comprehensive
literature review,” Expert Systems with Applications, vol. 175, 2021, doi: 10.1016/j.eswa.2021.114820.
[8] G. Stiglic, P. Kocbek, N. Fijacko, M. Zitnik, K. Verbert, and L. Cilar, “Interpretability of machine learning-based prediction models in
healthcare,” Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, vol. 10, no. 5, 2020, doi: 10.1002/widm.1379.
[9] M. Ferdous, J. Debnath, and N. R. Chakraborty, “Machine learning algorithms in healthcare: a literature survey,” in 2020 11th
International Conference on Computing, Communication and Networking Technologies, ICCCNT 2020, 2020, pp. 1–6,
doi: 10.1109/ICCCNT49239.2020.9225642.
[10] A. EL Bilali, T. Abdeslam, N. Mazigh, and M. Moukhliss, “Prediction of chemical water quality used for drinking purposes based
on artificial neural networks,” Moroccan Journal of Chemistry, vol. 8, no. 3, pp. 665–672, 2020, doi:
10.48317/IMIST.PRSM/morjchem-v8i3.19786.
[11] L. Li, S. Rong, R. Wang, and S. Yu, “Recent advances in artificial intelligence and machine learning for nonlinear relationship
analysis and process control in drinking water treatment: a review,” Chemical Engineering Journal, vol. 405, 2021,
doi: 10.1016/j.cej.2020.126673.
[12] M. Zhu et al., “A review of the application of machine learning in water quality evaluation,” Eco-Environment and Health, vol. 1,
no. 2, pp. 107–116, 2022, doi: 10.1016/j.eehl.2022.06.001.
[13] S. Ballı and E. Özdemir, “A novel method for prediction of euroleague game results using hybrid feature extraction and machine
learning techniques,” Chaos, Solitons and Fractals, vol. 150, 2021, doi: 10.1016/j.chaos.2021.111119.
[14] R. Marcelino, J. Sampaio, G. Amichay, B. Gonçalves, I. D. Couzin, and M. Nagy, “Collective movement analysis reveals coordination
tactics of team players in football matches,” Chaos, Solitons and Fractals, vol. 138, 2020, doi: 10.1016/j.chaos.2020.109831.
[15] O. T. -Rodriguez, R. A. C. -Gutiérrez, and A. L. H. -Javier, “Modeling and prediction of covid-19 in Mexico applying
mathematical and computational models,” Chaos, Solitons and Fractals, vol. 138, 2020, doi: 10.1016/j.chaos.2020.109946.
[16] K. Metin, H. Ceylan, E. Demirkesen, K. Canatan, and M. Hizli, “Problems in electric systems caused by harmonics and solution proposals,”
European Journal of Engineering and Technology Research, vol. 6, no. 1, pp. 137–141, 2021, doi: 10.24018/ejers.2021.6.1.2343.
[17] G. Crotti, G. D’Avanzo, P. S. Letizia, and M. Luiso, “The use of voltage transformers for the measurement of power system
subharmonics in compliance with international standards,” IEEE Transactions on Instrumentation and Measurement, vol. 71,
pp. 1–12, 2022, doi: 10.1109/TIM.2022.3204318.
[18] A. A. -Gimon, A. Z. -Lamadrid, D. M. -Sotelo, and O. D. -Perez, “A review of total harmonic distortion factors for the measurement
of harmonic and interharmonic pollution in modern power systems,” Energies, vol. 14, no. 20, 2021, doi: 10.3390/en14206467.
[19] M. L. Duc, L. Hlavaty, P. Bilik, and R. Martinek, “Harmonic mitigation using meta-heuristic optimization for shunt adaptive
power filters: a review,” Energies, vol. 16, no. 10, 2023, doi: 10.3390/en16103998.
[20] M. A. Sadiq et al., “Prominence of filtering techniques for harmonics mitigation in advanced power electronics systems,”
International Journal of Innovations in Science and Technology, vol. 4, no. 2, pp. 512–525, 2022, doi: 10.33411/ijist/2022040220.
[21] F. A. Albasri, S. A. Al-Mawsawi, and M. Al-Mahari, “A pot line rectiformer scheme with hybrid-shunt active power filter,”
International Journal of Power Electronics and Drive Systems, vol. 13, no. 1, pp. 1–10, 2022, doi: 10.11591/ijpeds.v13.i1.pp1-10.
[22] M. Setti and M. Cherkaoui, “Low switching frequency modulation for generalized three-phase multilevel inverters geared toward
grid codes compliance,” International Journal of Power Electronics and Drive Systems, vol. 12, no. 4, pp. 2349–2357, 2021,
doi: 10.11591/ijpeds.v12.i4.pp2349-2357.
[23] British Standards Institution, Voltage characteristics of electricity supplied by public distribution networks. London, United
Kingdom: British Standards Institution, 2007.
[24] H. Lu and X. Ma, “Hybrid decision tree-based machine learning models for short-term water quality prediction,” Chemosphere,
vol. 249, 2020, doi: 10.1016/j.chemosphere.2020.126169.
[25] J. Hu and S. Szymczak, “A review on longitudinal data analysis with random forest,” Briefings in Bioinformatics, vol. 24, no. 2,
pp. 1–11, 2023, doi: 10.1093/bib/bbad002.
[26] S. Ghosh, “SVM-PGSL coupled approach for statistical downscaling to predict rainfall from GCM output,” Journal of
Geophysical Research Atmospheres, vol. 115, no. 22, 2010, doi: 10.1029/2009JD013548.
[27] A. N. Ahmed et al., “Machine learning methods for better water quality prediction,” Journal of Hydrology, vol. 578, 2019,
doi: 10.1016/j.jhydrol.2019.124084.
[28] Z. Zhou, Y. Qiao, X. Lin, P. Li, N. Wu, and D. Yu, “A deployment method for motor fault diagnosis application based on edge
intelligence,” Sensors, vol. 25, no. 1, 2025, doi: 10.3390/s25010009.

BIOGRAPHIES OF AUTHORS

Cherki Lahlou in 2023, he earned his Master’s degree in electrical engineering


from the National School of Arts and Crafts in Rabat, Morocco. Currently, he is pursuing his
Ph.D. studies in the Faculty of Science and Technology, Sultan Moulay Slimane University,
Department of Industrial and Surface Engineering, Beni Mellal, Morocco and works as a
Maintenance Manager for the National Office of Electricity and Drinking Water. He can be
contacted at email: cherki.lahlou@gmail.com.

Int J Artif Intell, Vol. 14, No. 5, October 2025: 4371-4381


Int J Artif Intell ISSN: 2252-8938  4381

Belaid Bouikhalene previously served as Head of the Department of


Mathematics and Computer Science at the Polydisciplinary Faculty of Sultan Moulay Slimane
University, Béni Mellal. Currently, he is a professor and researcher in the Department of
Mathematics and Computer Science and the Director of the Béni Mellal National School of
Applied Sciences, Sultan Moulay Slimane University, Morocco. His research interests include
applied mathematics, computer science, artificial intelligence, and data science. He can be
contacted at email: b.bouikhalene@usms.ma.

Jamaa Bengourram is a Professor of Mechanical Engineering at the Faculty of


Science and Technology at Sultan Moulay Slimane University in Beni Mellal, Morocco. He is
currently a researcher at the Laboratory of Industrial Engineering and Systems Integration
(LGIIS) at Sultan Moulay Slimane University and head the Department of Mechanical
Engineering at the same institution. His research interests include mechanical engineering,
industrial engineering, and mechatronics, with a particular focus on systems integration,
applied mechanics, and industrial innovation. He is the author and supervisor of several
publications, actively contributing to the development of engineering sciences in Morocco. He
can be contacted at email: bengoram@yahoo.fr.

Hassan Latrache is a professor and researcher at the Laboratory of Industrial


Engineering and Systems Integration (LGIIS), Faculty of Science and Technology, Sultan
Moulay Slimane University, Beni Mellal, Morocco. His research interests span biopathology
and biomedical research, emerging technologies, engineering, information systems, and
artificial intelligence. He has contributed to interdisciplinary research bridging biomedical
sciences with advanced computational and engineering approaches, fostering innovation in
health technologies and intelligent systems. He can be contacted at email: latracheh@yahoo.fr.

Intelligent assessment of harmonic distortion compliance in reverse osmosis systems (Cherki Lahlou)

You might also like