• Vol 9, No 4 (2018)
  • Electrical, Electronics, and Computer Engineering

Discriminant Analysis as a Tool for Detecting the Acoustic Signals of Termites Coptotermes Curvignathus (Isoptera: Rhinotermitidae)

Muhammad Achirul Nanda, Kudang Boro Seminar, Dodi Nandika, Akhiruddin Maddu

Cite this article as:

Nanda, M.A., Seminar, K.B., Nandika, D., Maddu, A., 2018. Discriminant Analysis as a Tool for Detecting the Acoustic Signals of Termites Coptotermes Curvignathus (Isoptera: Rhinotermitidae). International Journal of Technology. Volume 9(4), pp.840-851

Muhammad Achirul Nanda Department of Biosystem Engineering, Faculty of Agricultural Technology, Bogor Agricultural University, Bogor 16680, West Java, Indonesia.
Kudang Boro Seminar Department of Biosystem Engineering, Faculty of Agricultural Technology, Bogor Agricultural University, Bogor 16680, West Java, Indonesia.
Dodi Nandika Department of Forest Products, Faculty of Forestry, Bogor Agricultural University, Bogor 16680, West Java, Indonesia
Akhiruddin Maddu Department of Physics, Faculty of Mathematics and Natural Science, Bogor Agricultural University, Bogor 16680, West Java, Indonesia
Email to Corresponding Author


Various methods for termite detection have been developed, one of them is purely based on the acoustic signal. However, that method still has a weakness, wherein it is difficult to separate the signal generated by the termite or the noise from the environment. The combination of the feature extraction at the acoustic signal and the classification model is expected to overcome the weakness. In this investigation, we inserted 220 subterranean termites Coptotermes curvignathus into pine wood for feeding activity and observed its acoustic signal. In addition, three acoustic features (i.e., short-term energy, entropy and zero moment power) were proposed to recognize the termite's acoustic signal. Subsequently, these features will be analyzed and combined with discriminant analysis to produce the robust classification model. According to the numerical results, the integrated discriminant analysis and the acoustic feature in our termite detection system has an 83.75% accuracy.

Acoustic signals; Discriminant analysis; Termite detection system


Termites are social insects that live in colonies and are an extremely destructive pest in destroying wood. It has been reported that termites also attack buildings, furniture and books; according to Nandika et al. (2015), the spread of termites in Indonesia reached 49.9% of the total land area, with 93.92 million hectares of forests being the natural habitat for termites. There are approximately 2,200 recognized worldwide species of termite, with 200 species occuring in Indonesia. According to Arinana et al. (2016), the subterranean termite Coptotermes curvignathus is responsible for a high intensity of attacks in Indonesia. Moreover, it is also able to make secondary nests in high buildings. Nandika et al. (2015) report that subterranean termite have attacked apartments and hotels up to the 33rd floor in Jakarta, Indonesia. Furthermore, they also destroy trees, resulting in their eventual death. Nandika et al. (2015) estimate that economic losses due to termite attacks on buildings in Indonesia reached 8.7 trillion IDR in 2015. The threat of such attacks is predicted to continue to increase. The initial step to control termite infestation is by using a detection system. However, due to the cryptic behaviour of termites, manual detection of their infestation in wood or wood products is difficult.

A basic termite detection system is based on the phenomena which occur when the wood is being infested by termites, such as temperature, humidity, moisture, acoustics and gas. Hence, the termite detection systems which have been developed to date are based on acoustic emission, microwave radar, temperature sensors, measurement of wood moisture content, geophones, X-rays and borescope cameras. Acoustic emission is one of the nondestructive methods that is the most widely applied to detect the existence of termites in wood. Acoustic signals can be produced by simple termite activities; for instance, when termites are feeding and moving in the wood, they generate acoustic signals. Acoustic signals can also be produced by termites as alarm signals through head banging to the wood (Hager & Kirchner, 2013)

Farkhanda (2013) proposed that biosensor devices could be a combination of several factors, such as temperature, moisture, movement, feeding and behavior of the termites, in the sensing technology. However, no experimental results, especially on termite detection performance using multiple parameters, are reported by Farkhanda. Most researchers have used piezo probe sensors to detect the existence of termites based on acoustic signals (Lewis et al., 2004; Indrayani et al., 2007). On the other hand, there are various alternatives to acoustic sensors to detect termites; for example, geophones, piezo disks, piezo probes, accelerometers, microphones, microwave radar and piezo film (Mankin et al., 2011). Rach et al. (2013) suggest the use of an electret microphone sensor for insect detection within wood, since this type of sensor is more sensitive to vibration. Therefore, our research on termite detection uses an electret microphone sensor. Lewis et al. (2004) used an acoustic sensor (insect detector®, DowAgrosciences) installed on the subsurface of the wood to detect the drywood termite Incitermes minor (Hagen). This technique proved to be effective in reducing background noise, achieving an accuracy of 89.45%. However, the method is destructive, since the wood must be peeled for acoustic sensor installation. This differs from our method, that has been developed based on a non-destructive method.

The improvement of our method for termite detection is based on a mathematical model using the feature of discriminant analysis of acoustic signals. The advantages of discriminant analysis are that the matrix dimension from the observational data can be represented by several principal components, allowing for consideration of all the characteristics, including the interaction of the variables under consideration (Altman, 1968). This method has recently been applied successfully to agricultural problems (Agusta & Ahmad 2016). Moreover, discriminant analysis can be utilized to differentiate between the acoustic signals generated by termites and those generated otherwise (background noise).

The remainder of the paper is organized as follows. Section 2 presents the methods for data collection, including the feature extraction of the acoustic signals and the discriminant analysis guidelines. Section 3 then explains the development of the classification model and the performance of the proposed system (i.e., accuracy and apparent error). Section 4 presents a detailed discussion of the results and possible future research directions, while some concluding remarks are made in Section 5.

Experimental Methods

The subterranean termite Coptotermes curvignathus was obtained from the termite cultivation room in the Termite Laboratory, Faculty of Forestry, Bogor Agricultural University. The pine wood merkusii Jungh et de Vries was selected as the medium for termite infestation. It had a geometrical parameter of 20 (l) × 9.5 (w) × 2.5 (h) cm, with a cavity size of 12 (l) × 6 (w) × 0.5 (h) cm. In the experiment, the wood was divided into two groups: infested and uninfested. The infested group was defined as the wood attacked by termites, and the uninfested group was the wood without termites (normal condition). Each group consisted of four samples of pine wood with an initial moisture content of 8.75±0.05%. We first inserted 220 termites (200 termite-workers and 20 termite-soldiers) into the wood for seven days at a room temperature of 28oC with 70% relative humidity. Furthermore, each piece of wood in each group was monitored for acoustic signals ten times.

Figure 1a shows the acoustic signal monitoring of the termites in the wood. The two electret microphone sensors (Itead studio. China), a frequency range of 0.1?10 kHz and sensitivity of ?50 dB, were used to obtain the termites’ acoustic signals. The sensors were then connected to the Arduino microcontroller (ATmega328P) to convert the analog signals to digital ones. The microcontroller was also connected to the computer (Lenovo ThinkPad X-240) using Arduino IDE software. Therefore, the data detected by the sensors were automatically displayed on the computer. Figure 1b shows the placement of the sensor relative to the center point, which was a diagonal intersection between diagonal lines on the top surface the wood under investigation. The distance of the sensors from the center point was 3 cm to the right and left. This distance was considered safe because it was still in the area of the cavity where the termites were actively performing the attack process.

Figure 1 (a) Test apparatus for acoustic signal monitoring of Coptotermes curvignathus; (b) Top view of the sensor placement

2.1.   Acoustic Signal Processing

In the study, the acoustic signal processing activities are data acquisition, normalization, feature extraction, and classification. First, in the data acquisition process, the acoustic signals produced by the termites were passed through the microcontroller with a sampling rate setting of 100 Hz. To obtain the acoustic signals for one observation, we used a frame size consist of 300 data (within 3 seconds). Second, a normalization process was used to produce clean, ready-to-use data. Third, the feature extraction process was the stage of reducing the data to produce the features that describe the characteristics of the observation object.  Figure 2 shows an example of an acoustic signal visualization ready to be extracted. Two domain approaches were used to produce features, i.e., time domain (Figure 2a) and frequency domain (Figure 2b). The feature generated in the time domain is a feature obtained without first requiring a signal transformation, meaning it can be directly obtained from the sensors. 

Figure 2 Acoustic signal visualization ready to be extracted in the: (a) time domain; (b) frequency domain


The features proposed in the time domain as are follows: (a) short-term energy (E), defined as the sum of the squares of the amplitude in the frame. This can be calculated using Equation 1, where  = frame size, , and = amplitude (Nandhini & Shenbagavalli, 2014; Potamitis et al., 2006); and (b) entropy (H), defined as a measure of abrupt changes in the short-term energy level from the acoustic signals in the frame. This can be computed using Equation 2, where  is the ratio of short-term energy  in the half frame to the frame size (Giannakopoulos & Pikrakis 2014).

The feature generated from the frequency domain is a feature that requires signal transformation from the time domain to frequency domain. One of the well-known methods applied to signal transformation is fast fourier transform (FFT). The result of the FFT is given in Figure 2b. Visually, it has a significantly different signal shape compared to the signal in the time domain. In this study, the proposed feature of the frequency domain is zero moment power (M0), which is defined as the area under the peak of magnitude. This can be computed using Equation 3, where = frequency length ,  = magnitude and  = maximum value of the magnitude.

Finally, the classification process recognizes the termite acoustic signals and classifies the infested and uninfested wood. At this stage, we use discriminant analysis to build a classification model.

2.2.   Discriminant Analysis

Discriminant analysis is a classification model based on multivariate statistical techniques. Classification by discriminant analysis is made because of the interactions of one or more independent variables. In this study, we set the acoustic features (i.e., E, H, M0) as the independent variable. The basic model of discriminant analysis is the linear model, which can be shown in Equation 4 (Uddin et al., 2013), where d = canonical discriminant function,  = intercept, = coefficient,  = independent variable and .

In discriminant analysis, there are three main assumptions which must be fulfilled; if they are not be fulfilled, it will affect the significance and accuracy of the classification result.

1.      Multivariate normal distribution

In constructing the classification model, the independent variable should follow multivariate normal distribution. This is checked by using the chi-square plot against the mahalanobis distance. This distance can be calculated using Equation 5 (Uddin et al., 2013):

where  = mahalanobis distance,  = vector to be transposed,  = the sample vector ,  = the vector of mean values and = the inverse variance/covariance matrices. Furthermore, if the points follow a straight line pattern of more than 50% of mahalanobis distance, then it can be ensured that the independent variable follows multivariate normal distribution ( Ramzan et al., 2013; Agusta & Ahmad, 2016)


1.      No multicollinearity

Multicollinearity is a statistical phenomenon in which two or more independent variables in multiple regression models are highly correlated to each other. Multicollinearity can be mainly detected with the help of tolerance and its reciprocal, called the variance inflation factor. Tolerance (t) and the variance inflation factor (VIF) are defined by Equations 6 and 7 sequentially

Results and Discussion

3.1.   Acoustic Feature

We can see in Figure 4 that the infested and uninfested groups can be distinguished according to the performance of E, H, and M0. Equation 11 is used to find the average value from the distribution of each acoustic feature in a particular group, where N = total number observations of each group, and ,  and  are the average values of short-term energy, entropy and zero moment power, respectively.

According to the numerical calculation, the infested group has a higher  (0.99926 ± 0.039) than the uninfested group (  = 0.99850±0.042). In addition, the value of  from the infested group is 6.65733±3.11, which is also greater than that of the uninfested group (  = 5.34948±2.257). However, the infested group has a lower value of  (-0.30062±0.034) compared to the uninfested group (-0.30002±0.024). The differences in each characteristic of the acoustic signals feature confirm that there is a significant difference between the normal wood and that infested by the 220 termites, although several observations overlap.

Figure 4 Acoustic feature distribution of the groups

Figure 5 Chi-square plot

3.2.   Discriminant Analysis Assumptions and Guidelines

As explained in Section 2.2, before we build the classification model using discriminant analysis, there are three main assumptions which must be achieved. First, to check the multivariate normal distribution, we use the chi-square plot against the mahalanobis distance. As can be seen in Figure 5, the points follow a straight line pattern of more than 50% of mahalanobis distance. As a result, the acoustic features (i.e., E, H and M0) follow multivariate normal distribution.

It is well-known that multicollinearity must be avoided in order to obtain a good statistical model (Midi et al., 2010). According to Table 1, the numerical results of all the acoustic features have t>0.1 and VIF<10, so the acoustic feature is not multicollinear.

Table 1 Multicollinearity testing

The homogeneity of the variance-covariance matrix test between the infested and uninfested groups can be determined using Box's M test. As can be seen in Table 2, the p-value is less than , i.e., 0.0058 (<0.05). Therefore, we reject H0. As a result, the homogeneity of the variance-covariance matrices of the groups is different.

Table 2 Results of the homogeneity variance-covariance matrices using Box’s M test

Figure 6 Cumulative variance and eigenvalue of the PC1


1.3.      Classification Process

3.3.1.   Determination of the canonical discriminant function

Based on numerical analysis, the PCA technique produces only one PC, namely PC1. As shown in Figure 6, the PC1 has a cumulative variance of 100%, indicating that it can explain 100% of the variance of the observational data. Therefore, the canonical discriminant function will be constructed by the PC1. To check the significance of this, an eigenvalue is used, because the cumulative variance is ordered by its eigenvalue (Rivai & Tasripan, 2015). According to Figure 6, the PC1 has a significant eigenvalue, i.e., 1.1162.

Table 3 shows the parameters of the canonical discriminant function from the PC1. As can be seen, the function has an intercept of ?1686.0142 and involves only two acoustic features, E and H (because the coefficient M0 is 0). These features are 1032.5838 and -2179.5874 respectively. Finally, the canonical discriminant function by PC1 can be written as in Equation 12. In other words, the contributions of this canonical discriminant to the classification model between groups do not overlap.

Table 3 Parameters of the canonical discriminant function generated by PC1

There is an interesting occurrence of the canonical discriminant function, in which the acoustic feature M0 is 0. This means that the feature is not used in the classification model development. Although at the beginning of the process all features meet all the assumptions, we cannot guarantee that all the features will be used. This is a result of the DA itself; optimization is still done through a statistical approach, such as identification of Wilks' lamda value in order to select the relevant features (Uddin et al. 2013). This is an advantage of DA in producing a robust model.

3.3.2.   Classification model

As shown in Figure 7a, each group has many scores generated by the canonical discriminant function. In this study, two centroids are used to classify the particular group, i.e., that of the infested and uninfested groups. According to the numerical results shown in Figure 7b, the centroids of the infested and uninfested groups are 1.0432 and ?1.0432, respectively.

Figure 7 (a) Plot of scores to classify groups; (b) Centroids of the groups

Accordingly, the optimal cutting score of both groups is zero. Finally, the classification models of the infested group (IG) and the uninfested group (UG) are derived in Equations 13 and 14, respectively.




This study has successfully demonstrated a classification model based on discriminant analysis in a termite detection system. In the selection of the principal component process, short-term energy and entropy were the acoustic features used to build the classification model of the groups. According to the numerical results, the performance of the proposed termite detection system using discriminant analysis has an accuracy and apparent error of 83.75% and 16.25% respectively. These findings indicate that the combination of discriminant analysis and feature extraction of the acoustic signals can be integrated into termite detection systems.


The authors would like toacknowledge the Ministry of Research, Technology and Higher Education of thePublic Indonesia through the accelerated master program leading to doctoralresearch grants (PMDSU) 2016, contract no: 330/SP2H/LT/DRPM/IX/2016.


Agusta, W., Ahmad, U., 2016. Study on Golden Apollo Melon Ripeness Level Using Acoustic Impulse Parameters (Mempelajari Tingkat Kematangan Buah Melon Golden Apollo Menggunakan Parameter Sinyal Suara). Jurnal Keteknikan Pertanian, Volume  4(2), pp. 195–202

Akinwande, M.O., Dikko, H.G., Samson, A., 2015. Variance Inflation Factor: as a Condition for the Inclusion of Suppressor Variable (S) in Regression Analysis. Open Journal of Statistics, Volume  5(7), pp. 754–767

Altman, E.I., 1968. Financial Ratios, Discriminant Analysis and the Prediction of Corporate Bankruptcy. The Journal of Finance, Volume  23(4), pp. 589–609

Arinana, A., Aldina, R., Nandika, D., Rauf, A., Harahap, I.S., Sumertajaya, I., Bahtiar, E.T., 2016. Termite Diversity in Urban Landscape, South Jakarta, Indonesia. Insects, Volume  7(20), pp. 118

Ciptohadijoyo, S., Litananda, W., Rivai, M., Purnomo, M., 2016. Electronic Nose based on Partition Column Integrated with Gas Sensor for Fruit Identification and Classification. Computers and Electronics in Agriculture, Volume  121(2016), pp. 429–435

Evans, T.A., Lai, J.C., Toledano, E., McDowall, L., Rakotonarivo, S., Lenz, M., 2005. Termites Assess Wood Size by using Vibration Signals. In: Proceedings of the National Academy of Sciences of the United States of America, Germany. Volume 102(10), pp. 3732–3737

Farkhanda, M., 2013. Biosensors for Termite Control. IOP Conference Series: Materials Science and Engineering, Volume 51, pp. 1–3

Giannakopoulos, T., Pikrakis, A., 2014. Introduction to Audio Analysis: a Matlab® Approach. Academic Press, Oxford, USA

Hager, F.A., Kirchner, W.H., 2013. Vibrational Long-distance Communication in the Termites Macrotermes Natalensis and Odontotermes Sp. Journal of Experimental Biology, Volume  216(17), pp. 3249–3256

Hussein, W.B., Hussein, M.A., Becker, T., 2010. Detection of the Red Palm Weevil Rhynchophorus Ferrugineus using Its Bioacoustics Features. Bioacoustics, Volume  19(3), pp. 177–194

Indrayani, Y., Yoshimura, T., Yanase, Y., Fujii, Y., Imamura, Y., 2007. Evaluation of the Temperature and Relative Humidity Preferences of the Western Dry-wood Termite Incisitermes Minor (Hagen) using Acoustic Emission (AE) Monitoring. Journal of Wood Science, Volume  53(1), pp. 76–79

Kantardzic, M., 2011. Data mining: Concepts, Models, Methods, and Algorithms. John Wiley & Sons, Inc, New Jersey, USA

Lehrer, M., 2013. Orientation and Communication in Arthropods. Springer Basel AG, Birkhäuser, Basel, Swiss

Lewis, V.R., Power, A.B., Haverty, M.I., 2004. Surface and Subsurface Sensor Performance in Acoustically Detecting Western Drywood Termites in Naturally Infested Boards. Forest Products Journal, Volume  54(6), pp. 5762

Mankin, R., Hagstrum, D., Smith, M., Roda, A., Kairo, M., 2011. Perspective and Promise: a Century of Insect Acoustic Detection and Monitoring. American Entomologist, Volume  57(1), pp. 30–44

Midi, H., Sarkar, S.K., Rana, S., 2010. Collinearity Diagnostics of Binary Logistic Regression Model. Journal of Interdisciplinary Mathematics, Volume  13(3), pp. 253–267

Nandhini, S., Shenbagavalli, A., 2014. Voiced/Unvoiced Detection using Short Term Processing. In: Proceedings of the International Conference on Innovations in Information, Embedded and Communication Systems, November, Chennai, India.  Volume  4(2), pp. 39–43

Nandika, D., Rismayadi, Y., Diba, F., 2015. Termite: Biology and Its Control, 2nd Edition (Rayap: Biologi dan Pengendaliannya, Edisi Ke-2), Muhammadiyah University Press, Surakarta, Indonesia (in Bahasa)

Potamitis, I., Ganchev, T., Fakotakis, N., 2006. Automatic Acoustic Identification of Insects Inspired by the Speaker Recognition Paradigm. In: Proceedings of the Proc. of the InterSpeech, Pittsburgh, PA, USA. pp. 2126–2129

Rach, M.M., Gomis, H.M., Granado, O.L., Malumbres, M.P., Campoy, A.M., Martín, J.J.S., 2013. On the Design of a Bioacoustic Sensor for the Early Detection of the Red Palm Weevil. Sensors, Volume  13(2), pp. 1706–1729

Ramzan, S., Zahid, F.M., Ramzan, S., 2013. Evaluating Multivariate Normality: A Graphical Approach. Middle East Journal of Scientific Research, Volume  13(2), pp. 254–263

Rivai, M., Tasripan, 2015. Fuel Qualification using Quartz Sensors. ARPN Journal of Engineering and Applied Sciences, Volume  10(16), pp. 6737–6743

Schofield, J., 2011. Real-Time Acoustic Identi?cation of Invasive Wood-Boring Beetles. PhD Thesis, Graduate Program, University of York, York, England

Uddin, N., Meah, M.S., Hossain, R., 2013. Discriminant Analysis as an Aid to Human Resource Selection and Human Resource Turnover Minimization Decisions. International Journal of Business and Management, Volume  8(17), pp. 153–169