Table of Contents
Fetching ...

A Deep Inverse-Mapping Model for a Flapping Robotic Wing

Hadar Sharvit, Raz Karl, Tsevi Beatus

TL;DR

This work tackles the challenging problem of inverse mapping in flapping-wing aerodynamics by learning the wing motions required to achieve targeted aerodynamic forces. The authors develop a Seq2Seq neural architecture augmented with an Adaptive Spectrum Layer (ASL) to perform representation learning in the Fourier domain, capturing both amplitude and phase information. Evaluated on a custom measured dataset and an open-source viscous-fluid dataset, the proposed Seq2Seq+ASL model achieves up to ~11% superior MAE performance over state-of-the-art baselines, while delivering orders-of-magnitude faster inference suitable for onboard control. The approach demonstrates practical potential for real-time, data-driven control of complex dynamic systems and can extend to biomimetic robotics and biomedical devices.

Abstract

In systems control, the dynamics of a system are governed by modulating its inputs to achieve a desired outcome. For example, to control the thrust of a quad-copter propeller the controller modulates its rotation rate, relying on a straightforward mapping between the input rotation rate and the resulting thrust. This mapping can be inverted to determine the rotation rate needed to generate a desired thrust. However, in complex systems, such as flapping-wing robots where intricate fluid motions are involved, mapping inputs (wing kinematics) to outcomes (aerodynamic forces) is nontrivial and inverting this mapping for real-time control is computationally impractical. Here, we report a machine-learning solution for the inverse mapping of a flapping-wing system based on data from an experimental system we have developed. Our model learns the input wing motion required to generate a desired aerodynamic force outcome. We used a sequence-to-sequence model tailored for time-series data and augmented it with a novel adaptive-spectrum layer that implements representation learning in the frequency domain. To train our model, we developed a flapping wing system that simultaneously measures the wing's aerodynamic force and its 3D motion using high-speed cameras. We demonstrate the performance of our system on an additional open-source dataset of a flapping wing in a different flow regime. Results show superior performance compared with more complex state-of-the-art transformer-based models, with 11% improvement on the test datasets median loss. Moreover, our model shows superior inference time, making it practical for onboard robotic control. Our open-source data and framework may improve modeling and real-time control of systems governed by complex dynamics, from biomimetic robots to biomedical devices.

A Deep Inverse-Mapping Model for a Flapping Robotic Wing

TL;DR

This work tackles the challenging problem of inverse mapping in flapping-wing aerodynamics by learning the wing motions required to achieve targeted aerodynamic forces. The authors develop a Seq2Seq neural architecture augmented with an Adaptive Spectrum Layer (ASL) to perform representation learning in the Fourier domain, capturing both amplitude and phase information. Evaluated on a custom measured dataset and an open-source viscous-fluid dataset, the proposed Seq2Seq+ASL model achieves up to ~11% superior MAE performance over state-of-the-art baselines, while delivering orders-of-magnitude faster inference suitable for onboard control. The approach demonstrates practical potential for real-time, data-driven control of complex dynamic systems and can extend to biomimetic robotics and biomedical devices.

Abstract

In systems control, the dynamics of a system are governed by modulating its inputs to achieve a desired outcome. For example, to control the thrust of a quad-copter propeller the controller modulates its rotation rate, relying on a straightforward mapping between the input rotation rate and the resulting thrust. This mapping can be inverted to determine the rotation rate needed to generate a desired thrust. However, in complex systems, such as flapping-wing robots where intricate fluid motions are involved, mapping inputs (wing kinematics) to outcomes (aerodynamic forces) is nontrivial and inverting this mapping for real-time control is computationally impractical. Here, we report a machine-learning solution for the inverse mapping of a flapping-wing system based on data from an experimental system we have developed. Our model learns the input wing motion required to generate a desired aerodynamic force outcome. We used a sequence-to-sequence model tailored for time-series data and augmented it with a novel adaptive-spectrum layer that implements representation learning in the frequency domain. To train our model, we developed a flapping wing system that simultaneously measures the wing's aerodynamic force and its 3D motion using high-speed cameras. We demonstrate the performance of our system on an additional open-source dataset of a flapping wing in a different flow regime. Results show superior performance compared with more complex state-of-the-art transformer-based models, with 11% improvement on the test datasets median loss. Moreover, our model shows superior inference time, making it practical for onboard robotic control. Our open-source data and framework may improve modeling and real-time control of systems governed by complex dynamics, from biomimetic robots to biomedical devices.

Paper Structure

This paper contains 32 sections, 3 equations, 7 figures, 4 tables, 1 algorithm.

Figures (7)

  • Figure 1: Forward vs. inverse mapping of a physical system.$(a)$ In forward mapping, a model $f_\mathrm{fwd}(t)$ predicts system outcomes based on the tracked system dynamics, e.g.. Given the history of the wing motion, predicting the current lift force generated by the wing. $(b)$ In inverse mapping, a model $f_\mathrm{inv}(t)$ takes in future/desired system outcomes to infer the inputs that generate them. For the wing, using the future lift force to predict what wing motion created this force. $(c)$ A diagram of a wing driven by a motor, with force and camera sensors. (d) Experimental setup: sample images from the two fast cameras, showing the wing and its markers. (e) The 3D position of the wing in motion. The yellow triangle represents the triangulation of the three markers and colored lines indicate the markers' trajectories. Two black arrows show the cameras' viewpoint.
  • Figure 2: Wing degrees-of-freedom. The three angles of wing rotation: elevation angle $\theta$ (left, shown in a side view), wing-pitch angle $\psi$ (middle, shown in a front view), and wing-stroke angle $\phi$ (right, shown in a top view). The $\hat{x}$, $\hat{y}$, $\hat{z}$ vectors represent the Cartesian lab frame of reference.
  • Figure 3: System architecture: Seq2Seq with ASL. The input sequence $x$ is encoded by an adaptive spectrum layer (ASL). ASL conducts representation learning in Fourier space, assigning weights to each frequency bin using the entire complex signal, and then reverting to the time domain via IFFT. A skip connection is added from input to representation. Subsequently, a GRU encoder generates a fixed-size representation. Following this, the attention (fully connected, FC) mechanism utilizes the current decoder hidden state and encoder context vector to compute attention weights $w_t$. The last encoder state is employed instead of the (non-existent) decoder state in the initial iteration. These attention weights adjust the encoder context vector based on the current decoder hidden state. Finally, the resulting weighted tensor passes through a GRU-based decoder to predict the next step $\hat{y}_t$, with $T$ representing the prediction window size.
  • Figure 4: Prediction examples. Four pairs of input-output scenarios from our dataset (left, described in \ref{['subsec:our-dataset']}) and the open source dataset bayiz2021flapping_dataset (right, described in \ref{['subsec:open-source-dataset']}). The upper section displays force/torque inputs representing the desired system outcome. In our dataset, these are $F_1, F_2, F_3, F_4$ as depicted in our experimental setup (see Fig. \ref{['fig:forward-vs-inverse']}c-e). In the open source dataset, the outcome is represented by a set of three measured forces $F_x, F_y$, and $F_z$, and two measured torques $M_y$, $M_z$. In both experiments, the targets are similar and represented in the lower section as the corresponding true angle labels and predicted angles, generated by our adapted Seq2Seq+ASL model trained to model the inverse mapping. Different system outcomes (top) result from different system dynamics (bottom) in each event. The events shown span various wing kinematics.
  • Figure 5: Comparison with state-of-the-art models. The distributions of test loss across seven models for two datasets: Our dataset and the open-source dataset Bayiz_Cheng_2021. Inside each box, the horizontal line represents the median MAE, the colored box represents the 2nd and 3rd quartiles, and the whiskers represent the 1st and 4th quartiles. Outliers are indicated by open circles. adapted Seq2Seq+ASL model demonstrates superior performance, particularly evident in its median values, outperforming other models. Interestingly, Seq2Seq+ASL has more outliers than the Transformer, which explains the difference between their mean and median metrics.
  • ...and 2 more figures