Figures
Abstract
The article presents a novel strategy for reducing the geometric error of a vehicle headlamp equipped with a set of calibration screws, which represents a product assembly. Using a general method for designing and implementing a digital twin, we determined the optimal configuration for a compensatory element that minimizes the total geometric error. Formulated as a problem of constrained minimization, we solved the error using the gradient method and the Broyden–Fletcher–Goldfarb–Shanno method. Products are automatically adjusted according to this optimal setting during the manufacturing process. The results of this novel method indicate that all points can be aligned when the non-individual calibration satifies a geometrical specification of 92%. The digital twin approach was compared to the manufacturing process on 84,055 samples. Overall, 98.19% of the samples were perfectly aligned.
Citation: Konecny J, Bailova M, Beremlijski P, Prauzek M, Martinek R (2023) Adjusting products with compensatory elements using a digital twin: Model and methodology. PLoS ONE 18(1): e0279988. https://doi.org/10.1371/journal.pone.0279988
Editor: Roberto Barrio, University of Zaragoza, SPAIN
Received: December 3, 2021; Accepted: December 19, 2022; Published: January 3, 2023
Copyright: © 2023 Konecny et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: All relevant data are within the manuscript and its Supporting information files.
Funding: This work was supported by the European Regional Development Fund at the Research Centre of Advanced Mechatronic Systems project, project number CZ.02.1.01/0.0/0.0/16_019/0000867 under Operational Programme Research, Development and Education. This work was also supported by project SP2021/29, "Development of Algorithms and Systems for Control, Measurement and Safety Applications VII" of Student Grant System, VSB-TU Ostrava and SP2020/114 of Student Grant System, VSB-TU Ostrava. This work has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement N°856670. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.
Introduction
As industrial fields diversify and emerge, customers are placing greater demands on producers to continually improve manufacturing processes [1]. Improving manufacturing today requires significant transformation in many processes and the application of new and modern strategies, for example the conceptual changes delivered by Industry 4.0. The article describes a novel process for adjusting calibration screws in a vehicle headlamp. The target product is protected under a Non-Disclosure Agreement, therefore the paper describes a headlamp model with general parameters only instead of the specified headlamp model. All the experiments presented in this paper applied a general kinematic model to suitably illustrate the calibration method.
The target product has a defined set of testing points on its surface. These are used to verify whether the customer’s requirements for accuracy are satisfied. Equipped with compensating elements in the form of calibration screws, the product allows minor adjustments to its fixing. During production, the calibration screws must be set so that the resulting geometric error at the testing points is minimized.
In the traditional approach, one produced part per day is taken from a production line and precision adjusted manually by an operator with a screwdriver and measured with a coordinate measuring machine (CMM). The same setting for the calibration screws is then applied to every part manufactured on that day, and consequently the geometric error in each part, in theory, is identical. Quality control applies a statistical process control (SPC) method to calculate the process capability index, which is a statistical measurement that represents the ability to make a product within the specification tolerances (see [2]). The traditional method for calibrating the product is time-consuming, and the calibration screws could also not always be set individually.
The main contributions in this paper are as follows:
- A novel method for automatically adjusting the compensatory elements of individual headlamps directly in the manufacturing process.
- A practical configuration for a digital twin to geometrically calibrate assemblies that use adjustable compensatory elements measured directly for accuracy.
- A comparison of two optimization algorithms (gradient method and Broyden–Fletcher–Goldfarb–Shanno) used on the digital twin.
The challenges inherent in obtaining optimal adjustments calls for the use of a digital twin and to simulate the adjustment process virtually for specific calibration screw settings. This approach allows minimization of the locally Lipschitz continuous composite cost function, which in our case is continuously differentiable and subject to inequality constraints. For this purpose, we can use a method suitable for smooth, unconstrained optimization, for example first-order or second-order methods, where the inequality constraints are subject to a quadratic penalty. The solution proposed in this paper applied the gradient method (first-order method) and Broyden–Fletcher–Goldfarb–Shanno (BFGS) algorithm (second-order method) [3–7].
Fig 1 shows a block diagram of the optimal adjustment procedure using a digital twin. First, an assembled part is measured during the manufacturing process, and then the set of measured points is transferred to a digital twin to simulate the actual geometric parameters. An optimization algorithm then estimates the calibration screw settings and transfers this information to the digital twin. The digital twin thus enables virtual adjustment and calculates the position of the control points, which are subsequently passed to a cost function.
In this case, the cost function consists of two separate functions: inner and outer. The inner function is formulated as an implicit nonlinear vector function that describes the product’s kinematic model. This implicit function assigns the testing point locations to the arbitrary locations of the calibration screws
. The outer function is a sum of two functions: the first function evaluates the quality of the adjustment to the product, the second is a quadratic penalty function which penalizes any violation of inequality constraints. The inequality constraints ensure that the set of prescribed limits (tolerances) for testing point locations is not exceeded.
To solve the optimization problem, we applied the gradient method and BFGS algorithm. The optimization algorithm provides a calibration screw setting for the minimum total geometric error and transfers it to the production line. The product is subsequently adjusted according this optimal setting with electronic screwdrivers.
The remainder of the paper is organized as follows. Related works provides an overview of the state of the art. In Methods, we mathematically describe the gradient method, BGFS algorithm and quadratic penalty method. The Models section presents the mass, digital twin and optimization models. Experiment describes the experimental procedure. In Results, we report the experimental results, followed by a discussion of these results in the Discussion section. Finally, we assess the paper’s body of knowledge and outline options for future work in the Conclusion.
Related works
Most automotive parts are manufactured on production lines. Generally, they should be manufactured very precisely according to a geometrical specification to facilitate the assembly process. To fulfil quality control standards [8], all products or selected samples must be measured. The most accurate measurements are done with a CMM [9]. Unfortunately, these machines have several limitations, such as limited dimension range and a long measurement cycle [10]. Especially Considering the long measurement cycle, CMMs are especially unsuitable for checking all aspects on a part. A promising method for measuring parts is inline measurement [11], performed directly on the production line.
Quality control checks apply the Geometrical Product Specifications (GPS) defined by the International Organization for Standardization (ISO). GPS provides the exact definitions for the geometry of components in a product so that producing technical drawings, programming measurement instruments, and estimating measurement uncertainties are unambiguous. GPS characterizes the duality principle by defining the non-ideal surface model of a work piece and defining the verification model according to the verification process executed by the person who inspects the manufactured work piece [12]. The difference between the models indicates a measurement uncertainty [13].
Quality control itself does not increase the manufacturing precision, it only estimates a total geometric error. Research challenges lie in improving production processes for more precise manufacturing. Several options are available generally to increase product precision according to GPS. The first option is to calibrate a production line and its robot manipulators using a CMM and the method presented in [14]. Another option for calibrating robot manipulators is using af laser tracker [15]. This method is suitable for a machine tool which can be modelled as serial manipulator with individual axes behaving as rigid bodies with six degrees of freedom.
The second option is to equip a product with compensating elements such as adjustment screws. This allows the adjustment of fixing points in assembled parts to reduce geometric error. Compensating elements such as these are provided by the Böllhof company [16]. Using special mechanical fixing screws, Böllhoff’s Flexitol solution permits manual and automated infinitely variable tolerance compensation.
The modern approach to maintaining individual production is a digital twin [17]. The term digital twin has gained popularity recently in academic and industrial circles [18]. A digital twin is a set of virtual information constructs which fully describe the possible or actual physical manufactured product from the micro-atomic level to the macro-geometric level [19, 20]. At its optimum, any information that could be obtained by inspecting a physically manufactured product can be derived from its digital twin [19]. In the study presented here, the principle of a digital twin was used to obtain the highest geometric quality for the self-adjusting smart assembly line described in [21].
Table 1 summarizes the works related to the proposed solution. The literature review suggests that the commonly applied approach is calibration of the production line using robot manipulators to achieve higher quality products. Interestingly, quality control is never discussed in any of the reviewed literature. The proposed solution uses Böllhoff Flexitol fixing screws [16] to adjust the fixing points in a product and thereby decrease the total geometric error. Inline measurement allows each part to be measured, a procedure which has a significant impact on the Process Capability Index [25]. Instead of using SPC, the Process Capability Index can be evaluated with each part.
Methods
This section investigates the following type of unconstrained problem:
(1)
where
is a continuously differentiable function in Ω.
Let us apply the following notation: xT denotes the transpose of the column vector x and E denotes the identity matrix.
To solve the problem (1), we introduce two iterative optimization algorithms, starting with the gradient method, which represents a first-order method, then a second-order method called the Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm. Both methods need a value of f and a gradient of f at every given point x.
Gradient method
First, let us attempt to solve the problem (1) using a descent direction to reduce the value of f.
The gradient method is a special variant of the descent direction method based on the observation that f decreases the quickest if we follow the direction of the opposite gradient. For more detailed information about the method, see [3, 4]. The method is still widely used across many scientific disciplines, see for example [26, 27].
We start with an initial guess x0. The algorithm produces a sequence of iterations x1, x2, …. In every iteration xk, the algorithm evaluates ∇f(xk) and finds the descent direction , in the following manner:
(2)
A new iteration is acquired by moving xk in the direction d, i.e.
(3)
The algorithm continues searching until ‖xk+1 − xk‖ ≤ ε, where ε is a given precision.
The pseudocode of the gradient method is described in Algorithm 1.
Algorithm 1: Gradient method f, x0
1: take , set
, k = 0
2: while ‖∇f(xk)‖ ≥ ε do
3: take t* > 0 {we consider t* that guarantees the reduction of f}
4: xk+1 = xk + t*dk
5:
6: k = k + 1
7: end while
8: set x = xk
To find the optimal step length t*, we use the descent direction and compute a local minimum of f in the direction d, where
(4)
For practical computation, it is easier to turn (4) into a constrained problem:
where tmax is sufficiently large.
For the one-dimensional constrained optimization of f with respect to t, we use the Golden Section method (see [3]).
BFGS algorithm
The Broyden-Fletcher-Goldfarb-Shanno (BFGS) algorithm introduced here is based on Newton’s method. It is a second order method using a quadratic model of f in the neighbourhood of xk, i.e.
(5)
We want to find a minimum of mk, i.e. find x as a stationary point of mk,
which means
(6)
The stationary point is labelled xk+1. From (6), we obtain an expression of Newton’s iteration
(7)
where
is the Hessian of f. We can denote
Moreover, if the Hessian is a positive definite matrix, i.e.
and ∇f(xk) ≠ 0, it is true that dk is a descent direction of f.
The BFGS algorithm is introduced here is a method which uses Newton’s step. In contrast to Newton’s method, the Hessian is approximated using the results of the previous iterations, known as a Quasi-Newton’s method. A detailed introduction of the method can be found in [4, 7]. Even today, the algorithm is used in many scientific fields, see for example [28, 29].
The approximation Hk of the Hessian ∇2f(xk) is computed as follows:
(8)
where y = xk − xk−1 and s = ∇f(xk) − ∇f(xk−1). The pseudocode of the BFGS algorithm is described in Algorithm 2.
Algorithm 2: BFGS f, x0
1: take ε > 0,
2: set H0 = E, k = 1
3: while ‖∇f(xk)‖ ≥ ε do
4: xk = xk−1 − (Hk−1)−1gk−1
5: y = xk − xk−1
6: s = ∇f(xk) − ∇f(xk−1)
7: if yTs > 0 then {if the Hessian is positive definite}
8:
9: else
10: Hk = Hk−1
11: end if
12: k = k + 1
13: end while
14: set x = xk
Quadratic penalty method
For the purposes here, we need to minimize f(x) subject to inequality constraints. We solve the following constrained problem:
(9)
where f and g are continuously differentiable. To apply the algorithms introduced above, we need to approximate our constrained problem (9) with an unconstrained problem. We apply a Quadratic Penalty method to approximate the original solution with a solution to the following:
(10)
For large ρ, the approximate solution cannot be far from the solution of the original problem. Furthermore, for ρ → ∞, the solution of (10) is also a solution of (9).
Models
This section introduces a mathematical model for the digital twin and describes the mass, kinematic model and optimization models in detail.
To indicate points, we use capital letters and two types of index. The upper index refers to the index of the point, the lower index represents the coordinate. The vector which describes the positions of the calibration screws is denoted .
Mass
Headlamps must fulfil GPS and consist of a housing and glass glued together. Gluing is a possible source of imprecision if the glass is inaccurately positioned. To check the quality, we measure the the geometric dimensions. The product’s specification defines a set of test points and vectors. Each vector of the set defines the direction of a measuring sensor.
The specification also defines the constraint points fixed to or supported in the product. The set of test points and vectors and set of constrained points provide the basis for the digital twin. In this study, we define the following types of fixing:
- Calibration screw—this fixation type has three degrees of rotational freedom. It can be adjusted (and fixed) along a specific vector, and the remaining perpendicular directions provide the next two degrees of freedom.
- Spike—this fixation type has three degrees of rotational freedom and another degree of freedom in a specific vector (straight line). The spike is a point to line constraint.
- Ball bearing—this fixation has only three degrees of rotational freedom. Other movements are not possible.
- A propped point—this fixation type has three degrees of rotational freedom. Movement is restricted to a plane, or specifically, the propped point slides along a plane surface.
Digital twin
The following section mathematically describes the constraint points. Using a digital twin, we simulated kinematic behavior. The digital twin allows adjustment of the the screws in virtual space and substitutes an approach involving a complicated procedure by an operator who attempts to find an optimal calibration screw setting with a screwdriver and CMM. This section describes the mathematical formulation of the kinematic model which represents the digital twin.
The main idea behind this approach is the assumption that a headlamp is a rigid body and that if we consider the distances between pairs of points and other aspects given by the constraint points, we can obtain a system of equations to describe the object.
We assume that the distances remain constant. For a given representing the position of the calibration screws, we can compute the shift δ at all test points as a solution of a system of nonlinear equations. The system is represented by the following expression:
where F is a vector function,
.
For the small values of that we are interested in, the system F is nearly linear. We can therefore obtain an approximation of δ in
as a solution of
where JF is a Jacobian matrix of F with respect to δ, i.e.
Furthermore, we can take δ0 = 0 and obtain
(11)
Let us now describe mathematically the constraint and the test point shifts and specify the elements of δ.
- Calibration screw S—in general, S is screwed in a direction parallel to one of the axes. Movement in the other two coordinates is free. For example, if we decide to screw in the z direction, the location of S after transformation is described as
- Spike T—this type of point shifts only in the prescribed direction
. The position after transformation is described as
- Ball bearing (or fixed point) K—this type of point has no degrees of freedom, and its position after transformation remains the same
- Propped point Pd—this point must belong to a plane ρ defined by a given normal vector
. For (Pd)′ ∈ τ, it must be true that
where
- Test point Pi—the point has generally no defined limits in terms of shift or rotation. Its position after transformation is described as
The test point positions and the shifts δi play a key role in the optimization problem introduced in this article.
Optimization model
The aim of the method is to find the optimal configuration of the calibration screws S1, S2, …, where the distances between test points Pi and their prescribed locations are minimal. Regarding the technical aspects, we cannot use the Euclidean norm to compute
and must develop a more complex method.
For each test point, we have a sensor B with an approach vector . The point B and vector
determine the line p.
We construct a plane ρ perpendicular to p containing the point Pi and find the point as an intersection of p and ρ. We then define the desired distance as
This is illustrated in Fig 2.
We solve the following constrained optimization problem
(12)
with the set of constraints related to the distances
,
where
is a vector describing the shift of the point Pi depending on
, and wi represents the weight of Pi. In other words, the value wi indicates the importance of aligning Pi near the ideal position. Let us specify that our task is to solve the problem of quadratic programming with nonlinear inequality constraints.
We apply the Quadratic Penalty method introduced above and transform (12) into an unconstrained problem
(13)
where
This type of problem can be solved using either of the optimization methods introduced above. Considering the properties of the cost function, it can also be shown that the gradient method converges linearly to the minimum. The convergence of the BFGS algorithm is superlinear.
Experiment
In this section, we provide an example of a design for a digital twin and formulate the kinematic model of a headlamp and application of the optimization algorithm.
Data
For the numerical experiments, we considered a model with the following specification:
- Two calibration screws S1 and S2—both are screwed in the z direction, while movement in the other directions is free.
- A spike T—this point shifts only in the direction defined by a vector
.
- Two propped points Pd1 and Pd2—both points must remain in the given planes defined by normals
and
.
- The headlamp does not contain any ball bearings.
We also considered the set of test points Pi, i ∈ {1, …n} that we would like to align to an optimal position.
If we consider all the model’s properties, we obtain a vector of unknowns:
(14)
where the first 11 elements relate to shifts in the constraint points and the remaining 3n elements describe the transformation of the test points needed to evaluate the cost function. It must be true that the distance between each pair of points remains constant.
For a given , let us formulate the system of equations which define our kinematic model. First, we take into account the distances between the test points and constraint points; a prime symbol denotes the points after transformation. We thus obtain n equations in the following form:
(15)
The previous equations can be modified to
(16)
Consequently, we can focus on a combination of test points and both calibration screws and obtain another 2n equations:
(17)
(18)
The last coordinate of Si is equal to si, which is given.
The propped points belong to given planes and are described by the following two equations:
(19)
(20)
The points must also be a constant distance from the spike and both calibration screws. Therefore,
(21)
(22)
and we obtain another 8 equations. The final three equations reflect the distances between pairs of constraint points.
(23)
(24)
We can rewrite Eqs (17)–(24) in the same manner as Eq (15).
Finally, we obtain a system of equations that can be written as
(25)
where
, q = 3n + 11 is a vector function. Each component of this function is defined from Eqs (15), (17)–(24) (e.g., the first component of the vector function F is defined by the left side of Eq (16)). As mentioned above, we exploit the system’s approximately linearity for small values of s1, s2 and compute δ from
(26)
where J is a matrix of the first derivatives of F with respect to all variables in δ.
Gradient and BFGS method
The methods introduced here are designed for unconstrained optimization. For each given vector , we need to evaluate the cost function (13) and compute the gradient.
The gradient can be computed as follows:
(27)
where
(28)
The elements of ∇g can be calculated in the following manner:
(29)
Now we compute and
. Returning to (26) and modifying the equation, we obtain
(30)
If we first differentiate both sides of (30) with respect to s1, we obtain
After a slight modification, we obtain
Consequently, we can differentiate (30) with respect to the other variable
and express
:
Simple model example
Let us now illustrate the previous relationship which describes the kinematic model of the headlamp and application of the optimization algorithms on a simple model. The model in this example contains only one calibration screw S, one spike T, one propped point Pd, and one test point P and its prescribed location Pprec.
The specification in the given model is as follows:
- Calibration screw S = [0, 0, 0]—screwed only in the z direction, while movement in other directions is fixed.
- Spike T = [1, 0, 0]—the point shifts only in the direction
.
- Propped point Pd = [−1, 0, 1]—the point must remain in the plane ρ defined by normal nρ = [−1, 0, 0], the movement in the x direction is fixed.
- Test point P = [0, 0, 1], which we want to adjust to the optimal position Pprec = [0, 0, 2].
The model is illustrated in Fig 3.
For this simple model, we obtain the following vector of unknowns:
(31)
where the first three unknowns relate to shifts of the constraint points, and the remaining three unknowns describe the transformation of the test point we need for evaluating the cost function.
Let us now describe the kinematic model for this example, obtained in the same manner as the system of Eq (25).
We formulate the system of equations for the model (a prime symbol denotes the points after transformation)
(32)
(33)
(34)
(35)
(36)
(37)
Finally, we obtain a system of equations that can be written as
(38)
where
, q = 6 is a vector function. Each component of this function is defined by the left side of Eqs (32)–(37). Eq (38) is solved using the expression in (26).
Now let us consider the optimization problem describing the calibration of screws during headlamp adjustment. For simplicity, in this example, we do not require a given tolerance to be satisfied for the test point P, i.e., we consider only the unconstrained optimization problem.
For this example, we obtain the following optimization problem:
(39)
The analytical solution to the problem is .
Algorithm 3: Description of the calibration procedure
1: A headlamp is placed onto a mounting stand by an operator.
2: A shelf with a stand is transferred to a calibration area.
3: Robotic arms and tactile sensors perform precise measurement.
4: The digital twin calculates optimal calibration screw settings.
5: Automated screwdrivers set the target screw settings.
6: A protocol with estimated tolerances is stored in the database.
An iteration of the optimization method for headlamp adjustment is explained schematically in Fig 4. Algorithm 3 indicates the entire procedure for the calibration process of one headlamp on a deployed machine.
Results
For the numerical experiments, let us consider the headlamp introduced in the previous section, with two calibration screws S1 and S2, two propped points, one spike, and 25 test points. Both S1 and S2 can only be screwed in the z direction. At every test point, we are given a tolerance, i.e. a maximum permitted distance from the prescribed position. Note that the distance is measured in the ‖.‖B norm defined above. Fig 5 shows a sketch of the model. The test points we want to align to the prescribed positions are indicated with blue dots, the constraint points are indicated with red stars.
We simulated real situations and applied both algorithms. By computing the configuration of the calibration screws, a headlamp model can be placed in the desired position to allow evaluation of the distances between the test points and their prescribed positions. All the test point tolerances and shifts are small in relation to the product’s size, guaranteeing that the values of s1 and s2 remain sufficiently small.
Starting with an ideal headlamp model, all points are located exactly in the prescribed positions. For any given movement in the calibration screws , the headlamp model is transformed according to the kinematic model. The optimization algorithm is then applied to move it back into the original position. This type of simulation guarantees that none of the model’s mathematical conditions are violated and provides an excellent opportunity to study the behaviours of the algorithms. It also provides an easy way to verify the output of the algorithm.
We then applied the same conditions as in the previous simulation, but after transformation, slightly adjusted the test points using shifts. This procedure simulated an imperfect manufacturing process or glass imprecisely glued to the housing.
The final simulation modelled an ideal headlamp and moved it into an initial position. Unlike the previous simulation, the product was transformed using general shifts and rotations. The optimization algorithm then calculated an optimal position.
The combination of the previous two approaches reflects the real conditions of a headlamp not having an ideal shape.
All experiments were solved with the starting point and a stopping point: the ideal headlamp was adjusted using general transformations and a stopping point of ε = 10−6; the real headlamp was adjusted according to the kinematic model and a stopping point of ε = 10−3; the ideal headlamp was adjusted using a penalty coefficient ρ = 1012 and a stopping point of ε = 10−2. These parameters were tuned according to the type of adjustment. These stopping point values are sufficient due to the accuracy achieved in the calibration screw settings by the industrial robot performing the adjustment.
Ideal headlamp adjusted according to the kinematic model
For the numerical experiment, we set and transformed all points according to (11). The aim was to determine the screw settings that aligned the model into an ideal position.
We then applied both algorithms and compared the results. The gradient method produced the output , and the BFGS algorithm returned the vector
.
With a precision set to 10−6 in both algorithms, the number of decimal places was raised accordingly. Both results corresponded to the expected solution.
We are interested in comparing the distances between the test points and their prescribed positions before and after adjustment. Fig 6 compares the ‖.‖B norm with the given tolerance, which is indicated by a red line. Some points in the initial position fell outside the given tolerance. By contrast, after optimization, the headlamp fully satisfied the specified conditions, and distances were reduced significantly. Namely, the mean of the distance before adjustment was 1.91⋅10−1, and the mean of the final distance was 3.50⋅10−3. The value of the cost function at the beginning of the optimization was 4.34. Both algorithms reduced the value to 8.01⋅10−4.
We are also interested in the performance of the algorithms. Fig 7 indicates that the gradient method needed significantly fewer iterations to reduce the cost function. However, the Golden Section method applied in this algorithm is more time-consuming.
The results in Table 2 give us a better idea of the behaviour of the algorithms and various configurations for the calibration screws.
Real headlamp adjusted according to the kinematic model
In this case, again and all points were transformed according to (11). We then slightly deformed the test points, resulting in the initial model that we want to adjust and return to the prescribed position.
First, imprecise manufacturing was simulated by adding noise to all test points. Initially, several points fell outside the given tolerance, but after optimization, all points were completely within tolerance. The mean of the distance before adjustment was 1.92 ⋅ 10−1, and the mean of the final distance was 1.33 ⋅ 10−2. The value of the cost function was reduced from 4.33 to 1.39 ⋅ 10−2.
The next experiment simulated an error created by imprecision in the gluing process. For this simulation, we adjusted all points located on the glass 0.01 mm in the z direction. This adjustment caused several points to fall outside the given tolerance, but after optimization all test points completely satisfied the tolerance. The mean of the distance before adjustment was 1.92 ⋅ 10−1, and the mean of the final distance was 9.40 ⋅ 10−3. The value of the cost function was reduced from 4.36 to 5.57 ⋅ 10−3.
Fig 8 indicates the distances ‖.‖B before and after transformation in relation to the given tolerance, shown as a red line for both of the experiments above. Since the given tolerance for each test point was different, we scaled all tolerances to one and scaled the distances in the same manner. We observed a significant reduction in the distance of the test points from their prescribed positions after adjustment.
Ideal headlamp adjusted using general transformations
In this case, an ideal headlamp was modified with general shifts and rotations. This approach reflects practical situations more realistically and tested the robustness of the algorithms.
First, a rotation of 10−2π on the x axis was applied. The aim is to find a position for the calibration screws which compensates the rotation. The mean of the distance before adjustment was 5.14⋅10−1, and the mean of the final distance was 2.55⋅10−1. The value of the cost function was reduced from 12.03 to 4.67.
Consequently, the rotation according to the y axis by 10−2π was applied. The mean of the distance before adjustment was 3.71⋅10−1, and the mean of the final distance was 2.15⋅10−1. The value of the cost function was reduced from 8.59 to 4.52.
We then rotated the model around the x and y axes by 10−2π. Fig 9 illustrates the effect of both rotations and the distances ‖.‖B. The mean of the distance before adjustment was 5.03⋅10−1, and the mean of the final distance was 2.52⋅10−1. The value of the cost function was reduced from 9.32 to 5.95.
The model is very sensitive to rotation and it is easy to violate the mathematical conditions. However, both algorithms were able to adjust all the test points within the given tolerance.
Let us now focus only on shift along the vector (0.3, 0.3, 0.5) mm. The mean of the distance before adjustment was 5.09⋅10−1, and the mean of the final distance was 3.61⋅10−1. The value of the cost function was reduced from 8.71 to 5.98.
Finally, we combine rotation and shift. We take both angles equal to and the vector (0.05, 0.05, 0.05) mm. The mean of the distance at the start was 5.09⋅10−1, and the mean of the final distance was 2.47⋅10−1. The value of the cost function was reduced from 9.41 to 4.95.
Fig 10 shows the distances ‖.‖B before and after the transformation in relation to the given tolerance, which is indicated with a red line for all five experiments above. Since the given tolerance for each test point was different, we scaled all tolerances to one and scaled the distances in the same manner. We observed a reduction in the distance of the test points from their prescribed positions after adjustment.
Comparison to manual calibration by an operator
The proposed method has been successfully applied to the production line of an automotive manufacturer. In this section, we compare the proposed method (individual calibration) to manual calibration by an operator (non-individual calibration).
In manual calibration, when production commences, the first headlamp produced is taken and precisely measured using a CMM. An operator then manually and expertly estimates the optimal calibration screw setting. All subsequent headlamps adjusted on the same day are considered as having the same geometry, shape, and initial position as the reference headlamp. The same calibration screw setting is therefore used for every product produced on that day. The calibration procedure itself is non-individual and done by the operator using an industrial robot.
The proposed method achieves a major improvement in the success rate of adjustment. It is able to respond to the changes in shape and position and adjust settings accordingly. A minor disadvantage is the additional time needed for measurement and the adjustment procedure. Each headlamp on the line is checked, measured and adjusted, and compared to manual adjustment, the positions of the calibration screws can be computed very precisely for each part.
The products are considered slightly deformed and adjusted along the vector t = (0.1, 0.1, 0.2). Using the optimization algorithm, the optimal position of the calibration screws is computed. To test the system, we used a set of 20 test samples with random noise added to each point and applied the vector t. To simulate the original method, all samples were adjusted according to the same calibration screw setting
. Table 3 shows the results for both approaches obtained by the computer simulation and the original position before adjustment. The reference product is highlighted in grey.
Fig 11 compares non-individual and individual calibration with non-calibrated samples. Headlamps with no calibration indicate the highest inaccuracies and only 56% are within tolerances. Non-individual calibration produced better results with 92% of samples within tolerances. All individually calibrated samples were within tolerances and obtained slightly smaller distances.
Comparison of digital twin with the manufacturing process
To evaluate the digital twin, we compared the predicted adjustment according to the digital twin and the results obtained from a practical run. The evaluation procedure differs from the manufacturing process in that a part is measured only once, specifically before calibration. This is due to the strict requirements in the machine cycle where post-calibration measurement cannot be performed. Fig 12 indicates the relative error between estimated tolerances according to the digital twin and experimental measurements by the CMM. Relative error relates to the maximum tolerance at each point, calculated as follows:
(40)
where
is the relative error,
is the tolerance estimated from the digital twin,
is the tolerance measured by the CMM, and
is the maximum tolerance permitted for a particular point. Fig 12 indicates that the relative error does not exceed 12%, which means, for example, all points with a tolerance of 1 mm have a maximum absolute error of 0.12 mm.
Table 4 gives a breakdown of the digital twin’s success in adjusting a specific headlamp type in a practical industrial scenario. The source data set were obtained from an industrial partner and represent the results of the digital twin calibration process performed directly on a manufacturing line. The dataset describes 84,055 fully measured headlamps before calibration and the number of points outside tolerances after calibration according to the digital twin.
Headlamps with no points outside tolerances satisfied the limits for accuracy. The remainder of the samples were separated according to the number of points outside tolerances: low (1–4), medium (5–10) and high (11–25).
From 84,055 fully calibrated samples, 98.19% and most of the remaining (1.59%) samples were produced with few inaccuracies. A breakdown is given for the input samples according to four inaccuracy levels. Input samples at the zero (0) level indicated no points outside tolerances, representing 14.39% of all production; these were adjusted simply to improve their geometrical properties. After calibration, almost all of these samples showed zero inaccuracies, only eight samples indicating a few points outside tolerances. Input samples at the next level (1–4) represented 53.77% of production and contained a small number of inaccuracies. After calibration, 98.61% of these samples showed no points outside tolerances. The majority of the remainder had few inaccuracies (low), and eight samples had slightly more (medium). At the next level (5–10), input samples represented 30.53% of production and contained significant numbers of inaccuracies. The calibration process improved these samples to 97.32% with no points outside tolerances. Input samples at the (high) level of inaccuracy represented a minor portion of production (1.31%); the calibration procedure in this case was able to fully calibrated 81.87% of samples.
Discussion
Several interesting topics can be discussed, the first being the optimization methods introduced in the article. The industrial partner required quick computation and high accuracy, and to investigate, we selected a first-order method (gradient method) and quasi-Newton method (BFGS algorithm). The experiments revealed that the BFGS algorithm is quicker than the gradient method.
Compared to the zero-order method, it is necessary to evaluate the gradient of the cost function. However, the proposed methods required significantly less time to find a solution. Theoretically, second-order methods converge even more quickly than quasi-Newton methods, but unfortunately, it is very difficult to compute the Hessian in every iteration.
Table 5 provides a general overview of the proposed approach compared to two state-of-the-art methods. Both of the state-of-the-art methods are more versatile than the proposed solution, however they permit only basic transformations (translation and rotation) and do not include any additional constraints. The proposed method can be applied to a specific product only, but it incorporates more complex transformations (with calibrations screws), includes constraint points, and allows a priority and limits to be set for each test point. Moreover, the proposed method has a guaranteed convergence and shorter computational time: computation speed was one of the industrial partner’s main requirements.
Finally, we outline possible future modifications to the proposed automated product adjustment and calibration screw method. Thus far, we have worked with the assumption that the product behaves as a rigid body and that no friction exists between the calibration screws and the product. We also regard the problem as static and independent of time. The adjustment process does not depend on the screwing sequence. In the future, it may be necessary to modify the kinematic model to describe a product as an elastic body. In this case, the kinematic model will require modification and use finite element methods.
Another possible modification is to consider the friction between the calibration screws and the product according to the Coulomb model of friction, for example. In this article, we neglected friction. If we consider friction, both the kinematic model and optimization algorithm would need to be redesigned since the cost function would no longer be continuously differentiable, only Lipschitz continuous. For this reason, a method which is suitable for minimizing a function that is not differentiable should be used. These types of method are called non-smooth methods; one of the most commonly applied is the bundle method. A detailed discussion about using the bundle method for this type of problem is in [31, 32]. It may also be necessary to model the adjustment process as dependent on time so that the correct screwing sequence is considered and maintained.
Conclusion
The article introduced a digital twin model for automated product adjustment using calibration screws. The automated product adjustment procedure was designed to find the optimal configuration for a set of calibration screws to minimize the distances between the test points and their prescribed positions and therefore eliminate geometric error. The proposed strategy consists of solving two sub-problems: the design of a digital twin for a headlamp and optimization using calibration screws.
We formulated an optimal product adjustment procedure for minimizing the locally Lipschitz continuous cost function, which in this case is continuously differentiable and subject to inequality constraints. To solve the optimization problem, we applied the gradient method and BFGS algorithm.
The body of knowledge presented in the article contains a novel strategy for precisely manufacturing headlamps using a digital twin. Headlamps are equipped with compensatory elements that can adjust the fixing points of the product. Before we applied the proposed automated adjustment method, only one headlamp per day was measured and adjusted manually by a machine operator. The remaining products were adjusted according to the same settings throughout the day by a machine. The main advantage of the proposed method is its ability to adjust each part with individual settings and thereby reduce production variability. Its second advantage is in process capability: the manufactured part is measured during the adjustment process, yielding final tolerances. This feature has an enormous impact on the Process Capability Index. Tolerances only need to meet the customer’s specification limits instead of the stricter tolerances applied in the SPC strategy.
The results showed that the novel method was able to align all headlamps, whereas non-individual calibration is able to aligns only 92% of parts. The digital twin method was applied to 84,055 headlamps samples, yielding successfully alignment by the calibration machine in 98.19% of samples.
References
- 1. Matsunaga F, Zytkowski V, Valle P, Deschamps F. Optimization of Energy Efficiency in Smart Manufacturing Through the Application of Cyber-Physical Systems and Industry 4.0 Technologies. Journal of Energy Resources Technology, Transactions of the ASME. 2022;144(10).
- 2. Godina R, Matias JCO. Statistical Process Control Accuracy Estimation of a Stamping Process in Automotive Industry. Lecture Notes in Mechanical Engineering. 2020; p. 48–60.
- 3.
Bertsekas DP. Nonlinear Programming. Athena Scientific; 1999.
- 4.
Nocedal J, Wright SJ. Numerical Optimization. 2nd ed. New York, NY, USA: Springer; 2006.
- 5.
Pike M, Mustafa NM, Towey D, Brusic V. Sensor Networks and Data Management in Healthcare: Emerging Technologies and New Challenges. In: 2019 IEEE 43rd Annual Computer Software and Applications Conference (COMPSAC). vol. 1; 2019. p. 834–839.
- 6.
Li S, Welsen S, Brusic V. Multi-Step Optimization of Indoor Localization Accuracy Using Commodity WiFi. In: 2021 IEEE 32nd Annual International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC); 2021. p. 1267–1272.
- 7.
Fletcher R. Practical Methods of Optimization. 2nd ed. New York, NY, USA: John Wiley & Sons; 1987.
- 8.
Stylidis K, Quattelbaum B, Bergsjö D, Hellberg E, Lundström O, Siljefalk L, et al. Perceived Quality Attributes Importance Ranking Methodology in the Automotive Industry: A Case Study on Geometry Appearance Attributes at CEVT. In: Procedia CIRP. vol. 107; 2022. p. 1559–1564.
- 9. Moona G, Kumar V, Jewariya M, Kumar H, Sharma R. Measurement uncertainty assessment of articulated arm coordinate measuring machine for length measurement errors using Monte Carlo simulation. International Journal of Advanced Manufacturing Technology. 2022;119(9-10):5903–5916.
- 10. Wanli L, Xinghua Q, Jianfei OY. Modeling and simulation of laser tracking systems. Kybernetes. 2012;41(9):1192–1199.
- 11.
Andersson A, Erdem I, Funk P, Rahman H, Kihlman H, Bengtsson K, et al. Inline Process Control a concept study of efficient in-line process control and process adjustment with respect to product geometry; 2016.
- 12. Cai N, Anwer N, Scott PJ, Qiao L, Jiang X. A new partitioning process for geometrical product specifications and verification. Precision Engineering. 2020;62:282–295.
- 13.
Henzold G. 23—ISO Geometrical Product Specifications (GPS), New Approach. In: Geometrical Dimensioning and Tolerancing for Design, Manufacturing and Inspection (Second Edition). second edition ed. Oxford: Butterworth-Heinemann; 2006. p. 355–371.
- 14. Wang Z, Dong H, Bai S, Wang D. A new approach of kinematic geometry for error identification and compensation of industrial robots. Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science. 2019;233(5):1783–1794.
- 15.
Montavon B, Dahlem P, Schmitt RH. Fast machine tool calibration using a single laser tracker; 2019. p. 199–209.
- 16.
BÖLLHOFF; 2022. Available from: https://www.boellhoff.com/de-en/products/additional-product-ranges/flexitol-tolerance-compensation-systems/.
- 17. Söderberg R, Wärmefjord K, Carlson JS, Lindkvist L. Toward a Digital Twin for real-time geometry assurance in individualized production. CIRP Annals—Manufacturing Technology. 2017;66(1):137–140.
- 18. Singh M, Srivastava R, Fuenmayor E, Kuts V, Qiao Y, Murray N, et al. Applications of Digital Twin across Industries: A Review. Applied Sciences (Switzerland). 2022;12(11).
- 19.
Grieves M. Origins of the Digital Twin Concept; 2016.
- 20. Fu Y, Zhu G, Zhu M, Xuan F. Digital Twin for Integration of Design-Manufacturing-Maintenance: An Overview. Chinese Journal of Mechanical Engineering (English Edition). 2022;35(1).
- 21. Rezaei Aderiani A, Wärmefjord K, Söderberg R. Evaluating different strategies to achieve the highest geometric quality in self-adjusting smart assembly lines. Robotics and Computer-Integrated Manufacturing. 2021;71.
- 22. Pan Y, Xu X, Zhang F, Jiang Z, Qiao Y, Li Y. Calibrator automatic calibration system for headlamp tester of motor vehicle based on image processing. Binggong Xuebao/Acta Armamentarii. 2015;36(5):861–868.
- 23. Yin FW, Tian WJ, Liu HT, Huang T, Chetwynd DG. A screw theory based approach to determining the identifiable parameters for calibration of parallel manipulators. Mechanism and Machine Theory. 2020;145.
- 24. Aderiani AR, Wärmefjord K, Söderberg R, Lindkvist L. Individualizing locator adjustments of assembly fixtures using a digital twin. Journal of Computing and Information Science in Engineering. 2019;19(4).
- 25. Kaya I, Colak M. A literature review on fuzzy process capability analysis. Journal of Testing and Evaluation. 2020;48(5).
- 26. Khalili P, Vatankhah R. Derivation of an optimal trajectory and nonlinear adaptive controller design for drug delivery in cancerous tumor chemotherapy. Computers in Biology and Medicine. 2019;109. pmid:31075570
- 27. Onyango N, Muller J, Kibet S. Optimal Vaccination Strategies in an SIR Epidemic Model with Time Scales. Applied Mathematics. 2013;4:1–14.
- 28. Wu JY, Huang Y, Nguyen V. On the BFGS monolithic algorithm for the unified phase field damage theory. Computer Methods in Applied Mechanics and Engineering. 2019.
- 29. Mortezazadeh E, Rasaei M. A robust procedure for three-phase equilibrium calculations of water-hydrocarbon systems using cubic equations of state. Fluid Phase Equilibria. 2017;450.
- 30.
Garcia J, Ortega J, Garcia A, Satorres S. High-accuracy automatic system to assemble vehicle headlamps; 2009. p. 1–4.
- 31. Beremlijski P, Haslinger J, Kočvara M, Kučera R, Outrata JV. Shape optimization in three-dimensional contact problems with friction. SIAM Journal on Optimization. 2009;20(1):416–444.
- 32.
Beremlijski P, Markopoulos A. On solution of 3D contact shape optimization problems with Coulomb friction based on domain decomposition. In: Proceedings of the 4th International Conference on Engineering Optimization; 2014. p. 1526–1531.