# Sensorimotor Control Using Adaptive Neuro-Fuzzy Inference for Human-Like Arm Movement
## 2 Musculoskeletal Modeling
### Relation Between Joint and Muscle Space  
The proposed musculoskeletal arm (see Figure 1) is transformed into nine possible muscle connections with the rigid links to calculate the i-th muscle length \(l_{i}\) in terms of the joint positions based on the descriptive kinematic analysis (see Figure 2). The existing models often simplify muscle paths as straight lines rather than following curved paths. This study, however, considers that muscles connect to the links via curved paths, providing a more accurate representation of the muscles' actual anatomical and biomechanical properties.  
Figure 1: Human arm model with nine muscles. \(m_{\mathrm{ij}}\) represents the distance between the insertion point of i-th muscle and j-th joint center, and (i = 5, 6, 9) and (i = 1–4, 7–8) indicate biparticular and six monoarticular muscles, respectively. \(L_{1},L_{2}\), and \(L_{3}\) denote the lengths of the shoulder, elbow, and wrist links, respectively. It is assumed that the trunk link is fixed, not moving. \(\theta_{1}\) is the shoulder angle, \(\theta_{2}\) is the elbow angle, and \(\theta_{3}\) is the wrist angle. The end-point arm position is \((p_{x},p_{y})\).  
Figure 2: Descriptive geometric kinematic analysis of each muscle utilized in the musculoskeletal arm model.  
Figure 2 illustrates the connection of each muscle to the links and allows the muscle length with respect to the reference frame \(\{O\}\) to be calculated using the geometric relationships. Finding the length of each muscle, as shown in Figure 2, requires calculating the angles at which the muscles connect to the links. The muscle length vector \(l=[l_{1},l_{2},\cdots,l_{9}]^{\mathsf{T}}\in\mathbb{R}^{9}\), formulated through the law of cosines, is expressed as:  
\[l=\left[\begin{array}{c}m_{10}[\pi-\theta_{1}-\arccos(\frac{m_{10}}{m_{11}}) ]+\sqrt{m_{11}^{2}-m_{10}^{2}}\\ m_{20}\theta_{1}+\sqrt{m_{20}^{2}+m_{21}^{2}}\\ m_{31}[\pi-\theta_{2}-\arccos(\frac{m_{31}}{m_{32}})]+\sqrt{m_{32}^{2}-m_{31}^{2}} \\ m_{41}[\frac{\pi}{2}+\theta_{2}-\arccos(\frac{m_{41}}{m_{42}})]+\sqrt{m_{42}^{2 }-m_{41}^{2}}\\ m_{50}[\frac{\pi}{2}-\theta_{1}]+m_{52}+[\frac{\pi}{2}-\theta_{2}]\sqrt{L_{1}^{ 2}+(m_{50}-m_{52})^{2}}\\ m_{60}\theta_{1}+m_{62}\theta_{2}+\sqrt{L_{1}^{2}+(m_{60}-m_{62})^{2}}\\ m_{72}[\pi-\theta_{3}-\arccos(\frac{m_{72}}{m_{73}})]\\ m_{82}[\frac{\pi}{2}-\arccos(\frac{m_{82}}{m_{83}})+\theta_{3}]+\sqrt{m_{83}^{2 }-m_{82}^{2}}\\ m_{93}(\frac{\pi}{2}-\theta_{3})+m_{91}(\frac{\pi}{2}-\theta_{2})+\sqrt{L_{2}^ {2}+(m_{91}-m_{93})^{2}}\end{array}\right] \tag{4}\]  
where \(m_{\text{ij}}\) denotes the distance between the insertion point of i-th muscle, j-th joint center, i = 5, 6, 9 corresponds to the biarticular muscles, and i = 1-4, 7-8 represents the monoarticular muscles. The model parameter values are presented in Table 1 and established in [29]. The time derivative of the muscle length vector \(l=[l_{1},l_{2},\cdots,l_{9}]^{\mathsf{T}}\in\mathbb{R}^{9}\) results in the following:  
\[\dot{l}=\mathbf{J}_{m}\dot{\theta} \tag{5}\]  
where \(\mathbf{J}_{m}\in\mathbb{R}^{9\times 3}\) represents the muscle Jacobian matrix, which maps the angular velocity of the joints \(\dot{\theta}=[\dot{\theta}_{1},\dot{\theta}_{2},\dot{\theta}_{3}]^{\mathsf{T }}\in\mathbb{R}^{3}\) to the change rate of the length of muscles \(\dot{l}\).