# Cartesian Impedance control Damping Design (Double Diagonalization)

In the literature, it is often seen that for a system:

\begin{align} \Lambda \ddot{e} + D_d \dot{e} + K_d e = F_{ext} \end{align}

A dynamic damping matrix is required for a robot to take into account the structure and changes of $$\Lambda$$ during movement. Hence the following method called the "double diagonalization".

Given a symmetric and positive definite matrix $$\Lambda \in \mathcal{R}^{n\times n}$$ and a symmetric matrix $$K_d \in \mathcal{R}^{n\times n}$$, one can find a non singular matrix $$Q \in \mathcal{R}^{n\times n}$$ and a diagonal matrix $$B_0 \in \mathcal{R}^{n\times n}$$ such that: \begin{align} \Lambda &= Q^\intercal Q\\ K_d &= Q^\intercal B_0 Q \end{align} Where the diagonal elements of $$B_0$$ are the generalized eigenvalues of $$K_d$$

The design of the damping matrix becomes: \begin{align} D_d = 2 Q^\intercal diag( \xi \sqrt(\lambda_{K,i}^\Lambda) Q) \end{align}

Such that \begin{align} Q^\intercal Q \ddot{x} + 2 Q^\intercal diag( \xi \sqrt(\lambda_{K,i}^\Lambda) Q) \dot{x} + Q^\intercal B_0 Q x = F_{ext} \end{align}

where $$\xi_i$$ is the damping factor in the range of $$[0,1]$$, $$\lambda_{K,i}^\Lambda$$ is the i'th diagonal element of $$B_0$$

- Yeah, I 'm pretty dumb (I'm guessing the solution is simple but I cannot see it). I cannot figure out how to solve for the matrices $$Q$$ and $$B_0$$, such that (in particular) $$\Lambda = Q^\intercal Q$$. What am I missing? Can elaborate for me?

How do I solve this?

Sources: (this article should be free and provide some context.) (Albu-Schaffer, Alin, et al., 2003)

• Great question! I've bookmarked this because I've had unsatisfactory results with a vanilla state feedback controller and I'm about to embark on my own impedance control project. I always find it particularly infuriating when papers skip major steps; they'll typically work through some derivation to a point, skip the important implementation steps, and then jump straight into some results figures. Anyways, good luck with the question, I'll be watching for answers!
– Chuck
Commented May 26, 2020 at 12:46
• @Chuck Yeah, I very much relate to that - that's precisely how I felt about this topic. And thanks for the encouragement :)! a bit late, now that someone has answered the question. but thanks. Commented May 26, 2020 at 20:30

A hint towards what the answer is given in the paper. Namely, one can use the generalized eigenvalue decomposition, which in this case can be formulated as finding eigenvalues $$\lambda \in \mathbb{R}$$ and eigenvectors $$v \in \mathbb{R}^n$$ such that

$$(\lambda\,\Lambda - K_d)\,v = 0. \tag{1}$$

Consider two distinct solutions $$(\lambda_i,v_i)$$ and $$(\lambda_j,v_j)$$ of $$(1)$$, which can also be written as

\begin{align} \lambda_i\,\Lambda\,v_i &= K_d\,v_i, \tag{2a} \\ \lambda_j\,\Lambda\,v_j &= K_d\,v_j. \tag{2b} \end{align}

By pre-multiplying $$(2a)$$ by $$v_j^\top$$ and $$(2b)$$ by $$v_i^\top$$ one gets

\begin{align} \lambda_i\,v_j^\top \Lambda\,v_i &= v_j^\top K_d\,v_i, \tag{3a} \\ \lambda_j\,v_i^\top \Lambda\,v_j &= v_i^\top K_d\,v_j. \tag{3b} \end{align}

When using that $$M = M^\top$$ and $$K_d = K_d^\top$$ it follows that when subtracting the transpose of $$(3b)$$ from $$(3a)$$ one gets

$$(\lambda_i - \lambda_j)\,v_j^\top \Lambda\,v_i = 0. \tag{4}$$

Thus when $$\lambda_i \neq \lambda_j$$ it follows that $$v_j^\top \Lambda\,v_i = 0$$, from which together with $$(3a)$$ it also follows that $$v_j^\top K_d\,v_i = 0$$. When $$i \neq j$$ but $$\lambda_i = \lambda_j$$ this orthogonality property between vectors $$v_i$$ and $$v_j$$, and matrices $$\Lambda$$ and $$K_d$$ does not immediately follow. It can be noted that $$\lambda_i = \lambda_j = \lambda$$ means that the kernel of $$\lambda\,\Lambda - K_d$$ has a dimension larger then one, such that for all $$\alpha,\beta\in\mathbb{R}$$ the vector $$v = \alpha\,v_i + \beta\,v_j$$ would satisfy $$(1)$$. However, most generalized eigenvalue problem solvers "choose" $$\alpha$$ and $$\beta$$ such that they do ensure that $$v_j^\top \Lambda\,v_i = 0$$ and $$v_j^\top K_d\,v_i = 0$$ whenever $$\lambda_i = \lambda_j$$.

When defining $$V$$ as the matrix whose columns are equal to $$v_i\ \forall\,i=1,2,\cdots, n$$ it follows from $$v_j^\top \Lambda\,v_i = v_j^\top K_d\,v_i = 0$$ that $$V^\top \Lambda\,V$$ and $$V^\top K_d\,V$$ are diagonal matrices. By also dividing each $$i$$th column of $$V$$ by $$\sqrt{v_i^\top \Lambda\,v_i}$$ one also obtains that $$V^\top \Lambda\,V = I$$ and $$V^\top K_d\,V = \text{diag}(\lambda_1,\lambda_2,\cdots,\lambda_n)$$. Solving this for $$\Lambda$$ and $$K_d$$ yields

\begin{align} \Lambda &= V^{-\top} V^{-1}, \tag{5a} \\ K_d &= V^{-\top} \text{diag}(\lambda_1,\lambda_2,\cdots,\lambda_n)\,V^{-1}, \tag{5b} \end{align}

which is equivalent to using $$Q = V^{-1}$$ and $$B_0 = \text{diag}(\lambda_1,\lambda_2,\cdots,\lambda_n)$$.

For more information of this derivation see section 3.3.2 from the book De Kraker, A. (2009). Mechanical vibrations. Shaker Publishing BV.

• I love you, man. Commented May 26, 2020 at 20:28