<figure><img src="image_1.png" /></figure>

HAL
open science

# Dissolved Oxygen Prediction Model Which Based on Fuzzy Neural Network

Liu Yalin, Wei Yaoguang, Chen Yingyi

► To cite this version:

Liu Yalin, Wei Yaoguang, Chen Yingyi. Dissolved Oxygen Prediction Model Which Based on Fuzzy Neural Network. 7th International Conference on Computer and Computing Technologies in Agriculture (CCTA), Sep 2013, Beijing, China. pp.544-551, 10.1007/978-3-642-54341-8_57. http-01220866

HAL Id: hal-01220866

https://inria.hal.science/hal-01220866

Submitted on 27 Oct 2015

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_2.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Dissolved Oxygen prediction model which based on Fuzzy neural network

Liu Yalin¹,ª, Wei yaoguang¹,ᵇ, Chen yingyi¹,ᶜ

¹Key Laboratory of Agricultural Information Acquisition Technology, Ministry of Agriculture,
Beijing 100083, P.R. China

²Beijing Engineering and Technology Research Center for Internet of Things in Agriculture,
Beijing 100083, P.R. China

China-EU Center for Information and Communication Technologies in Agriculture, China
Agricultural University, Beijing 100083, P.R. China

Beijing Engineering Center for Advanced Sensors in Agriculture,
Beijing 100083, P.R. China

**ABSTRACT:** In crab ponds, dissolved oxygen is the foundation for pond cultivation's survival. The changes of dissolved oxygen content are influenced by multiple factors. Higher levels of dissolved oxygen content are crucial to maintaining healthy growth of crab breeding. Affected by physic-chemical process of aquatic water, the changes of dissolved oxygen content have a large lag. In order to solve the problem of dissolved oxygen forecast, the prediction model which based on fuzzy neural network has been proposed in this paper. It integrated the characteristic of learning fuzzy logic and neural networks optimized performance to realize the dissolved oxygen prediction. The prediction results have shown it more suitable for dissolved oxygen prediction than grey neural network method. The prediction accuracy can meet the need of dissolved control.

**Key words:** Dissolved oxygen( DO) ; Fuzzy neural network; Prediction

## 1. Introduction

Dissolved oxygen is the most important factor for fishes healthy growth. Pond cultivation must maintain a certain level of dissolved oxygen to make the fish health growth. Meanwhile, dissolved oxygen is playing a dominant role in adjusting the substances of oxidative decomposition in water. High levels of dissolved oxygen content in water can suppress and mitigate the toxic effects of ammonia and hydrogen sulfide and other substances on fish. Currently, farmers monitor the dynamic changes of dissolved oxygen mainly based on the observation of biological activities. Such "after-control" methods always lead to a negative effect on the growth of cultured organisms. Therefore, how to grasp the dynamic change laws of dissolved oxygen in pond water, forecasting the situation of low DO content and take action to keep the DO content stable in the pond is the urgent problems to be solved.
The DO content is not only influenced by the effectsof water physical and chemical properties, such as watertemperature, PH, salinity, electrical conductivity, but alsoinfluenced by the atmosphere environments factors. Theinteraction between these factors is complicated. It cannottake precise mathematical model to describe these nonlinearrelations. In recent years, domestic and international scholars have put forward lots of methods for dissolved oxygen forecasting, such as time series analysis, neural networks, and statistical analysis etc.

Time series analysis is a quantitative analysis method, Time series analysis comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. Time series forecasting is the use of a model to predict future values based on previously observed values. Simple or fully formed statistical models to describe the likely outcome of the time series in the immediate future, given knowledge of the most recent outcomes. Due to the fact that the water quality changes are affected by multiple factors, there exists randomness. Hnece, time series analysis has a certain limits when conducting dissolved oxygen forecasts. Jiao Ruifeng, etc. Proposes a prediction model which based on grey relational analysis and Monte Carlo method to forecast the reservoirwater quality. Lu Qi adopts gray neural network modelwhich based on Grey theory and neural network theory toforecast the lake permanganate index.The disadvantage is that NNs can learn the dependency valid in a certain period only. The error of prediction cannot be generally estimated. The advantages are that neural network has a very strong nonlinear fitting capability which maps arbitrarily complex nonlinear relationships. It's also easy to learn and convenient for the realization of computer. In addition, it has strong robustness, memory capacity, nonlinear mapping ability and self-learning ability. However, it also has problems,for example, premature convergence etc.

Focused on the issue of current methods, the prediction model which based on
fuzzy neural network has been proposed in this paper. With the combination of
learning, imagination, adaptation and fuzzy information processing, fuzzy neural
network can improve the overall learning and expression ability of the system.

## 2. Fuzzy Neural Network Prediction Algorithm

2.1 Fuzzy Neural Network

A fuzzy neural network or neuro-fuzzy system is a learning machine that finds the parameters of a fuzzy system (i.e., fuzzy sets, fuzzy rules) by exploiting approximation techniques from neural networks. Fuzzy neural network is not only has the traits of general neural network, but also has some special characteristics. For example, due to the calculation method of fuzzy mathematics, fuzzy neural nework makes some processing units easier, further quickening the speed of information processing. And because it uses the fuzzy operating mechanism, it strengthens the fault tolerance of the system. But the most important is that fuzzy neural network enlarges the scope of system information processing, enabling the system to process deterministic and non-deterministic information at the same time, which fortifies the flexibility of system information processing to a great extent.
Both neural networks and fuzzy systems have some things in common. They can be used for solving a problem (e.g. pattern recognition, regression or density estimation) if there does not exist any mathematical model of the given problem. They solely do have certain disadvantages and advantages which almost completely disappear by combining both concepts.

A fuzzy system demands linguistic rules instead of learning examples as prior knowledge. Furthermore the input and output variables have to be described linguistically. If the knowledge is incomplete, wrong or contradictory, then the fuzzy system must be tuned. Since there is not any formal approach for it, the tuning is performed in a heuristic way. This is usually very time consuming and error-prone.

The basic idea of fuzzy neural network is that it tries to integrate the fuzzy system representation, self-adaptation of neural network and knowledge adjustment and discovery together into a system. Fuzzy neural network discovers and adjusts the membership functions of the fuzzy subsets self-adaptingly, and classifies language values self-organzingly. The learning ability of neural network is brought into play, and the system knowledge is moderately adjusted, thereby leading to a higher intelligence and adaptability of fuzzy neural network.[3,4]

Fuzzy system is a strong self-adaptation system, which can update automatically and continuously modify the membership functions of the fuzzy subsets. Fuzzy system is defined by the “if-then” rules, based on the $R^i$. Its fuzzy rule is listed below.

$$R^i: \text{If } x_i \text{ is } A_1^i, x_2 \text{ is } A_2^i, \dots, x_k \text{ is } A_k^i \text{ then } y_i = p_0^i + p_1^i x_1 + \dots + p_k^i x_k \quad (1)$$

Here, $A_j^i$ are the fuzzy subsets of the fuzzy system; i is the number of fuzzy subsets, j is the number of input parameters; $P_j^i$ ($j = 1, 2, \dots, k$) is the parameter of the fuzzy system; $y_i$ is the output based on the fuzzy rules, input part (that is, if...) is fuzzy, output part (that is, then...) is determined. The fuzzy reasoning proves that the output is the linear combination of the input.

If $x = [x_1, x_2, \dots, x_k]$, the degrees of membership can be calculated according to the fuzzy rules.

$$\mu_{A_j^i} = \exp\left(-\frac{(x_j - c_j^i)^2}{b_j^i}\right), \quad j = 1, 2, \dots, k; i = 1, 2, \dots, n \quad (2)$$

In the formula, $c_j^i, b_j^i$ belong to the center and breadth of membership functions; K is the number of input parameters; n is the number of fuzzy subsets. We calculate fuzzily based on the degrees of membership and use fuzzy operator as continually multiplying operator.

$$w^i = \mu_{A_j^i}(x_1) * \mu_{A_j^2}(x_2) * \dots * \mu_{A_j^k}(x_k), \quad i = 1, 2, \dots, n \quad (3)$$

We calculate the output $y_i$ according to the result of fuzzy calculation.
$$y_i = \frac{\sum_{i=1}^{n} w^i (p_0^i + p_1^i x_1 + \cdots + p_k^i x_k)}{\sum_{i=1}^{n} w^i} \quad (4)$$

Fuzzy neural network is divided into four layers: input, fuziness, fuzzy rule calculation, and output. Input layer connects input vector x, and the number of nodes are the same as the dimensions of input vector. Fuziness layer gets fuzzy degree of membership μ by using membership function (2) to blur the inputs. Fuzzy rule calculation layer is calculated by formula (3). Output layer is calculated by using formula (4). 【5】

The learning algorithm of fuzzy neural network is explained below.

(1) Error calculation

$$e = \frac{1}{2} (y_d - y_c)^2 \quad (5)$$

In the formula, $y_d$ is network expectation output; $y_c$ is network actual output; e is the error between expectation and actual output.

(2) Coefficient correction

$$q_j^i(k) = q_j^i(k-1) - \alpha \frac{\delta e}{\delta q_j^i} \quad (6)$$

$$\frac{\delta e}{\delta q_j^i} = (y_d - y_c) w^i / \sum_{i=1}^{m} w^i \bullet x_j \quad (7)$$

In the formula, $q_j^i$ is neural network coefficient; $\alpha$ is network learning rate; $w^i$ is the multiplication.

(3) Parameter correction

$$c_j^i(k) = c_j^i(k-1) - \beta \frac{\delta e}{\delta c_j^i} \quad (8)$$

$$b_j^i(k) = b_j^i(k-1) - \beta \frac{\delta e}{\delta b_j^i} \quad (9)$$

In the formula, $c_j^i, b_j^i$ are the center and breadth of membership functions. [6]

## 2.2 Influential factors of DO pond aquaculture defense

In aquaculture ponds, the content of DO are affected by multiple factors. The main source of DO in the pond are originated from the dissolving of molecular oxygen in the air and the photosynthesis of aquatic plants. Atmospheric pressure, light, temperature, wind speed and direction are the main outside factors which affect the dissolved oxygen content in crab ponds.

In the ponds, the consumption of DO are mainly from sediment, zooplankton, fish and chemical factors. According to the scientific research, the sediment, zooplankton, and
tempreture are taken as the inputs of neural network, that is, $x_i$, in the formula (1). We train the fuzzy neural network with actual DO as the outputs of neural network expectation. The training result is shown below.

<figure><img src="image_3.png" /><figcaption>Fig 2. Resolved Oxygen Training Data Forecast Chart</figcaption></figure>

We can get forecast data by using 50 groups of data for testing to forecast neural network. And the result is showed in Fig 3. From the chart, the error of the result is no more than 0.1, which means that fuzzy neural network has a better impact on the forecast of the pond resolved oxygen.

<figure><img src="image_4.png" /><figcaption>Fig 3. Resolved Oxygen Testing Data Forecast Chart</figcaption></figure>
In order to compare the adaptability of this method, we use the same data and compare them with the forecast result of grey neural network. The forecast result is illustrated as follows in Fig 4.

<figure><img src="image_5.png" /><figcaption>Fig 4. Comparison of Fuzzy Neural Network and Grey Neural Network</figcaption></figure>

According to the Fig 4, we can see that grey neural network forecast data appears obvious errors, and the forecast results of fuzzy neural network is better compared with that of grey neural network. The experiment shows that fuzzy neural network can better resolve the problem of aquatic dissolved oxygen in ponds. And the forecast results are more accurate, comprehensive and objective.

Based on the analysis of the influential factors of dissolved oxygen, the research, which adopts fuzzy neural network methods and focuses on the forecast issue of aquatic dissolved oxygen in ponds, has resolved the problem of dissolved oxygen forecasts. According to the simulation experiment, it shows that fuzzy neural network prediction is more accurate. Compared with gray neural network, the accuracy of forecasts is higher, especially for DO forecasts.

## 4.Conclusion

Based on the analysis of the influential factors for dissolved oxygen content in crab ponds, the prediction model which based on fuzzy neural network has been proposed in this paper. It can control the learning performance error value and the total error, the performance of the model can be optimized for water dissolved oxygen prediction. When compared with grey neural network, the experimental results has shown that the model has a better ability to predict the dissolved oxygen prediction content.
## Acknowledgements

This work was supported by the National Agricultural Science and technology achievement transformation project (2012GB2E000330), the state of 12th five-year science and technology support projects (2012BAD35B03) and (2011BAD21B01), and the programs "Agro-scientific Research in the Public Interest" (201203017).

## References

1. Faruk, D. O. (2010). "A hybrid neural network and ARIMA model for water quality time series prediction." *Engineering Applications of Artificial Intelligence* 23(4): 586-594.

2. Ahmed, A. N., et al. (2009). "Evaluation the efficiency of radial basis function neural network for prediction of water quality parameters." *Engineering Intelligent Systems for Electrical Engineering and Communications* 17(4): 221-231.

3. Han, H. G., et al. (2011). "An efficient self-organizing RBF neural network for water quality prediction." *Neural Networks* 24(7): 717-725.

4. Skowronska, K. T., et al. (2006). "Application of a fuzzy neural network for river water quality prediction." *Chemia Analityczna* 51(3): 365-375.

5. Li, Z. B., et al. (2012). "An Improved Gray Model for Aquaculture Water Quality Prediction." *Intelligent Automation and Soft Computing* 18(5): 557-567.

6. Faruk, D. O. (2010). "A hybrid neural network and ARIMA model for water quality time series prediction." *Engineering Applications of Artificial Intelligence* 23(4): 586-594.

7. Wu, J., et al. (2009). "Application of chaos and fractal models to water quality time series prediction." *Environmental Modelling & Software* 24(5): 632-636.

8. Sun, X. (2007). "Prediction of fluorite deposit in Yixian based on fuzzy-neural network." *Journal of China University of Geosciences* 18: 279-281.

9. Rahman, M. S., et al. (2012). "Thermal conductivity prediction of foods by Neural Network and Fuzzy (ANFIS) modeling techniques." *Food and Bioproducts Processing* 90(C2): 333-340.

10. Taner, A. (2012). "Prediction of moisture dependent some physical properties of wheat using artificial neural network and fuzzy logic." *Energy Education Science and Technology Part a-Energy Science and Research* 29(1): 395-406.