Incorporating Intelligence in Fish Feeding System for Dispensing Feed Based on Fish Feeding Intensity

The amount of feed dispense to match ﬁsh appetite plays a signiﬁcant role in increasing ﬁsh cultivation. However, measuring the quantity of ﬁsh feed intake remains a critical challenge. To addressed this problem, this paper proposed an intelligent ﬁsh feeding regime system using ﬁsh behavioral vibration analysis and artiﬁcial neural networks. The model was developed using acceleration and angular velocity data obtained through a data logger that incorporated a triaxial accelerometer, magnetometer, and gyroscope for predicting ﬁsh behavioral activities. To improve the system accuracy, we developed a novel 8-directional Chain Code generator algorithm that extracts the vectors representing escape, swimming, and feeding activities. The set of sequence vectors extracted was further processed using Discrete Fourier Transform, and then the Fourier Descriptors of the individual activity representations were computed. These Fourier Descriptors are fed into an artiﬁcial neural network, the results of which are evaluated and compared with the Fourier Descriptors obtained directly from the acceleration and angular velocity data. The results show that the developed model using Fourier Descriptors obtained from Chain Code has an accuracy of 100%. In comparison, the developed classiﬁer using Fourier Descriptors obtained directly from the ﬁsh movements acceleration, and angular velocity has an accuracy of 35.60%. These results showed that the proposed system could be used in dispensing feeds successfully without human intervention based on the ﬁsh requirements.


I. INTRODUCTION
Aquaculture is an important food production sector with high-quality protein for human consumption. The contributions of aquaculture to the world's total fish production is indispensable. Nowadays, the demand for aquaculture products increases worldwide [1], [2]. Despite the continuous increase in demand for fish consumption, the rate of fish supply to meet the needs remains a severe challenge [3]. Sizeable fish cultivation that can meet the requirements is expected through the vertical and horizontal extension The associate editor coordinating the review of this manuscript and approving it for publication was Huanqing Wang. of the aquaculture system. This would largely depend on efficient fish farming practices and widespread aquaculture expansion [4].
The problem of overfeeding has become predominant in aquaculture. One of the causes of this problem is attributed to the inefficiency in the handling of the feeding process [5]. Fish feeding practice that can promote production effectiveness and reducing unnecessary feeding is essential for abundant income intensification [6]. The cost of feeding fish amounts to 40-50% of the total aquaculture operational cost [7], whereas about 60% of the feed dispense into aquarium ends up as particulates [8]. These accumulated particulates result in water pollution, which further used oxygen to decompose and produce ammonia-nitrogen and other toxic substances that can harm the fish's growth.
The quantity of feed dispensed to match fish appetite levels plays a significant role in increasing fish productivity while measuring the amount of fish feed intake remains a critical challenge [9]. Fish feeding based on regulatory frequency often leads to feeds wastage, which might affect the quality of the water and result in diseases and stress [10]. Apart from feed wastage, too much feed can cause a shortage of oxygen in the water, especially during hot weather. This can further lead to the biological oxygen demand and slows down the fish growth rate and eventually reducing productivity and profitability efficiency [11]. The fish feeding system is generally classified into three categories: manual method, semi-automated method, and automated method. In the manual feeding method, the feeding process is directly operated by a person. It involves the use of techniques such as fish body weight per feed [12], estimation of facial and metabolic waste output [13], feed conversation rate [14], and bio-energetic data at different water temperatures [13]. This method seems to be sufficient means to manage the amount of feed dispensing as a result of user involvement [15]. However, it is time-consuming, laborintensive, and not applicable to a large fish farm.
The Semi-automatic system, on the other hand, is the inclusion of electronic devices such as programmable timing and digital timers for dispensing feed based on the user pre-defined timing. This method requires a certain amount of user input in performing a feeding task. Digital timer and programmable timing are the major techniques widely used for the development of a semi-automatic fish feeding regime system [16]. Ogunlela [17] proposed an automatic fish feeder using a digital timer. The timer was configured using monostable and astable modes for precision timing circuits capable of generating precise oscillation or timing delay. In the monostable operation mode, the capacitor network and single external resistor were used to control the time interval, while a one-short pulse generation and operation time were computed between 1 to 10 seconds in the astable mode. Uddin et al. [18] developed a 24-hour time step fish feeder using a digital timer as a major means of controlling the system operational period. The developed system was tested to determine the amount of dispensed feed and time interval for both 4 mm local and foreign vital (feeder). The obtained results at the operation time of 60 minutes indicate 85.5kg of the meal were distributed to the aquarium while recorded feed loss was less than 3%. This enables the system to have about 86.9% adequacy and efficiency of preserving and managing feed under strict conditions.
Noor et al. [19] proposed a PIC microcontroller-based fish feeder for efficient pellets distribution. The system enables manual adjustment of the feeding cycle and motor speed range suitable for the user based on the size of the pond and pellets distribution. Automatic fish feeder using two different control for intensive mirror carp production to provide predetermined amounts of feed was proposed by Abdallah and Elmessery [20]. The first control is an open-loop control system based on the AT89c51 controller to coordinate the amount of dosage based on the feeding time table. The second control system (closing loop) was designed to be regulated based on water temperature conditions, fish weight, and oxygen consumption. Recent research by Niswar et al. [21] designed an automatic fish feeding system for soft shell crab using a microcontroller unit. In their approach, 5% of the crab body weight was pre-defined to be dispense at every activation time to avoid food wastage. The results obtained showed a difference of 0.05 to 0.1 gram between the pre-defined and the amount of food dispensed. This category of feed dispensing system is easy to implement. The study showed that most of the existing feeding regime systems are designed to operate at pre-set time.
However, the use of pre-defined timing is inefficient such that as fish appetite changes due to the fish growth rate, age, size, and weather condition, the allocated amount of food schedule is not changing based on these factors. Therefore, the continuous operation of such a system may lead to dispensing of excess feeds and eventually resulted in water pollution, poor fish growth rate, and eventually result in low productivities.
The automated method, as the name states, completely perform feeding operation without human intervention. This method involves the use of technologies such as Computer Vision (CV) and Fuzzy Logic Controller (FLC). An automated feeding regime system based on the CV for indoor intensive culturing of eel was proposed by Chang et al. [22]. The work aimed at determining fish appetite through the gathering behavior of the eel using an infrared photoelectric sensor. The system was designed to revive at a specific period. Failure of the sensor to sense the eel gathering for the three consecutive trials was defined to lead to the feeder stoppage until next rouse. Thus, it limits the risk of the chance of a high rate of feed wastage. However, this approach is not efficient and reliable as the system continues to operate based on the fish gathering without prior identification of the purpose may lead to another problem. The optimal approach should be a system is controlled based on the actual feed intake of the eel or ability to determine the purpose of gathering. More so, the system should only come up when the eels required to feed, not just after a certain period.
Skoien and Alfredsen [9] proposed an automatic fish feeding regime system based on the eating behavior of the fish in a highly dense aquaculture tank. The work aims at controlling the amounts of dispense meals at an optimal rate, thus improve the aquaculture production profit. The control strategy employed involved a continuous decision on whether dispensed feeds are consumed via the detection of leftover feed on the surface of the water using two methods: correlation filter for optimum local region within the video frame and computer vision refinement to suppress identified feed. A Fuzzy Logic Controller (FLC) system for dispensing feed using linguistic estimations and rules for the daily feeding management of sea bream larvae was VOLUME 8, 2020 developed by Papandroulakis et al. [23]. In a similar approach, Soto-Zarazúa et al. [24] considered fish age, dissolved oxygen, temperature, and body weight to control feed provided for the tilapia. Since these variables have a direct effect on fish metabolism and growth, a fuzzy-logic control algorithm was adopted for fish feeding based on mention parameters. The results obtained showed minimal differences in growth (P > 0.05) between treatments, saving food of 29.12% (equivalent to 105.3 kg), and lower the water pollution rate compared with timed-based feeders. However, not all the time, water parameters determine the fish's appetite.
A similar approach using a fuzzy logic-based control system for the freshwater aquarium was proposed by Rana and Rani [15]. The proposed system adopted a data acquisition device for online parameter acquisition and analysis. FLC was used for controlling input stress parameters such as temperature, dissolved oxygen, and conductivity. However, the three measured parameters adopted cannot alone determine the health status of the fish. Other parameters, such as dissolved ammonia from fish excreta, waste feed, and carbon dioxide, will improve a higher degree of accuracy. Also, the health status of the fish might not adequately represent the feeding consumption rate of the fish at a particular time. The optimal solution should be the use of real-time techniques that can determine the actual feeding behavior of the fish. Therefore, to ensure efficient feeding in aquaculture, it is necessary to develop a smart feeding regime system that can analyze the hunger status of farmed fish.
The objective of this study is to develop an intelligent fish feeding model for the distribution of feed based on fish feeding intensity using fish behavioral vibration analysis and artificial neural networks. To achieve the research objective, datasets that are covering fish activities, including swimming, escape, feeding, and routine behaviors were utilized. The Autoregressive Moving Average filter was applied to the obtained datasets to remove noise. We improved the prediction accuracy of the design model by developing a novel 8-direction Chain Code algorithm that extracting the vectors representing individual fish movement activity. The machine learning was trained using Fourier descriptors obtained from the Chain Code, and other sets of Fourier Descriptors obtained directly from the dataset (acceleration and angular velocity) that does not pass through the Chain Code. It is important to note that much higher accuracy is achieved in system performance while employing the Fourier Descriptors obtained from the developed Chain Code. To the best of the authors' knowledge, the fish feeding regime system using fish behavioral vibration analysis and the artificial neural network has not so far been presented in the literature.

II. BASICS OF ARTIFICIAL NEURAL NETWORK
Artificial neural networks (ANNs) are a branch of artificial intelligence paradigm that is designed to learn and to recall information based on a given training dataset [25]. They are inspired by biological systems, which are made up of many elements, know as neurons interconnected to functioning similarly as biological neurons. The neurons are organized in layers and interconnected with weighted connections corresponding to human brain synapses. Multilayer perceptron neural network (MLPNN) is the most common type of ANN, and it has been applied for many applications include river flow forecasting, pigment concentration in a river, and water quality prediction [26]- [28]. Its architecture can be described, as shown in Fig. 1. The MLPNN is a feedforward network, and it comprises of the input layer, hidden layer(s), and output layer. The number of neurons in the input and output layers are corresponding to the input variables and output data, respectively. The hidden layer is the important layer in the MLPNN, and its neurons are optional and can be determined either by trial and error or intelligently to attain the best performance [29]. In this layer(s), each neuron is connected to every neuron in the previous or next layer by weights (w). A scalar parameter known as bias is connected to each neuron to introduce an additional degree of freedom [25], [28]. The input parameters are multiplied by connection weight, and the sum of the weighted inputs in each neuron together with bias(s) is subsequently passed through a transfer or activation function that generates an output.
Assuming the number of input parameters is denoted by k, and the number of neurons in the hidden layer is given as m. Mathematically, the input to the output structure of the MLPNN can be formulated as follows [26]: where A j is the weighted sum of the j hidden neuron, B 1 is the bias term of each hidden neuron, w ij represent the synaptic weights of the neuron relating the connection between the n th input to the m th hidden neuron, X i is the input to the input node(s) and k is the total number of inputs. The output of the m th hidden neuron is given by; and the neuron network output is given by; where B 2 is the bias term of the output neuron, w ij denotes the synaptic weight characterizing the connection between the m th hidden neuron to the p th output neuron. There are different kinds of activation functions for the ANN, such as radial basis (radbas), logarithmic sigmoid (logsig), linear (purelin), and hyperbolic tangent sigmoid (tansig) transfer functions. The activation function adopted for this study is logarithmic sigmoid (logsig), because the model output values are in the ranges of [0,1]. The mathematical form of this function is given by;

III. METHODOLOGY
This section describes the details of the method used during the study, which includes the data pre-processing, feature extraction, machine learning experimental procedure, and description of system performance evaluation. The datasets used in this study were obtained from the experimental study by Noda et al. [30] and Gleiss et al. [31]. The dataset was obtained through a data logger that incorporated a triaxial accelerometer, magnetometer, and gyroscope for escape, feeding, swimming, and routine activities of the fishes. Fig. 2 illustrates how the coordinate frame was aligned to fishes with the directions of the angular velocity; Gx, Gy, and Gz. The directions of acceleration are given as Ax; Ay; and Az on x-, y-and z-coordinates, respectively.
A. DATA PRE-PROCESSING Data acquired using data acquisition device such as accelerometer, magnetometer, and gyroscope usually contains unwanted signal which may be caused by an environmental factor, system circuitry, or even human activities. Filtering this noise is a crucial step to get rid of unnecessary information from the raw signals. The various sources of noise were filtered using a moving average filter. It was adopted because it is optimal for reducing random noise and has a sharp step response [11], making it suitable for this type of signal. The general Autoregressive Moving Average (ARMA) model satisfies the difference equation: where p, a k , 1 ≤ k ≤ p and q, b k , 1 ≤ k ≤ q are the model order and coefficients of the Autoregressive (AR) and Moving Average parts, respectively, and x(n) is the white noise input [33], [34]. When the p, a k , 1 ≤ k ≤ p =0; then equation (5) becomes the Moving Average model equation and is given as: where q, b k , 1 ≤ k ≤ q are the model order and coefficients of the Moving Average Filter. Taking z-transform of both sides of equation (6) gives; and the system transfer function H (z) is given as: Moving Average Filter was implemented using different window sizes of 3, 5, 9, 17, 25, and 31, among which optimum model order is 9. The result of the window size for the 3, 5, 9, and 17 are presented in this paper (see Section IV. A). Algorithm 1 shows the developed pseudo-code for the moving average filter.

B. FEATURE EXTRACTION
The pertinent information extraction from the raw signal is a vital step in the pattern classification system due to its direct impact on a machine learning algorithm. The angular velocity and acceleration signals are provided as input to the feature extraction algorithm. The dataset was obtained using the high-resolution data logger (500Hz), in which the  N/4)))); Dn = J' + 1 * randn(1, length(j)) End dimension of raw sensing data for the duration of 4 s is 2000 samples. After the prepossessing step where the dataset was filtered using a window size of 9, the dimension of data become 222 data points. Among which large redundancy exists due to the fact that the acceleration and angular velocity data measured with the accelerometer, magnetometer, and gyroscope are closely correlated with one another along the x-, y-, and z-axis. This large number of irrelevant data would result in ''overfitting'' and reduce the system accuracy.
The aim of feature extraction is to find a finite set of signal that perfectly captures quantitative descriptions and enable classification between various classes of activity. In order to determine the vectors suitable for the individual activity recognition, the fish movement signals were extracted using developed Freeman Chain Codes. For the escape activity, x-and z-coordinates were selected, while x-and y-coordinate were chosen for the feeding and other activities. This choice of coordinates selection is based on the fact that escape activity reflected more between x-and z-coordinates, while feeding activity exists more between x-and y-coordinates. Fig. 3 (a) and (b) shows acceleration patterns for escape and feeding activities, respectively [30].
An 8-direction Chain Code was used to characterize the fish movement direction through the connected sequence of straight-line segments of identified movement and direction. The 8-directional Chain Code was considered because it is more accurate than 4-connectivities Chain Code [35]. In this work, a novel 8-directional Chain Code algorithm was developed. The differences between the two points in each of the x-, y-and z-coordinates were considered as delta ( ). To compute the difference in the x-coordinate, the model used to generate x is presented in equation (9). Conversely, equations (10) and (11) were used to compute the y and z in the y-and z-coordinates, respectively.
where x, y and z are the difference between the present and previous data points in the x-, y-and z-coordinates, respectively. By using for representing the difference between the two points, it was assumed that whenever the equals to the negative value, the value is less than zero, and if the value is positive, the value of is greater than zero. Based on these assumptions, pseudo-code in Algorithm 2 was developed. This code follows the contour in a counter-clockwise manner and keeps track of the directions as it passes from one contour point to the next.
3: if y greater than 0 and x greater than 0 4: x = 1 // Assign 1 to x 5: elseif y greater than 0 and x equal to 0 6: x = 2 // Assign 2 to x 7: elseif y greater than 0 and x less than 0 8: x = 3 // Assign 3 to x 9: elseif y equal to 0 and x less than 0 10: x = 4 // Assign 4 to x 11: elseif y less than 0 and x less than 0 12; x = 5 // Assign 5 to x 13: elseif y less than 0 and x equal to 0 14: x = 6 // Assign 6 to x 15: elseif y less than 0 and x greater than 0 16: x = 7 // Assign 7 to x 17: else 18: x = 0 // Assign 0 to x where x represents the difference between the two points in the x-coordinate, y represents the difference between the two points in the y-coordinate, and x(n) represents the obtained Chain Code. The set of sequences of numbers obtained from the Freeman Chain Code was further processed using a Discrete Fourier Transform (DFT) implemented in the form of Fast Fourier Transform (FFT). This is to analyze the boundary of the movement direction. The results of the frequency components, which are the Fourier Descriptors (FD) was then stored for classification. The DFT of the set of sequence of numbers x(n) obtained can be expressed as: For k = 0, 1,. . . ., N − 1. The complex coefficients X(k) can be restored back to the original pattern using Inverse Discrete Fourier Transform (IDFT) given as: For n = 0, 1,..,., N − 1.
The rotational invariant FD is achieved by dividing each of the coefficient of FD by DC term (A (0)), where A(0) is the first non-zero frequency component [36]. Therefore, the new set of coefficients is given as: Since the movement direction is not a close loop, the distance of the movement's directional point to the pattern centroid cannot be determined. Therefore, it was assumed that the movement pattern could only be affected by rotational invariant. Selection of feature sets that is informative critically important for the development of a fast and effective prediction model, particularly when the number of features is large. In this study, the dimension of Fourier Descriptor is 100, among which large redundancy exists because repeatability exists in FD frequency. The feature selection was based on the results obtained from the frequency domain analysis. The first ten FD were selected for describing the movement patterns because a low number of FD is sufficient for representation and analyses [36]. Since the low frequency (FD) components of x(n) contains sufficient information about the movement direction, FD can be truncated to M< N elements, and this gives in approximation x(k): For k = 0, to N − 1.

C. MACHINE LEARNING EXPERIMENTS
The developed system was designed and trained to classify fish behavioral activities such as feeding, escape, swimming, and routine movements. The fish feeding regime system was implemented using a Multilayer perceptron neural network. The MLPNN was chosen because it has been the most common network employed in pattern classification studies [26], [37]- [40]. Moreover, MLPNN is applicable in both simple and complex input-output relationships with high accuracy. The network was designed and trained using a total of 160 experimental data points reported by Noda et al. [30] and Gleiss et al. [31]. In the designed network, FDs obtained from the feature extraction task for feeding, escape, swimming, and routine movements were employed as input variables. The system response was designed to predict the individual activity and dispense feed when feeding behavior detected. The architecture of the designed network with the three layers, namely the input, hidden, and output layers, is illustrated in Fig. 1. One hidden layer was used, and it is sufficient for accurate prediction for the present study. Normalization of the raw input data is essential to avoid overflows due to very small or huge weights. The FDs were first pre-processed to distribute the entire input values into the range of −1 or +1 using the min-max normalization technique. The mathematical model for the min-max is given by; y = x − x min x max − x min (17) where y is the normalized output, x is the input dataset (FD), x min and x max are the minimum and maximum values of the FD.

D. ALGORITHM TRAINING PROCEDURES
The MLPNN learning algorithm was used to train the developed feed dispensing system. The input parameters are VOLUME 8, 2020 randomly divided into three sets: training, validation, and testing dataset. The testing dataset is 15%, while the training and validation datasets are 70% and 15%, respectively [25]. The training dataset was used to design and adjust the weight and biases of the network, while the validation dataset was utilized to perform model accuracy analysis and generalization of the designed network during the training process. The testing dataset was used to examine the final performance of the trained network. The training process composed of four phases: In the first phase (presentation phase), the input vector defined in (18) was fed into the network, and the output vector was computed by the neural network. In the second phase, the network error vector and the sum of squared error for the input vector were computed. The training was discontinued when the sum of the squared errors is less than the error goal or the moment the specific maximum number of cycles or epoch is being reached. Otherwise, the training continues. Finally, in the learning phase, each layer with a new matrix and bias was computed. The neural network then returns to the presentation phase, and the steps are repeated. The network training was performed in MATLAB (R2015b). The threshold value was varied between 0.1 to 1.0, with the maximum number of 1000 epochs specified for the network.
where x represents the input vector and T represents the transpose.

E. SYSTEM PERFORMANCE EVALUATION
In any type of developing pattern classification algorithms, evaluation of network performance is essential in order to access the system accuracy [41]- [43]. In the present study, the system performance was evaluated using k-fold crossvalidation [44], [45]. The sensitivity, specificity, and accuracy are the metrics used to evaluate the performance of the developed system. The dataset used was divided into k mutually disjointed folds (40 data points for the individual activity), with a single dataset retained as a validation dataset for the testing of the system. The remaining k-1 dataset was used as a training dataset. The validation process was repeated 40 times (the fold), with each of the datasets used only once as the validation dataset. The obtained results were averaged to obtain a single estimation. The mathematical model of the sensitivity, specificity, and accuracy are given as: where True Positive (TP) represents correctly classified positive cases, True Negative (TN) represents correctly classified negative cases, False Positive (FP) represents incorrectly classified negative cases, and False Negative (FN) represents incorrectly classified positive cases.

A. EFFECT OF MOVING AVERAGE KERNEL
In the data pre-processing, the moving average filter was used to smoothen the acquired signal. Fig. 4 (a) shows the noisy signal while Fig. 4 (b), (c), and (d) shows filtered signal using different kernels of the moving average filter. The obtained signal is shown in Fig. 4 (a) shows that a major activity centered at 2s to around 2.2s. However, owing to noise mixing with the signal, it was difficult to determine the entire signal pattern. Multiple pass filter, Gaussian filter, and weighted moving average filter were used to process the signals. The results obtained showed that the Gaussian filter produced a sharp step response and stability than multiple pass and weighted filter. This indicates that the Gaussian filtering method is best in this study because it produced a better stable response than multiple-pass and weighted moving average filter.

B. EFFECT OF MODEL ORDER
Since the Gaussian filter gave a better performance than multiple pass and weighted filters, the signal obtained using the Gaussian filter was further processed using model orders of 3, 5, 9, 17, 25, and 31 in order to verify the effect of the model order on the moving average filter kernel. Fig. 5 (a), (b), (c) and (d) shows results of averaged points in a recursive fashion on the average moving filter using model order 3, 5, 9 and 17 respectively. As the number of points in the filter increases signal becomes stable. This indicates that the optimal model order for this signal is 9.

C. EFFECT OF MOVEMENT VARIANCE ON ACTIVITIES PATTERN
By observing the plotted raw accelerometer data in Fig. 3, it can be visually seen that escape activities had a maximum acceleration in the x-coordinate than the observed value in the VOLUME 8, 2020 feeding activities. This replicates the lower intensity of the beating of the caudal fin during feeding movement compared with escape movements. It can also be deduced that the movement pattern in escape movement occurred in orders of x-, z-and y-direction, while that of the movement pattern in feeding movement took place in the order of x-, y-and z-direction. The difference may be a result of tactics that are involved in the movement. Some feeding activities requires the adjustment of movement to capture the food. However, the escape movement requires a considerable amount of turning to escape the threats [30]. The pattern offers a justification for obtaining features that can be used to differentiate between feeding and escape activities. However, it is not suitable to rely on these because it may be affected by some factors like the motivation of the fish, the location of the attached data logger, and the environmental factor.

D. EFFECT OF FEATURE VECTOR
In determining the feature vector that is suitable for the classification of the fish activities, the movement directions were extracted using Freeman Chain Codes, as described in Section II. The set of numbers generated through the Chain Code was converted into FD for extracting the pattern signature of a given activity. The chain code plots and magnitude plots of the FD for the feeding and escape movements are shown in Fig. 6 and Fig. 7, respectively. By observing these figures ( Fig. 6 and Fig. 7), FD gives a pattern that is more compact and easier to match than the Chain Code. Therefore, using FD to classify fish activities was useful than the Chain Code.

E. PERFORMANCE ANALYSIS OF THE DEVELOPED FISH BEHAVIORAL CLASSIFIER
In the system classification design, two different ANN classifiers were implemented. The first classifier was based on FD obtained from Chain Code, while the second classifier was based on FD generated from the fish movement pattern. The performance of the developed system was evaluated to verify the accuracy of the detected fish activities at a different threshold. The obtained results of the classifier one and classifier two are shown in Table 1. In determining the optimal performance of the classifier 1, the network was trained using threshold value varied from 0.1 to 1.0. Accuracy and error obtained are shown in Table 1. Based on the results attained, the best accuracy of 100% was obtained at a threshold value of 0.5, while the least performance of 44.79% accuracy was obtained at 0.3. Fig. 8 (a) shows the regression curve of the best performance result, while Fig. 8 (b) shows the Mean Square Error over the epochs plot of the best performance. In the classifier 2, FD obtained from fish movement boundary was used to train the developed system using threshold value varied from 0.1 to 1.0. The accuracy and error obtained are shown in Table 1. On the other hand, the best accuracy of 35.60% was obtained at a threshold value of 0.9, while the least performance of 5.16% was obtained at 0.5.  These results indicate that FD obtained from the Chain Code is more useful for the pattern classification than FD obtained from the movement direction. Fig. 9 (a) shows the regression curve of the classifier 2 for the best performance, while Fig. 9 (b) shows the mean squared error versus epochs plot with the best validation  performance of 0.16031 obtained at epoch 3. These performances indicate that the system is better trained using FD obtained from the Chain Code than FD obtained from movement direction. This could be attributed to the Chain Code that reconstructed the movement pattern with more representation for easy recognition.

F. PERFORMANCE EVALUATION OF THE DEVELOPED MODEL
The best performance accuracy of the classifier one and classifier two was obtained at the threshold value of 0.5 and 0.9, respectively. Consequently, performance evaluation of the developed system was estimated using these thresholds as a basis. The performance metrics considered were sensitivity, specificity, and accuracy using equations (19), (20), and (21), respectively. The obtained FD was equally divided into 40 for the feeding activity and 40 for the escape activity. The developed system was trained and tested on both activities. This was repeated 40 times, with a single data used for the  validation at a time. The average of the obtained results was then computed. Table 2 summarized the performance evaluation results. The results shown in Table 2 indicate that sensitivity, specificity, and accuracy of classifier 1 were 100% for each. While classifier 2 has 40% sensitivity, 30% specificity, and 35% accuracy, respectively. This shows that classifier 1 has better performance in identifying fish activity with an accuracy of 100% compared to classifier 2 with an accuracy of 35%. This implies that the system is less sensitive to the FD generated directly from the fish movements boundary. However, with the use of chain code, it was able to compact the data into a representation that is more sensitive in detecting the fish activities.

V. CONCLUSION
The development of an intelligent fish feeding regime system using vibration analysis has been presented in this paper. This was accomplished through the extraction of signals from the accelerometer for the escape and feeding activities. The key technical challenges encountered involves the determination of the feature vector suitable for individual activity recognition. The patterns of the fish movement activities were extracted using the developed 8-directional Chain Code generator algorithm for the computation of the feature vectors represent the movement pattern of the fishes.
The set of sequence features obtained was further processed using DFT. The FD obtained from the Chain Code, and movement direction was then used for the proposed system. The results obtained from the developed system showed 100% accuracy. The obtained results reveal that our system is efficient in handling the feeding process based on behavioral patterns of the fishes. Thus, reducing the feed wastage, number of user involvements, and operational cost. Compared with the state-of-the-art fish feeding regime systems, the proposed system demonstrated the potential of tackling the problem of inefficient handling of feeding management in the aquaculture sector. The fish activities considered in this study are limited to feeding and escape behaviors. Further study can be extended to include other activities such as swimming and aggressive behavior. From 1995 to 2017, he was an Academic Staff with the Federal University of Technology, Minna, Nigeria, where he has been an Associate Professor with the Electrical and Electronic Engineering Department, since 2017. His research interests include wireless sensor networks, digital signal and image processing, data compression, intelligent system design, embedded systems, wireless communications, and artificial intelligence.