An Aquaponics System Design for Computational Intelligence Teaching

How to design an effective experiment system to teach computational intelligence methods is big challenge nowadays. For the computational intelligence course, we design an aquaponics system and use the project-based teaching method. The aquaponics experiment system includes PLC, LabVIEW and OPC technology. The computational intelligence teaching project has data acquisition, sensors, and model subsystems. This project-based teaching method not only allows students to easily learn the computational intelligence methods and soft measurement, but also enhances their practical skills. Finally, we provide the teaching evaluation of the proposed teaching method.


I. INTRODUCTION
The theory and method of computational intelligence have been successfully applied in all scientific and engineering fields, especially the identification and control of non-linear systems, pattern recognition and intelligent systems, and modeling and prediction of complex systems. Therefore, studying and researching computational intelligence technology, promoting intelligent science and technology professional education, and training high-level intelligent computing technology talents have extremely important practical significance.
Soft measurement model is usually built by popular computational intelligence techniques. It is important for real-time control and optimization, it mainly composed of auxiliary variable selection, data acquisition and processing, and soft measurement models [1]. It constructs a mathematical relationship to infer or estimate, to replace the role of hardware sensors by software, and they usually have theory formula and algorithm which are difficult to understand for students. Some chemical backgrounds are usually introduced in the textbooks, but students are often unfamiliar with the The associate editor coordinating the review of this manuscript and approving it for publication was Laxmisha Rai . background and process mechanism, so they do not have a good understanding of the knowledge in this course, and their pass rates are often below 60%.
In modern educational concepts, practical teaching and theoretical teaching should be interconnected, intersected, and developed simultaneously. But the current practice teaching in soft measurement course is weakness. For a long time, the concept of focusing on theoretical teaching and ignoring practical teaching has prevailed in colleges and universities. As a result, teachers and students have not paid enough attention to practical sessions, and even ignored and avoided practical courses, which seriously affected the effect of production practice. In order to combining the theoretical knowledge and practice learned so that students can quickly integrate into the new environment and work in the future, the cultivation and training of students' practical skills must be highly emphasized in soft measurement course.
Based on the above reasons, higher requirements are imposed on classroom teaching. For soft measurement courses, it is a good choice to choose the engineering background that students are familiar with for project-based teaching. As an ocean University, the feature of our school is marine fisheries. Therefore, the background called aquaponics which meets our university's characteristics is selected.
This system combines conventional aquaculture with hydroponics in a symbiotic environment. It includes a recirculating aquaculture system with closed-loop control, that needs computational intelligence technology to achieve an appropriate balance between the fish waste generation and the plants' nutrient [2]. Besides, we also do some research on aquaculture water quality monitoring. Through this project, the research and teaching are well unified and mutually promoted.

II. PROJECT-BASED SOFT MEASUREMENT TEACHING
The most prominent feature of project-based teaching is that the project is the main line, the teacher is the guide, and the student is the main body. It focuses on the combination of theory and practice. A good project for teaching should meet various conditions according to [3]. For soft measurement course, it should demonstrate important theoretical ideas of soft measurement, reflects important real-life problems which students are familiar with, give students visual sensation, safe and inexpensive, easy to understand and use. Therefore, the aquaponics system which is in line with the marine fisheries characteristics of our school, is designed to improve students' enthusiasm and interest in learning.

A. SOFT MEASUREMENT PROBLEMS
Aquaponics is a new type of recirculating aquaculture technology [4]. Nitrogen is the basic element that constitutes the structure of biological cells, and it is also the most important nutrient in hydroponic systems. Nitrite nitrogen in aquaculture water is directly toxic to cultures [5], affecting its growth and development, and even leading to death [6]. However, these toxic substances are good fertilizers for plants (such as aquatic vegetables) [7]. As the vegetables grow, the water is purified and the growth environment of the fish is improved, thus achieving an ecological balance between plants, animals and microorganisms [8]. It is an effective method to solve the agricultural ecological crisis [9]. Therefore, real-time monitoring of ammonia nitrogen and nitrite nitrogen concentration in aquaculture water can optimize the system by aeration or timely addition of nitrifying bacteria to improve the conversion efficiency of nitrogen, thereby improving the economic and environmental benefits of the whole system.
At present, there is no sensor for direct measurement of ammonia nitrogen and nitrite nitrogen concentration. The laboratory analysis method has high cost and large lag, it cannot provide data for control and optimization in time. From these introductions, students can understand the goal of the project of aquaponics experimental system is to monitor the concentration of ammonia nitrogen and nitrite nitrogen in real time by soft measurement.

B. TEACHING GOALS
Project-based teaching is a teaching method in which teachers and students complete project goals and make progress together. The project goal of aquaponics is to let students master a complete soft measurement project process, enable them to master the signification of soft measurement and the method of selecting suitable auxiliary variables according to the specific background, the commonly used data preprocessing methods, and the commonly used soft measurement modeling and model correction methods.
To give students a sense of aquaponics system and obtain soft measurement modeling data, an experimental system was designed and developed. The aquaponics system consists of Siemens S7-1500 PLC controller and LabVIEW HMI. Through system design, students can understand the cycle principle of aquaponics system, PLC control principle and LabVIEW human machine screen design principle. Not only students can easily grasp the knowledge about soft measurement technology, but they can also make full use of the professional knowledge learned in other previous courses to achieve the effect of comprehensive practice. This system also can be used for PLC control, LabVIEW programming, sensors, intelligent control and other related courses.

III. AQUAPONICS EXPERIMENT SYSTEM
The aquaponics experimental system is consisted of three parts including sensors, PLC and computer. The structure of the whole aquaponics system is shown in Fig. 1. The sensors are used to measure the variables related to the variable to be measured. PLC is mainly responsible for controlling water circulation, collecting sensor data signals, and realizing long-distance operation. Computer realizes the monitoring function which designed mainly by LabVIEW software. Besides, OPC communication protocol is used for real-time communication between the computer and the controller.

A. HARDWARE DESIGN
The hardware system mainly consists of two parts: cropping system and PLC control system, as shown in Fig. 2.
The cropping system consists mainly of fish tank, filter tank, nitrifying bacteria treatment tank and vegetable tank. When the cropping system is built, the lower layer is set up as a fish tank, filter tank and nitrifying bacteria treatment tank, and the upper layer is set as a vegetable tank. The circulation VOLUME 8, 2020 control of the cropping system is completed by the PLC control system, as shown in Fig. 3. Siemens' S7-1500 controller is chosen in this system. S7-1500 increases performance with faster backplane bus, standard ProfNet interface, and shorter reaction times. These new technologies help students to keep up with new methods and developments in intelligent systems. The fish tank is made of a large metal box, and the bottom of the pool is flat and convenient for cleaning, ensuring safety. The vegetable tank is made of plastic box and has high durability [6]. The soil of the vegetable tank is made of aquatic grass mud. The water quality parameters in the system are collected by sensors. There are probes set in the water which can transmit signals to the instrument center.
By designing this part, students can not only practice the connection of electrical components such as relays and contactors, but also enhance the PLC programming ability, thus combining the theory and practice in the PLC course [10].

B. SOFTWARE SELECTION
Siemens' S7-1500 controller supports TIA portal software for control program and screen monitoring. But in order to achieve more and simpler functions, more beautiful pictures, this system chooses LabVIEW to design. Its graphical interface makes the programming and use process lively and interesting. It meets the various controls and functions required to build an aquaponics system of monitoring platform. It is fast and easy, and has the same effect as WinCC, which can be replaced with each other. Through PLC programming exercises, students can master the configuration and programming functions of the TIA portal software, form HMI design by LabVIEW, students can combine programming with interesting dynamic graphics to stimulate their interest in learning, promote their understanding of abstract concepts, and improve teaching quality [11], [12].

IV. SOFT MEASUREMENT TEACHING USING AQUAPONICS
After the experiment platform is built, follow the subprojects below to guide students how to establish a soft measurement model.

A. AUXILIARY VARIABLE SELECTION
The selection of auxiliary variables is an important part of the soft measurement modeling process. Choosing the appropriate auxiliary variables can well establish the relationship between the inputs and outputs. Auxiliary variables selection is generally based on mechanism analysis and expert experience. This subproject requires students to find literature or field research by groups to complete.
Summarizing the results, it is known that ammonia nitrogen exists in two forms in water [13]. The equilibrium reaction is Water temperature and pH are the factors that affect the equilibrium. The higher the water temperature and pH, the greater the toxicity. In addition, nitrogen-containing organic compounds will decompose to produce ammonia nitrogen in the absence of oxygen. In the case of sufficient oxygen, unstable intermediates such as nitrite and nitrate nitrogen, which are not harmful to the cultured object, may be formed. Under the influence, they can be transformed into each other [14]. Conductivity can reflect amount of the ions in the aquaculture water environment, while dissolved oxygen is related to the conversion effect between the three forms of nitrogen. Therefore, water temperature, dissolved oxygen, pH and conductivity are chosen as auxiliary variables for modelling of ammonia nitrogen and nitrite nitrogen concentration.

B. DATA ACQUISITION AND PREPROCESSING
The data flow diagram of the aquaponics system is shown in Fig.4. In this subproject, students firstly choose the sensors for measuring the above auxiliary variables. After inquiry and parameters comparison, German WTW sensors are selected. Then set the variables in the TIA Portal, add the program, and download the program to the S7-1500 PLC controller. After the program is executed, PLC can receive the signal from the sensors in the fish tank, then the data is transferred to the OPC server. LabView reads the value through its own channel and sends the value back to the OPC server, thus achieving complete circulation of the entire data stream. Water temperature T , pH value, conductivity d and dissolved oxygen concentration c DO are collected from this system, ammonia nitrogen concentration c NH3−N and nitrite nitrogen concentration c NIT are analyzed by laboratory once a day.
Students can try different data preprocessing methods, such as average and median filtering, for the sampling sensor data. The ammonia nitrogen and nitrite nitrogen data are also sorted at the same time. For example, there are 24 groups of data collected in 4 weeks and partial of them is shown in TABLE 1.

C. COMPUTATIONAL INTELLIGENCE TECHNIQUES FOR SOFT MEASUREMENT MODELS
Based on the sampling data, the following commonly used classical methods of soft measurement can be carried out [15]. In all of the following methods, the input variable X of the model is T , c DO , pH, d and the output variable Y is c NH3 -N , c NIT .

1) MULTIPLE LINEAR REGRESSION MODEL
Multiple linear regression (MLR) is a method to establish linear model. Suppose x i (i =1, 2,. . . , p) are the p independent variables, and y is the dependent variable, that is where β i (i =1, 2,. . . , p) is the undetermined coefficient. ε ∼ N (0, σ 2 ) is the measurement error that compliance with normal distribution. The matrix form of the MLR mathematical model is: According to the principle of least squares estimation, β iŝ The MLR soft-measurement model is:

2) PARTIAL LEAST SQUARES REGRESSION MODEL
Original partial least squares (PLS) regression is also a linear modelling method. It uses a linear inner relation between the latent space. First, the input matrix X and output matrix Y are projected to a latent space, then principal factors are extracted with orthogonal structure (called score vector t and u). From this way they can capture most of the variance in the original data. The detail of it is introduced as follows.
where h = 1,2,. . . ,m, and m is the number of principal components, p and q are loading vectors, E and F are residual error matrices. t h and u h are score vectors for training the h th inner model.
If f (·) is linear function, it is linear PLS, if f (·) is a nonlinear relationship, it is nonlinear PLS. Cross-validation method is generally used to determine the parameter m.

3) SUPPORT VECTOR REGRESSION MODEL
Support vector machine (SVM) was proposed by Vapnik and its research team of Bell Labs in 1995. Assume that the linear regression function is: where w is a coefficient vector used to define the position of the regression function in space, and b is a constant.
Let the fitting precision be ε. In order to make the fitting function more ideal, we need to find the smallest w, and the problem is transformed into In order to solve in a larger feasible domain, slack variables ξ, ξ * are introduced, and the optimization problem becomes formula (11), and C is the penalty factor, indicating the degree of punishment for samples outside the error range. If it is zero, it will converge to the original state. If it is greater than zero, the constraint is relaxed.

4) NEURAL NETWORKS MODEL
Neural networks are nonlinear modelling methods mimics the behavioral characteristics of human brain. The back propagation (BP) algorithm is one of the most widely used neural networks. A three-layer structure is shown in Fig. 5.  (d 1 , d 2 , . . . , d k , . . . , d l ) T , the weight matrix between input layer and hidden layer is V = (V 1 , V 2 , . . . , V j , . . . , V m ), and the weight matrix between hidden layer and output layer is W = (W 1 , W 2 , . . . , W k , . . . , W l ). In general, the activation function uses a sigmoid function.
The output error E is defined as The weight is adjusted according to the error, and the formula is as follows The negative sign in the formula indicates the gradient drop algorithm, and is a constant indicating the learning coefficient.

D. ONLINE CORRECTION OF SOFT MEASUREMENT MODELS
Normally, the online correction of soft measurement model only modifies the parameters of the model. Students can try to adjust parameters using the error of laboratory and estimated value, the specific methods such as adaptive method and incremental method etc. According to the above four subprojects, students are grouped and discussed [16]. Each group uses different methods to conduct experiments. Fig. 6 and Fig. 7 show the testing results of MLR method for ammonia nitrogen and nitrous nitrogen concentration, as obtained by one of the student groups. Students can observe from Figs.6-7 that the linear model does not fit well in this problem, especially for nitrous nitrogen. Other student groups try to use PLS for modelling, and the results are shown in Fig. 8 and Fig.9.
In the PLS modelling process, they select 3 LVs and the results are similar to MLR, but nitrous nitrogen model accuracy has a little improvement.
The other two groups use SVR and BP method, their results are shown in Figs 10-13. Random sampling was used in SVR.
From these figures, students can observe that nonlinear model has good performance than linear models for this     problem, and the accuracy of SVR model is better than BP which certify that SVR is good at solving small sample data. The comparison results of different algorithm are shown in Table 2.   Through the comparison of these different methods, students can master the advantages and disadvantages of various methods. This is very important for their understanding and have guiding significance for future algorithm improvement and application.

V. EVALUATION OF TEACHING EFFECT
From the subprojects include auxiliary variable selection, data acquisition and preprocessing, soft sensor model establishment and model correction, different modeling methods (including MLR model, PLS model, SVR model and BP neural network model) can be implemented, and students can compare the results to get some conclusions.

A. STUDENTS PERFORMANCE ASSESSMENT
Assessment is the last part of the entire teaching. Its role is not to give final results, but to further consolidate the knowledge learned, recognize its own shortcomings, or increase the interest in exploration and learning. The assessment method adopts spot sampling and limited time operation. The assessment questions should be flexible and comprehensive, but they should not be too difficult. On the one hand, it tests the knowledge students have learned and the effectiveness of experiments. It is important to continuously improve the teaching methods and improve the quality of teaching; on the other hand, through the assessment to give students a certain pressure, also to improve students' initiative and learning effects.
In order to evaluate the teaching effect in soft measurement course, we used four main assessment contents, such as attendance rate, classroom notes, laboratory reports, and laboratory examinations. There are 56 students in this course and their score in the exam are shown in Fig. 14. From Fig.14 we can see the exam results are close to the normal distribution, the number of students who have achieved good score is large, and the pass rate is 70%. Therefore, the proposed project-based teaching method is a good way. The importance of soft measurement in aquaponic process is discussed. The project platform was setup and students also solve some real-life problems, such as selection of sensors, hardware design, software design, and data transmission or communication. The aquaponics system itself has fish swimming, and the PLC control system and graphic display unit of LabVIEW have display functions, so students can gain some visual sensation, and observe changes in temperature, pH, dissolved oxygen, and conductivity. The experiment process can also be carried out such as feeding, aeration, water exchange, etc., which is similar to the real breeding process. They can view input and output signals and record data variables. They can also test and compare softmeasurement modeling methods and select the most suitable method for application practice.

B. PROJECT PERFORMANCE ASSESSMENT
Although this project is a real-life problem for aquaponics, the plant and all the other hardware are very safe. Students only need to observe, record data, program simulation, and compare experimental results. The squid and lettuce of this experiment are inexpensive. The PLC control system and LabVIEW software used in the experiment are all equipped with other courses in the automation major of our school which are not specially prepared and purchased. The water quality parameter sensors are equipped for the scientific research laboratory. Through this experiment, the research and teaching are well unified and mutually promoted.
This project provides a way to connect with other courses. The PLC control system and LabVIEW software, in fact, are learned before this course. Therefore, students only need to master the steps of the soft measurement modeling method to achieve this experiment. From this project-based teaching, students can understand the research background and significance of the aquaponics system, were able to apply the MLR method, PLS method, SVR method and BP neural networks to a real-life problem. The reformed practice teaching method can achieve the following effects after preliminary implementation results: (1) Improve students' interest in learning and gradually transform it into a lasting learning get motivated.
(2) Cultivate students' independent learning ability and teamwork spirit.
(3) Students' comprehensive professional practice ability and professional literacy have been further improved.

VI. CONCLUSION
In order to learn computational intelligence techniques, an aquaponics system is constructed using our school's marine characteristic and aquaculture background. By the study of four sub-projects, students can grasp the main steps of soft measurement with computational intelligent methods gradually. These build the bridge between the abstract theory and the real world. Through this simple experiment, the students have an intuitive understanding of the principles and basic steps of computational intelligent methods.
From the teaching process, students are very interested in project-based teaching with high attendance and participation. Judging from the teaching results, most students get results through experiments and their exam scores have improved.
This teaching method is not only a cross-combination of multiple courses, such as the aquaculture, PLC, LabVIEW, sensors, etc., but also an organic combination of research and teaching. Such projects will play an increasingly important role in improving the comprehensive quality of students.
The limitation of this study is that there are fewer data and auxiliary variables, which is not conducive to the research of computational intelligence methods such as factor analysis and dimensionality reduction. Future work will improve the system and measure more water quality parameters and data for deep research.