Model block diagrams.

<p>(A) Control of the pitch rate () in response to horizontal optic flow component (<i>ωx</i><sub><i>Rfly</i></sub>). The measured <i>ωx</i><sub><i>Rfly</i></sub> is compared with an input reference set-point, , and the error (<i>ϵ</i><sub><i>ω</i></sub>) is then sent to a Proportional-Derivative controller, which delivers a reference pitch rate, . We then used a second loop mimicking the halteres, to measure and adjust the pitch rate, , to this set-point. The pitch <i>θ</i><sub><i>p</i></sub> obtained by integration (by definition) is then used to calculate the orientation of the thrust and the speed vector in the inertial reference frame (see B). The norm of the force produced by flapping wings is assumed to correspond to a second order transfer function with a zero based on the data. The two components of the optic flow vector in the fly reference frame, <i>ωx</i><sub><i>Rfly</i></sub> and <i>ωz</i><sub><i>Rfly</i></sub>, are then calculated geometrically (see B). <i>ωx</i><sub><i>Rfly</i></sub> is used to close the pitch control loop. (B) Details of the pitch rate control based on horizontal optic flow component.</p>