Discrete mechanical systems, which may be used for determining motion of objects in space where the number of degrees of freedom of the objects is finite (including degrees of freedom describing deformations), finds applications today in multiple fields including autonomous objects and virtual reality. Systems using discrete mechanical systems to model objects must account for frictional contacts between objects to yield accurate results, for example a robot hand and an object grasped by the robot hand. As needs for real-time computation of rigid-body dynamics grows, there continues to exist a need for faster and more accurate systems and methods for modeling real-world systems using rigid-body dynamics for predicting the motion of objects.
In a feature, a computer-implemented method, using a computer having one or more processors and memory, determines for an object having a set of two or more contacts and having at time t an initial generalized position qt and an initial generalized velocity qt, the object's end-of-interval generalized position qt+h and end-of-interval generalized velocity qt+h after an interval h. The method includes: computing a generalized force f over the interval, which is 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 rn acting on the object; computing a tangential generalized reaction impulse rt acting on the object; and using the tangential generalized reaction impulse rt to compute the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object. The method further includes, computing the tangential generalized reaction impulse rt by 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 rn; and (c) constraining the tangential generalized reaction impulse rt to be orthogonal to the normal generalized reaction impulse rn and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
In a feature, a computer-implemented method, using a computer having one or more processors and memory, determines for an object having a set of two or more contacts and having at time t an initial generalized position qt and an initial generalized velocity qt, the object's generalized acceleration qt. The method includes: 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 Rt 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 Rt to compute the generalized acceleration qt of the object. The method further includes computing the tangential generalized reaction force Rt by 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 Rn; and (c) constraining the tangential generalized reaction force Rt to be orthogonal to the normal generalized reaction force Rn and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
In a feature, 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 qt and an initial generalized velocity qt, the object's end-of-interval generalized position qt+h and end-of-interval generalized velocity qt+h after an interval h is described. The method includes: 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 rn acting on the object; computing a tangential generalized reaction impulse rt acting on the object; and based on the tangential generalized reaction impulse rt, computing the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object; where the computing the tangential generalized reaction impulse rt 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 rn; and (c) constraining the tangential generalized reaction impulse rt to be orthogonal to the normal generalized reaction impulse rn and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
In further features, the method further includes computing an intermediate generalized position qm of the object over the interval h by taking a time-step duration that is of length h/2.
In further features, the method further includes the intermediate generalized position qm is given by a midpoint generalized position at time tm=t+h/2 by computing:
where K is a matrix-valued function.
In further features, the generalized force f over the interval h is given by Mm−1fm, where Mm is the midpoint mass matrix and fm is the midpoint force.
In further features, the determining the end-of-interval generalized velocity qt+h is determined by computing:
In further features, the determining the end-of-interval generalized velocity qt+h is determined by computing an end-of-interval free-velocity q1, given by:
In further features, the objective function corresponding to minimizing energy over the interval h is given by:
In further features, the determining the end-of-interval generalized position qt+h is determined by computing:
In further features, the computing the normal generalized reaction impulse r is approximated over the interval h by computing:
where Δj+ and Δj− are Lagrange multipliers and nj,m* are vectors.
In further features, 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 γ.
In further features, the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object are computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
In further features, the method further includes, based on at least one of the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object, at least one of steering a vehicle, accelerating the vehicle, and decelerating the vehicle.
In further features, the method further includes, based on at least one of the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object, actuating a component of the object, wherein the object is a robot.
In a feature, 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 qt and an initial generalized velocity qt, the object's generalized acceleration qt is described and includes: 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 Rt 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 Rt to compute the generalized acceleration qt of the object; where the computing the tangential generalized reaction force Rt 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 Rn; and (c) constraining the tangential generalized reaction force Rt to be orthogonal to the normal generalized reaction force Rn and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
In further features, the object is a robot.
In further features, the power dissipated by friction is given by minus the scalar product of the tangential generalized reaction force Rt and the initial generalized velocity qt.
In further features, the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object are computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
In a feature, a computer-implemented method, executed by one or more processors and memory, for determining, in a mechanical system with an object having a set of two or more contacts, a tangential generalized reaction due to friction given a normal generalized reaction is described and includes: associating each contact of the object in the set of contacts with a friction cone and a normal direction in a space of generalized forces or impulses to define a set of friction cones; building a total friction cone as the sum of the set of friction cones and a normal cone as the cone generated by these normal directions; and constraining the sum of the normal generalized reaction and tangential generalized reaction to lie in the total friction cone while the tangential generalized reaction is constrained to be orthogonal to the normal generalized reaction and to lie in a polar cone of the normal cone; outputting the tangential generalized reaction; where each friction cone is a set of vectors that is closed under addition and multiplication by a non-negative scalar; and where the polar cone of a given friction cone is the set of vectors that have a non-positive inner product with all vectors in the given friction cone.
In a feature, the mechanical system includes a robot and one or more objects.
In a feature, a computer-implemented method, executed by one or more processors and memory, for determining, in a mechanical system with an object having a set of two or more contacts, a tangential generalized reaction due to friction given a normal generalized reaction is described and includes: associating each contact of the object in the set of contacts with a friction cone and a normal direction in a space of generalized forces or impulses, the associating defining a set of friction cones; and constraining the tangential generalized reaction to be a sum with one term from each friction cone in the set of friction cones, minus the normal generalized reaction; and outputting the tangential generalized reaction, where 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.
In further features, the mechanical system includes a robot and one or more objects.
In further features, 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 γ.
In a feature, a system for determining, for an object having a set of two or more contacts and having at time t an initial generalized position qt and an initial generalized velocity qt, the object's end-of-interval generalized position qt+h and end-of-interval generalized velocity qt+h after an interval h is described and includes: one 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 rn acting on the object; compute a tangential generalized reaction impulse rt acting on the object; and based on the tangential generalized reaction impulse rt, compute the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object, where the computing the tangential generalized reaction impulse rt 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 rn; and (c) constraining the tangential generalized reaction impulse rt to be orthogonal to the normal generalized reaction impulse rn and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
In further features, 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 qm of the object over the interval h by taking a time-step duration that is of length h/2.
In further features, the intermediate generalized position qm is given by a midpoint generalized position at time tm=t+h/2 by computing:
where K is a matrix-valued function.
In further features, the generalized force over the interval his given by Mm−1fm, where Mm is the midpoint mass matrix and fm is the midpoint force.
In further features, the determining the end-of-interval generalized velocity qt+h is determined by computing:
In further, the determining the end-of-interval generalized velocity qt+h is determined by computing an end-of-interval free-velocity q f given by:
In further features, the objective function corresponding to minimizing energy over the interval h is given by:
In further features, the determining the end-of-interval generalized position qt+h is determined by computing
In further features, the computing the normal generalized reaction impulse rn is approximated over the interval h by computing:
where Δj+ and Δj− are Lagrange multipliers and nj,m* are vectors.
In further features, 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 γ.
In further features, the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object is computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
In a feature, a system, for determining for an object having a set of two or more contacts and having at time t an initial generalized position qt and an initial generalized velocity qt, the object's generalized acceleration qt, is described and includes: one 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 Rn acting on the object; compute a tangential generalized reaction force Rt 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 Rt, compute the generalized acceleration qt of the object, where the computing the tangential generalized reaction force Rt 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; and (c) constraining the tangential generalized reaction force Rt to be orthogonal to the normal generalized reaction force Rn and to have a non-positive inner product with the normal direction of each contact in the set of contacts.
In further features, the mechanical system is a robot and one or more objects.
In further features, the power dissipated by friction is given by minus the scalar product of the tangential generalized reaction force Rt and the initial generalized velocity qt.
In further features, the end-of-interval generalized position qt+h and the end-of-interval generalized velocity qt+h of the object is computed to perform one of system identification, trajectory optimization, learning control policies, and design of mechanical systems.
Further areas of applicability of the present disclosure will become apparent from the detailed description, the claims and the drawings. The detailed description and specific examples are intended for purposes of illustration only and are not intended to limit the scope of the disclosure.
The present disclosure will become more fully understood from the detailed description and the accompanying drawings, wherein:
In the drawings, reference numbers may be reused to identify similar and/or identical elements.
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
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.
These and other mechanical systems (e.g., autonomous objects 6 in
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.
The method depicted in the flowchart of
In addition, the time-stepping function depicted in
Moreover, for each active constraint j∈j(q), the time-stepping function depicted in
The restitution coefficient ej and the friction coefficient μj may be fixed for a given contact point, but they may reasonably be determined as functions of position and of velocity.
Further, the time-stepping function depicted in
Referring again to the time-stepping function depicted in
At 104 of the time-stepping function depicted in
for the corresponding midpoint mass matrix Mm, midpoint force fm and midpoint set of active constraints Jm, respectively:
More generally, approximate values may be computed for the midpoint generalized position qm at time tm=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).
At 106 of the time-stepping function depicted in
At 108 of the time-stepping function depicted in
At 110 of the time-stepping function depicted in
At 112 of the time-stepping function depicted in
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 e1 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:
with respect to μ ∈Rn,
Let Δj− be the Lagrange multiplier associated with constraint j at solution of this quadratic program. The quantity Δj−nj,m* 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 Δj+ for j in Jm:
for j and k in Jm. Under the reasonable assumptions that the vectors (nk,m*: k ∈Jm) 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:
with respect to Δj+∈R for j in Jm,
and Δj+−ejΔj−≥0 for all j in Jm.
Finally, the normal reaction impulse rn is approximated over interval [t, t+h) by setting
At 114 of the time-stepping function depicted in
In
In
Referring to
With continued reference to
Referring again to 114 in
in which a vector wj is introduced, which is in R2 for a point contact in a 30 world, and a scalar γ1, and in which the inequality says that the pair (wj, γj) lie in a circular cone, also known as a Lorentz cone. The sum of the normal reaction impulse rn and the tangential reaction impulse rt 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).
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 R3 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)”):
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).
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 q1, =qt+hMm−1fm, it follows that
Thus, the energy at time t+h may be approximated by
When constraint (2) holds, so that rn and rt are orthogonal, minimizing this expression with respect to rt 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)”):
Constraint (1) and Constraint (2) in which Mm−1/2 is the matrix square root of Mm−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
(5) minimize s with respect to s, rt, w1, γj for j in Jm subject to (1), (2) and (4). Equation (5) is thus a summary of a method of finding the tangential reaction impulse rt.
At 116 of the time-stepping function depicted in
At 118 of the time-stepping function depicted in
In various implementations, an initialization occurs as part of 114 in
Explicitly, the Initialization Process' alternative friction cones {tilde over (F)}j may be given by:
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 Fj 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.
In the methods of the present disclosure, the normal reaction rn is of the form Σj∈J
Also, various quantities may be multiplied by powers of mass matrix Mm. For instance, the variable vt=Mm−1rt, may also be solved for, which may be used to solve the following second-order cone program for variables vt, wj, γ1 for j in Jm:
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).
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.
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 μjs and μjk.
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.
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.
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 λ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 Jm by the set (j ∈Jm: λ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 qft of minimizing:
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.
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
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)).
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 rn and rt 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.
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.
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
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).
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.
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
At 602 in
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.
As in the time-stepping function set forth in
At 606 in
Let M, f, nj, Hn,j, Ht,j, Hn,j, Ht,j for j in J be the values of these associated functions described above when computed based on the input values t, qt q.
At 608 in
where tilde accents have been added to the variables to distinguish them from the analogous variables at 610 in
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 Rn and a tangential generalized reaction force R. The additional constraint (c) above says that the tangential generalized reaction force Rt should dissipate at least as much power as the reaction force Rt. Since the reaction force Rt 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.
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:
in which are introduced a scalar variable γ, and a second-order cone constraint on that variable.
At 612 in
At 614 in
The method for computing the tangential generalized reaction force described above with reference to
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→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
In an alternate embodiment, the Initialization Process replacing cones Fj with cones {tilde over (F)}j described above with respect to the computation of a generalized position and velocity may also be applied in the method of
In yet another embodiment when using cones {tilde over (F)}1, the Initialization Process referred to with respect to
These numbers exist and are unique if the normal directions {nj*}j∈J are linearly independent.
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:
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:
The tangential reaction resulting from the second stage is given by
Impacts at the start of the Interval. The method for computing the tangential generalized reaction force described above with reference to
At 702, input values are received in the case of the reaction impulse (i.e., the embodiment set forth in
At 704, a generalized force fm 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
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 ∥Mm−1/2(Mmqf+rt)∥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 Rt and the initial generalized velocity qt): (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.
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).
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.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.
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).
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.
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.
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.
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.
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.
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.”
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.
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.
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.
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.
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).
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.
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.
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, Rt 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®.
This application claims the benefit of U.S. Provisional Application No. 63/453,208, filed on Mar. 20, 2023. The entire disclosure of the application referenced above is incorporated herein in its entirety. The present disclosure relates to discrete mechanical systems that include rigid-body dynamics and more particularly to systems and methods for determining reactions due to friction in multi-contact systems.
Number | Date | Country | |
---|---|---|---|
63453208 | Mar 2023 | US |