1. Introduction
White shrimp (
Litopenaeus vannamei), due to its large market share and high acceptance among consumers, has become a “must-have” in the seafood consumption market.
L. vannamei is the predominant shrimp species cultivated worldwide, favored over other shrimp species for its appealing taste, low fat content (0.4–3%, wet weight), and high protein levels (17–20%, wet weight) [
1].
L. vannamei is well-suited for high-density aquaculture, characterized by strong disease resistance and rapid growth. However, the traditional shrimp farming industry is highly dependent on the natural environment, which is not in line with the concept of sustainable development in China. Recirculating Aquaculture Systems (RAS) can integrate modern engineering technology to provide scientific guidance and management for aquaculture processes, thus improving production and reducing discharge, promoting the healthy and sustainable development of the aquaculture industry. RAS have been widely used for fish culture due to their ability to provide a stable and controlled environment [
2]. Compared to other shrimp species,
L. vannamei is particularly well-suited for cultivation in RAS. The technology for breeding Specific Pathogen Free (SPF) seedlings of
L. vannamei is well-established, ensuring that the larvae are free from specific pathogens. During artificial selection, the use of SPF seedlings, combined with the closed management of RAS, can effectively prevent shrimp virus outbreaks. In the fields of shrimp cultured in RAS, a complete set of cultivation techniques and facilities were established for large-scale cultivation of
L. vannamei, achieving continuous and high-yield production [
3,
4,
5]. Researchers have conducted multidimensional research on the behavior and physiology of organisms, equipment optimization, system optimization, and digital simulation in the factory-scale recirculating aquaculture of
L. vannamei. The goal is to replace manual operations with industrial means and achieve the purpose of liberating labor.
Among the many studies on RAS, maintaining water quality is a critical aspect of RAS operation and requires continuous monitoring and management [
6]. Real-time monitoring of water quality factor indicators is critical for reducing the incidence of diseases and mitigating risks. In recent years, the advantages of machine learning nonlinear approximation and high-dimensional data processing have been widely utilized in water quality prediction. Intelligent water quality prediction is particularly important in aquaculture. In addition to real-time monitoring and feedback of traditional water quality indicators, it is necessary to predict the trend of water environment changes based on current aquaculture management and water quality status and make effective adjustments to feeding strategies. Researchers have conducted a series of studies on water quality prediction techniques. For example, researchers improved the k-means clustering of dissolved oxygen time series on recurrent neural networks, which improved the accuracy and flexibility of prediction [
7]. A new method was proposed for effectively predicting short-term dissolved oxygen using a comprehensive approach [
8]. Researchers developed a deep ESN model to predict BOD and compared it with a tree ensemble learning method, achieving more reliable predictive accuracy [
9]. Random forest and extreme gradient boosting, as ensemble learning models, effectively predict water quality and demonstrate high stability in short-term water quality prediction using multiple parameters [
10].
In the water treatment process of the RAS, the removal of suspended solids (SS) is a key step. SS have been proven to be the main cause of high turbidity in aquaculture water, which can cause stress responses and harm the health of aquatic animals [
11]. SS mainly consist of residual feed, feces, and bacterial aggregates. Studies have shown that 23% of the feed and feces are transformed into solid suspended solids in the RAS [
12]. As suspended solids stay in the aquaculture system for longer periods, they can block the aquaculture facilities, increase chemical oxygen demand, mineralize solid waste, and increase the content of ammonia nitrogen and nitrite nitrogen, which can affect the nitrification function by increasing the biofilter load [
13]. Therefore, it is of great significance to quickly detect ammonia nitrogen and nitrite nitrogen from the source in order to maintain clean aquaculture water and prevent harmful substances from damaging the health of aquaculture species. Previous studies have conducted a series of investigations on the prediction of ammonia nitrogen and nitrite in water. Researchers proposed a soft computing method for real-time prediction of ammonia nitrogen content in aquaculture water [
14]. The results demonstrate that the pelican optimization algorithm (POA) method outperforms other methods studied for real-time prediction of ammonia nitrogen. The model provides moderately and roughly accurate real-time prediction values for ammonia nitrogen in aquaculture water. A hybrid soft measurement model was developed for ammonia nitrogen [
15]. Radial basis function neural networks (RBFNN) and a hybrid model combining RBFNN, and particle swarm optimization (PSO) are used in this technique. The experimental results indicated that the proposed hybrid method outperforms other existing data-driven modeling methods. This study provides a strong foundation for practical applications of the hybrid soft measurement model for ammonia nitrogen. Researchers proposed an intelligent feeding model constructed using machine learning methods, which includes indicators such as dissolved oxygen, pH, temperature, rearing period, ammonia nitrogen, and nitrite nitrogen [
11]. The results demonstrate that ammonia and nitrite can be crucial indicators that influence the feeding amount for
L. vannamei cultured in a recirculating aquaculture system. In high-density shrimp farming using RAS, the large number of shrimp and feeding amount result in a significant amount of SS in the water. Although most of the SS can be filtered out by the drum filter, the ammonia nitrogen and nitrite nitrogen produced by the dissolved suspended solids cannot be ignored. Therefore, it is crucial to develop rapid prediction techniques for ammonia nitrogen and nitrite nitrogen in high-density shrimp farming using RAS.
This study aimed to utilize low-cost water quality sensors (such as temperature, salinity, dissolved oxygen, pH, etc.) in the industrialized recirculating aquaculture process to collect data samples, which were then combined with aquaculture management data. Data prediction technology was employed to construct predicted values for ammonia nitrogen and nitrite nitrogen, which are difficult to obtain through sensors in the aquaculture environment. A water quality prediction model based on an artificial intelligence algorithm was developed. By analyzing the aquaculture management and water quality status over a period of time, the future trend of water quality can be predicted, and effective evaluation of water quality can be carried out.
2. Materials and Methods
2.1. Experimental
The study utilized the RAS of Dalian Huixin Titanium Equipment Development Co., Ltd. in Dalian City, P. R. China to breed
L. vannamei. The indoor workshop used in the experiment is shown in
Figure 1A. The RAS consisted of two circular FRP tanks with a diameter of 7 m and a depth of 1 m, with a total water volume of 76 m
3. The culture process lasted for 90 days, with a culture density of 800 individuals/m
3 and a final yield of 609 kg of shrimp.
The present study primarily focused on predicting the concentrations of ammonia nitrogen and nitrite nitrogen in RAS. Feed, as the sole source of organic input, undergoes mineralization and decomposition through shrimp feces and a small portion of residual feed, resulting in the formation of ammonia nitrogen, and nitrite under the influence of various factors. Firstly, temperature significantly affects microbial metabolic activities. Generally, higher temperatures accelerate the processes of ammonification and nitrification, but excessively high temperatures may inhibit the activity of certain microorganisms. Secondly, sufficient dissolved oxygen is essential for the metabolic activities of nitrifying bacteria. Low oxygen conditions can hinder the nitrification process, leading to an accumulation of ammonia nitrogen, and nitrite. Additionally, nitrifying bacteria are sensitive to pH and salinity levels; both excessively low and high pH and salinity can inhibit their activity. Therefore, the primary independent variables collected in this study include temperature, dissolved oxygen (DO), salinity, pH, and feed amount, while the dependent variables include total ammonia nitrogen (TAN) and nitrite nitrogen (NO2-N) concentrations.
Daily aquaculture water quality indicators were collected, which include temperature (T), DO, salinity, pH, TAN, and nitrite nitrogen. The handheld portable water quality parameter analyzer YSI ProPlus was used to measure and record temperature, dissolved oxygen, pH, and other data. The Palitest MISZ-7500 spectrophotometer was used to measure ammonia nitrogen and nitrite nitrogen data. Additionally, the total feeding amount (kg/day) of each RAS was recorded daily. Over a period of 5 days, shrimp samples were collected from the RAS to measure their body length and weight. Additionally, the average water quality indicator parameters and feeding amount within the same five-day period were calculated. This data was then matched with the corresponding shrimp body length and weight data to form a set of 107 data points. The range of each indicator is displayed in
Table 1.
2.2. Model Construction
Machine learning methods were used to develop the prediction models (
Figure 2A). The independent variables included shrimp biomass, feed input, water exchange rate, and environmental factors such as air temperature and humidity. The dependent variables were the water quality parameters.
In the present study, a low-cost basic sensor was integrated into a recirculating aquaculture system to measure key water quality parameters including dissolved oxygen, pH, salinity, and temperature. These parameters were used to extract effective explanatory variables for the difficult-to-measure water quality indicators such as ammonia nitrogen and nitrite. The data samples were selected as the basis for constructing a prediction model for ammonia nitrogen and nitrite concentration using appropriate machine learning frameworks.
The basic water quality parameters, such as dissolved oxygen, pH, salinity, temperature, and turbidity, exhibited time-series characteristics and formed a data set with a certain time interval and continuity. For the prediction of basic water quality parameters, machine learning models based on time series, such as gray models, long short-term memory networks, and recurrent neural networks, were used to construct models for predicting the trends of basic water quality parameters (
Figure 2B). The basic water quality prediction model and the ammonia nitrogen and nitrite prediction model were coupled to construct a machine learning-based water quality prediction model. In the present study, Generalized Regression Neural Network (GRNN), Deep Belief Network (DBN), Long Short-Term Memory (LSTM), and Support Vector Machine (SVM) were used for developing the TAN and NO
2-N predicting models. During the model construction process, the dataset was first normalized. A random selection of 75% of the dataset was used as the training set, while the remaining 25% was used as the test set. After constructing the models using various methods, the predicted values were denormalized. For the LSTM model, the ADAM optimizer was employed, with the maximum number of epochs set to 1000 and an initial learning rate of 0.01. After 100 epochs, the learning rate was reduced by a factor of 0.1. The DBN model utilized the sigmoid activation function, with a learning rate factor set to 0.001, and was fine-tuned 100 times with each iteration consisting of 10 samples. The SVM model employed the SVR function, and the optimal parameters were determined using a genetic algorithm. The radial basis function was chosen as the kernel function. The 5-fold cross-validation method was employed during the validation stage.
After constructing the machine learning models, it is necessary to evaluate the accuracy and robustness of the models. Three indicators, including Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Root Mean Square Error (RMSE), were used to evaluate the errors and prediction deviation of the models. By observing and comparing the distribution charts of prediction results from GRNN, DBN, LSTM, and SVM, and combining metrics such as MAE, MAPE, and RMSE, the most suitable prediction model for TAN and NO2-N concentrations is selected. In the field of machine learning, Random Forest (RF) is a commonly used benchmark model due to its stable performance, interpretability, and robustness. RF is often used for comparison with other machine learning models. In this study, the outputs of the four constructed machine learning models will be compared with those of the RF model to evaluate their respective parameter metrics and select the optimal model construction method.
2.3. Model Evaluation Methods
The model was evaluated by three indicators, including Mean Absolute Error (MAE), Mean Absolute Percentage Error, and Root Mean Square Error (RMSE). MAE represents the average of the absolute error between the predicted and actual values, as shown in Equation (1):
where
is the predicted value and
is the actual value, MAE calculates the mean for the residuals, and because the formula is linear, the weight of the average of individual differences is the same.
MAPE can be used to evaluate the quality of model prediction results. The smaller the value, the lower the deviation of the model. The formula is shown in Equation (2):
RMSE represents the expected value of the square of the error, as shown in Equation (3):
4. Discussion
Salinity, DO, pH, ammonia nitrogen, and inorganic salts are crucial water environmental factors in shrimp farming. Ammonia nitrogen and nitrite are key factors affecting the success rate of
L. vannamei farming [
16]. The previous study has found that the safe level of ammonia nitrogen for
L. vannamei juvenile is 3.95 mg/L, and this tolerance range increases as the shrimp grow [
17]. In the present study, the shrimp had an initial body length of 5 mm, which still classifies them as juvenile, thus falling within the safe concentration range described in the reference. However, the TAN concentration in the dataset ranged from 0.30 to 8.30 mg/L (
Table 1), not entirely within the safe range. Although no symptoms of ammonia nitrogen poisoning were observed during the actual culture process, to prevent chronic poisoning, a safety threshold will be set in the actual farming warning system. If the ammonia nitrogen concentration exceeds 3.95 mg/L, an alarm will be triggered, and water quality control measures will need to be implemented.
Since ammonia nitrogen and nitrite are primarily produced by organic suspended solids, the faster the rate of filtering these solid particles, the lower the mass concentration of inorganic nitrogen and nitrite will be. In the RAS studied, the micro drum filter gradually increased its operating frequency over time to ensure that the total suspended solids within the RAS remained generally constant. Ammonia nitrogen and nitrite are mainly degraded using biofilters. However, the conversion rates of ammonia nitrogen and nitrite by the biofilter are not constant during different farming periods. Firstly, the oxidation rate of ammonia nitrogen is higher than that of nitrite. Secondly, the oxidation of nitrite has a lag effect, leading to some accumulation. In the previous study, the authors found that during the farming process, the concentration of nitrite gradually increased with the oxidation of ammonia nitrogen, and the peak time of nitrite lagged behind that of ammonia nitrogen [
11]. This pattern is consistent with the findings of the previous study [
18]. Therefore, given the relatively fast oxidation rate of ammonia nitrogen and its low tendency to accumulate, a data-driven model can accurately predict ammonia nitrogen concentration. The variation pattern of nitrite is relatively complex, and the performance of the prediction model is unstable, especially when nitrite gradually accumulates and the conversion efficiency of the biofilter is insufficient, leading to significant errors in the prediction model. To address this issue, the authors plan to couple the ammonia nitrogen prediction model with the nitrite prediction model in subsequent studies, using the output of the ammonia nitrogen prediction model as the input for the nitrite prediction model. By adding key factors, the accuracy of nitrite prediction can be improved.
To date, many scholars have focused on modeling the water quality of rivers, lakes, and sewage. However, the development of industrial aquaculture urgently requires the integration of new technologies to achieve intelligent management. Currently, researchers are most concerned with improving existing models to enhance the accuracy of water quality parameter simulations and forecasts [
6]. In the prediction and evaluation of water environmental indicators, feedback networks are suitable for time series data, while feed-forward networks are suitable for general data. Generally, the accuracy of models can be improved in two ways: first, by optimizing data input, including relevant calculations, screening of influencing factors, and data preprocessing; second, by optimizing the model parameters themselves. Various optimization algorithms can be used to find the most suitable weight combinations for the model, resulting in the optimal model structure. With the emergence of more optimization algorithms, the simulation and prediction accuracy of hybrid models have been increasingly enhanced. Building on previous work, researchers can develop more refined models and apply them to industrial aquaculture in the future, providing accurate computational models for smart fisheries. In subsequent studies, the authors plan to integrate the ammonia nitrogen and nitrite prediction models into an IoT system. By using low-cost water quality sensors to obtain key indicators, the GRNN model constructed in this study will be used to infer the variations of ammonia nitrogen and nitrite in real-time, thereby realizing the application of water environment early warning technology in RAS.
5. Conclusions
This study carried out high-density shrimp farming in a recirculating aquaculture system. By collecting DO, pH, temperature, salinity, and feeding amount as independent variables, prediction models for ammonia nitrogen and nitrite nitrogen concentrations were constructed using GRNN, DBN, LSTM, and SVM. The accuracy of the model was determined by comparing the deviation between the predicted value and the actual value, and the performance of the model was evaluated using MAE, MAPE, and RMSE indicators. Finally, the ammonia nitrogen concentration prediction model (MAE = 0.5915, MAPE = 28.95%, RMSE = 0.7765) and the nitrite concentration prediction model (MAE = 0.1191, MAPE = 29.65%, RMSE = 0.1904) based on optimized GRNN were selected. The present study provided a new modeling method for the rapid prediction of water quality indicators in the field of RAS shrimp farming.