# Inertial Parameter Identification in Robotics: A Survey
## 4 The Instrumental Variables (IV) and Maximum Likelihood (ML) Approaches  
### Inverse Dynamics Identification Model (IDIM) and Instrumental Variables (IV)  
First introduced by [64] in the context of econometrics, the Instrumental Variables (IV) approach to parameter identification consists of defining an _instrument matrix_\(\mathbf{Z}\in\mathbb{R}^{(n\cdot N)\times b}\) such that  
\[\mathrm{E}(\mathbf{Z}^{\top}W) \text{is full column rank}, \tag{28a}\] \[\mathrm{E}(\mathbf{Z}^{\top}\mathbf{\varepsilon}) = 0, \tag{28b}\]  
which means that \(\mathbf{Z}\) is both well correlated with the observation matrix \(W\) and uncorrelated with the error term \(\mathbf{\varepsilon}\), see e.g., [6; 66; 65]. In this case, one obtains  
\[\mathbf{Z}^{\top}\mathbf{y}_{\top}=\mathbf{Z}^{\top}\mathbf{W}(\mathbf{\ddot{q}},\mathbf{\dot{q}},\bm {q})\mathbf{\beta}+\mathbf{Z}^{\top}\mathbf{\varepsilon} \tag{29}\]  
and the IV estimates given by  
\[\mathbf{\dot{\beta}}=(\mathbf{Z}^{\top}\mathbf{W})^{-1}\mathbf{Z}^{\top}\mathbf{y}_{\top} \tag{30}\]  
are consistent. The use of IV for identification of robotic systems is reported in several approaches (see for instance [6; 67; 68; 69; 70] and the references therein). The critical issue here lies in the construction of the instrument matrix \(\mathbf{Z}\) fulfilling (28a) and (28b). In this context, an ideal candidate for the \(\mathbf{Z}\) instrument matrix appears to be the observation matrix denoted \(\mathbf{W}_{s}\) filled with simulated data that are the outputs of an auxiliary model, [66]. As explained in [6], for robot identification, the auxiliary model is the direct dynamic model (DDM) which is simulated assuming the same controller and reference trajectories that the one applied to the actual robot (c.f. Figure 1), and using the IV estimate \(\mathbf{\dot{\beta}}_{IV}^{i-1}\) obtained at the previous iteration. This defines an iterative algorithm. At iteration \(i\) and time epoch \(t_{k}\), the vector of simulated joint accelerations \(\mathbf{\ddot{q}}_{s}^{i}(t_{k})\) is computed as  
\[\mathbf{\ddot{q}}_{s}^{i}(t_{k})=\mathbf{M}^{-1}(\mathbf{\dot{\beta}}_{IV}^{i-1},\mathbf{\dot{ q}}_{s}^{i}(t_{k}))\left(\mathbf{\tau}_{s}^{i}(t_{k})-\mathbf{h}(\mathbf{\dot{\beta}}_{IV}^{i-1},\mathbf{q}_{s}^{i}(t_{k}),\mathbf{\dot{q}}_{s}^{i}(t_{k}))\right). \tag{31}\]  
By successive numerical integration of (31) one can obtain the vector of joint simulated positions and velocities denoted \((\mathbf{q}_{s}^{i},\mathbf{\dot{q}}_{s}^{i})\), respectively, from which it is then possible to build the instrument matrix \(\mathbf{Z}^{i}\in\mathbb{R}^{(n\cdot N)\times b}\) by stacking the regression matrices \(\mathbf{Y}_{\beta}(\mathbf{q}_{s}^{i},\mathbf{\dot{q}}_{s}^{i},\mathbf{\ddot{q}}_{s}^{i})\) obtained from the samples of \(\mathbf{q}_{s}^{i},\mathbf{\dot{q}}_{s}^{i},\mathbf{\ddot{q}}_{s}^{i}\) at each \(t_{k}\) as  
\[\mathbf{Z}^{i}=\mathbf{W}_{s}^{i}=\mathbf{W}\left(\mathbf{q}_{s}^{i},\mathbf{\dot{q}}_{s}^{i},\mathbf{ \ddot{q}}_{s}^{i}\right). \tag{32}\]  
Assuming that there are no modeling errors, the simulated joint positions, velocities and accelerations tend to the noise-free estimates denoted \((\mathbf{q}_{nf},\mathbf{\dot{q}}_{nf},\mathbf{\ddot{q}}_{nf})\), respectively, yielding  
\[\mathbf{Z}^{i}=\mathbf{W}_{nf}^{i}=\mathbf{W}\left(\mathbf{q}_{nf}^{i},\mathbf{\dot{q}}_{nf}^{i}, \mathbf{\ddot{q}}_{nf}^{i}\right)\forall i\,. \tag{33}\]  
Please note that \(\mathbf{Z}^{i}\) given by (33) naturally complies with the conditions (28a) and (28b). In [6; 69; 70; 52] the IDIM-IV estimates are formulated in a weighted recursive manner as:  
\[\mathbf{\dot{\beta}}_{IV}^{i}=(\mathbf{W}_{s}^{i\top}\mathbf{\Sigma}^{-1}\mathbf{W})^{-1}\mathbf{W} _{s}^{i\top}\mathbf{\Sigma}^{-1}\mathbf{y}_{\top} \tag{34}\]where \(\mathbf{W}_{s}^{i}\) is given by (32).