## 4 Results and Discussion
### Results of the Fish Behaviour Sensors  
The results of the fish behavior sensor are shown below. Several tests were done to ensure that this system can correctly detect the fish to determine the swimming depth and estimate the swimming velocity. Furthermore, the camera was tested to detect the presence of feed falling. The first test consists of measuring the resistivity of the employed LDR at different points of an aquarium in the presence (Figure 15a) and absence of a fish (Figure 15b). For this test, a dead adult of _Sparus aurata_ L. has been used. It was necessary to use a dead fish is because it is necessary that the fish remains at the same point for the entire experiment. Three repetitions of each measure have been done. In the aquarium, a matrix of 7 per 4 measure points has been set as can be seen in Figure 15a as red dots in the aquarium. The resistance of the LDR has been measured with a multimeter. The average resistance of the LDR in each point of the matrix with and without the fish is presented in Figure 16a,b. It is possible to see that, with the resistance of the LDR we can differentiate when there is or there is not a fish in the aquarium. On the one hand, the lowest resistance when there is a fish is 12.9 k\(\Omega\). On the other hand, the lowest resistance value when the fish is present is 19.7 k\(\Omega\). Thus, the use of LDR for detecting a fish is demonstrated. Once, it has been demonstrated that with the LDR is possible to determine the presence or absence of fish, we need to gather data with living fish. In the first test with a tank, unique LDR was introduced at 60 cm depth. The _Vout_ of the presence sensor is shown in Figure 17. A _Vin_ of 3.3 V and an _R2_ of 41 K\(\Omega\) was used. During the first 10 s of measurement, the fish were kept far from the LDR in order to have data without the fish presence. The movement of the fish has been recorded with a camera to compare the data of the sensor with the moments that the fish were close to the detector. The time when the fish were close to the LDR are considered as fish presence periods and are colored in red in Figure 17. The _Vout_ of the presence sensor is correlated with the presence of fish. When the fish are present the _Vout_ increases to reach values of 1.85 V. The average _Vout_ when the fish are present is 1.63 V. In the periods when the fish are not present, the minimum _Vout_ is 1.37 V and the average 1.39 V.  
Figure 14: (**a**) Data and (**b**) code of the presence sensor. The next two experiments are performed to test the system for fish detection. First, 9 LDR were introduced in the previous tank with the same fish employed in previous experiment. The _Vout_ of each sensor for fish detection is presented in Figure 18. The data of 5 different moments or scenarios are presented. In scenario 1, the fish were not present in the tank. In the rest of scenarios, it is possible to identify the swimming depth by analyzing the _Vout_ of the sensor. The maximum value of _Vout_ corresponds to the average fish swimming depth. Consequently, it is possible to see that the data of fish detection can be used to determine the fish swimming depth. Unlike with the other sensors where the _Vout_ was transformed into the value of the sensed variable before being sent, with this sensor the _Vout_ is the sent data. In the database, a smart algorithm will be applied. Figure 16: Average LDR resistance in different point with and without the fish. Figure 17: Data gathered by the fish presence sensor. Figure 15: Experiments to demonstrate the operation of fish behavior sensor, preliminary test (**a**) presence and (**b**) absence of the fish. The last experiment was carried out to estimate the fish swimming velocity. Two scenarios were considered for this test. The first one is when there is low fish density and a small shoal is formed. In this case, the shoal does not form a ring, see Figure 19a. The second scenario is when there is a higher density and a bigger shoal is formed. In this case, the shoal forms a ring; see Figure 19b.