Skip to main
CaltechAUTHORS
Collections
My dashboard
Log in
CaltechAUTHORS
Published April 17, 2024 | in press
Journal Article Open

Machine learning reveals the control mechanics of an insect wing hinge

Creators
Melis, Johan M. ORCID icon
Siwanowicz, Igor
Dickinson, Michael H.1 ORCID icon
  • 1. ROR icon California Institute of Technology

Abstract

Insects constitute the most species-rich radiation of metazoa, a success that is due to the evolution of active flight. Unlike pterosaurs, birds and bats, the wings of insects did not evolve from legs1, but are novel structures that are attached to the body via a biomechanically complex hinge that transforms tiny, high-frequency oscillations of specialized power muscles into the sweeping back-and-forth motion of the wings2. The hinge consists of a system of tiny, hardened structures called sclerites that are interconnected to one another via flexible joints and regulated by the activity of specialized control muscles. Here we imaged the activity of these muscles in a fly using a genetically encoded calcium indicator, while simultaneously tracking the three-dimensional motion of the wings with high-speed cameras. Using machine learning, we created a convolutional neural network3 that accurately predicts wing motion from the activity of the steering muscles, and an encoder–decoder4 that predicts the role of the individual sclerites on wing motion. By replaying patterns of wing motion on a dynamically scaled robotic fly, we quantified the effects of steering muscle activity on aerodynamic forces. A physics-based simulation incorporating our hinge model generates flight manoeuvres that are remarkably similar to those of free-flying flies. This integrative, multi-disciplinary approach reveals the mechanical control logic of the insect wing hinge, arguably among the most sophisticated and evolutionarily important skeletal structures in the natural world.

Copyright and License

© The Author(s), under exclusive licence to Springer Nature Limited 2024.

Acknowledgement

The authors thank W. Dickson for extensive expertise in instrumentation, programming, data analysis, formatting all the data and code for public repositories, and creating the animations of free flight data in Supplementary Videos 3–8; T. Lindsay for assistance in the design of the epifluorescence microscope and data acquisition software used for muscle imaging; A. Erickson for helpful comments on the manuscript and Supplementary Information; A. Huda for assistance in the construction of genetic lines; J. Omoto for collecting confocal images of wings to visualize resilin using autofluorescence; J. Tuthill and T. Azevedo for a tomographic dataset of the Drosophila wing hinge that was collected at the European Synchrotron Radiation Facility in Grenoble, France; S. Whitehead for analysis of this tomography data to provide a preliminary reconstruction of the hinge sclerites, and for critical feedback on the manuscript text and data presentation; and B. Fabian and R. G. Beutel for providing μ-CT data from their publication on the morphology of the adult fly body. The research reported in this publication was supported by the National Institute of Neurological Disorders and Stroke of the NIH (U19NS104655). I.S. was supported through the AniBody Project Team at HHMI’s Janelia Research Campus for this work.

 

Contributions

J.M.M. collected all the data presented in the manuscript and developed the software for data analysis. J.M.M. and M.H.D. collaborated on planning the experiments, preparing figures, and writing the manuscript. I.S. collected the high-resolution morphological images of the Drosophila thorax and created Supplementary Video 1.

Data Availability

The data required to perform the analyses in this paper and reconstruct all the data figure are available in the following files: main_muscle_and_wing_data.h5, flynet_data.zip, robofly_data.zip, which are available from the Caltech Data website: https://doi.org/10.22002/aypcy-ck464. main_muscle_and_wing_data.h5 contains the time series of muscle activity and wing kinematics used to train the muscle-to-wing motion CNN and the encoder–decoder used in the latent variable analysis. flynet_data.zip contains a series of data files for training and running Flynet: (1) camera/calibration/cam_calib.txt (example camera calibration data); (2) movies/session_01_12_2020_10_22 (folder containing example movies); (3) labels.h5 and valid_labels.h5 (data for training); and (4) weights_24_03_2022_09_43_14.h5 (example weights). robofly_data.zip contains the MATLAB data files with force and torque data acquired using the dynamically scaled robotic fly.

Extended Data Fig. 1 Automated setup for simultaneous recording of muscle fluorescence and wing motion.

Extended Data Fig. 2 Flynet workflow and definitions of wing kinematic angles.

Extended Data Fig. 3 CNN-predicted wing motion for example flight sequences.

Extended Data Fig. 4 Correlation analysis of steering muscle fluorescence and wingbeat frequency.

Extended Data Fig. 5 Aerodynamic force measurements and inertial force calculations.

Extended Data Fig. 6 Aerodynamic and inertial forces for maximum muscle activity wingbeats.

Extended Data Fig. 7 Simulation of free flight maneuvers using the state-space system and Model Predictive Control.

Extended Data Fig. 8 Latent variable analysis reveals sclerite function using an encoder–decoder.

Extended Data Fig. 9 Flexible wing root facilitates elastic storage during wingbeat and allows wing to passively respond to changes in lift and drag throughout stroke.

Extended Data Table 1 Correlation slopes and baseline muscle activity pattern

 Extended Data Table 2 Number of high-speed sequences recorded per trigger muscle

Supplementary Information

Supplementary Video 1

Supplementary Video 2

Supplementary Video 3

Supplementary Video 4

Supplementary Video 5

Supplementary Video 6

Supplementary Video 7

Supplementary Video 8

Code Availability

The code required to perform the analyses in this paper and reconstruct all the data figures are available at https://github.com/FlyRanch/mscode-melis-siwanowicz-dickinson. The software is organized into seven submodules: flynet, flynet-kalman, flynet-optimizer, latent-analysis, mpc-simulations, robofly and wing-hinge-cnn. The installation instructions, system requirements and dependency information are given separately in their respective folders. flynet is a neural network and GUI application that requires the dataset flynet_data.zip, and may be used to create Extended Data Fig. 2. An example demonstrating how to train the network can be found in the examples sub-directory and is called train_flynet.py. flynet-kalman is a Kalman filter Python extension used by Flynet. flynet-optimizer is a particle swarm optimization extension module used by Flynet. latent-analysis is a Python library and Jupyter notebook for performing latent variable analysis that requires the dataset main_muscle_and_wing_data.h5, and may be used to create Fig. 6 and Extended Data Fig. 8. mpc-simulations is a Python library and Jupyter notebook for MPC simulations, and may be used to create Fig. 5 and Extended Data Fig. 7. robofly is a Python library and Jupyter notebook for extracting force and torque data from the robotic fly experiments and plotting forces superimposed on 3D wing kinematics. It requires dataset robofly_data.zip, and may be used to create Extended Data Figs. 5 and  6. wing-hinge-cnn is a Python library and Jupyter notebook for creating the muscle-to-wing motion CNN. It requires main_muscle_and_wing_data.h5, and may be used to create Figs. 3 and 4 and Extended Data Fig. 3. An example demonstrating how to train the network can be found in the examples sub-directory as is called train_wing_hinge_cnn.py. The files containing the raw videos of the muscle Ca2+ images and high-speed videos of wing motion are too large to be hosted on a publicly accessible website. Example high-speed videos are provided in the folder movies/session_01_12_2020_10_22 mentioned in Data availability. Additional sequences are available upon request by contacting the corresponding author.

Conflict of Interest

The authors declare no competing interests.

Files

41586_2024_7293_Tab1_ESM.jpg
Files (151.0 MB)
Name Size Download all
41586_2024_7293_Tab1_ESM.jpg
md5:bf6ee4eabcfa7f2270dc7ceb16655f55
77.9 kB Preview Download
41586_2024_7293_Fig9_ESM.jpg
md5:b56038d870b608d7782c42996a3acb52
754.6 kB Preview Download
41586_2024_7293_MOESM10_ESM.mp4
md5:a5dc86d4396e7efd7df8810d7672932e
12.9 MB Download
41586_2024_7293_MOESM7_ESM.mp4
md5:29569255046ac2fe400feba1129b485c
13.0 MB Download
41586_2024_7293_MOESM4_ESM.mp4
md5:d393b238a37e55d3cdf251321449b1e6
30.6 MB Download
41586_2024_7293_MOESM8_ESM.mp4
md5:265e6cd5560992155ce1aa6c26f93843
22.0 MB Download
41586_2024_7293_Fig13_ESM.jpg
md5:168ea2396013a81a13657acf970453b2
398.6 kB Preview Download
41586_2024_7293_MOESM6_ESM.mp4
md5:d49b732cd176e2d03f8033b98607a558
19.0 MB Download
41586_2024_7293_Fig12_ESM.jpg
md5:51d4bb435c4cdc0a29bdff7b38ea0656
490.0 kB Preview Download
41586_2024_7293_Fig8_ESM.jpg
md5:c1f1ab33a76f5540d0f446c9294c1535
185.9 kB Preview Download
41586_2024_7293_Fig7_ESM.jpg
md5:f7bf75a090496868c8563561799f54a8
287.2 kB Preview Download
41586_2024_7293_MOESM3_ESM.mp4
md5:61b5cfc46a185509fdcc4d686c92a78e
12.5 MB Download
41586_2024_7293_Fig14_ESM.jpg
md5:be9d62f22cffa05320d34e2586472757
267.2 kB Preview Download
41586_2024_7293_Fig15_ESM.jpg
md5:c5593743452be5628446872ea46c9bdf
100.6 kB Preview Download
41586_2024_7293_MOESM5_ESM.mp4
md5:e10c36278bb36db60f472f3f227ed240
33.6 MB Download
41586_2024_7293_Fig11_ESM.jpg
md5:cf1690abe8989dd0572ef0633941cf30
331.1 kB Preview Download
41586_2024_7293_MOESM9_ESM.mp4
md5:bcc006bdbde5c2459ca0e591b574e149
2.7 MB Download
41586_2024_7293_MOESM1_ESM.pdf
md5:28fd8abf8992300bc007420589017f6f
1.4 MB Preview Download
41586_2024_7293_Fig10_ESM.jpg
md5:aa63296f9b15cf96e4d2383feacca349
357.8 kB Preview Download

Additional details

Identifiers Related works Funding Caltech Custom Metadata
ISSN
1476-4687
Featured in
Caltech News: https://www.caltech.edu/about/news/how-insects-control-their-wings-the-mysterious-mechanics-of-insect-flight (URL)
National Institutes of Health
U19NS104655
Howard Hughes Medical Institute
Caltech groups
Division of Biology and Biological Engineering (BBE), GALCIT, Tianqiao and Chrissy Chen Institute for Neuroscience
0
Views
0
Downloads
All versions This version
Views

Total views

0 0
Downloads

Total downloads

0 0
Data volume

Total data volume

0 Bytes 0 Bytes

More info on how stats are collected....

Versions

Communities

Keywords and subjects

Keywords

  • Multidisciplinary

Details

DOI Badge
10.1038/s41586-024-07293-4
DOI Badge

DOI

10.1038/s41586-024-07293-4

Markdown

[![DOI](https://authors.library.caltech.edu/badge/DOI/10.1038/s41586-024-07293-4.svg)](https://doi.org/10.1038/s41586-024-07293-4)

reStructedText

.. image:: https://authors.library.caltech.edu/badge/DOI/10.1038/s41586-024-07293-4.svg
   :target: https://doi.org/10.1038/s41586-024-07293-4

HTML

<a href="https://doi.org/10.1038/s41586-024-07293-4"><img src="https://authors.library.caltech.edu/badge/DOI/10.1038/s41586-024-07293-4.svg" alt="DOI"></a>

Image URL

https://authors.library.caltech.edu/badge/DOI/10.1038/s41586-024-07293-4.svg

Target URL

https://doi.org/10.1038/s41586-024-07293-4

Resource type
Journal Article
Publisher
Nature
Published in
Nature, ISSN: 0028-0836.
Languages
English

Rights

  • No commercial reproduction, distribution, display or performance rights in this work are provided.
    No further description.

Export

Created:
April 18, 2024
Modified:
April 18, 2024
About Policies Help Contact Us RSS
Powered by InvenioRDM