Abstract
Sorting granular materials such as ores, coffee beans, cereals, gravels and pills is essential for applications in mineral processing, agriculture and waste recycling. Existing sorting methods are based on the detection of contrast in grain properties including size, colour, density and chemical composition. However, many grain properties cannot be directly detected in-situ, which significantly impairs sorting efficacy. We show here that a simple neural network can infer contrast in a wide range of grain properties by detecting patterns in their observable kinematics. These properties include grain size, density, stiffness, friction, dissipation and adhesion. This method of classification based on behaviour can significantly widen the range of granular materials that can be sorted. It can similarly be applied to enhance the sorting of other particulate materials including cells and droplets in microfluidic devices.
Subject terms: Engineering, Physics
Introduction
“To separate the wheat from the chaff” is a significant issue for many industries dealing with granular materials. The aim can be to extract high-grade ores from gangue, to remove defective pills, fruits and nuts, or to separate different waste materials for recycling1–3. In mining applications, several mechanical separation methods exist including flotation and rotating tumbler. For some materials, however, these methods are ineffective and sensor-based techniques must be employed. They involve presenting individual grains to a sensor for classification. The challenge is then to classify a vast quantity of moving grains into separate categories.
This classification can be based on measurements of the physical properties of the grains such as size, colour, shape, density and chemical composition by using, amongst others, optical or X-ray sensors4. However, poor contrast in these measured properties often means that classification is inaccurate or impossible. A similar classification challenge exists with other particulate materials, for instance when detecting rare pathogenic objects suspended in blood flows, or when sorting droplets and cells in microfluidic devices5,6.
Often, the grains to be sorted differ by a range of mechanical properties including elastic modulii, contact friction and adhesion. However, these micro-mechanical properties are not practically measurable while grains are moving, and can therefore not be directly used as a basis for sorting. Nonetheless, they may have some observable influence on the motion of the grains. As a result, a contrast in the physical properties of the grains may be indirectly perceived by detecting a contrast in their trajectories. The experiments and analysis presented by Maier et al. have validated this hypothesis7. The tests involved wooden spheres and hemispheres, as well as wax balls and cotton balls falling down a moving conveyor belt. By using a multiple object tracking algorithm, the trajectory of each grain could be measured from area-scanned camera images. Subsequently, a random forest machine learning algorithm was found to enable an efficient grain classification based on some selected features of their trajectories, including the maximum and mean velocities at different locations.
The potential for machine learning to address questions related to granular materials has only recently started to be exploited. For instance, machine learning based on image analysis was proposed to relate third body (the interfacial layer of material between contacting particles) morphology to contact rheology8, to relate the grain velocity field to the frictional state of a sheared layer undergoing stick-slip9, to enable prediction of the discharge time of granular flows in hoppers10, and to infer micromechanical parameters from X-ray imaging11. Machine learning methods that do not rely on images were found to enable prediction of seismicity of laboratory-scale earthquakes, specifically of their stick-slip stress time series12, and to enable optimal bulk-feeder system selection based on grain micro-mechanical properties13. More generally, a Support Vector Machine method was shown to enable the prediction of particle rearrangement from the knowledge of their microstructure in a variety of flowing soft materials14.
However, research on machine learning applied to sorting granular materials remains embryonic. In particular, the capabilities of a kinematic-based classification are unexplored beyond the first evidence presented in7. This work seeks to further demonstrate the potential of using the kinematic signature of moving grains to indirectly detect contrast in their physical properties.
Results and discussion
The Discrete Element Method (DEM) code LIGGGHTS15 was used to simulate a database of approximately grain trajectories in the canonical configuration represented in Fig. 1a. Grains free-fall a distance , and bounce or roll onto an inclined surface. This configuration is chosen for its simplicity and for its potential to yield different trajectories depending on the micro-mechanical properties of the grains.
Figure 1.
Grain classification based on behaviour. (a) Schematic representation of the simulated system where grains are dropped one at the time on an inclined plane. Grains free fall from a height selected at random with the range and bounce or roll onto a planar surface inclined at . Symbols represent two families of trajectories corresponding to grains of type A () and type B () with different properties. (b) Flow chart depicting the method of analysis where an artificial neural network is trained and tested using simulated trajectories.
In the following we seek to achieve a binary classification between grains of type A and B based on their simulated trajectory. Properties of type A grains are summarised on Table 1 and remain constant for all tests. Type B grains differ from type A by one of these properties, which will be specified below. The initial position h of the grains is randomly selected within the range , which mimics the effect of a feeder discharging grains into the sensing zone at a random position. As a result, identical grains do not follow a unique trajectory. Rather, each grain type is associated to a family of trajectories. Figure 1a shows that the trajectory families of two grain types may significantly overlap. This means that classifying grains based on simple, explicit criteria such as maximum bounce height and average velocity is not necessarily straightforward or possible.
Table 1.
Properties of type A grains: radius R, density , elastic stiffness k, coefficient of restitution e, coefficient of friction and cohesion c. Type B grains feature a difference in one these parameters. Grains are not cohesive () in all tests except for those presented in Fig. 2e.
| R [m] | [kg/m] | k [N/m] | e | c [J/m] | |
|---|---|---|---|---|---|
| 0.01 | 2500 | 0.5 | 0.4 | 0 or |
As an alternative, we have assessed the ability of a machine learning method to achieve this classification. Amongst other possibilities including Random Forests and Support Vector Machine, we chose a simple Artificial Neural Network (ANN); we observed that using a random forest classifier led to similar classification results. The training and testing of the neural network is based on datasets of 100 trajectories of grain type A and 100 trajectories of grain type B, as illustrated in Fig. 1b. Positions are recorded at a frequency of 100 Hz for a period of two seconds from the release of the particle. As a way to stringently probe the ANN classification ability, the information sent to the network is restricted to the time series of one component of the grain position y(t). The assumption is that sending additional information such as other position components, velocity and acceleration time series, would only enhance the classification. Using a k-fold cross validation, of the trajectories are used for training and for testing. The prediction accuracy of the trained network is measured by the proportion of the test trajectories for which the network prediction was correct. The value of can take lie between 0 (the network is always wrong) and 1 (the network is always right). A value of is expected for predictions made randomly. It constitutes a benchmark: the network is deemed to have some predicting ability when the accuracy is greater than 0.5. Both the DEM and the ANN are well established numerical methods, and their specifics are detailed in “Method” section.
Figure 2 depicts the classification accuracy obtained when grains of type B differ from grains of type A by one of the following properties: radius, coefficient of restitution, coefficient of friction, stiffness, adhesion or density; all other properties being the same. The initial heigh of fall is selected at random in the range 0.12 m . The contrast between the two grain types is measured by the ratios , , etc. A ratio of 1 means that the two grain types are in fact identical and therefore indistinguishable. A ratio greater than one means that the grain types are different and that there may be different trajectories.
Figure 2.
Prediction accuracy for grain types with differing properties. (a) radius, (b) coefficient of restitution, (c) coefficient of friction, (d) stiffness (e) cohesion and (f) density without (blue) and with (black) a background drag force (fluid viscosity Pa s). Each symbol represents the ANN prediction obtained by training and testing against 200 trajectories of two grain types. Properties of grain type A are summarised in Table 1. Grains of type B differ by one properties (), or two properties including coefficient of restitution () or coefficient of friction (). Red lines correspond to best fits of the accuracy using Eqs. (1) or (2). Grey areas denote accuracy lower than that of a random classification ().
In Fig. 2a the accuracy of the network is shown for grain types featuring a contrast in size (radii and ). The network accuracy steadily increases from approximately 0.5 in the limit of a size ratio equal to 1, up to nearly 1 when the size ratio is large enough. We propose the following empirical function to capture this trend:
| 1 |
where r is the level of contrast between the two differing properties, in this case . The fitting parameter characterises the network classification accuracy for a given level of contrast r. This exponential function is chosen to match two limits. Firstly, means that grain types are perfectly identical and are therefore indistinguishable: the network accuracy is then expected to be no better than that of a random classification: . Secondly, means that the grain types are so different that the network should be able to correctly classify all grains: . The choice of an exponential function to interpolate these two limits is arbitrary and other functions could capture the data equally well. The data presented in Fig. 2a are best fit by Eq. (1) using a value of . Fig. 2b evidences a similar behaviour when grains differ by their coefficient of restitution (). The empirical function (1) appears to capture this increase in accuracy with a value of .
Figure 2c shows a qualitatively different behaviour when the contrasting property is the coefficient of friction. For relatively low ratios , the accuracy remains at about 0.5, meaning that the network could not detect sufficient differences in the trajectories of the grains to enable classification. The accuracy starts increasing for larger ratios. We propose to capture this by introducing a threshold value greater than 1 into Eq. (1):
| 2 |
This expression reduces to Eq. (1) for . The measured accuracy are best fit with and . Figure 2d and e display similar behaviour when the contrasting property is the grain stiffness or cohesion, which is best fit by Eq. (2) with , and , respectively.
In contrast with all the other mechanical parameters, Fig. 2f shows that the accuracy never exceeds 0.5 when grain types have different densities, meaning that classification by density is not possible.
These results indicate that a classification based on grain trajectory is often possible using an ANN. They further show that the prediction accuracy depends on the nature as well as the intensity of the difference in micro-mechanical parameters of the grains. This can qualitatively be explained by the expected influence, or lack of influence, of these parameters on the trajectories. For instance, different grain sizes would impact the effective free fall distance before the first impact. Different coefficients of restitution or different coefficients of friction would lead to different amounts of kinetic energy dissipation at impact. In contrast, grain density does not affect grain free fall in the absence of a background fluid, and does not affect the energy dissipated at impact. With no effect on the grain trajectory, classification is then impossible. To have density influence the grain trajectory, one can introduce a background fluid producing a drag force, such as a Stokes drag , where is the fluid viscosity and the grain velocity. The terminal velocity of a free falling grain is then expected to be given by , which depends on the density via the grain mass m. Figure 2f confirms that density then influences the trajectories in a way that is detectable by the ANN.
The classification accuracy is contingent on the existence of uncontrolled processes influencing the grain trajectory, which we refer to as sources of noise. In the tests presented above, noise was exclusively introduced by randomly selecting the grain initial position within . In absence of a noise source, grains from the same type would exhibit identical trajectories. Distinguishing the trajectories of two grain types would then not necessarily require machine learning; it could simply be achieved by using an explicit criterion, for instance by comparing their maximum velocity. A noise source makes classification significantly more challenging, as each grain type is associated to a family of trajectories, as illustrated in Fig. 1a. Whereas a classification based on a single criterion may not be generally possible, machine learning appears to be capable of sensing the effect of micro-mechanical parameters amongst that noise, provided that these effects are sufficiently salient. This qualitatively explains why, for a fixed level of noise , the classification accuracy increases with the contrast intensity, as observed in Fig. 2. The classification accuracy for a fixed contrast is expected to decrease when the noise is increased. To test this hypothesis, we have repeated the tests presented in Fig. 2a—involving a contrast in radius — for various level of noise . Figure 3a indicates that the exponential increase in Eq. (1) of the accuracy is preserved at all noise levels; however, the parameter increases approximately linearly with the level of noise , which reflects how noise hinders classification.
Figure 3.

Classification robustness to external noise. (a) Classification accuracy obtained for different levels of noise on the initial grain position = 10% (), 20% () and 50% () using grain types of differing radius; lines are the best fits using Eq. (1); (inset) corresponding values of the fitting parameter . (b) Classification accuracy obtained when adding a noise of magnitude on all positions y(t), or when decreasing the position sampling frequency f (inset); results correspond to grain types of differing radii, and = 20%. Grey areas correspond to accuracy lower than 0.5.
In practice, other factors may impact the classification when measuring the position of the grains using an optical camera and a particle tracking algorithm7,16. They include a level of imprecision on the position and a limit to the frequency of image acquisition17. To assess the robustness of the classification to these factors, we have mimicked them in our simulated trajectories. Firstly, Fig. 3b shows the classification accuracy obtained when adding random numbers in the range to all positions, considering grain types of differing radii with . The classification gradually decreases with an increasing level of noise, but remains close to 1 for sub millimetric noise. Secondly, Fig. 3b shows the effect of the trajectory sampling frequency f on the same trajectories using . The classification accuracy remains close to 1 when the sampling frequency is large enough (, ), and decreases at lower frequencies as less and less information are provided to the network. These two results suggest that classification is possible over a range of position sampling rate and precision that are well within the capabilities of standard imaging techniques.
Furthermore, grains may differ by more than one properties. One could expect that having some contrast in more than one property should facilitate classification. To test this hypothesis, we considered grains differing only by their size () as a benchmark and added a contrast in friction coefficient () or in coefficient of restitution (). Results shown of Fig. 2 confirms that additional contrast leads to enhanced classification accuracy.
Conclusion
“Tell me who you are and I will predict how you behave” is the motto of traditional material modelling. In the context of individual particle sorting we found here that machine learning enables us to reverse this motto to “Tell me how you behave and I will deduce who you are”. This behaviour-based classification can potentially improve a number of sorting processes by indirectly detecting contrast in micro-mechanical properties which would otherwise be difficult to measure. This method should be applicable to processes involving various particulate materials (e.g. grains, droplets, bubbles, cells) moving in various configurations such as down inclined planes, out of silos or through microfluidic devices. The behaviour-based classification, evidenced here for individual grains, could also be applied to classifying bulk materials comprised of many interacting grains, where the dynamics is related to grain micro-mechanical properties18,19. Recent advanced in X-ray sensors for measuring the velocity within bulk flows would also enable such classification17,20,21.
Remarkably, we found that classification is possible using the simplest network architecture, which involves a single neurone and does not perceive any order in time series. Further still, this network was only provided with minimal information on grain trajectories. It is likely that classification capabilities would be enhanced by using more advanced networks, for instance convolutional networks, and by including more information in their training such as grain velocity and acceleration time series. Furthermore, using machine learning methods with higher interpretability such as random forests could allow for insights on which features of the trajectory are perceived and useful for classification.
Method
Discrete element method
DEM consists of a numerical integration of Newton’s second law of motion for individual grain translation and rotation, by discretising them over small time steps dt. In our simulations, grains are spherical and are subject to gravity. They interact with the surface by an elasto-dissipative and frictional contact characterised by a normal stiffness k, a coefficient of restitution e and a coefficient of friction . In some instances, an adhesive force following the linear-elastic JKR model is introduced; this adhesive force is proportional the contact surface area A via a surface energy term c22,23. The normal component of the grain-to-surface contact force is , where is the deflection of the contact and is a viscous parameter yielding some energy dissipation during a normal contact. The tangential contact force involves an elastic component that is capped by a Coulomb friction: .
Artificial neural network
We considered the simple network architecture presented in Fig. 4. It is comprised of a single neurone, which is connected to the input features by synapses. The features are a series of grain positions . The index i refers to a particular grain within a trajectory set; is a particular time at which the grain position was recorded, M is the total number of positions presented to the network for one grain trajectory, which is 200 in all the tests but those of Fig. 3b-inset, where the number of features was gradually reduced. The network translates this series of position into a grain type via the weight of each synapse , an activation function and a transfer function known as the sigmoid function which rescales the activation function between 0 and 1. This result is converted into an output, which is a prediction for the grain type: is interpreted as type A and type B. The permutative nature of the activation function means that this network is insensitive to the order with which the positions y(t) are presented.
Figure 4.
Artificial Neural Network used to classify trajectories, using a feedforward and back propagation training method. The network is comprised of a single neurone and several synapses whose weight w evolves during the training to optimise the network prediction. The cycle shown corresponds to one training epoch.
Training the network consists of identifying a set of weights which leads to some optimal network predictions across a number of trajectories. We use an algorithm known as feedforward-backpropagation to perform the training, which involves the following steps.
Initially, the weights of the network are allocated a random value between 0 and 1. For each trajectory, a feedforward step is applied which consists of using the network to make a prediction on the type of grain. This prediction is compared to the true grain type of the trajectory j under consideration, , via an error function . The subsequent back-propagation step uses this error to update the weights according to a stochastic gradient descent method, via the function: , where is referred to as learning rate. This feedfowrad-backpropagation cycle is repeated on all trajectories of the training set. This corresponds to one training iteration, commonly referred to as one epoch. The two hyper parameters of the training are the number of epochs and the learning rate. We found that using 200 epochs and a learning rate ranging from 0.09 to 0.4 yielded optimum network accuracy while avoiding instances of overfitting. Overfitting is characterised by a training accuracy that steadily improves with the number of epochs while the testing accuracy worsens.
Author contributions
All authors contributed equally to the this study.
Competing interests
The authors declare no competing interests.
Footnotes
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
References
- 1.Narendra V, Hareesha S. Prospects of computer vision automated grading and sorting systems in agricultural and food products for quality evaluation. Int. J. Comput. Appl. 2010;1:02. [Google Scholar]
- 2.Kępys W. Opto-pneumatic separators in waste management. Inzynieria Mineralna. 2016;17:63–67. [Google Scholar]
- 3.Lessard J, de Bakker J, McHugh L. Development of ore sorting and its impact on mineral processing economics”. Miner. Eng. 2014;65:88–97. doi: 10.1016/j.mineng.2014.05.019. [DOI] [Google Scholar]
- 4.Robben C, Wotruba H. Sensor-based ore sorting technology in mining–past, present and future. Minerals. 2019;9(9):523. doi: 10.3390/min9090523. [DOI] [Google Scholar]
- 5.Mazutis L, Gilbert J, Ung WL, Weitz DA, Griffiths AD, Heyman JA. Single-cell analysis and sorting using droplet-based microfluidics. Nat. Protoc. 2013;8(5):870–891. doi: 10.1038/nprot.2013.046. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 6.Voronin DV, Kozlova AA, Verkhovskii RA, Ermakov AV, Makarkin MA, Inozemtseva OA, Bratashov DN. Detection of rare objects by flow cytometry: imaging, cell sorting, and deep learning approaches. Int. J. Mol. Sci. 2020;21(7):2323. doi: 10.3390/ijms21072323. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.Maier G, Pfaff F, Becker F, Pieper C, Gruna R, Noack B, Kruggel-Emden H, Längle T, Hanebeck U, Wirtz S, Scherer V, Beyerer J. Motion-based material characterization in sensor-based sorting. Technisches Messen. 2018;85:202–210. doi: 10.1515/teme-2017-0063. [DOI] [Google Scholar]
- 8.Jaza R, Mollon G, Descartes S, Paquet A, Berthier Y. Lessons learned using machine learning to link third body particles morphology to interface rheology. Tribol. Int. 2021;153:106630. doi: 10.1016/j.triboint.2020.106630. [DOI] [Google Scholar]
- 9.Ren CX, Dorostkar O, Rouet-Leduc B, Hulbert C, Strebel D, Guyer RA, Johnson PA, Carmeliet J. Machine learning reveals the state of intermittent frictional dynamics in a sheared granular fault. Geophys. Res. Lett. 2019;46(13):7395–7403. doi: 10.1029/2019GL082706. [DOI] [Google Scholar]
- 10.Liao Z, Yang Y, Sun C, Wu R, Duan Z, Wang Y, Li X, Xu J. Image-based prediction of granular flow behaviors in a wedge-shaped hopper by combing dem and deep learning methods. Powder Technol. 2021;383:159–166. doi: 10.1016/j.powtec.2021.01.041. [DOI] [Google Scholar]
- 11.Cheng H, Shuku T, Thoeni K, Tempone P, Luding S, Magnanimo V. An iterative Bayesian filtering framework for fast and automated calibration of dem models. Comput. Methods Appl. Mech. Eng. 2019;350:268–294. doi: 10.1016/j.cma.2019.01.027. [DOI] [Google Scholar]
- 12.Rouet-Leduc B, Hulbert C, Lubbers N, Barros K, Humphreys CJ, Johnson PA. Machine learning predicts laboratory earthquakes. Geophys. Res. Lett. 2017;44(18):9276–9282. doi: 10.1002/2017GL074677. [DOI] [Google Scholar]
- 13.Torres-Serra J, Rodríguez-Ferran A, Romero E. Classification of granular materials via flowability-based clustering with application to bulk feeding. Powder Technol. 2021;378:288–302. doi: 10.1016/j.powtec.2020.09.022. [DOI] [Google Scholar]
- 14.Cubuk E, Schoenholz S, Rieser J, Malone B, Rottler J, Durian D, Kaxiras E, Liu A. Identifying structural flow defects in disordered solids using machine-learning methods. Phys. Rev. Lett. 2014;114:09. doi: 10.1103/PhysRevLett.114.108001. [DOI] [PubMed] [Google Scholar]
- 15.Kloss C, Goniva C, Hager A, Amberger S, Pirker S. Models, algorithms and validation for opensource DEM and CFD-DEM. Progr. Comput. Fluid Dyn. Int. J. 2012;12(2–3):140–152. doi: 10.1504/PCFD.2012.047457. [DOI] [Google Scholar]
- 16.Miller T, Rognon P, Metzger B, Einav I. Eddy viscosity in dense granular flows. Phys. Rev. Lett. 2013;111(5):058002. doi: 10.1103/PhysRevLett.111.058002. [DOI] [PubMed] [Google Scholar]
- 17.Maranic Z, Guillard F, Baker J, Einav I, Marks B. A granular thermometer. Granul. Matter. 2021;23(2):1–15. doi: 10.1007/s10035-020-01081-3. [DOI] [Google Scholar]
- 18.G. M. gdrmidi@ polytech. univ-mrs. fr http://www.lmgc.univ-montp2.fr/MIDI/ On dense granular flows. Eur. Phys. J. E14, 341–365 (2004). [DOI] [PubMed]
- 19.Macaulay M, Rognon P. Inertial force transmission in dense granular flows. Phys. Rev. Lett. 2021;126(11):118002. doi: 10.1103/PhysRevLett.126.118002. [DOI] [PubMed] [Google Scholar]
- 20.Baker J, Guillard F, Marks B, Einav I. X-ray rheography uncovers planar granular flows despite non-planar walls. Nat. Commun. 2018;9(1):1–9. doi: 10.1038/s41467-017-02088-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21.Andò, E., Marks, B., & Roux, S. Single-projection reconstruction technique for positioning monodisperse spheres in 3d with a divergent X-ray beam. (2021).
- 22.Johnson, K. L., Kendall, K., & Roberts, S. Surface energy and the contact of elastic solids. Proc. Royal Soc. London. A. Math. Phys. Sci.324(1558), 301–313 (1971).
- 23.Rognon PG, Roux J-N, Naaim M, Chevoir F. Dense flows of cohesive granular materials. J. Fluid Mech. 2008;596:21–47. doi: 10.1017/S0022112007009329. [DOI] [Google Scholar]



