How to take the gradient of this function similar to quadratic form?

63 Views Asked by At

This question is about Lagrangian multi-rigid body dynamics equation.

forward kinematics is $$ x=G(q) $$

first-order differential forward kinematics equation is $$ \dot x= J(q) \dot q $$

Lagrangian expressed in Cartesian space is $$L(x,\dot x) = T(x,\dot x) - U(x) $$

Lagrangian equation expressed in Cartesian space $$ \frac{d}{dt} (\frac{\partial L}{\partial \dot x}) - \frac{\partial L}{\partial x} = F $$

the kinetic energy in Cartesian space

$$T(x,\dot x) = \frac{1}{2} \dot x^T \Lambda (x) \dot x $$

$\Lambda (x)$ is a symmetric matrix

the kinetic energy in Joint space

$$T(q,\dot q) = \frac{1}{2} \dot q^T A(q) \dot q $$

$ A(q)$ is a symmetric matrix

$$ \Lambda (x) = J(q)^{-T} A (q) J(q) ^{-1} $$

How to get $\frac{\partial T(x, \dot x)}{\partial x}$ i.e. $\nabla T(x, \dot x)$ with $ A(q), J(q) $ Could anyone help me out? Thanks in advance!

the answer is in lecture page 58 Chapter 4 Operational Space Framework Joint Space/Operational Space Relationships

enter image description here enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

We will use the definition $T = \frac12 \dot{\mathbf{q}}: \mathbf{A}(\mathbf{q}) \dot{\mathbf{q}} $ and the fact that $\mathbf{J}^{-1} d\mathbf{x}=d\mathbf{q}$. For convenience, the dot product will be denoted with the double colon notation.

Using differentials, it holds \begin{eqnarray*} dT &=& \mathbf{A}(\mathbf{q})\dot{\mathbf{q}}: d\dot{\mathbf{q}}+ \frac12 \dot{\mathbf{q}}: (d\mathbf{A}) \dot{\mathbf{q}} \\ &=& \mathbf{A}(\mathbf{q})\dot{\mathbf{q}}: \frac{d}{dt} \left( \mathbf{J}^{-1} \right) d\mathbf{x}+ \frac12 \dot{\mathbf{q}}: \left( \sum_k \frac{\partial \mathbf{A}}{\partial q_k} d q_k \right) \dot{\mathbf{q}} \\ &=& \left[ \frac{d}{dt} \left( \mathbf{J}^{-1} \right) \right]^T \mathbf{A}(\mathbf{q})\dot{\mathbf{q}}: d\mathbf{x} + \sum_k l_k dq_k \end{eqnarray*} with $ l_k = \frac12 \dot{\mathbf{q}}: \frac{\partial \mathbf{A}}{\partial q_k} \dot{\mathbf{q}} $ and the relation $ \sum_k l_k dq_k = \mathbf{l}(\mathbf{q},\dot{\mathbf{q}}):d\mathbf{q} = \mathbf{l}(\mathbf{q},\dot{\mathbf{q}}):\mathbf{J}^{-1} d\mathbf{x} = \mathbf{J}^{-T} \mathbf{l}(\mathbf{q},\dot{\mathbf{q}}): d\mathbf{x} $.

The gradient is thus as requested given by $$ \frac{\partial T}{\partial \mathbf{x}} = \left[ \frac{d}{dt} \left( \mathbf{J}^{-1} \right) \right]^T \mathbf{A}(\mathbf{q})\dot{\mathbf{q}} + \mathbf{J}^{-T} \mathbf{l}(\mathbf{q},\dot{\mathbf{q}}) $$