## 5 Numerical Simulation  
### Dynamic Model  
To illustrate the design of the proposed adaptive control scheme in the task space, we give an example of a two-link rigid robot. The dynamics of the robot in joint space can be formulated by the following matrices in (1):  
\[M(q)=\left[\begin{array}{cc}m_{1}l_{c1}^{2}+m_{2}(l_{1}^{2}+l_{c2}^{2}+2l_{1 }l_{c2}cos(q_{2}))+I_{1}+I_{2}&m_{2}(l_{c2}^{2}+l_{1}l_{c2}cos(q_{2}))+I_{2}\\ m_{2}(l_{c2}^{2}+l_{1}l_{c2}cos(q_{2}))+I_{2}&m_{2}l_{c2}^{2}+l_{2}\end{array}\right] \tag{30}\]  
\[C\Big{(}q,\dot{q}\Big{)}=\left[\begin{array}{cc}-m_{2}l_{1}l_{c2}sin(q_{2}) \dot{q}_{2}&-m_{2}l_{1}l_{c2}sin(q_{2})\Big{(}\dot{q}_{1}+\dot{q}_{2}\Big{)}\\ m_{2}l_{1}l_{c2}sin(q_{2})\dot{q}_{1}&0\end{array}\right] \tag{31}\]  
\[G(q)=\left[\begin{array}{cc}(m_{1}l_{c1}+m_{2}l_{1})g\;cos(q_{1})+m_{2}l_{c2 }g\;cos(q_{1}+q_{2})\\ m_{2}l_{c2}g\;cos(q_{1}+q_{2})\end{array}\right] \tag{32}\]  
where \(m_{1}=1\;\mathrm{kg},\;m_{2}=2\;\mathrm{kg},\;l_{1}=1\;\mathrm{m},\;l_{2}=1.2 \;\mathrm{m},\;l_{c1}=0.5\;\mathrm{m},\;l_{c2}=0.6\;\mathrm{m},I_{1}=0.12\; \mathrm{kgm}^{2},\;l_{2}=0.25\;\mathrm{kgm}^{2},\;g=9.81\;\mathrm{m}/\;\mathrm{ sec}^{2}\) are the parameters of the two-link robot for numerical simulation.  
From the property of linear parameterization, the robot parameters \(\theta_{d}\) can be selected as follows:  
\[\theta_{d}=\left[\theta_{d1}\;\theta_{d2}\;\theta_{d3}\;\theta_{d4}\;\theta_{d5 }\;\right]^{T}\in R^{5\times 1} \tag{33}\]  
where  
\[\theta_{d1}=I_{1}+I_{2}+m_{1}l_{c1}^{2}+m_{2}(l_{1}^{2}+l_{c2}^{2}),\theta_{d2 }=I_{2}+m_{2}l_{c2}^{2},\]  
\[\theta_{d3}=m_{2}l_{1}l_{c2},\;\theta_{d4}=m_{1}l_{c1}+m_{2}l_{1},\theta_{d5}= m_{2}l_{c2}\]  
Then, the dynamic regressor matrix \(Y_{r}\in R^{2\times 5}\) can be expressed as  
\[Y_{r}=\left[\begin{array}{cc}\ddot{q}_{1r}&\ddot{q}_{2r}&\big{(}2\ddot{q}_{1 r}+\ddot{q}_{2r}\big{)}cos(q_{2})-(\dot{q}_{2}\dot{q}_{1r}+\big{(}\dot{q}_{1}+ \dot{q}_{2}\big{)}\dot{q}_{2r})sin(q_{2})&g\;cos(q_{1})&g\;cos(q_{1}+q_{2})\\ 0&\ddot{q}_{1r}+\ddot{q}_{2r}&sin(q_{2})\dot{q}_{1}\dot{q}_{1r}+cos(q_{2}) \ddot{q}_{1r}&0&g\;cos(q_{1}+q_{2})\end{array}\right] \tag{34}\]  
The image Jacobian matrix \(J_{I}\) for a fixed camera can be given as:  
\[J_{I}=\left[\begin{array}{cc}v_{1}&0\\ 0&v_{2}\end{array}\right]\]  
where \(v_{1}\) and \(v_{2}\) represent the camera ratio of scaling parameters over the depth with respect to the image frame. In this simulation, \(v_{1}=400\) and \(v_{2}=500\) are used.  
The Jacobian matrix \(J_{e}\) can be derived for a two-link robot:  
\[J_{e}=\left[\begin{array}{cc}-l_{1}sin(q_{1})-l_{2}sin(q_{1}+q_{2})&-l_{2} sin(q_{1}+q_{2})\\ l_{1}cos(q_{1})+l_{2}cos(q_{1}+q_{2})&l_{2}cos(q_{1}+q_{2})\end{array}\right]\]  
The Jacobian matrix defined in Property 4 can be expressed as  
\[J=J_{I}J_{e}\]The velocity in the task space is  
\[\dot{x}=J_{1}\,J_{e}\dot{q}=Y_{k}\theta_{k}\]  
The vector of kinematic parameters \(\theta_{k}\) can be expressed as follows:  
\[\theta_{k}=[\theta_{k1}\,\,\theta_{k2}\,\,\theta_{k3}\,\,\theta_{k4}]^{T}\in R^{ 4\times 1} \tag{35}\]  
where  
\[\theta_{k1}=v_{1}l_{1},\,\,\theta_{k2}=v_{1}l_{2},\,\,\theta_{k3}=v_{2}l_{1}, \,\,\theta_{k4}=v_{2}l_{2}\]  
Then, the kinematic regressor matrix \(Y_{k}\in R^{2\times 4}\) can be expressed as  
\[Y_{k}=\left[\begin{array}{ccc}-sin(q_{1})\dot{q}_{1}&-sin(q_{1}+q_{2})\dot{ \left(q_{1}+\dot{q}_{2}\right)}&0&0\\ 0&0&cos(q_{1})\dot{q}_{1}&cos(q_{1}+q_{2})\dot{\left(q_{1}+\dot{q}_{2}\right) }\end{array}\right] \tag{36}\]