7.3 Learning Artificial Potential Field (APF) of PiH
7.3.2 APF Under Contact Conditions
The previous section describes how to learn APF under no-contact, where constraints are im- posed due to an obstacle’s existence in the workspace. However, once parts are in contact with each other, another strategy is needed to perform the assembly task. Accordingly, a different learning approach is proposed to learn human PiH insertion skills under contact conditions. Figure 7.4 depicts the PiH insertion, in which human compliance is represented as a non-linear spring, where a Kθ and Klare non-linear stiffness coefficients. The non-linearity source is the
transition between different muscles’ stiffness level according to the contact context. In this context, APF under contact can be modelled as a trajectory result due to non-linear attraction force result from virtual non-linear springs attached to the assembly parts, as shown in Figure 7.4.
Algorithm 7.3.1 Learn APF parmeters
1: Input: Ψi(p) ≡ initial APF, ≡ initial learning rate and T h ≡ Threshold
2: Cost = J (η∗, Ψ(p)) 3: while Cost > Th do :
4: Calculate A from Equation (7.15).
5: Calculate B from Equation (7.17). 6: ∂p = (AB)†(η − η∗) 7: ∂p = p + ∂p 8: if J (η∗, Ψ(p)) < Cost then 9: = µ, µ > 1 10: else 11: = λ, λ < 1 12: end if 13: Cost = J (η∗, Ψ(p)) 14: end while Kl K0 Zh 0 l Yh Xh
Figure 7.4: Assembly problem under contact condition, where {Oh} := {Xh, Yh, Zh} is the hole coor-
dinate system, l is the peg height along Zhaxis.
A non-linear spring has a non-linear mapping between force and displacement (i.e. insertion depth and angular insertion). In this context, the PiH insertion problem can be considered a 2D mathematical problem that corresponds to the insertion depth l and insertion angle θ. Mathematically, rotational and translational non-liner springs can be described as shown in Equation (7.20) and Equation (7.21).
Fspring = al ∆lel(F,l) (7.20)
Where Fspring and Tspring are the spring potential force and torque. ∆l and ∆θ are the trans-
lational and angular displacements, respectively. Kl ∼ el(F, l) and Kθ ∼ er(F, θ) are the
variable translational and rotational power spring coefficients, which are functions of the gen- eralised force and a position variable; such as the insertion depth or the insertion angle. The reason behind this is the fact that the human interacts with the contact forces by varying his/her muscles stiffness, which is captured through the variable power of the non-linear spring. Fur- ther to that, the potential energy can be described as shown in Equation (7.22) which is derived in Appendix C.
Ψε=
1 a(P + 1)F
2η1−P (7.22)
Where Ψεis the APF function, P and a are the power spring coefficients, and η is the displace-
ments.
Accordingly, the gradient (5Ψ ) of Equation (7.22) can be estimated as shown in Equation
(7.23), which is employed to work out the robot trajectory based on Equation (7.6). It is worth to highlight here that the main difference between the learning trajectory with no-contact and the trajectory with contact is that in the first case it is assumed that the trajectory is generated as the result of virtual force, while in the latter case it is assumed that the trajectory is generated due to virtual springs that react adaptively with the real generalised force (measured) F .
5 Ψε= 1 − p(F, X) a(P (F, −) + 1)F η −P (F,−) + 2P (F, −) P (F, −) + 1F (7.23)
where P (F, −) is a function of the generalised force and some geometrical variables that specify the power of the non-linear spring. Hence, this function determines the non-linear stiffness of the virtual spring. On these bases, the human PiH insertion skill can be simplified as learning human variable stiffness during the insertion process.
The PiH insertion involves two main variables which are the insertion depth l and insertion angle θ as shown in Figure 7.4. Using the superposition concept, the APF can be represented as shown in Equation (7.24). 5Ψl 5Ψθ = 1−P (F,θ) a(P (F,θ)+1)l −P (F,θ)+ 2P (F,X) P (F,θ)+1 0 0 a(P (F,l)+1)1−P (F,l) θ−P (F,l)+P (F,l)+12P (F,l) . Fh TXh,Yh (7.24) Where Fh is the force in the hole axis direction and TXh,Yh is the resultant torque with respect
to Xh, Yh axes as shown in Figure 7.4. In this context, the learning problem is to capture
the mapping between P (F, [l, θ] → P (−)), the generalised force F and the PiH insertion variables [l, θ]. This definition introduced here is suitable for symmetrical insertion parts such
as cylindrical peg and hole. However, it can be extended for more complicated shapes like for example asymmetrical assembly parts.
Several machine learning approaches can be used to learn this mapping, such as boosted trees, RF and WRF which was described in Chapter 6. Once the stiffness function is learned, it can be used to determine the APF for various PiH problems. In the next section, the experimental setup and human demonstration are presented. In analogy to Definition 7.1, the total goal APF Ψgtotal determined using a superposition concept as in Definition 7.2.
Definition 7.2. Total Artificial Potential Field: Summation of all individual Ψi generated by
the virtual non-linear springi. Such that, Ψgtotal =
P
i=0N ψi, whereN is the number of the
virtual non-linear springs [192].
Definition 7.2 is a special case of Definition 7.1 introduced in Section 7.3. This definition grants learning each non-linear spring mapping separately, using machine learning algorithms. In this chapter, 4 different machine learning algorithms will be utilised to learn these mappings, then the performance of fitted data-driven models based on these algorithms will be compared and evaluated. The machine learning algorithms are Boosted Trees Regression (BTR), Random Forests (RF), Weighted Random Forests (WRF) and Linear Regression (LR).
The validation of the proposed approach will be performed using a testing error from unseen human trials, where the outputs from the fitted models were compared with the actual output. Then, these models can be evaluated based on Root Mean Square Error (RMSE). Furthermore, to test how robust fitted models against geometrical variation, unseen human trials with different parts’ geometries were used. Then, the model with the best performance was employed to perform the actual PiH insertion utilising the robot while monitoring its trajectories.