SYSTEMS AND METHODS FOR DETERMINING REACTIONS DUE TO FRICTION OF OBJECTS WITH MULTIPLE CONTACTS
20240316764 ยท 2024-09-26
Assignee
Inventors
Cpc classification
B25J9/1633
PERFORMING OPERATIONS; TRANSPORTING
B25J9/1607
PERFORMING OPERATIONS; TRANSPORTING
B25J9/1641
PERFORMING OPERATIONS; TRANSPORTING
B25J9/1664
PERFORMING OPERATIONS; TRANSPORTING
B25J9/1666
PERFORMING OPERATIONS; TRANSPORTING
International classification
Abstract
In a mechanical system with an object having a set of two or more contacts, methods are disclosed for determining object motion by computing the tangential generalized reaction impulse and force. The methods includes receiving input values that include an initial generalized position and an initial generalized velocity of the object at time t, and computing a generalized force. The methods further includes computing, respectively for the reaction impulse and force: a generalized reaction impulse and force, and a tangential generalized reaction impulse and force. The methods use the tangential generalized reaction impulse and force to, respectively, compute an end-of-interval generalized position and velocity, and a generalized acceleration, which are output for use by an application.
Claims
1. A computer-implemented method, executed by one or more processors and memory, for determining for an object having a set of two or more contacts and having at time t an initial generalized position q.sub.t and an initial generalized velocity q.sub.t, the object's end-of-interval generalized position q.sub.t+h and end-of-interval generalized velocity q.sub.t+h after an interval h, the method comprising: computing a generalized force f over the interval h, the generalized force being a summary of forces acting on the object other than forces due to the set of contacts, and which is used to define energy over the interval h; computing a normal generalized reaction impulse r.sub.n acting on the object; computing a tangential generalized reaction impulse r.sub.t acting on the object; and based on the tangential generalized reaction impulse r.sub.t, computing the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object; wherein the computing the tangential generalized reaction impulse r.sub.t further includes applying the following constraints to an objective function minimizing energy over the interval h: (a) associating each contact in the set of contacts with a friction cone in a space of generalized impulses to define a set of friction cones; (b) summing one term from each friction cone in the set of friction cones, minus the normal generalized reaction impulse r.sub.n; and (c) constraining the tangential generalized reaction impulse r.sub.t to be orthogonal to the normal generalized reaction impulse r.sub.n and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
2. The method of claim 1 further comprising computing an intermediate generalized position q.sub.m of the object over the interval h by taking a time-step duration that is of length h/2.
3. The method of claim 2 wherein the intermediate generalized position q.sub.m is given by a midpoint generalized position at time t.sub.m=t+h/2 by computing:
4. The method of claim 3 wherein the generalized force f over the interval h is given by M.sub.m.sup.?1f.sub.m, where M.sub.m is the midpoint mass matrix and f.sub.m is the midpoint force.
5. The method of claim 4, wherein the determining the end-of-interval generalized velocity q.sub.t+h is determined by computing:
6. The method of claim 5, wherein the determining the end-of-interval generalized velocity q.sub.t+h is determined by computing an end-of-interval free-velocity q.sub.1, given by:
7. The method of claim 6 wherein the objective function corresponding to minimizing energy over the interval h is given by:
8. The method of claim 5, wherein the determining the end-of-interval generalized position q.sub.t+h is determined by computing:
9. The method of claim 2, wherein the computing the normal generalized reaction impulse r.sub.t, is approximated over the interval h by computing:
10. The method of claim 9 wherein the one term from each friction cone is determined in a friction cone by multiplying a tangential contact Jacobian by a tangential cone-position variable w and adding it to the result of multiplying a normal contact Jacobian by a normal cone-position variable ?.
11. The method of claim 1 wherein the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object are computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
12. The method of claim 1 further comprising, based on at least one of the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object, at least one of steering an autonomous object, accelerating the autonomous object, and decelerating the autonomous object.
13. The method of claim 1 further comprising, based on at least one of the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object, actuating a component of the object, wherein the object is an autonomous object.
14. A computer-implemented method, executed by one or more processors and memory, for determining for an object having a set of two or more contacts and having at time t an initial generalized position q.sub.t and an initial generalized velocity q.sub.t, the object's generalized acceleration q.sub.t, the method comprising: computing a generalized force f which is a summary of forces acting on the object other than forces due to the set of contacts; computing a normal generalized reaction force R acting on the object; computing a tangential generalized reaction force R.sub.t acting on the object using the computed generalized force f to account for contacts associated with zero relative velocity at time t; and using the tangential generalized reaction force R.sub.t to compute the generalized acceleration q.sub.t of the object; wherein the computing the tangential generalized reaction force R.sub.t further comprises applying the following constraints to an objective function maximizing power dissipated by friction: (a) associating each contact in the set of contacts with a friction cone in a space of generalized impulses to define a set of friction cones; (b) summing one term from each friction cone in the set of friction cones, minus the normal generalized reaction force R.sub.n; and (c) constraining the tangential generalized reaction force R.sub.t to be orthogonal to the normal generalized reaction force R.sub.t, and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
15. The method of claim 14 wherein the object is an autonomous object.
16. The method of claim 14 wherein the power dissipated by friction is given by minus the scalar product of the tangential generalized reaction force R.sub.t and the initial generalized velocity q.sub.t.
17. The method of claim 14 wherein the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object are computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
18. The method of claim 1 wherein (c) is automatically satisfied when properties of friction cones in the set of friction cones satisfy a preset condition.
19. The method of claim 18 wherein the preset condition when the properties of friction cones in the set of friction cones are automatically satisfied in step (c) is when each friction cone F.sub.j in the set of friction cones satisfies:
20-24. (canceled)
25. A system for determining, for an object having a set of two or more contacts and having at time t an initial generalized position q.sub.t and an initial generalized velocity q.sub.t, the object's end-of-interval generalized position q.sub.t+h and end-of-interval generalized velocity q.sub.t+h after an interval h, the system comprising: one or more processors; and memory including code that, when executed by the one or more processors perform to: compute a generalized force f over the interval, which is a summary of forces acting on the system other than forces due to the set of contacts, and which is used to define energy over the interval h; compute a normal generalized reaction impulse r.sub.n acting on the object; compute a tangential generalized reaction impulse r.sub.t acting on the object; and based on the tangential generalized reaction impulse r.sub.t, compute the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object, wherein the computing the tangential generalized reaction impulse r.sub.t further includes applying the following constraints to an objective function minimizing energy over the interval h: (a) associating each contact in the set of contacts with a friction cone in a space of generalized impulses to define a set of friction cones; (b) summing one term from each friction cone in the set of friction cones, minus the normal generalized reaction impulse r.sub.n; and (c) constraining the tangential generalized reaction impulse r.sub.t to be orthogonal to the normal generalized reaction impulse r.sub.n and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
26. The system of claim 25 wherein the memory further includes code for a learning model that, when executed by the one or more processors, performs the following functions including computing an intermediate generalized position q.sub.m of the object over the interval h by taking a time-step duration that is of length h/2.
27. The system of claim 26 wherein the intermediate generalized position q.sub.m is given by a midpoint generalized position at time t.sub.m=t+h/2 by computing:
28. The system of claim 27 wherein the generalized force f over the interval h is given by M.sub.m.sup.?1f.sub.m, where M.sub.m is the midpoint mass matrix and f.sub.m is the midpoint force.
29. The system of claim 28, wherein the determining the end-of-interval generalized velocity q.sub.t+h is determined by computing:
30. The system of claim 29, wherein the determining the end-of-interval generalized velocity q.sub.t+h is determined by computing an end-of-interval free-velocity q.sub.1, given by:
31. The system of claim 30 wherein the objective function corresponding to minimizing energy over the interval h is given by:
32. The system of claim 29, wherein the determining the end-of-interval generalized position q.sub.t+h is determined by computing:
33. The system of claim 26, wherein the computing the normal generalized reaction impulse r.sub.t, is approximated over the interval h by computing:
34. The system of claim 33 wherein the one term from each friction cone is determined in a friction cone by multiplying a tangential contact Jacobian by a tangential cone-position variable w and adding it to the result of multiplying a normal contact Jacobian by a normal cone-position variable ?.
35. The system of claim 25 wherein the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object is computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
36. A system, for determining for an object having a set of two or more contacts and having at time t an initial generalized position q.sub.t and an initial generalized velocity q.sub.t, the object's generalized acceleration q.sub.t, the system comprising: one or more processors; memory including code that, when executed by the one or more processors perform to: compute a generalized force f which is a summary of forces acting on the system other than forces due to the set of contacts; compute a normal generalized reaction force R.sub.n acting on the object; compute a tangential generalized reaction force R.sub.t acting on the object using the computed generalized force f to account for contacts associated with zero relative velocity at time t; and based on the tangential generalized reaction force R.sub.t, compute the generalized acceleration q.sub.t of the object, wherein the computing the tangential generalized reaction force R.sub.t further includes applying the following constraints to an objective function maximizing power dissipated by friction: (a) associating each contact in the set of contacts with a friction cone in a space of generalized impulses to define a set of friction cones; (b) summing one term from each friction cone in the set of friction cones, minus the normal generalized reaction force R.sub.n; and (c) constraining the tangential generalized reaction force R.sub.t to be orthogonal to the normal generalized reaction force R.sub.n and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
37. The system of claim 36 wherein the system is a mechanical system with an autonomous object and one or more objects.
38. The system of claim 36 wherein the power dissipated by friction is given by minus the scalar product of the tangential generalized reaction force R.sub.t and the initial generalized velocity q.sub.t.
39. The system of claim 36 wherein the end-of-interval generalized position q.sub.t+h and the end-of-interval generalized velocity q.sub.t+h of the object is computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The present disclosure will become more fully understood from the detailed description and the accompanying drawings, wherein:
[0045]
[0046]
[0047]
[0048]
[0049]
[0050]
[0051]
[0052] In the drawings, reference numbers may be reused to identify similar and/or identical elements.
DETAILED DESCRIPTION
[0053] The systems and methods for determining reactions due to friction in multi-contact systems disclosed hereunder may be implemented within a system 2 architected as illustrated in
[0054] In one embodiment, the server 15a (with processor 11a and memory 12a) may include a map module 16 in memory 12a containing outdoor and indoor maps, and the server 15b (with processor 11b and memory 12b) may include a trajectory estimation module 17 in memory 12b that computes a trajectory of autonomous objects 6 which accounts for reactions due to friction. In one implementation, the methods of the present disclosure operate on server 15b of system 2. In another implementation, it is noted that the two servers 15a and 15b may be merged/integrated in one server. In yet another implementation, the functionality of the servers 15 may be merged with the autonomous objects 6.
[0055] These and other mechanical systems (e.g., autonomous objects 6 in
[0056] Further, a real-world description of mechanical systems is about 3D forces acting at specific 3D points in a 3D world (or 2D forces acting at specific 2D points in a 2D world), whereas it is not necessary to state where a generalized force acts. One useful consequence of this observation is that while the real-world description of a rigid body making contact with another body over an area may involve the specification of a pressure field over that contact area, which gives the pressure as a function of position, only a single finite-dimensional vector (the generalized force) is needed to describe everything that needs to be known about that pressure field to predict the motion of the bodies over the area.
2. Determining Object Motion by Computing Reaction Impulse
[0057]
[0058] The method depicted in the flowchart of
[0059] In addition, the time-stepping function depicted in
[0063] Moreover, for each active constraint j?j(q), the time-stepping function depicted in
[0067] The restitution coefficient e.sub.j and the friction coefficient ?.sub.j may be fixed for a given contact point, but they may reasonably be determined as functions of position and of velocity.
[0068] Further, the time-stepping function depicted in
[0069] Referring again to the time-stepping function depicted in
[0070] At 104 of the time-stepping function depicted in
for the corresponding midpoint mass matrix M.sub.m, midpoint force f.sub.m and midpoint set of active constraints J.sub.m, respectively:
More generally, approximate values may be computed for the midpoint generalized position q.sub.m at time t.sub.m=t+h/2 where midpoint values are computed by computing:
where K is a matrix-valued function of generalized position. For instance, if the generalized position q is given by Euler parameters (unit quaternions) then an appropriate choice of matrix function K is given in equation 4.13 of Featherstone et al. (2008).
[0071] At 106 of the time-stepping function depicted in
[0074] At 108 of the time-stepping function depicted in
[0075] At 110 of the time-stepping function depicted in
[0076] At 112 of the time-stepping function depicted in
[0077] The Poisson impact model applied at 112 includes or consists of a compression phase, where the impulse is sufficient to just stop any penetrating motion as in a fully inelastic collision, and a decompression phase, for which the impulse associated with contact j is at least a factor e.sub.1 larger than the corresponding impulse in the decompression phase. Specifically, for the compression phase the free velocity q f is projected into the space of velocities compatible with the constraints, by solving the quadratic program: [0078] minimize
with respect to ? ?R.sup.n, [0079] subject to n.sub.j,m.sup.*T ??0 for all fin J.sub.m.
[0080] Let ?.sub.j.sup.? be the Lagrange multiplier associated with constraint j at solution of this quadratic program. The quantity ?.sub.j.sup.?n.sub.j,m.sup.* approximates the normal generalized reaction impulse associated with the compression phase for contact j over time interval [t, t+h). For the decompression phase, the following linear complementarity problem is solved for Lagrange multipliers ?.sub.j.sup.+ for j in J.sub.m:
for j and k in J.sub.m. Under the reasonable assumptions that the vectors (n.sub.k,m.sup.*: k ?J.sub.m) are linearly independent and the mass matrix is symmetric positive definite, this linear complementarity problem has a unique solution, which may be determined by solving the quadratic program: [0081] minimize
with respect to ?.sub.j.sup.+?R for j in J.sub.m, [0082] subject to
and ?.sub.j.sup.+?e.sub.j?.sub.j.sup.??0 for all j in J.sub.m.
Finally, the normal reaction impulse r.sub.n is approximated over interval [t, t+h) by setting
[0083] At 114 of the time-stepping function depicted in
[0084] In
[0085] In
[0086] Referring to
[0087] With continued reference to
[0088] Referring again to 114 in
in which a vector w.sub.j is introduced, which is in R.sup.2 for a point contact in a 30 world, and a scalar ?.sub.1, and in which the inequality says that the pair (w.sub.j, ?.sub.j) lie in a circular cone, also known as a Lorentz cone. The sum of the normal reaction impulse r.sub.n and the tangential reaction impulse r.sub.t are constrained to lie in the sum over these friction cones. Equivalently, the tangential generalized reaction is constrained to be a sum with one term from each friction cone, minus the normal generalized reaction (hereinafter Constraint (1)):
where the one term from each friction cone is determined in a friction cone by multiplying a tangential contact Jacobian by a tangential cone-position variable w and adding it to the result of multiplying a normal contact Jacobian by a normal cone-position variable ? (which in an example the one term from each friction cone may be determined using the following Python code: Ht@w[?1]+Hn*gamma[?1] in which w and gamma are lists whose elements are of type cvxpy.Variable).
[0089] Moreover, the tangential and normal reactions may be tangential and normal in an appropriate sense. Regarding friction, the tangential space may be the subset of the real-world space vector space R.sup.3 that is orthogonal to the real-world direction normal to the contacting surfaces. However, a notion of tangential relative to the set of normal generalized reaction vectors may be sought here. As the normal generalized reaction lies in the closed convex cone
which is not in general a vector space (because only non-negative linear combinations of the normal directions are allowed), the appropriate sense is defined based on Moreau's Decomposition Theorem (see Jean-Jacques Moreau, D?composition orthogonale d'un espace hilbertien selon deux cones mutuellement polaires, Comptes rendus hebdomadaires des seances de I'Academie des sciences 255 (1962): 238-240, which is incorporated herein in its entirety (hereinafter Moreau (1962)), as is now explained. Given closed convex cone C, the polar cone C? includes or consists of all vectors that have a non-positive inner product with all vectors in the closed convex cone C. Given a closed convex cone C in a real Hilbert space H, Moreau's Decomposition Theorem says that any vector in H can be written uniquely as the sum of a vector in cone C and a vector in the polar cone CO, in such a way that these vectors are orthogonal. Thus, the tangential generalized reaction is constrained to be orthogonal to the normal generalized reaction and have a non-positive inner product with each contact's normal direction (so that it lies in the polar cone K?), using the appropriate inner product for generalized reactions, which involves the inverse mass matrix (hereinafter Constraint (2)):
[0090] The use of Moreau's Decomposition Theorem may have been used to define the notion of tangential generalized reaction due to friction without referring to Moreau (1962) in Alexandre Charles, Dynamique des systemes de so/ides rigides avec impacts et frottement Dissertation, Aix-Marseille, 2013, which use differs from the case of multiple contacts set forth herein as that use allows the tangential reaction to range only over a slice of the full friction cone given by Constraint (1).
[0091] Finally at 114, the one or more processors or one or more modules select from among the tangential reactions compatible with Constraint (1) and Constraint (2). This is done in such a way as to maximize the energy dissipated by the tangential reaction over time interval [t, t+h), or equivalently minimizing the energy at (or just a predetermined period before) the final time t+h. The idea of using a principle of maximum dissipation to select among frictional reactions is described in Jean-Jacques Moreau, Application of convex analysis to some problems of dry friction, Trends in applications of pure mathematics to mechanics, Pitman, 1977, which is incorporated herein in its entirety. Advantageously, a unique solution may be found for the tangential generalized reaction by maximizing the energy dissipated over an interval of duration h>0 because this involves the minimization of a strictly convex function. To derive the energy at the final time, the integral of the equation of motion over the time interval can be approximated by
Recalling the definition of the free velocity q.sub.1, =q.sub.t+hM.sub.m.sup.?1f.sub.m, it follows that
Thus, the energy at time t+h may be approximated by
When constraint (2) holds, so that r.sub.n and r.sub.t are orthogonal, minimizing this expression with respect to r.sub.t is the same as minimizing
Moreover, minimizing a non-negative expression is the same as minimizing its square root. Therefore, the tangential reaction can be computed by solving the following mathematical program (hereinafter Equation (3)): [0092] (3) minimize ?M.sub.m.sup.?1/2(M.sub.mq.sub.f+r.sub.t)?.sub.2 with respect to r.sub.t, w.sub.1, ?.sub.1 for j in J.sub.m subject to
[0093] Constraint (1) and Constraint (2) in which M.sub.m.sup.?1/2 is the matrix square root of M.sub.m.sup.?1. This type of program may be referred to as a second-order cone program, and may be solved, for example, as described in the CVXPY library (see for example S. Diamond and S. Boyd, in CVXPY: A Python-embedded modeling language for convex optimization, Journal of Machine Learning Research, 2016, and Akshay Agrawal, Robin Verschueren, Steven Diamond, and Stephen Boyd, A rewriting system for convex optimization problems, Journal of Control and Decision 5, no. 1 (2018): 42-60, which are incorporated herein in its entirety (hereinafter Agrawal et al. (2018))). To apply these algorithms, Equation (3) may be re-written in canonical form, in which the objective is a linear function. Using results disclosed by M. S. Lobo, L. Vandenberghe, S. Boyd, & H. Lebret, in Second-order cone programming Linear algebra and Applications, v. 284, pp. 193-228, 1998, which is incorporated herein in its entirety (hereinafter Lobo et al. (1998), one more scalar variable s and one more cone constraint are introduced (hereinafter Equation (4)):
and then one the second-order cone program can be written in canonical form as
[0094] (5) minimize s with respect to s, r.sub.t, w.sub.1, ?.sub.j for j in J.sub.m subject to (1), (2) and (4). Equation (5) is thus a summary of a method of finding the tangential reaction impulse r.sub.t.
[0095] At 116 of the time-stepping function depicted in
[0096] At 118 of the time-stepping function depicted in
[0097]
[0098] In various implementations, an initialization occurs as part of 114 in
[0104] Explicitly, the Initialization Process' alternative friction cones {tilde over (F)}.sub.j may be given by:
[0105] Those skilled in the art will appreciate that friction cones need not have circular or elliptical cross sections. The above three-step process extends naturally when F.sub.j is any convex cone. However, if using other types of cones in the disclosed methods, a more general optimization method may be needed than second-order cone programming.
3. Alternative Embodiments
3.A Formulation of Constraints
[0106] In the methods of the present disclosure, the normal reaction r.sub.n is of the form ?.sub.j?J.sub.
[0107] Also, various quantities may be multiplied by powers of mass matrix M.sub.m. For instance, the variable v.sub.t=M.sub.m.sup.?1r.sub.t, may also be solved for, which may be used to solve the following second-order cone program for variables v.sub.t, w.sub.j, ?.sub.1 for j in J.sub.m: [0108] minimize ?M.sub.m.sup.1/2 (q.sub.f+v.sub.t)?.sub.2 subject to M.sub.mv.sub.t=(?.sub.j?J.sub.
3.B Numerical Optimization
[0111] In an embodiment, the time-stepping function of the present disclosure is implemented using quadratic programming and second-order cone programming functions from the CVXPY library, but the present application is also applicable to other functions. Mechanical simulators may use non-linear Gauss-Seidel algorithms (see Charles et al. (2018)) and per contact iteration methods (see Hwangbo, J., Lee, J., & Huffer, M., Per-contact iteration method for solving contact dynamics, in IEEE Robotics and Automation Letters, 3(2), 895-902, 2018, which is incorporated herein in its entirety), and both may be adapted to the optimization problems encountered herein. Second-order cones may be approximated by linear cones and use methods for linear programming or linear complementarity (see: Stewart, David E. Rigid-body dynamics with friction and impact. SIAM Review 42.1 (2000): 3-39; and M. Anitescu and F. Potra, Formulating dynamic multi-rigid-body contact problems with friction as solvable linear complementarity problems, Nonlinear Dynamics, vol. 14, no. 3, pp. 231-247, Nov. 1997, which are incorporated herein in its entirety).
[0112] Two families of methods for numerical integration of mechanical systems that may undergo impacts are: (i) event-driven or event-tracking methods, which use high-order integration methods in times of smooth motion and accurately approximate the times of non-smooth motion (see Chapter 8 of Acary, Vincent, and Bernard Brogliato, Numerical methods for nonsmooth dynamical systems: applications in mechanics and electronics, Springer Science & Business Media, 2008, which is incorporated herein in its entirety (hereinafter Acary et al. (2008))); and (ii) time-stepping or event-capturing methods, which can cope with multiple impacts in a single time step (see Chapter 10 of Acary et al. (2008)), but which may only be accurate to low order, as they do not try to determine event times. Non-smooth generalized-alpha methods may be used (e.g., see Galvez, Javier, Federico J. Cavalieri, Alejandro Cosimo, Olivier Bruls, and Alberto Cardona. A nonsmooth frictional contact formulation for multibody system dynamics. International Journal for Numerical Methods in Engineering 121, no. 16 (2020): 3584 3609, which is incorporated herein in its entirety), which split the motion into a (non-smooth) impulsive contribution integrated with first-order accuracy, and a smooth contribution integrated with higher-order accuracy. While the present application provides the example of a time-stepping function, the present application (involving determining tangential reactions by summing friction cones, imposing orthogonality to the generalized normal, constraining to the polar cone for the space of normal reactions, and maximizing dissipation) may also be applied in conjunction with other families of integration method.
3.D Different Friction Models
[0113] The methods of the present application include friction models in which the set of friction forces at a contact is given by a cone that contains the generalized normal direction. The friction force may thus be directionally dependent (e.g., see Bullock, James MR, Patrick Drechsler, and Walter Federle, Comparison of smooth and hairy attachment pads in insects: friction, adhesion and mechanisms for direction-dependence, Journal of Experimental Biology 211, no. 20 (2008): 3333-3343, which is incorporated herein in its entirety), and it need not be symmetric to 180-degree rotations of the real-world force (in the case of sticking) or velocity (in the case of sliding). Moreover, while the time-stepping function described with reference to
for a suitable constant k, in the midpoint values step of the time-stepping function, to model static and kinetic friction coefficients ?.sub.j.sup.s and ?.sub.j.sup.k.
3.E Differentiating Methods
[0114] Several applications benefit from the possibility of differentiating a friction model with respect to various parameters: (i) in optimal control, it is helpful to differentiate the final state with respect to the initial state and control input; (ii) in design, adaptive control and system identification, it is helpful to differentiate the model with respect to lengths and inertia properties of the links of a mechanism; and (iii) in system identification, it is helpful to also differentiate the model with respect to the inertias, lengths, restitutions and friction parameters of objects or surfaces with which a mechanism is interacting, when both the mechanism and objects are parts of a common physical model.
[0115] Provided the associated functions (e.g., mass matrix, force, normal directions) of the model are differentiable with respect to the relevant parameters, the outputs of methods of the present disclosure may be differentiated, such as using the chain rule (i.e., how to differentiate composite functions). One aspect of solving for the tangential generalized reaction is to differentiate the solution of a second-order cone program with respect to parameters of that program. General results to take such a derivative are discussed in, for example, Agrawal et al. (2018), and an implementation of these results is available as part of the Python package diffcp available at github.com/cvxgrp/diffcp. Package diffcp may be accessed via the CVXPY library, provided the optimization problem is formulated in a manner that is compatible with disciplined parameterized programming (DPP, as described at cvxpy.org/tutoriaVadvanced/index.html #disciplined-parametrized-programming). Such a formulation is possible for the second-order cone program (SOCP) at hand.
[0116] Examples described herein may use one computational approach of what to do in situations where one or more constraints j are active (in the sense that the contacts touch, so that j ?j(q)), yet the Lagrange multiplier ?.sub.j vanishes on the time interval. This may not be considered the most physically satisfying approach, because it may allow such contacts to dissipate power, even though no normal reaction is needed to keep them apart. Another approach may be considered more physically satisfying: (i) the set of active constraints may be replaced with a set that are active and have a positive Lagrange multiplier, in the definition of the friction cone; and (ii) the free velocity is replaced by the tangential component of the free velocity. Specifically, (i) and (ii) amount to: in Constraint (1) above, replacing the set J.sub.m by the set (j ?J.sub.m: ?.sub.j>0); and in Equation (3) and Equation (4) above, replacing the free velocity q f by its tangential projection, which is the unique solution q.sub.ft of minimizing: [0117] q.sub.ft.sup.TM.sub.mq.sub.ft with respect to q.sub.ft and the real numbers ?.sub.j for j ?J.sub.m Subject to
4. Applications
4.A System Identification
[0118] The present application has many applications/uses. For example, the present application may be used for system identification (i.e., methods for building models of systems based on observed data of the systems). One approach is to use differentiable friction simulations for system identification, such as described in Le Lidec, Quentin, Igor Kalevatykh, Ivan Laptev, Cordelia Schmid, and Justin Carpentier, Differentiable simulation for physical system identification, IEEE Robotics and Automation Letters 6, no. 2, pp. 3413-3420, 2021, which is incorporated herein in its entirety (hereinafter Le Lidec et al. (2021)). As detailed in Section IV.B of Le Lidec et al. (2021), given one or more trajectories, derived from sensors on a robot and/or inferred from one or more videos, a loss function measures the difference between the predicted and measured trajectory. Estimates of the system parameters to be identified are adjusted (e.g., by a training module) based on minimizing the loss. While Le Lidec et al. (2021) describes using the mean-squared error in the state as a loss, one may beneficially use loss functions that account for dependence between measurement errors and heavy-tailed behavior of such errors. Le Lidec et al. (2021) describes how to attempt to identify a single scalar friction parameter for a box, and indicates that the described approach is also applicable to more complex scenarios involving multiple unknown parameters of walking robots. Le Lidec et al. (2021) make predictions using a time-stepping function, given by an iterative application of equation (5) in Le Lidec et al. (2021), which is based on Coulomb friction.
[0119] The time-stepping process used in Le Lidec et al. (2021) can be replaced with a time-stepping function based on the function set forth in
4.B Trajectory Optimization and Model Predictive Control
[0120] Concepts of the present application may be used with techniques for trajectory optimization and identification of linear feedback laws, in the presence of frictional contact. Two of such techniques are the two differential dynamic programming methods described in Budhiraja, Rohan, Justin Carpentier, Carlos Mastalli, and Nicolas Mansard, Differential dynamic programming for multi-phase rigid contact dynamics, In IEEE-RAS 18th International Conference on Humanoid Robots (Humanoids), pp. 1-9. 2018 (hereinafter Budhiraja et al. (2018)), which is incorporated herein in its entirety. Differential dynamic programming (DDP) designs a sequence of states and control inputs that minimizes the sum over time of a cost function, which is a function of state and control at each time, and which satisfies a dynamic programming equation (such as that in equation 2 of Budhiraja et al. (2018)). Given an initial guess for an optimal trajectory, DDP uses a local quadratic expansion of the state-action cost-to-go function and the state-value function (see equations 5, 6 and 8 of Budhiraja et al. (2018)). The DDP algorithm iteratively improves on the initial guess by a sequence of alternating backward and forward passes. In a backward pass of DDP, the local quadratic expansion is propagated backwards in time and a time-varying linear feedback control is derived by solving quadratic optimization problems (see equation 7 of Budhiraja et al. (2018)). In a forward pass of DDP, specific values of the control input are derived from the feedback law, and the state sequence is updated using a model of the full nonlinear dynamics (see equation 9 of Budhiraja et al. (2018)).
[0121] Concepts of the present application may be deployed in an application of DDP by letting the state dynamics function, f described in Budhiraja et al. (2018), be given by the time-stepping function of present application. The function f can provide the next state given the current state and control input, and that it is a twice differentiable function of those inputs (so that equation 6 of Budhiraja et al. (2018) can be applied). In another example, an extended version of DDP may be used in which the cost functions can depend on the normal and tangential reactions (as in equation 14 of Budhiraja et al. (2018)), for instance to model the costs of wear due to friction and damage due to repeated impacts or large normal reactions. To do this output may be the next state with function f and also returned may be the values of the reactions, which is the function g in equation 13 of Budhiraja et al. (2018). Indeed these reactions are readily available as the variables r.sub.n and r.sub.t in the time-stepping function discussed herein. It is necessary to differentiate g, which is possible as described herein. Given such functions, equation 15 of Budhiraja et al. (2018) shows how to calculate the local quadratic expansion of the state-action cost-to-go function, which are then inserted in the algorithm's backward iterations, no change being required to the forward iterations, which only make use of the methods disclosed herein via the dynamics function f.
[0122] In model predictive control (MPC), one is given a dynamic model of a process, a cost function over some time horizon and some constraints on the control or system state; and as new state information is received, one MPC optimizes the future control inputs to optimize the cost function over the time horizon from the current state. Thus, MPC can be seen as repeatedly solving a trajectory optimization problem at rates fast enough to execute the results in real time (e.g., see Neunert, Michael, Markus Stauble, Markus Giftthaler, Carmine D. Bellicoso, Jan Carius, Christian Gehring, Marco Huffer, and Jonas Buchli, Whole-body nonlinear model predictive control through contacts for quadrupeds, IEEE Robotics and Automation Letters 3, no. 3 (2018): 1458-1465, which is incorporated herein in its entirety), and the method disclosed hereunder can be deployed for instance, as described herein.
4.0 Reinforcement Learning of Control Policies
[0123] Concepts of the present application may be used with reinforcement learning (RL) algorithms to learn policies for the control of mechanical systems with frictional contacts. One way to deploy methods disclosed herein in such an RL system would be to replace the state transition function in the simulator used for RL training, with the time-stepping function depicted in
[0124] Moreover, such RL algorithms may not only be trained with domain randomization (e.g., of friction parameters) to serve to robustly control a mechanism, but might they might also perform some system identification or adaptation, such as to assist future decision-making. For example, a policy might make use of inputs from an adaption module trained by supervised learning using a simulator based the methods described herein, to predict an embedding of the properties of an environment, given a state-action history, for instance as described in Section IV.A of Kumar et al. (see Kumar, Ashish, Zhongyu Li, Jun Zeng, Deepak Pathak, Koushil Sreenath, and Jitendra Malik. Adapting rapid motor adaptation for bipedal robots. In 2022 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 1161-1168. IEEE, 2022, which is incorporated herein in its entirety).
4.D Design of Mechanical Systems
[0125] Concepts of the present application may be used in the design of mechanical systems. For instance, Xu et al. (see Xu, Jie, Tao Chen, Lara Zlokapa, Michael Foshey, Wojciech Matusik, Shinjiro Sueda, and Pulkit Agrawal. An End-to-End Differentiable Framework for Contact-Aware Robot Design. In Robotics: Science & Systems. 2021, which is incorporated herein in its entirety) propose to simultaneously optimize the physical structure (design) and control inputs of a robot, to minimize a loss function (a process known as co-design or co-optimization). Such applications couple a flexible morphology parameterization with a differentiable simulation of frictional contact, which is based on the ADD simulator (see Geilinger, Moritz, David Hahn, Jonas Zehnder, Moritz Bacher, Bernhard Thomaszewski, and Stelian Coros. ADD: Analytically differentiable dynamics for multi-body systems with frictional contact. ACM Transactions on Graphics (TOG) vol. 39, no. 6, pp. 1-15, 2020, which is incorporated herein in its entirety). As methods of the present disclosure may also serve as a differentiable physics simulator, it may be directly used in such co-optimization techniques.
5. Determining Object Acceleration by Computing Reaction Force
[0126] On time intervals on which there are no impacts, the present application may be used to estimate the reaction force (as shown in an embodiment in
[0127]
[0128] At 602 in
[0129] On time intervals with no impacts, the normal reaction force R may be determined by solving a complementary condition between the Lagrange multiplier and the second time derivative of the constraint function, for each constraint such that both the constraint function and its time derivative vanish. Such a condition is given explicitly as the variational inequality in Step 1 of the proof of Proposition 14 disclosed by Patrick Ballard, in The dynamics of discrete mechanical systems with perfect unilateral constraints, Archive for Rational Mechanics and Analysis, volume 154, 2000, which is incorporated herein in its entirety.
[0130] As in the time-stepping function set forth in
[0131] At 606 in
[0132] Let M, f, n.sub.j, H.sub.n,j, H.sub.t,j, H.sub.n,j, H.sub.t,j for j in J be the values of these associated functions described above when computed based on the input values t, q.sub.t q.
[0133] At 608 in
where tilde accents have been added to the variables to distinguish them from the analogous variables at 610 in
[0136] At 610 in
where the constraints (a) and (b) above may be identical to Constraint (1) and Constraint (2), respectively, of the time-stepping formulation as applied to a normal generalized reaction force R.sub.n and a tangential generalized reaction force R. The additional constraint (c) above says that the tangential generalized reaction force R.sub.t should dissipate at least as much power as the reaction force R.sub.t. Since the reaction force R.sub.t solves the first second-order cone program, it already dissipates as much power as possible subject to constraint (a) and constraint (b). Thus, the inequality in the constraint (c) may be replaced by an equality.
[0139] The second second-order cone program above can be put in canonical form (e.g., for the CVXPY library) by extending the method described in Lobo et al. (1998). One possible canonical form is: [0140] minimize ?+?.sub.j?J(H.sub.t,jw.sub.j+H.sub.n,j?.sub.j) q with respect to ?, R.sub.t, w.sub.j, ?.sub.j for j in J, [0141] subject to
in which are introduced a scalar variable ?, and a second-order cone constraint on that variable.
[0142] At 612 in
[0143] At 614 in
[0144] The method for computing the tangential generalized reaction force described above with reference to
[0145] Expression ? can be expanded in powers of h. The terms of 0(1) in such an expansion determine the reaction force for contacts that are currently slipping. In the limit h.fwdarw.0, expression ? is minimized if these 0(1) terms alone are minimized, as any terms of 0(h) vanish: this is the minimization at 608 in
[0146] In an alternate embodiment, the Initialization Process replacing cones F.sub.j with cones {tilde over (F)}.sub.j described above with respect to the computation of a generalized position and velocity may also be applied in the method of
[0147] In yet another embodiment when using cones {tilde over (F)}.sub.1, the Initialization Process referred to with respect to
[0148] These numbers exist and are unique if the normal directions {n.sub.j.sup.*}.sub.j?J are linearly independent.
[0149] In the first stage of the Streamlined Embodiment, a cone program is solved corresponding to maximizing the power dissipated at each constraint j in J: [0150] minimize (Pq).sup.TR.sub.j with respect to R.sub.j, w.sub.j, ?.sub.j [0151] subject to [0152] R.sub.j=H.sub.t,jw.sub.j+H.sub.n,j?.sub.j??.sub.jn.sub.j.sup.* and ?w.sub.j?.sub.2??.sub.j?.sub.j, [0153] n.sub.j.sup.*TM.sup.?1R.sub.j=0;
The tangential reaction resulting from the first stage is then given by
[0154] In the second stage of the Streamlined Embodiment a second second-order cone program is solved to resolve possible ambiguity about the tangential generalized reaction force due to contacts which are initially sticking or on the limit between sticking and slipping by: [0155] minimizing
The tangential reaction resulting from the second stage is given by
[0157] Impacts at the start of the Interval. The method for computing the tangential generalized reaction force described above with reference to
returns a value qdp for the generalized velocity, for which any normal and tangential impacts have both been resolved. Thus, the state t, q, qdp may be fed directly into the method for computing the tangential generalized reaction force described above with reference to
6.Overlaying Methods for Determining Object Motion and Acceleration
[0159]
[0160] At 702, input values are received in the case of the reaction impulse (i.e., the embodiment set forth in
[0161] At 704, a generalized force f.sub.m is computed, which is a summary of all forces acting on the system other than forces due to the contacts, and in the case of the reaction impulse is used to define energy over the interval, and which in the case of the reaction force is used to define an objective for a second-order cone program that accounts for contacts associated with zero relative velocity at time t (e.g., as computed at 610 in
[0162] At 710, a tangential generalized reaction impulse/force (i.e., for each respectively) is computed by applying the following constraints to an objective function, in the case of reaction impulse and force, respectively, that minimizes energy over the interval (where in one embodiment the objective function corresponding to minimizing energy over the interval is given by ?M.sub.m.sup.?1/2(M.sub.mq.sub.f+r.sub.t)?.sub.2 (see Equation (3) above)) and that is used to define power dissipated by friction (where in one embodiment the power dissipated by friction is given by minus the scalar product of the tangential generalized reaction force R.sub.t and the initial generalized velocity q.sub.t): (a) associating each contact in the set of contacts with a friction cone in a space of generalized impulses/forces to define a set of friction cones; (b) summing one term from each friction cone in the set of friction cones, minus the normal generalized reaction impulse/force; and (c) constraining the tangential generalized reaction impulse/force to be orthogonal to the normal generalized reaction impulse/force and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
[0163] The constraint at 710(c) may be automatically satisfied in the case of the Streamlined Embodiment because the projection matrix P* is defined as the projection into a subspace where the constrains hold with equality. More specifically, constraint at 710(c) may be automatically satisfied depending on properties of friction cones in the set of friction cones, such as when the properties of the friction cones in the set of friction satisfy Equation (2).
[0164] At 712, the tangential generalized reaction impulse is used to compute an end-of-interval generalized position and velocity, or the tangential generalized reaction force is used to compute a generalized acceleration, which are output at 714 for use by/for an application/use.
7. Advantages
[0165] 7.1 Existence of Solution. Unlike existing approaches, there is always a solution to the constraints imposed in the approach disclosed herein. Setting the tangential generalized reaction equal to zero satisfies the constraints of the approach disclosed herein.
[0166] 7.2 Uniqueness. Other approaches are known to have multiple solutions. In contrast, the approach disclosed herein gives a unique solution for the tangential generalized reaction (when using an embodiment with the maximum dissipation principle, because it involves the minimization of a strictly convex function).
[0167] 7.3 Energy consistency. Other approaches may predict gains in kinetic energy during frictional impacts, even for a single contact with Newtonian restitution. In contrast, the approach disclosed herein always conserves or dissipates energy during such impacts.
[0168] 7.4 Non-zero solutions for multiple contacts. Other approaches predict that the tangential generalized reaction is zero, in certain situations involving multiple contacts, such as a ladder in contact with a wall and a floor, in direct contradiction to everyday observations of physical reality. Unlike these approaches, the approach disclosed herein give non-zero results in situations with multiple contacts, in agreement with physical intuition.
[0169] 7.5 Correspondence to a continuous-time evolution problem. The disclosed approach corresponds to a well-defined continuous-time evolution problem, even at times where there are jumps in the velocity.
8. General
[0170] As an example, to avoid contacting an object, to contact an object, or to manipulate (e.g., interact with, move, grasp, etc.) an object, a control module of the vehicle 6a may actuate one or more components of the vehicle 6a to steer the vehicle 6a and/or decelerate or accelerate the vehicle 6a based on one or more parameters determined herein. As another example, to avoid contacting an object, to contact an object, or to manipulate (e.g., interact with, move, grasp, etc.) an object, a control module of the robot 6b may actuate one or more components of the vehicle 6a to steer the robot 6b and/or decelerate or accelerate the robot 6b, or move one or more components (e.g., arms) of the robot 6b based on one or more parameters determined herein.
[0171] The foregoing description is merely illustrative in nature and is in no way intended to limit the disclosure, its application, or uses. The broad teachings of the disclosure can be implemented in a variety of forms. Therefore, while this disclosure includes particular examples, the true scope of the disclosure should not be so limited since other modifications will become apparent upon a study of the drawings, the specification, and the following claims. It should be understood that one or more steps within a method may be executed in different order (or concurrently) without altering the principles of the present disclosure. Further, although each of the embodiments is described above as having certain features, any one or more of those features described with respect to any embodiment of the disclosure can be implemented in and/or combined with features of any of the other embodiments, even if that combination is not explicitly described. In other words, the described embodiments are not mutually exclusive, and permutations of one or more embodiments with one another remain within the scope of this disclosure.
[0172] Spatial and functional relationships between elements (for example, between modules, circuit elements, semiconductor layers, etc.) are described using various terms, including connected, engaged coupled, adjacent, next to, on top of, above below and disposed. Unless explicitly described as being direct, when a relationship between first and second elements is described in the above disclosure, that relationship can be a direct relationship where no other intervening elements are present between the first and second elements, but can also be an indirect relationship where one or more intervening elements are present (either spatially or functionally) between the first and second elements. As used herein, the phrase at least one of A, B, and C should be construed to mean a logical (A OR B OR C), using a non-exclusive logical OR, and should not be construed to mean at least one of A, at least one of B, and at least one of C.
[0173] In the figures, the direction of an arrow, as indicated by the arrowhead, generally demonstrates the flow of information (such as data or instructions) that is of interest to the illustration. For example, when element A and element B exchange a variety of information but information transmitted from element A to element B is relevant to the illustration, the arrow may point from element A to element B. This unidirectional arrow does not imply that no other information is transmitted from element B to element A. Further, for information sent from element A to element B, element B may send requests for, or receipt acknowledgements of, the information to element A.
[0174] In this application, including the definitions below, the term module or the term controller may be replaced with the term circuit The term module may refer to, be part of, or include: an Application Specific Integrated Circuit (ASIC); a digital, analog, or mixed analog/digital discrete circuit; a digital, analog, or mixed analog/digital integrated circuit; a combinational logic circuit; a field programmable gate array (FPGA); a processor circuit (shared, dedicated, or group) that executes code; a memory circuit (shared, dedicated, or group) that stores code executed by the processor circuit; other suitable hardware components that provide the described functionality; or a combination of some or all of the above, such as in a system-on-chip.
[0175] The module may include one or more interface circuits. In some examples, the interface circuits may include wired or wireless interfaces that are connected to a local area network (LAN), the Internet, a wide area network (WAN), or combinations thereof. The functionality of any given module of the present disclosure may be distributed among multiple modules that are connected via interface circuits. For example, multiple modules may allow load balancing. In a further example, a server (also known as remote, or cloud) module may accomplish some functionality on behalf of a client module.
[0176] The term code, as used above, may include software, firmware, and/or microcode, and may refer to programs, routines, functions, classes, data structures, and/or objects. The term shared processor circuit encompasses a single processor circuit that executes some or all code from multiple modules. The term group processor circuit encompasses a processor circuit that, in combination with additional processor circuits, executes some or all code from one or more modules. References to multiple processor circuits encompass multiple processor circuits on discrete dies, multiple processor circuits on a single die, multiple cores of a single processor circuit, multiple threads of a single processor circuit, or a combination of the above. The term shared memory circuit encompasses a single memory circuit that stores some or all code from multiple modules. The term group memory circuit encompasses a memory circuit that, in combination with additional memories, stores some or all code from one or more modules.
[0177] The term memory circuit is a subset of the term computer-readable medium. The term computer-readable medium, as used herein, does not encompass transitory electrical or electromagnetic signals propagating through a medium (such as on a carrier wave); the term computer-readable medium may therefore be considered tangible and non-transitory. Non-limiting examples of a non-transitory, tangible computer-readable medium are nonvolatile memory circuits (such as a flash memory circuit, an erasable programmable read-only memory circuit, or a mask read-only memory circuit), volatile memory circuits (such as a static random access memory circuit or a dynamic random access memory circuit), magnetic storage media (such as an analog or digital magnetic tape or a hard disk drive), and optical storage media (such as a CD, a DVD, or a Blu-ray Disc).
[0178] The apparatuses and methods described in this application may be partially or fully implemented by a special purpose computer created by configuring a general purpose computer to execute one or more particular functions embodied in computer programs. The functional blocks, flowchart components, and other elements described above serve as software specifications, which can be translated into the computer programs by the routine work of a skilled technician or programmer.
[0179] The computer programs include processor-executable instructions that are stored on at least one non-transitory, tangible computer-readable medium. The computer programs may also include or rely on stored data. The computer programs may encompass a basic input/output system (BIOS) that interacts with hardware of the special purpose computer, device drivers that interact with particular devices of the special purpose computer, one or more operating systems, user applications, background services, background applications, etc.
[0180] The computer programs may include: (i) descriptive text to be parsed, such as HTML (hypertext markup language), XML (extensible markup language), or JSON (JavaScript Object Notation) (ii) assembly code, (iii) object code generated from source code by a compiler, (iv) source code for execution by an interpreter, (v) source code for compilation and execution by a just-in-time compiler, etc. As examples only, source code may be written using syntax from languages including C, C++, C#, Objective-C, Swift, Haskell, Go, SQL, R.sub.t Lisp, Java?, Fortran, Perl, Pascal, Curl, OCaml, Javascript?, HTML5 (Hypertext Markup Language 5th revision), Ada, ASP (Active Server Pages), PHP (PHP: Hypertext Preprocessor), Scala, Eiffel, Smalltalk, Erlang, Ruby, Flash?, Visual Basic?, Lua, MATLAB, SIMULINK, and Python?.