1. Introduction
In recent years, underwater bio-inspired robots such as robotic fish, undulating fin vehicles, and multi-modal hybrid propulsion platforms have emerged in rapid succession, demonstrating exceptional maneuverability and environmental adaptability in missions like resource exploration, environmental monitoring, and autonomous inspection of complex zones [
1]. Starting from survey studies on undulating propulsion underwater bio-inspired robots, through novel prototypes that combine undulating fins with flapping foils and their modeling validation, to intelligent safe exploration frameworks designed for cluttered reef environments [
2], the accumulated work shows that these platforms possess pronounced advantages in low-speed agility, attitude stability, and the ability to traverse convoluted terrain. Within a mother–child underwater bio-inspired robot system, transfer alignment is the key technology that guarantees the vehicle can obtain high-precision attitude and velocity shortly after entering the water. The typical mission architecture places a high-accuracy master INS on the mother platform, while the recipient is a volume-constrained, lower-grade slave INS embedded in the underwater bio-inspired robot [
3]. Before launch, the robot is connected to the mother platform through a hybrid rigid–flexible link such as a boom, launch tube, or flexible manipulator. Once the master INS is initialized, it must propagate attitude and velocity states to the slave INS so that rapid alignment is completed before water entry, thereby avoiding the problems of prolonged alignment time and excessive attitude error that would arise underwater where absolute measurements like Global Navigation Satellite System (GNSS) are unavailable.
However, due to significant spatial installation offsets and structural flexibility between the master and slave INSs, the acceleration and angular rate signals measured by the two units differ markedly whenever the mother platform maneuvers or the launch mechanism moves. Consequently, the velocity solution of the slave INS is superimposed with an additional linear velocity component induced by the angular motion of the mother platform—this phenomenon is known as the lever-arm effect [
4]. If this error is not properly compensated, it directly corrupts the filter’s estimate of the slave INS attitude error, leading to slow convergence or even filter divergence [
5], and ultimately degrading the mission capability of the underwater bio-inspired robot in complex marine environments.
To mitigate the aforementioned velocity errors, various compensation strategies for lever-arm errors have been proposed in engineering practice. Among them, low-pass filtering attempts to remove the vibration errors caused by the lever arm by filtering out high-frequency components. However, it cannot completely eliminate the errors and may also lose valuable dynamic information, thus having limited practical application [
6]. Rigid body compensation methods use known lever-arm geometric parameters to calculate the additional linear velocity induced by the body’s angular velocity and then perform compensation. These methods are simple and effective when the lever-arm parameters are precisely known, but on highly flexible platforms like underwater bio-inspired robots, the lever-arm parameters cannot be kept accurately for long [
7]. Extended state introduces states related to the lever arm into the filter state vector, treating the lever-arm error as a state to be estimated online. It can address the unknown lever-arm problem to some extent. However, its performance is highly dependent on the body, which needs to apply specific maneuvering excitations to activate the observability of the lever-arm states. When the maneuvering excitation is insufficient, the convergence speed and accuracy of the extended state method are still not satisfactory [
8,
9]. In addition, some studies have introduced additional sensors to measure the deformation of the lever arm in order to improve the compensation effect. For example, He et al. employed FBG sensors to monitor flexible lever-arm deformation of the wing immediately, compensating the error at the hardware level [
10]. However, such solutions increase the system’s volume, weight, and cost, making them difficult to implement for micro-sized underwater bio-inspired robots.
All the above approaches share a tacit premise: within the time horizon of alignment, the lever-arm parameters are treated as either known or slowly estimable. However, for underwater bio-inspired robots, the tail fin, bio-inspired torso, and components such as cables and booms that connect to the mother platform form a structure that couples both rigid and flexible parts. Under the influence of hydrodynamic and thermal loads, these components undergo complex bending and slack behaviors. This results in composite time-varying characteristics of the equivalent lever arm, including unknown initial values, piecewise constants, sudden jumps, and slow drifts. Consequently, compensation models based on simple rigid body assumptions struggle to accurately describe the true error characteristics.
Meanwhile, conventional error modeling that relies on analytical physical models shows clear limitations when structural uncertainties such as sensor errors and calibration biases are high. This has led researchers to explore more data-driven and adaptable strategies. In recent years deep learning, especially the Long Short-Term Memory (LSTM) architecture, has been widely adopted for time-series modeling, offering new ideas for navigation error compensation and for modeling the dynamics of underwater bio-inspired robots. Thanks to its strong nonlinear fitting capability and built-in memory, LSTM can automatically learn complex time-varying mappings from historical Inertial Measurement Units (IMUs) or actuator data, giving it a clear advantage during GNSS outages, under uncertain structural parameters, and in highly nonlinear flow fields [
11]. Within the underwater bio-inspired field, surveys on undulating propulsion vehicles have been published [
12], deep learning has been used to build time-series surrogate models for the thrust and power of flexible bio-inspired fins [
13], and adaptive navigation-and-control frameworks for bio-inspired unmanned underwater vehicles operating in complex environments have been proposed [
14]. Work on GNSS/INS integration has likewise demonstrated, from the viewpoints of sensor error compensation and robust fusion, that LSTM and related networks are both effective and robust for inertial error modeling [
15,
16,
17]. Inspired by these results, this paper introduces an LSTM to compensate for the master/slave lever-arm error, allowing the compensation model to learn and predict the systematic velocity error online under diverse underwater maneuvers without requiring precise lever-arm parameters.
In addition to modeling and compensating for the lever-arm errors between the master and slave INS, accurately fusing multi-source observation information on the basis of compensation to achieve high-precision attitude estimation is a key issue in transfer alignment systems for underwater bio-inspired robots. Velocity matching, which constructs observations by comparing the velocity output differences of the master and slave INS in the navigation frame and can effectively reflect attitude misalignment angles, is the most commonly used method for observation construction currently [
18]. However, velocity matching is essentially an indirect observation method, and its observation accuracy is limited by the velocity error propagation chain. In particular, when dynamic excitation is insufficient or compensation errors are large, the estimation performance tends to deteriorate easily [
19]. In contrast, attitude matching constructs the observation items directly based on the attitude outputs of the two INSs, which has the advantages of a simple configuration and no need for integration [
20]. However, when the slave INS has not yet completed initialization and its accuracy is still low, the attitude matching observations are heavily contaminated by noise [
21,
22]. Based on the above analysis, a velocity–attitude joint matching strategy has been proposed to integrate the advantages of both methods. This approach combines two types of observation information: velocity differences and attitude differences to construct a joint observation model with greater information redundancy and error compensation capability, which can significantly enhance the observability and convergence speed of the filter [
23].
Within the joint matching framework, the Kalman filter and its adaptive variants remain the most widely used state estimation tools [
24,
25]. However, existing adaptive filtering methods generally assume that observation residuals follow a zero-mean Gaussian process, and they lack the ability to model and feed-forward compensate for non-Gaussian disturbances or structural errors. When the system exhibits complex nonlinearities or unmodeled structural errors, such as bending and slack in the rigid–flexible coupling structure of underwater bio-inspired robots, relying solely on observation feedback to adjust covariances can introduce lag, thereby degrading both convergence speed and estimation accuracy.
In summary, this paper proposes a hardware-free, lever-arm-parameter-free fusion framework that combines an attention-boosted LSTM feed-forward compensator with an innovation-adaptive Kalman filter. Taking only the slave IMU stream as input, the attention mechanism dynamically highlights history-critical features, implicitly captures both gradual and sudden lever-arm variations induced by the flexible mother–child linkage, and outputs real-time velocity corrections. These corrections are then fused with velocity–attitude measurements in an adaptive Kalman filter, achieving fast convergence and eliminating the lag inherent in traditional feedback schemes when structural jumps occur. The approach is tailor-made for pre-launch transfer alignment of underwater bio-inspired vehicles, improving adaptability to configuration changes and environmental disturbances without any extra hardware.
The main contributions of this paper are as follows: (1) For the actual launch conditions of mother–child underwater bio-inspired robot systems, we establish an equivalent lever-arm error model that accounts for both launcher attitude changes and structural flexure. On this basis, we propose unified performance metrics, including root-mean-square errors of three-axis misalignment and installation-error angles, for transfer alignment, enabling quantitative comparison of different compensation strategies under time-varying lever arms. (2) To counteract the time-varying velocity errors caused by flexible and unknown lever arms, we present an attention-augmented LSTM feed-forward compensator that predicts and cancels the lever-arm-induced component in the master/slave velocity difference using only a short slave-IMU sequence, combining physics insight with data-driven modeling. (3) Within a velocity–attitude joint-matching and innovation-adaptive Kalman-filter framework, the feed-forward module is tightly coupled with extended-state modeling and adaptive measurement noise tuning. Simulation results show that, compared with conventional physical lever-arm compensation, the proposed method markedly reduces misalignment and installation estimation errors under typical maneuvers and offers superior filter robustness and engineering practicality when lever-arm parameters jump or flexible disturbances intensify.
4. Experimental Analysis
To systematically evaluate the transfer alignment performance of the proposed Attention-LSTM feed-forward compensation coupled with innovation-adaptive Kalman filter in the deployment scenario of an underwater bio-inspired robot, a “hardware-in-the-loop data training and PSINS high-fidelity simulation assessment” validation framework is established. Representative slave IMU dynamic sequences are first collected on a turntable hardware-in-the-loop (HIL) platform; PSINS rigid–flexible co-simulation then generates physically meaningful lever-arm velocity error labels for these sequences to train the Attention-LSTM feed-forward compensation model. After convergence, the same PSINS environment is used to build a master and slave INS cooperative transfer alignment platform, under which the end-to-end alignment accuracy of different compensation strategies is compared across multiple typical maneuver profiles.
Specifically, the training phase adopts a hardware-in-the-loop and simulation joint labeling strategy. First, the slave IMU assembly is mounted on the turntable platform shown in
Figure 2. Preset angular motion commands drive the turntable to excite the IMU’s attitude maneuvers, while raw triaxial angular rates and specific force data from the slave IMU, together with the high-precision angular motion commands, are recorded. Second, the same command set is fed into the PSINS simulation environment, where, given the known master/slave INS installation geometry and equivalent lever-arm parameters, a rigid–flexible coupling model is built to compute the master and slave navigation-frame velocities that include the equivalent lever-arm effects and the ideal reference velocities obtained by virtually translating the slave IMU to the master location. The deterministic component of their difference, arising from both the geometric lever arm and its flexible perturbation, constitutes the “lever-arm-induced velocity error” that the Attention-LSTM network must learn. Finally, the measured IMU sequence is used as the network input, and the velocity error sequence obtained from the above simulation is aligned with it by time stamp as a synchronous supervision label, thus completing supervised training without relying on online lever-arm parameter observation.
It should be noted that due to current underwater experimental constraints, complete alignment data from a real master/slave deployment environment are not yet available. Therefore, the verification phase uses a PSINS-based master/slave INS cooperative simulation platform for end-to-end evaluation. This allows systematic generation of diverse motion profiles, lever-arm configurations, and flexible disturbances under controlled conditions to test cross-scenario robustness, while the use of real turntable data during training injects authentic IMU noise and installation errors, mitigating domain shift that could arise from purely simulated training. Future work will validate the engineering applicability of the proposed method through tank tests and open-sea trials on actual underwater bio-inspired robots.
4.1. Transfer Alignment Simulation Environment Setup
Under the aforementioned validation framework, a representative cooperative simulation environment for the master and slave INS must first be established. The master platform represents a surface or underwater carrier equipped with a high-precision master INS, while the slave platform represents the underwater bionic robot to be deployed; before deployment, the two are connected via a hybrid rigid–flexible structure, such as a hanger, launch tube, or flexible robotic arm. Considering that the underwater bionic robot typically experiences typical maneuvers such as acceleration, turning, fin flapping, and combined maneuvers during actual missions, four representative carrier motion conditions are designed in PSINS: accelerated straight-line motion, coordinated turn, periodic fin flapping, and S-shaped maneuver. The simulation timeline adopts a unified arrangement of “uniform straight sailing for the first 5 s and the last 5 s, with the target maneuver executed in the middle segment”. The roll angle of the fin-flapping motion is generated as a sinusoidal function with given amplitude and angular frequency, and the S-shaped maneuver is constructed by alternating left–right coordinated turns. The corresponding key parameters are listed in
Table 3.
The carrier trajectory is shown in
Figure 3.
Here, the navigation information of the carrier’s master INS is assumed to be error-free; the simulation parameters of the slave INS on the underwater vehicle are listed in
Table 4.
4.2. Ablation Study
Ablation analysis was conducted on the key modules of the proposed method, focusing on velocity observation construction and lever-arm compensation strategies. The simulation scenario selected is the fin-flapping motion trajectory, where the carrier executes periodic roll excitation with fixed amplitude and frequency to fully activate lever-arm-related states.
Figure 4 first presents the attitude and velocity simulation results of the slave INS under this condition. It can be observed that the attitude maintains significant periodic oscillations throughout the alignment period, and the velocity also exhibits obvious non-stationary variations, providing favorable conditions for evaluating the performance of various compensation strategies under strong excitation scenarios.
On this basis, two typical scenarios are considered: “no lever-arm abrupt change” and “with rigid lever-arm abrupt change.” For the former, the equivalent lever-arm between the master and slave INS was assumed to remain constant throughout the entire alignment process. Under this condition, the physical model was complete and the lever-arm parameters were fully calibrated, representing the ideal application condition for traditional rigid body computational compensation methods.
Figure 5 shows the time evolution curves of the master/slave INS velocity difference under three strategies: no compensation, physical lever-arm compensation, and Attention-LSTM compensation. Without compensation, the master/slave velocity difference exhibited large-amplitude periodic fluctuations during the entire alignment period, indicating that lever-arm effects and other common-mode errors dominated the velocity observations. After applying physical compensation using rigid lever-arm parameters, the velocity difference curve became significantly smoother, with greatly reduced amplitude; the residual error was mainly high-frequency noise. The Attention-LSTM compensation, without explicitly inputting lever-arm parameters, produced a velocity difference curve whose overall shape is highly consistent with physical compensation, with similar fluctuation amplitude. This demonstrates that the network successfully learned the main dynamic characteristics of lever-arm-induced velocity errors from the inertial measurement sequences and can approach the optimal compensation effect of the analytical model under the “no abrupt change” scenario.
To examine the algorithm’s adaptability to lever-arm abrupt change, a step-type rigid lever-arm abrupt change in the same direction was imposed on the above fin-flapping trajectory: the equivalent lever-arm length jumped from A = 1 to A = 2 (simulating a sudden mechanical extension or reconfiguration of the deployment boom, where the lever-arm magnitude doubles while the direction remains unchanged). The conventional physical compensation strategy kept using the initially calibrated value throughout the whole alignment and performed no on-line correction for the abrupt change, so significant model mismatch appeared after the jump.
Figure 6 plots the master/slave INS velocity differences versus time for the three compensation schemes. Without compensation, the difference still exhibited large periodic oscillations; physical compensation showed evident mismatch: the bias of the velocity difference rose sharply after the jump and stayed at a high level for a long time, yielding large compensation error. By contrast, the Attention-LSTM compensation underwent only a brief transient after the jump and soon returned to a low-amplitude oscillation band, leaving a residual bias clearly smaller than that of the physical scheme.
This indicates that once analytical compensation based on fixed lever-arm parameters encounters changes beyond the calibration range, such as structural reconfiguration, mounting position adjustment, or flexible deformation, its model fails globally and cannot be quickly corrected by filter feedback. Attention-LSTM, however, extracts features from short IMU time slices and estimates and cancels systematic velocity terms in a feed-forward manner. Even when the external equivalent lever-arm undergoes a step change, the network can still adapt on the basis of the learned dynamic patterns, demonstrating stronger fault tolerance and generalization under abrupt change conditions.
The results show that, without accounting for the lever-arm effect, the master/slave velocity difference persisted as large periodic oscillations. Under abrupt lever-arm change, physical compensation degraded markedly—once the model fails, the computed correction itself prevents convergence of the velocity difference. In contrast, the Attention-LSTM model maintained satisfactory compensation performance, demonstrating superior fault tolerance and generalization.
4.3. Transfer Alignment Experiments with Different Compensation Strategies
After completing the local ablation analysis, this paper further examines the comprehensive effects of different velocity compensation strategies within the full “velocity–attitude joint matching and adaptive Kalman filter” transfer alignment chain. Specifically, the three schemes of “no compensation,” “physics-based compensation (Physics + AKF),” and “Attention-LSTM compensation (Attention-LSTM + AKF)” were separately integrated into the same AKF, and their estimation performance for the triaxial misalignment angles and the mounting-error angles under several typical maneuvering trajectories was compared.
First, the wing-rock maneuver was selected to analyze how a sudden lever-arm change affects downstream attitude estimation.
Figure 7 shows the time histories of the Strapdown Inertial Navigation System (SINS) misalignment angle errors and mounting angle errors for this scenario; a rigid lever-arm step was injected at mid-run. It can be seen that with Physics + AKF, the velocity observation retained a step-induced bias that the filter could not eliminate quickly, so all three misalignment angles and the mounting angles exhibited pronounced instantaneous peaks, maintained noticeable residual offsets for a long period, displayed heavy convergence tails, and suffered from markedly larger steady-state errors. After switching to Attention-LSTM + AKF, the feed-forward compensation suppressed the velocity bias at the observation level. The misalignment and mounting angle curves exhibited only limited fluctuations around the step instant, dropped back promptly, and settled into a small-error band. Overall convergence time was noticeably shortened, while overshoot and steady-state residuals were both greatly reduced.
To comprehensively evaluate the robustness of the proposed method under different maneuvering conditions,
Table 5 summarizes the alignment results of the two compensation schemes under four typical trajectories: straight-line acceleration, coordinated turn, wing rock, and S-curve maneuvers. The table presents the estimation errors for misalignment angles and mounting angles in each channel.
Table 5 shows that, when a sudden lever-arm length change occurred, Physics + AKF yielded poor overall accuracy for both horizontal misalignment and mounting angles. In some maneuvers, the error components even exhibited noticeable biases, which is detrimental to subsequent navigation. By contrast, Attention-LSTM + AKF consistently decreased the error amplitude in every channel under all four maneuvering conditions, and the reduction was especially pronounced during the combined turning and S-curve flight.
To facilitate a quantitative comparison of the alignment accuracy achieved by different methods, we introduced the tri-axial composite root-mean-square (RMS) error as the metric. For each maneuver, the composite RMS values corresponding to the misalignment angle error and mounting angle error are defined as follows:
Taking Physics + AKF as the benchmark, the relative reduction for the
j-th maneuver is defined as follows:
Averaging over the four maneuvering cases gives the overall mean reduction.
As shown in
Table 5 and calculated by the above metrics, under the four maneuvers—acceleration, turning, fin-flapping, and S-curve—the Attention-LSTM + AKF scheme markedly reduced transfer alignment errors in all channels. The reductions in tri-axial composite misalignment angle error were about 64.1%, 64.5%, 64.6% and 64.5%, respectively; those for tri-axial composite mounting angle error were about 65.2%, 66.7%, 65.3% and 66.5%. Averaged across all runs, the composite RMS misalignment angle of Physics + AKF was roughly 14.5′, whereas the proposed method yielded only 5.2′—an average reduction of ~64%. The composite RMS mounting angle error dropped from 8.8′ to 3.0′, an average reduction of ~66%. Therefore, in the presence of unknown or abruptly changing lever arms, the joint alignment scheme based on Attention-LSTM feed-forward compensation plus AKF significantly improves both convergence speed and steady-state accuracy of transfer alignment.
5. Discussion and Outlook
Under the velocity–attitude joint matching framework, this study compares the conventional Physics + AKF with the proposed Attention-LSTM + AKF. Simulations incorporating flexible lever-arm disturbances and installation errors demonstrated that the proposed method consistently reduced the composite RMS misalignment and mounting angle errors by approximately 64% and 66%, respectively. This indicates that the data-driven strategy significantly outperforms the physical model in handling complex bio-inspired maneuvers.
Regarding the applicability in engineering practice, several critical design choices and constraints are addressed. First, the Extended-State Kalman Filter (ESKF) was not selected as a baseline because it relies on linearization and struggles to track the high-frequency, non-linear oscillations (0.5–2 Hz) inherent to bio-inspired fin flapping. In contrast, the proposed LSTM directly maps these non-linear kinematic features without the lag associated with state augmentation. Second, concerning the simulation-to-reality gap, while HIL setups cannot perfectly replicate open-water hydrodynamics, the lever-arm effect is fundamentally a kinematic phenomenon, ensuring the learned mapping remains valid provided sensor characteristics are consistent. Third, regarding signal processing, we leveraged the LSTM’s gating mechanisms as an implicit filter to suppress high-frequency measurement noise amplified by differentiation, thereby avoiding the phase lag of explicit low-pass filters. Finally, the proposed lightweight architecture ensures real-time feasibility, allowing millisecond-level inference on standard embedded processors (e.g., STM32 or Jetson Nano) to satisfy 50–100 Hz navigation loops.
Future work will focus on enhancing the model’s generalizability and robustness. Directions include (1) introducing physics-informed priors to improve interpretability; (2) integrating external cues such as DVL or visual odometry for long-term navigation; and (3) systematically investigating the algorithm’s robustness under conditions of sensor degradation and varying water current disturbances.