# Vector Field Aided Trajectory Tracking by a 10-gram Flapping-Wing Micro Aerial Vehicle

Abdoullah Ndoye, José de Jesus Castillo-Zamora, Sabrine Samorah Laki, Romain Miot, Edwin van Ruymbeke, Franck Ruffier

► To cite this version:

Abdoullah Ndoye, José de Jesus Castillo-Zamora, Sabrine Samorah Laki, Romain Miot, Edwin van Ruymbeke, et al.. Vector Field Aided Trajectory Tracking by a 10-gram Flapping-Wing Micro Aerial Vehicle. IEEE International Conference on Robotics and Automation (ICRA 2023), IEEE, May 2023, Londres, United Kingdom. hal-03831115v2

HAL Id: hal-03831115

https://hal.science/hal-03831115v2

Submitted on 18 Mar 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Vector Field Aided Trajectory Tracking by a 10-gram Flapping-Wing Micro Aerial Vehicle

A. Ndoye<fnref n="1" />,*, J. J. Castillo-Zamora<fnref n="1" />, S. Samorah-Laki<fnref n="1" />, R. Miot<fnref n="2" />, E. Van Ruymbeke<fnref n="2" /> and F. Ruffier<fnref n="1" />

**Abstract**— Here we describe how a 10-gram Flapping-Wing Micro Aerial Vehicle (FWMAV) was able to perform an automatic trajectory tracking task based on a vector field method. In this study, the desired heading was provided by a vector field which was computed depending on the desired trajectory. The FWMAV's heading was changed by a rear steering mechanism. This rear mechanism simultaneously (i) tenses one wing and relaxes the opposite wing, and (ii) moves the rudder in the same direction as the wing is relaxed. Due to the complex dynamics, system identification methods were used to identify simple linear models using a set of dedicated free flight tests. This yaw and roll simple models help to adjust the yaw controller and the inner loop roll controller. The experimental results obtained here show that a time-independent vector field-based strategy is robust to various initial position and/or speed conditions. The task of tracking circular and 8-shaped trajectories was accomplished successfully over tens of meters.

## I. INTRODUCTION

During the last decade, Flapping-Wing Aerial Vehicles (FWAVs), which have also been called ornithopters, have been attracting considerable attention. Recent studies have focused on improving the agility of these vehicles [1–4] and controlling their height of flight [5,6], thus enhancing their performances. Nowadays, FWAVs are able to perform difficult tasks such as obstacle avoidance [7–9], fixed-object tracking [10] and trajectory tracking tasks [11–13]. Studies on micro FWAV (called also Flapping-Wing Micro Aerial Vehicles FWMAVs) are quite rare [11].

In parallel, remote-controlled two-wing ornithopters weighing only 10 grams have been available on the market since 2010 [14,15] and sold as crash-resistant toys by the company XTIM-BionicBird. The successive versions of these RC (Radio-controlled) models based on the same propulsion and directional mechanisms have been named Avitron, BionicBird, and more recently, Metafly.

The Metafly (shown in Fig. 1) is endowed with 2 DC motors serving as its actuators: (i) the main DC motor is attached to a 2-stage planetary gearbox controlling the flapping frequency [14], and (ii) the second DC motor concomitantly tenses one wing and relaxes the opposite wing (in a differential manner) while adjusting the rudder to control the course [15]. The speed of the Metafly is poorly controllable, however, as its flapping rate affects both its altitude and its speed. As regards the agility of FWMAVs, it has been suggested that relying solely on a rudder to change the direction of FWMAVs may be insufficient as this does not generate enough force required

<figure><img src="image_2.png" /><figcaption>Fig. 1. The 10-gram Metafly Flapping-Wing Micro Aerial Vehicle in the Marseille flight arena © Cyril Frésillon / ISM / CNRS Photothèque</figcaption></figure>

to perform agile maneuvers, even using bang-bang control methods [16]. One commonly adopted solution here is the so-called banked turn in which roll motion is used to generate a change of direction [3,17] by means of dihedral wings [18,19], asymmetrical morphing of the wing surface [4], differential wing spoiler steering [20], or the generation of an asymmetric flapping amplitude [2,21], among other solutions.

Besides, the dynamics and kinematics of FWAVs are so complex that a large number of dynamic models have been presented in the literature [6,22–25]. Due to this complexity, the authors of most previous studies consider fixed-wing models, without taking the intra-flapping processes [26] or the heading actuator dynamics [27] into account. In these cases, the results of grey-box [28,29] or black-box [12,30] system identification have been used to model FWAVs’ dynamics. Kim et al. [11,31] have succeeded in flying 4 ornithopters in formation along a circular trajectory. The cohesion of this formation was highly dependent, however, on specific initial conditions and on the fine tuning of these ornithopters, as the authors themselves mentioned [11]. As vector field-based trajectory tracking is time-independent [32–37], this strategy can be used to overcome the poor controllability of the Metafly’s flight speed when tracking various trajectories, as established in the present study. The present approach enables the vehicle (i) to track the trajectory robustly, regardless of the initial conditions, (ii) to follow complex trajectories, and (iii) to change its trajectory while in flight. The main contribution of this research can be summarized under the following three

<footnote n="1">¹ Aix Marseille Université, CNRS, ISM, Marseille, France</footnote>

<footnote n="2">² XTIM - Bionic Bird, 13015 Marseille, France, www.bionicbird.com</footnote>

<footnote>* Corresponding author: abdoullah.ndoye@grenoble-inp.fr</footnote>
principal headings:

* The identification of simplified yaw and roll linear models for the Metafly based on enriched free flight data.

* A novel 3-state (full left, neutral, full right) directional control system whereby the directional control is carried out by tensing and relaxing the wings while positioning the rudder appropriately. The commands of tensioning/relaxing the wings and of actuating the rudder are mixed (Fig. 2). The amount of time ($t_{deflection}$) the actuator remains full left or full right serves as the control input.

* This is the first implementation of a vector field method on a FWMAV (as far as we know) in order to enable it to time-independently track a trajectory, while enlarging the range of possible initial conditions.

The modified Metafly FWMAV and the method used to control its heading are presented in detail in Section II. The system identification procedure, which was performed using real flight data and Matlab processing tools, is described, along with the simplified model, in Section III. The vector field strategy used to track various trajectories successfully is presented in Section IV. The results of various experimental tests validating the present vector field-based trajectory tracking approach are presented in Section V. Lastly, the authors' concluding comments and suggestions for future studies are presented in Section VI.

## II. THE METAFLY FWMAV AND ITS HEADING CONTROL

In the modified version of the Metafly FWMAV used here, a Deltang RX43d receiver controlling the two actuators was embedded, which adjusted the flapping frequency and actuated the directional mechanism, respectively. A 3.7V/58mAh Lipo battery was used as the power source. A list of the Metafly's characteristics is given in Table I.

The heading control mechanism (described in Fig. 2) makes it possible to change the heading by initiating a banked turn (as depicted in Fig. 3). For example, in order to perform a left banked turn as in Fig. 3, the heading control mechanism tenses the right wing and relaxes the left wing while positioning the rudder to the left. This creates a negative rolling motion inducing a positive yaw moment. At the same time, there is also a considerable difference in the drag between the left and the right wings (because the right wing is tensed and the left wing relaxed), which also results in a positive yaw moment in the same direction as the turn we have referred to as the

<figure><img src="image_3.png" /><figcaption>Fig. 2. Top view of the heading control mechanism. It consists of a DC motor actuator that turns the rudder and concomitantly applies a differential tension to the wings (relaxing or tensing them). A 3-state turning command (full-left, neutral or full-right) was used to efficiently apply the periodic command computed off-board. The periodic command $t_{deflection}$ updated at 5Hz set the duration of the deflection applied by the DC actuator between 50 and 150[ms]. The DC actuator set the rudder angle to either $\delta R=-40^{\circ};+40[\deg]$ while tensing one wing and relaxing the opposite wing.</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>Fig. 3. On the Metafly, the directional mechanism concomitantly relaxes one wing (here, the left wing), tenses the opposite wing (here, the right wing) and turns the rudder (here, to the left): in this case, these adjustments cause a negative roll motion inducing a positive yaw moment. Contrary to the tensed right wing, the relaxed left wing results in a greater drag, which causes a positive yaw moment (in the same turning direction): this has been called the proverse yaw. The lift on the right wing is greater than the lift on the left wing in average during the flapping cycle. The additional wind generated by the roll motion (see insert) causes a deflection of the left lift vector forward and the right lift vector backward. A transient adverse yaw occurs as the direct consequence. The rudder (the vertical tail) creates a small positive yaw moment, making the Metafly more agile.</figcaption></figure>

<table><caption>TABLE I
METAFLY PARAMETERS AND PROPERTIES</caption><thead><tr><td>Parameter/Property</td><td>Nominal value</td></tr></thead><tbody><tr><td>Mass</td><td>10 [g]</td></tr><tr><td>Length</td><td>190 [mm]</td></tr><tr><td>Wingspan</td><td>290 [mm]</td></tr><tr><td>Wing chord</td><td>85 [mm]</td></tr><tr><td>Wing amplitude</td><td>±55°</td></tr><tr><td>Flapping frequency</td><td>10 – 20 [Hz]</td></tr><tr><td>Flight endurance</td><td>8 [min]</td></tr></tbody></table>

proverse yaw moment (Fig. 3). During the rolling motion, as the left wing rolls down (see insert in Fig. 3), an additional wind from below is created. This additional wind is added to the velocity-induced wind to give the total upward-oriented wind (grey arrows in Fig. 3). The resulting opposite deflection of the lift (backward and forward) creates a negative yaw moment called the adverse yaw (see red arrows in Fig. 3). The adverse yaw is transient as it due to the rolling motion. The
rudder also creates a small amount of positive yaw moment in the same direction as the yaw induced by the rolling motion and the proverse yaw, which causes it to turn appropriately, making the effect of the adverse yaw negligible.

### III. METAFLY MODELING FOR THE HEADING CONTROL

The identification of the Metafly dynamics between the directional command and the yaw (heading) was performed. As mentioned above, the Metafly must perform a roll motion in order to change its heading. If the roll angle $\Phi$ exceeds 35°, the turn is too tight and we observed that the Metafly will dive and crash. To overcome this problem, the roll motion is controlled and capped in an inner loop. Two transfer functions were identified: (i) $H_{roll/t_{deflection}}(s)$ which relates the roll $\Phi(s)$ to the control input $t_{deflection}(s)$, and (ii) $H_{yaw/roll}(s)$, which establishes the relation between the yaw $\Psi(s)$ and the roll $\Phi(s)$, so that:

$$H_{roll/t_{deflection}}(s) = \frac{\Phi(s)}{t_{deflection}(s)} \quad \& \quad H_{yaw/roll}(s) = \frac{\Psi(s)}{\Phi(s)} \quad (1)$$

#### A. Experimental Setup and Flight Tests

The experiments required for the identification took place in the flight arena. The effective volume in which the 10-gram Metafly can be tracked at an acquisition frequency of 500Hz by the Vicon motion capture system (17 cameras) was $5x6x3m^3$ (IxLxH). For this purpose, a set of adhesive or spherical reflective markers was suitably placed over the Metafly. The Metafly were controlled by an external workstation (equipped with Matlab and ROS), which delivered the 2.4GHz DSMX signals to the RX43D receiver embedded on the Metafly (via an Ethernet-to-DSMX bridge, see Fig. 4).

Several identification flight tests were performed in order to identify the models. In these experiments, the PID controller:

$$C_z(s) = \frac{u_{flapping}}{e_z} = k_d s + k_p + \frac{k_i}{s} = 1000s + 200 + \frac{0.1}{s} \quad (2)$$

was previously implemented to make the Metafly hold its altitude constant with respect to the ground by adapting its flapping frequency. The gains were manually tuned and the command $u_{flapping}$ was sent directly to the onboard RX43D receiver that will actuate the wing-flapping mechanism.

The latter version led us to take the flapping frequency as the only control input used to stabilize the altitude of the Metafly and to use the heading control mechanism (Fig. 2) as the only actuator of the rotational motion. Nonetheless, as it was not possible to adjust the angle $\delta R$ throughout the predefined range, we adopted the 3-state turning command strategy presented in Fig 2, thus taking the time $t_{deflection}$ as the actual rotational control input. Note that the directional control (full left, neutral, or full right) was defined by the sign of $t_{deflection}$, so that a negative value allowed to turn right, and a positive value allowed to turn left. As shown in Fig. 5, the $t_{deflection}$, roll and yaw data were recorded and then used in the Matlab System Identification Toolbox to retrieve the models.

<figure><img src="image_5.png" /><figcaption>Fig. 4. Four reflective markers enabled the Metafly to be tracked by the motion capture system. The embedded RX43D receiver applied the computed commands of both the flapping and the turning mechanisms in real time.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 5. For closed-loop system identification purpose, a human pilot stabilized the Metafly while a randomized signal was added to the $t_{deflection}$ input (here given by the joystick) in order to enlarge the input frequency range for more accurate system identification. A) For the sake of visualization and for identification purpose, the input $t_{deflection}$ was computed by measuring the time $\delta R$ was hold constant during the identification flight tests. B) Roll. C) Yaw during several banked turns. D) X-Y positions during system identification flight test.</figcaption></figure>

#### B. Identification of the model

Based on the data recorded during 4 different free flight tests, the functions $H_{roll/t_{deflection}}(s)$ and $H_{yaw/roll}(s)$ were identified, using the Gauss-Newton search method, as follows:

$$H_{roll/t_{deflection}}(s) = -\frac{0.4536s + 0.09858}{s^2 + 0.7815s + 0.1387} \quad (3)$$

$$H_{yaw/roll}(s) = -\frac{7.455s + 8.179}{s^2 + 1.493s + 0.01036} \quad (4)$$

The transfer functions were identified with a given fit percentage of 78% and 86% for $H_{roll/t_{deflection}}(s)$ and $H_{yaw/roll}(s)$,
<figure><img src="image_7.png" /><figcaption>Fig. 6. The Metafly control scheme, including the heading model. Two non-linearities (a deadzone/limiter and a quantizer) and two transfer functions, the heading dynamics (roll and yaw, respectively). The deadzone corresponds to the minimum time the DC motor had to actuate the heading control system. The quantizer approximately reflected the refresh rate (80Hz) of the ethernet-to-DSMX bridge. The inner loop maintained the roll between ±35deg so as to prevent the vehicle from diving and crashing. The outer heading loop controlled the yaw with respect to the direction setpoint $\Psi_{desired}$, given by the vector field while the altitude control loop kept the height of flight constant.</figcaption></figure>

respectively, while knowing that complex couplings between roll and yaw exist. Both of the transfer functions identified were used in the simulations performed for controller tuning purposes, which are presented in the following section.

## IV. VECTOR FIELD-BASED TRAJECTORY TRACKING

### A. The Vector Field theory

A vector field assigned a vector to each 2D coordinate in the (x, y) plane with a direction enabling it to converge with a desired path [34]. Let us consider the (x, y) position of the robot, $\xi = [x \ y]^T \in \mathbb{R}^2$ and recall the orientation of the robot $\Psi_{meas} \in \mathbb{R}$ [34], so that its velocity can be written as follows:

$$ \dot{\xi} = v_{\text{flight}} \begin{bmatrix} \cos(\Psi_{\text{meas}}) \\ \sin(\Psi_{\text{meas}}) \end{bmatrix} = v_{\text{flight}} \chi_u \in \mathbb{R}^2 \quad (5) $$

where $v_{flight} \in \mathbb{R}$ is the flight speed (taken for instance to be constant, since the flapping frequency was fixed by the altitude controller) and $\chi_u \in \mathbb{R}^2$ is the directional unit vector. In addition, one can define a curvilinear desired path by the implicit equation:

$$ \mathcal{P} = \{\xi_d : \varphi(\xi_d) = 0\} \subset \mathbb{R}^2 \quad (6) $$

so that the function $\varphi: \mathbb{R}^2 \to \mathbb{R}$ is $C^2$-smooth. The geometric curve $\mathcal{P}$ can be written in several implicit forms. The main

<figure><img src="image_8.png" /><figcaption>Fig. 7. Vector field converging clockwise with a circle having radius 1, centered on (0,0). Desired orientation $\Psi_{desired}$ and the actual heading of the Metafly measured by the Vicon system ($\Psi_{meas}$).</figcaption></figure>

restriction imposed on the curvilinear path is regularity, i.e. in the vicinity of $\mathcal{P}$, one has:

$$ \| \nabla \varphi (\xi_d) \| = \left\| \left[ \frac{\partial \varphi (\xi_d)}{\partial x_d} \quad \frac{\partial \varphi (\xi_d)}{\partial y_d} \right]^T \right\| \neq 0 \quad (7) $$

where $\|\cdot\|$ stands for the Euclidean norm. The tracking error $e_{track}$ is defined by a strictly increasing $C^1$-function $\varepsilon(\cdot)$ so that:

$$ e_{\text{track}}(\xi) = \varepsilon[\varphi(\xi)] \in \mathbb{R} \quad (8) $$

The choice of $\varepsilon(\cdot)$ is a free parameter. By definition, $e_{track} = 0$ if and only if $\xi \in \mathcal{P}$. Thus, according to [38], the vector field $\chi$ can be simulated by the expression:

$$ \chi(\xi_d) = (\Gamma - k_n e_{\text{track}}(\xi_d) I_2) \nabla \varphi(\xi_d) \quad (9) $$

with $k_n = \text{const} > 0$,

$$ \Gamma = \begin{bmatrix} 0 & \gamma \\ -\gamma & 0 \end{bmatrix} \in \mathbb{R}^{2 \times 2} \quad \text{and} \quad I_2 = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \in \mathbb{R}^{2 \times 2} \quad (10) $$

Note that $\gamma \in \{-1, 1\}$ determines the direction in which $\mathcal{P}$ will be tracked. Eq. (9) was therefore used to find the desired directional unit vector field $\chi_{u_d}$, and consequently, $\Psi_{desired}$ as follows:

$$ \chi_{u_d} = \frac{\chi(\xi_d)}{\|\chi(\xi_d)\|} = \begin{bmatrix} \chi_{x_d} \\ \chi_{y_d} \end{bmatrix} \quad (11) $$

$$ \Psi_{\text{desired}} = \operatorname{atan2}(\chi_{y_d}, \chi_{x_d}) \quad (12) $$

In addition, the derivative of $\chi_{u_d}$ along its trajectories, $\dot{\chi}_{u_d}$, is given by:

$$ \dot{\chi}_{u_d} = -\omega_d \Gamma \chi_{u_d} = \begin{bmatrix} \dot{\chi}_{x_d} \\ \dot{\chi}_{y_d} \end{bmatrix} \quad (13) $$

Assuming that $\|\chi_{u_d}\| = 1$ and $\chi_{u_d}^T \dot{\chi}_{u_d} = 0$, $\omega_d$ is a scalar function that can be obtained explicitly from the set of equations:

$$ \left\{ \begin{aligned} \dot{\chi}(\xi_d) &= (\Gamma - k_n e_{\text{track}}(\xi_d) I_2) H(\xi_d) \dot{\xi}_d - k_n \dot{e}_{\text{track}}(\xi_d) \nabla \varphi(\xi_d) \\ \dot{e}_{\text{track}}(\xi_d) &= \varepsilon'(\varphi(\xi_d)) [\nabla \varphi(\xi_d)]^T \dot{\xi}_d \\ \dot{\chi}_{u_d} &= \frac{d}{dt} \frac{\chi(\xi_d)}{\|\chi(\xi_d)\|} = - \frac{1}{\|\chi(\xi_d)\|} \Gamma \chi_{u_d} \chi_{u_d}^T \Gamma \dot{\chi}(\xi_d) \end{aligned} \right. \quad (14) $$
where $H(\xi_d)$ stands for the Hessian:

$$H(\xi_d) = \begin{bmatrix} \frac{\partial^2}{\partial x_d^2} \varphi(\xi_d) & \frac{\partial^2}{\partial x_d \partial y_d} \varphi(\xi_d) \\ \frac{\partial^2}{\partial y_d \partial x_d} \varphi(\xi_d) & \frac{\partial^2}{\partial y_d^2} \varphi(\xi_d) \end{bmatrix} \quad (15)$$

For instance, let us recall the implicit function that describes a circle with the radius $r > 0$ centered on $c = [c_x \ c_y]^T \in \mathbb{R}^2$, thus defining $\varphi(\xi_d)$ as:

$$\varphi(\xi_d) = (x_d - c_x)^2 + (y_d - c_y)^2 - r^2 \quad (16)$$

Taking $e_{track}(\xi) = \varphi(\xi)$, $\gamma = -1$ and $k_n = 1$, Eq. (9) applied over Eq. (16), we obtain the vector field:

$$\chi(\xi_d) = 2 \begin{bmatrix} -\varphi(\xi_d) & -1 \\ 1 & -\varphi(\xi_d) \end{bmatrix} \begin{bmatrix} x_d - c_x \\ y_d - c_y \end{bmatrix} \quad (17)$$

from which the directional unit vector field and its derivative, $\chi_{ud}$ and $\dot{\chi}_{ud}$, can be computed. Fig. 7 shows the directional unit vector field of a circle with $r = 1$ and $c = [0 \ 0]^T$, which was used to perform the experimental tests, the vector field of which is described by the expression:

$$\chi_0(\xi_d) = \begin{bmatrix} -x^3 - xy^2 + x - y \\ -y^3 - x^2y + x + y \end{bmatrix} \quad (18)$$

## B. Roll and Yaw controllers

Once the desired attitude has been set, based on the vector field (Eq. 17), the heading error and its derivative can be written as follows:

$$e_{\Psi} = \Psi_{\text{desired}} - \Psi_{\text{meas}} = \operatorname{atan2}(\chi_{y_d}, \chi_{x_d}) - \Psi_{\text{meas}} \quad (19)$$

$$\dot{e}_{\Psi} = \frac{\chi_{y_d} \dot{\chi}_{x_d} - \dot{\chi}_{y_d} \chi_{x_d}}{\chi_{y_d}^2 + \chi_{x_d}^2} - \dot{\Psi}_{\text{meas}} \quad (20)$$

such that Eq. (19) holds for $\Psi_{desired} - \Psi_{meas} < 180^{\circ}$. Eq. (20) can be used to define a PD controller having the form:

$$u_{\Psi} = C_{\Psi}(s) \cdot e_{\Psi} = \text{sawtooth}(e_{\Psi}) + \dot{e}_{\Psi} \quad (21)$$

which gives a reference value that is passed through the filter $F_{\Psi}(s)$ in order to compute the roll reference $\Phi_{desired}$. The function sawtooth(●) serves as a wrapping function to fit the yaw angle between 0 and 360 [deg]. More precision on the calculation of $\dot{e}_{\Psi}$ can be found in [34]. To carry out the experiments, the control scheme depicted in Fig. 6 was adopted. In this respect, a constant setpoint $Z_{desired}$ was given to the vehicle in order to keep its altitude constant by updating the flapping frequency command via the action of the PID controller $C_z(s)$ and the information provided by the MoCap Vicon i.e. the position and the orientation. The directional closed loop control takes the desired yaw angle $\Psi_{desired}$ computed with the vector field. Once this reference value has been computed, it is compared with the actual yaw angle $\Psi_{meas}$ of the Metafly so that the PD controller $C_{\Psi}$ and the filter $F_{\Psi}$ will produce the appropriate desired roll angle, which is limited to between -35° and 35° (to prevent the metafly from diving and crashing as observed in experiments), and this value is then compared with the actual roll angle. The resulting error is thus processed by the lead controller, $C_{\Phi}$ which sends the $t_{deflection}$ command activating the rudder. The altitude of the Metafly is also controlled concomitantly.

<figure><img src="image_9.png" /><figcaption>Fig. 8. Results of a circular trajectory tracking test based on the vector field approach: the circle (radius: 1.75m) was centered on the origin. The average flight altitude was $z = 1.3$ m and 21 turns were completed.</figcaption></figure>

The lead controller $C_{\Phi}$ and the filter $F_{\Psi}$ were included in a simulation that took all the non-linearities into account (Fig. 6) as well as the identified transfer functions ($H_{roll/t_{deflection}}$ and $H_{yaw/roll}$) presented in section III. These controllers were tuned until acceptable behavior in automated flight was taken to have been reached. The filter $F_{\Psi}$ and the lead controller $C_{\Phi}$ used for roll and yaw control, respectively, were defined as follows:

$$F_{\Psi}(s) = 1.28 \left( \frac{s+0.1}{s+0.3} \right) \left( \frac{s+0.1}{s+0.3} \right) \quad (22)$$

$$C_{\Phi}(s) = \frac{t_{\text{deflection}}}{e_{\Phi}} = 3 \left( \frac{s+0.015}{s+0.055} \right) \left( \frac{s+0.015}{s+0.0553} \right) \quad (23)$$

These were used for the automated trajectory tracking of the Metafly presented in the following section.

## V. EXPERIMENTAL RESULTS

Using the vector fields and the 3-state directional command, we established that the Metafly based on the model described

<figure><img src="image_10.png" /><figcaption>Fig. 9. Metafly FAWV tracking with a circular trajectory which increased in size during flight: the vehicle followed a circular trajectory with a radius of 1.5m during 4 laps before taking another circular trajectory with a radius of 2.25m for another 4 laps.</figcaption></figure>
<figure><img src="image_11.png" /><figcaption>Fig. 10. Trajectory tracking taking a circular path with a radius of 1.5 [m] under several initial velocity conditions: initial velocity profile between 2 and 3 [m/s].</figcaption></figure>

in section III and the controllers we developed, were able to perform circular trajectory tracking successfully. As shown in Fig. 8, the Metafly completed 21 circular trajectories with a radius of 1.75m (around 230m) successfully, while keeping a constant altitude. The radius error distribution was centered at 0.0548m and the standard deviation was 0.128m. Table. II summarizes the circular trajectory tracking performances obtained with a mean error of almost 0 in the radius.

In Fig. 9, the Metafly is able to change the radius of its circular trajectory during flight: it performed 4 circular laps with a radius of 1.5m before changing its trajectory and performing 4 larger circular laps with a radius of 2.25m. With the vector field method, the Metafly is able to follow more complex trajectories, such as an 8-shaped circuit set up in several steps, each of which was a section of the 8-shaped trajectory obtained with vector fields converging with a circle (Fig. 11).

The use of the vector field method for flapping-wing MAVs is one of the main contributions of this study. As discussed in the introduction, the vector field method can be used to track a trajectory without imposing strict initial position and/or speed conditions. In Fig. 10, tests were performed with various initial conditions. The circular trajectory tracking task was performed successfully with initial speeds ranging from 2m/s to 3m/s and various positions along a 1.25m-wide starting line. So far, outside the present range of initial conditions, the initial error of the heading angle is such that the Metafly cannot track the circle.

<table><caption>TABLE II
PERFORMANCES DURING A CIRCULAR TRACKING TRAJECTORY IN FIG. 8</caption><thead><tr><td></td><td>std [m]</td><td>mean [m]</td><td>median [m]</td></tr></thead><tbody><tr><td>Radius error</td><td>0.128</td><td>0.0548</td><td>0.0459</td></tr><tr><td>Altitude error</td><td>0.1040</td><td>0.2</td><td>0.2078</td></tr></tbody></table>

<figure><img src="image_12.png" /><figcaption>Fig. 11. Metafly tracking an 8-shape trajectory: A) Steps segmentation according to the position of the vehicle to create an 8-shape circuit with vector fields. B) Resulting 8-shape trajectory performed by the Metafly.</figcaption></figure>

## VI. CONCLUSION

In this study, it was established for the first time (to the best of our knowledge) that a vector field method could be used to make a micro FWAV perform trajectory tracking successfully over 230m. The vector field method, which was proved to be time-independent, enabled the Metafly to track trajectories for various initial position and initial velocity conditions. The results obtained here show that system identification based on enriched manual flight test data can provide an effective basis for designing FWMAV controllers. The 3-state directional command presented here enabled the Metafly to perform circular trajectory tracking and to track an 8-shaped circuit while keeping a constant altitude. In future studies, we would like to (i) to increase the automation of the Metafly using micro-GPSs, gyros, magnetometers or optic flow sensors while taking into account the SSWaP (Speed Size Weight and Power) constraints of micro aerial vehicles [39,40], and (ii) to improve their vector field-based trajectory tracking performances in the presence of wind and obstacles outdoors.

## ACKNOWLEDGMENT

We thank Dr. J. Blanc for improving the English manuscript. We thank J.M. Ingargiola for the electronics, J. Diperi for the micro-mechanics, C. Coquet for the Vicon system, A. Negre, J. Dumond for the HF connection and S. Durand for proofreading. Financial support was provided by a RAPID Biofly grant to E.V.R. & F.R. from the AID/DGA. This work has been partially supported by ROBOTEX 2.0 (Grants ROBOTEX ANR-10-EQPX-44-01 and TIRREX ANR-21-ESRE-0015).
REFERENCES

[1] M. Keennon, K. Klingebiel, and H. Won, "Development of the nano hummingbird: A tailless flapping wing micro air vehicle," in *50th AIAA aerospace sciences meeting including the new horizons forum and aerospace exposition*, 2012, p. 588.

[2] K. Y. Ma, P. Chirarattananon, S. B. Fuller, and R. J. Wood, "Controlled flight of a biologically inspired, insect-scale robot," *Science*, vol. 340, no. 6132, pp. 603–607, 2013.

[3] M. Karásek, F. T. Muijres, C. De Wagter, B. D. Remes, and G. C. De Croon, "A tailless aerial robotic flapper reveals that flies use torque coupling in rapid banked turns," *Science*, vol. 361, no. 6407, pp. 1089–1094, 2018.

[4] A. Chen, B. Song, Z. Wang, D. Xue, and K. Liu, "A novel actuation strategy for an agile bioinspired fwav performing a morphing-coupled wingbeat pattern," *IEEE Transactions on Robotics*, 2022.

[5] S. S. Baek and R. S. Fearing, "Flight forces and altitude regulation of 12 gram i-bird," in *2010 3rd IEEE RAS & EMBS International Conference on Biomedical Robotics and Biomechatronics*. IEEE, 2010, pp. 454–460.

[6] W. He, H. Huang, Y. Chen, W. Xie, F. Feng, Y. Kang, and C. Sun, "Development of an autonomous flapping-wing aerial vehicle," *Science China Information Sciences*, vol. 60, no. 6, pp. 1–8, 2017.

[7] G. C. De Croon, M. Groen, C. De Wagter, B. Remes, R. Ruijsink, and B. W. van Oudheusden, "Design, aerodynamics and autonomy of the delfly," *Bioinspiration & biomimetics*, vol. 7, no. 2, p. 025003, 2012.

[8] C. De Wagter, S. Tijmons, B. D. W. Remes, and G. C. H. E. de Croon, "Autonomous flight of a 20-gram flapping wing mav with a 4-gram onboard stereo vision system," in *2014 IEEE International Conference on Robotics and Automation (ICRA)*, 2014, pp. 4982–4987.

[9] S. Tijmons, C. De Wagter, B. Remes, and G. De Croon, "Autonomous door and corridor traversal with a 20-gram flapping wing mav by onboard stereo vision," *Aerospace*, vol. 5, no. 3, p. 61, 2018.

[10] S. S. Baek, F. L. G. Bermudez, and R. S. Fearing, "Flight control for target seeking by 13 gram ornithopter," in *2011 IEEE/RSJ International Conference on Intelligent Robots and Systems*. IEEE, 2011, pp. 2674–2681.

[11] H.-Y. Kim, J.-S. Lee, H.-L. Choi, and J.-H. Han, "Autonomous formation flight of multiple flapping-wing flying vehicles using motion capture system," *Aerospace Science and Technology*, vol. 39, pp. 596–604, 2014.

[12] J. Oh, S. Kim, B. Lee, S. Kim, and J. Suk, "System identification & attitude control of avian-type flyer with flight test," in *2017 11th Asian Control Conference (ASCC)*. IEEE, 2017, pp. 1677–1682.

[13] J. Hoff, U. Syed, A. Ramezani, and S. Hutchinson, "Trajectory planning for a bat-like flapping wing robot," in *2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)*. IEEE, 2019, pp. 6800–6805.

[14] E. Van Ruymbeke, D. Van Ruymbeke, Y. Van Ruymbeke-Caranoni, and G. Van Ruymbeke, "Flying toy able to move by the flapping of wings," Feb. 11 2010, PCT, WO2010015781A1.

[15] E. Van Ruymbeke, "Flying toy able to move by the flapping of wings," Feb. 26 2013, US Patent 8,382,546.

[16] S. Ryu, U. Kwon, and H. J. Kim, "Autonomous flight and vision-based target tracking for a flapping-wing mav," in *2016 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS)*. IEEE, 2016, pp. 5645–5650.

[17] F. Ruffier, "Robotic-flapper maneuvers and fruitfly turns," *science*, vol. 361, no. 6407, pp. 1073–1074, 2018.

[18] P. Muren, "System for controlling flight direction," Dec. 25 2012, uS Patent 8,336,809.

[19] A. A. Paranjape, S.-J. Chung, and J. Kim, "Novel dihedral-based control of flapping-wing aircraft with application to perching," *IEEE Transactions on Robotics*, vol. 29, no. 5, pp. 1071–1084, 2013.

[20] G. A. Folkertsma, W. Straatman, N. Nijenhuis, C. H. Venner, and S. Stramigioli, "Robird: a robotic bird of prey," *IEEE robotics & automation magazine*, vol. 24, no. 3, pp. 22–29, 2017.

[21] M. Karasek, A. Hua, Y. Nan, M. Lalami, and A. Preumont, "Pitch and roll control mechanism for a hovering flapping wing mav," *International Journal of Micro Air Vehicles*, vol. 6, no. 4, pp. 253–264, 2014.

[22] J. D. DeLaurier, "An aerodynamic model for flapping-wing flight," *The Aeronautical Journal*, vol. 97, no. 964, pp. 125–130, 1993.

[23] A. Banazadeh and N. Taymourtash, "Adaptive attitude and position control of an insect-like flapping wing air vehicle," *Nonlinear Dynamics*, vol. 85, no. 1, pp. 47–66, 2016.

[24] A. Bakhtiari, S. Ehtemadi Haghighi, and A. Maghsoudpour, "Modeling and control of a flapping wing robot," *Proceedings of the Institution of Mechanical Engineers, Part K: Journal of Multi-body Dynamics*, vol. 233, no. 1, pp. 174–181, 2019.

[25] S.-J. Chung and M. Dorothy, "Neurobiologically inspired control of engineered flapping flight," *Journal of guidance, control, and dynamics*, vol. 33, no. 2, pp. 440–453, 2010.

[26] A. Ndoye, S. S. Laki, R. Miot, E. van Ruymbeke, and F. Ruffier, "Ornithopter's intra-flapping body pitch highly depends on wingbeat frequency," *Computer Methods in Biomechanics and Biomedical Engineering*, vol. 24, no. Sup 1, pp. S101–S103, 2021.

[27] W. He, X. Mu, L. Zhang, and Y. Zou, "Modeling and trajectory tracking control for flapping-wing micro aerial vehicles," *IEEE/CAA Journal of Automatica Sinica*, vol. 8, no. 1, pp. 148–156, 2020.

[28] J. Grauer, E. Ulrich, J. Hubbard Jr, D. Pines, and J. S. Humbert, "Testing and system identification of an ornithopter in longitudinal flight," *Journal of Aircraft*, vol. 48, no. 2, pp. 660–667, 2011.

[29] H. Gim, S. Kim, J. Suk, and S. Cho, "Longitudinal system identification of ornithopter with automated flight tests," *IFAC-PapersOnLine*, vol. 49, no. 17, pp. 194–199, 2016.

[30] S. F. Armanini, C. C. de Visser, and G. de Croon, "Black-box Iti modelling of flapping-wing micro aerial vehicle dynamics," in *AIAA atmospheric flight mechanics conference*, 2015, p. 0234.

[31] H.-Y. Kim, J.-S. Lee, and J.-H. Han, "An indoor autonomous flight of multiple ornithopters following a circular path," in *2014 14th International Conference on Control, Automation and Systems (ICCAS 2014)*. IEEE, 2014, pp. 844–847.

[32] D. R. Nelson, D. B. Barber, T. W. McLain, and R. W. Beard, "Vector field path following for miniature air vehicles," *IEEE Transactions on Robotics*, vol. 23, no. 3, pp. 519–529, 2007.

[33] D. Zhou and M. Schwager, "Vector field following for quadrotors using differential flatness," in *2014 IEEE international conference on robotics and automation (ICRA)*. IEEE, 2014, pp. 6567–6572.

[34] L. Jaulin, *Mobile robotics*. John Wiley & Sons, 2019.

[35] J. P. Wilhelm and G. Clem, "Vector field uav guidance for path following and obstacle avoidance with minimal deviation," *Journal of Guidance, Control, and Dynamics*, vol. 42, no. 8, pp. 1848–1856, 2019.

[36] A. M. Rezende, V. M. Gonçalves, A. H. Nunes, and L. C. Pimenta, "Robust quadcopter control with artificial vector fields," in *2020 IEEE International Conference on Robotics and Automation (ICRA)*. IEEE, 2020, pp. 6381–6387.

[37] W. Yao, H. G. de Marina, Z. Sun, and M. Cao, "Distributed coordinated path following using guiding vector fields," in *2021 IEEE International Conference on Robotics and Automation (ICRA)*. IEEE, 2021, pp. 10303–10307.

[38] Y. A. Kapitanyuk, H. G. de Marina, A. V. Proskurnikov, and M. Cao, "Guiding vector field algorithm for a moving path following problem," *IFAC-PapersOnLine*, vol. 50, no. 1, pp. 6983–6988, 2017.

[39] G. C. De Croon, J. J. Dupeyroux, C. De Wagter, A. Chatterjee, D. A. Olejnik, and F. Ruffier, "Accommodating unobservability to control flight attitude with optic flow," *Nature*, vol. 610, no. 7932, pp. 485–490, 2022.

[40] S. Fuller, Z. Yu, and Y. P. Talwekar, "A gyroscope-free visual-inertial flight control and wind sensing system for 10-mg robots," *Science Robotics*, vol. 7, no. 72, p. eabq8184, 2022.