MeLa: A Programming Language for a New Multidisciplinary Oceanographic Float
Abstract
:1. Introduction
1.1. Context
1.2. Motivations and Objectives
- Embedded software programming requires specific technical skills, and it can be off-putting for less technically skilled scientists who will have to learn C language programming and know specialized technical details regarding the instrument, such as the operation of the real time operating system, micro-controller, sensors, etc.
- The embedded applications must comply with the limited resources of the instrument. Otherwise they may not behave as expected, induce elevated costs of data transmission, or considerably reduce the instrument life time.
- The embedded applications must be reliable, without software bugs, and efficient, with a minimum impact on the instrument resources. Any miss-conceived code may compromise the instrument that is not directly accessible when deployed in the oceans. Less technically skilled developers are more prone to writing miss-conceived code.
- The embedded applications developed independently and installed on the same instrument must not interfere with each other. Whether the applications are installed alone or with other applications their behavior must not change.
2. A Programming Language Based on Models
2.1. Models for Programming
- Scientists write applications in MeLa, which avoids embedded software concerns. The applications written in a text file are transformed into models (implemented as Java objects) with a parser.
- The analysis verifies that the limits of the floats are not exceeded and the results are returned to developers allowing them identify problems and correct them.
- The code for simulation on a computer is generated to settle the applications and verify that they behave as expected.
- Composition combines several applications to install on the same float after verifying that they are not incompatible.
- The embedded software code to program the float is generated.
2.2. Description of MeLa
- The RealTimeSequence (lines 27–34) is associated with real time constraints to guarantee that all the data from the sensor are processed. The execution time of the sequence must be shorter than the time between each packet of data, and other applications cannot delay the processing of a block of data until the point of missing a packet of data. The method used in order to verify these constraints is a scheduling analysis and it is described in Section 2.5.1.
- The ProcessingSequence (lines 36–42) does not have real time constraints. Using this sequence means that the developer accepts to miss some data from the sensor. However, this sequence allows for calling instructions with a long execution time that would raise an error inside a RealTimeSequence.
2.3. Mermaid Float Architecture
2.4. Code Generation
2.4.1. Overview
2.4.2. Priority Rules
2.4.3. Benefits of MeLa for Embedded Software Programming
2.5. Application Verification
2.5.1. Static Analysis of Applications
Processor Usage
Duration of the Dive
Satellite Transmission
Battery Life Time
3. Developing with MeLa
4. Experiments
4.1. Detection of Earthquakes
4.1.1. Scientific Context
4.1.2. The Seismic Detection Algorithm
4.1.3. Implementation with MeLa
4.1.4. Evaluation of the Algorithm
4.2. Detection of Blue Whales
4.2.1. Scientific Context
4.2.2. The Blue Whale Detection Algorithm
- The length of the detection must be above 4 successive windows (yellow part of Figure 11).
- The mean value of the ratio must be above 2.5.
- The number of times the frequency goes downward between two successive windows must be more than 3 times the number of times the frequency goes upward.
- The number of times the frequency goes downward must be more than 2.
- The number of times the frequency goes downward must be more than 0.25 times the number of times the frequency stays stable.
- The maximum frequency must be above 40 Hz.
- The maximum frequency must not change by more than 20 Hz between within two points (0.8 s).
4.2.3. Implementation with MeLa
4.2.4. Evaluation of the Algorithm
Evaluation Protocol
Results
- For the execution time, it takes 12 s for Resnet to process a five minutes long recording whereas it takes only 15 milliseconds for the algorithm written in MeLa; for one year of data, it is 14 d against 26 min. Moreover the CNN has been executed on GPU Geforce GTX1060, whereas the MeLa algorithm has been executed on a laptop.
- The network Resnet size is 134.4 MB whereas the programmable memory of the float has only 256 kB of space, the MeLa algorithm size is 410 kB if compiled for a laptop and 139 kB if compiled for the float (and 148 kB if compiled with the seismic detection algorithm).
- The GPU used in the evaluation has a power consumption of 116 Watts, which would consume the 4 kWatts.h of energy that is available on the MERMAID float just after a day and a half. If the MeLa algorithm is used on the GPU to process one year of data, it will consume 46 W.h instead of 39 kW.h for the CNN; this is equivalent to the energy that is required by an electric car to travel, respectively, 300 m and 260 km.
5. Discussion and Conclusions
- Raising its level of abstraction, for example, by allowing the developers to define an overlap between each packet of data that can be useful for the computation of spectrograms.
- Adding machine learning capabilities to automate, at least in part, the development of algorithms. Models, such as decision trees or neural networks, can be integrated and trained into an application. It is also possible to optimize the value of specific parameters with linear regression, for example, a threshold in a condition.
- Computing RAM, flash, and programmable memory usage that are very limited in embedded systems. It would help to prevent exceed of their capacity.
- Applications using the same sensor at different sampling frequencies should be able to be composed using a decimation filter. Such a filter must be steep enough to prevent aliasing and doing it automatically is challenging.
- Development tools to offer a better experience to developers and incite them to adopt the language. For example, a development environment with auto completion and highlighting of the code snippets that use the most of resources, or plotting functions for simulation.
Supplementary Materials
Author Contributions
Funding
Acknowledgments
Conflicts of Interest
Abbreviations
Mermaid | Mobile Earthquake Recording Device in Marine Areas by Independent Divers |
MeLa | Mermaid Language |
OBS | Ocean Bottom Seismometers |
UPA | Underwater Passive Acoustic |
CTD | Conductivity Temperature Depth |
GPS | Global Positioning System |
RUDICS | Router-Based Unrestricted Digital Internetworking Connectivity Solutions |
SRAM | Static Random Access Memory |
DSP | Digital Signal Processor |
RTOS | Real Time Operating System |
DCLDE | Detection, Classification, Localization, Density Estimation |
STA/LTA | Short Term Average over Long Term Average |
CNN | Convolutional Neural Network |
DSL | Domain Specific Language |
MDE | Model Driven Engineering |
Appendix A
# Values Bool, Int, Float ComplexInt, ComplexFloat String # Arrays ArrayInt, ArrayFloat ArrayComplexInt, ArrayComplexFloat # Buffers BufferInt, BufferFloat # Specific types for processing FFTInt, FFTFloat, IIRInt, IIRFloat, FIRInt, FIRFloat, CDF24Int, CDF24Float, StaLtaInt, StaLtaFloat, TriggerInt, TriggerFloat, DistributionInt, DistributionFloat # Utils File |
# Array functions put(); Put a value in an array get(); Get a value from an array copy(); Copy an array to another array toComplex(); Convert an integer or a float to a complex number toFloat(); Convert an integer to a float toInt(); Convert a float to an integer select(); Select a portion of an array to work on unselect(); Work on the whole array clear(); Delete all values in the array # Buffer functions push(); Add a value to the end of the buffer toArray(); Copy the content of the buffer to an array # Processing functions fft(); Compute a Fourier transform cdf24(); Compute a CDF24 wavelet transform cdf24ScalesPower(); Compute the power of each scale of a CDF24 iir(); Infinite impulse response filter fir(); Finite impulse response filter stalta(); Short term over long term average trigger(); Return true for high or low value, or rising or falling edge, compared to a threshold cumulativeDistribution(); Compute the cumulative distribution max(); Find the maximum value and its index in an array min(); Find the minimum value and its index in an array mean(); Compute the mean value of an array sum(); Sum all the elements of an array energy(); Compute the energy, defined as the sum of the squared values of an array rms(); Root means square stdDev(); Standard deviation var(); Variance abs(); Absolute value add(); Add elements of an array with a value or add two arrays sub(); Subtract elements of an array with a value or subtract of two arrays mult(); Multiply elements of an array with a value or divide two arrays div(); Divide elements of an array with a value or divide two arrays diff (); Forward finite difference (derivative approximation) dotProduct(); Dot product of two arrays negate(); Negates each value of an array conv(); Convolution between two array corr(); Correlation between two array sqrt(); Square root cos(); Cosinus sin(); Sinus log10(); Common logarithm pow(); Power of n magnitude(); Magnitude of a complex number # Utility functions ascentRequest(); Request the ascent of the float getTimestamp(); Get the current date with a resolution of 1 second record(); Record a value, an array, a buffer or a string in a file getSampleIndex(); Only for simulation. Get the index of current sample read in the input file |
References
- Wüst, G. The major deep-sea expeditions and research vessels 1873–1960: A contribution to the history of oceanography. Prog. Oceanogr. 1964, 2, 1–52. [Google Scholar] [CrossRef]
- Marcelli, M.; Piermattei, V.; Zappalà, G. Advances in low cost marine technologies. WIT Trans. Mod. Sim. 2011, 51, 497–507. [Google Scholar]
- Venkatesan, R.; Ramesh, K.; Kishor, A.; Vedachalam, N.; Atmanand, M.A. Best Practices for the Ocean Moored Observatories. Front. Mar. Sci. 2018, 5, 469. [Google Scholar] [CrossRef] [Green Version]
- Meindl, A. Guide to Moored Buoys and Other Ocean Data Acquisition Systems. WMO & IOC Data Buoy Cooperation Panel. 1996. Available online: https://library.wmo.int/index.php?lvl=notice_display&id=12444#.X5Wux1njKCO (accessed on 25 October 2020).
- Hello, Y.; Royer, J.Y.; Rivet, D.; Charvis, P.; Yegikyan, M.; Philippe, O. New Versatile Autonomous Platforms for Long-Term Geophysical Monitoring in the Ocean. In Proceedings of the OCEANS 2019, Marseille, France, 17–20 June 2019; pp. 1–8. Available online: https://ieeexplore.ieee.org/abstract/document/8867216 (accessed on 14 October 2019).
- Devi, G.K.; Ganasri, B.; Dwarakish, G. Applications of Remote Sensing in Satellite Oceanography: A Review. In Proceedings of the International Conference on Water Resources, Coastal and Ocean Engineering (ICWRCOE’15), Mangalore, India, 12 March 2015; pp. 579–584. [Google Scholar]
- Gould, W.J. From Swallow floats to Argo—The development of neutrally buoyant floats. Deep Sea Research Part II: Topical Studies in Oceanography 2005, 52, 529–543. Available online: http://www.sciencedirect.com/science/article/pii/S0967064504003091 (accessed on 25 October 2020). [CrossRef]
- Davis, R.E.; Regier, L.A.; Dufour, J.; Webb, D.C. The Autonomous Lagrangian Circulation Explorer (ALACE). J. Atmos. Oceanic Technol. 1992, 9, 264–285. [Google Scholar] [CrossRef]
- Manley, J.; Willcox, S. The Wave Glider: A New Concept for Deploying Ocean Instrumentation. IEEE Instrum. Meas. Mag. 2010, 13, 8–13. [Google Scholar] [CrossRef]
- Roemmich, D.; Johnson, G.; Riser, S.; Davis, R.; Gilson, J.; Owens, W.; Garzoli, S.; Schmid, C.; Ignaszewski, M. The Argo Program Observing the Global Ocean with Profiling Floats. Oceanography 2009, 22, 34–43. [Google Scholar] [CrossRef] [Green Version]
- Matsumoto, H.; Jones, C.; Klinck, H.; Mellinger, D.K.; Dziak, R.P.; Meinig, C.A. Tracking beaked whales with a passive acoustic profiler float. J. Acoust. Soc. Am. 2013, 133, 731–740. [Google Scholar] [CrossRef]
- Riser, S.C.; Nystuen, J.A.; Rogers, A. Monsoon effects in the Bay of Bengal inferred from profiling float-based measurements of wind speed and rainfall. Limnol. Oceanogr. 2008, 53, 2080–2093. [Google Scholar] [CrossRef] [Green Version]
- Yang, J.; Riser, S.; Nystuen, J.; Asher, W.; Jessup, A. Regional Rainfall Measurements Using the Passive Aquatic Listener During the SPURS Field Campaign. Oceanography 2015, 28, 124–133. [Google Scholar] [CrossRef] [Green Version]
- Sukhovich, A.; Bonnieux, S.; Hello, Y.; Irisson, J.O.; Simons, F.J.; Nolet, G. Seismic monitoring in the oceans by autonomous floats. Nat. Commun. 2015, 6, 8027. [Google Scholar] [CrossRef] [Green Version]
- Fowler, M. Domain Specific Languages, 1st ed.; Pearson Education: Upper Saddle River, NJ, USA, 2010. [Google Scholar]
- Bonnieux, S.; Mosser, S.; Blay-Fornarino, M.; Hello, Y.; Nolet, G. Model driven programming of autonomous floats for multidisciplinary monitoring of the oceans. In Proceedings of the OCEANS 2019, Marseille, France, 17 June 2019; IEEE: New York, NY, USA, 2019; pp. 1–10. [Google Scholar]
- Parr, T.J.; Quong, R.W. ANTLR: A Predicated-LL(k) Parser Generator. Softw. Pract. Exper. 1995, 25, 789–810. [Google Scholar] [CrossRef]
- Miles, R.; Hamilton, K. Learning UML 2.0, 1st ed.; O’Reilly Media, Inc.: Sebastipol, CA, USA, 2006. [Google Scholar]
- Sha, L.; Klein, M.H.; Goodenough, J.B. Rate Monotonic Analysis for Real-Time Systems. In Foundations of Real-Time Computing: Scheduling and Resource Management; van Tilborg, A.M., Koob, G.M., Eds.; Springer US: Boston, MA, USA, 1991; pp. 129–155. [Google Scholar]
- Pierce, B.C.; Turner, D.N. Local Type Inference. ACM Trans. Program. Lang. Syst. 2000, 22, 1–44. [Google Scholar] [CrossRef]
- Liu, C.L.; Layland, J.W. Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment. J. ACM 1973, 20, 46–61. [Google Scholar] [CrossRef]
- Nolet, G.; Hello, Y.; van der Lee, S.; Bonnieux, S.; Ruiz, M.J.C.; Pazmino, N.A.; Deschamps, A.; Regnier, M.M.; Font, Y.; Chen, Y.J.; et al. Imaging the Galápagos mantle plume with an unconventional application of floating seismometers. Sci Rep. 2019. Available online: https://www.nature.com/articles/s41598-018-36835-w (accessed on 25 October 2020).
- Brown Partworks Ltd. Endangered Wildlife and Plants of the World; Marshall Cavendish Corporation: Tarrytown, NY, USA, 2001. [Google Scholar]
- Roman J, M.J. The whale pump: Marine mammals enhance primary productivity in a coastal basin. PLoS ONE 2010, 5, e13255. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Marques, T.A.; Thomas, L.; Ward, J.; DiMarzio, N.; Tyack, P.L. Estimating cetacean population density using fixed passive acoustic sensors: An example with Blainville’s beaked whales. J. Acoust. Soc. Am. 2009, 125, 1982–1994. [Google Scholar] [CrossRef] [Green Version]
- Mcdonald, M.; Hildebrand, J.; Mesnick, S. Biogeographic characterisation of blue whale song worldwide: Using song to identify populations. J. Cetacean Res. Manag. 2006, 8, 55–65. [Google Scholar]
- Nguyen Hong Duc, P.; Torteroto, M.; Dorian, C. Assessing Inter-Annotator Agreement from Collaborative Annotation Campaigns in Marine Bioacoustics. 2020. Available online: https://osmose.xyz/reports/inter_annotation_agreement.pdf (accessed on 25 October 2020).
- Mesaros, A.; Heittola, T.; Virtanen, T. Metrics for Polyphonic Sound Event Detection. Appl. Sci. 2016, 6, 162. [Google Scholar] [CrossRef]
- Sainath, T.N.; Parada, C.; Convolutional neural networks for small-footprint keyword spotting. Interspeech 2015. Available online: https://www.isca-speech.org/archive/interspeech_2015/papers/i15_1478.pdf (accessed on 25 May 2020).
- Cakir, E.; Adavanne, S.; Parascandolo, G.; Drossos, K.; Virtanen, T. Convolutional recurrent neural networks for bird audio detection. In Proceedings of the 2017 25th European Signal Processing Conference (EUSIPCO), Kos, Greece, 28 August 2017; pp. 1744–1748. [Google Scholar]
- Mac Aodha, O.; Gibb, R.; Barlow, K.E.; Browning, E.; Firman, M.; Freeman, R.; Harder, B.; Kinsey, L.; Mead, G.R.; Newson, S.E.; et al. Bat detective—Deep learning tools for bat acoustic signal detection. PLoS Comput. Biol. 2018, 14, 1–19. [Google Scholar] [CrossRef] [Green Version]
- Shiu, Y.; Palmer, K.; Roch, M.; Fleishman, E.; Liu, X.; Nosal, E.M.; Helble, T.; Cholewiak, D.; Gillespie, D.; Klinck, H. Deep neural networks for automated detection of marine mammal species. Sci. Rep. 2020, 10, 607. [Google Scholar] [CrossRef] [Green Version]
- Wang, D.; Zhang, L.; Lu, Z.; Xu, K. Large-Scale Whale Call Classification Using Deep Convolutional Neural Network Architectures. In Proceedings of the 2018 IEEE International Conference on Signal Processing, Communications and Computing (ICSPCC), Qingdao, China, 14 September 2018; pp. 1–5. [Google Scholar]
- Liu, S.; Liu, M.; Wang, M.; Ma, T.; Qing, X. Classification of Cetacean Whistles Based on Convolutional Neural Network. In Proceedings of the 2018 10th International Conference on Wireless Communications and Signal Processing (WCSP), Hangzhou, China, 18 October 2018; pp. 1–5. [Google Scholar]
- Luo, W.; Yang, W.; Zhang, Y. Convolutional neural network for detecting odontocete echolocation clicks. J. Acoust. Soc. Am. 2019, 145, EL7–EL12. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Schaetti, N. Character-based convolutional neural network and resnet18 for twitter authorprofiling. In Proceedings of the Ninth International Conference of the CLEF Association (CLEF 2018), Avignon, France, 10–14 September 2018. [Google Scholar]
- Volkmann, J.; Stevens, S.; Newman, E. A Scale for the Measurement of the Psychological Magnitude Pitch. J. Acoust. Soc. Am. 1937, 8, 208. [Google Scholar] [CrossRef] [Green Version]
- Mussbacher, G.; Amyot, D.; Breu, R.; Bruel, J.M.; Cheng, B.H.C.; Collet, P.; Combemale, B.; France, R.B.; Heldal, R.; Hill, J.H.; et al. The Relevance of Model-Driven Engineering Thirty Years from Now. In Lecture Notes in Computer Science; MODELS 2014: Model-Driven Engineering Languages and Systems; Springer International Publishing: Cham, Switzerland, 2014; pp. 183–200. [Google Scholar]
- Schmidt, D.C. Guest Editor’s Introduction: Model-Driven Engineering. Computer 2006, 39, 25–31. [Google Scholar] [CrossRef]
- Kent, S. Model Driven Engineering. In Proceedings of the IFM ’02 Third International Conference on Integrated Formal Methods, Turku, Finland, 15–17 May 2002; Springer-Verlag: New York, NY, USA, 2002; pp. 286–298. [Google Scholar]
- Navet, N.; Fejoz, L. CPAL: High-level abstractions for safe embedded systems. In Proceedings of the International Workshop on Domain-Specific Modeling, Amsterdam, The Netherlands, 16 October 2016. [Google Scholar]
- Gobillot, N.; Lesire, C.; Doose, D. A Design and Analysis Methodology for Component-Based Real-Time Architectures of Autonomous Systems. J. Intell. Rob. Syst. 2018, 1–16. [Google Scholar] [CrossRef] [Green Version]
- Voelter, M.; Ratiu, D.; Schaetz, B.; Kolb, B. Mbeddr: An Extensible C-Based Programming Language and IDE for Embedded Systems. In Proceedings of the SPLASH ’12 3rd Annual Conference on Systems, Programming, and Applications: Software for Humanity, Tucson, AZ, USA, 21–26 October 2012; Association for Computing Machinery: New York, NY, USA, 2012; pp. 121–140. [Google Scholar]
- Hill, A.P.; Prince, P.; Snaddon, J.L.; Doncaster, C.P.; Rogers, A. AudioMoth: A low-cost acoustic device for monitoring biodiversity and the environment. HardwareX 2019, 6, e00073. [Google Scholar] [CrossRef]
- Hill, A.P.; Prince, P.; Piña Covarrubias, E.; Doncaster, C.P.; Snaddon, J.L.; Rogers, A. AudioMoth: Evaluation of a smart open acoustic device for monitoring biodiversity and the environment. Methods Ecol. Evol. 2018, 9, 1199–1211. [Google Scholar] [CrossRef] [Green Version]
- Prince, P.; Hill, A.; Piña-Covarrubias, E.; Doncaster, C.; Snaddon, J.; Rogers, A. Deploying Acoustic Detection Algorithms on Low-Cost, Open-Source Acoustic Sensors for Environmental Monitoring. Sensors 2019, 19, 553. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Kocakulak, M.; Butun, I. An overview of Wireless Sensor Networks towards internet of things. In Proceedings of the 2017 IEEE 7th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, NV, USA, 9 January 2017; pp. 1–6. [Google Scholar]
- Atzori, L.; Iera, A.; Morabito, G. The Internet of Things: A survey. Comput. Netw. 2010, 54, 2787–2805. [Google Scholar] [CrossRef]
- Prause, C.R.; Bibus, M.; Dietrich, C.; Jobi, W. Software product assurance at the German space agency. J. Softw. Evol. Process 2016, 28, 744–761. [Google Scholar] [CrossRef]
Time in minutes | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | ... |
Sensor used by app A | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | ... |
Sensor used by app B | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 | 0 | 0 | ... |
Total sensor usage | 1 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | ... |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Bonnieux, S.; Cazau, D.; Mosser, S.; Blay-Fornarino, M.; Hello, Y.; Nolet, G. MeLa: A Programming Language for a New Multidisciplinary Oceanographic Float. Sensors 2020, 20, 6081. https://doi.org/10.3390/s20216081
Bonnieux S, Cazau D, Mosser S, Blay-Fornarino M, Hello Y, Nolet G. MeLa: A Programming Language for a New Multidisciplinary Oceanographic Float. Sensors. 2020; 20(21):6081. https://doi.org/10.3390/s20216081
Chicago/Turabian StyleBonnieux, Sébastien, Dorian Cazau, Sébastien Mosser, Mireille Blay-Fornarino, Yann Hello, and Guust Nolet. 2020. "MeLa: A Programming Language for a New Multidisciplinary Oceanographic Float" Sensors 20, no. 21: 6081. https://doi.org/10.3390/s20216081
APA StyleBonnieux, S., Cazau, D., Mosser, S., Blay-Fornarino, M., Hello, Y., & Nolet, G. (2020). MeLa: A Programming Language for a New Multidisciplinary Oceanographic Float. Sensors, 20(21), 6081. https://doi.org/10.3390/s20216081