The Use of Sensors for Monitoring the Feeding Process and Adjusting the Feed Supply Velocity in Fish Farms
Abstract
The authors acknowledged “Ministerio de Educación, Cultura y Deporte,” through the “Ayudas para contratos predoctorales de Formación del Profesorado Universitario (FPU) (Convocatoria 2014)” (Grant number FPU14/02953).
Full text
Research Article The Use of Sensors for Monitoring the Feeding Process and Adjusting the Feed Supply Velocity in Fish Farms Lorena Parra , 1 Laura García, 1 Sandra Sendra, 2 and Jaime Lloret 1 1 Instituto de Investigación para la Gestión Integrada de Zonas Costeras, Universitat Politècnica de València, Spain 2 Dep. de Teoría de la Señal, Telemática y Comunicaciones, ETS Ingenierías Informática y de Telecomunicación, Universidad de Granada, C/Periodista Daniel Saucedo Aranda, s/n E-18071 Granada, Spain Correspondence should be addressed to Jaime Lloret; [email protected] Received 8 March 2018; Revised 26 July 2018; Accepted 26 August 2018; Published 8 October 2018 Academic Editor: Romeo Bernini Copyright © 2018 Lorena Parra et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. Aquaculture is a growing industry, and its sustainability is crucial. One of its major environmental impacts is the uneaten feed that pollutes the water. To minimize the uneaten feed, many systems have been developed. Nevertheless, current systems can be improved by considering the fish position in the tank and the falling feed. In this paper, we propose a system based on fish presence sensors set at different tank heights and a feed detection sensor located in the drainage tubes. The fish presence sensor is based on light-dependent resistor (LDR). The calibration of these sensors is shown. When the output voltage is higher than 1.467 V, we can consider that fish are present. On the other side, the falling feed sensor is based on a CMOS sensor. The calibration process is performed with 40 pictures. The summation of pixels, with brightness value between 0 and 15 in the blue histogram, is used as an indicator of feed presence. If this value is higher than 520 pixels, we can consider that there is feed in the picture. Moreover, a verification process of both sensors is done. The results of the verification confirm the calibration. Finally, the operation of the system is shown. 1. Introduction Sustainability of aquaculture is a pressing matter as the demand of fish and seafood is constantly increasing. A production of 59.9 MT/year was obtained in 2010, and in 2030, it is expected to reach 85 MT/year [1]. Fish farms can be implemented both in the sea and inland. Sea facilities are comprised of cages where fish are kept separated from other wildlife. Inland facilities build tanks where the conditions that affect the performance of fish are controlled. Illumination, turbidity, temperature, are salinity are an example of the factors that can influence the behavior of fish and must be monitored [2]. Principally, sustainable aquaculture facilities should not disrupt the ecosystem where they are placed. Business and social factors, such as being profitable and aiding in the well-being of the community surrounding the facilities, are considered as well [3]. Therefore, if only the environmental factors are considered, the key factors to evaluate a sustainable aquaculture facility are land use, water use, energy use, feed use, and freshwater seed. Moreover, diverse technological systems have been developed in order to assess the sustainability of fish farms. Some of these solutions are designed as fixed tanks and filters that measure specific values of water quality [4]; other solutions can be implemented in existing aquaculture facilities incorporating wireless functionalities that allow visualizing the information on a PC or smartphone [5]. The information available on sustainable aquaculture allows implementing environmentconscious fish farms. However, although aquaculture allows providing access to food for a large part of the population, several side effects have been noticed. Aquaculture can introduce a set of problems to the environment [6]. Particularly, excess feeding is the cause of some of the side effects of fish farming. Eutrophication is an increase in nitrogen and phosphorous in the water as a result of overfeeding fish [7]. Moreover, an increase in inorganic nitrogen can derive in acidification of freshwater ecosystems and survival, growth, and reproduction impairments when toxic levels are reached. This contaminated water affects not only the fish consumed by end users but can also affect Hindawi Journal of Sensors Volume 2018, Article ID 1060987, 14 pages https://doi.org/10.1155/2018/1060987
the environment where said water is discarded. In addition, consumers of polluted water may develop methemoglobinemia, cancer in the digestive tract, birth defects, mutagenicity, and teratogenicity. Nausea, diarrhea, vomiting, muscular cramps, gastroenteritis, or pneumonia can be caused by algal toxins. Furthermore, the lack of consistent regulation does not contribute to the solution of these problems [8]. Different countries implement different regulations, so even in places with stricter regulations, fish with toxicity problems produced in other areas can be commercialized to other countries spreading the health problems derived from it. Although guidelines have been provided in order to reduce the amount of pollution, there is a great need of implementing solutions to control the feeding process performed in fish farms [9]. These solutions are not only of interest for the environment but also to the producers as reducing the amount of feed results in a reduction of the cost on their commercialization. For the detection of excess feeding, it is necessary to determine the behavior of fish in the cage during the feeding process. When fish are hungry, their behavior is to rush to the feeding area to ingest the food [10]. However, when excess feeding is provided, a big part of the fish in the cage may continue with the usual behavior they have when feed is not provided, letting it drops to the bottom of the cage. This feed is not consumed later on, resulting in the pollution of the water and the subsequent dangers to the environment and human health. For that reason, detecting when feed is not being eaten is of great importance. In this paper, we present a system that automatically adjusts the amount of dispensed feed. In order to do so, the system detects when feed reaches the drainage system. The feed detection is done using a CMOS sensor. From the data gathered by the CMOS sensor, we obtain the histograms. After analyzing them, we can find a correlation between the number of pixels with certain brightness value and the presence of feed. Moreover, the height at which fish are swimming is detected by employing light-dependent resistor (LDR) strips deployed from the top to the bottom of the cage. The fish are detected due to the changes in the incident light in the LDR caused by the fish swimming behavior. The fish covered by scales acts as mirrors, reflecting the light and some of the flashes inside in the LDRs placed in the tanks. We show the calibration and verification process of both sensors. In addition, we present the results of the simulated feeding process with our proposed system and how the feed supply velocity changes. Our system allows saving feed during feeding time and ensures that all the fish have time to eat, making aquacultural facilities more economically profitable as well as more sustainable. Although the system has been designed for fish tanks, this paper is the first step of the development of a fish feeding system that can be utilized in both inland fish tanks and sea cages. In future research, the system will be developed for sea cages as well, where the benefits of the presented system will be substantial. The rest of the paper is organized as follows. In Section 2, the related work is presented. Section 3 details the proposed system, including the scenario description and the hardware employed to gather the data. The results of the calibration and verification process and discursion of the proposed system are presented in Section 4. Finally, Section 5 shows the conclusion and future work. 2. Related Work In this section, the related work on water quality monitoring systems and fish feeding solutions is presented. Fish behavior is a crucial factor in determining the performance of the fish in aquacultural facilities. Therefore, various researches have been performed on this matter. A fish behavior monitoring system was implemented by Papadakis et al. in [11]. It employed computer vision in order to monitor 9 fish tanks simultaneously. Stock density was evaluated as a stress factor for fish in fish farms. Real-time images were provided to a remote control application. Only the experiment with the undamaged mesh obtained a significant statistical difference. Saberioon et al. performed in [12] a survey on vision-based fish behavior monitoring systems. Machine vision, thermal imaging, hyperspectral imaging, and X-rays were the technologies for fish monitoring discussed by the authors. They also divided the applications of optical sensors into preharvesting and during cultivation conditions and postharvesting conditions. Moreover, they defined five applications for optical sensors in fish monitoring systems. These applications were physical attributes, chemical attributes, fish sorting, fish quality, and food security. Armstrong et al. presented in [13] a flat passive integrated transponder antenna array that monitored fish behavior by recording the movements performed by salmon shoals. The antenna array did not incite any unusual behavior on fish. Furthermore, a 99% success rate was obtained in the experiments. They were done by varying the number of salmons in each one of the experiments. Fish growth, density, and fish behavior were monitored by Conti et al. in [14]. Fish behavior was detected employing the scattering cross. If an anomaly was detected, an alarm was triggered. Moreover, first-order and second-order polynomial equations were utilized in order to monitor growth. The behavior of sardines, sea bass, and rockfish were studied to perform the experiments. Zhang et al. employed in [15] an imaging sonar called DIDSON (dual-frequency identification sonar) to monitor Chinese sturgeons. Swimming patterns and the length of over 2500 targets were studied in the experiments. Results showed a relation between the body length and swimming pattern and a 35.6% decrease in the length measured by DIDSON in comparison to manual measurements. Fish were found to swim close to the net and in circular motions. Feeding is another important factor to owners of fish farms as excess feed increases the production cost and contaminates the water. For that reason, the number of researches on fish feeding solutions is constantly increasing. Afish feeding system that considered the behavior of fish in order to determine the best time to provide the food was presented by AlZubi et al. in [10]. The hardware design included an automatic dispenser, a webcam, and an interface circuit. The camera detected the number of fish that went to the feeding area; when the fish learning index (FLI) was higher than the threshold, the system provided food. Results showed the 2 Journal of Sensors
variation of the number of times food is provided for eight days. Atoum et al. introduced in [16] a feeding system for aquaculture tanks that employs visual signal processing. The system included a decision-making process to determine whether fish are eating or not and detection of excess feed. Excess feed was detected employing two different methods, being a support vector machine- (SVM-) based refinement classifier and a correlation filter. Bórquez-Lopez et al. performed in [17] a comparison between mathematical functions and fuzzy logic (FL) feeding techniques for shrimp farming. Authors determined that dissolved oxygen influences the feeding rate the most (74%), and temperature influences it in a 26%. Moreover, they concluded that FL is the better strategy saving up to a 35% of feed without affecting growth or survival. Papandroulakis et al. presented in [18] an automated feeding system for intensive fish farms. The system considered the necessary amount of plankton that had to be distributed to each tank. Experiments were performed by applying the proposed method to four groups of sea bream and comparing it with the results obtained from two groups fed with the standard method. A reduction between 30% and 40% in labor was achieved, and the use of Artemia nauplii decreased by 40%. Garcia et al. presented in [19] a fish feeding system that employed sensors that determine when fish need feed. Sensors were deployed both inside and outside the cage. These were temperature, oxygen, displacement speed, biomass distribution placement, and pellet detection sensors for the internal part of the cage and presence and water current sensors for the outside. Covès et al. performed in [20] a set of experiments were an ondemand feeding system was employed to provide feed to 50 sea bass. The two experiments were conducted during 55 and 69 days, respectively. Moreover, a PIT tag was utilized to determine whether fish activated the trigger or not. Results showed that a 67% and 74% of the fish in experiments 1 and 2 activated the trigger at least once. Furthermore, two fish in experiment 1 were responsible for 82% of the triggers and one fish in experiment 2 was responsible of 77% of the triggers. Zhou et al. present in [21] a feeding decision system based on a neuro-fuzzy model and infrared computer vision. Fish feeding behavior was quantized employing an algorithm that obtains an index as a result by employing image texture and Delaunay triangulation. Another algorithm performed the decision of feeding or stop feeding the fish during the feeding process. It employed an adaptive network-based fuzzy inference system (ANFIS). Finally, weight gain, growth and feed conversion rate, and water quality were measured to evaluate the performance of the system. Results show a 98% of ANFIS decision accuracy and a reduction of the feed conversion rate of 10.77%. Lastly, Zhou et al. also present in [22] a near infrared fish feeing behavior system based on imaging techniques that employ the gray-level gradient cooccurrence matrix, the support vector machine, and the Delaunay triangulation. As a result, the flocking index of fish feeding behavior (FIFFB) was obtained. The obtained linear correlation of the FIFFB was 0.945 confirming that the FIFFB can be employed to quantify feeding behavior. Most feeding management systems rely on fish behavior in order to determine whether fish are eating or not. In this paper, we present a system for automatic detection of excess feeding that determines if the feed is being dropped to the bottom of the cage. Moreover, the height of the cage where fish are swimming can also be detected by employing LED strips on the water tanks. 3. Materials and Methods In this section, we show the system description. First, we describe the scenario where our system is calibrated and tested. In addition, we detail the hardware part of our system including the employed sensors, node, and connections. 3.1. Scenario Description. In this subsection, we present the scenario where our system is proposed and where the sensors were calibrated. First, we describe the system and its operation. Then, we detail how we test the sensors for the calibration. The proposed system is able to change the feed supply velocity according to the data gathered by the fish presence sensors and falling feed detector. The system is comprised of an automatic feeder tube, which allows changing the feed supply velocity, see Figure 1. Four different velocities can be selected: 100%, 50%, 25%, and 5% of the usual feed supply velocity. The system always starts to feed with the 100% of the velocity. During the feeding process, the velocity will decrease according to the sensor signals. The system is controlled by the Arduino which is placed in the exterior of the tank. The fish presence sensors are placed inside a Plexiglas tube as it was presented in [2]. A total of 9 sensors are located along the tank at different depths. The fish presence sensor is comprised of LDRs that are able to detect the changes in the received illumination due to the moving fish. The first LDR, LDR 1, is placed at 5 cm below the water surface. This is the area where the fish used to be during the feeding process. The second LDR, LDR 2, is located at 30 cm from the water surface. The rest of the LDRs, LDR 2 to LDR 9, are spaced 15 cm apart. The Plexiglas tube with the LDRs is fixed to the tank walls in the same side where the feeder tube dispenses the feed. The Plexiglas tube is sealed in both extremes. Finally, the falling feed detector is located at the bottom of the tank in the drainage tube. This sensor is comprised by a pellet detector sensor, and illumination is provided by a white LED. The first part of the drainage systems, which is usually comprised of an elbow pipe, will be changed to a T-shaped one, and a methacrylate separator will be added in one of the shorter sides. Thus, the camera can have full vision of the drainage system without changing the water flow. 3.2. Node and Sensor Description. In this subsection, we present the employed sensors and the selected node are described. One of the main elements that forms this system is the control node in charge of monitoring the swimming height of the fish. As Figure 2 shows, to develop our control node, we use an Arduino Mega 2560 Rev. 3 board. This board is based on the ATmega2560 microcontroller. It has 54 digital 3Journal of Sensors
input/output pins (where 14 of them can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware ports), and a 16 MHz crystal oscillator. In addition, the board contains 256 kB of flash memory, 8 kB of SRAM, and 4 kB of EEPROM. The board can be powered by batteries (which is our case) or with an AC-DC adapter. The operation of the node is as follows. On the one hand, it is not necessary that the set of LDRs is always in operation; it is only required when the process of feeding fish is carried out. Therefore, when the feeder starts pouring food into the water, the node receives a signal to start monitoring. As the fish descends, the node will send different orders to the feeder in order to reduce the speed of food pouring into the water. In this way, the amount of food thrown into the water is adapted to the amount of fish available to eat it. The other important element is the OV7670 camera which controls the point in time the feed starts to reach the floor. The OV7670 camera takes pictures with a resolution of 640 ×480 VGA and presents a high sensitivity for low-light operation. Due to its low energy requirements, the OV7670 camera module is suitable for embedded portable applications. Finally, this implies a lower waste of food which entails important economic improvements in the aquaculture production. Pellet sensor Fish presence sensor Feed Automatic feeder tube Illumination Node + Battery Fish shoal Uneaten feed Drainage system Figure 1: Proposed system for feed supply. Vcc AI1 AI4 AI5 AI6 AI7 AI8 LDRsto measure the fish presence Vcc AI0 AI2 AI3 From feeder system Start measuring To feeder system Change speed of pellet launch [AI0 … AI8] Battery Batery charger module OV7670 – camera to monitor the feed fall RR RRR RRRR GND GND GND GND GND GND GND GND GND Figure 2: Control node description. 4 Journal of Sensors
4. Results and Discussion In this section, we are going to present the results. First, we show the tests done with the camera for feed detection. Then, the calibration of a system for locating the fish in the tank is presented. Following this, the verification process of both systems is shown. Finally, we present the operation of the system during a feeding process in aquaculture tanks. 4.1. Calibration of the Feed Detection System. In this subsection, the calibration of the feed detection system is presented. We gathered 20 pictures without feed in the water and 20 pictures with feed in controlled conditions. The pictures have a size of 640 ×480 pixels. In order to obtain the histograms, the following code is used, see Table 1. In order to find in which part of the histogram it is possible to identify the presence of feed in the water, we represent in Figure 3 the red histogram of the pictures with feed and in Figure 4, the red histogram of pictures without feed. Figure 5 presents the green histogram of the pictures with feed, and in Figure 6, the green histogram of pictures without feed is displayed. Lastly, Figure 7 presents the blue histogram of the pictures with feed and in Figure 8, the blue histogram of pictures without feed is presented. From Figures 3 to 8, we can highlight the following items. First, the histograms of the pictures without feed are much more similar to each other than the pictures with feed. This is due to the pictures without feed being almost the same. However, the pictures with feed can be very different. In some cases, as in the pictures 28, 31, 33, 34, or 35, the feed pellets cover almost the 20% of the picture. While in other cases as 21, 24, 26, 29, or 38, the pellets cover less than 1% of the picture. Thus, there is a high heterogeneity in the pictures with pellets, which will make the correct detection of pellets in the pictures difficult. The second idea that must be highlighted is that, in general terms, the red, green, and blue histograms are quite similar. This is because the main part of the picture (the PVC tube) is dark grey and the water illuminated by the LED system is light grey. In the histograms of the pictures without pellets, we find two main groups of pixels. The first one is formed by pixels with values between 16 and 157. This part of the histograms represents the PVC tube. The second group of pixels has values between 182 and 205, which represents the water Table 1: Code for obtaining the histograms. Function Analyze_image (){ Read picture ('picture1.png'); Divide image into RGB components; Define brightness levels [1 to 256]; Count pixels in each brightness level; Show RGB histograms: } 0 5000 10000 15000 20000 25000 0 32 64 96 128 160 192 224 256 Number of pixels (nº) Brightness in red 0 to 256 (nº) 1 6 11 16 2 7 12 17 3 8 13 18 4 9 14 19 5 10 15 20 Figure 3: Red histogram of pictures without feed. 0 5000 10000 15000 20000 25000 0 32 64 96 128 160 192 224 256 Number of pixels (nº) Brightness in red 0 to 256 (nº) 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Figure 4: Red histogram of pictures with feed. 0 5000 10000 15000 20000 25000 0 32 64 96 128 160 192 224 256 Number of pixels (nº) Brightness in green 0 to 256 (nº) 1 2 34 5 6789 10 11 12 13 14 15 16 17 18 19 20 Figure 5: Green histogram of pictures without feed. 5Journal of Sensors
illuminated by the flash. Lastly, in Figures 9 to 11, we can observe that in the pictures with feed, there are more pixels in the darkest tones, with low values of brightness (between 0 and 15) than in the pictures without feed. This pattern is found in the three colors. Nevertheless, the difference between the histogram with feed and histogram without feed is greater in the blue histograms. The next step is to represent the summation of the pixels with lower values of brightness. The summation is done with pixels that present values between 0 and 15. The reason to select those values is due to the pictures without feed which, in general, have a low number of pixels with brightness values lower than 15. The pictures 1 to 20 represent the pictures without pellets that appear in Figures 3, 5, and 7. The pictures 21 to 40 are the pictures with pellets represented in Figures 4, 6, and 8. In Figure 9, we present the summation of pixels with low brightness values for red histograms. The summation for green and blue histograms is presented in Figures 10 and 11. In Figures 9 to 11, we present the summation of the pictures with and without feed pellets. In Figure 9, it is possible to see that the pictures 1 to 20 have a mean value of 937 pixels with brightness values between 0 and 15. The minimum and maximum values in pictures 1 to 20 are 672 (picture 6) and 1219 (picture 4), respectively. On the other hand, the mean value in the pictures 21 to 40 is 5038 pixels. Picture 31 presents the minimum value, 42 pixels. The maximum value of pixels, 41134 pixels, is found in picture 40. Now, we analyze the data from Figure 10. In this case, the mean value of pictures 1 to 20 is 285. The mean value of pixels with brightness values between 0 and 15 in pictures without pellets in the green histogram is lower than in the red histogram. The minimum and maximum values in the summation are 154 (picture 20) and 349 (picture 5), respectively. Secondly, the pictures 21 to 40 present a mean value of 14645 pixels. The minimum value is found in picture 21 with 236 pixels, and the maximum value is in picture 31 with 62594 pixels. Lastly, we present the summation of pixels with brightness values between 0 and 15 from the blue histogram in Figure 11. The mean value of pictures 1 to 20 is 279 pixels. The maximum and minimum values in the pictures without pellets are 105 (picture 20) and 473 (picture 2), respectively. On the other hand, the mean values of pictures 21 to 40 is 18228 pixels. Picture 40 is the one that presents the lower value, 683 pixels. On the contrary, picture 31 presents the maximum value of pixels with brightness values between 0 and 15, 74005 pixels. As the maximum differences are found in the blue histogram, we use this histogram for further analysis with statistical software [23]. The first test is a descriptive analysis to confirm or diminish if the data follows a normal distribution. The data is divided into two variables. The variable A represents the data from pictures 1 to 20, and the variable B is the data from pictures 21 to 40. The descriptive analysis of 0 5000 10000 15000 20000 25000 0 32 64 96 128 160 192 224 256 Number of pixels (nº) Brightness in green 0 to 256 (nº) 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Figure 6: Green histogram of pictures with feed. 0 5000 10000 15000 20000 25000 0 32 64 96 128 160 192 224 256 Number of pixels (nº) Brightness in blue 0 to 256 (nº) 1 2 345 6 7 8910 11 12 13 14 15 16 17 18 19 20 Figure 7: Blue histogram of pictures without feed. 0 5000 10000 15000 20000 25000 30000 0 32 64 96 128 160 192 224 256 Number of pixels (nº) Brightness in blue 0 to 256 (nº) 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Figure 8: Blue histogram of pictures with feed. 6 Journal of Sensors
variable A gives resulting skewness and kurtosis values of 0.876 and 0.417, respectively. Thus, it follows a normal distribution. On the contrary, the results of the test with variable B are 2.706 and 0.647 as skewness and kurtosis values, respectively. Therefore, the variable B does not follow a normal distribution. Consequently, to compare both variables, it is necessary to use nonparametric tests. To compare the medians of both variables, the Wof the Mann–Whitney test is employed. The obtained pvalue of this test is 6.77268E–8; as it is lower than 0.05, the test concludes that the median of both variables is different. Then, the Kolmogorov-Smirnov test is applied to compare the distribution of both variables. The result of the test is a pvalue of 0. Thus, it indicates that the distribution of both variables is different. Finally, the Kruskal-Wallis test is done to diminish if the observed differences are due to the randomness of the data or if it is because the data in both situations is statistically different. The result of the Kruskal-Wallis test is a pvalue of 6.266E−8. As it is lower than 0.05, it indicates that the observed differences are statistically significant. Thus, the proposed system can be used to identify the presence of feed in the water. Based on the obtained values, we will consider as a threshold value, in order to decide whether there is feed in the water or not, a summation of 520 pixels. This value comes from incrementing 10% of the maximum value of summation in the pictures without feed (picture 2, 473 pixels). 0 5000 10000 15000 20000 25000 30000 35000 40000 45000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Summation of pixels with brightness values 0 to 15 (nº) Picture (nº) Figure 9: Summation of pixels with brightness values between 0 and 15 in the red histogram. 0 10000 20000 30000 40000 50000 60000 70000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Summation of pixels with brightness values 0 to 15 (nº) Picture (nº) Figure 10: Summation of pixels with brightness values between 0 and 15 in the green histogram. 0 10000 20000 30000 40000 50000 60000 70000 80000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 Summation of pixels with brightness values 0 to 15 (nº) Picture (nº) Figure 11: Summation of pixels with brightness values between 0 and 15 in the blue histogram. 7Journal of Sensors
4.2. Calibration of the Fish Presence Sensor. In this subsection, the calibration of the fish presence sensor is shown. This sensor is based on the use of several LDRs placed along the tank. For the calibration of the sensor, a small aquaculture tank is employed. A juvenile of Sparus aurata is introduced in the tank, and the values gathered by the LDR and the fish movement are recorded. After processing the video, we can identify the periods where the fish is in the area of the LDR. The data of the LDR during the test is presented in Figure 12. In blue, the voltage of the sensor (Vout) in each second is represented. The periods when the fish are in the area covered by the LDR are marked in red. We can see in Figure 12 that in the periods when the fish is not present, Vout is lower than in the periods when the fish is present. When fish are not present, the values are similar, but when fish are present, the values present high heterogeneity. However, they are always higher than when the fish is not present. The data shown is gathered by the LDR placed in the upper part of the tank. The data when fish are not present have a mean value of 1.390 V and a standard deviation of 0.021. The minimum value is 1.371 V, and the maximum value is 1.467 V. When the fish are present, the mean Vout is 1.624 V, with a standard deviation of 0.096. The minimum value when fish are present is 1.479 V, and the maximum is 1.853 V. As the maximum Vout in the fish presence is lower than the minimum value when the fish is present, it is possible to use this Vout to determine the presence of fish. Now, using the statistical analysis, we are going to evaluate if the values when the fish is present are different from the values when fish are not present. The first step is to assess if the data follows a normal distribution or not. We divide the gathered data into two variables; the first one, variable A, corresponds to the Vout values when the fish is present. On the other hand, the Vout gathered when the fish is not present is considered to be the data of variable B. Variable A has 46 data in total, and variable B has 55. The descriptive analysis of variable A gives resulting skewness and kurtosis values of 2.008 and 0.316, respectively. Thus, it does not follow a normal distribution. The results of the test with variable B for skewness and kurtosis are 6.3094 and 5.696, respectively. In order to evaluate if the observed differences are statistically significant, nonparametric tests must be used. With the Wof the Mann–Whitney test, we can assess if the medians of both distributions are different. The obtained pvalue of the test is 0; as it is lower than 0.05, the test concludes that the median of both variables is different. Then, the Kolmogorov- Smirnov test is performed in order to compare the distribution of variables A and B. The result of the test is a pvalue of 0.037. Thus, it indicates that the distribution of both variables is different. Finally, a Kruskal-Wallis test is done to evaluate the differences in the variance of both variables. The test result gives a pvalue of 0. Consequently, we can conclude that the differences found in the data when the fish is present and the data when the fish is not present are statistically significant and the sensor can be used to detect the presence of fish. Based on the obtained values, we will consider a threshold value, in order to decide whether or not fish are present, a Vout of 1.467. In this case, it is not possible to increment in a 10% the maximum Vout in the pictures because the maximum Vout without fish presence is similar to the minimum Vout with fish presence. We need to consider the effect of light attenuation caused by the water. Nevertheless, it is important to note that on the surface there is a direct light and the water presents null turbidity. Bearing this in mind, we expect low light attenuation. In addition, in other papers [2], a similar assembly with LDR in other depths, the light attenuation observed is less than 1 1.2 1.4 1.6 1.8 2 0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90 93 96 99 Vout (V) Time (s) Fish presence periods Data Figure 12: Gathered Vout values in the calibration test. 1.33 1.34 1.35 1.36 1.37 1.38 1.39 1.4 15 30 45 60 75 90 105 120 135 Vout (V) Depth (cm) Figure 13: Effects of light attenuation in the Vout of the LDR at different depths. 8 Journal of Sensors
0.05 V. The values of Vout gathered by the LDR at different depths in a tank without fish are shown in Figure 13. The maximum Vout is 1.388 V at a depth of 15 cm, and the minimum Vout is 1.355 V at 135 cm of depth. On the other side, the light increases when fish presence is higher than 0.2 V. Thus, the set threshold is useful in all the cases, for all the depths. The Vout variation in one LDR (see data in the previous paragraph) due to changes in the light source, the variation in the water surface caused by the water current and fish movement, is higher than the variation caused by the light attenuation at different depths. The effect of light attenuation in tanks can be despised, but this effect will be studied in future applications in cages in the sea. 4.3. Verification Process. In this subsection, we detail the verification process for the two sensors developed in the previous subsections. Firstly, we will show the verification process of the feed sensors and then the verification of the fish presence sensor. For the verification of the feed sensor, 30 new pictures were used (see Figure 14). From these 30 pictures, 15 of them, from pictures 1 to 15, were taken without feed and the other 15, from pictures 16 to 30, were taken with feed. When the selection of the 15 pictures with feed is performed, pictures with a big area covered by the feed as in 21 and 28 and pictures with a small area covered by feed as in 20, 22, and 26 are sought. After applying the same methodology, obtaining the blue histogram, and doing the summation of pixels with the brightness value between 0 and 15, the data shown in Figure 15 was obtained. In Figure 15, the blue bars indicate the summation of pixels with brightness values between 0 and 15 and the orange line marks indicate the threshold value 6) 7) 8) 9) 10) 1) 2) 3) 4) 5) 11) 12) 13) 14) 15) 16) 17) 18) 19) 20) 21) 22) 23) 24) 25) 26) 27) 28) 29) 30) Figure 14: Employed pictures for the verification test. 0 5000 10000 15000 20000 25000 30000 35000 40000 45000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Summation of pixels with brightness values 0 to 15 (nº) Picture (nº) Data Threshold Figure 15: Summation of pixels with brightness values between 0 and 15 in the blue histogram in the verification test. 9Journal of Sensors