## 2 Background Theory
### Generalized Jacobian  
The inverse kinematics solutions outlined in Section 2.2 are suitable for fixed-base manipulator control, where there is a direct relationship between the joint velocities and end-effector position. However, in our case our manipulator is mounted on a floating base system (the UAV), and the movement of joints causes reaction forces and torques on the UAV. The base of the manipulator moves due to these forces, which also changes the end-effector and joint and link positions. Hence, for effective tracking an improved method that includes the effect of these forces and torques on the manipulator motion is required. To achieve this, we employ a method from space manipulator mechanics known as the generalized Jacobian [17]. This Jacobian formulation employs the properties of free-floating manipulators in the absence of gravity, where the linear and angular momentum are conserved. In this work, the momentum balance equations are combined with the kinematic Jacobian formulation derived in Section 2.2 to incorporate the external forces on the whole system, allowing for accurate end-effector trajectory tracking through velocity-level joint control, even if the UAV base moves in 3D space due to the dynamic interaction between UAV and manipulator. The generalized Jacobian algorithm in [17] is computed with the following steps:  
1. The center of gravity (CoG) of the base-manipulator system is found and the inertias of the base and links are reformulated in a CoG centered reference frame. 2. The kinematic equations of the system for velocity-space are defined in the CoG frame. The Jacobians and generalized coordinates for the base component and manipulator component are decoupled: \[v_{e}=J_{b}\dot{q}_{b}+J_{m}\dot{q}_{m}+v_{0}\] (9) where \(\dot{q}_{b}\) and \(\dot{q}_{m}\) are the velocities of the generalized coordinates of the base and manipulator, respectively, \(J_{b}\) and \(J_{m}\) are the corresponding Jacobians, and \(v_{0}\) is the initial translational velocity of the end-effector. The momentum conservation equations for the system in the CoG frame are defined. Similarly to (9), the base and manipulator components are decoupled:  
\[L_{0}=\overline{I}_{b}\ \dot{q}_{b}+\overline{I}_{m}\dot{q}_{m} \tag{10}\]  
where \(L_{0}\) is the initial system momentum, \(\overline{I}_{b}\) and \(\overline{I}_{m}\) are the mass/inertia matrices for the base and manipulator in the CoG frame, the calculation of which is provided in [17]. Note that the momentum is purely rotational and the inertias are time-varying about the instantaneous CoG of the system at time \(t\). * Combine (9) and (10) to eliminate the unknown base variables \(\dot{q}_{b}\), to find the relationship between end-effector and joint velocities: \[v_{e}=\left(J_{m}-J_{b}\overline{I}_{b}^{-1}\overline{I}_{m}\right)\dot{q}_{m }+J_{b}\overline{I}_{b}^{-1}L_{0}+v_{0}=J^{*}\dot{q}_{m}+p_{0}\] (11) where we rewrite \(p_{0}=J_{b}\overline{I}_{b}^{-1}L_{0}+v_{0}\) and \(J^{*}\) is the generalized Jacobian. The inverse kinematic relationship to find the desired joint velocities therefore becomes: \[\dot{q}_{m}=[J^{*}]^{-1}(v_{e}-p_{0})\] (12)  
The generalized Jacobian for a 2-DOF manipulator fulfilling the 2D task \(v_{e}\) is nonredundant as \(v_{e}\in\mathbb{R}^{2}\) and \(J^{*}\in\mathbb{R}^{2\times 2}\), so direct inversion is possible. For a manipulator with more than 2 degrees of freedom, \(J^{*}\in\mathbb{R}^{2\times n_{e}}\) and \(n_{e}>2\), which results in kinematic redundancy. In this case, we minimize the joint velocities by taking the Moore-Penrose right pseudo-inverse (8). Another alternative for inverse kinematic control of a redundant manipulator is to extend the task-space by adding tasks so that the \(v_{e}\in\mathbb{R}^{n_{e}}\) and \(J^{*}\) is square. This approach is called the extended Jacobian [18] and we utilize this approach in Section 6 by adding an additional constraint to the generalized Jacobian derived in Section 5, which minimizes the reaction torque on the base due to the manipulator motions.