## 2 System Configuration and Modeling
### System Modeling  
To analyze the motion characteristics of the system, the Earth-fixed reference frame \(\mathbf{OXYZ}\) and body-fixed frame \(\mathbf{O_{b}x_{b}y_{b}z_{b}}\) are defined, as shown in Figure 2. The former has an \(\mathbf{X}\)-axis pointing to the magnetic north and a \(\mathbf{Z}\)-axis pointing up. The latter is placed at the center of the mass of the head, in which its \(\mathbf{x_{b}}\)-axis is along the longitudinal direction of the rigid body and points forward. The \(\mathbf{y_{b}}\)-axis follows the lateral direction of the robot's head, and finally, the \(\mathbf{z_{b}}\)-axis points upward. Let \(\left[\omega_{xb}\quad\omega_{yb}\quad\omega_{zb}\right]^{T}\) denote the angular velocity of the body-fixed frame orientation. The body axes rotate from the reference frame axes via a series of Euler angle rotations. They are roll, pitch, and yaw, respectively, and they are denoted by the vector \(\left[ \begin{matrix}\phi&\theta&\psi\end{matrix} \right]^{T}\). The kinematics of the designed robot in the reference frame are written in terms of the Euler angles, as follows:  
\[ \begin{bmatrix}\dot{X}&\dot{Y}&\dot{Z}&\dot{\phi}&\dot{\theta}&\dot{\psi} \end{bmatrix} = \begin{bmatrix}\dot{x}_{b}&\dot{y}_{b}&\dot{z}_{b}&\omega_{xb}& \omega_{yb}&\omega_{zb}\end{bmatrix} ^{T}, \tag{1}\]  
where \(\mathbf{O_{m\times p}}\) denotes an \(m\)-by-\(p\) matrix of zeros, \(\mathbf{R_{b}^{E}}\) is the rotational matrix from the body-fixed frame to the reference frame [25], and \(\mathbf{T_{b}^{E}}\) is the transformation matrix between the angular velocity and the Euler angle rate [26], respectively. For the robot dynamics, the free body diagram of the head part is illustrated in Figure 3. The hose conveying water and the actuating weights are isolated from the head part. The water hose is replaced by its mass being lifted \(M_{p}\) at the center of the head and a reaction force \(F_{0}\) at the water inlet port. The actuating weights are represented by the reaction forces due to their motions and position. Additionally, the thrust force generated by the \(i\)th nozzle outlet is denoted by \(F_{i}\) (\(i=1\), \(2\), \(3\), \(4\)). The masses of the actuating weights WX and WY are \(m_{\text{zx}}\) and \(m_{\text{zw}}\), respectively. Meanwhile, the mass of the remaining head part with its containing water is \(M_{h}\). Additionally, when the firefighting robot gets close to the flame and the extinguishing nozzle activates, a reaction force \(\mathbf{F_{s}}\) appears and acts on the system. Considering the head part without the two actuating weights as a rigid body, thanks to the isolation of the free-body diagram, the dynamic equations for translational and rotational motions in the body-fixed frame are well-known as:  
\[ \begin{gathered}\left(M_{h}+M_{p}\right)\left(\dot{\mathbf{v}}_{b}+ \mathbf{\omega_{b}}\times\mathbf{v_{b}}\right)=\mathbf{F_{b}}\\ \mathbf{J\omega_{b}}+\mathbf{\omega_{b}}\times\mathbf{J\omega_{b}}=\mathbf{\tau_{b}} \end{gathered}  \tag{2}\]  
where \(\mathbf{v_{b}}\) and \(\mathbf{\omega_{b}}\) are the velocities of the translational and rotational motions in the body-fixed frame. The mass in the translational motions consists of the mass of the robot's head \(M_{h}\) and that of the water pipe being lifted \(M_{p}\). For the sake of simplicity, \(M_{p}\) is assumed to linearly vary with the robot's flight altitude via a correction factor \(k\) such that \(M_{p}=k\rho AZ\). \(\rho\) is the density of the water, and \(A\) is the internal cross-sectional area of the hose. \(\rho AZ\) is the mass of a water cylinder of area \(A\) and height \(Z\). This assumption was also experimentally  
Figure 3: The dimension notation of the head part of the flying firefighting robot. verified in the literature [19]. Moreover, the correction factor can be validated based on later experiments. For the rotational motions, \(\mathbf{J}\) is the inertia matrix of the head, which is assumed to be diagonal to reflect the objective of the technical design of the fabricated model.