1 Introduction

Physics-based contact dynamics modeling methods have provided practical solutions for various application cases, such as spacecraft docking [1], robotic capturing [2,3,4,5], vehicle safety improvement [6, 7], and fruit bruise explanation [8]. Extensive reviews on physics-based contact models can be found in [9,10,11]. Physics-based contact models have various mathematical expressions [12, 13] for different contact problems and each model has dynamic characteristics compared to other models [14]. To improve the performance of a specific physics-based contact model, estimation methods are often used to determine the model parameters [15,16,17,18,19]. A recursive least squares estimation technique was adopted in [20] for the identification of the contact stiffness and damping. Further improvements have been made with two recursive least squares estimators in [21] and a nonlinear separable least squares formulation employed in [22]. For some important engineering applications, however, these methods are often not accurate enough and can only provide rough information [23,24,25] due to the limitation of physics-based contact models in describing contact factors [26,27,28], such as the surface topography, temperature, lubrication, and even humidity. Moreover, complex contact cases are difficult to model since there are unknown contact factors as a result of the limited human knowledge on the contact phenomenon, which means that it is almost impossible for physics-based contact models to take into account these factors.

In this study, the factors that influence the contact phenomenon are categorized into three groups, the known modeled factors, the known unmodeled factors and the unknown unmodeled factors. In a more intuitive form, we have

$$ \mathit{Contact}\ \mathit{physics} = \mathit{Modeled}\ \mathit{part} + \mathit{Unmodeled}\ \mathit{part} $$

where the Modeled part includes all known modeled factors of the contact phenomenon and their relationships, which can be expressed by known physical principles; the Unmodeled part reflects the comprehensive effect of the known unmodeled factors and unknown unmodeled factors. Also, the Unmodeled part can be regarded as the error of the Modeled part.

With the development and maturity of machine learning technologies, including feed-forward neural networks [29, 33, 34], support vector regression [29, 30] and back-propagation neural networks [31, 32], a considerable number of studies have been devoted to the idea of extracting a data-driven model from the enormous amount of experimental data using these technologies. Inspired by some previous work, it is clear that large amounts of contact experimental data can also be refined and analyzed to better describe the nonlinearities that exist with regard to the contact phenomenon.

In this paper, we explore a novel hybrid contact modeling (HCM) method in which a data-driven error model is introduced as a supplement to the physics-based contact models to capture the error caused by the unmodeled factors of the contact phenomenon. One of the advantages of such an approach is that our method can achieve an accurate model of a complex contact phenomenon, as the physics-based model is established to show the modeled factors of the contact phenomenon, while the data-driven model is trained using data technologies to reflect the unmodeled factors. Furthermore, our method provides a way to combine a physics-based model and a data-driven model to fully take advantage of both types of models. A physics-based model is created based on the knowledge of the physical mechanism and thus is applicable to various contact phenomena. However, the drawback of using the physics-based model alone is that an accurate description of contact phenomena can hardly be achieved due to the lack of consideration of all unmodeled factors. In contrast, a data-driven model performs well at accurately determining the input-output relationship based on sufficient data, but it is hardly scalable and applicable to cases other than the one that the data represent.

We have carried out a variety of simulations to explore the properties of our approach and to compare its performance to that of traditional physics-based contact modeling methods. As our simulations have demonstrated, the HCM method reduces the error, resulting in a more accurate description of the physical reality of the contact dynamics.

The remainder of this paper is organized as follows. Sections 2 and 3 introduce the strategy and models used for the HCM method, respectively. Section 4 focuses on the construction of a noise-added contact model that mimics the experimental results based on the proposed assumption. Section 5 examines some examples, the results of which demonstrate the performance of our approach. Finally, Sect. 6 concludes this paper and discusses future research.

2 Hybrid contact modeling method

The proposed hybrid contact model includes two main components: a traditional physics-based model and a data-driven error model. The physics-based model is obtained from the traditional contact dynamics theory applied to the contact case of interest, while the data-driven error model reflecting the unmodeled factors of the contact physics is extracted from the available experimental data. To write this structure in an explicit form, we have

$$ \mathit{HCM} = \mathit{Physics} - \mathit{based}\ \mathit{model} + \mathit{Data} - \mathit{driven}\ \mathit{error}\ \mathit{model} $$

As the physics-based model expresses the modeled part of the contact physics, the error between the contact physics and the HCM is equivalent to that between the unmodeled part and the data-driven error model. Then, minimizing the error of the HCM is the same as maximizing the accuracy of the data-driven error model.

A flowchart for establishing a traditional physics-based model, where a model parameter identification scheme is usually used to improve its accuracy [13, 18], is illustrated in Fig. 1. We divide this approach into three steps: contact experiment implementation, physical model-based simulation and physics-based model optimization. In the first step, experiments are performed to obtain the experimental data of a contact phenomenon. The next step introduces the physics-based model for simulating the abovementioned contact experiments. After comparing the simulated data and the experimental data, the physics-based model is updated by adjusting its model parameters until the model generates a simulation result convergence to the experimental results. The traditional physics-based modeling method, however, cannot accurately describe the contact phenomenon due to the lack of consideration of the unmodeled factors.

Fig. 1
figure 1

Procedure of establishing a traditional physics-based model

Figure 2 presents an overview of our proposed HCM method. Improved from the traditional physics-based modeling method, the process of establishing a hybrid contact model can also be divided into three steps. Both the physics-based model and the data-driven error model need to be determined in the second step to establish the hybrid contact model. First, the contact experiment should be repeated numerous times to obtain a large amount of experimental data, which include both motion and force data of the contact bodies. Then we randomly classify the obtained experimental data into two groups: 90% of the experimental data (denoted as S1) serves as the training set, and the remaining 10% (denoted as S2) serves as the validation set. In contrast to the abovementioned physics-based modeling methods, we compute the error data from the simulated data of the physics-based model and the S1 set. These error data, reflecting the unmodeled factors of the contact experiment, allow us to construct a data-driven error model. Particularly, the motion data (i.e., positions, attitudes, velocities and angular velocities of the contacting bodies) are considered to be the input of the data-driven error model, while the force error data are considered to be the output to obtain a consistent input-output relationship associated with the physics-based model. We then generate the hybrid contact model with a combination of the traditional physics-based model and the data-driven error model. To optimize the accuracy of the hybrid contact model, the data-driven error model will be updated until the error between the HCM simulation data and the contact experiment data becomes sufficiently small. In this way, the HCM method is capable of providing a more accurate simulation of the contact experiment case.

Fig. 2
figure 2

An overview of the HCM modeling method

Similar to the construction of the data-driven error model, the data-driven contact model can be constructed by properly training the experimental contact data. However, it is difficult for the data-driven contact model to simulate a contact scenario without enough contact data, which is also the case for the data-driven error model. The strategy of the HCM method is to simulate such a contact scenario by switching off the data-driven error model. Therefore, the HCM method can more flexibly model various contact phenomena by combining the benefits of both of its components.

3 Models

This section describes the two types of models, i.e., the physics-based models and the data-driven error models, used in the HCM method.

3.1 Physics-based models

In classical physics-based contact dynamics [10], a contact phenomenon of two bodies [see Fig. 3] can be described as a process in which local deformations at the contact point between the interactive impacting bodies generate contact forces that tend to separate the impacting bodies from each other. The indentation of the impacting bodies at the contact point may be defined as the penetration depth of the intersecting region when the local deformation region is simplified as an intersecting region between the undeformed bodies [35].

Fig. 3
figure 3

Contact between two bodies

Let the composite force of the normal contact force and the friction force at the contact point be expressed in the body frame of each contact body [see Fig. 3]. The force \(\boldsymbol{F} \in \mathbb{R}^{3 \times 1}\) and the torque \(\boldsymbol{T} \in \mathbb{R}^{3 \times 1}\) can be written as follows:

$$ \left \{ \textstyle\begin{array}{l} \boldsymbol{F}_{i} = \left ( - 1 \right )^{i - 1}\left ( \boldsymbol{f}_{n} + \boldsymbol{f}_{f} \right ) \\ \boldsymbol{T}_{i} = \left ( - 1 \right )^{i - 1}\boldsymbol{l}_{i} \times \left ( \boldsymbol{f}_{n} + \boldsymbol{f}_{f} \right ) \quad i = 1,2 \end{array}\displaystyle \right . $$
(1)

where \(i\), \(i = 1,2\) represents the contact body 1 and 2, respectively; \(\boldsymbol{F}_{1},\boldsymbol{F}_{2} \in \mathbb{R}^{3 \times 1}\) and \(\boldsymbol{T}_{1},\boldsymbol{T}_{2} \in \mathbb{R}^{3 \times 1}\) are the contact forces and the contact torques expressed in the body frames of the contacting bodies, respectively; \(\boldsymbol{l}_{1},\boldsymbol{l}_{2} \in \mathbb{R}^{3 \times 1}\) represent the two arm vectors of the contact force; \(\boldsymbol{f}_{n} \in \mathbb{R}^{3 \times 1}\) represents the normal contact force at the contact point; \(\boldsymbol{f}_{f} \in \mathbb{R}^{3 \times 1}\) represents the friction force perpendicular to the normal contact force at the contact point.

The Hertzian contact model, nonlinear damping contact models and a velocity-based friction model are used in our study. Hertz is a pioneer with respect to solving contact mechanics problems using the classical theory of elasticity, and the Hertzian contact model remains one of the most widely used contact models to treat contact problems. However, the Hertzian contact model does not account for the energy dissipation process that characterizes the contact events in mechanical systems. Several researchers have extended the Hertzian contact model to simulate the energy dissipation process. In particular, Lankarani and Nikravesh extended the Hertzian contact model to accommodate the energy dissipation by including a hysteresis damping term. The variable stiffness contact model uses an effective contact stiffness equation that depends on the area of the contacting geometry. Additionally, in MSC ADAMS software (a commonly used multibody dynamics simulation software), a nonlinear damping model, which applies a cubic polynomial damping term, combined with a velocity-based friction model has been adopted to simulate the nonlinear force characteristics of the contact problems.

3.1.1 Hertzian contact model

The Hertzian contact model, originally invented to simulate the perfectly elastic contact between impacting bodies, is a nonlinear function without the damping term and is defined as [36]

$$ \left \{ \textstyle\begin{array}{l@{\quad }l} \boldsymbol{f}_{n} = \mathbf{0}_{\left ( 3 \times 1 \right )} & \delta \le 0 \\ \boldsymbol{f}_{n} = k\delta ^{n}\boldsymbol{n} & \delta > 0 \end{array}\displaystyle \right . $$
(2)

where \(\boldsymbol{f}_{n} \in \mathbb{R}^{3 \times 1}\) represents the normal contact force at the contact point; \(n\) is the nonlinear power exponent which is equal to 3/2 for the case with a parabolic distribution of contact stress; \(\delta \) and \(\boldsymbol{n} \in \mathbb{R}^{3 \times 1}\) are the indentation and the surface common normal vector of the contacting bodies, respectively; and \(k\) denotes the Hertzian contact stiffness. For two spherical bodies (1 and 2), the contact stiffness can be defined as

$$ k = \frac{4}{3}\frac{E_{1}E_{2}}{E_{1}\left ( 1 - \upsilon _{2}^{2} \right ) + E_{2}\left ( 1 - \upsilon _{1}^{2} \right )}\sqrt{\frac{R_{1}R_{2}}{R_{1} + R_{2}}} $$
(3)

where \(E_{1}\) and \(E_{2}\) are the Young modulus of the spherical bodies; \(\upsilon _{1}\) and \(\upsilon _{2}\) are the Poisson ratios of the spherical bodies; \(R_{1}\) and \(R_{2}\) are the radii of the spherical bodies.

3.1.2 Nonlinear damping contact models

By extending the Hertzian contact model with a hysteresis damping function to represent the energy dissipation during the contact process, the Lankarani-Nikravesh contact model is developed as [37]

$$ \left \{ \textstyle\begin{array}{l@{\quad }l} \boldsymbol{f}_{n} = \mathbf{0}_{\left ( 3 \times 1 \right )} & \delta \le 0 \\ \boldsymbol{f}_{n} = k\delta ^{n}\boldsymbol{n} + d\dot{\delta } \boldsymbol{n} & \delta > 0 \end{array}\displaystyle \right . $$
(4)

where \(d\) represents the damping coefficient which takes the form as

$$ d = \frac{3k\left ( 1 - c_{e}^{2} \right )\delta ^{n}}{4\dot{\delta }_{0}} $$
(5)

where \(c_{e}\) is the restitution coefficient and \(\dot{\delta }_{0}\) is the initial indentation velocity of the contacting bodies.

The variable stiffness contact model considers the interference geometry to calculate the contact forces between contacting bodies. An effective contact stiffness equation is used to reflect the relationship between the effective contact stiffness and the contact area. The variable stiffness contact model can be stated as [38]

$$ \left \{ \textstyle\begin{array}{l@{\quad }l} \boldsymbol{f}_{n} = \mathbf{0}_{\left ( 3 \times 1 \right )} & \delta \le 0 \\ \boldsymbol{f}_{n} = k\left ( \delta \right )\delta \boldsymbol{n} + 2\lambda \sqrt{k\left ( \delta \right )m_{e}} \delta \dot{\delta } \boldsymbol{n} & \delta > 0 \end{array}\displaystyle \right . $$
(6)

where \(m_{e}\) is the effective mass of the contacting bodies defined as \(m_{e} = m_{1}m_{2} / \left ( m_{1} + m_{2} \right )\) and \(\lim _{m_{1} \to \infty } m_{e} = m_{2}\); \(m_{1}\) and \(m_{2}\) are the masses of the contacting bodies, respectively; \(\lambda \) represents the damping ratio; \(k\left ( \delta \right )\) is the effective contact stiffness, which is defined as

$$ k\left ( \delta \right ) = c\frac{E_{1}E_{2}}{E_{1}\left ( 1 - \upsilon _{2}^{2} \right ) + E_{2}\left ( 1 - \upsilon _{1}^{2} \right )}a\left ( \delta \right ) $$
(7)

where \(E_{1}\) and \(E_{2}\) are the Young modulus of the contacting bodies; \(\upsilon _{1}\) and \(\upsilon _{2}\) are the Poisson ratios of the contacting bodies; \(a\left ( \delta \right )\) represents the effective radius of the contacting area. Particularly, the effective radius for a ball with the radius \(r\) contacting with a plane is \(a\left ( \delta \right ) = \sqrt{2r\delta - \delta ^{2}}\). \(c\) is the surface loading coefficient depending on the normal contact-force distribution, and the value range of \(c\) is \(4 / 3 \le c \le 2\pi \).

Another nonlinear damping model used in MSC ADAMS software is called the IMPACT force contact model, which is given by [39]

$$ \left \{ \textstyle\begin{array}{l@{\quad }l} \boldsymbol{f}_{n} = \mathbf{0}_{\left ( 3 \times 1 \right )} & \delta \le 0 \\ \boldsymbol{f}_{n} = \max \left ( 0,k\delta ^{e} + \mathrm{step}\left ( \delta ,\delta _{0},d_{0},\delta _{\max },d_{\max } \right )\dot{\delta } \right )\boldsymbol{n} & \delta > 0 \end{array}\displaystyle \right . $$
(8)

where \(k\) is the contact stiffness coefficient; \(e\) is the positive real value denoting the contact-force exponent; \(\mathrm{step}\left ( \cdot \right )\) represents a function expressing the contact damping characteristic with a cubic polynomial [see Fig. 4], which is written as

$$ \mathrm{step}\left ( \delta ,\delta _{0},d_{0},\delta _{\max },d_{\max } \right ) = \left \{ \textstyle\begin{array}{l@{\quad }l} d_{0} & \delta \le \delta _{0} \\ d_{0} + \left ( d_{\max } - d_{0} \right ) \cdot \Delta ^{2}\left ( 3 - 2\Delta \right ) & \delta _{0} < \delta < \delta _{\max } \\ d_{\max } & \delta \ge \delta _{\max } \end{array}\displaystyle \right . $$
(9)

where \(\delta _{0}\) and \(d_{0}\), respectively, represent the initial indentation and the initial damping coefficient when contact begins, that is, \(\delta _{0} = 0\) and \(d_{0} = 0\); \(\delta _{\max } \) specifies the boundary penetration to apply the maximum damping coefficient \(d_{\max } \); \(\Delta \) satisfies \(\Delta = \left ( \delta - \delta _{0} \right ) / \left ( \delta _{\max } - \delta _{0} \right )\).

Fig. 4
figure 4

Cubic polynomial with damping coefficient as the dependent variable and indentation as the independent variable

3.1.3 Velocity-based friction model

As an improvement to the classic Coulomb friction model, which exhibits a discontinuous performance due to the difference between static and dynamic behaviors, the velocity-based friction model is introduced as

$$ \boldsymbol{f}_{ f} = - \mu \left ( v \right )\left \| \boldsymbol{f}_{ n} \right \| \cdot \frac{\boldsymbol{v}}{v} $$
(10)

where \(\boldsymbol{f}_{f} \in \mathbb{R}^{3 \times 1}\) represents the friction force perpendicular to the normal contact force at the contact point; \(\boldsymbol{v} \in \mathbb{R}^{3 \times 1}\) is the slip velocity between the contacting bodies, and \(v = \left \| \boldsymbol{v} \right \| \); \(\mu \left ( \cdot \right )\) expresses the friction coefficient varying with the slip velocity, which is defined as

$$ \mu \left ( v \right ) = \left \{ \textstyle\begin{array}{l@{\quad }l} \mathrm{step}\left ( v,0,0,v_{s},\mu _{s} \right ) & 0 \le v < v_{s} \\ \mathrm{step}\left ( v,v_{s},\mu _{s},v_{d},\mu _{d} \right ) & v_{s} \le v \le v_{d} \\ \mu _{d} & v > v_{d} \end{array}\displaystyle \right . $$
(11)

where \(v_{s}\) and \(v_{d}\) represent the static transition velocity and the dynamic transition velocity, respectively; \(\mu _{s}\) is the static friction coefficient and \(\mu _{d}\) is the dynamic friction coefficient.

3.2 Data-driven error models

We seek to build a data-driven model that describes the error between the physics-based model and the contact physics based on a sufficiently large amount of experimental data. In this study, a back-propagation neural network (BPNN) is adopted to construct the data-driven error model that generates the force error with the motion data of the contact bodies as inputs, as shown in Fig. 5.

Fig. 5
figure 5

BPNN for a data-driven error model

To reduce the cost of the BPNN training process and increase the accuracy of the data-driven error model, the network structure of the data-driven error model is optimized in this paper, as shown in Fig. 6. The optimization method used here is similar to the method adopted in [40]. That is, six BPNN models for each contact body should be assumed for a three-dimensional (3D) contact situation. Hence, the BPNN function can be formulated to express the nonlinear characteristics of the unmodeled factors in the contact experiment as

$$ \textstyle\begin{array}{c@{\quad }c} y_{out}^{i} = g_{\mathrm{BPNN}}\left ( \boldsymbol{p}_{1},\boldsymbol{p}_{2},\boldsymbol{\varepsilon }_{1},\boldsymbol{\varepsilon }_{2},\boldsymbol{v}_{1},\boldsymbol{v}_{2},\boldsymbol{\omega }_{1},\boldsymbol{\omega }_{2} \right ) & i = 1,2, \ldots ,12 \end{array} $$
(12)

where \(g_{\mathrm{BPNN}}\left ( \cdot \right )\) represents the function of the BPNN model; \(\boldsymbol{p}_{1},\boldsymbol{p}_{2} \in \mathbb{R}^{3 \times 1}\) are the positions of the contacting bodies; \(\boldsymbol{\varepsilon }_{1},\boldsymbol{\varepsilon }_{2} \in \mathbb{R}^{4 \times 1}\) are the orientations of the contacting bodies represented by unit quaternions; \(\boldsymbol{v}_{1},\boldsymbol{v}_{2} \in \mathbb{R}^{3 \times 1}\) and \(\boldsymbol{\omega }_{1},\boldsymbol{\omega }_{2} \in \mathbb{R}^{3 \times 1}\) are the velocities and angular velocities of the contacting bodies, respectively; \(y_{out}^{i}\) represents one dimension of the contact-force error data, and \([y_{out}^{1},y_{out}^{2},y_{out}^{3}]^{T} = \boldsymbol{F}_{1\_error}\), \([y_{out}^{4},y_{out}^{5},y_{out}^{6}]^{T} = \boldsymbol{T}_{1\_error}\), \([y_{out}^{7},y_{out}^{8},y_{out}^{9}]^{T} = \boldsymbol{F}_{2\_error}\), \([y_{out}^{10},y_{out}^{11},y_{out}^{12}]^{T} = \boldsymbol{T}_{2\_error}\); \(\boldsymbol{F}_{1\_error},\boldsymbol{F}_{2\_error} \in \mathbb{R}^{3 \times 1}\) and \(\boldsymbol{T}_{1\_error},\boldsymbol{T}_{2\_error} \in \mathbb{R}^{3 \times 1}\) are the contact-force errors and the contact torque errors of the contacting bodies, respectively.

Fig. 6
figure 6

Improved BPNN for a data-driven error model

4 Simulation methodology

It is well known that a simulation model cannot substitute for a real contact experiment due to the uncertainties from the experimental materials and equipment.

As mentioned in Sect. 1, contact physics phenomena consist of the modeled part and the unmodeled part which represents the error of the modeled part. Then we can rewrite the contact physics in a symbolic form as

$$ C = G\left ( x_{1},x_{2}, \ldots ,x_{s} \right ) + U $$
(13)

where \(G\left ( x_{1},x_{2}, \ldots ,x_{s} \right )\) represents the modeled part with known modeled contact parameters \(x_{i}\), \(i = 1,2, \ldots ,s\); \(U\) represents the unmodeled part of the contact physics which is denoted by \(C\).

As a substitution for the experiment, we define a noise-added contact model with noise on both the model parameters and the simulation results to mimic the contact physics of a real contact experiment. Noise is introduced to the model parameters to reflect the experimental system errors, and the noise in the simulation results reflects the experimental random errors.

Thus, the noise-added contact model \(\tilde{C}\) can be defined as

$$ \tilde{C} = G\left ( x_{1},x_{2}, \ldots ,x_{s} \right ) + \tilde{H} + \sigma \zeta $$
(14)

where \(\tilde{ \cdot } \) represents a parameter with noise; \(\tilde{H}\) is the difference between the noise-added modeled part \(G\left ( \tilde{x}_{1},\tilde{x}_{2}, \ldots ,\tilde{x}_{s} \right )\) with noise on its contact parameters and the modeled part \(G\left ( x_{1},x_{2}, \ldots ,x_{s} \right )\); \(\zeta \) is a random error generated by white noise, and \(\zeta \in N\left ( 0,1 \right )\); \(\sigma \) is the variance parameter of noise.

Now, we propose the following assumption to ensure the substitution of the contact physics \(C\) by the contact model \(\tilde{C}\) without the consideration of the possible error distribution of the contact physics.

Assumption:

$$ \min \left ( \tilde{H} + \sigma \zeta \right ) < U < \max \left ( \tilde{H} + \sigma \zeta \right ) $$
(15)

Substituting Eq. (13) and Eq. (14) into Eq. (15) yields the following:

$$ \min \left ( \tilde{C} \right ) < C < \max \left ( \tilde{C} \right ) $$
(16)

Thus, the noise-added contact model is able to mimic the contact physics \(C\) under the proposed assumption. In particular, the above assumption applies to all kinds of physics-based contact models, including the Hertzian contact model and the nonlinear damping contact models noted in the previous section.

5 Simulation examples

We tested the performance of the HCM method with three dynamic simulation examples, including a bouncing ball, a flat-shot and a 3D peg-in-hole. The bouncing ball and the flat-shot examples were implemented in a MATLAB/Simulink environment, and the peg-in-hole example was implemented in the co-simulation environment based on MATLAB/Simulink and MSC ADAMS. The simulation results of the hybrid contact model were compared against those of the physics-based contact models to demonstrate the improved accuracy of the HCM method.

5.1 Bouncing ball example

5.1.1 Dynamic model

For a bouncing ball in the free-falling direction shown in Fig. 7, the dynamics equation is

$$ \textstyle\begin{array}{c@{\quad }c} m\ddot{\xi } = f_{n} - mg, & \xi \left ( 0 \right ) = h_{0} + r,\dot{\xi } \left ( 0 \right ) = v_{0} \end{array} $$
(17)

where \(m\) is the mass of the ball; \(\xi \) is the position of the ball corresponding to the body frame of the ground; \(f_{n}\) represents the normal contact force between the ball and the ground; \(h_{0}\) and \(v_{0}\) stand for the initial height and the initial velocity of the ball, respectively; \(r\) is the radius of the ball and \(g\) represents the gravitational acceleration.

Fig. 7
figure 7

Bouncing ball example

5.1.2 Simulation

The physical parameters of the example are listed in Table 1. First, we constructed a noise-added contact model (called PM1) to represent a real bouncing ball experiment under the assumption of Eq. (15). The noise-added contact model was a variable stiffness contact model with noise on its parameters and its simulation results. A parameter \(\eta \) with noise is defined as

$$ \eta = a + ab\zeta $$
(18)

where white noise, \(\zeta \in N\left ( 0,1 \right )\), is directly added to the simulation result \(\gamma _{0}\), namely

$$ \gamma = \gamma _{0} + \sigma \zeta $$
(19)

where \(a\) is the mean value of the parameter \(\eta \); \(b\) and \(\sigma \) are variance parameters of the noise.

Table 1 Physical parameters of the ball

The parameters of the PM1 are listed in Table 2.

Table 2 Parameters of the PM1

Due to the noise on the PM1, the simulation results, including the motion data and the contact-force data of the bouncing ball, were different for each run, which would be a similar case to a real contact experiment. The simulation of the PM1 was conducted 1,000 times to acquire the simulation results. After randomly grouping the simulation results of the PM1 into the S1 set (90% of the simulated data) and the S2 set (remaining 10% of the simulated data), we established a traditional physics-based model (called PM2) based on the Lankarani-Nikravesh contact model to simulate the bouncing ball case (namely, the PM1). The contact parameters, including the contact stiffness \(k \in \left [ 1\mathrm{e}9,1\mathrm{e}10 \right ]\), the power exponent \(n \in \left [ 1,2 \right ]\), and the restitution coefficient \(c_{e} \in \left [ 0.7,1 \right ]\), were derived from the S1 set by adopting the genetic algorithm method [41], as presented in Table 3.

Table 3 Parameters of the PM2

Specifically, the boundary of restitution coefficient was defined because the Lankarani-Nikravesh contact model is mainly valid for coefficient of restitution values close to unity [37].

In Fig. 8, we present the conceptual relationships between the contact physics of the real contact experiment, the PM1 overlaying the contact physics with the assumption of Eq. (15), and the PM2 based on the Lankarani-Nikravesh contact model. Both the Lankarani-Nikravesh contact model and the variable stiffness contact model take into consideration the stiffness and damping effects of the contact physics. However, the definitions of the stiffness and damping equations are slightly different between the Lankarani-Nikravesh contact model and the variable stiffness contact model, which leads to different simulation results of the same contact phenomenon.

Fig. 8
figure 8

Relationship of the PM1, the PM2 and the contact physics

Then we generated the data-driven error model with the motion data as the input and the force error data as the output using the error data extracted from the simulated data of the PM2 and the S1, as illustrated in Fig. 2. The specific structure of the data-driven error model that considers only the moving body (the bouncing ball) is reported in Table 4. The training time for the data-driven error model is less than a half an hour. Finally, we constructed the HCM by combining the data-driven error model and the PM2 to achieve an accurate description of the bouncing ball example. The feasibility and accuracy of the HCM method were evaluated and tested by the S2.

Table 4 Structure of the data-driven error model

5.1.3 Results and discussion

We numerically analyze the bouncing ball case in terms of the maximum contact force, the contact impulse, the contact energy loss and the contact duration. The Simulation results of the PM1, the PM2 and the HCM for the bouncing ball example are given in Table 5. The error \(\gamma _{\mathrm{error}}\) between the different simulation results takes the form

$$ \gamma _{\mathrm{error}} = \mathrm{abs}\left ( \frac{\gamma _{1} - \gamma _{2}}{\gamma _{1}} \right ) $$
(20)

where \(\gamma _{1}\) and \(\gamma _{2}\) are a quantity of interest from the two different simulation runs. Specifically, \(\gamma _{1}\) represents a simulation of the PM1.

Table 5 Simulation results of the S2, the PM2 and the HCM

All four indicators demonstrate that the simulation results of the HCM show a significant improvement compared with that of the PM2. For the indicators of the maximum contact force and contact impulse, the error decreases from 1.58% and 0.31% with the PM2 to 0.12% and 0.01% with the HCM, respectively. The contact duration error decreases from 0.88% with the PM2 to 0.01% with the HCM. With the refinement of the data-driven error model capturing the damping terms from the error data, the HCM succeeds in reducing the error of the contact energy loss from 8.05% with the PM2 to 0.01%.

The contact-force results of the PM1, the PM2 and the HCM during the contact process and the contact-force errors are plotted in Figs. 9 and 10, respectively. Note that the S2 data are analyzed because that data have not been used in the training of the HCM. We identify the contact parameters of the PM2 from the simulation data of the PM1; therefore, the simulation result of the PM2 shows the overall trend of the PM1. However, the error can still be seen, as shown in Fig. 10. We divide the error into two groups, namely, the physics-based error and the random error. The physics-based error between the PM1 and the PM2 results from the difference in the mathematical description of the contact models, and it contributes to the main trend of the error curve. In addition, the random error leads to noise with an approximately \(\pm 50\)N amplitude. Compared with the simulation results of the PM2, the HCM consisting of the data-driven error model and the PM2 has an improved description of the contact process of the PM1, which demonstrates the feasibility and accuracy of the HCM method in this contact case.

Fig. 9
figure 9

Contact force results of the HCM, the PM2 and the S2

Fig. 10
figure 10

Contact force errors of the HCM and the PM2

5.2 Flat-shot example

5.2.1 Dynamic model

In this example, a plate and a ball are placed on an ideal smooth surface without friction, as illustrated in Fig. 11. While sliding along the y axis due to the initial velocity \(v_{0}\), the plate hits the stationary ball. The dynamics equation of the flat-shot example is

$$ \left \{ \textstyle\begin{array}{l} m_{1}\ddot{\xi }_{1} = f_{n}, \quad \xi _{1}\left ( 0 \right ) = r,\dot{\xi }_{1}\left ( 0 \right ) = 0 \\ m_{2}\ddot{\xi }_{2} = - f_{n}, \quad \xi _{2}\left ( 0 \right ) = - h / 2,\dot{\xi }_{2}\left ( 0 \right ) = v_{0} \end{array}\displaystyle \right . $$
(21)

where \(m_{1}\) and \(m_{2}\) are the masses of the ball and the plate, respectively; \(\xi _{1}\) and \(\xi _{2}\) are the positions of the ball and the plate corresponding to the global frame, respectively; \(f_{n}\) represents the normal contact force between the plate and the ball; \(v_{0}\) stands for the initial velocity of the plate; \(r\) is the radius of the ball and \(h\) is the thickness of the plate.

Fig. 11
figure 11

Flat-shot example

5.2.2 Simulation

The physical parameters of the plate and the ball are listed in Table 6. Similar to the bouncing ball example, the PM1 based on a variable stiffness contact model with noise, as shown in Table 7, was established to represent the flat-shot experiment. The PM1 had different initial velocities. In particular, the initial velocity set of the plate was defined as [0.1, 0.2, 0.4, 0.5, 0.55, 0.6, 0.75, 0.8, 0.95, 1.0] (m/s). Each initial velocity of the plate was repeatedly simulated 100 times to acquire the simulation results, which were classified into the S1 set and the S2 set. The S1 set contained the simulation results at the initial velocity \(v_{0} \in \) [0.1, 0.2, 0.4, 0.5, 0.55, 0.6, 0.75, 0.8, 1.0] (m/s), while the S2 set was specialized to the simulated data at \(v_{0} = 0.95\left ( \mathrm{m} / \mathrm{s} \right )\).

Table 6 Physical parameters of the flat-shot example
Table 7 Parameters of the PM1

Then the Lankarani-Nikravesh contact model with its parameters identified by the genetic algorithm method was used to constitute the PM2. Table 8 lists the contact parameters of the PM2.

Table 8 Parameters of the PM2

The data-driven error model was trained using the error data extracted from the simulated data of the PM2 and the S1. The specific structure of the data-driven error model in this example is illustrated in Table 9. The training time for the data-driven error model is almost an hour.

Table 9 Structure of the data-driven error model

Finally, the HCM was combined with the data-driven error model and the PM2 to achieve an accurate description of the flat-shot example. The feasibility and accuracy of the HCM were evaluated and tested by the S2.

5.2.3 Results and discussion

The maximum contact force, contact impulse, contact energy loss and contact duration of the flat-shot example were analyzed. The simulation results of the S2, the PM2 and the HCM are shown in Table 10. For the indicators of the maximum contact force and contact impulse, the error decreases from 0.46% and 1.02% with the PM2 to 0.16% and 0.02% with the HCM, respectively. The contact duration error decreases from 0.86% with the PM2 to 0.01% with the HCM. With the refinement of the data-driven error model capturing the damping terms from the error data, the HCM succeeds in reducing the error of the contact energy loss from 37.50% with the PM2 to 4.17%.

Table 10 Simulation results of the S2, the PM2 and the HCM

The contact-force results during the contact process and the contact-force errors are plotted in Figs. 12 and 13, respectively. Studied and constructed based on the simulation results of the S1, the HCM still demonstrates an improved description of the contact process of the S2 at the initial velocity \(v_{0} = 0.95\left ( \mathrm{m} / \mathrm{s} \right )\) (compared with the PM2), which illustrates the feasibility and accuracy of the HCM method in the flat-shot example.

Fig. 12
figure 12

Contact force results of the HCM, the PM2 and the S2

Fig. 13
figure 13

Contact force errors of the HCM and the PM2

5.3 Peg-in-hole example

5.3.1 Dynamic model

Figure 14 shows a peg-in-hole example. The hole is fixed to the inertial frame, and the peg is inserted into the hole during free fall under the influence of gravity. During the insertion of the peg, there are collisions between the peg and hole. The dynamic equation of the cuboid peg insertion process can be written as

$$ \left \{ \textstyle\begin{array}{l} m\ddot{\boldsymbol{\xi }} = \boldsymbol{F} + m\boldsymbol{g} \\ \boldsymbol{I}\dot{\boldsymbol{\omega }} + \boldsymbol{\omega } \times \boldsymbol{I\omega } = \boldsymbol{T} \end{array}\displaystyle \right . $$
(22)

where \(m\) is the mass of the inserting peg; \(\boldsymbol{I} \in \mathbb{R}^{3 \times 3}\) is the centroidal inertia tensor of the peg; \(\boldsymbol{\xi } \in \mathbb{R}^{3 \times 1}\) represents the position of the body frame of the peg corresponding to the global frame; \(\boldsymbol{\omega } \in \mathbb{R}^{3 \times 1}\) represents the angular velocity of the peg; \(\boldsymbol{F} \in \mathbb{R}^{3 \times 1}\) and \(\boldsymbol{T} \in \mathbb{R}^{3 \times 1}\) stand for the contact force and the contact torque of the peg about its mass center expressed in the body frame of the peg, respectively; \(\boldsymbol{g} \in \mathbb{R}^{3 \times 1}\) represents the gravitational acceleration.

Fig. 14
figure 14

Peg-in-hole example

5.3.2 Simulation

Similar to the above examples, we conducted the 3D peg-in-hole case to show the application of the HCM method in a complex contact case. The physical parameters of the peg and hole are listed in Table 11. With the assumption described in Sect. 4, the PM1 based on the IMPACT force contact model and the velocity-based friction model where noise is added to their parameters, as shown in Table 12, was established to represent the peg-in-hole experiment.

Table 11 Physical parameters of the peg-in-hole example
Table 12 Contact parameters of the PM1

Then the exponent parameter of the PM2 contact-force model was assumed to be a constant, as shown in Table 13. The other contact parameters of the PM2 were directly determined by using the genetic algorithm method. Table 13 lists the contact parameters of the PM2.

Table 13 Contact parameters of the PM2

Considering only the moving body in the 3D peg-in-hole case (a free-fall peg), we formulated the data-driven error model including six BPNN models by training with the error data, as listed in Table 14. The training time for those BPNN models is almost a day. After combining the trained data-driven error model and the assumed PM2, the HCM for the peg-in-hole case was obtained. The feasibility and accuracy of the HCM method were tested by the data in the S2 data set.

Table 14 Structure of the data-driven error model

5.3.3 Results and discussion

During the peg insertion process, the contact between the free-fall peg and the fixed hole occurs more than once. Specifically, in this peg-in-hole simulation, the peg experiences two contacts before hitting the bottom of the hole. We analyzed the four indicators of the contact process, including the maximum value of the contact force, the maximum value of the contact torque, the linear impulse, and the angular impulse.

Table 15 lists the simulation results of the S2, the PM2 and the HCM. The errors in the linear and angular impulses between the HCM and the S2 decrease significantly compared to those of the PM2. During the first contact process, the contact impulse error decreases from 3.62% with the PM2 to 1.45% with the HCM; the contact angular impulse decreases from 4.25% with the PM2 to only 0.47% with the HCM. During the second contact process, the contact impulse error decreases to 0.52% with the HCM from 16.67% with the PM2; the contact angular impulse error also decreases to 2.15% with the HCM from 2.97% with the PM2. These simulation results clearly illustrate the benefit of the proposed HCM method in the 3D contact case.

Table 15 Simulation results of the S2, the PM2 and the HCM

6 Conclusions

In this paper, we exploited a novel hybrid contact modeling (HCM) method. Unlike the traditional physics-based contact modeling method, which uses the modeled factors of a contact phenomenon to construct the contact model, the HCM method combines both the physics-based contact model and the data-driven error model and produces an improved accurate simulation of the contact phenomenon; meanwhile, it retains the generalization ability of the physics-based contact model. We validated the HCM method by the examples of a bouncing ball, a flat-shot, and a 3D peg-in-hole case. The results demonstrate that the proposed HCM method has a better performance than the traditional physics-based contact modeling method in describing a contact.

We have laid the theoretical groundwork for the proposed HCM method in this paper. In addition, some experimental studies are conducted using a bouncing ball. The experimental data that need to be measured include the contact-force data and the motion data. An impact-force sensor and a high-speed camera are adopted to measure those data. Future work might include the comprehensive studies of the characteristics of the error data between the contact experiment and the physics-based contact model and the construction of the data-driven error model.