Determination of modal properties of the coffee fruit-stem system using high speed digital video and digital image processing

Detachment of coffee fruit is usually accomplished by means of mechanical impacts and vibrations applied to the plant. Modal properties of the coffee fruit-stem system represent important information for efficient and selective harvesting. This study aimed to determine the modal parameters of the coffee fruit-stem system, such as natural frequency and damping coefficient, using high speed digital videos. With image processing techniques, it was obtained the resulting displacement of the system subjected to an impulse. The modal parameters were determined by the logarithmic decrement method, considering the system as underdamped. The use of high-speed video and digital image processing techniques allowed the simple and reliable determination of modal parameters of the coffee fruit-stem system. Natural frequencies for the coffee fruit-stem system were 11.62 and 13.29 Hz; the damping coefficient was 0.0253 and 0.029 N s m, and the equivalent stiffness was 8.61 and 7.09 N m for red and green ripening stages, respectively. It was found overlap of resonance bands, between the ripening stages red and green, hindering the selective mechanical detachment in the first natural frequency range of the coffee fruit-stem system.


Introduction
Brazil is the world's largest coffee producer with a harvest of 2.7 million tons in 2014. Among the states, Minas Gerais has 50.4% of the coffee crops, followed by Espírito Santo, with 28.6%. The two main grown species, Coffea arabica and Coffea canephora, represent 70.8 and 29.2% of total production, respectively (Instituto Brasileiro de Geografia e Estatística [IBGE], 2015).
Regarding the coffee production chain, fruit harvest is the most difficult for mechanization. Mechanized harvesting of different fruit is commonly performed by applying impacts and vibrational forces to the plant in order to promote the detachment of fruits (Sessiz & Özcan, 2006;Polat et al., 2007;Pezzi & Caprara, 2009;Torregrosa, Ortí, Martín, Gil, & Ortiz, 2009;Du, Chen, Zhang, Scharf, & Whiting, 2012). In this context, the detachment of coffee fruit can be performed in a single step or, selectively, in which only mature fruits are harvested (Souza, Queiroz, Rafull, & Cecon, 2006).
The dynamic response of the coffee fruit-stem system subjected to vibration is affected by its modal parameters, such as natural frequencies, mode shapes and damping (Rao, 2008). If an excitation is applied at the natural frequency, or close to, the system responds with maximum amplitude. Therefore, determining the appropriate combination of frequency and amplitude of vibration is essential for efficient detachment (Santos, Queiroz, Pinto, & Resende, 2010).
Natural frequencies and mode shapes of the coffee fruit-stem system have been estimated using mathematical modeling techniques. Santos, Queiroz, Valente, and Coelho (2015), Tinoco, Ocampo, Peña, and Sanz-Uribe (2014) and Espinosa, Rodríguez, and Guerra (2007) employed the finite element method for determining mode shapes and natural frequencies, and sought resonance bands favoring selective detachment of coffee fruit.
Experimental determinations of modal parameters of the coffee fruit-stem system are still limited by the difficulties inherent to the response sensing to the system vibration. Linear Variable Displacement Transducers (LVDT) (Aristizábal, Oliveros, & Alvarez, 2003); accelerometers (Jonsson et al., 2007;Amirante, Catalano, Giametta, Leone, & Montel, 2007) and strain gages (James, Haritos, & Ades, 2006) are frequently used to measure vibration in plants. Obtaining the response of the coffee fruitstem system to vibration, using direct contact sensors and transducers, is hindered by physical and mechanical limitations. The response of a system when subjected to vibration can be influenced by the increase in mass caused by the use of accelerometers (Helfrick, Niezrecki, Avitabile, & Schmidt, 2011).
Also, an alternative to determine responses of the coffee fruit-stem system to vibration is the use of high-speed video along with digital image processing techniques. Applications of high-speed videos have been observed in different fields, such as medical sciences in studies of vibrational parameters of vocal cords (Qin, Wang, & Wan, 2009) and fluid dynamics for analysis of drops and cavitation bubbles (Thoroddsen, Etoh, & Takehara, 2008).
Some advantages of using video for vibration monitoring and determination of structural dynamic behavior refer to the location of the sensor outside of the structure, the monitoring of multiple points in the structure simultaneously (Jeon, Choi, Park, & Park, 2010) and the possibility of monitoring vibrations in three dimensions.
The hypothesis of this study is that the use of the high-speed videos with digital image processing techniques can be suitable for vibration monitoring and determination of modal properties of the coffee fruit-stem systems. Thus, this study determined, under laboratory conditions, the main modal parameters of the coffee fruit-stem system, such as damping ratio, natural frequency, damping coefficient and stiffness using high-speed digital video and digital image processing.

Material and methods
In this study, to determine the modal parameters, it was used samples of coffee branches, Catuaí Vermelho, with constant length of 0.05 m, with one coffee fruit per stem, at the ripening stages green and red. Samples were taken to determine the main physical properties, such as mass and sizes of stem and fruit.
For the coffee fruit-stem system, by means of dynamic vibration tests, it was determined the following modal parameters: damped oscillation period, damping ratio, undamped and damped natural frequencies, damping coefficient, and stiffness of the system. In the dynamic tests, we used a system manufactured by Ling Dynamic System (LDS), consisting of a Dactron signal generator, a P100E amplifier and an electromagnetic shaker V406 model.
The coffee fruit-stem system was subjected to an initial displacement, by the mobile base of the electromagnetic shaker, and allowed to vibrate to return to equilibrium position. The initial displacement imposed to the fruit stem-system was a semi-sine wave pulse, defined in terms of acceleration and the peak time of application.
The logarithmic decrement method was applied to determine the modal parameters (Aristizábal et al., 2003), which is the amplitude reduction rate of a free damped vibration, defined as the natural logarithm of the ratio between any two successive amplitudes measured in the same direction (Beards, 1996). The relationship between the value of the logarithmic decrement, after N oscillation cycles, and the system damping ratio, under consideration, is represented by Equation 1. where, Through the decay curves of the coffee fruitstem oscillation system, it was obtained the damped oscillation period by measuring the time between two consecutive peaks of displacement. The damped and undamped natural frequencies of the coffee fruit-stem system are obtained by Equations 2 and 3. v The viscous damping coefficient of the coffee fruit-stem system was calculated by Equation 4.
where, c = damping coefficient of the system, N s m -1 . The equivalent stiffness of the coffee fruit-stem system was estimated by Equation 5, which is the rate of change in strength to a corresponding change in translational deflection of an elastic element (Harriz & Piersol, 2002).
where, k = equivalent stiffness, N m -1 . The displacement over time of the coffee fruitstem system was monitored by a digital camera Casio, Exilim EX-FH20, with video capture capacity of 210, 420 and 1,000 Hz. The target plane (coffee fruit-stem system), the background plane and the camera plane were kept parallel during testing and at constant distance to provide the same spatial resolution and the same distortion for all videos. Lighting was kept constant by two 50 W fluorescent lamps The system displacement was monitored considering a reference point at the free end of the coffee fruit, which was highlighted in white for the studied ripening stages (green and red). The background image was chosen to contrast with the system to be studied.
A system of coordinates (s, t) was set in pixels on the images used for obtaining the displacement of the monitoring point (PM) in the coffee fruit-stem system. A coordinate system (x, y) in millimeters, was set in the real space so that the plane containing the control points is the same as the coordinate system (x, y). The calibration of the images to transform the values of the system (s, t), in pixels, to the system (x, y), in millimeters, was performed with the transformation functions proposed by Segerlind (1984). Figure 1 shows a sample of the coffee fruit-stem system in three hypothetical images, highlighting the control points (PC1 to PC4) and monitoring point (PM); the axes and dimensions of reference; and the direction of the input displacement. The videos acquired during the vibration tests were processed to extract information regarding the coordinates of the control points (arranged in the background image) and the monitoring point (free end of the coffee fruit), for each constituent image. The coordinates of the points, in pixels, were transformed into mm with reference to the actual positions of the control points. Subsequently, the coordinates of the monitoring point were plotted as a function of time to obtain the decay curves.
For each ripening stage of the coffee fruit, we defined the conditions that favored the segmentation process. Segmentation was performed by a thresholding operation (Gonzalez & Woods, 2000), which consisted of defining a gray level in a given band, to segment the controls and monitoring points from the rest of the image. We analyzed the band that best highlighted the points of interest on the image and set the segmentation threshold. The segmentation process produced binary images. For each object identified in the binary image, we calculated the area of influence and its centroid. For an image without noise, five objects were identified (four control points and one monitoring point). When identified a number greater than five objects in the binary image, reference images were used to check the possible origins of the noises, including the reflection of light by the fruits or the background image. As reference, we used the images corresponding to oscillation peaks of the coffee fruit-stem system. The elimination of noise in binary images was made from the use of morphological opening filters.
To evaluate the classification performed by the image processing, a confusion matrix was calculated on the basis of 56 images sampled before and after processing, for each sampling rate for each ripening stage. The images chosen were related to four peaks of the coffee fruit-stalk system oscillation, of each monitoring video. It was visually compared the original image with the binary image, after removal of noise, by checking the errors of omission and commission. From the confusion matrices, we calculated the Kappa coefficient by checking the degree of agreement in the classification (Moreira, 2001).
Dynamic vibration tests were performed, with a peak acceleration of 147.15 ± 0.51 m s -2 in 11 ms, with the purpose of evaluating the influence of sampling rates and ripening stage on the modal properties of the coffee fruit-stem system. Fourteen samples were used for each ripening stage (green and red) evaluated in each sampling rate of 210, 420 and 1,000 Hz. Mean values of modal properties were evaluated by analysis of variance, comparing the effects of sampling rate and ripening stage using the average t-test, at 5% probability.

Results and discussion
The main physical properties related to the coffee fruit-stem system are listed in Table 1. Geometric properties influence the coffee stem stiffness, since it is a function of the moment of inertia of the cross section and its length, and the elasticity modulus of the material (Rao, 2008). Samples longer with smaller diameters of the stem have lower stiffness and thus lower values for the natural frequencies. These properties vary according to harvests, variety, ripening stage, location and age of the coffee plant.
The results obtained by video processing of the decay of oscillation of the coffee fruit-stem system were similar for all sampling rates as well as for different ripening stages. The resulting spatial resolutions for the images were of 0.16; 0.35 and 0.82 mm pixel -1 for the acquisition rates of 210, 420 and 1,000 Hz, respectively. Based on these values, the amplitude chosen for the calculation of the logarithmic decrement showed higher values than the spatial resolution for the respective sampling rate, in order to minimize the errors involved. The blue band provided the best highlight of the points of interest in the thresholding segmentation processing, which consequently showed better condition to determine the centroids of regions of interest in the images, for both ripening stages. This is due the low amount of blue in this image background (black) and fruit (green and red) when compared to the control regions (white).
For high sampling rates, the amount of available light influences the final quality of the images and the segmentation process. The short exposure time inherent to high-speed imaging requires high lighting intensities (Thoroddsen et al., 2008). Accordingly, the sampling rate at 1,000 Hz resulted in darker images. Figure 2 illustrates the results of processing for four frames of a video acquired for the coffee fruitstem system, at the green ripening stage, for a 420 Hz sampling rate, images in the blue spectral band (Figure 2a) and the resultant binary images ( Figure  2b).
Kappa coefficients for the red ripening stage were 0.92; 0.93; 0.89 for sampling rates of 210, 420 and 1,000 Hz, respectively; for the green ripening stage, the values were 0.97; 1.00; 0.98. It can be seen a high agreement between the classified images and the original images for any sampling rate and for both ripening stages.
Errors of omission of the regions of interest were nil, indicating that segmentation did not fail to identify any region of interest, but some background pixels were erroneously taken as regions of interest  (Moreira, 2001). These regions considered as noise, or undesirable, in the segmentation could be eliminated in the fruit position analysis by using morphological filters, or by considering noise as background. As these are only two classes in the confusion matrix, it was also annulled up the errors of commission, that is, those pixels that were included as objects of interest and were background. Figure 3 shows the curves of the oscillation decay obtained by high-speed video for one of the samples, at the green and red ripening stages, at the sampling rates of 210, 420 and 1,000 Hz. a b Figure 2. Result of segmentation of images for four frames of a video acquired at a rate of 420 Hz for the coffee fruit-stem system, at the green ripening stage, images in the blue spectral band (a) and the resulting binary images (b).

Displacement (mm)
Displacement ( There was no significant effect of video sampling rate on the modal parameters of the coffee fruit-stem system, for both ripening stages. Thus, the means of the ripening stages were compared for all repetitions. Table 2 presents the means of the modal parameters determined for the coffee fruit-stem system samples, green and red ripening stages. From the result of t-test, only the damping coefficient was not significantly different between the ripening stages. The damping ratio of the coffee fruit-stem system was 0.126 and 0.149 for the ripening stages red and green, respectively (Table 2). Considering the damping ratio, the coffee fruit-stem system behaved as an underdamped system, that is, 0 < ζ < 1 (Rao, 2008), as observed for most systems in nature.
A significant difference was found in the natural frequency between the green ripening stage (13.29 Hz) and the red ripening stage (11.62 Hz), confirming the literature (Ciro, 2001;Tinoco et al., 2014;Santos et al., 2015). On the other hand, no difference was found for stem length between the ripening stages (Table 3), indicating that the observed difference between the natural frequencies is associated with the mechanical properties, such as elasticity modulus of stems.
Modal properties and mechanical properties of the fruit-stem systems can influence the mechanized harvesting, due the changing of the dynamic behavior of these systems (Tinoco et al., 2014;Santos et al., 2015). Analyzing mechanical properties of the coffee fruit-stem systems, Silva, Silva, Alves, Barros, and Sales (2010) concluded that there are significant differences for detachment forces of the coffee fruits in different ripening stages. Green fruits presented an average detachment force greater than red fruits; this behavior can indicates the better moment to perform the mechanized harvesting and the selective harvesting of the coffee (Ferraz, Silva, Oliveira, Silva, & Bueno, 2014).
For other varieties, values determined by mathematical models were in the range 17-21 Hz, for the variety Caturra vermelho and different ripening stages . Likewise, Espinosa, Rodríguez, Guerra, and Gutiérrez (2008) estimated the first natural frequency of the coffee fruit-stem system, for the variety Caturra amarelo and red ripening stage, at 15.86 Hz.
Machinery and devices for coffee detachment working with sweep frequency could perform the operation more efficiently when the objective is to perform the harvest in one step. With the use of sweep frequency, the resonance of the coffee fruitstem system would be achieved for both maturity stages and for different physical and geometrical characteristics (Santos et al., 2010).
Overlapping resonance bands between maturity stages was observed by Ciro (2001), who investigated the system with only one degree of freedom and represented by a cantilever beam with a tip mass. Given the small difference between the means of the natural frequency for the red and green maturity stages, the performance of selective detachment using this operating range becomes more difficult.
In most mathematical models, the constituent material of coffee stem is considered isotropic, however, the anisotropy of the material and the viscoelastic effect of the fruit-stem system can contribute to large variation in system stiffness characteristics (Ciro, 2001) and consequently in the values observed for the natural frequencies.
Moreover, from the results obtained for the first natural frequency for the ripening stages green and red (Table 2), the 140 Hz sampling rate would be suitable to monitor the vibration process. Thus, the lower sampling rate of the camera used in this work, equal to 210 Hz, could be used without aliasing and with the proper detection of the waveform (Brandt, 2011).
There was no significant difference between the means of damping coefficients obtained for the ripening stages red and green, with an overall mean of 0.027 N m s -1 , resulting in the same energy dissipation, due to damping, for both maturity stages studied.
The equivalent stiffness of the coffee fruit-stem system was higher for the red ripening stage (8.611 N m -1 ) relative to the green stage (7.087 N m -1 ). The stiffness becomes greater with the increase of natural frequency and mass; this latter property was higher for fruit at the red ripening stage, as shown in Table 1

Conclusion
The use of high-speed video and digital image processing techniques allows the simple and reliable determination of modal parameters of the coffee fruit-stem.
Any of the sampling rates in the range 210-1,000 Hz, associated with spatial resolutions compatible with the displacement of the fruit-stem system, propitiated the determination of the resulting displacements for to the first natural frequency.
The overlap between the first natural frequencies for the green and red ripening stages, prevents selective harvesting of coffee by mechanical vibration in this operating range.