Next Article in Journal
Distributed Remote E-Voting System Based on Shamir’s Secret Sharing Scheme
Next Article in Special Issue
A Machine Learning Method for Classification of Cervical Cancer
Previous Article in Journal
SDSWSN—A Secure Approach for a Hop-Based Localization Algorithm Using a Digital Signature in the Wireless Sensor Network
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Cam Mechanisms Reverse Engineering Based on Evolutionary Algorithms

Department of Mechanical and Industrial Engineering, University of Brescia, via Branze, 38, 25123 Brescia, Italy
*
Author to whom correspondence should be addressed.
Electronics 2021, 10(24), 3073; https://doi.org/10.3390/electronics10243073
Submission received: 5 November 2021 / Revised: 4 December 2021 / Accepted: 7 December 2021 / Published: 9 December 2021
(This article belongs to the Special Issue Machine Learning Applications to Signal Processing)

Abstract

:
Cam follower mechanisms are widely used in automated manufacturing machinery to transform a rotary stationary motion into a more general required movement. Reverse engineering of cams has been studied, and some solutions based on different approaches have been identified in the literature. This article proposes an innovative method based on the use of an evolutionary algorithm for the identification of a law of motion that allows for approximating in the best way the motion or the sampled profile on the physical device. Starting from the acquired data, through a genetic algorithm, a representation of the movement (and therefore of the cam profile) is identified based on a type of motion law traditionally used for this purpose, i.e., the modified trapezoidal (better known as modified seven segments). With this method it is possible to estimate the coefficients of the parametric motion law, thus allowing the designer to further manipulate them according to the usual motion planning techniques. In a first phase, a study of the method based on simulations is carried out, considering sets of simulated experimental measures, obtained starting from different laws of motion, and verifying whether the developed genetic algorithm allows for identifying the original law or approximating one. For the computation of the objective function, the Euclidean norm and the Dynamic Time Warping (DTW) algorithm are compared. The performed analysis establishes in which situations each of them is more appropriate. Implementation of the method on experimental data validates its effectiveness.

Graphical Abstract

1. Introduction

Cam follower mechanisms are the classical mechanical solution to transform, with a high level of precision, a rotary stationary motion into a translating or oscillating or indexing movement. More in general, they transform the cam’s motion in a prescribed movement of the follower [1,2]. Although cam devices allow for rigid automation, compared to modern flexible electronic cams, they have some advantages that make them the optimal solution in a wide spectrum of engineering applications. Textile machines, automobile engines, transfer machines, printing presses and bottling machinery are just some examples of systems where cam follower mechanisms are widely adopted. The main characteristics of engineering cam-based solutions, in addition to the aforementioned precision, are simplicity, compactness and high velocities.
Several research topics deal with cam’s devices, and many publications treat the design optimization. Flores [3] presents a general and comprehensive procedure for an optimal geometric parameters identification for a cam with translating roller follower, obtaining a constrained optimization multivariate problem, solved with non-linear programming algorithms. Meta-heuristics algorithms are widely used for the solution of the problem arising from the cam design [4,5], and among them the evolution-based category is the most investigated one for this problem. Genetic algorithms (GA) have been used, for example, by Lampinen [6] for cam shape design automation and optimization, or by Tsiafis et al. [7] for the identification of the optimal values for the design parameters, like the cam base circle radius, the follower offset and the face width. The automatic cam profile synthesis is also a constrained non-linear optimization problem for which many solutions based on GA have been proposed: in 2017 [8], a multi-objective GA was developed by Jana and Bhattacharjee, and applied to cam mechanisms with simple and double harmonic profiles; Hamza et al. in 2018 [9] used a modified adaptive differential evolution (MADE) algorithm for the optimal design of a cam mechanism with offset translating roller follower. The dynamic behavior of high-velocity cams is another important issue, and the cam synthesis plays a very significant role on follower vibratory phenomena. Dynamic modelling and optimization procedures are used to synthesize cam curves to improve the dynamic behavior: in 2020 [10], Yu et al. applied GA to find the optimal solution in a constraint optimization problem based on a single degree of the freedom dynamic model; in 2017, an optimization of the cam profile based on mathematical modelling was applied to an offset press by Ouyang et al. [11]. The follower vibrations control is another main research issue in the field of cam mechanisms [12,13,14,15], and it is normally combined with the condition monitoring of these systems [16,17,18].
In the last decades, computer-aided design (CAD) has become widely consolidated, favored by increasingly higher velocities and computing powers and by the integration of different tools in the same design environment. A need that often arises in industrial practice is to reconstruct or to model a part of a system starting from an already existing physical object, in order to update or improve the design of an existing component. Reverse engineering (RE), which dates back to the 1980s, is the solution for such a problem. RE methods aim at the reconstruction of CAD models from measured data [19] and are applied in different fields including medicine [20], dentistry [21] and mechanical engineering [22].
Reverse engineering applied to cam mechanisms has been investigated by many scholars: Li in 2011 [23] presented the reverse design of a spatial cam based on the measurements achieved through a coordinate measuring machine (CMM) and the mathematical reconstruction of the cam’s surface; Zhenghao et al. in 2011 [24] proposed an iterative process consisting of fitting the cam profile using the non-uniform rational basis-splines (NURBS) curves, starting from the measured points, then making a further kinematic analysis and a possible correction of the profile, to obtain a cam profile that is smooth but that still satisfies the boundary conditions in terms of displacement, velocity and acceleration of the follower; Alsoufi et al. [25] presented a cam RE converting the scanned data using coordinate-measuring machine (CMM) technology into a 3D model of the disc CAM and investigated the obtained results in terms of the height variation, dimensional accuracy and surface roughness as well as skewness and kurtosis performance with cams of different materials (including aluminum, hardened steel, stainless steel, PLA+, PLA, ABS+ and photo-polymer resin).
This paper proposes an innovative reverse engineering method for a cam mechanism, based on the identification of a law of motion that better approximates the one generated by the device, having acquired the cam profile through a CMM machine or having measured the follower movement. With this method, the coefficients of a parametric motion law can be estimated, thus allowing the designer to further manipulate them according to the usual motion planning techniques. The coefficients values are identified with an optimization process, by setting a first series of values a priori and by correcting them through the minimization of the error between the acquired data and the resulting curve. The minimization is implemented with an evolutionary algorithm (a genetic algorithm) capable of properly probing the solutions space. However, it is important to adequately define a quantity that represents the abovementioned error, since this quantity can make the effectiveness or the convergence of the method critical. In the current work, two methods were used to quantify the difference between the two curves for comparison purposes: the classical Euclidean norm (which measures the curves distance) and the Dynamic Time Warping (DTW) algorithm, capable of capturing and assessing the similarity between two trends.
The innovative aspects, with respect to the literature, concern the development of a method whose purpose is to identify the law of motion, instead of directly reconstructing the profile of the cam from the acquired points. The use of evolutionary algorithms within a RE techniques represents a further innovative aspect of the developed research. The law of motion and cam profile are strictly connected. The follower law of motion and stroke are usually selected in accordance with the technological process and are set as the design initial data. The synthesis of the cam, which consists of sizing the cam and of finding the CNC center tool coordinates to profile the cam, follows. The cam sizing is greatly influenced by the law of motion choices, e.g., the maximum velocity influences the dimensioning of the cam’s base radius. The choices for the cam manufacturing, such as the material, the production technology, the tolerances chosen in the design phase and the accuracy of the CNC machinery, can instead influence the follower law of motion. Samsonenko in 2020 in [26] researched the influence of errors of cam manufacturing on the law of motion of the output element and concluded that slight deviations of the cam shape from the ideal can lead to significant deviations of the movement’s law of the follower. Therefore, a correct choice of the manufacturing method of the cam and of its tolerances is fundamental for the effectiveness of the proposed method.
The paper is organized as follows: Section 2 describes the main concepts related to motion planning and the formulation of a modified trapezoidal motion law in the most general case, the genetic algorithm, the objective function used and the structure of the developed method. Section 3 reports the application of the procedure in some fictitious illustrative cases at the beginning, where the method is tested on data generated by simulation, and afterwards describes the application to a real case. The results are then analyzed in Section 4, and Section 5 summarizes the salient results of the work and the future developments.

2. Materials and Methods

2.1. Laws of Motion and Motion Planning

The movement of a cam follower (or, more generally, of a machine element) is identified by the trajectory (Figure 1a) and by the law of motion (Figure 1b), which defines how the trajectory is followed with respect to the time.
Often, a law of motion is constituted by a succession of sections characterized by displacement, Δs, and related temporal duration, Δt. Therefore, in the study, we can focus on a single trait and the same considerations can be extended to the others as well. In addition to duration and displacement, the law of motion sometimes respects further constraints, such as the values of velocity or the successive derivatives to the extremes of the interval or the imposed passage for a specific point at a given instant. Some motion laws have a flexibility that makes this possible, unlike others, which are rigid and do not allow for solving these kinds of problems. For now, let us consider the case in which the motion law segment has null values at the extremes for all the quantities except for the displacement; this represents a very common case in the definition of the requirements of a cam mechanism.
Referring to the first two intervals of the law of motion in Figure 1, the quantities tA, sA, tB and sB (or similarly tA, sA, Δt and Δs) are constraints, whereas the definition of the curve shape is based on a set of characteristic coefficients that depend on the motion law type. The displacement is a function of the time, of the parameters of the law of motion (c = [c0, c1,..., ci]) and of the constraints. According to the classical law of motion definition, the ci coefficients are adimensional values. If we denote λ as the vector of constraints, which is assigned, in the most general case the displacement function can be expressed according to Equation (1).
s ( t ) = s ( t , c , λ )  
Some of the coefficients c are determined by imposing the constraints defined by λ, whereas others can be chosen within a certain margin to further characterize the curve. A separation is not introduced between these two subgroups because often the coefficients are dependent on each other as a whole. For example, considering a polynomial law of motion, as in Equation (2), it is possible to choose the degree n of the polynomial, in order to both satisfy a certain number of constraints at the extremes of the interval, and introduce further parameters that allow for manipulating the shape of the curve (for example by imposing a certain velocity or acceleration value, or jerk in a generic instant).
s ( t ) = c 0 + c 1 ( t t A ) + c 2 ( t t A ) 2 + + c n ( t t A ) n
In this case, denoting the velocity with v, we could impose the following four constraints:
s ( t A ) = s A ,     v ( t A ) = v A ,     s ( t B ) = s B ,     v ( t B ) = v B
Then, we can define λ = {tA, sA, vA, tB, sB, vB}. Given four constraints, the minimum value of n to satisfy them is three, and consequently, four coefficients are required. If the coefficients’ number is equal to the constraints’ number, the equations for calculating the coefficients derive from the imposition of the constraints. However, it is also possible to choose a degree n of the polynomial redundant with respect to the constraints, and to use the additional degrees of freedom to manipulate the shape of the curve. For example, in this case we could choose n equal to six, obtaining a vector c made up of six elements, that is, in general, a number greater than the number of constraints. Returning to the more general case of a law of motion, even not a polynomial, the main difficulty consists in determining the value of the coefficients ci, which are sometimes not determinable in closed form. In these cases, for the computation of the coefficients, it is reasonable to use numerical methods based on iterative algorithms, which are able to offer approximate solutions for the additional degrees of freedom in compliance with all other constraints.
Without treating the formulation of the different types of motion law, for which reference is made to the literature [1], here the case of trapezoidal modified seven traits motion laws is especially depicted as an illustrative application. The modified trapezoidal laws are particularly manageable, suitable for the purposes of the presented work and very widespread in the industrial field. These motion laws fall within the more general class of the piecewise motion laws, which consist of the succession of different parts, each defined by a specific mathematical function. In detail, the modified trapezoidal laws are defined by assigning the shape of the acceleration diagram consisting of an alternation of seven sinusoidal and constant strokes. With reference to Figure 2, the total duration Δt = tBtA, in which the displacement Δs = sBsA occurs, is divided into seven sections whose single duration is identified by the vector of coefficients c = {c0, c1, …, c6}. In addition to displacement, non-zero values of both velocity and acceleration can be imposed on the extremes of the law of motion, indicated in the figure by vA, aA, vB and aB. Displacement, velocity and acceleration trend can be consequently determined with a double integration in an analytical form (in parts). The additional parameters Apos, Aneg and Vmax, introduced for convenience, represent the maximum positive and negative acceleration and maximum velocity, respectively. Therefore, in the general case, which is characterized by a duration and a displacement compatible with the velocity and acceleration values assigned to the extremes, the profile can be defined in all its parts thanks to the imposition of the constraints (Equation (4)).
s ( t A ) = s A ,     v ( t A ) = v A ,     a ( t A ) = a A ,     s ( t B ) = s B ,     v ( t B ) = v B ,     a ( t B ) = a B
At a computational level, it is convenient to first calculate the vectors of cumulative partial displacements sc and cumulative partial velocities vc at the end of each section, introducing some useful quantities, called a11, a22, a12, a22, b1 and b2, and defined as shown in the formulas in Table A1.
For the ith segment, let us define a function ti(t), which expresses the instant of start, as shown in Equation (5). It is possible to define the analytic expression of displacement, velocity and acceleration at time t (s(t), v(t) and a(t), respectively, obtaining the formulation shown in Table A2, in which the symbol ti is used in place of ti(t), omitting the time instant t, for compactness reasons, and where tci indicates the instant of time at the beginning of the ith section (Equation (6)).
t i ( t ) = { t t A                         f o r   i = 0       t t A k = 0 i 1 c k       f o r   i 1    
t c i ( t ) = { t A                         f o r   i = 0       t A + k = 0 i 1 c k       f o r   i 1    
As previously stated, this class of motion law is very flexible, since it allows for guaranteeing the constraints λ = {tA, sA, vA, aA, tB, sB, vB, aB} at the extremes on displacement as well as on velocity and acceleration, but also allows for further manipulations of its shape in order to achieve secondary objectives.
As an example, Figure 3 shows the comparison of two laws of motion consisting of three movements, in which the dashed modified trapezoidal of the central movement was obtained from the continuous curve by slightly modifying the values of the coefficients c4, c5 and c6 of the vector c. Often, the coefficients c are in a normalized form with respect to the total motion duration Δt, to make comparisons independent of the cycle time.

2.2. Problem Definition and Genetic Algorithm Implementation

Referring to the laws of motion described in the previous paragraph, the proposed cams reverse engineering method consists of an optimization problem for which the objective function is the distance between two curves. The first curve is obtained starting from the CMM measurements of the profile or direct measurement of the follower’s motion; the other one is generated as a sampling of the modified trapezoidal motion law, obtained with the particular vector of seven coefficients c, which defines the potential solution. Denoting the set of law of motion parameters to be identified with c = {x1, x2, …, xn} and the objective function with F = F(c), the problem consists in the minimization of F, therefore determining the particular set of values c*, such that F(c*) = min F(c). Due to the characteristics of this problem, a genetic algorithm represents a valid solution technique.
Genetic algorithms [27] belong to the family of evolutionary algorithms, which adopt the mechanisms of natural selection to solve optimization problems. The use of genetic algorithms is the most suitable method for problems with a large number of parameters or when the function to be optimized is not sufficiently regular or has a domain consisting of several parts that are not connected to each other. In a nutshell, a genetic algorithm, starting from a first set of solutions that are usually randomly generated, carries out the recombination of groups (generations) of solutions (individuals), each consisting of specific characters (variables of the optimization problem).
Each new solution is obtained by recombining, by means of genetic operators, the characters of two solutions selected from the previous group. Selection favors the choice of solutions that best minimize the objective function, so that the properties of the best solutions of a group can propagate in subsequent groups. In addition to the traditional genetic operators (selection, cross-over, mutation, inversion), the algorithm developed in this work uses a further operator, which involves a mutation of the coefficients that is not random, but is bound to a neighborhood of their previous value, thus enabling it to better explore a specific area. As the procedure evolves, the amplitude of this area is narrowed so as to refine the solution in an area that is already optimal in itself. The operators are not always applied, but each one presents a certain probability of occurrence. To ensure the convergence of the method, it was decided to reintroduce in each new generation the best individual obtained in the previous one, thus adopting an elitist algorithm.
As for many optimization algorithms, genetics have intrinsic parameters that affect their effectiveness, such as the number of individuals and the probability of application of the different operators. The chosen parameter values are reported in Section 3.

2.3. Objective Function

The objective function is an indicator of how much close the identified law of motion and the original one are and could be calculated considering either the position or the velocity or the acceleration. The comparison based on the displacement has an important negative aspect: even large variations of the law of motion, for example in terms of accelerations, are very slightly perceived at displacement level. To overcome this drawback, comparing the curves as time derivatives, therefore at the velocity or acceleration level rather than as displacements, is more effective. In the case of the modified trapezoidal, a further advantage emerges when considering the acceleration, since the law of motion is defined starting exactly from the acceleration diagram itself.
To measure the dissimilarity between two curves, the most commonly used method is the Euclidean norm (EN), i.e., the distance (Equation (7)) between the vectors representing the curves. If we denote x ^ and x as these vectors, the EN is evaluated as follows:
d ( x ^ , x ) = j ( x ^ j x j ) 2
Besides, the EN is not always the ideal tool for measuring the distance between the curves for the problem under consideration.
Indeed, the acquired data are frequently subjected to noise and, sometimes, disturbances (due to a surface damage, for example), which are amplified in the derivation of the signal and can affect the results. This usually makes the comparison between the analytic law of motion and the experimental one critical, and even more so if an evolutionary algorithm is used. As an example, Figure 4 shows the acquired displacement (red curve), of the follower movement of a rocker arm cam, damaged near the point with abscissa 270°, and the computed velocity (green curve) and acceleration (blue curve) signals. The data reveal a peak in the acceleration that could greatly affect the Euclidean norm.
As alternative method for measuring the similarity between the curves, the Dynamic Time Warping (hereinafter DTW) algorithm [28,29,30] was considered, which in some situations may be more effective than the Euclidean norm. With this technique, each point of a curve is compared with some points of the other curve in order to have a more reliable measurement of similarity. Let us consider curves 1 and 2 of Figure 5: with Euclidean distance, each point of curve 1 is compared with the corresponding point of curve 2 (Figure 5a), whereas the DTW algorithm compares different points between the two curves (Figure 5b). The adoption of the DTW technique allows for an optimization that tends to avoid falling and remaining in relative minimums. Obviously, the use of a complex algorithm for calculating the distance between the curves penalizes the computation time, but, on the other hand, it allows the algorithm to converge faster. As a demonstration of this, Figure 6 shows the trend of the objective function, over the generations of the genetic algorithm, in the case of the Euclidean norm (red curve) and with the DTW algorithm (green curve), for an optimization in 500 generations with 100 individuals, and with a distance calculation on 500 samples.
In Figure 6, no values are reported on the ordinate axis because the DTW algorithm and Euclidean norm are not directly comparable, but the profiles’ trends emphasize that DTW allows for faster convergence. In terms of computation time over 500 generations, the Euclidean norm requires about 4 ms whereas DTW algorithm requires about 6 ms; however, as the figure depicts, DTW has a higher convergence rate. With the DTW algorithm, the goal can be considered achieved at about 150 generations, with a noticeable reduction in convergence time (about 1.8 ms).

2.4. Developed Cam Mechanisms RE Framework

The RE framework generally adopted and commonly referred to in the literature [31,32,33] is based on the following six main phases: data capture, pre-processing, segmentation, feature classification, surfaces fitting and CAD model reconstruction. Several methodologies are available for each one of these phases and an in-depth analysis of these techniques is discussed in [19]. This approach can also be applied to realize the RE of a cam, as done in [25], which presents the process of reversed disc CAM from an existing one. Alsoufi focuses on the strategy for converting the scanned data using coordinate measuring machine (CMM) technology in the form of point cloud data into a 3D model of the disc CAM. Different approaches for the RE of cam mechanisms are also present in the literature, which have the aim of tracing the motion law of the follower of the cam mechanism starting from the sampling of the cam profile. In [34], Tsay considers a planar cam and uses a least squares periodic B-splines approximation to interpolate the digitized cam surfaces and to create their derivatives required in determining the follower motion. In [24] and in [35], Zhenghao presented a similar approach, with the improvement of obtaining a smoother cam profile, while still exactly satisfying the boundary condition of follower displacement, velocity and acceleration, and used NURBS curves to fit the profile via the measured data.
The proposed cam’s RE differs from the RE classical approach. Although the current approach shares with the latest cited works the purpose of tracing the follower’s law of motion, it significantly differs from them in the method. In fact, rather than performing an interpolation of the points of the cam profile, the here proposed identification process focuses on the law of motion that generates a cam’s profile as close as possible to the measured one, through the optimization process of an objective function. The main advantage of this approach consists in the fact that it enables exploiting at best the flexibility provided by parametric laws. Indeed, if we use this method and a very flexible parametric law, such as the modified trapezoidal, we have the possibility to control, and within certain limits to intervene on, speed and acceleration trends, with all the advantages that influence the dynamic behavior and the dimensioning of the cam. A GA-based optimization procedure allows for identifying the coefficients of a trapezoidal modified motion law, which best approaches the law of motion of the device to be reengineered, and the objective function is evaluated through the DTW algorithm or the Euclidean norm. The flowchart of this method is shown in Figure 7.
Basically, the idea is to redesign the cam, but respecting the functionality performed by a pre-existing cam, for example, a damaged cam or one of which the original project is not available. The choice of the modified trapezoidal motion law is motivated by the fact that numerous motion laws commonly used in industrial applications can be represented through the mathematical formulation of this law. In the optimization process, it may occur sometimes that some coefficients have a null value, even simultaneously, and this can lead to inconsistencies or calculation errors, such as divisions by zero. Therefore, in the software implementation of the formulas presented in Section 2.1, checking tests are inserted in order to degenerate, if necessary, the seven segments law of motion into a three segments law, or to report a warning of the impossibility of satisfying all conditions. The presented innovative cam mechanism reverse engineering method was implemented in an executable software developed in Delphi 10.4 environment

3. Results

3.1. Simulations

Before testing the method on actual data, simulated data were used for preliminary analysis and validation. Figure 8 shows an example of application of the method to a simulated case. Loaded data were generated through a modified trapezoidal motion law (with non-zero initial and final values for velocity and acceleration), in which a noise with zero mean and unitary amplitude was added to the acceleration (light-blue curve). This law of motion realizes a unitary displacement in a unitary time (1 rad in 1 s, as for all the laws of motion in simulation) and is subjected to the constraints λ and the normalized coefficients csrc synthesized in Table 1. These coefficients were chosen randomly, but without null values, so that all the segments are present.
At the beginning of the identification procedure based on GA, an initial solution with all the seven coefficients of c equal to 1/7 was chosen (black curve in Figure 9). The blue curve is the law of motion obtained at the end of the optimization procedure with Euclidean norm evaluated on the acceleration as an objective function. As can be seen, it matches the simulated experimental data very well (light-blue curve). In this case the Euclidean norm proved to be adequate, allowing for convergence after a limited number of generations. The convergence time was of about 2/5 s. The software displayed the acceleration, the velocity and the displacement diagrams, which, however, were substantially superimposed. The absolute maximum error on the coefficients was about 0.0076.
Figure 9 shows the case with the same shaped law of motion, but without noise. The error on coefficients in this case was 0.00034, so it was reduced by an order of magnitude. This case completely validates the procedure, since it substantially offers the values of the coefficients of the loaded motion law. As visible in the lower part of Figure 8 and Figure 9, the genetic algorithm converges quite quickly, reaching a good reduction of the objective function already after 50 generations. This case, completely general, was used to tune the genetic algorithm, i.e., to establish the values of the algorithm intrinsic parameters that can be used for the developed RE method. After a high number of tests, the values shown in Table 2 were chosen.
Keeping the intrinsic parameters of the genetic algorithm fixed (Table 2), tests for nine different cases were carried out, related to the different motion laws used to generate simulated input data. In the following sections, we refer to these laws of motion as “original”, in the sense that they originated the data that replaced the experimental measurements in simulation. All these motion laws can be represented through the formulas of the modified trapezoidal law; that is, they fall within the class of modified trapezoids. For all the considered cases, a unitary displacement in a unitary time, null constraint vector and 300 extracted sampled points were assumed. The maximum number of generations was set 500, or less in case the algorithm no longer evolves.
Table 3 contains the values of the seven coefficients of the considered laws of motion, whereas Table 4 collects the results of the identification in four cases: identification on acceleration, identification on velocity and for each one adopting either the Euclidean norm or DTW algorithm in the objective function calculation.
For one of the previous laws of motion (L7), further tests were made with and without noise, carrying out the identification based on displacement, speed and acceleration. Table 5 shows the final errors on displacement, speed and acceleration calculated with the EN and DTW algorithm.
Subsequently, tests were carried out with original motion laws that cannot be represented by modified trapezoidal laws.
Three polynomial laws, with degrees of three, four and five, respectively, were considered. Six cases for each law were investigated: identification on acceleration, on velocity and on displacement, and for each one adopting either the EN or DTW algorithm. Table 6 collects the values of the EN and DTW algorithm on displacement, velocity and acceleration evaluated at the starting step of the identification, with a trapezoidal law characterized by seven coefficients equal to 1/7 (black curve in Figure 10). Table 7 contains the results of the identifications, in terms of the final values of the EN and DTW algorithm on displacement, velocity and acceleration.

3.2. Tests on Experimental Data

For the validation of the system, data gathered from the real case study of Figure 4 were used. For this system, composed of a damaged rocker arm follower cam, no construction drawings or characteristics of the laws of motion were available; still, displacement data in terms of follower rotation could be directly acquired on the real mechanism as a function of the cam rotation angle. The goal is to reconstruct the global motion law in order to be able to redesign the cam. The movement starts from the cam angle 110° and is characterized by the three phases—“Phase I”, “Phase II” and “Phase III”—highlighted in Figure 4 with different background colors. The constraints of the movement are reported in Table 8. Note that, in this case, the law of motion is expressed in terms of geometric law of motion, and this explains the measurement units in Table 8 and in the following tables. Since the speed of the cam is constant, the angular displacement of the cam and time are proportional, so the displacement of the follower (in deg) can be expressed as a function of the displacement of the cam (in deg) and not of time; accordingly, the units of follower displacement, speed and acceleration are deg, deg/deg and deg/deg2, respectively. The procedure was applied to each one of the three phases independently. A comparison between the Euclidean norm and DTW algorithm to calculate the objective function in the identification based on displacement, velocity and acceleration was performed and the report of the results, in terms of final values of the EN and DTW algorithm, is in Table 9.
Figure 10 shows the comparison between experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) when used as starting point of the identification procedure. Figure 11 reports the comparison with the identified laws based on displacement and EN, whereas Figure 12 reports on displacement and the DTW algorithm. Similarly, Figure 13 and Figure 14 refer to identification based on speed, whereas Figure 15 and Figure 16 refer to acceleration.
The values of the seven coefficients of the best laws identified for the three areas are shown in Table 10.
The computation time in all the examined cases keeps within the order of a few seconds.

4. Discussion

Through the performed tests, the suitability of the method for the current purpose was proven (Figure 8 and Figure 9), even in the presence of noise, and an effective set of GA intrinsic parameters was identified. In the study, for both simulation-based and real-data-based tests, data filtering prior to the application of the presented method was not considered. In this specific problem, filtering the acquired data could cause important components of the signal to be lost. Therefore, it was preferred to investigate the robustness of the method even in presence of disturbances.
Analyzing Table 4, the simulation tests on nine original motion laws of the trapezoidal class revealed that the identification based on acceleration achieved higher performances than with velocity in all the considered cases. For the objective function calculation, the DTW algorithm provided better results for law L1, L2 and L4, whereas the EN provided better results for the others. However, the errors on the coefficients obtained with identification based on acceleration, with both the EN and DTW algorithm, were present in all cases very small maximum values, so it can be said that the identification adequately reached the goal in both cases. The combined use of speed and DTW is characterized, in all the cases, by errors on the significant coefficients and, therefore, is a combination to be discarded.
Considering the errors in terms of displacement, velocity and acceleration for law L7 (Table 5), in the case without noise, a progressive improvement can be detected passing from the identification based on the displacement to that with speed and that with acceleration, with both the EN and DTW algorithm, and in all cases the errors are lower with the EN than with the DTW algorithm. In the case with noise, the error on acceleration substantially does not change identifying the EN on displacement, speed or acceleration, whereas there is a slight improvement with the DTW algorithm, and the obtained error is lower with acceleration. The lowest errors are obtained for displacement and speed when the identification is performed on speed with the EN, and for acceleration when the fitting is on acceleration with the DTW algorithm.
According to the tests with original laws of the polynomial class, the EN performs better than the DTW algorithm, almost in all the tested situations. Analyzing Table 7 by rows, the performance worsens as the degree of the polynomial increases. In particular, in terms of percentage of variation error, the worsening gets higher when passing from degree three to degree four than when passing from degree four to five. Analyzing data by columns, an overall improvement can be seen passing from identification on displacement to identification on speed and subsequently on acceleration, as observed for the law L7. The percentage of error reduction, also in this case, is more significant for the 3-3 laws and progressively lessens as the degree increases.
Considering all three errors (on displacement, velocity and acceleration), for all the three considered laws of motion, the best case is the one with identification based on acceleration and with the EN.
For the actual case, the comparison between the identification with displacement, velocity and acceleration based on numerical errors (Table 9) shows that for all three phases the errors on the acceleration are substantially equivalent to the variation of the quantity to be identified and both with the EN and DTW algorithm. For the error on the displacement, in Phase I the best case is the identification on the displacement with the EN, in Phase II on the displacement with the DTW algorithm and in Phase 3 on displacement with the EN. In all three cases, however, the difference between the EN and DTW algorithm is low. Phase II is characterized by an anomalous behavior due to the breaking of the cam; therefore, as was hypothesized, the DTW algorithm may be more effective than the Euclidean norm in situations where anomalies are present. It is observed, however, that the numerical results of the errors do not provide information on the shape of the acceleration, which significantly affects the dynamic behavior of the system. A smoother law of motion for the acceleration, i.e., which presents a trend with a slope (Jerk) that varies more gradually, is always preferable, because it improves the dynamic behavior when subjected to high loads and high speeds [14,15]. Therefore, a visual comparison of trends is also useful. From the visual comparison of acceleration trends (Figure 11, Figure 12, Figure 13, Figure 14, Figure 15 and Figure 16), in Phases I and II, the identifications based on speed with the DTW algorithm and acceleration with the EN are better and substantially equivalent, and in Phase III the identifications based on speed with the EN are the best ones.
The flexibility offered by manipulating the coefficients c, while keeping fixed the values at the extremes of the range of motion, is a key element of the presented reverse engineering technique. It is based, in fact, on an optimized reconstruction of the cam profile, by manipulating these coefficients.
A further significant advantage of the proposed method is that, based on the identification of the laws of motion, it offers the designer the possibility of verifying the limit values of the kinematic quantities (speed and acceleration), which significantly influence some design aspects (such as the overall dimensions for speed and dynamic loads for acceleration). In this way, when these values are excessive, the designer has the possibility to apply a well-known optimization method to improve the motion law from this point of view.

5. Conclusions

The developed procedure, which can be used as a phase of a wider reverse engineering process of cams, proved to be effective and with excellent performance in computational terms. Computational times of the method are well tolerable if the procedure is inserted, as tools, in a mechanical design software.
In all the examined cases, the procedure achieved good results. Using a GA as optimization tool and the EN or DTW algorithm for the evaluation of the objective function, it allows for the analytic reconstruction of a modified seven trapezoidal motion law that best approximates the motion law of the original cam.
The performed tests revealed that in many cases assessing the distance with the Euclidean norm on acceleration diagrams remains more effective, in particular when the signal to be recognized is little or not at all disturbed. Instead, the use of the DTW algorithm is more effective in case of anomalous situations, for instance in the acquired law of motion. In general, the DTW algorithm applied to velocity diagrams gives poor results, and therefore it is a combination that can generally be discarded. In general, there is no configuration that performs better than the others in all cases, but comparing the different conditions, an optimal configuration can be identified for each specific application, considering, for instance, the numerical results, the visual observation of the trend or the speed of execution of the algorithm.
A limitation of the procedure is that it considers only one type of law of motion, the trapezoidal modified law. While the tests with original motion of the trapezoidal family showed excellent results, performance was much worse with motion laws of the polynomial family, as it was reasonable to expect. Therefore, a future development of the study is the extension of the method by integrating the use of other types of motion laws, such as polynomials, with the aim of identifying, among the different types of motion laws, the one that allows for the best representation of the movement to be recognized. A further development is to investigate the effectiveness of a multi-objective optimization, for which genetic algorithms are particularly suitable. For example, the passage for a precision point could be imposed.
Finally, although this methodology was applied to cam mechanisms in the present work, it has a more general validity and can be applied to any system that generates a movement. It could, therefore, be defined more generally as a reverse engineering methodology of laws of motion.

Author Contributions

Conceptualization, M.T., R.B. and C.A.; methodology, M.T., R.B. and C.A.; software, R.B.; validation M.T. and R.B.; formal analysis, M.T., C.A. and R.B.; data curation, R.B., M.T. and C.A.; writing—original draft preparation, M.T., C.A. and R.B.; writing—review and editing, M.T., C.A. and R.B. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Trapezoidal Modified Law of Motion

Table A1. Expressions of the vectors of cumulative partial displacements sc and cumulative partial velocities vc at the end of each section for a trapezoidal modified law of motion in the most general case.
Table A1. Expressions of the vectors of cumulative partial displacements sc and cumulative partial velocities vc at the end of each section for a trapezoidal modified law of motion in the most general case.
Title 1Title 2
a 11 2 c 0 π + c 1 + 2 c 2 π
a 12 ( 2 c 4 π + c 5 + 2 c 6 π )
a 21 2 c 0 π ( c 0 2 c 0 π ) + c 1 π 2 2 + ( 2 c 2 π ) 2 + 2 c 0 c 1 π + ( 2 c 0 π + c 1 ) c 2 + ( 2 c 0 π + c 1 + 2 c 2 π ) ( c 3 + c 4 + c 5 + c 6 )
a 22 2 c 6 π ( c 6 2 c 6 π ) + c 5 π 2 2 + ( 2 c 4 π ) 2 2 c 4 π 2 π ( 2 c 4 π + c 5 ) c 5 ( 2 c 4 π + c 5 + 2 c 6 π ) c 6
b 1 ( v B v A ) + ( 2 π π ) ( c 0 a A + c 6 a B )
b 2 Δ s ( Δ t · v A + ( ( 2 π + 4 π 2 + 1 2 ) c 0 2 + ( 1 2 π ) ( Δ t c 0 ) c 0 ) a A + ( 1 2 4 π 2 ) c 6 2 a B )
A p o s b 1 a 22 b 2 a 12 a 11 a 22 a 12 a 21
A n e g a 11 b 2 a 21 b 1 a 11 a 22 a 12 a 21
v c 0 v A + a A · c 0 + 2 ( A p o s a A ) · c 0 π
v c 1 v c 0 + A p o s · c 1
v c 2 v c 1 + 2 A p o s · c 2 π
v c 3 v 2
v c 4 v c 3 + 2 A n e g · c 4 π
v c 5 v c 4 + A n e g · c 5
v c 6 v c 5 + a B · c 6 + 2 ( A n e g a B ) · c 6 π
s c 0 s A + v A · c 0 + ( ( 2 π 4 π 2 ) A p o s + ( 1 2 2 π + 4 π 2 ) a A ) · c 0 2
s c 1 s c 0 + v c 0 · c 1 + A p o s · c 1 2 2
s c 2 s c 1 + v c 1 · c 2 + A p o s · 2 c 2 π 2
s c 3 s c 2 + v c 2 · c 3
s c 4 s c 3 + v c 3 · c 4 + 2 A n e g · c 4 2 · ( 1 2 π ) π
s c 5 s c 4 + v c 4 · c 5 + A n e g · c 5 2 2
s c 6 s c 5 + v c 5 · c 6 + a f · c 6 2 2 + ( A n e g a B ) · 2 c 6 π 2
Table A2. Analytic expression of displacement, velocity and acceleration at time t of a trapezoidal modified law of motion in the most general case.
Table A2. Analytic expression of displacement, velocity and acceleration at time t of a trapezoidal modified law of motion in the most general case.
Kinematic QuantityIntervalExpression
s ( t ) t A t < t c 1 s A + v A t 0 + a A 2 t 0 2 + ( A p o s   a A ) 2 c 0 π ( t 0 2 c 0 π sin ( t 0 π 2 c 0 ) )
t c 1 t < t c 2 s c 0 + v c 0 t 1 + A p o s   t 1 2 2
t c 2 t < t c 3 s c 1 + v c 1 t 2 + A p o s   ( 2 c 2 π ) 2 ( 1 cos ( t 2 π 2 c 2 ) )
t c 3 t < t c 4 s c 2 + v c 2 t 3
t c 4 t < t c 5 s c 3 + v c 3 t 4 + A n e g   2 c 4 π ( t 4 2 c 4 π sin ( t 4 π 2 c 4 ) )
t c 5 t < t c 6 s c 4 + v c 4 t 5 + A n e g   t 5 2 2
t c 6 t t B s c 5 + v c 5 t 6 + a B 2 t 6 π 2 + ( A n e g   a A ) ( 2 c 6 π ) 2 ( 1 cos ( t 6 π 2 c 6 ) )
v ( t ) t A t < t c 1 v A + a A t 0 + ( A p o s   a A ) 2 c 0 π ( 1 cos ( t 0 π 2 c 0 ) )
t c 1 t < t c 2 v c 0 + A p o s   t 1
t c 2 t < t c 3 v c 1 + A p o s   2 c 2 π sin ( t 2 π 2 c 2 )
t c 3 t < t c 4 v c 2
t c 4 t < t c 5 v c 3 + A n e g     2 c 4 π ( 1 cos ( t 4 π 2 c 4 ) )
t c 5 t < t c 6 v c 4 + A n e g   t 5
t c 6 t t B v c 5 + a B t 6 + ( A n e g   a B ) 2 c 6 π sin ( t 6 π 2 c 6 )
a ( t ) t A t < t c 1 a A + ( A p o s   a A ) sin ( t 0 π 2 c 0 )
t c 1 t < t c 2 A p o s  
t c 2 t < t c 3 A p o s   cos ( t 2 π 2 c 2 )
t c 3 t < t c 4 0
t c 4 t < t c 5 A n e g   sin ( t 4 π 2 c 4 )
t c 5 t < t c 6 A n e g  
t c 6 t < t B a B + ( A n e g   a B ) cos ( t 6 π 2 c 6 )

References

  1. Chen, F.Y. Mechanics and Design of Cam Mechanisms; Pergamon Press: Oxford, UK, 1982. [Google Scholar]
  2. Wilson, C.E.; Sadler, J.P.; Michels, W.J. Kinematics and Dynamics of Machinery; Pearson Edition: London, UK, 1983. [Google Scholar]
  3. Flores, P. A computational approach for cam size optimization of disc cam-follower mechanisms with translating roller followers. J. Mech. Robot. 2013, 5, 041010. [Google Scholar] [CrossRef] [Green Version]
  4. Abderazek, H.; Yildiz, A.R.; Mirjalili, S. Comparison of recent optimization algorithms for design optimization of a cam-follower mechanism. Knowl. Based Syst. 2020, 191, 105237. [Google Scholar] [CrossRef]
  5. Parouha, R.P.; Verma, P. Design and applications of an advanced hybrid meta-heuristic algorithm for optimization problems. Artif. Intell. Rev. 2021, 54, 5931–6010. [Google Scholar] [CrossRef]
  6. Lampinen, J. Cam shape optimisation by genetic algorithm. CAD Comput. Aided Des. 2003, 35, 727–737. [Google Scholar] [CrossRef]
  7. Tsiafis, I.; Mitsi, S.; Bouzakis, K.D.; Papadimitriou, A. Optimal design of a cam mechanism with translating flat-face follower using genetic algorithm. Tribol. Ind. 2013, 35, 255–260. [Google Scholar]
  8. Bhattacharjee, P.; Jana, R.K. A multi-objective genetic algorithm for design optimisation of simple and double harmonic motion cams. Int. J. Des. Eng. 2017, 7, 77–91. [Google Scholar] [CrossRef]
  9. Hamza, F.; Abderazek, H.; Lakhdar, S.; Ferhat, D.; Yıldız, A.R. Optimum design of cam-roller follower mechanism using a new evolutionary algorithm. Int. J. Adv. Manuf. Technol. 2018, 99, 1267–1282. [Google Scholar] [CrossRef]
  10. Yu, J.; Huang, K.; Luo, H.; Wu, Y.; Long, X. Manipulate optimal high-order motion parameters to construct high-speed cam curve with optimized dynamic performance. Appl. Math. Comput. 2020, 371, 124953. [Google Scholar] [CrossRef]
  11. Ouyang, T.; Wang, P.; Huang, H.; Zhang, N.; Chen, N. Mathematical modeling and optimization of cam mechanism in delivery system of an offset press. Mech. Mach. Theory 2017, 110, 100–114. [Google Scholar] [CrossRef]
  12. Gatti, G.; Mundo, D. On the direct control of follower vibrations in cam-follower mechanisms. Mech. Mach. Theory 2010, 45, 23–35. [Google Scholar] [CrossRef]
  13. Carbone, G.; Lanni, C.; Ceccarelli, M.; Incerti, G.; Tiboni, M. A characterization of cam transmissions through an identification of lumped parameters. Proc. ASME Des. Eng. Tech. Conf. 2006, 2006, 709–718. [Google Scholar] [CrossRef]
  14. Tiboni, M.; Bussola, R.; Aggogeri, F.; Amici, C. Experimental and model-based study of the vibrations in the load cell response of automatic weight fillers. Electronics 2020, 9, 995. [Google Scholar] [CrossRef]
  15. Tiboni, M.; Roberto, B.; Carlo, R.; Faglia, R.; Adamini, R.; Amici, C. Study of the Vibrations in a Rotary Weight Filling Machine. In Proceedings of the 2019 23rd International Conference on Mechatronics Technology, ICMT 2019, Salerno, Italy, 23–26 October 2019; pp. 1–6. [Google Scholar] [CrossRef]
  16. Dalpiaz, G.; Rivola, A. Condition monitoring and diagnostics in automatic machines: Comparison of vibration analysis techniques. Mech. Syst. Signal Process. 1997, 11, 53–73. [Google Scholar] [CrossRef] [Green Version]
  17. Tiboni, M.; Remino, C. Condition monitoring of a mechanical indexing system with artificial neural networks. In Proceedings of the WCCM 2017—1st World Congress on Condition Monitoring 2017, London, UK, 13–16 June 2017; Springer International Publishing: Berlin, Germany, 2017. [Google Scholar]
  18. Tiboni, M.; Incerti, G.; Remino, C.; Lancini, M. Comparison of signal processing techniques for condition monitoring based on artificial neural networks. Appl. Cond. Monit. 2019, 15, 179–188. [Google Scholar] [CrossRef]
  19. Buonamici, F.; Carfagni, M.; Furferi, R.; Governi, L.; Lapini, A.; Volpe, Y. Reverse engineering modeling methods and tools: A survey. Comput. Aided. Des. Appl. 2018, 15, 443–464. [Google Scholar] [CrossRef] [Green Version]
  20. Fu, P. Reverse Engineering in the Medical Device Industry; Springer International Publishing: Berlin, Germany, 2008; pp. 177–194. ISBN 978-1-84628-855-5. [Google Scholar]
  21. Balamurugan, P.; Selvakumar, N. Development of patient specific dental implant using 3D printing. J. Ambient Intell. Humaniz. Comput. 2021, 12, 3549–3558. [Google Scholar] [CrossRef]
  22. Chaudhary, K.; Govil, A. Application of 3D Scanning for Reverse Manufacturing and Inspection of Mechanical Components BT—Proceedings of the International Conference on Industrial and Manufacturing Systems (CIMS-2020); Pratap Singh, R., Tyagi, D.M., Panchal, D., Davim, J.P., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 61–76. [Google Scholar]
  23. Li, D. Application of Coordinate Measuring Machine in Reverse Engineering. Adv. Mater. Res. 2011, 301–303, 269–274. [Google Scholar] [CrossRef]
  24. Zhenghao, G.; Kaikai, Z.; Meng, J.; Fulian, Y. An Exact Reverse Design Approach for Disk Cam Mechanisms. Adv. Syst. Sci. Appl. 2011, 11, 301–308. [Google Scholar]
  25. Alsoufi, M.S.; Alhazmi, M.W.; Azam, S.; Modeling, C.A.D. Mechanical reverse engineering approach for precise measurements of reproducing disc CAM. Int. J. Eng. Technol. 2018, 7, 5741–5757. [Google Scholar] [CrossRef]
  26. Samsonenko, D.M.; Khudoyarov, V.A.; Barbashov, N.N.; Abdullina, L.R.; Potapov, D.M. Research of influence of errors of cam manufacturing on the law of motion of output element. IOP Conf. Ser. Mater. Sci. Eng. 2020, 862, 032053. [Google Scholar] [CrossRef]
  27. Goldberg, D.E. Genetic Algorithms in Search, Optimization and Machine Learning, 1st ed.; Addison-Wesley Longman Publishing Co., Inc.: Boston, MA, USA, 1989; ISBN 0201157675. [Google Scholar]
  28. Ratanamahatana, C.A.; Keogh, E. Making time-series classification more accurate using learned constraints. In Proceedings of the 2004 SIAM International Conference on Data Mining, Lake Buena Vista, FL, USA, 22–24 April 2004; Society for Industrial and Applied Mathematics: Philadelphia, PA, USA; pp. 11–22. [Google Scholar] [CrossRef] [Green Version]
  29. Yadav, M.; Alam, M.A. Dynamic Time Warping (DTW) Algorithm In Speech: A Review. Int. J. Res. Electron. Comput. Eng. 2018, 6, 524–528. [Google Scholar]
  30. Senin, P. Dynamic Time Warping Algorithm Review. Science 2008, 2007, 1–23. [Google Scholar]
  31. Gameros, A.; De Chiffre, L.; Siller, H.R.; Hiller, J.; Genta, G. A reverse engineering methodology for nickel alloy turbine blades with internal features. CIRP J. Manuf. Sci. Technol. 2015, 9, 116–124. [Google Scholar] [CrossRef]
  32. Wang, J.; Gu, D.; Yu, Z.; Tan, C.; Zhou, L. A framework for 3D model reconstruction in reverse engineering. Comput. Ind. Eng. 2012, 63, 1189–1200. [Google Scholar] [CrossRef]
  33. Wang, J.; Gu, D.; Gao, Z.; Yu, Z.; Tan, C.; Zhou, L. Feature-based solid model reconstruction. J. Comput. Inf. Sci. Eng. 2013, 13, 1–13. [Google Scholar] [CrossRef]
  34. Tsay, D.-M.; Huang, M.-H.; Ho, H.-C. Producing Follower Motions Through Their Digitized Cam Contours. J. Comput. Inf. Sci. Eng. 2002, 2, 98–105. [Google Scholar] [CrossRef]
  35. Ge, Z.; Su, P.; Yang, F.; Jiang, M. The Reverse Design Method for Cam Contours and Motion Specification. In Proceedings of the International Technology and Innovation Conference 2009 (ITIC 2009), Xi’an, China, 12–14 October 2009; pp. 1–4. [Google Scholar] [CrossRef]
Figure 1. (a) Example of the trajectory and (b) example of the position law of motion.
Figure 1. (a) Example of the trajectory and (b) example of the position law of motion.
Electronics 10 03073 g001
Figure 2. Modified seven traits motion law, with imposed constraint values on displacement and velocity.
Figure 2. Modified seven traits motion law, with imposed constraint values on displacement and velocity.
Electronics 10 03073 g002
Figure 3. Modified seven traits acceleration motion law (blue curve), with imposed constraint values on displacement (red curve) and velocity (green curve).
Figure 3. Modified seven traits acceleration motion law (blue curve), with imposed constraint values on displacement (red curve) and velocity (green curve).
Electronics 10 03073 g003
Figure 4. Acquired motion low of the follower movement of a damaged rocker arm (blue: acceleration; green: velocity; red: displacement). The law of motion is defined as a function of the rotation angle of the cam, and the displacement referring to the red vertical axis is a rotation of the follower in degrees.
Figure 4. Acquired motion low of the follower movement of a damaged rocker arm (blue: acceleration; green: velocity; red: displacement). The law of motion is defined as a function of the rotation angle of the cam, and the displacement referring to the red vertical axis is a rotation of the follower in degrees.
Electronics 10 03073 g004
Figure 5. (a) Curves comparison approach with the Euclidean norm; (b) curves comparison approach with the DTW algorithm.
Figure 5. (a) Curves comparison approach with the Euclidean norm; (b) curves comparison approach with the DTW algorithm.
Electronics 10 03073 g005
Figure 6. Comparison of the objective function vs. generations with the Euclidean norm (red curve) and DTW algorithm (green curve).
Figure 6. Comparison of the objective function vs. generations with the Euclidean norm (red curve) and DTW algorithm (green curve).
Electronics 10 03073 g006
Figure 7. Flowchart of the developed cam mechanism RE.
Figure 7. Flowchart of the developed cam mechanism RE.
Electronics 10 03073 g007
Figure 8. Application of the method to a simulated case, with random disturbance added to acceleration. (Black: acceleration of the starting step of the identification process; red: displacement; green: velocity; blue: acceleration, after the identification).
Figure 8. Application of the method to a simulated case, with random disturbance added to acceleration. (Black: acceleration of the starting step of the identification process; red: displacement; green: velocity; blue: acceleration, after the identification).
Electronics 10 03073 g008
Figure 9. Simulated case, without simulated disturbances. (Black: acceleration of the starting step of the identification process; red: displacement; green: velocity; blue: acceleration, after the identification).
Figure 9. Simulated case, without simulated disturbances. (Black: acceleration of the starting step of the identification process; red: displacement; green: velocity; blue: acceleration, after the identification).
Electronics 10 03073 g009
Figure 10. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) as the starting point of the identification procedure (red: displacement; green: velocity; blue: acceleration).
Figure 10. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) as the starting point of the identification procedure (red: displacement; green: velocity; blue: acceleration).
Electronics 10 03073 g010
Figure 11. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on displacement by adopting EN.
Figure 11. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on displacement by adopting EN.
Electronics 10 03073 g011
Figure 12. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on displacement by adopting the DTW algorithm.
Figure 12. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on displacement by adopting the DTW algorithm.
Electronics 10 03073 g012
Figure 13. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on velocity by adopting the EN.
Figure 13. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on velocity by adopting the EN.
Electronics 10 03073 g013
Figure 14. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on velocity by adopting the DTW algorithm.
Figure 14. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on velocity by adopting the DTW algorithm.
Electronics 10 03073 g014
Figure 15. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on acceleration by adopting the EN.
Figure 15. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on acceleration by adopting the EN.
Electronics 10 03073 g015
Figure 16. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on acceleration by adopting the DTW algorithm.
Figure 16. Comparison between the experimental law of motion (light blue) and modified trapezoidal laws for each phase (with equal coefficients values) after identification based on acceleration by adopting the DTW algorithm.
Electronics 10 03073 g016
Table 1. Values of the main parameters for the law of motion of the simulated scenario.
Table 1. Values of the main parameters for the law of motion of the simulated scenario.
ParameterValue
Constraints λ = { t A = 0.0 s ,   s A = 0.0 rad ,   v A = 0.2 rad / s , a A = 1.4 rad / s 2 ,
t B = 1.0 s ,   s B = 1.0 rad ,   v B = 0.5 rad / s , a B = 1.2 rad / s 2 }
Normalized coefficients c s r c = { 0.0645 , 0.129 ,   0.1935 ,   0.0968 ,   0.2581 ,   0.2258 ,   0.0323 }
Number of sampled points300
Table 2. Genetic algorithm intrinsic parameters’ chosen values.
Table 2. Genetic algorithm intrinsic parameters’ chosen values.
ParameterChosen Value
Number of genes for each individual7
Number of individuals per generation100
Probability of cross-over application0.85
Inversion application probability0.1
Probability of application of mutation around the range0.1
Percentage of initial range mutation10%
Mutation range reduction75% each 50 generations
Table 3. Coefficients’ values of the laws of motion of the modified trapezoidal class used as the original law of motion.
Table 3. Coefficients’ values of the laws of motion of the modified trapezoidal class used as the original law of motion.
IDOriginal Law of Motion c 1 c 2 c 3 c 4 c 5 c 6 c 7
L1Modified Sinusoidal 0.12500.375000.375000.1250
L2Constant Acceleration 00.50000000.50000
L3Trimmed Constant Acceleration00.250000.500000.25000
L4Cubic000.50000.50000
L5Trapezoidal0.12500.25000.125000.12500.25000.1250
L6Modified Trapezoidal 0.12500.12500.12500.12500.12500.12500.1250
L7Trimmed Trapezoidal0.06250.12500.06250.50000.06250.12500.0625
L8Cycloidal0.250000.250000.25000.2500
L9Asymmetric Trapezoidal0.05000.20000.050000.0500.60000.0500
Table 4. Identified coefficients’ values (dimensionless) and errors in the simulated cases with laws of motion of the modified trapezoidal class used as the original law of motion. (The method column refers to the method used to calculate the objective function.)
Table 4. Identified coefficients’ values (dimensionless) and errors in the simulated cases with laws of motion of the modified trapezoidal class used as the original law of motion. (The method column refers to the method used to calculate the objective function.)
IDKinematic
Quantity
Method c 1 c 2 c 3 c 4 c 5 c 6 c 7 Max. Error
L1AccelerationEN0.12180.01590.35980.00300.35980.01690.12260.0169
DTW0.12400.01010.36170.00730.36830.00330.12500.0133
VelocityEN0.12460.02120.35130.00910.35210.00790.13350.0236
DTW0.09920.11310.26460.04640.26460.11180.10010.1131
L2AccelerationEN2.0 × 10−80.50000000.50006.7 × 10−86.7 × 10−8
DTW00.50001.3 × 10−91.5 × 10−91.3 × 10−10.500001.5 × 10−9
VelocityEN0.00070.49220.00635.5 × 10−90.01000.490700.01000
DTW0.01130.43020.053600.06290.43020.01160.0697
L3AccelerationEN2.5 × 10−50.249900.50000.00300.24300.00390.0065
DTW7.3 × 10−50.25065.8 × 10−50.46660.08890.18990.00380.0889
VelocityEN0.00200.20320.06820.46790.024100.23450.00010.0682
DTW0.01910.10000.18420.40200.14400.14800.00260.1841
L4AccelerationEN00.00030.49970.00020.49780.00181.4 × 10−80.0021
DTW2.3 × 10−102.9 × 10−90.51.1 × 10100.501.8 × 10−92.9 × 10−9
VelocityEN6.8 × 10−800.50020.00180.48360.01390.00030.0163
DTW0.00190.08520.39100.04710.39220.08251.2 × 1050.1090
L5AccelerationEN0.12530.24940.125400.12460.25050.12480.0006
DTW0.12500.24380.134800.11480.25650.120.0101
VelocityEN0.12440.25280.12188.6 × 10−50.12900.24650.12560.0039
DTW0.14140.21590.14320.00260.13030.22640.14020.0341
L6AccelerationEN0.12540.12400.12580.24980.12510.12480.12510.0010
DTW0.12500.12510.12490.24510.1380.11690.1250.0130
VelocityEN0.12370.12970.12050.24740.13920.11130.12830.0141
DTW0.14600.07090.16360.25110.08710.17470.10650.0540
L7AccelerationEN0.06280.12400.06330.49980.06250.12460.06280.0009
DTW0.06250.12490.06250.49520.07530.11690.06250.0128
VelocityEN0.06690.10080.09040.48700.07830.11150.06480.0278
DTW0.06190.13050.05560.51270.01760.17430.04780.0493
L8AccelerationEN0.24960.00100.24920.00050.24790.00290.24880.0029
DTW0.24860.01020.23640.00930.23870.00760.24920.0136
VelocityEN0.24090.03350.21570.01940.21650.03350.24040.0342
DTW0.21690.06840.21250.01390.18290.08930.21590.0893
L9AccelerationEN0.04970.20080.049300.05080.59870.05050.0012
DTW0.05000.21360.024600.10990.54600.05590.0598
VelocityEN0.04950.23220.00021.8 × 10−80.10750.55700.05340.0575
DTW0.04980.22730.00018.8 × 10−80.16660.49300.06300.1166
Table 5. Final values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the simulated cases with law L7 as the original law of motion, with and without noise, and identification based on displacement, velocity and acceleration.
Table 5. Final values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the simulated cases with law L7 as the original law of motion, with and without noise, and identification based on displacement, velocity and acceleration.
QuantityMethodErrorNoiseErr_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
DisplacementENENNo0.01390.25427.5341
DTWNo0.10361.266363.030
DTWENNo0.02580.407812.022
DTWNo0.07262.4829106.91
DisplacementENENYes0.00650.181621.771
DTWYes0.07101.1354294.62
DTWENYes0.02910.426423.191
DTWYes0.07772.6604330.20
VelocityENENNo0.00250.00542.8170
DTWNo0.03490.056216.730
DTWENNo0.00730.12825.5620
DTWNo0.05480.388431.030
VelocityENENYes0.00450.066620.530
DTWYes0.06680.6859284.00
DTWENYes0.01190.150522.270
DTWYes0.12720.7712292.20
AccelerationENENNo0.00040.00360.1068
DTWNo0.00600.04771.0890
DTWENNo0.00260.02541.2838
DTWNo0.03200.15722.2197
AccelerationENENYes0.01630.085321.103
DTWYes0.22781.0417291.66
DTWENYes0.04000.224020.877
DTWYes0.21842.1890283.13
Table 6. Initial values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the simulated cases with laws of motion of the polynomial class used as the original law of motion.
Table 6. Initial values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the simulated cases with laws of motion of the polynomial class used as the original law of motion.
ErrorPolynomial 3-3Polynomial 4-4Polynomial 5-5
Err_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
Err_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
Err_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
EN0.08280.764511.910.48863.64635.320.7846.01158.23
DTW0.3466.609125.76.09848.69533.02610.1982.64875.06
Table 7. Final values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the simulated cases with laws of motion of the polynomial class used as the original law of motion.
Table 7. Final values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the simulated cases with laws of motion of the polynomial class used as the original law of motion.
Kinematic QuantityMethodErrorPolynomial 3-3Polynomial 4-4Polynomial 5-5
Err_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
Err_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
Err_s
[Rad]
Err_v
[Rad/s]
Err_a
[Rad/s2]
Disp.ENEN0.0100.2737.6190.05670.81522.0400.1912.06045.940
DTW0.1422.28884.200.5228.242269.52.02025.800560.300
DTWEN0.0620.63210.710.0751.01519.2500.1942.07746.230
DTW0.1165.188107.90.49812.24236.6002.02025.90563.900
VelocityENEN0.0040.0862.6420.7470.68213.2200.2251.81729.700
DTW0.0591.05725.900.6806.645171.8002.43822.590412.500
DTWEN0.0130.1914.0200.0750.69911.3300.2161.84430.520
DTW0.1320.78745.420.6496.422149.300 2.29022.200329.900
Accel.ENEN0.0070.0641.3880.1120.8089.4230.2882.13722.680
DTW0.1090.65011.811.0268.956112.9003.25028.810302.500
DTWEN0.0150.1041.5400.1140.8229.2170.2952.18729.410
DTW0.1950.7708.7801.0519.217111.3003.33022.750298.600
Table 8. Constraints’ values for each phase of the considered actual case.
Table 8. Constraints’ values for each phase of the considered actual case.
Phase NameConstraint Vector α A
[Deg]
a B
[Deg]
s A
[Deg]
s B
[Deg]
v A
[Deg/Deg]
v B
[Deg/Deg]
a A
[Deg/Deg2]
a B
[Deg/Deg2]
Phase I λ I 115.0210.0−2.500020.38000.00.00.00.0
Phase II λ I I 210.0300.020.3800−4.2700−0.00280.01830.00.0060
Phase III λ I I I 300.0360.0−4.2700−2.5000.00.00.00600.0
Table 9. Final values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the actual cases after an identification based on velocity.
Table 9. Final values of the Euclidean norm and DTW algorithm on displacement, velocity and acceleration, in the actual cases after an identification based on velocity.
QuantityMethodErrorPhase IPhase IIPhase III
Err_s
[Deg]
Err_v
[Deg/ Deg]
Err_a
[Deg/ Deg2]
Err_s
[Deg]
Err_v
[Deg/ Deg]
Err_a
[Deg/ Deg2]
Err_s
[Deg]
Err_v
[Deg/ Deg]
Err_a
[Deg/ Deg2]
NoneEN7.0830.5900.18717.6001.0901.3702.8680.2210.169
DTW77.5007.3932.551193.30014.0207.31036.0603.1862.080
ENEN0.3640.1300.1781.9770.5451.3900.1040.0570.167
DisplacementDTW4.6621.1812.44618.2703.9627.0760.764 0.6832.007
DTWEN0.4900.1270.1781.8110.5991.3920.1200.0620.172
DTW3.2501.1112.45011.0605.1377.1710.7600.7572.148
ENEN1.5870.0800.1764.2200.5121.3890.2190.0520.167
VelocityDTW3.6010.7342.42040.0203.3997.0171.4040.6262.085
DTWEN2.1320.0700.1762.8700.5201.3890.2100.0520.167
DTW7.8350.5922.4224.8403.1306.9801.2760.6212.000
Accel.ENEN1.1650.0760.1764.0590.5201.3891.0680.0770.166
DTW8.1890.6722.41438.0303.4586.98413.4100.9592.077
DTWEN2.4040.1220.1772.7790.5921.3891.6570.1470.167
DTW13.0931.0842.40621.1954.4586.95020.3802.0092.039
Table 10. Trapezoidal modified law identified coefficients (adimensional values) for each phase of the considered actual case.
Table 10. Trapezoidal modified law identified coefficients (adimensional values) for each phase of the considered actual case.
Phase NameCoefficient Vector c 1 c 2 c 3 c 4 c 5 c 6 c 7
Phase I c I 0.23860.05660.18670.01260.21210.00.2933
Phase II c I I 0.39170.05000.11950.02350.11990.13890.2065
Phase III c I I I 0.00270.06200.16910.08900.00280.00020.6740
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Tiboni, M.; Amici, C.; Bussola, R. Cam Mechanisms Reverse Engineering Based on Evolutionary Algorithms. Electronics 2021, 10, 3073. https://doi.org/10.3390/electronics10243073

AMA Style

Tiboni M, Amici C, Bussola R. Cam Mechanisms Reverse Engineering Based on Evolutionary Algorithms. Electronics. 2021; 10(24):3073. https://doi.org/10.3390/electronics10243073

Chicago/Turabian Style

Tiboni, Monica, Cinzia Amici, and Roberto Bussola. 2021. "Cam Mechanisms Reverse Engineering Based on Evolutionary Algorithms" Electronics 10, no. 24: 3073. https://doi.org/10.3390/electronics10243073

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop