*3.2. Gyro-Derived Torsion Reconstruction*

The Mahony complementary filter has been routinely used to calculate torsion angle after its first successful trial in estimating the torsion angle of UAV accurately [25]. Since it is easy to understand and less time consuming, this algorithm is widely used in engineering applications. The basic idea behind the Mahony complementary filter is that when the carrier is at a static state, the theoretical value of the gravity acceleration component is [0 0 *g*] *T* in a geographical coordinate system. Then, the matrix of [0 0 *g*] *T* is transformed under the carrier coordinate system to compare with the measurements of the accelerometer. Thus, this deviation is the error between the torsion angle integrated by gyroscope and measured accelerometer, respectively. The steps of the algorithm are as follows:


$$
\psi = \begin{bmatrix}
2(\hat{q}\_1\hat{q}\_3 + \hat{q}\_0\hat{q}\_2) \\
2(\hat{q}\_2\hat{q}\_3 + \hat{q}\_0\hat{q}\_1) \\
\hat{q}\_0^2 - \hat{q}\_1^2 - \hat{q}\_2^2 + \hat{q}\_3^2
\end{bmatrix} \tag{15}
$$

.

where *q* is quaternions.

(3) The deviation between the acceleration estimation *v*ˆ and the measurements by accelerometer *v* is the error item between the integrated torsion angle of the gyroscope and the torsion angle measured by the accelerometer. The value *errror* can be expressed by the cross product.

$$
\varepsilon \tau r \tau \sigma = \mathfrak{d} \times \mathfrak{v} \tag{16}$$

(4) The corrected torsion angle can be obtained based on a PI controller using the results from the previous step,

$$
\hat{\Omega} = \overline{\Omega}\_b + K\_{\text{per}} error + K\_I \int error \tag{17}
$$

where Ω*b* is the torsion angle obtained by gyro integration, while *Kp* and *KI* are the PI control param.

(5) The quaternion differential equation can be solved by using the corrected torsion angle Ω ˆ (See Formula (8)), and the quaternion can be updated to calculate the theoretical estimation of the accelerometer (transfer to Equation (2)).

$$\dot{q} = \frac{1}{2}q \otimes p(\bullet) \tag{18}$$

The algorithm flowchart of Mahony complementary filtering is presented in Figure 5.

**Figure 5.** Algorithm of Mahony complementary filtering.

### *3.3. The Schematic to Monitor Dynamic Responses Based on VMD–HHT Characteristic Extraction Model*

A multidimensional characteristic extraction method based on VMD–HHT is introduced to monitor dynamic responses of offshore oil platforms. First, VMD was applied to extract the frequency component of the dynamic response, and the noise component could thus be eliminated. Then, HHT was used to extract multidimensional dynamic response characteristics of time, frequency, and energy using the cleaned accelerometer data. Finally, dynamic displacement responses were calculated by the FDIA based on the cleaned data. To assess the reliability of dynamic displacement responses obtained by accelerom, GNSS data are given for comparison. In addition, to obtain torsion angle changes of offshore oil platforms, the complementary filtering algorithm was applied using six-degree of freedom of MIMU. The flowchart for dynamic responses based on VMD–HHT using MIMU is summarized in Figure 6.

**Figure 6.** Flowchart for dynamic responses based on VMD–HHT using MIMU.
