A Low-Cost Hardware/Software Platform for Lossless Real-Time Data Acquisition from Imaging Spectrometers
Abstract
:1. Introduction
- Only COTS hardware components (no need for specialized hardware);
- General-purpose operating system (no need for a specialized real-time operating system);
- High sustained I/O throughput (100 Mbytes/s approximately);
- Lossless data storage (300 GBytes);
- Optimized and properly configured multithreaded software scheme, using the real-time services provided by the general-purpose operating system.
2. Background and Related Work
2.1. Background
2.2. Related Work
3. Real-Time Data Acquisition and Storage System
3.1. System Requirements
- Real-time acquisition and storage of large amounts of information, with timing constraints on the communication with the spectrometer that carries the imaging sensors;
- Sustained input throughput of 94 Mbytes/s;
- Storage capacity for 100,000 frames (1 Mpx size per frame, 300 GBytes approximately);
- No data shall be lost or altered;
- Low economic cost.
3.2. Functional Description
- -
- Bit 18: Parity (even)
- -
- Bits 17-16: Detector output amplifier (“00” = 1st, “01” = 2nd, “10” = 3rd, “11” = 4th)
- -
- Bits 15-0: Science data
- -
- Bit 18: Parity (even)
- -
- Bit 17: Frame Synchronization
- -
- Bit 16: Line Synchronization
- -
- Bits 15-14: Data header
- -
- Bit 13: Parity error noticed during previous Frame Period
- -
- Bits 12-0: Spare
- During frame transfer: one sync word with bit “Frame Synchronization” set to ‘1’.
- During each line transfer during readout: one sync word with the bit “Line Synchronization” set to ‘1’.
- At each pixel digitization, the FEE shall send the four pixels in the following order: 1st amplifier, 2nd amplifier, 3rd amplifier, 4th amplifier. For a given amplifier, the data sent to the RTDAS shall follow the order they were read out without buffering or re-ordering.
- -
- Data Valid = 1
- -
- Science/Sync = 1
- -
- Parity = 0
- -
- Detector output amplifier = 00 (first detector)
- -
- Science data = 0x1BD8 (16-bit pixel value)
3.3. Hardware Architecture
3.3.1. Deserializer Board
3.3.2. Acquisition Board
3.3.3. Personal Computer
3.4. Software Architecture
- -
- Register_Card(): open and initialize PCI-7360 card
- -
- DIO_VoltLevelConfig(): set voltage level for DIO ports to 3.3v
- -
- DIO_PortConfig(): configure DIO ports as inputs
- -
- DI_7360_Config(): configure Digital Input (DI) to 32-bit port width, free run mode, no trigger wait, external sample clock
- -
- DI_7360_ExtSampCLKConfig(): set DI sampled clock to source AFI7, Dynamic Delay Adjustment = 0, Dynamic Phase Adjustment = 0
- -
- VirtualAlloc(): allocate multiple buffers to be written, 8-byte alignment; 2 buffers of size 778,240 bytes each
- -
- DI_ContMultiBufferSetup(): set up the allocated buffers; the driver will build the memory descriptor for the specified buffers to perform direct memory access (DMA) operation. The buffers set by DI_ContMultiBufferSetup() are chained to be a ring buffer for the DMA engine to write data to the set buffers continuously.
- -
- fopen(): create/open 500 files for writing.
- -
- CreateThread(): creation of threads
- -
- SetPriorityClass(): REALTIME_PRIORITY_CLASS
- -
- SetThreadPriority(): assignment of priorities
- Thread dataReader: (top priority: TIME_CRITICAL). This thread checks if the next buffer in the ring is filled with data, and consequently, it must be read to avoid data loss. Whenever a buffer is ready to be read, it performs the following actions to process the data:
- Reads every 32-bit word in the buffer. For each word in which the DATA_VALID bit is set:
- Copies the three least significant bytes of the 32-bit word to a local array (treated as a large circular buffer with a size of 1.8 Gbytes).
- If a 32-bit word is a FRAME_SYNC, it sends a message to diskWriter, because the information buffered in the local array up to that moment is enough to be written to the storage device efficiently.
- Tells the driver that the ready buffers are handled entirely (DI_AsyncMultiBuffersHandled())
- Checks whether DI is overrun (DI_AsyncDblBufferOverrun())
- Thread diskWriter: This thread waits for messages from dataReader. Whenever a message is received, it writes the blocks of data specified in it to the RAID storage device. The data are read from the local array. A block size of one frame is used (2 Mbytes if the frame has an image size of 1 Mpx.). Every frame is written into a different file. Once a frame is written to disk, it signals the fileManager thread in order to inform it.
- fileManager: This thread waits to be signaled by diskWriter. Whenever it is signaled, it closes the file just written by diskWriter. If the number of files closed is above 490 (meaning less than 10 files remain open), it opens a new file.
- -
- CloseHandle(): termination of threads
- -
- Release_Card(): disconnect from PCI-7360 card
- -
- VirtualFree(): memory deallocation
- -
- fclose(): closing of all open files
4. Evaluation and Results
- Acquisition board: theoretical 400 MBytes/s data transfer rates can be achieved at full transmission speed, using a 32-bit data width and a 100 MHz clock rate. The interface with the personal computer is PCI Express ×4 (4 GB/s bandwidth, far above the board data throughput limit). The probability of data transmission failure is negligible.
- Deserializer board: according to the manufacturer, 233 Mbytes/s data rates are reachable when operating at maximum clock speed.
- Storage devices: The storage devices used in RTDAS are 1 TB Seagate Barracuda 3.5-inch 7200 rpm HDD. According to the devices’ datasheet, their theoretical sustained writing rate is 210 Mbytes/s. The effective sequential write speed tested in a real benchmark [27] is 193 Mbytes/s. It is worth mentioning that a larger disk capacity implied a lower write speed (for example, a 6 TB disk possesses a theoretically sustained writing rate of 185 Mbytes/s).
- Configuration of the number of buffers in the acquisition board: several configurations of buffers were tested; the best performance was obtained when two buffers were selected (the possible range being from two to sixteen buffers). It is worth noting that the total amount of buffer memory provided by the board drivers is approximately 2 Mbytes, regardless of the number of buffers selected.
- Multithreaded software scheme: parallel thread execution improves performance, being particularly suited for data-intensive applications that are I/O-limited.
- Real-time features provided by the operating system: the maximum size of each acquisition board buffer is 778,240 bytes, which makes it fill up every eight milliseconds at a nominal clock speed of 23.5 MHz. This is a tight time for a multitasking time-sharing OS like Windows. Consequently, threads have to be scheduled using a fixed priority scheme.
- Opening of files: as the maximum number of open files is 512 in Windows OS, it was decided to open 500 files prior to the beginning of data acquisition. In this fashion, during data acquisition, a new file is opened only when a previous file is filled with data and closed.
5. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Drusch, M.; Bello, U.D.; Carlier, S.; Colin, O.; Fernandez, V.; Gascon, F.; Hoersch, B.; Isola, C.; Laberinti, P.; Martimort, P.; et al. Sentinel-2: ESA’s Optical High-Resolution Mission for GMES Operational Services. Remote Sens. Environ. 2012, 120, 25–36. [Google Scholar] [CrossRef]
- López-Andreu, F.J.; Erena, M.; Gómez, J.; Lopez, M.; Juan, A.; Erena, M.; Dominguez-Gómez, J.; López-Morales, J. Sentinel-2 Images and Machine Learning as Tool for Monitoring of the Common Agricultural Policy: Calasparra Rice as a Case Study. Agronomy 2021, 11, 621. [Google Scholar] [CrossRef]
- Lomelí-Huerta, R.; Avila-George, H.; Caicedo, J.P.; De-la-Torre, M. Water Pollution Detection in Acapulco Coasts Using Merged Data from the Sentinel-2 and Sentinel-3 Satellites. In Proceedings of the 2021 IEEE International Geoscience and Remote Sensing Symposium IGARSS, Brussels, Belgium, 11–16 July 2021; pp. 1518–1521. [Google Scholar]
- Gregory, W.; Lawrence, I.R.; Tsamados, M. A Bayesian approach towards daily pan-Arctic sea ice freeboard estimates from combined CryoSat-2 and Sentinel-3 satellite observations. Cryosphere 2021, 15, 2857–2871. [Google Scholar] [CrossRef]
- Riedl, S.; Harlander, M.; Schlosser, C.; Kolm, M.; Maurer, R.; Bazalgette Courrèges-Lacoste, G.; Pachot, C.; Ahlers, B.; Grabarnik, S.; Gambicorti, L.; et al. Sentinel 4 UVN: A geostationary imaging UVN spectrometer for air quality monitoring: Performance, measurement modes and model philosophy. In Proceedings of the International Conference on Space Optics, Gandhinagar, India, 3–7 December 2019. [Google Scholar]
- Marenaci, P.; Estares Otal, L.; Meijer, E.; Pittet, J.; Riedl, S.; Shilpa Suram, S.; Ehrhart, C.; Bazalgette Courrèges-Lacoste, G.; Bulsa, G.; Pasquet, A.; et al. Sentinel-4: A geostationary imaging UVN spectrometer for air quality monitoring: Integration and alignment of the instrument proto flight model. In Proceedings of the International Conference on Space Optics, Online, 11 June 2021. [Google Scholar]
- Bazalgette Courrèges-Lacoste, G.; Sallusti, M.; Bulsa, G.; Bagnasco, G.; Gulde, S.; Kolm, M.; Smith, D.J.; Maurer, R. Knowing what we breathe: Sentinel 4: A geostationary imaging UVN spectrometer for air quality monitoring. In Proceedings of the International Conference on Space Optics, Biarritz, France, 25 September 2017. [Google Scholar]
- Veefkind, P.; Aben, I.; McMullan, K.; Förster, H.; Vries, J.; Otter, G.; Claas, J.; Eskes, H.; Dehaan, J.; Kleipool, Q.; et al. TROPOMI on the ESA Sentinel-5 Precursor: A GMES mission for global observations of the atmospheric composition for climate, air quality and ozone layer applications. Remote Sens. Environ. 2012, 120, 70–83. [Google Scholar] [CrossRef]
- Savenets, M. Air pollution in Ukraine: A view from the Sentinel-5P satellite. Idojárás Q. J. Hung. Meteorol. Serv. 2021, 125, 271–290. [Google Scholar] [CrossRef]
- Dubet, D.; Crescence, P.; Miesch, C.; Lobb, D. Design and performances of the fluorescence imaging spectrometer of flex. In Proceedings of the International Conference on Space Optics, Tenerife, Canary Islands, Spain, 17 November 2017. [Google Scholar]
- Windpassinger, R.; Schubert, J.; Kampf, D. Proposed concept and preliminary design for the sentinel-5 UVNs spectrometer. In Proceedings of the International Conference on Space Optics, Tenerife, Canary Islands, Spain, 17 November 2017. [Google Scholar]
- Irizar, J.; Melf, M.; Bartsch, P.; Koehler, J.; Weiß, S.; Greinacher, R.; Erdmann, M.; Kirschner, V.; Pérez Albiñana, A.; Martin, D.D. Sentinel-5/UVNS. In Proceedings of the International Conference on Space Optics, Chania, Greece, 9–12 October 2019. [Google Scholar]
- Parisi, A.V.; Igoe, D.P.; Downs, N.J.; Turner, J.; Amar, A.; Jebar, M.A. Satellite Monitoring of Environmental Solar Ultraviolet A (UVA) Exposure and Irradiance: A Review of OMI and GOME-2. Remote. Sens. 2021, 13, 752. [Google Scholar] [CrossRef]
- Bovensmann, H.; Burrows, J.P.; Buchwitz, M.; Frerick, J.; Noel, S.; Rozanov, V.V.; Chance, K.; Goede, A.P. SCIAMACHY: Mission Objectives and Measurement Modes. J. Atmos. Sci. 1999, 56, 127–150. [Google Scholar] [CrossRef]
- Dobber, M.R.; Kleipool, Q.; Veefkind, P.; Levelt, P.F.; Rozemeijer, N.C.; Hoogeveen, R.W.; Aben, I.; de Vries, J.; Otter, G. From ozone monitoring instrument (OMI) to tropospheric monitoring instrument (TROPOMI). In Proceedings of the International Conference on Space Optics, Toulouse, France, 21 November 2017. [Google Scholar]
- Schoenmaker, J. The development of EGSE COTS products for high-speed O/B interfaces for advanced spacecraft and instruments. In Proceedings of the SESP 2012: Simulation and EGSE facilities for Space Programmes, Noordwijk, The Netherlands, 25–27 September 2012. [Google Scholar]
- Centonze, V.; Lovascio, A.; D’orazio, A. An innovative EGSE approach for satellite RF system characterization based on real-time monitoring and space environment oriented analysis. In Proceedings of the 2017 IEEE International Workshop on Metrology for AeroSpace (MetroAeroSpace), Padua, Italy, 21–23 June 2017; pp. 68–73. [Google Scholar]
- Lazzarotto, F.; Vertolli, N.; Maschietti, D.; Lellis, A.M.; Ryno, J.; Camozzi, F.; Orsini, S.; Milillo, A.; Mura, A.; Angelis, E.D.; et al. The BepiColombo SERENA/ELENA Instrument On-Ground Testing with the ELENA Special Check Out Equipment (SCOE). In Proceedings of the arXiv: Instrumentation and Methods for Astrophysics, Darmstadt, Germany, 18–19 June 2013. [Google Scholar]
- Abbott, D.J.; Heyes, W.G.; Jastrzembski, E.; MacLeod, R.W.; Timmer, C.; Wolin, E. CODA performance in the real world. In IEEE Conference on Real-Time Computer Applications in Nuclear Particle and Plasma Physics, Proceedings of the 11th IEEE NPSS Real Time Conference. Conference Record (Cat. No.99EX295), Sante Fe, NM, USA, 14–18 June 1999; IEEE: New York, NY, USA, 1999; pp. 119–122. [Google Scholar] [CrossRef]
- Mielczarek, A.; Makowski, D.R.; Gerth, C.; Steffen, B.; Caselle, M.; Rota, L. Real-Time Data Acquisition and Processing System for MHz Repetition Rate Image Sensors. Energies 2021, 14, 7403. [Google Scholar] [CrossRef]
- Sun, W.; Cao, Z.; Wang, L.; Feng, C.; Li, C.; Xia, L.; Zhao, L.; An, Q. Data Acquisition Software for a Prototype of LET Spectrometer. In Proceedings of the 37th International Cosmic Ray Conference PoS(ICRC2021), Berlin, Germany, 12–23 July 2021; Volume 395. [Google Scholar] [CrossRef]
- Karcher, N.; Gebauer, R.; Bauknecht, R.; Illichmann, R.; Sander, O. Versatile Configuration and Control Framework for Real-Time Data Acquisition Systems. IEEE Trans. Nucl. Sci. 2021, 68, 1899–1906. [Google Scholar] [CrossRef]
- Moure, D.; Torres, P.; Toma, D.M.; del Rio, J.; Manuel, A. Data Acquisition System for Volcano Monitoring with Real-Time Transmission, Low Cost and Low Power Consumption. In Proceedings of the 21st IMEKO TC4 International Symposium and 19th International Workshop on ADC Modelling and Testing Understanding the World through Electrical and Electronic Measurement, Budapest, Hungary, 7–9 September 2016. [Google Scholar]
- DS90CR218A 3.3 V Rising Edge Data Strobe LVDS 21 Bit Chan Link 12 MHz to 85 MHz datasheet (Rev. D), Texas Instruments. Available online: https://www.ti.com/lit/gpn/ds90cr218a (accessed on 14 April 2023).
- PCIe-7360 100 MHz 32-CH High-Speed Digital I/O Card; User’s Manual, rev. 2.0, August 2013; ADLINK Technology Inc.: Taoyuan, Taiwan, 2013.
- Seagate. Seagate Barracuda 3.5 HDD Datasheet. 2018. Available online: https://www.seagate.com/www-content/datasheets/pdfs/3-5-barracudaDS1900-11-1806US-en_US.pdf (accessed on 3 April 2023).
- Barracuda 7200.14 1TB. Available online: https://hdd.userbenchmark.com/Seagate-Barracuda-720014-1TB/Rating/1849 (accessed on 3 April 2023).
Clock Speed | 23.5 MHz (Nominal) | 33 MHz | 50 MHz |
---|---|---|---|
I/O acquisition throughput | 94 Mbytes/s | 132 Mbytes/s | 200 Mbytes/s |
I/O storage throughput | 70.5 Mbytes/s | 99 Mbytes/s | 150 Mbytes/s |
Frames lost/altered | None | None | 0.01% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the author. 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Fernández-Conde, J. A Low-Cost Hardware/Software Platform for Lossless Real-Time Data Acquisition from Imaging Spectrometers. Sensors 2023, 23, 4349. https://doi.org/10.3390/s23094349
Fernández-Conde J. A Low-Cost Hardware/Software Platform for Lossless Real-Time Data Acquisition from Imaging Spectrometers. Sensors. 2023; 23(9):4349. https://doi.org/10.3390/s23094349
Chicago/Turabian StyleFernández-Conde, Jesús. 2023. "A Low-Cost Hardware/Software Platform for Lossless Real-Time Data Acquisition from Imaging Spectrometers" Sensors 23, no. 9: 4349. https://doi.org/10.3390/s23094349
APA StyleFernández-Conde, J. (2023). A Low-Cost Hardware/Software Platform for Lossless Real-Time Data Acquisition from Imaging Spectrometers. Sensors, 23(9), 4349. https://doi.org/10.3390/s23094349