This is the current computation of $\tau_{desired}$ for the Object - Impedance Control.
$$ \begin{equation}\boldsymbol{\tau}{\text{desired}} = \mathbf{J}H^{T} \bigg[ \underbrace{\mathbf{G}^{+} \Big( \mathbf{K} (\mathbf{q}d - \mathbf{q}) + \mathbf{K}d (\dot{\mathbf{q}}d - \dot{\mathbf{q}}) \Big)}{\mathbf{f}{\text{imp}}} + \underbrace{(\mathbf{I} - \mathbf{G}^{+} \mathbf{G}) \Phi{\text{o}}}{\mathbf{f}{\text{null}}} \bigg].\end{equation} $$
Now our objective is to make sure that the forces generated from this equation $\bold{f_{imp}}$ and $\bold{f_{null} }$ should lie withing the friction cone.
$\bold{f_{imp}}$ is the object-level wrench for tracking
$\bold{f_{null} }$ is the internal-force component that does not affect the net wrench.
The internal-force varaible is $\bold{\phi_o}$ is what we will solve for to keep the resultant contact forces inside the friction cones.
Below, we derive the objective function as :-
$$ \begin{equation} \min_{\Phi_{\text{o}}} \frac{1}{2} \big\| \mathbf{G}^{+} \Big( \mathbf{K} (\mathbf{q}_d - \mathbf{q}) + \mathbf{K}_d (\dot{\mathbf{q}}d - \dot{\mathbf{q}}) \Big) + \big( \mathbf{I} - \mathbf{G}^{+} \mathbf{G} \big) \Phi{\text{o}} \big\|^2 \end{equation} $$
$$ \begin{equation}\min_{\Phi_{\text{o}}} \frac{1}{2} \big\| \mathbf{f}{\text{imp}} + \mathbf{f}{\text{null}} \big\|^2\end{equation} $$
$$ \begin{equation}\min_{\Phi_{\text{o}}} \frac{1}{2} \big\| \mathbf{f}(\Phi_{\text{o}}) \big\|^2\end{equation} $$
Now we have the constraints,
$$ \begin{equation}\sqrt{f_{ix}^2 + f_{iy}^2} \leq \mu_i f_{iz}\end{equation} $$