## 4 Path Generator Solving for Inverse Kinematics
### Differential Inverse Kinematics with PID Control Algorithm  
The Jacobian matrix first has to be derived from the differential kinematics. Let \(\mathbf{x}\) be the task vector, which consists of the desired six-DoF position and orientation, and let \(\mathbf{q}\) be the configuration vector of the robot, including the joint angles, translation stroke, and rotation angle. The differential forward kinematics are shown in Equation (12), where \(\mathbf{J}\) is the Jacobian matrix. The chain rule with moving frames can help to derive the explicit Jacobian matrix [25]. In the chain rule, the columns of the Jacobian matrix are calculated in the order of the joints. In this case, the distal joints have constraints of coupled joints because each of the joint motions is distributed by the same driving wire, as shown in Figure 5.  
The configuration vector \(\mathbf{q}\) is defined in Equation (13). The Jacobian matrix can be derived from dimensions of \(6\times 8\), as shown in Equation (14), where \(\mathbf{z_{i}}\) and \(\mathbf{o_{i}}\) are vectors that describe the rotation axis and the origin of the \(i\)th moving frame, respectively. The velocity level actuation value is calculated with the pseudoinverse of the Jacobian matrix, as shown in Equation (15). If these values are integrated and used in the forward kinematics model, then the calculated position and orientation \(\mathbf{x_{c}}\) can be obtained, as shown in Equation (16), where \(\mathbf{k}\) is a vector function of the forward kinematics in Equation (6). The error is defined as the difference between the desired value \(\mathbf{x_{d}}\) and the calculated value \(\mathbf{x_{c}}\), as shown in Equation (17). The error is fed back to the PID control algorithm, as shown in Equation (18).  
The path of the driving wire length is generated in real-time through the wire-driving model, which is the same as the optimization path generator. The proposed path generator with the PID control algorithm is expressed with a block diagram in Figure 15. There are two important features: the constraint of the coupled joints using the null space solution and the back-calculation algorithm with actuation bounds.  
Equations (12)-(18) are  
\[\dot{\mathbf{x}}=\dot{\mathbf{J}}\dot{\mathbf{q}}, \tag{12}\]  
\[\mathbf{q}=\left[\begin{array}{cccccccc}q_{1}&q_{2}&q_{3}&q_{4}&q_{5}&q_{6}& q_{7}&q_{8}\\ =\left[\begin{array}{cccccccc}\gamma&\psi&\theta_{1}&\theta_{2}&\frac{\theta_{3 }}{2}&\frac{\theta_{4}}{2}&\frac{\theta_{4}}{2}&\frac{\theta_{3}}{2}\end{array} \right]^{T}\end{array}\right., \tag{13}\]  
\[\mathbf{J}=\left[\begin{array}{cccccccc}\mathbf{z_{0}}&\mathbf{z_{1}}\times (\mathbf{o_{8}-o_{1}})&&&\mathbf{z_{7}}\times(\mathbf{o_{8}-o_{7}})\\ 0&&\mathbf{z_{1}}&&\ldots&&\mathbf{z_{7}}\end{array}\right], \tag{14}\]  
\[\dot{\mathbf{q}}=\mathbf{J}^{\dagger}\dot{\mathbf{x}}, \tag{15}\]  
\[\mathbf{x_{c}}=\mathbf{k}(\mathbf{q}), \tag{16}\]  
\[\mathbf{x_{e}}=\mathbf{x_{d}}-\mathbf{x_{c}}, \tag{17}\]  
\[\dot{\mathbf{q}}=\mathbf{J}^{\dagger}\bigg{(}\mathbf{K}_{P}\mathbf{x_{e}}+ \mathbf{K_{D}}\dot{\mathbf{x}_{e}}+\mathbf{K_{I}}\!\int\mathbf{x_{e}}\,dt\bigg{)}. \tag{18}\]  
Figure 15: Block diagram of the open-loop control via the path generator to solve the differential inverse kinematics with the PID control algorithm.