Intelligent automation of dental material analysis using robotic arm with Jerk optimized trajectory

Many types of biomaterial analysis require numerous repetition of the same operations. We suggest applying the principles of Total Laboratory Automation (TLA) for analysis of dental tissues in in-vitro conditions. We propose an innovative robotic platform with ABB high precision industrial robotic arm. We programmed the robot to achieve 3000 cycles of submerging for analysis of the stability and thermal wear of dental adhesive materials. We address the problem of robot trajectory planning to achieve smooth and precise trajectory while minimizing jerk. We generate different variants of trajectory using natural cubic splines and adopt the NSGA II multiobjective evolutionary algorithm to find a Pareto-optimal set of robot arm trajectories. The results demonstrate the applicability of the developed robotic platform for in-vitro experiments with dental materials. The platform is suitable for small or medium size dental laboratories.


Introduction
Total Laboratory Automation (TLA) envisions automation and integration of laboratory testing such that specimens are processed, tested, and stored with minimal user intervention (Genzen et al. 2017). The motivation for TLA is provided by workforce shortage of laboratory professionals, and ability to shorten the cycle of experiments, which is an attractive solution for many laboratories. In concept, TLA handles routine, repetitive steps while maintaining quality and efficiency of the experimental procedures and allowing researchers and laboratory operators to focus on specialized testing that requires creativity and contributes towards their training and expertise.
A variety of TLA solutions have been available with technologies that have been advanced based on engineering innovation (see a survey presented in Irene (2018)). For example, Moreno-Camacho et al. (2017) establish a fully automated clinical microbiology laboratory. The automated technologies have improved performance compared with conventional methods, i.e. (Dixon et al. 2002) develop an automated chemistry workstations equipped for parallel and adaptive experimentation. Operations requiring physical action are implemented using the robotic arm and other 1 3 hardware. Authors of Choi et al. (2011) propose a robotic rig for medical tests suited for small laboratories using multiple mobile robots and a robotic arm. The platform ensured flexibility in test process by performing clinical tests via mobile agents, and increases productivity by having throughput scaled to amount of tests. The paper  suggested to combine virtual reality, collaborative robotics, and machine learning for autonomous synthesis of materials and investigation of their properties. In Neubert et al. (2019), a workflow management system based on combining the operation of mobile robots, human operators and automation solutions was suggested for scheduling and autonomous execution of workflows in complex life science laboratory infrastructures. In dentistry, robot-assisted systems such as adapted industrial manipulators have emerged as an important component of surgical instrumentation (Ivashchenko et al. 2020). Combined with digital human-centered automation and artificial intelligence, the robotic systems are expected to help in assistive work and support automation of basic routine lab tasks, while improving quality of work and ensuring the required precision and replicability (Grischke et al. 2020). The research on the application of robots for medical purposes have become a hot research trend , while the use of advanced robotic systems open new opportunities for researchers in digital dentistry (Rekow 2020). King et al. (2009) defined the perspective of TLA as the implementation of the concept of a robot scientist, which executes cycles of scientific experimentation by originating hypotheses, devising the experiments to test these hypotheses, physically running the experiments by using laboratory robotics, and interpreting the results. However, while robotics systems have been useful tools in the laboratory for many years, many tasks are still only automated to a small extent (Courtney 2016). Although some laboratories provide remote control and tele-operation services, they are mostly oriented at educating students (Chaos et al. 2013). Several other test on robotic systems are oriented on dependencies and control aspects (Liu et al. 2019).
The trajectory planning for robotic manipulators is a theoretical and hard problem (Luneckas et al. 2019). The final goal of the trajectory planning is to generate feasible inputs for the smart laboratory robot control system, which ensures that the robot manipulator follows the intended trajectories (Yang et al. 2013), while strictly controlling the accuracy (Yan 2020). Successful trajectory planning reduces robot vibration, preserves the moved specimens from unwanted changes due to acceleration and centrifugal forces, and improves the quality of the experiments or service (Rainer et al. 2018). Vibrations and jerking may appear when a robot is in the moving process or when it is stopped, which will negatively impact the accuracy of the robot. Therefore, minimum vibration and jerk is an important performance index (Lin 2014). The problem of smoothing trajectory of robotic manipulators was addressed before by using the quaternion three-dimensional spherical interpolation method (Wang et al. 2012), concatenation of fifth-order polynomials (Macfarlane and Croft 2003), sine profiles to obtain the required acceleration characteristics (Jae and Young 2000), simplex algorithm for finding minimum jerk paths (Canali et al. 2013), iterative trajectory generation by forward scaling (Lange and Albu-Schaffer 2016), phase synchronization in the position, velocity, acceleration and jerk spaces (Ran et al. 2014), and reinforcement learning (Sombolestan et al. 2019).
In this paper we propose and describe a fully automated robotic rig system for the simulation of dental thermocycling and results processing. This research can serve as a step towards for cloud dental analysis lab, as automation and robotics allows the analysis of dental materials to be carried out remotely in a specialized lab while the data is recovered and shared globally. Our research presents positioning of automatic arm for optimal performance in action. We discuss optimization of trajectories to maximize efficiency of the robot arm while minimizing jerk which could affect the analyzed materials negatively.

Overview of dental robotics
The success of robotics in medical field has opened new possibilities in dental laboratories by offering an increase in precision, quality and safety of material analysis, treatment and evaluation procedures (Lyu 2018) as well as future fully autonomous robotized treatment stations (Haidar 2017), which is especcially relevant for small (with 2-5 technicians) and medium (6-12 technicians) (Haj-Ali et al. 2012) dental labs. Current applications of robotics in dental research area can be split in three categories as follows: (1) robots are used to perform dentistry operations; (2) robots are used as educational (robotic) patients to teach related subjects (Abe et al. 2018; 3) robots are used as measurement and laboratory testing equipment (Lyu 2018), which was the focus of our research and therefore is discussed further in the following paragraphs.
Robots used as measurement and laboratory tools are often categorized into (I) mimicking wear patterns of a patient; and (II) laboratory tools performing precise operations. A good example of the I category are the masticulary robots (Jiang et al. 2016), an in-vitro dental wear simulator using 6-6 Degrees-of-Freedom (DoF) parallel kinematics to imitate mechanical wear of dental materials and components (Raabe et al. 2009). A similar 6-DoF approach was illustrated using bristle simulator in (Alemzadeh and Raabe 2007) and in (Abouelleil et al. 2015). Depending on the application, the simulator can do jaw motion to investigate the effect on jaw function, as it was illustrated on a stewart based platform in . The biting force was analyzed via simulation of human mandible movement and the experiment curves meeting the Posselt envelope were discussed in Ren et al. (2018). A robotic arm with a specifically designed jig was applied to position the shade tabs for dental color determination (Minah et al. 2018).
The II category of robots as smart laboratory tools are mostly oriented at tasks such as precise robotic operations, performing fast and precise instructions deriving from the manufacturing and testing of industrial dental applications, as well as simulating changes in various environmental conditions and also allowing precise mechanical actions of implant and dental analysis (cutting, etching, filling, etc.). Surgery tools range from image-guided robotic systems for automated dental implantation (Sun et al. 2011) to a craniofacial surgery prototype of the 7-DOF navigation-guided robotic system illustrated in Gui et al. (2015) to improve the positioning accuracy and operational accuracy separately. The robot can also assist the dentist in the drilling for precise dental implantation. Robots in prosthodontics and orthodontics can be used for manufacturing of complete or partial denture, dental implantology, and the bending of arch-wire (Jiang et al. 2015). Studies have shown, that non contact automatic preparation of dental implant sockets (Fortunić and Edmundo 2016) is feasible using a robot controlling ultra-short pulse laser (Ma et al. 2013). Robotic systems can improve bending accuracy and efficiency of personalized arch-wire and promote the development of orthodontics, as well as provide multi-point bending tests (Jingang et al. 2013). Robotic solutions can be used as testbench approaches, ranging from mechanical actions of brushing simulation, which can offer good correlation with clinically standardized tooth brushing (Lang et al. 2014) to the precise testing prosthetic structures of different sizes and loading the tested prostheses in randomly chosen points (Jałbrzykowski 2017).
Finally, applications of modern technologies such as adaptations of computer vision (both 2D and depth (Ko and Park 2018)) and Artificial Intelligence (AI) (Gürgan and Yildirim 2016), can guide robotic arms to perform multiple and precise operations such as setting up a closed loop feedback control system to get to the target location for drilling the hole in a jaw (Yeotikar et al. 2016) or measurement applications of artificial denture verification and test through high-precision pressure sensors (Datta and Chaki 2015), or even estimate the age (Ahmad et al. 2014).

Robotic platform for tooth thermocycling
For our robotic platform, we used IRB120 type M2004 6-DOF high precision industrial manipulator robot manufactured by ABB (Vasteras, Sweden) with a nominal largest payload of 3kg. To measure the actual trajectory of the robot's end effector in real time an industrial 3D photogrammetry system consisting of four motion-sensitive charge-coupled device (CCD) cameras mounted overhead of a robot, and a LE-30 digital inclinometer with a nominal accuracy of 0.01 • and sampling rate of 20 ms.
The robot was fixed to a workbench and programmed to achieve 3000 cycles of submerging the teeth into cold and hot water baths to keep for exactly 1 min, following the recommendation of (Cevik et al. 2018) and (Noda et al. 2017). The graceful change period to shift a basket with teeth was set to 16 s from bath-to-bath allowing to avoid spillage of water, not shifting the teeth themselves and also no measurable cool down. A total length of a full cycle was 136 s. The submersion process was done for a total, uninterrupted period of 4 days, 17 h and 13 min, in a clean room, with a person providing 24/7 on-site supervision.
Two Hart Scientific temperature calibration baths were used for a constant and precise up-keeping of water temperature. We used a model 6022 as a hot water container ( 55 ± 0.3 • C ) and model 7312 as cold water container ( 5 ± 0.3 • C ). Both baths were filled with distilled water and raised to the same top height. Teeth were placed in a custom made brass basket. The rig is displayed in Fig. 1.
After the thermocycling procedure, the vertices of each tooth were sealed using a dental wax. Each tooth was then fully covered with lacquer. All teeth were then submerged into 1% methylene blue solution for 24 h in room temperature (around 21 • C). All removed teeth were carefully washed in distilled water after the 24 h. All teeth were mounted one by one, suspended (temporary molded into) in acrylic auto polymer iTEMP Self Curing Acrylic Resin. Manufacturers specifications are accessible via the i-Denta l website. Each block was then assigned a unique ID number and transversely cut through the center of restoration (see Fig. 2 for illustration) using a slow speed diamond saw rig Buehler IsoMet Low Speed Saw (Model: 11-1280-250) with a ± 0.0001 in [±5 m] precision via a manual micrometer. Series 15LC blade disk was used .
The IRB120 M2004 robot was programmed to precisely handle the specimen basket to cyclically submerge and retract into a different temperature environments. The code for robotics arm (in RAPID programming language) is indicated in Fig. 3. Robot was programmed to repeat a constant action of smooth arm swing from one thermal bath to another, following an exact coordinate path with necessary slowdowns and interpolations (see . 4). Waiting time was set to 60 s as was required by the experimental conditions.
To implement the automation of submerge/retract cycles we had to design a robotic arm trajectory that is smooth and minimizes jerk so that the materials are not damaged during the swinging process while spraying of solution is avoided. We address this problem in the following subsection.  The code for robotics arm in RAPID programming language. Robot was programmed to repeat a constant action of smooth arm swing from one thermal bath to another, following an exact coordinate path with necessary slowdowns and interpolations

Model of movement
The aim of robot manipulator trajectory planning is to plan a smooth path across the number of reference points. First, reference points along a given geometric path are given. Next, we obtain the inverse kinematic solutions of the trajectory. Next, we apply spline functions to obtain a smooth trajectory in the joint coordinate system. Finally, an optimal method is used to optimize the trajectory in order to avoid excess jerk.
Our robotic system (shown in Fig. 4) includes the 3-DoF robot, visual system, and end effector with pointy tip. The dynamic model of the robot end effector moving during the tooth thermocycling process can be described as follows: where , ̇ and ̈ are the robot joint angle, angular velocity, and angular acceleration, respectively, M( ) is inertia matrix, C( ,̇) is Coriolis force and centrifugal force, G( ) is gravity force, is the generalized input torque, J( ) is the Jacobian matrix for the conversion of joint space to Cartesian space, and F s represents the external force in the Cartesian space when the robot effector is inserted into water.
Suppose we have the original trajectory as P o = [p(t 1 ) , p(t 2 ) , … , p(t n )] . Local derivative properties of original trajectory are encoded with the differential Laplace Beltrami operator. Following Pekarovskiy et al. (2018), we use local derivatives of motion profile that are calculated for each sampling point i through the finite difference. The velocity and the acceleration, and jerk along trajectory are derived as follows:

Optimization
The trajectory can be generated from a set of reference points using a natural 3D spline interpolation (Won and Kiyun 2009). Here we use cubic splines as suggested in Huashan et al. (2013) to avoid the Runge's effect that causes unnecessary oscillation at the edges of an interval, which may affect the result negatively in case of higher-order polynomials. A natural 3D cubic spline is a piecewise polynomial function with continuity C 2 , i.e. the 1st and 2nd order derivatives of two adjacent cubic splines are continuous at the break point. The natural cubic spline is found by finding coefficients cubic polynomials in each dimension of 3D space for as follows: Given a subset Q ⊂ R of a set of reference points R, many different trajectories represented by splines P can be generated, each with different properties such as an error with regard to a trajectory generated using a full set R of reference points and jerk values.
The accuracy of the trajectory is evaluated using Root Mean Square Error (RMSE) in comparison to reference points (ground truth) as follows: here X R are the coordinates of the reference points.

Fig. 4 Simulation of movement of the robotic arm using ABB Robot Studio
The smoothness of the trajectory is evaluated using the Jerk Index (JI), i.e. the integral of the squared jerk (which denotes the derivative of the acceleration) (Neville and Dagmar 2009).
Also we use the maximum absolute value of jerk (Kyriakopoulos and Saridis 1988) and the absolute mean jerk value (Junsen et al. 2018).
The optimal trajectories are selected using the Pareto front criterion. As we have a multi-objective optimization problem, there may exist a number of solution sets of parameters, all of which equally satisfy the optimality criterion. While searching for Pareto-optimal set of trajectories, we adopt a solution from Aich and Banerjee (2014). The Pareto solution set are non-dominated solutions among all optimum points. Pareto solutions can not be improved on one criterion without degrading some other criterion. The optimal point is defined by Pareto optimality as follows: Definition 1 Pareto optimal is a point, x * ∈ X , if and only if there does not exist another point, x ∈ X , such that F(x) ≤ F(x * ) and F i (x) < F i (x * ) for at least one function.
For a multi-objective optimization problem, genetic optimisation is one of the best methods, and we have selected the NSGA II multi-objective evolutionary algorithm (Wang et al. 2015), which have been demonstrated to achieve a good spread and better convergence of solutions near true Paretooptimal front when compared to other optimizers. According to the actual experience, we have selected the following parameters of the algorithm: the number of population is 300, the number of iterations is 500, the probability of parent crossing is 0.4, and the probability of individual population variation is 0.02 as suggested in Deb et al. (2002).

Accuracy of trajectory
The goal for the robot path optimization was to achieve the best movement trajectory in terms of accuracy and jerk. First, the simulation model was done to gather data from real-world experiments. In Fig. 5, we can see sample measurements for the motion of the robotic arm during working with tooth vs planned trajectory. The measurements were done in some points which were further used to optimize the total movement trajectory for ensuring lower jerks in performed experiments. The goal was to optimize each motion to precisely work with tooth while keeping smallest jerk during thermocycling, so that the tooth would be immersed better to achieve the stability of heating/cooling cycle. This was important for evaluation of examined dental materials and their cuteness on temperature changes and reactions with various chemical substances.
In Fig. 6, we can see the statistical distribution of trajectory errors in distances from planned positions of the robotic arm. The errors follow the Weibull distribution with scale parameter = 21.06 and shape parameter k = 1.80 (confirmed by ̃2 goodness-of-fit test, p < 0.05 ). The statistical tests for other types of probability distributions were not significant (Lognormal, p > 0.05 ; Gamma, p > 0.05 ; Rayleigh, p > 0.05 ). From Fig. 6 we see that most differences appear in the distance 0 − 30 m, which is acceptable for our application. The distribution of errors in different dimensions is reproduced in Fig. 7. A comparison of real trajectory points in relation to optimum in 3D cloud visualization is presented in Fig. 9.
Note that low jerk trajectory is characterized by lower variations in speed and acceleration of the manipulator movement, so lower errors appear during continuous movement while higher jerks appear during sharp turns. However, in any case jerks appear, therefore, optimization of trajectory is necessary to keep jerks low while allowing some error, where robot manipulator is in movement between critical positions (thermal baths).

Pareto optimization
The NSGA II multiobjective evolutionary algorithm was implemented to simulate motion of the robot for optimal trajectory. Optimization of jerks depends on the number of sampling points selected along the trajectory from a full set of reference points. The quality of optimization depends on the number of sampling points. In Fig. 10, we can see a comparison of optimization results depending on the number of sampling points starting from selecting 4 reference points to 9 reference points, where in black is the expected optimal trajectory is shown in black and the trajectory reconstructed from the sampled reference points is shown in red.
A comparison of reconstruction results shows that minimum number of samplings for the efficient NSGA II optimization is using 7 reference points of a trajectory, while the lower number of points gave results, which have a similar shape of the trajectory, however the turns of the robotic arm are not optimal. On the other hand, having more than 7 reference points produces better results which are improved with using even a higher number of reference points.
In Fig. 8 we can see a set of trajectories represented in 2D space of RMSE vs Jerk index. Each trajectory was generated by randomly sampling trajectory reference points from a full set of reference points for natural cubic spline interpolation. The procedure was repeated for 200 times. The NSGA II optimization algorithm has found three not dominated optimal states for robotic arm trajectories in the sense of Pareto. On the other hand most of the results keep close to the front so we can conclude that optimization gave positive effect on the reduction of movement jerk while not increasing RMSE cardinally at the same time. In Fig. 11, we can an example of two Pareto-optimal trajectories found by the NSGA II algorithm, one trajectory with low RMSE and high jerk index, while another one has high RMSE and low jerk index. On can see that the optimization of manipulator movement trajectory introduced an increased error in a part of trajectory that was not essential for the implementation of material thermocycling operation, but allowed to achieve better stability in terms of reduced jerk index value. Figure 12 provides an analysis of the same two different trajectories, shown in Fig. 11, by presenting the Empirical Cumulative Distribution Functions (ECDF) of velocities along trajectory with their respective 99% confidence limits. One can see that the trajectory with Pareto-optimal jerk has a higher probability of both lower velocity, lower acceleration and lower jerk. The results of the Student's t-test indeed show that both trajectories are significantly different in terms of their velocity ( p < 0.001 ), acceleration ( p < 0.001 ), and jerk ( p < 0.001 ) probability distributions. The applied optimization has allowed to decrease the value of Jerk Index by 35.6%, mean jerk-by 26.7%, and maximal absolute jerk-by 18.2%. Fig. 10 Example of different trajectories generated using a different number of trajectory reference points sampled. Reference trajectory is shown in black, while the trajectory generated from a subset of reference points is shown in red Fig. 11 Examples of RMSE vs Jerk tradeoff trajectories generated from N=30 reference points

Critical analysis and discussion
Many robot trajectory planning algorithms create a path which has sharp or angular turns, which causes excess acceleration or centrifugal forces at sharp turns. The problem of minimum jerk path generation is especially relevant for dental laboratory robots, which handle sensitive or precious material and need to prevent excessive vibrations and shaking in order to avoid critical damage of tested materials. Specifically, we addressed the problem of dental material thermocycling, which requires many repetitive submerge/ retract cycles that would be a tedious labour for a laboratory technician and would lack of stability required for achieving a high precision. Laboratory robots can greatly automate this task. However, high speed and acceleration to which the dental samples can be a subject may introduce undesired damage to the material thus completely undermining the results of the thermocycling experiment. We have demonstrated that we can design a robotic arm trajectory which has necessary precision, is smooth and minimizes the jerk while at the same time the materials are not damaged during the swinging process while avoiding the spraying of solution. The critical analysis of the robot arm trajectories planned by the in-house programming environment are not free from drift due to small accumulating errors due to mechanical vibrations and computation rounding errors thus making the task of ensuring the accuracy of the robotic trajectory while satisfying the kinematic constraints for low jerk even more important.
When selecting an optimal trajectory for robotic arm movements it is important to consider the acceptable error of path vs the smoothness of the trajectory, which can be evaluated using Jerk Index. In our case (see Fig. 13), we can select the best trajectory in terms of the smallest RMSE of the path achieved at 9 sampling points. However, if the value of Jerk Index for this trajectory is not acceptable, we can select a trajectory which is smoother but has larger error (the second best option is at 6 sampling points) (see Fig. 14) and Table 1. Increasing the number of sampling points beyond 9 does not generate trajectories with much smaller errors, but in general tends to decrease smoothness and increases jerk, which may affect negatively the quality of the movement and the integrity of the samples. In general case, the problem is solved by applying Pareto optimization as described in Sect. 4.2.
In this paper we have presented a laboratory robot motion optimization strategy based on the jerk minimization and Pareto optimum front to find a best trade-off to satisfy arbitrary velocity, acceleration and jerk requirements defined by the task, material and user requirements. Such requirements are important to any material processing task in the lab so as to avoid damaging or destroying fragile laboratory samples, especially the biomaterial samples such as dental material. Moreover, our method allows plan a physically realizable path, which is especially important for tasks which deal with handling fragile materials or require high precision such as for thermocycling.

Conclusions
We proposed an innovative robotic platform for in-vitro experiments and analysis of dental materials suitable for small or medium sized dental laboratories using an industrial robotic arm manipulator. The robotic arm has an industrygrade accuracy for performing laboratory tasks, however, the requirement to minimize jerk for material processing procedures introduces the need for trajectory optimization.
The simulation results show that the proposed trajectory planning method with resampling of trajectory reference points followed by natural spline interpolation provides an effective solution for the trajectory planning problem of robotic manipulators. We adopted the NSGA II multiobjective evolutionary algorithm to find a Pareto-optimal set of robot hand trajectories with respect to error and jerk. We achieved an optimized trajectory of robotic arm manipulator with a Jerk Index reduced by 35.6% and maximal jerk reduced by 18.2%, while still satisfying the accuracy requirements. The results in a case study involving thermocycling of teeth for analysis of aging process of dental adhesives demonstrated the applicability of the developed robotic platform for in-vitro experiments with dental materials.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.