Integration of Machine Learning and Internet of Things for Sustainable Management


1. Introduction

Aquaculture has become a cornerstone in global food production, providing over half of the fish consumed worldwide as of 2020, according to the Food and Agriculture Organization (FAO) of the United Nations. Despite its significant role in ensuring food security, aquaculture faces ongoing challenges, particularly in managing water quality—an essential factor in maintaining healthy fish stocks and sustainable production. Variations in water parameters, such as temperature, dissolved oxygen (DO), pH, and turbidity, are known to impact fish health and growth rates, often resulting in substantial economic losses. Studies indicate that low DO levels can reduce fish growth by up to 40% in poorly managed ponds, underscoring the need for more efficient, data-driven management solutions in aquaculture, especially in rural regions with limited technological resources [1].
The current research landscape highlights promising advancements in aquaculture through emerging technologies such as the Internet of Things (IoT) and Machine Learning (ML). The IoT enables the continuous collection of critical water data through networks of sensors, providing valuable, timely insights into conditions that may affect fish populations. Concurrently, ML algorithms, including Random Forest (RF) and Support Vector Machines (SVMs), have demonstrated utility in predictive analytics, allowing aquaculture managers to anticipate and mitigate critical shifts in water quality. Combining the IoT with ML has shown potential, with studies reporting up to a 30% reduction in losses due to water quality issues [2,3]. However, existing systems often face limitations, such as a reliance on static or semi-real-time monitoring and inefficiencies in handling computational demands, particularly in resource-limited settings [4].
To address these challenges, this study integrates quantum optimization, specifically the Quantum Approximate Optimization Algorithm (QAOA), with IoT–ML systems to enhance predictive efficiency and reduce processing times. Unlike traditional systems, the QAOA accelerates the processing of ML models by up to 50%, enabling rapid responses to water quality fluctuations [5]. This capability is crucial in tropical aquaculture environments like those in Montería, Colombia, where environmental changes can occur suddenly and require immediate interventions. By combining the IoT, ML, and the QAOA, the proposed system offers a novel, scalable framework for real-time water quality management that is adaptable to both high-tech urban and resource-constrained rural environments.

This research aims to address two critical questions: How can IoT–ML systems be optimized and adapted for aquaculture in rural, resource-constrained areas? And, to what extent can quantum optimization improve predictive model processing times, especially in scenarios requiring rapid responses to changing water conditions? By exploring these questions, the study advances the field of aquaculture by demonstrating a novel application of quantum technologies in real-time environmental monitoring and predictive analytics.

The main objective of this paper is to present an integrative approach to enhancing water quality monitoring in aquaculture by combining the IoT, ML, and the QAOA for effective, real-time responses to changing conditions. The system’s performance is rigorously evaluated using advanced metrics, including Root Relative Mean Squared Prediction Error (RRMSPE) and Relative Root Mean Squared Error (RRMSE) [6]. These evaluations provide insights into model accuracy and stability, essential for IoT applications in aquaculture. The findings demonstrate that integrating the IoT, ML, and quantum optimization can improve fish health, reduce mortality rates, and support the broader scientific understanding of sustainable aquaculture management systems.

2. Literature Review

The adoption of emerging technologies such as the Internet of Things (IoT), Machine Learning (ML), and quantum algorithms has shown significant potential for improving water quality management in aquaculture systems. These innovations have gained increased attention in the recent scientific literature due to their capacity to optimize real-time monitoring and enhance operational efficiency in aquaculture production. For example, recent studies document how the IoT and ML facilitate real-time data collection, allowing for the precise prediction of critical water quality variables such as dissolved oxygen and pH, which are crucial for fish welfare [4,5]. However, despite the promising nature of these advancements, significant challenges remain, especially in the full integration and scalability of these technologies in rural regions where technological resources are limited [7]. These limitations underscore the need for more robust and accessible solutions to manage water quality effectively, a point that several studies have emphasized as essential for the long-term sustainability of aquaculture [8].
To address these challenges, a systematic review was conducted using the PRISMA methodology (Preferred Reporting Items for Systematic Reviews and Meta-Analyses), which included studies published between 2018 and 2024 [9,10,11,12]. This review identified both advancements in the implementation of technologies such as the IoT, ML, and quantum algorithms in aquaculture, as well as the gaps that still need to be resolved to ensure a wider adoption of these tools. The results suggest that the incorporation of quantum algorithms is particularly promising for managing large volumes of real-time data, especially in aquaculture systems where rapid response capability is crucial for maintaining water quality and fish welfare [13].

The study search was conducted in high-impact academic databases such as IEEE Xplore, Web of Science, and ScienceDirect, using an optimized search string: (“IoT” OR “Internet of Things”) AND (“Machine Learning” OR “ML”) AND (“Water Quality” OR “Water Monitoring”) AND (“Aquaculture” OR “Fish Farming”). This strategy enabled the identification of 86 studies addressing the use of these technologies for water quality management in aquaculture. The flexibility in the search string and the use of multiple academic databases contributed to obtaining a broad range of relevant studies.

Inclusion Criteria:

  • Articles published between 2018 and 2024.

  • Peer-reviewed studies analyzing the use of the IoT, ML, or quantum algorithms in water quality management in aquaculture.

  • Papers with verifiable DOIs that include quantitative data or predictive models.

Exclusion Criteria:

  • Non-peer-reviewed studies or those without a valid DOI.

  • Publications that do not include specific applications in aquaculture.

  • Articles focusing solely on treatment technologies without the integration of the IoT or ML.

Study Selection Process:

  • Identification: Initially, 86 studies were identified using the applied search string.

  • Screening: After removing duplicates and irrelevant articles (those that did not specifically address the IoT, ML, or aquaculture topics), 65 studies remained for further evaluation.

  • Eligibility: After applying the inclusion and exclusion criteria, 25 studies were selected as they met the relevancy and quality requirements.

  • Inclusion: Finally, 13 key studies were selected based on their detailed use of the IoT, ML, and quantum algorithms for water quality management in aquaculture systems, focusing on their practical application, innovation, and scalability, fulfilling all the methodological requirements.

Table 1 presents a summary of the findings from the selected studies, highlighting the main deficiencies identified and areas for improvement regarding the implementation of emerging technologies in aquaculture.
The reviewed studies show significant advances in the implementation of IoT technologies for water quality monitoring in aquaculture. However, several identified deficiencies persist. First, many works have not integrated quantum algorithms to optimize data processing, limiting ML models’ capacities to handle large volumes of real-time data—an essential feature in aquaculture systems that operate with multiple environmental variables [17]. For instance, a study using Support Vector Machine (SVM) and Backpropagation Neural Network (BPNN) models for predicting water quality is effective in forecasting key parameters such as pH and dissolved oxygen but lacks a quantum approach that could improve processing time efficiency [25]. Similarly, studies exploring solutions for recirculating aquaculture systems do not address the potential for optimization through quantum algorithms, which could accelerate prediction and response processes [21].
Another notable deficiency is the lack of scalability in rural areas. Studies highlight the challenges of implementing IoT and ML solutions in regions with limited connectivity [18,26]. These studies reveal that, while IoT technologies are effective in areas with advanced infrastructure, their implementation in rural regions requires more robust and cost-effective solutions, such as using Long Range (LoRa) technologies to improve connectivity.
This study addresses several of the deficiencies identified in the literature. First, it proposes the integration of quantum algorithms like the Quantum Approximate Optimization Algorithm (QAOA) to reduce processing times in ML models. This not only enhances the efficiency of water quality prediction but also allows for faster and more accurate real-time decision-making, a key feature in aquaculture systems that requires immediate responses to environmental changes [27].
Moreover, this work offers a scalable solution for rural areas using technologies such as LoRa and low-power networks to improve data transmission in regions without access to high-speed internet. This represents a significant advancement in making IoT technology accessible in aquaculture systems in developing countries, where connectivity is a major obstacle [20].
It is crucial for future research in aquaculture to focus on scalability, the integration of quantum algorithms, and the development of hybrid predictive models. The use of low-power networks like Long Range Wide Area Network (LoRaWAN) has proven effective for water quality monitoring in rural areas, allowing real-time data transmission with low energy consumption. This technology is key to overcoming connectivity barriers in regions with limited infrastructure, facilitating the adoption of the IoT in aquaculture [21]. Furthermore, the integration of the QAOA with ML can significantly improve the accuracy and speed of decision-making in aquaculture systems [28,29].

3. Materials and Methods

This study focuses on implementing a predictive water quality system for aquaculture ponds using Machine Learning (ML) and quantum optimization techniques. Key variables such as temperature, dissolved oxygen (DO), pH, and turbidity were continuously monitored to assess water quality, which is crucial for the health of fish in aquaculture environments. The IoT system architecture is modular and designed for real-time operation, with sensors connected to a Raspberry Pi that manages data collection and transmits it wirelessly, as shown in Figure 1, Figure 2 and Figure 3 [4,10,30,31].

3.1. Study Site

The research was conducted in artificial ponds located in Montería, Córdoba, Colombia (8.7867° N, 75.8399° W), an area characterized by a tropical climate with temperatures ranging between 24 °C and 30 °C. These ponds, supplied by natural springs, maintain a steady water flow, providing a stable aquaculture environment that influences water quality and fish health. This setup allows for a controlled assessment of environmental conditions and their impact on aquaculture [17].

3.2. IoT System Architecture

The IoT system is designed to enable real-time monitoring and the adaptive management of water quality. Sensors were deployed to measure temperature, pH, dissolved oxygen (DO), and turbidity, transmitting data to a Raspberry Pi, which serves as the central processing unit (CPU). The Raspberry Pi stores data locally and sends it to a remote server over Wi-Fi for further analysis. Additionally, the system integrates an anomaly detection module that uses a Random Forest model to identify deviations in water quality parameters. Detected anomalies trigger automatic alerts and are recorded for further investigation and system calibration.

To ensure continuous accuracy, the IoT system incorporates an automated model updating process. Real-time data collected by the sensors are used to retrain the ML model at regular intervals. This retraining process employs a sliding window approach, where the most recent 1000 records are combined with historical data to capture recent trends and patterns. Although 24 h intervals were used to monitor real-time performance, retraining occurred approximately every 41 days as new data accumulated to reach the required dataset size. The Quantum Approximate Optimization Algorithm (QAOA) was employed to optimize hyperparameters, significantly reducing retraining time and ensuring seamless integration of updated models into the system.

A Django-based web interface was created to visualize data in real-time, configure alert thresholds, and enable remote monitoring by users. Figure 1 shows the monitoring system setup in the field, while Figure 2 presents the device within a waterproof enclosure to protect its electronic components from environmental factors.
To further illustrate the IoT system’s architecture and the interactions between its components, Figure 3 presents a Unified Modeling Language (UML) class diagram. This diagram clarifies the communication between the sensors, Raspberry Pi, server, ML models, and user interface. Figure 4 provides an architectural diagram of the IoT system, while Figure 5 shows the trends observed in water quality parameters over time.

The integration of real-time IoT data and periodic model updates ensures the system’s adaptability to changing environmental conditions. This capability enables the early detection of water quality anomalies and supports timely interventions to maintain optimal aquaculture conditions.

3.3. Data Management and Transmission

The detailed pseudocode for managing data obtained from the sensors and transmitting it to the database and server is presented below. This algorithm is essential for real-time data collection, processing, and storage, ensuring the effectiveness of the monitoring system.

Algorithm 1 provides the basic structure for continuous monitoring and sensor data management, ensuring that any deviation from acceptable parameters is immediately reported to system operators.

Algorithm 1: IoT Data Management
Input: Temperature, pH, dissolved oxygen, and turbidity sensors; Wi-Fi connection; database.
Output: Data stored in the database and server.

  • Initialize temperature, pH, dissolved oxygen, and turbidity sensors.

  • While the system is operational:

    o

    For each connected sensor:

    • Obtain the current measurement from sensor SiSiSi.

    • If SiSiSi measurement is within the expected range:

      Continue monitoring.

    • If SiSiSi measurement exceeds the predefined threshold:

      Send an alert to the monitoring system.

    • Save the measurement in the local database.

    • Transmit the data via Wi-Fi to the server.

    • Update the web interface with the new data for real-time visualization.

  • End of loop.

Figure 6 illustrates the architectural sequence of the IoT system, detailing the interactions between the sensors, Raspberry Pi, database, Django interface, and server. This sequence diagram complements Algorithm 1 by visually representing the steps involved in data acquisition, threshold adjustment, storage, and real-time visualization.

3.4. Sensor Calibration and Maintenance

Before deployment, the sensors were calibrated using ISO 5814:2012 [32] and ISO 10523:2008 [33] standards for DO and pH, respectively. Calibration was performed every 15 days to ensure measurement accuracy under varying environmental conditions in the ponds [34]. While offline calibration was applied, future implementations should consider inline calibration and periodic maintenance routines, particularly for pH and DO electrodes, to maintain sensor reliability.

3.5. Data Collection and Dataset

A total of 4383 records were collected, capturing temperature (°C), dissolved oxygen (mg/L), pH, and turbidity (NTU). Data were recorded every hour, and the dataset is publicly available in the Mendeley Data repository (DOI: [10.17632/dgdr2kfbyt.1]). The monitored variables and their normalized values (temperature and DO scaled for predictive modeling) are presented in Table 2.

Although the observed variability of the water quality indicators was limited, this reflects the controlled conditions typical of aquaculture ponds in Montería, Córdoba. These conditions are consistent with stable tropical environments, where moderate fluctuations can still lead to critical risks for fish health. To ensure the feasibility of anomaly detection, the dataset was enriched by establishing dynamic thresholds based on both historical trends and domain-specific benchmarks. These thresholds enabled the identification of subtle deviations that could impact fish survival rates.

The following are examples of the identified deviations:

  • Dissolved oxygen (DO): Levels below 5 mg/L were identified as critical, correlating with increased fish stress and mortality risks.

  • Temperature: Variations above 28 °C significantly influenced DO levels, necessitating active oxygenation measures during warmer months.

  • Turbidity and pH: Deviations from optimal ranges (>4 NTU for turbidity, 7.0–8.5 for pH) highlighted the need for filtration and pH stabilization interventions.

These adjustments ensured that the dataset provided sufficient granularity for training the Random Forest model to detect and predict anomalies, aligning the observations with practical aquaculture management needs.

Dataset Description:

  • Temperature (°C): Measurement of water temperature.

  • Dissolved oxygen (mg/L): Reflects the concentration of oxygen in the water.

  • pH: Indicates the acidity or alkalinity of the water.

  • Turbidity (NTU): Represents the clarity or turbidity level of the water.

  • Normalized values: Scaled values for temperature and dissolved oxygen, used for predictive modeling.

Table 2.
Descriptive statistics of monitored variables and their scaled values.

Table 2.
Descriptive statistics of monitored variables and their scaled values.

VariableUnitRangeMeanStandard Deviation
Temperature°C26.5–28.427.30.6
Dissolved Oxygenmg/L6.3–7.96.90.6
pH7.3–8.07.830.21
TurbidityNTU2.8–4.03.310.43

3.6. Fuzzy Comprehensive Evaluation (FCE)

To assess water quality under the specific tropical conditions of Montería, the Fuzzy Comprehensive Evaluation (FCE) methodology was applied. This technique classified the monitored parameters—temperature, dissolved oxygen (DO), pH, and turbidity—into quality ranges of “Good”, “Moderate”, and “Poor”, adapted to local standards. These ranges were established to facilitate data interpretation within the environmental context of Montería, enhancing the accuracy of evaluations on factors affecting fish health in an aquaculture setting. This fuzzy evaluation helps to fine-tune system alerts and recommendations, providing a more robust analytical tool for continuous IoT monitoring [35].

3.7. Data Preprocessing

Data normalization was applied to continuous variables using Min-Max Scaling, as shown in Equation (1), which facilitates integration into the predictive models (Random Forest and SVM) [36].

X n o r m = X X m i n X m a x X m i n

where

  • Xnorm is the normalized value;

  • X is the original value of the variable;

  • Xmin is the minimum value in the dataset;

  • Xmax is the maximum value in the dataset.

3.8. Machine Learning Model Selection and Implementation

Two Machine Learning algorithms were selected for their robust performance with complex datasets: Random Forest (RF) and Support Vector Machine (SVM).

Random Forest: This model consists of multiple decision trees, each trained on a random subset of the data. Hyperparameters were tuned to use 100 trees with a maximum depth of 10, providing an optimal balance between bias and variance [37,38]. Algorithm 2 provides the detailed steps for implementing the Random Forest model, which ensures robust regression results.

Algorithm 2: Random Forest
Input: Training data (Xtrain, Ytrain), ntrees = 100, max_depth = 10
Output: Trained model for prediction

  • Initialize Random Forest with specified parameters.

  • For each tree in the forest:

  • Aggregate predictions (average for regression).

Support Vector Machine (SVM): This algorithm used a radial basis function (RBF) kernel with a penalty parameter C = 1.0, suitable for predicting nonlinear relationships in water quality data, particularly for pH and DO [22]. Algorithm 3 outlines the steps involved in the implementation of the SVM, emphasizing the initialization, training, and optimization phases.

Algorithm 3: SVM
Input: Training data (Xtrain, Ytrain), C = 1.0, kernel = RBF
Output: Trained model for prediction

  • Initialize SVM with specified kernel and penalty.

  • Train to maximize margin.

  • Optimize hyperplane with support vectors.

3.9. Quantum Approximate Optimization Algorithm (QAOA) for Real-Time Processing

To reduce model training time, the Quantum Approximate Optimization Algorithm (QAOA) was applied, cutting processing time by 50% compared to traditional methods like Particle Swarm Optimization (PSO) and Stochastic Gradient Descent (SGD) [27,28,29]. The cost function for the QAOA is shown in Equation (2) as follows:

C γ , β = ψ γ , β C ^ ψ γ , β

where

  • γ and β are the adjustable parameters of the algorithm;

  • ψ(γ,β) is the generated quantum state;

  • C ^ is the cost operator that defines the optimization problem.

Algorithm 4 provides the pseudocode for implementing the QAOA, detailing the steps for initializing parameters, evaluating the cost function, and adjusting parameters through gradient descent for optimization.

Algorithm 4: Quantum Approximate Optimization Algorithm (QAOA)
Input: ML model, initial parameters γ, β, training data D_train
Output: Optimized model with reduced training time

3.10. Model Evaluation and Metrics

Performance metrics included Root Relative Mean Squared Prediction Error (RRMSPE), Mean Absolute Percentage Error (MAPE), and Root Mean Squared Error (RMSE). The RRMSPE, RRMSE, and MAPE results are as follows [6,36,39]:
  • RRMSPE (1.44%): This indicates the model deviates on average by 1.44% from actual values, which is satisfactory for predictive applications in the IoT for aquaculture, where low error margins are critical [40].
  • MAPE (3.99%): An MAPE of 3.99% reflects a low mean percentage error, generally below 5%, which confirms high precision in relative predictions, beneficial for applications requiring specific value accuracy, like fish weight [41].
  • RRMSE (1.439789%): Calculated from the scaled RMSE of 0.099772 mg/L, it reflects relative error in terms of percentage, which is ideal for assessing model performance across varied parameter ranges [42].

3.11. Coefficient of Determination (R2)

The coefficient of determination R2, shown in Equation (3), was also used to measure accuracy, achieving a value of 0.990255, which confirms high prediction accuracy [43,44,45].

R 2 = 1 y i y ^ i 2 y i y ¯ 2

where

  • y i   are the observed values;

  • y ^ i are the values predicted by the model;

  • y ¯ is the mean of the observed data.

By integrating ML and the QAOA, the system achieved a robust predictive capability, highlighting quantum algorithms’ potential in real-time, high-precision applications. The models demonstrated improved responsiveness, accuracy, and efficiency, making this system a viable tool for aquaculture management.

4. Results

The continuous monitoring of aquaculture ponds revealed significant variations in key environmental factors directly influencing water quality and fish health. Observations focused on parameters such as temperature, dissolved oxygen (DO), pH, and turbidity, which displayed distinctive patterns over time, are crucial for sustainable aquaculture practices. For this analysis, a Fuzzy Comprehensive Evaluation (FCE) was applied, with parameter quality ranges adjusted to the specific conditions of Montería, enabling a more accurate assessment of water quality in a tropical environment [35].

4.1. Analysis of Relationship Between Turbidity and Dissolved Oxygen

The relationship between turbidity (NTU) and dissolved oxygen (DO) levels was analyzed using Ordinary Least Squares (OLS) and robust regression methods. The OLS regression yielded a slope of 0.0091 with a standard error of 0.0215, while the robust regression resulted in a slope of 0.0058 with a standard error of 0.0218. In both cases, the p-values (0.671 for OLS and 0.791 for robust regression) indicate that the slope is not statistically significant, confirming a null tendency.

These results suggest that variations in turbidity have a negligible effect on DO levels within the experimental range. The findings are consistent with the hypothesis that DO levels demonstrate resilience under moderate turbidity variations, which is critical in aquaculture systems where turbidity fluctuations are often caused by feed waste and fish activity. Previous studies have also identified that water quality and poor husbandry practices can significantly affect oxygen levels and, consequently, fish mortality [46].
The regression lines and their respective 95% confidence intervals are presented in Figure 7. The robust regression method was included to ensure reliability against potential outliers in the data, further confirming the null sloping tendency observed in the OLS analysis.

4.2. Daily Relationship Between Temperature and Dissolved Oxygen

The daily relationship between temperature (°C) and dissolved oxygen (DO) levels was analyzed using Ordinary Least Squares (OLS) and robust regression methods. The OLS regression yielded a slope of 0.0097 with a standard error of 0.0156 and a p-value of 0.534, indicating that the slope is not statistically significant. Similarly, the robust regression produced a slope of 0.0067 with a standard error of 0.0158 and a p-value of 0.671, confirming a null sloping tendency within the analyzed dataset.

These results suggest that, under the specific conditions of this study in Montería, Córdoba, no statistically significant relationship between temperature and DO levels was detected. However, this does not contradict the well-established understanding that higher temperatures reduce water’s capacity to retain dissolved oxygen [47]. Instead, it highlights that the inverse relationship may be less apparent in experimental contexts where temperature variations are moderate or where external factors, such as oxygenation systems or controlled environmental conditions, mitigate this effect.
This analysis underscores the importance of proactive management of DO levels in aquaculture systems, particularly in tropical regions like Montería, where seasonal temperature variations may require additional strategies to maintain optimal conditions. Figure 8 illustrates the relationship between temperature and dissolved oxygen, featuring both OLS and robust regression lines with their respective 95% confidence intervals, offering a clear and comprehensive representation of the findings.

4.3. Normalized Time Series of Daily Averages of Water Quality Parameters

Figure 9 shows the normalized time series of daily averages of water quality parameters, including temperature, dissolved oxygen (DO), pH, and turbidity. This graph allows for the observation of daily trends and variations for each parameter throughout the study period, highlighting the characteristic fluctuations of the tropical environment in Montería, Córdoba, and their potential impact on water quality [7,13,35].

4.4. Correlation Matrix of Water Quality Parameters

Figure 10 presents the correlation matrix of water quality parameters, allowing for an analysis of the relationships between them. The lack of strong correlations indicates that these parameters behave relatively independently, suggesting that each parameter may respond differently to environmental changes. This analysis is crucial for developing specific and appropriate interventions for each parameter in the aquaculture context [46,48].

4.5. Performance of Dissolved Oxygen Model and Limitations in Other Parameters

The optimized Random Forest model achieved high precision in predicting DO levels, with an RMSE of 0.744 and an R2 of 1.0. This accuracy highlights the model’s capability to account for DO fluctuations under local conditions. However, parameters such as temperature, pH, and turbidity did not consistently align with optimal aquaculture standards. To address this, a Fuzzy Comprehensive Evaluation (FCE) approach was implemented, adjusting membership ranges to fit Montería’s water quality context (see Table 3). The FCE adjustment provides a better representation of local tropical conditions, where factors like seasonal rainfall and high temperatures impact water quality, often deviating from traditional aquaculture norms [15,43].

The following are examples of the system’s adjustments:

  • During warmer months, when temperatures exceeded 28 °C (classified as “Moderate” by the FCE), the system detected declines in DO and triggered oxygenation interventions.

  • Elevated turbidity (>4 NTU) indicated organic matter accumulation, prompting filtration and aeration.

The integration of these thresholds into the ML model not only improved anomaly detection but also enabled timely corrective interventions, maintaining fish survival rates above 90% during the study period.

Table 3.
Adjusted FCE membership ranges for water quality parameters in Montería.

Table 3.
Adjusted FCE membership ranges for water quality parameters in Montería.

ParameterGood RangeModerate RangePoor Range
Temperature (°C)24–2727–2929–30
Dissolved Oxygen (mg/L)5–83–52–3
pH6.5–85.5–6.54–5.5
Turbidity (NTU)1–55–77–9
FCE categorized water quality into “Good”, “Moderate”, and “Poor” ranges. DO was largely within the “Good” range, while temperature and pH fluctuated between “Moderate” and “Poor” during warmer months. This emphasizes the importance of interventions like oxygenation and filtration to mitigate environmental impacts and ensure optimal water quality [15,43].

The FCE provided complementary insights into traditional metrics such as RMSE and R2, offering a more nuanced perspective on critical water quality variations. For example, while traditional metrics indicated high model precision, the FCE framework facilitated the identification of conditions requiring immediate intervention by categorizing parameters into actionable quality ranges. This dual approach ensured that both predictive accuracy and practical relevance were maintained, enhancing the system’s ability to detect and respond to adverse environmental changes effectively.

4.6. Integration of Anomaly Detection and Real-Time Model Updates

The IoT–ML system effectively detected water quality anomalies in real-time, triggering corrective actions to mitigate environmental risks. Anomalies, such as low dissolved oxygen (DO) levels and elevated turbidity, were identified by the Random Forest model, which compared sensor data to dynamic thresholds established through historical and real-time data analysis. Specifically, the Random Forest model utilized historical datasets to define baseline ranges and patterns, while the incorporation of real-time sensor data allowed the system to detect deviations promptly. This integration ensured that both long-term trends and sudden changes were accounted for during anomaly detection [49,50].
To ensure the accuracy and adaptability of the predictive model, a sliding window approach was implemented to update the Random Forest model at regular intervals. This process incorporated the most recent 1000 data records alongside historical datasets to capture evolving trends and patterns. While real-time data were monitored continuously, model retraining occurred approximately every 41 days, reflecting the time required to accumulate sufficient new records (see Table 4 for Random Forest performance metrics). The combination of historical data and periodic updates enabled the system to refine its thresholds dynamically, ensuring robust detection of water quality anomalies across varying environmental conditions (see Table 5 for cross-validation metrics and Table 6 for independent test results). For example, historical data identified a critical DO threshold of 5 mg/L, below which fish survival rates declined, prompting the system to issue alerts and trigger oxygenation interventions automatically.
The Quantum Approximate Optimization Algorithm (QAOA) reduced retraining time by 50%, allowing for the seamless deployment of updated models without interrupting real-time operations. Studies in anomaly detection for optical networks and time series data have highlighted the value of combining dynamic updates with optimization algorithms to enhance system reliability [49,51].
The system’s ability to detect anomalies and respond promptly had a measurable impact on aquaculture productivity. For instance, during warmer months, it maintained dissolved oxygen levels within optimal ranges, contributing to survival rates above 90% (see Table 7 for fish survival rates and corrective interventions). These findings demonstrate the practical advantages of integrating the IoT, ML, and quantum optimization for real-time aquaculture management. Furthermore, this study builds on prior work by demonstrating the specific benefits of real-time model updates in mitigating environmental risks in aquaculture [51,52].

4.7. Integration of QAOA in Predictive Model: Training Time Optimization

Implementing the Quantum Approximate Optimization Algorithm (QAOA) in the Machine Learning model optimized parameter settings and significantly reduced training time by 50%, from 120 s to 60 s. This advancement is crucial for real-time monitoring in aquaculture, where rapid responses can prevent critical incidents (see Table 4). The QAOA enables quicker decision-making, essential for mitigating risks and enhancing environmental data management efficiency in aquaculture systems [23,48].

Table 4.
Performance of Random Forest model.

Table 4.
Performance of Random Forest model.

MetricValue
R20.999
RMSE0.0998 mg/L
RRMSE (%)1.44%

4.8. Model Accuracy Evaluation: Factor R

The high coefficient of determination (R2 = 0.999) and low RMSE (0.0998 mg/L) achieved by the optimized model demonstrate its capability to capture critical water quality patterns with high precision. These metrics not only reflect the model’s robustness but also have direct implications for real-time decision-making. For instance, a low RMSE ensures that the model’s predictions are close to actual values, enabling immediate adjustments to oxygenation or filtration systems. Similarly, the high R2 value indicates that the model can explain nearly all variability in water quality data, enhancing confidence in automated interventions in dynamic aquaculture environments [53].

4.9. Model Validation Through Cross-Validation and Independent Testing

The 10-fold cross-validation and independent testing confirmed the model’s robustness in generalizing predictions across various environmental conditions. Table 5 presents the average results of R2, MSE, and RRMSPE from the cross-validation folds. This level of precision is critical for real-time monitoring systems as it minimizes the risk of incorrect decisions based on erroneous data. Furthermore, the consistent RMSE and R2 values across all tests ensure the model’s reliability, even when faced with environmental fluctuations typical of tropical aquaculture settings [54].

Table 5.
Model performance during K-fold cross-validation.

Table 5.
Model performance during K-fold cross-validation.

Validation SubsetAverage R2Average MSE (mg/L)RRMSPE (%)
Fold 10.9960.10001.44%
Fold 20.9970.10001.44%
Fold 30.9980.10001.44%
Fold 40.9990.10001.44%
Fold 50.9990.10001.44%
Average0.9980.10001.44%
The model’s high accuracy was further validated during independent testing, with results presented in Table 6, confirming its applicability in practical aquaculture scenarios where maintaining water quality is crucial for productivity.

Table 6.
Model performance on independent test set.

Table 6.
Model performance on independent test set.

MetricValue
R20.998
RMSE0.0998 mg/L
RRMSPE (%)1.44%

4.10. Corrective Interventions and Impact on Fish Health

Throughout the study, more than 6000 corrective interventions were conducted, particularly during warmer months when high temperatures and low dissolved oxygen (DO) levels posed elevated risks. These interventions, including oxygenation and pH adjustments, were automatically triggered when parameters deviated from optimal levels. The QAOA-enabled system allowed for timely responses, significantly reducing fish stress and maintaining survival rates above 90% across a total of 10,000 fish distributed among the aquaculture ponds (see Table 7) [21,23,40,55].

Table 7.
Fish growth, survival rate, and corrective interventions.

Table 7.
Fish growth, survival rate, and corrective interventions.

MonthAverage Weight (g)Survival Rate (%)Disease CasesMonthly DeathsCorrective
Interventions
January275.9695.14144314490
February278.2193.096726774
March285.9196.107447465
April276.1192.967207262
May262.1092.93744742720
June262.8292.85720722732
July262.8292.8539489
Recent studies have demonstrated that integrating the IoT and ML in aquaculture systems, such as real-time monitoring systems, can significantly reduce mortality by optimizing environmental parameters and automating interventions [7,13]. For instance, the implementation of LSTM neural networks to predict water quality parameters has shown promising results in reducing losses [56]. Furthermore, automation through systems like Aqua Colony, which uses fish activity data to optimize feeding, reinforces the viability of these technologies to enhance sustainability and productivity [57].
In uncontrolled environments, previous studies have reported mortality rates ranging from 15% to 30%, even with basic oxygenation measures [7,13]. In comparison, the observed mortality rates in this study were significantly lower, ranging from 4.86% (January) to 7.15% (June), validating the effectiveness of the proposed system in mitigating risks associated with adverse environmental factors. For example, during the warm months of May and June, when average temperatures exceeded 28 °C, the system maintained survival rates of 92.93% and 92.85%, respectively, demonstrating its capability to proactively respond to critical conditions [58].
These findings demonstrate the effectiveness of IoT-based monitoring and advanced predictive models in managing aquaculture water quality, aligning with sustainable aquaculture practices [59].

While this study focused on a limited observation period, future research could extend the analysis across several years and compare results across different tropical regions to further validate the system’s effectiveness in diverse environmental contexts. This longitudinal approach would enable robust comparisons between pre- and post-implementation periods of the system, further strengthening evidence of its positive impact on aquaculture sustainability and productivity.

These comparisons reinforce the system’s validity in real-world conditions and its capacity to reduce mortality rates below the typical standards observed in uncontrolled environments. This highlights the positive impact of an IoT–ML system with automated interventions on the sustainability and productivity of aquaculture operations.

5. Discussion

This study presents an innovative approach to aquaculture management by integrating the Internet of Things (IoT), Machine Learning (ML), and quantum optimization technologies, highlighting the importance of continuous monitoring and predictive analytics for water quality control. By addressing key gaps in existing research—such as limited computational efficiency and adaptability to resource-constrained environments—the proposed system advances the field with significant practical and academic contributions.

Through the use of sensors to measure key parameters such as temperature, pH, turbidity, and dissolved oxygen (DO), the system enabled real-time adjustments that helped maintain optimal conditions for fish health. Unlike traditional systems, the integration of the Quantum Approximate Optimization Algorithm (QAOA) resulted in a 50% reduction in model training time (from 120 s to 60 s), providing rapid responses crucial for real-time aquaculture management. This enhancement demonstrates the system’s capacity to mitigate risks associated with sudden water quality fluctuations, ensuring timely interventions that protect fish health and minimize productivity losses.

The Random Forest model, optimized and validated through K-fold cross-validation and independent testing, demonstrated high accuracy (R2 = 0.999, RMSE = 0.0998 mg/L), establishing itself as a reliable tool for predicting critical water quality variables in a tropical aquaculture setting [7,13,35,46,48]. Moreover, this study extends the utility of Random Forest by demonstrating its integration with the QAOA, a combination not previously explored in aquaculture, enabling predictive analytics to operate efficiently even in rural or resource-limited settings.
A notable aspect of this study is the practical implementation framework, designed to be adaptable to both resource-limited rural areas and fully equipped urban environments. Table 8 provides a step-by-step methodology adaptable to varying technological infrastructures. For rural settings, low-cost sensors and offline data storage solutions, such as SD cards and Raspberry Pi units, offer feasible options. In contrast, advanced technological environments can utilize cloud-based systems and real-time data processing for more dynamic and responsive aquaculture management [23,59]. This methodological flexibility enhances the replicability of the IoT–ML system across different contexts, ensuring that aquaculture facilities worldwide can benefit regardless of local infrastructure constraints.

Table 8.
Innovative methodological approach for implementing IoT- and Machine Learning-based aquaculture monitoring systems in rural and urban areas.

Table 8.
Innovative methodological approach for implementing IoT- and Machine Learning-based aquaculture monitoring systems in rural and urban areas.

StepDescriptionObjectiveRequirements for Rural Areas (No Internet and No Access to Major Platforms)Requirements for Areas with Full Resources Available
Step 1Sensor InstallationPlace sensors in the pond to measure temperature, pH, dissolved oxygen, and turbidity.Low-cost sensors that can be purchased locally. A low-cost environmental monitoring kit (e.g., Arduino with basic sensors) can be used.Industrial-grade sensors that precisely measure all variables. Commercial IoT sensors that automatically send data.
Step 2Local Data System SetupConnect the sensors to a local processing unit (without internet). Use a local computer or Raspberry Pi to collect the data.Raspberry Pi or a basic computer with simple software for data collection (Excel or open-source software).Raspberry Pi or advanced commercial monitoring systems connected to a cloud server for real-time processing.
Step 3Data StorageStore data locally on an SD card or hard drive.Use SD cards to store the data collected by Raspberry Pi or computer. Data can be manually downloaded periodically.Cloud storage (Google Cloud, AWS, Azure) to store and access data from anywhere in real-time.
Step 4Data VisualizationCreate manual charts or use local software to visualize measurements and detect problems.Create charts in Excel or open-source software to visualize the data. The analysis process is manual but can be carried out daily or weekly to review water conditions.Use web platforms (Django or custom applications) to visualize data in real-time from any device. Automated graphs that display alerts.
Step 5Prediction and AnalysisImplement Machine Learning algorithms to predict water quality.In rural areas, if access to powerful computers is unavailable, spreadsheets with simple formulas can be used to predict problems based on observed trends.Use advanced algorithms such as Random Forest and SVM through platforms like Google Colab or servers with Python, Scikit-learn, etc., for automatic predictions.
Step 6Manual InterventionsMake decisions based on the data obtained to improve water quality (add oxygenators or adjust temperature).The farmer receives the measurements and can manually adjust the pond parameters (oxygenators, ventilation, etc.).The system issues automatic alerts and automatically adjusts pond parameters via actuators connected to the IoT system.
Step 7Continuous MonitoringContinuously monitor the pond and make adjustments based on the collected data.Manual monitoring of the data with periodic downloads of the information. Possibility of daily or weekly reviews.Continuous and real-time monitoring thanks to full automation of the IoT system and cloud connection.
The environmental conditions specific to Montería, characterized by relatively constant temperatures (24–30 °C) and high humidity levels, played a pivotal role in shaping the model’s performance. These stable yet dynamic conditions allowed for the consistent monitoring of temperature and dissolved oxygen (DO) levels, highlighting how tropical climates influence water quality variability. For instance, the steady temperature range mitigated extreme fluctuations in DO levels, enabling the Random Forest model to achieve high precision in anomaly detection. Similar applications of IoT-based monitoring systems in tropical aquaculture contexts have demonstrated the effectiveness of Random Forest algorithms for maintaining water quality [7,60].
The findings from this study provide valuable insights into aquaculture operations in similar tropical regions. While the thresholds and intervention strategies developed here are tailored to Montería, they can be adapted for other tropical environments with comparable climatic characteristics, such as those found in Southeast Asia and Central Africa. Adjusting the Fuzzy Comprehensive Evaluation (FCE) parameters to account for regional variations, such as more pronounced seasonal changes or differences in natural turbidity, would ensure a broader applicability of this approach. Previous studies on IoT frameworks and monitoring systems in aquaculture highlight the potential for scalability and adaptability of such technologies, even under diverse environmental conditions [13,25,61]. This adaptability underscores the relevance of the IoT–ML–QAOA framework as a scalable solution for aquaculture management in diverse tropical settings.
Moreover, integrating sustainability principles into IoT–ML systems has demonstrated broader applications beyond aquaculture, particularly in sectors that require a balance between environmental impact and operational efficiency. For instance, the combination of life cycle assessment (LCA) and environmental, social, and governance (ESG) strategies has proven effective for scaling IoT implementations in the food industry, offering a roadmap adaptable to aquaculture practices [42,62]. This integration has yielded significant benefits, such as a 20% reduction in operational costs and a 10% increase in market share for small- and medium-sized enterprises (SMEs) in the food sector, based on comparative analyses conducted between 2019 and 2023 [24]. These methodologies provide a replicable framework for promoting sustainability and operational efficiency, addressing critical challenges in aquaculture by balancing environmental responsibility with productivity.
A key innovation of this study lies in the integration of real-time anomaly detection and dynamic model updates to address fluctuating water quality conditions in aquaculture systems. The IoT–ML system utilized a Random Forest model to detect deviations in critical parameters such as dissolved oxygen (DO) and turbidity, triggering automated corrective actions. These interventions, including adjustments in oxygenation and pH levels, were essential during critical periods such as the warmer months when elevated temperatures increased risks to fish health. Over 6000 anomalies were identified and addressed during the study, demonstrating the system’s capability to support proactive aquaculture management. Similar approaches to anomaly detection in time series and environmental monitoring were discussed in studies that integrate Random Forest and related ML techniques [49,51].
To maintain the model’s accuracy and adaptability, a sliding window approach was implemented for periodic updates. The Random Forest model was retrained approximately every 41 days, reflecting the time required to accumulate 1000 new data records, which were combined with historical datasets. This approach ensured its responsiveness to evolving environmental patterns while accounting for the controlled data collection frequency in aquaculture systems. The integration of the Quantum Approximate Optimization Algorithm (QAOA) further optimized this process by reducing training time by 50%, enabling the seamless deployment of updated models without interrupting real-time operations. This dynamic updating mechanism ensures the continuous alignment of the model with current water quality trends, which is critical for sustaining aquaculture productivity in variable environmental conditions. Techniques for integrating model retraining and optimization, like sliding windows and the QAOA, have shown significant potential in maintaining real-time system adaptability [50,52].

The IoT–ML system’s ability to continuously collect extensive data enables both real-time and long-term pattern analysis. This is particularly innovative when coupled with the QAOA, which accelerates predictive processing to facilitate rapid decision-making. Constant monitoring not only optimizes immediate interventions but also supports the identification of seasonal patterns and climate-induced changes over time. These insights contribute to a deeper understanding of environmental dynamics in aquaculture, reinforcing the role of IoT–ML–QAOA technology in sustainable aquaculture management.

The integration of the QAOA in the model training process resulted in a significant reduction in training time, from 120 s to 60 s. This improvement is particularly valuable for real-time aquaculture applications, where rapid decision-making is essential to mitigate environmental risks and support fish health. Unlike previous studies that focus on static monitoring or semi-automated systems, this research demonstrates how quantum optimization can be practically deployed to enhance predictive efficiency in real-world settings. As cloud-based quantum platforms by companies such as IBM and Google become more accessible, this system has the potential to democratize advanced aquaculture management practices [63,64,65].
This study conducted over 6000 corrective interventions, including adjustments in oxygenation, pH balancing, and turbidity control, particularly during warmer months (May and June) when elevated temperatures and reduced DO levels posed higher risks to fish health. Maintaining monthly survival rates above 90% showcases the operational effectiveness of the system, offering a clear advantage over traditional approaches [46,47].
Future research opportunities include incorporating renewable energy sources like solar panels to make IoT-based monitoring systems more sustainable, particularly in off-grid rural locations. Expanding monitored parameters to include emerging contaminants and microbiological variables would allow for a more comprehensive assessment of water quality, supporting better aquaculture management over the long-term [66]. Additionally, integrating advanced artificial intelligence (AI) techniques, such as deep neural networks, could enhance predictive accuracy, enabling the system to detect complex water quality patterns. These advancements in AI would support more efficient aquaculture management, even in fully automated facilities and resource-constrained environments [38,41].
By combining the IoT, ML, and quantum-enhanced predictive algorithms, this study provides a transformative approach to aquaculture management. The methodological flexibility detailed in Table 8 ensures that this system can be adapted to various resource settings, making it a valuable tool for sustainable aquaculture worldwide. As quantum computing becomes more accessible, systems like this will play an increasingly pivotal role in enhancing food security and promoting resilient, eco-friendly aquaculture practices [23,43,64].

6. Conclusions

The study demonstrates that emerging technological solutions, such as the Internet of Things (IoT) and Machine Learning (ML) algorithms, have the potential to transform aquaculture management through the continuous monitoring of critical water quality parameters. The integration of sensors to measure key indicators like temperature, dissolved oxygen (DO), pH, and turbidity, combined with advanced predictive models such as Random Forest, showcased remarkable predictive capabilities. These models achieved high accuracy, with a coefficient of determination (R2) of 0.999 and a root mean squared error (RMSE) of 0.0998 mg/L, enabling timely responses to fluctuations in water conditions. By stabilizing the aquatic environment, this approach fosters a healthier ecosystem for fish, directly improving productivity and promoting system sustainability.

The results highlight the positive impact of integrating the IoT and ML in enhancing productivity and sustainability in aquaculture. The IoT–ML system enabled continuous real-time monitoring, significantly reducing fish mortality rates and achieving survival rates above 90%, even during high-temperature periods when variations in temperature and DO typically pose significant risks to fish health. This ability to stabilize pond conditions and enhance survival rates underscores the practical utility of these systems in real-world aquaculture operations, surpassing purely theoretical scenarios.

In rural settings, challenges such as limited internet connectivity and financial constraints necessitate adaptable solutions tailored to these conditions. This study proposes a flexible and replicable methodology that facilitates the implementation of monitoring systems even in resource-limited environments. The use of accessible technologies, such as Raspberry Pi microcomputers and low-cost sensors, provides a practical alternative that empowers rural communities to collect and analyze data locally without relying on advanced infrastructure. This broadens the accessibility of these technologies in regions where aquaculture is vital for economic sustainability and food security, reaffirming their relevance across diverse socioeconomic contexts.

One of the study’s key contributions is the integration of the Quantum Approximate Optimization Algorithm (QAOA), which effectively halved model processing times—a critical advancement for real-time monitoring. However, adopting quantum computing applications remains limited in rural areas due to technological and infrastructural constraints. Future research should focus on developing adaptable quantum solutions, such as quantum simulators that bypass the need for specialized hardware, to foster a broader adoption in varied contexts. This would facilitate the application of quantum computing in real-time predictive aquaculture systems, enhancing operational efficiency globally.

Additionally, incorporating renewable energy sources, such as solar panels, within aquaculture monitoring systems could significantly enhance sustainability and self-sufficiency. Expanding the scope of monitored parameters to include emerging contaminants and microbiological indicators would allow for a more comprehensive analysis of water quality, optimizing decision-making processes and strengthening ecosystem resilience. These advancements, alongside the continuous development of predictive models and IoT technologies, have the potential to revolutionize aquaculture management worldwide, contributing to sustainable water resource utilization and bolstering food security. By addressing both technological and environmental challenges, this research lays the groundwork for a more resilient and efficient future in sustainable aquaculture practices.



Source link

Rubén Baena-Navarro www.mdpi.com